diff options
Diffstat (limited to 'mysql-test')
814 files changed, 28903 insertions, 21174 deletions
diff --git a/mysql-test/collections/10.0-compatible.list b/mysql-test/collections/10.0-compatible.list new file mode 100644 index 00000000000..4778bde3b78 --- /dev/null +++ b/mysql-test/collections/10.0-compatible.list @@ -0,0 +1,595 @@ +# All lines which have a hash sign *anywhere* will be ignored + +main.1st +main.adddate_454 +main.almost_full +main.alter_table_autoinc-5574 +main.alter_table_errors +main.alter_table_mdev539_maria +main.alter_table_mdev539_myisam +main.alter_table_online +main.alter_table_trans +main.analyze +main.analyze_stmt +main.analyze_stmt_orderby +main.analyze_stmt_slow_query_log +main.ansi +main.assign_key_cache +main.auth_rpl +main.auto_increment +main.auto_increment_ranges_innodb +main.auto_increment_ranges_myisam +main.bad_frm_crash_5029 +main.bench_count_distinct +main.bigint +main.binary +main.binary_to_hex +main.blackhole +main.blackhole_plugin +main.bool +main.bootstrap +main.bug12427262 +main.bug13633383 +main.bug46760 +main.bug47671 +main.bulk_replace +main.case +main.change_user +main.check_constraint_show +main.client_xml +main.comment_column +main.comment_column2 +main.comment_index +main.comments +main.comment_table +main.commit_1innodb +main.compare +main.compound +main.contributors +main.count_distinct +main.count_distinct2 +main.create_drop_db +main.create_drop_event +main.create_drop_function +main.create_drop_index +main.create_drop_procedure +main.create_drop_server +main.create_drop_trigger +main.create_drop_user +main.create_drop_view +main.create_not_windows +main.create_select_tmp +main.create-uca +main.create_user +main.create_w_max_indexes_64 +main.ctype_ascii +main.ctype_big5 +main.ctype_binary +main.ctype_collate +main.ctype_cp1250_ch +main.ctype_cp1251 +main.ctype_cp850 +main.ctype_cp932 +main.ctype_cp932_binlog_row +main.ctype_cp932_binlog_stm +main.ctype_create +main.ctype_eucjpms +main.ctype_euckr +main.ctype_filename +main.ctype_filesystem +main.ctype_gb2312 +main.ctype_gbk +main.ctype_gbk_binlog +main.ctype_gbk_export_import +main.ctype_hebrew +main.ctype_latin1 +main.ctype_latin1_de +main.ctype_latin2 +main.ctype_latin2_ch +main.ctype_ldml +main.ctype_many +main.ctype_mb +main.ctype_nopad_8bit +main.ctype_partitions +main.ctype_recoding +main.ctype_sjis +main.ctype_swe7 +main.ctype_tis620 +main.ctype_uca +main.ctype_uca_innodb +main.ctype_uca_partitions +main.ctype_ucs +main.ctype_ucs2_def +main.ctype_ucs2_query_cache +main.ctype_ucs2_uca +main.ctype_ujis +main.ctype_ujis_ucs2 +main.ctype_upgrade +main.ctype_utf16 +main.ctype_utf16_def +main.ctype_utf16le +main.ctype_utf16_uca +main.ctype_utf32 +main.ctype_utf32_uca +main.ctype_utf8 +main.ctype_utf8mb4 +main.ctype_utf8mb4_heap +main.ctype_utf8mb4_innodb +main.ctype_utf8mb4_myisam +main.ctype_utf8mb4_uca +main.ctype_utf8_uca +main.date_formats +main.datetime_456 +main.default_storage_engine +main.delete +main.delete_returning +main.deprecated_features +main.derived_cond_pushdown +main.derived_opt +main.derived_view +main.distinct +main.drop-no_root +main.dyncol +main.empty_server_name-8224 +main.empty_table +main.endspace +main.enforce_storage_engine_opt +main.errors +main.events_2 +main.events_logs_tests +main.events_microsec +main.events_restart +main.events_scheduling +main.events_slowlog +main.events_trans +main.execution_constants +main.explain +main.explain_json +main.explain_json_format_partitions +main.explain_json_innodb +main.explain_non_select +main.ext_key_noPK_6794 +main.fast_prefix_index_fetch_innodb +main.features +main.filesort_bad_i_s-7585 +main.flush2 +main.foreign_key +main.frm_bad_row_type-7333 +main.fulltext +main.fulltext2 +main.fulltext3 +main.fulltext_cache +main.fulltext_charsets +main.fulltext_derived_4257 +main.fulltext_derived_4316 +main.fulltext_distinct +main.fulltext_left_join +main.fulltext_multi +main.fulltext_order_by +main.fulltext_update +main.fulltext_var +main.func_analyse +main.func_concat +main.func_crypt +main.func_date_add +main.func_default +main.func_des_encrypt +main.func_digest +main.func_encrypt +main.func_encrypt_ucs2 +main.func_equal +main.func_gconcat +main.func_group_innodb +main.func_hybrid_type +main.func_if +main.func_in +main.func_isnull +main.func_like +main.func_math +main.func_op +main.func_regexp +main.func_regexp_pcre +main.func_rollback +main.func_sapdb +main.func_set +main.func_system +main.func_test +main.func_time +main.func_time_hires +main.func_timestamp +main.function_defaults +main.function_defaults_innodb +main.gcc296 +main.get_diagnostics +main.gis +main.gis2 +main.gis-alter_table_online +main.gis-precise +main.gis-rt-precise +main.gis-rtree +main.grant_4332 +main.greedy_optimizer +main.group_by +main.group_by_innodb +main.group_by_null +main.group_min_max +main.group_min_max_innodb +main.handler_read_last +main.handlersocket +main.having +main.help +main.host_cache_size_functionality +main.huge_frm-6224 +main.implicit_char_to_num_conversion +main.implicit_commit +main.in_datetime_241 +main.index_intersect +main.index_intersect_innodb +main.index_merge_innodb +main.index_merge_myisam +main.information_schema2 +main.information_schema_all_engines +main.information_schema_chmod +main.information_schema_inno +main.information_schema_parameters +main.information_schema_part +main.information_schema_routines +main.information_schema_stats +main.init_file +main.init_file_longline_3816 +main.init_file_set_password-7656 +main.innodb_bug878769 +main.innodb_ext_key +main.innodb_group +main.innodb_icp +main.innodb_ignore_builtin +main.innodb_mrr_cpk +main.innodb_utf8 +main.insert +main.insert_innodb +main.insert_select +main.insert_update +main.insert_update_autoinc-7150 +main.join +main.join_cache +main.join_crash +main.join_nested +main.join_nested_jcl6 +main.join_optimizer +main.join_outer +main.join_outer_innodb +main.join_outer_jcl6 +main.key +main.key_cache +main.key_diff +main.key_primary +main.keyread +main.keywords +main.last_value +main.limit +main.limit_rows_examined +main.loaddata_autocom_innodb +main.locale +main.log_errchk +main.log_slow +main.log_state_bug33693 +main.log_tables_upgrade +main.long_tmpdir +main.lowercase_mixed_tmpdir +main.lowercase_table +main.lowercase_table5 +main.lowercase_table_grant +main.lowercase_table_qcache +main.lowercase_utf8 +main.lowercase_view +main.mdev13607 +main.mdev_14586 +main.mdev316 +main.mdl +main.merge_innodb +main.merge_mmap +main.metadata +main.mix2_myisam_ucs2 +main.mrr_derived_crash_4610 +main.mrr_icp_extra +main.multi_statement +main.multi_update2 +main.multi_update_innodb +main.multi_update_tiny_hash +main.myisam-blob +main.myisam_enable_keys-10506 +main.myisam_explain_non_select_all +main.myisam_icp +main.myisam_mrr +main.myisampack +main.myisam-system +main.mysql +main.mysql5613mysql +main.mysql57_virtual +main.mysqladmin +main.mysql_binary_mode +main.mysqlcheck +main.mysql_comments +main.mysql_cp932 +main.mysqld--defaults-file +main.mysqld--help +main.mysqld_help_crash-9183 +main.mysqld_option_err +main.mysqldump-compat +main.mysqldump-nl +main.mysqldump-no-binlog +main.mysqldump_restore +main.mysql_not_windows +main.mysql_protocols +main.mysqlshow +main.mysqlslap +main.mysqltest_256 +main.mysqltest_cont_on_error +main.mysql_tzinfo_to_sql_symlink +main.mysql_upgrade_noengine +main.mysql_upgrade_no_innodb +main.mysql_upgrade_ssl +main.mysql_upgrade_view +main.negation_elimination +main.no_binlog +main.no_password_column-mdev-11170 +main.null +main.null_key +main.odbc +main.olap +main.old-mode +main.order_by +main.order_by_innodb +main.order_by-mdev-10122 +main.order_by_optimizer +main.order_by_optimizer_innodb +main.order_by_sortkey +main.order_by_zerolength-4285 +main.order_fill_sortbuf +main.outfile_loaddata +main.parser +main.parser_bug21114_innodb +main.parser_precedence +main.parser_stack +main.partition +main.partition_binlog +main.partition_binlog_stmt +main.partition_blackhole +main.partition_bug18198 +main.partition_cache_innodb +main.partition_cache_myisam +main.partition_charset +main.partition_column +main.partition_column_prune +main.partition_datatype +main.partition_disabled +main.partition_error +main.partition_example +main.partition_exchange +main.partition_explicit_prune +main.partition_hash +main.partition_key_cache +main.partition_list +main.partition_mgm +main.partition_mgm_err +main.partition_mgm_err2 +main.partition_myisam +main.partition_not_blackhole +main.partition_not_windows +main.partition_order +main.partition_pruning +main.partition_range +main.partition_rename_longfilename +main.partition_truncate +main.partition_utf8 +main.perror +main.plugin +main.plugin_auth_qa +main.plugin_auth_qa_2 +main.plugin_auth_qa_3 +main.plugin_innodb +main.plugin_load +main.plugin_loaderr +main.plugin_load_option +main.plugin_maturity +main.preload +main.profiling +main.progress_976225 +main.ps_10nestset +main.ps_11bugs +main.ps_1general +main.ps_2myisam +main.ps_3innodb +main.ps_4heap +main.ps_5merge +main.ps_change_master +main.ps_ddl1 +main.ps_max_subselect-5113 +main.ps_not_windows +main.query_cache +main.query_cache_innodb +main.query_cache_merge +main.query_cache_with_views +main.range +main.range_innodb +main.range_mrr_icp +main.range_vs_index_merge +main.range_vs_index_merge_innodb +main.renamedb +main.reopen_temp_table +main.repair +main.repair_symlink-5543 +main.replace +main.rollback +main.round +main.row +main.row-checksum +main.row-checksum-old +main.rowid_order_innodb +main.rpl_mysqldump_slave +main.second_frac-9175 +main.select +main.select_found +main.selectivity +main.selectivity_innodb +main.selectivity_no_engine +main.select_jcl6 +main.select_pkeycache +main.select_safe +main.servers +main.set_password +main.set_statement_notembedded +main.set_statement_notembedded_binlog +main.show +main.show_bad_definer-5553 +main.show_create_user +main.show_function_with_pad_char_to_full_length +main.show_profile +main.show_row_order-9226 +main.sighup-6580 +main.signal +main.signal_demo1 +main.signal_demo2 +main.signal_demo3 +main.signal_sqlmode +main.single_delete_update +main.single_delete_update_innodb +main.skip_grants +main.skip_log_bin +main.sp-big +main.sp-bugs +main.sp-bugs2 +main.sp-destruct +main.sp-dynamic +main.sp-error +main.sp-fib +main.sp_gis +main.sp-group +main.sp_missing_4665 +main.sp-no-code +main.sp-prelocking +main.sp_stress_case +main.sp_trans +main.sp_trans_log +main.sp-ucs2 +main.sp-vars +main.ssl_7937 +main.ssl_8k_key +main.ssl_and_innodb +main.ssl_ca +main.ssl_cert_verify +main.ssl_connect +main.ssl_crl_clients +main.stack-crash +main.statistics +main.statistics_index_crash-7362 +main.stat_tables +main.stat_tables_disabled +main.stat_tables_innodb +main.stat_tables_partition +main.stat_tables_repl +main.strict +main.strict_autoinc_1myisam +main.strict_autoinc_2innodb +main.strict_autoinc_3heap +main.str_to_datetime_457 +main.subselect2 +main.subselect3 +main.subselect3_jcl6 +main.subselect4 +main.subselect_cache +main.subselect-crash_15755 +main.subselect_exists2in +main.subselect_exists2in_costmat +main.subselect_extra +# Disabled due to connect log output +# main.subselect_extra_no_semijoin +main.subselect_gis +main.subselect_innodb +main.subselect_mat +main.subselect_mat_cost +main.subselect_mat_cost_bugs +main.subselect_notembedded +main.subselect_nulls +main.subselect_partial_match +main.subselect_sj2 +main.subselect_sj2_jcl6 +main.subselect_sj2_mat +main.subselect_sj_aria +main.subselect_sj_mat +main.subselect_sj_nonmerged +main.sum_distinct +main.sysdate_is_now +main.system_mysql_db +main.system_mysql_db_refs +main.table_elim +main.table_elim_debug +main.table_keyinfo-6838 +main.tablelock +main.table_options +main.table_options-5867 +main.temporal_literal +main.temporal_scale_4283 +main.temp_table_frm +main.timezone +main.timezone2 +main.timezone3 +main.timezone4 +main.tmp_table_count-7586 +main.trigger_no_defaults-11698 +main.trigger_null-8605 +main.truncate +main.truncate_badse +main.truncate-stale-6500 +main.type_binary +main.type_bit +main.type_bit_innodb +main.type_blob +main.type_datetime_hires +main.type_decimal +main.type_enum +main.type_float +main.type_int +main.type_nchar +main.type_newdecimal +main.type_num +main.type_num_innodb +main.type_ranges +main.type_set +main.type_temporal_innodb +main.type_temporal_mysql56 +main.type_time +main.type_time_6065 +main.type_time_hires +main.type_timestamp_hires +main.type_uint +main.type_varchar +main.type_year +main.update_ignore_216 +main.update_innodb +main.upgrade +main.user_var +main.varbinary +main.variables_community +main.view_alias +main.warnings_engine_disabled +main.win_avg +main.win_big +main.win_big-mdev-10092 +main.win_big-mdev-11697 +main.win_bit +main.win_empty_over +main.win_first_last_value +main.win_insert_select +main.win_i_s +# Disabled due to unknown SQL error name +# main.win_lead_lag +main.win_min_max +main.win_nth_value +main.win_orderby +main.win_percent_cume +main.win_rank +main.win_sum +main.xa_binlog +main.xml +main.xtradb_mrr diff --git a/mysql-test/dgcov.pl b/mysql-test/dgcov.pl index 27647eed056..05829c61bc8 100755 --- a/mysql-test/dgcov.pl +++ b/mysql-test/dgcov.pl @@ -14,7 +14,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA # Run gcov and report test coverage on only those code lines touched by # a given list of commits. diff --git a/mysql-test/include/check-testcase.test b/mysql-test/include/check-testcase.test index 3c164eef8b6..a9c8e13fa7c 100644 --- a/mysql-test/include/check-testcase.test +++ b/mysql-test/include/check-testcase.test @@ -81,6 +81,18 @@ if (!$tmp) { SHOW SLAVE STATUS; } +# +# Ensure that we don't get warnings from mysql.proc (used by check_mysqld) +# + +--disable_query_log +--disable_warnings +--disable_result_log +select count(*) from mysql.proc; +--enable_result_log +--enable_warnings +--enable_query_log + call mtr.check_testcase(); let $datadir=`select @@datadir`; diff --git a/mysql-test/include/ctype_mdev13118.inc b/mysql-test/include/ctype_mdev13118.inc new file mode 100644 index 00000000000..efcb57299df --- /dev/null +++ b/mysql-test/include/ctype_mdev13118.inc @@ -0,0 +1,15 @@ +--echo # +--echo # MDEV-13118 Wrong results with LOWER and UPPER and subquery +--echo # + +SET @save_optimizer_switch=@@optimizer_switch; +SET optimizer_switch=_latin1'derived_merge=on'; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS t LIMIT 0; +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES ('abcdefghi'),('ABCDEFGHI'); +--sorted_result +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT LOWER(t) t2 FROM t1) sub; +--sorted_result +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT UPPER(t) t2 FROM t1) sub; +DROP TABLE t1; +SET optimizer_switch=@save_optimizer_switch; diff --git a/mysql-test/include/diff_tables.inc b/mysql-test/include/diff_tables.inc index b5ee4db0e8f..a29156cfce9 100644 --- a/mysql-test/include/diff_tables.inc +++ b/mysql-test/include/diff_tables.inc @@ -167,7 +167,7 @@ while ($_dt_tables) # the table to a file. --let $_dt_outfile= `SELECT @@datadir` --let $_dt_outfile= $_dt_outfile/diff_table-$_dt_connection-$_dt_database-$_dt_table - eval SELECT * FROM $_dt_database.$_dt_table ORDER BY `$_dt_column_list` INTO OUTFILE '$_dt_outfile'; + eval SELECT * INTO OUTFILE '$_dt_outfile' FROM $_dt_database.$_dt_table ORDER BY `$_dt_column_list`; # Compare files. if ($_dt_prev_outfile) diff --git a/mysql-test/include/have_32bit.inc b/mysql-test/include/have_32bit.inc new file mode 100644 index 00000000000..d62093d8be4 --- /dev/null +++ b/mysql-test/include/have_32bit.inc @@ -0,0 +1,9 @@ +disable_query_log; +disable_warnings; +let $VERSION_COMPILE_64BIT= + `SELECT IF(@@version_compile_machine like '%64%', 1, 0)`; +enable_warnings; +enable_query_log; +if ($VERSION_COMPILE_64BIT) { + skip Need a 32 bit machine/binary; +} diff --git a/mysql-test/include/have_64bit.inc b/mysql-test/include/have_64bit.inc new file mode 100644 index 00000000000..38c11156a53 --- /dev/null +++ b/mysql-test/include/have_64bit.inc @@ -0,0 +1,9 @@ +disable_query_log; +disable_warnings; +let $VERSION_COMPILE_64BIT= + `SELECT IF(@@version_compile_machine like '%64%', 1, 0)`; +enable_warnings; +enable_query_log; +if (!$VERSION_COMPILE_64BIT) { + skip Need a 64 bit machine/binary; +} diff --git a/mysql-test/include/maria_empty_logs.inc b/mysql-test/include/maria_empty_logs.inc index 78a08228caa..f1835c0d2c3 100644 --- a/mysql-test/include/maria_empty_logs.inc +++ b/mysql-test/include/maria_empty_logs.inc @@ -92,3 +92,15 @@ connection default; --disable_query_log eval use $default_db; --enable_query_log + +# +# Ensure that we don't get warnings from mysql.priv (used by check_mysqld) +# or test running after this one. +# +--disable_query_log +--disable_warnings +--disable_result_log +show table status from mysql; +--enable_result_log +--enable_warnings +--enable_query_log diff --git a/mysql-test/include/maria_verify_recovery.inc b/mysql-test/include/maria_verify_recovery.inc index b0f95d2a94b..bb782d5f4cc 100644 --- a/mysql-test/include/maria_verify_recovery.inc +++ b/mysql-test/include/maria_verify_recovery.inc @@ -97,3 +97,15 @@ while ($mms_table_to_use) connection default; # the effect of "use" is lost after a restart so we are back into db "test" use mysqltest; + +# +# Ensure that we don't get warnings from mysql.proc (used by check_mysqld) +# + +--disable_query_log +--disable_warnings +--disable_result_log +select count(*) from mysql.proc; +--enable_result_log +--enable_warnings +--enable_query_log diff --git a/mysql-test/include/mtr_check.sql b/mysql-test/include/mtr_check.sql index f2c0b70e192..8548200f437 100644 --- a/mysql-test/include/mtr_check.sql +++ b/mysql-test/include/mtr_check.sql @@ -85,7 +85,6 @@ BEGIN mysql.help_category, mysql.help_keyword, mysql.help_relation, - mysql.host, mysql.plugin, mysql.proc, mysql.procs_priv, diff --git a/mysql-test/include/mtr_warnings.sql b/mysql-test/include/mtr_warnings.sql index b7b2a316dfb..524ea0f4859 100644 --- a/mysql-test/include/mtr_warnings.sql +++ b/mysql-test/include/mtr_warnings.sql @@ -242,7 +242,7 @@ BEGIN DECLARE `pos` bigint unsigned; -- Don't write these queries to binlog - SET SQL_LOG_BIN=0; + SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; -- -- Remove mark from lines that are suppressed by global suppressions diff --git a/mysql-test/include/search_pattern_in_file.inc b/mysql-test/include/search_pattern_in_file.inc index 21192b55efb..6bead628fb0 100644 --- a/mysql-test/include/search_pattern_in_file.inc +++ b/mysql-test/include/search_pattern_in_file.inc @@ -18,6 +18,11 @@ # Optionally, SEARCH_ABORT can be set to "FOUND" or "NOT FOUND" and this # will abort if the search result doesn't match the requested one. # +# Optionally, SEARCH_OUTPUT can be set to control the format of output. +# Supported formats: +# - (default) : "FOUND n /pattern/ in FILE " or "NOT FOUND ..." +# - "matches" : Each match is printed, on a separate line +# # In case of # - SEARCH_FILE and/or SEARCH_PATTERN is not set # - SEARCH_FILE cannot be opened @@ -75,7 +80,14 @@ perl; my @matches=($content =~ m/$search_pattern/gs); my $res=@matches ? "FOUND " . scalar(@matches) : "NOT FOUND"; $ENV{SEARCH_FILE} =~ s{^.*?([^/\\]+)$}{$1}; - print "$res /$search_pattern/ in $ENV{SEARCH_FILE}\n"; + + if ($ENV{SEARCH_OUTPUT} eq "matches") { + foreach (@matches) { + print $_ . "\n"; + } + } else { + print "$res /$search_pattern/ in $ENV{SEARCH_FILE}\n"; + } die "$ENV{SEARCH_ABORT}\n" - if $ENV{SEARCH_ABORT} && $res =~ /^$ENV{SEARCH_ABORT}/; + if $ENV{SEARCH_ABORT} && $res =~ /^$ENV{SEARCH_ABORT}/; EOF diff --git a/mysql-test/include/system_db_struct.inc b/mysql-test/include/system_db_struct.inc index 9467c023dba..7dd7746459e 100644 --- a/mysql-test/include/system_db_struct.inc +++ b/mysql-test/include/system_db_struct.inc @@ -5,7 +5,6 @@ -- replace_result Tables_in_mysql Tables_in_db Tables_in_test Tables_in_db show tables; show create table db; -show create table host; show create table user; show create table func; show create table tables_priv; diff --git a/mysql-test/lib/My/Config.pm b/mysql-test/lib/My/Config.pm index a343a0ef688..4af59a178de 100644 --- a/mysql-test/lib/My/Config.pm +++ b/mysql-test/lib/My/Config.pm @@ -195,14 +195,10 @@ sub value { my ($self, $option_name)= @_; my $option= $self->option($option_name); - if (! defined($option) and defined $ENV{$option_name}) { + if (! defined($option)) { my $value= $ENV{$option_name}; $option= My::Config::Option->new($option_name, $value); } - - croak "No option named '$option_name' in group '$self->{name}'" - if ! defined($option); - return $option->value(); } diff --git a/mysql-test/lib/My/ConfigFactory.pm b/mysql-test/lib/My/ConfigFactory.pm index 830b49d431f..d481058902f 100644 --- a/mysql-test/lib/My/ConfigFactory.pm +++ b/mysql-test/lib/My/ConfigFactory.pm @@ -209,13 +209,6 @@ my @mysqld_rules= { 'bind-address' => \&fix_bind_address }, ); -if (IS_WINDOWS) -{ - # For simplicity, we use the same names for shared memory and - # named pipes. - push(@mysqld_rules, {'shared-memory-base-name' => \&fix_socket}); -} - # # Rules to run for [client] section # - will be run in order listed here @@ -281,19 +274,6 @@ sub post_check_client_group { } $config->insert($client_group_name, $name_to, $option->value()) } - - if (IS_WINDOWS) - { - if (! $self->{ARGS}->{embedded}) - { - # Shared memory base may or may not be defined (e.g not defined in embedded) - my $shm = $group_to_copy_from->option("shared-memory-base-name"); - if (defined $shm) - { - $config->insert($client_group_name,"shared-memory-base-name", $shm->value()); - } - } - } } @@ -340,7 +320,6 @@ sub post_check_embedded_group { ( 'log-error', # Embedded server writes stderr to mysqltest's log file 'slave-net-timeout', # Embedded server are not build with replication - 'shared-memory-base-name', # No shared memory for embedded ); foreach my $option ( $mysqld->options(), $first_mysqld->options() ) { diff --git a/mysql-test/lib/My/Platform.pm b/mysql-test/lib/My/Platform.pm index 110cf8a20e0..29c47028b31 100644 --- a/mysql-test/lib/My/Platform.pm +++ b/mysql-test/lib/My/Platform.pm @@ -112,6 +112,8 @@ sub check_socket_path_length { return 0 if ($^O eq 'aix'); # See Debian bug #670722 - failing on kFreeBSD even after setting short path return 0 if $^O eq 'gnukfreebsd' and length $path < 40; + # GNU/Hurd doesn't have hostpath(), but no limitation either + return 0 if $^O eq 'gnu'; require IO::Socket::UNIX; diff --git a/mysql-test/lib/v1/mysql-test-run.pl b/mysql-test/lib/v1/mysql-test-run.pl index 386b50b2723..9c9bc0e02fb 100755 --- a/mysql-test/lib/v1/mysql-test-run.pl +++ b/mysql-test/lib/v1/mysql-test-run.pl @@ -23,7 +23,7 @@ # Tool used for executing a suite of .test file # # See the "MySQL Test framework manual" for more information -# http://dev.mysql.com/doc/mysqltest/en/index.html +# https://mariadb.com/kb/en/library/mysqltest/ # # Please keep the test framework tools identical in all versions! # diff --git a/mysql-test/main/1st.result b/mysql-test/main/1st.result index cb2da3505f5..2d49726c5f6 100644 --- a/mysql-test/main/1st.result +++ b/mysql-test/main/1st.result @@ -18,7 +18,6 @@ help_category help_keyword help_relation help_topic -host index_stats innodb_index_stats innodb_table_stats diff --git a/mysql-test/main/alter_table.result b/mysql-test/main/alter_table.result index cb3783eca5a..49c42479516 100644 --- a/mysql-test/main/alter_table.result +++ b/mysql-test/main/alter_table.result @@ -1411,6 +1411,59 @@ t1 CREATE TABLE `t1` ( `consultant_id` bigint(20) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 DROP TABLE t1; +# +# BUG#27788685: NO WARNING WHEN TRUNCATING A STRING WITH DATA LOSS +# +SET GLOBAL max_allowed_packet=17825792; +connect con1, localhost, root,,; +CREATE TABLE t1 (t1_fld1 TEXT); +CREATE TABLE t2 (t2_fld1 MEDIUMTEXT); +CREATE TABLE t3 (t3_fld1 LONGTEXT); +INSERT INTO t1 VALUES (REPEAT('a',300)); +INSERT INTO t2 VALUES (REPEAT('b',65680)); +INSERT INTO t3 VALUES (REPEAT('c',16777300)); +SELECT LENGTH(t1_fld1) FROM t1; +LENGTH(t1_fld1) +300 +SELECT LENGTH(t2_fld1) FROM t2; +LENGTH(t2_fld1) +65680 +SELECT LENGTH(t3_fld1) FROM t3; +LENGTH(t3_fld1) +16777300 +# With strict mode +SET SQL_MODE='STRICT_ALL_TABLES'; +ALTER TABLE t1 CHANGE `t1_fld1` `my_t1_fld1` TINYTEXT; +ERROR 22001: Data too long for column 'my_t1_fld1' at row 1 +ALTER TABLE t2 CHANGE `t2_fld1` `my_t2_fld1` TEXT; +ERROR 22001: Data too long for column 'my_t2_fld1' at row 1 +ALTER TABLE t3 CHANGE `t3_fld1` `my_t3_fld1` MEDIUMTEXT; +ERROR 22001: Data too long for column 'my_t3_fld1' at row 1 +# With non-strict mode +SET SQL_MODE=''; +ALTER TABLE t1 CHANGE `t1_fld1` `my_t1_fld1` TINYTEXT; +Warnings: +Warning 1265 Data truncated for column 'my_t1_fld1' at row 1 +ALTER TABLE t2 CHANGE `t2_fld1` `my_t2_fld1` TEXT; +Warnings: +Warning 1265 Data truncated for column 'my_t2_fld1' at row 1 +ALTER TABLE t3 CHANGE `t3_fld1` `my_t3_fld1` MEDIUMTEXT; +Warnings: +Warning 1265 Data truncated for column 'my_t3_fld1' at row 1 +SELECT LENGTH(my_t1_fld1) FROM t1; +LENGTH(my_t1_fld1) +255 +SELECT LENGTH(my_t2_fld1) FROM t2; +LENGTH(my_t2_fld1) +65535 +SELECT LENGTH(my_t3_fld1) FROM t3; +LENGTH(my_t3_fld1) +16777215 +disconnect con1; +connection default; +DROP TABLE t1, t2, t3; +SET SQL_MODE=default; +SET GLOBAL max_allowed_packet=default; CREATE TABLE t1 ( id INT(11) NOT NULL, x_param INT(11) DEFAULT NULL, diff --git a/mysql-test/main/alter_table.test b/mysql-test/main/alter_table.test index 5c218c26923..dfa8e2e148b 100644 --- a/mysql-test/main/alter_table.test +++ b/mysql-test/main/alter_table.test @@ -1292,6 +1292,56 @@ MODIFY COLUMN `consultant_id` BIGINT; SHOW CREATE TABLE t1; DROP TABLE t1; +--echo # +--echo # BUG#27788685: NO WARNING WHEN TRUNCATING A STRING WITH DATA LOSS +--echo # + +SET GLOBAL max_allowed_packet=17825792; + +--connect(con1, localhost, root,,) +CREATE TABLE t1 (t1_fld1 TEXT); +CREATE TABLE t2 (t2_fld1 MEDIUMTEXT); +CREATE TABLE t3 (t3_fld1 LONGTEXT); + +INSERT INTO t1 VALUES (REPEAT('a',300)); +INSERT INTO t2 VALUES (REPEAT('b',65680)); +INSERT INTO t3 VALUES (REPEAT('c',16777300)); + +SELECT LENGTH(t1_fld1) FROM t1; +SELECT LENGTH(t2_fld1) FROM t2; +SELECT LENGTH(t3_fld1) FROM t3; + +--echo # With strict mode +SET SQL_MODE='STRICT_ALL_TABLES'; + +--error ER_DATA_TOO_LONG +ALTER TABLE t1 CHANGE `t1_fld1` `my_t1_fld1` TINYTEXT; +--error ER_DATA_TOO_LONG +ALTER TABLE t2 CHANGE `t2_fld1` `my_t2_fld1` TEXT; +--error ER_DATA_TOO_LONG +ALTER TABLE t3 CHANGE `t3_fld1` `my_t3_fld1` MEDIUMTEXT; + +--echo # With non-strict mode +SET SQL_MODE=''; + +ALTER TABLE t1 CHANGE `t1_fld1` `my_t1_fld1` TINYTEXT; +ALTER TABLE t2 CHANGE `t2_fld1` `my_t2_fld1` TEXT; +ALTER TABLE t3 CHANGE `t3_fld1` `my_t3_fld1` MEDIUMTEXT; + +SELECT LENGTH(my_t1_fld1) FROM t1; +SELECT LENGTH(my_t2_fld1) FROM t2; +SELECT LENGTH(my_t3_fld1) FROM t3; + +# Cleanup +--disconnect con1 +--source include/wait_until_disconnected.inc + +--connection default +DROP TABLE t1, t2, t3; + +SET SQL_MODE=default; +SET GLOBAL max_allowed_packet=default; + # # Test of ALTER TABLE IF [NOT] EXISTS # diff --git a/mysql-test/main/alter_user.result b/mysql-test/main/alter_user.result index 76f811f18c7..68720b6d6c7 100644 --- a/mysql-test/main/alter_user.result +++ b/mysql-test/main/alter_user.result @@ -7,19 +7,19 @@ 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 Y alter user CURRENT_USER; select * from mysql.user where user = 'root' and host = 'localhost'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -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 Y 0 0 0 0 N N 0.000000 +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 Y 0 0 0 0 mysql_native_password N N 0.000000 alter user CURRENT_USER(); select * from mysql.user where user = 'root' and host = 'localhost'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -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 Y 0 0 0 0 N N 0.000000 +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 Y 0 0 0 0 mysql_native_password N N 0.000000 create user foo; select * from mysql.user where user = 'foo'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 N N 0.000000 +% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 mysql_native_password N N 0.000000 alter user foo; select * from mysql.user where user = 'foo'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 N N 0.000000 +% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 mysql_native_password N N 0.000000 # Test super privilege works correctly with a read only database. SET @start_read_only = @@global.read_only; SET GLOBAL read_only=1; @@ -51,37 +51,43 @@ Note 1396 Operation ALTER USER failed for 'boo' alter user foo identified by 'something'; select * from mysql.user where user = 'foo'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 N N 0.000000 +% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000 alter user foo identified by 'something2'; select * from mysql.user where user = 'foo'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -% foo *9CD58369E930E28C8996A89DB18B63294E6DC10C N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 N N 0.000000 +% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_native_password *9CD58369E930E28C8996A89DB18B63294E6DC10C N N 0.000000 alter user foo identified by password '*88C89BE093D4ECF72D039F62EBB7477EA1FD4D63'; select * from mysql.user where user = 'foo'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 N N 0.000000 +% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000 alter user foo identified with 'somecoolplugin'; +ERROR HY000: Operation ALTER USER failed for 'foo'@'%' +show warnings; +Level Code Message +Warning 1524 Plugin 'somecoolplugin' is not loaded +Error 1396 Operation ALTER USER failed for 'foo'@'%' +alter user foo identified with 'mysql_old_password'; select * from mysql.user where user = 'foo'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 somecoolplugin N N 0.000000 -alter user foo identified with 'somecoolplugin' using 'somecoolpassphrase'; +% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_old_password N N 0.000000 +alter user foo identified with 'mysql_old_password' using '0123456789ABCDEF'; select * from mysql.user where user = 'foo'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 somecoolplugin somecoolpassphrase N N 0.000000 +% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N 0 0 0 0 mysql_old_password 0123456789ABCDEF N N 0.000000 # Test ssl related altering. alter user foo identified by 'something' require SSL; select * from mysql.user where user = 'foo'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N ANY 0 0 0 0 N N 0.000000 +% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N ANY 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000 alter user foo identified by 'something' require X509; select * from mysql.user where user = 'foo'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N X509 0 0 0 0 N N 0.000000 +% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N X509 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000 alter user foo identified by 'something' require cipher 'text' issuer 'foo_issuer' subject 'foo_subject'; select * from mysql.user where user = 'foo'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N SPECIFIED text foo_issuer foo_subject 0 0 0 0 N N 0.000000 +% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N SPECIFIED text foo_issuer foo_subject 0 0 0 0 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000 # Test resource limits altering. alter user foo with MAX_QUERIES_PER_HOUR 10 MAX_UPDATES_PER_HOUR 20 @@ -89,5 +95,6 @@ MAX_CONNECTIONS_PER_HOUR 30 MAX_USER_CONNECTIONS 40; select * from mysql.user where user = 'foo'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -% foo *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N SPECIFIED text foo_issuer foo_subject 10 20 30 40 N N 0.000000 +% foo N N N N N N N N N N N N N N N Y N N N N N N N N N Y N N N N SPECIFIED text foo_issuer foo_subject 10 20 30 40 mysql_native_password *88C89BE093D4ECF72D039F62EBB7477EA1FD4D63 N N 0.000000 drop user foo; +update mysql.user set plugin=''; diff --git a/mysql-test/main/alter_user.test b/mysql-test/main/alter_user.test index ca444f70a70..ef20f79a554 100644 --- a/mysql-test/main/alter_user.test +++ b/mysql-test/main/alter_user.test @@ -53,10 +53,14 @@ select * from mysql.user where user = 'foo'; alter user foo identified by password '*88C89BE093D4ECF72D039F62EBB7477EA1FD4D63'; select * from mysql.user where user = 'foo'; +--error ER_CANNOT_USER alter user foo identified with 'somecoolplugin'; +show warnings; + +alter user foo identified with 'mysql_old_password'; select * from mysql.user where user = 'foo'; -alter user foo identified with 'somecoolplugin' using 'somecoolpassphrase'; +alter user foo identified with 'mysql_old_password' using '0123456789ABCDEF'; select * from mysql.user where user = 'foo'; --echo # Test ssl related altering. @@ -77,3 +81,5 @@ alter user foo with MAX_QUERIES_PER_HOUR 10 MAX_USER_CONNECTIONS 40; select * from mysql.user where user = 'foo'; drop user foo; + +update mysql.user set plugin=''; diff --git a/mysql-test/main/auto_increment_ranges_innodb.result b/mysql-test/main/auto_increment_ranges_innodb.result index 1d827a5a166..0471a5a33ba 100644 --- a/mysql-test/main/auto_increment_ranges_innodb.result +++ b/mysql-test/main/auto_increment_ranges_innodb.result @@ -264,3 +264,17 @@ delete from t1 where a=32767; insert into t1 values(NULL); ERROR 22003: Out of range value for column 'a' at row 1 drop table t1; +create table t1 (pk int auto_increment primary key, f varchar(20)); +insert t1 (f) values ('a'), ('b'), ('c'), ('d'); +select null, f into outfile 'load.data' from t1 limit 1; +load data infile 'load.data' into table t1; +insert t1 (f) values ('<==='); +select * from t1; +pk f +1 a +2 b +3 c +4 d +5 a +6 <=== +drop table t1; diff --git a/mysql-test/main/auto_increment_ranges_innodb.test b/mysql-test/main/auto_increment_ranges_innodb.test index c2afee7ac66..016ca16bd91 100644 --- a/mysql-test/main/auto_increment_ranges_innodb.test +++ b/mysql-test/main/auto_increment_ranges_innodb.test @@ -5,3 +5,16 @@ --source include/have_innodb.inc set default_storage_engine=innodb; --source auto_increment_ranges.inc + +# +# MDEV-17377 invalid gap in auto-increment values after LOAD DATA +# +create table t1 (pk int auto_increment primary key, f varchar(20)); +insert t1 (f) values ('a'), ('b'), ('c'), ('d'); +select null, f into outfile 'load.data' from t1 limit 1; +load data infile 'load.data' into table t1; +insert t1 (f) values ('<==='); +select * from t1; +drop table t1; +--let $datadir=`select @@datadir` +--remove_file $datadir/test/load.data diff --git a/mysql-test/main/bootstrap.result b/mysql-test/main/bootstrap.result index 5cefc281996..eea0010b4e4 100644 --- a/mysql-test/main/bootstrap.result +++ b/mysql-test/main/bootstrap.result @@ -1,10 +1,10 @@ drop table if exists t1; +# Kill the server drop table t1; +# Kill the server drop table t1; ERROR 42S02: Unknown table 'test.t1' -set @my_max_allowed_packet= @@max_allowed_packet; -set global max_allowed_packet=64*@@max_allowed_packet; -set global max_allowed_packet=@my_max_allowed_packet; +# Kill the server drop table t1; End of 5.1 tests # @@ -14,7 +14,9 @@ End of 5.1 tests SELECT 'bug' as '' FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb' and SUPPORT='YES'; +# Kill the server End of 5.5 tests +# Kill the server flush tables; show create table t1; Table Create Table @@ -26,3 +28,4 @@ select * from mysql.plugin; name dl EXAMPLE ha_example.so truncate table mysql.plugin; +# Kill the server diff --git a/mysql-test/main/bootstrap.test b/mysql-test/main/bootstrap.test index 1ae9b13e050..d75be403f13 100644 --- a/mysql-test/main/bootstrap.test +++ b/mysql-test/main/bootstrap.test @@ -1,3 +1,4 @@ +--source include/not_embedded.inc # # test mysqld in bootstrap mode # @@ -15,7 +16,9 @@ let $MYSQLD_BOOTSTRAP_CMD= $MYSQLD_BOOTSTRAP_CMD --datadir=$MYSQLD_DATADIR --def use test; CREATE TABLE t1(a int); EOF +--source include/kill_mysqld.inc --exec $MYSQLD_BOOTSTRAP_CMD < $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1 +--source include/start_mysqld.inc drop table t1; remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql; # @@ -25,9 +28,11 @@ remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql; use test; CREATE TABLE t1; EOF +--source include/kill_mysqld.inc --error 1 --exec $MYSQLD_BOOTSTRAP_CMD < $MYSQLTEST_VARDIR/tmp/bootstrap_error.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1 # Table t1 should not exists +--source include/start_mysqld.inc --error 1051 drop table t1; remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_error.sql; @@ -35,17 +40,15 @@ 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=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; --enable_query_log +--source include/kill_mysqld.inc --error 1 --exec $MYSQLD_BOOTSTRAP_CMD < $MYSQLTEST_VARDIR/tmp/long_query.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1 remove_file $MYSQLTEST_VARDIR/tmp/long_query.sql; - -set global max_allowed_packet=@my_max_allowed_packet; +--source include/start_mysqld.inc drop table t1; --echo End of 5.1 tests @@ -62,8 +65,10 @@ SELECT 'bug' as '' FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb' # # MDEV-13063 Server crashes in intern_plugin_lock or assertion `plugin_ptr->ref_count == 1' fails in plugin_init # +--source include/kill_mysqld.inc --error 1 --exec $MYSQLD_BOOTSTRAP_CMD --myisam_recover_options=NONE +--source include/start_mysqld.inc --echo End of 5.5 tests @@ -73,6 +78,7 @@ SELECT 'bug' as '' FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb' # Check that --bootstrap can install and uninstall plugins # let $PLUGIN_DIR=`select @@plugin_dir`; +--source include/kill_mysqld.inc --write_file $MYSQLTEST_VARDIR/tmp/install_plugin.sql install soname 'ha_example'; uninstall plugin unusable; @@ -90,6 +96,7 @@ create table t1(a int) engine=example charset=latin1; EOF --exec $MYSQLD_BOOTSTRAP_CMD --plugin-dir=$PLUGIN_DIR < $MYSQLTEST_VARDIR/tmp/bootstrap_plugins.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1 --remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_plugins.sql +--source include/start_mysqld.inc flush tables; show create table t1; drop table t1; @@ -104,5 +111,17 @@ truncate table mysql.plugin; --write_file $MYSQLTEST_VARDIR/tmp/bootstrap_9969.sql use test; EOF +--source include/kill_mysqld.inc --exec $MYSQLD_BOOTSTRAP_CMD --ignore-db-dirs='some_dir' --ignore-db-dirs='some_dir' < $MYSQLTEST_VARDIR/tmp/bootstrap_9969.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1 --remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_9969.sql + +# +# MDEV-13397 MariaDB upgrade fail when using default_time_zone +# +--write_file $MYSQLTEST_VARDIR/tmp/bootstrap_9969.sql +use test; +EOF +--exec $MYSQLD_BOOTSTRAP_CMD --default-time-zone=Europe/Moscow < $MYSQLTEST_VARDIR/tmp/bootstrap_9969.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1 +--remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_9969.sql + +--source include/start_mysqld.inc diff --git a/mysql-test/main/brackets.result b/mysql-test/main/brackets.result index 479b74b69e4..e789cdeff76 100644 --- a/mysql-test/main/brackets.result +++ b/mysql-test/main/brackets.result @@ -219,4 +219,28 @@ select 1 union select 1 union select 1; ((select 1) union (select 1) union (select 1)); 1 1 +# +# MDEV-16357: union in brackets with tail +# union with tail in brackets +# +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES(1),(2),(3),(4); +CREATE TABLE t2 (a int); +INSERT INTO t2 VALUES (4),(5),(6),(7); +(SELECT a FROM t1 UNION SELECT a FROM t2) LIMIT 1; +a +1 +(SELECT a FROM t1 UNION SELECT a FROM t2) ORDER BY a DESC; +a +7 +6 +5 +4 +3 +2 +1 +(SELECT a FROM t1 UNION SELECT a FROM t2 LIMIT 1); +a +1 +DROP TABLE t1,t2; # End of 10.4 tests diff --git a/mysql-test/main/brackets.test b/mysql-test/main/brackets.test index 699c70a900f..0eaa3bfc0a2 100644 --- a/mysql-test/main/brackets.test +++ b/mysql-test/main/brackets.test @@ -88,5 +88,23 @@ select 1 union select 1 union select 1; (select 1 union select 1 union select 1); ((select 1) union (select 1) union (select 1)); +--echo # +--echo # MDEV-16357: union in brackets with tail +--echo # union with tail in brackets +--echo # + +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES(1),(2),(3),(4); + +CREATE TABLE t2 (a int); +INSERT INTO t2 VALUES (4),(5),(6),(7); + +(SELECT a FROM t1 UNION SELECT a FROM t2) LIMIT 1; +(SELECT a FROM t1 UNION SELECT a FROM t2) ORDER BY a DESC; + +(SELECT a FROM t1 UNION SELECT a FROM t2 LIMIT 1); + +DROP TABLE t1,t2; + --echo # End of 10.4 tests diff --git a/mysql-test/main/case.result b/mysql-test/main/case.result index 1fd1ad86a8e..926ac000eb0 100644 --- a/mysql-test/main/case.result +++ b/mysql-test/main/case.result @@ -546,5 +546,32 @@ Warnings: Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 'a' DROP TABLE t1; # +# MDEV-17411 Wrong WHERE optimization with simple CASE and searched CASE +# +CREATE TABLE t1 (a INT, b INT, KEY(a)); +INSERT INTO t1 VALUES (1,1),(2,2),(3,3); +SELECT * FROM t1 WHERE CASE a WHEN b THEN 1 END=1; +a b +1 1 +2 2 +3 3 +SELECT * FROM t1 WHERE CASE WHEN a THEN b ELSE 1 END=3; +a b +3 3 +SELECT * FROM t1 WHERE +CASE a WHEN b THEN 1 END=1 AND +CASE WHEN a THEN b ELSE 1 END=3; +a b +3 3 +EXPLAIN EXTENDED +SELECT * FROM t1 WHERE +CASE a WHEN b THEN 1 END=1 AND +CASE WHEN a THEN b ELSE 1 END=3; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where (case `test`.`t1`.`a` when `test`.`t1`.`b` then 1 end) = 1 and (case when `test`.`t1`.`a` then `test`.`t1`.`b` else 1 end) = 3 +DROP TABLE t1; +# # End of 10.3 test # diff --git a/mysql-test/main/case.test b/mysql-test/main/case.test index d7dac112b3b..78d5b3a5951 100644 --- a/mysql-test/main/case.test +++ b/mysql-test/main/case.test @@ -390,6 +390,28 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='a' AND CASE 'a' WHEN 'a' THEN 'a' ELS DROP TABLE t1; + +--echo # +--echo # MDEV-17411 Wrong WHERE optimization with simple CASE and searched CASE +--echo # + +CREATE TABLE t1 (a INT, b INT, KEY(a)); +INSERT INTO t1 VALUES (1,1),(2,2),(3,3); +SELECT * FROM t1 WHERE CASE a WHEN b THEN 1 END=1; +SELECT * FROM t1 WHERE CASE WHEN a THEN b ELSE 1 END=3; + +SELECT * FROM t1 WHERE + CASE a WHEN b THEN 1 END=1 AND + CASE WHEN a THEN b ELSE 1 END=3; + +EXPLAIN EXTENDED +SELECT * FROM t1 WHERE + CASE a WHEN b THEN 1 END=1 AND + CASE WHEN a THEN b ELSE 1 END=3; + +DROP TABLE t1; + + --echo # --echo # End of 10.3 test --echo # diff --git a/mysql-test/main/cast.result b/mysql-test/main/cast.result index ca314573581..f1e7eb7b502 100644 --- a/mysql-test/main/cast.result +++ b/mysql-test/main/cast.result @@ -313,7 +313,7 @@ select cast('' as time); cast('' as time) NULL Warnings: -Warning 1292 Truncated incorrect time value: '' +Warning 1292 Incorrect time value: '' select cast(NULL as DATE); cast(NULL as DATE) NULL diff --git a/mysql-test/main/connect.result b/mysql-test/main/connect.result index b05d0ea9fea..c52c9edd578 100644 --- a/mysql-test/main/connect.result +++ b/mysql-test/main/connect.result @@ -14,7 +14,6 @@ help_category help_keyword help_relation help_topic -host index_stats innodb_index_stats innodb_table_stats @@ -62,7 +61,6 @@ help_category help_keyword help_relation help_topic -host index_stats innodb_index_stats innodb_table_stats @@ -100,11 +98,10 @@ ERROR 28000: Access denied for user 'test'@'localhost' (using password: YES) connect(localhost,test,zorro,test,MASTER_PORT,MASTER_SOCKET); connect fail_con,localhost,test,zorro,; ERROR 28000: Access denied for user 'test'@'localhost' (using password: YES) -update mysql.user set password=old_password("gambling2") where user=_binary"test"; +update mysql.user set plugin="", authentication_string="", password=old_password("gambling2") where user=_binary"test"; flush privileges; connect con10,localhost,test,gambling2,; connect con5,localhost,test,gambling2,mysql; -connection con5; set password=""; set password='gambling3'; ERROR HY000: Password hash should be a 41-digit hexadecimal number @@ -122,7 +119,6 @@ help_category help_keyword help_relation help_topic -host index_stats innodb_index_stats innodb_table_stats @@ -164,7 +160,6 @@ ERROR 28000: Access denied for user 'test'@'localhost' (using password: YES) delete from mysql.user where user=_binary"test"; flush privileges; connect con7,localhost,root,,test; -connection con7; create table t1 (id integer not null auto_increment primary key); create temporary table t2(id integer not null auto_increment primary key); set @id := 1; @@ -305,12 +300,10 @@ SET GLOBAL event_scheduler = OFF; # -- End of Bug#35074. 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 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 @@ -341,7 +334,6 @@ connect(localhost,mysqltest_up1,foo,test,MASTER_PORT,MASTER_SOCKET); connect pcon1,localhost,mysqltest_up1,foo,,$MASTER_MYPORT,; ERROR 28000: Access denied for user 'mysqltest_up1'@'localhost' (using password: YES) connect pcon2,localhost,mysqltest_up1,bar,,$MASTER_MYPORT,; -connection pcon2; select user(), current_user(); user() current_user() mysqltest_up1@localhost mysqltest_up1@% @@ -350,7 +342,6 @@ connect(localhost,mysqltest_up2,newpw,test,MASTER_PORT,MASTER_SOCKET); connect pcon3,localhost,mysqltest_up2,newpw,,$MASTER_MYPORT,; ERROR 28000: Access denied for user 'mysqltest_up2'@'localhost' (using password: YES) connect pcon4,localhost,mysqltest_up2,oldpw,,$MASTER_MYPORT,; -connection pcon4; select user(), current_user(); user() current_user() mysqltest_up2@localhost mysqltest_up2@% @@ -367,17 +358,15 @@ update mysql.user set plugin='mysql_old_password' where user = 'mysqltest_up2'; select user, password, plugin, authentication_string from mysql.user where user like 'mysqltest_up_'; user password plugin authentication_string -mysqltest_up1 *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB mysql_native_password -mysqltest_up2 09301740536db389 mysql_old_password +mysqltest_up1 mysql_native_password *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB +mysqltest_up2 mysql_old_password 09301740536db389 flush privileges; connect pcon6,localhost,mysqltest_up1,bar,,$MASTER_MYPORT,; -connection pcon6; select user(), current_user(); user() current_user() mysqltest_up1@localhost mysqltest_up1@% disconnect pcon6; connect pcon7,localhost,mysqltest_up2,oldpw,,$MASTER_MYPORT,; -connection pcon7; select user(), current_user(); user() current_user() mysqltest_up2@localhost mysqltest_up2@% @@ -386,7 +375,7 @@ connection default; DROP USER mysqltest_up1@'%'; DROP USER mysqltest_up2@'%'; # -# BUG#1010351: New "via" keyword in 5.2+ can't be used as identifier anymore +# BUG#1010351: New "via" keyword in 5.2+ can't be used as identifier anymore # create table t1 (via int); alter table t1 add key(via); diff --git a/mysql-test/main/connect.test b/mysql-test/main/connect.test index c2d44c08e22..9bc067f3236 100644 --- a/mysql-test/main/connect.test +++ b/mysql-test/main/connect.test @@ -66,12 +66,11 @@ connect (fail_con,localhost,test,zorro,test2); connect (fail_con,localhost,test,zorro,); # check if old password version also works -update mysql.user set password=old_password("gambling2") where user=_binary"test"; +update mysql.user set plugin="", authentication_string="", password=old_password("gambling2") where user=_binary"test"; flush privileges; connect (con10,localhost,test,gambling2,); connect (con5,localhost,test,gambling2,mysql); -connection con5; set password=""; --error ER_PASSWD_LENGTH set password='gambling3'; @@ -108,7 +107,6 @@ flush privileges; # Bug#12517 Clear user variables and replication events before # closing temp tables in thread cleanup. connect (con7,localhost,root,,test); -connection con7; let $connection_id= `select connection_id()`; create table t1 (id integer not null auto_increment primary key); create temporary table t2(id integer not null auto_increment primary key); @@ -314,11 +312,9 @@ SET GLOBAL event_scheduler = OFF; # Test connections to the extra port. connect(extracon,127.0.0.1,root,,test,$MASTER_EXTRA_PORT,); -connection extracon; SELECT 'Connection on extra port ok'; connect(extracon2,127.0.0.1,root,,test,$MASTER_EXTRA_PORT,); -connection extracon2; SELECT 'Connection on extra port 2 ok'; --disable_abort_on_error @@ -349,7 +345,6 @@ GRANT ALL ON test.* TO 'O1234567890123456789012345678901234567890123456789012345 FLUSH PRIVILEGES; ---replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT connect (con1,localhost,O1234567890123456789012345678901234567890123456789012345678901234567890123456789x,test123,test); disconnect con1; @@ -380,18 +375,14 @@ CREATE USER mysqltest_up2 IDENTIFIED VIA mysql_old_password using '09301740536db --replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT --error ER_ACCESS_DENIED_ERROR connect(pcon1,localhost,mysqltest_up1,foo,,$MASTER_MYPORT,); ---replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT connect(pcon2,localhost,mysqltest_up1,bar,,$MASTER_MYPORT,); -connection pcon2; select user(), current_user(); disconnect pcon2; --replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT --error ER_ACCESS_DENIED_ERROR connect(pcon3,localhost,mysqltest_up2,newpw,,$MASTER_MYPORT,); ---replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT connect(pcon4,localhost,mysqltest_up2,oldpw,,$MASTER_MYPORT,); -connection pcon4; select user(), current_user(); disconnect pcon4; @@ -419,17 +410,13 @@ update mysql.user set plugin='mysql_native_password' where user = 'mysqltest_up1 update mysql.user set plugin='mysql_old_password' where user = 'mysqltest_up2'; select user, password, plugin, authentication_string from mysql.user where user like 'mysqltest_up_'; -flush privileges; +flush privileges; ---replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT connect(pcon6,localhost,mysqltest_up1,bar,,$MASTER_MYPORT,); -connection pcon6; select user(), current_user(); disconnect pcon6; ---replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT connect(pcon7,localhost,mysqltest_up2,oldpw,,$MASTER_MYPORT,); -connection pcon7; select user(), current_user(); disconnect pcon7; connection default; @@ -442,7 +429,7 @@ DROP USER mysqltest_up2@'%'; --echo # ---echo # BUG#1010351: New "via" keyword in 5.2+ can't be used as identifier anymore +--echo # BUG#1010351: New "via" keyword in 5.2+ can't be used as identifier anymore --echo # create table t1 (via int); alter table t1 add key(via); diff --git a/mysql-test/main/constraints.result b/mysql-test/main/constraints.result index 57cfbfb3d37..3c061989fd3 100644 --- a/mysql-test/main/constraints.result +++ b/mysql-test/main/constraints.result @@ -74,3 +74,40 @@ CREATE TABLE t_illegal (col_1 INT CHECK something (whatever)); 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 'something (whatever))' at line 1 CREATE TABLE t_illegal (col_1 INT CHECK something); 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 'something)' at line 1 +CREATE TABLE long_enough_name ( +pk int(11) NOT NULL, +f1 int(11) DEFAULT NULL, +f2 int(11) NOT NULL, +f3 int(11) DEFAULT NULL, +f4 timestamp NOT NULL DEFAULT current_timestamp(), +f5 varchar(32) COLLATE utf8_bin NOT NULL DEFAULT 'foo', +f6 smallint(6) NOT NULL DEFAULT 1, +f7 int(11) DEFAULT NULL, +PRIMARY KEY (pk), +KEY idx1 (f7), +KEY idx2 (f1), +KEY idx3 (f2), +KEY idx4 (f3), +CONSTRAINT constr CHECK (f6 >= 0) +); +SELECT * FROM long_enough_name AS tbl; +pk f1 f2 f3 f4 f5 f6 f7 +SHOW CREATE TABLE long_enough_name; +Table Create Table +long_enough_name CREATE TABLE `long_enough_name` ( + `pk` int(11) NOT NULL, + `f1` int(11) DEFAULT NULL, + `f2` int(11) NOT NULL, + `f3` int(11) DEFAULT NULL, + `f4` timestamp NOT NULL DEFAULT current_timestamp(), + `f5` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT 'foo', + `f6` smallint(6) NOT NULL DEFAULT 1, + `f7` int(11) DEFAULT NULL, + PRIMARY KEY (`pk`), + KEY `idx1` (`f7`), + KEY `idx2` (`f1`), + KEY `idx3` (`f2`), + KEY `idx4` (`f3`), + CONSTRAINT `constr` CHECK (`f6` >= 0) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE long_enough_name; diff --git a/mysql-test/main/constraints.test b/mysql-test/main/constraints.test index 1997c23bfa9..fe51e5060dc 100644 --- a/mysql-test/main/constraints.test +++ b/mysql-test/main/constraints.test @@ -77,3 +77,28 @@ CREATE TABLE t_illegal (col_1 INT CHECK something (whatever)); --error ER_PARSE_ERROR CREATE TABLE t_illegal (col_1 INT CHECK something); +# +# MDEV-17065 Crash on SHOW CREATE TABLE with CHECK CONSTRAINT +# + +CREATE TABLE long_enough_name ( +pk int(11) NOT NULL, +f1 int(11) DEFAULT NULL, +f2 int(11) NOT NULL, +f3 int(11) DEFAULT NULL, +f4 timestamp NOT NULL DEFAULT current_timestamp(), +f5 varchar(32) COLLATE utf8_bin NOT NULL DEFAULT 'foo', +f6 smallint(6) NOT NULL DEFAULT 1, +f7 int(11) DEFAULT NULL, +PRIMARY KEY (pk), +KEY idx1 (f7), +KEY idx2 (f1), +KEY idx3 (f2), +KEY idx4 (f3), +CONSTRAINT constr CHECK (f6 >= 0) +); + +SELECT * FROM long_enough_name AS tbl; +SHOW CREATE TABLE long_enough_name; + +DROP TABLE long_enough_name; diff --git a/mysql-test/main/contributors.result b/mysql-test/main/contributors.result index 36d033f4cb3..3e4bf5f0d43 100644 --- a/mysql-test/main/contributors.result +++ b/mysql-test/main/contributors.result @@ -8,12 +8,14 @@ MariaDB Corporation https://mariadb.com Founding member, Platinum Sponsor of the Visma https://visma.com Gold Sponsor of the MariaDB Foundation DBS https://dbs.com Gold Sponsor of the MariaDB Foundation IBM https://www.ibm.com Gold Sponsor of the MariaDB Foundation +Tencent Games http://game.qq.com/ Gold Sponsor of the MariaDB Foundation Nexedi https://www.nexedi.com Silver Sponsor of the MariaDB Foundation -Acronis http://www.acronis.com Silver Sponsor of the MariaDB Foundation +Acronis https://www.acronis.com Silver Sponsor of the MariaDB Foundation Verkkokauppa.com https://www.verkkokauppa.com Bronze Sponsor of the MariaDB Foundation Virtuozzo https://virtuozzo.com Bronze Sponsor of the MariaDB Foundation Tencent Game DBA http://tencentdba.com/about Bronze Sponsor of the MariaDB Foundation Tencent TDSQL http://tdsql.org Bronze Sponsor of the MariaDB Foundation +Percona https://www.percona.com/ Bronze Sponsor of the MariaDB Foundation Google USA Sponsoring encryption, parallel replication and GTID Facebook USA Sponsoring non-blocking API, LIMIT ROWS EXAMINED etc Ronald Bradford Brisbane, Australia EFF contribution for UC2006 Auction diff --git a/mysql-test/main/create_drop_user.result b/mysql-test/main/create_drop_user.result index dd75d1c257a..67717f3e4e0 100644 --- a/mysql-test/main/create_drop_user.result +++ b/mysql-test/main/create_drop_user.result @@ -1,22 +1,22 @@ CREATE USER IF NOT EXISTS u1@localhost IDENTIFIED BY 'pw1'; -SELECT password FROM mysql.user WHERE user='u1'; -password -*2B602296A79E0A8784ACC5C88D92E46588CCA3C3 +SELECT plugin,authentication_string FROM mysql.user WHERE user='u1'; +plugin authentication_string +mysql_native_password *2B602296A79E0A8784ACC5C88D92E46588CCA3C3 CREATE USER IF NOT EXISTS u1@localhost IDENTIFIED BY 'pw2'; Warnings: Note 1973 Can't create user 'u1'@'localhost'; it already exists -SELECT password FROM mysql.user WHERE user='u1'; -password -*2B602296A79E0A8784ACC5C88D92E46588CCA3C3 +SELECT plugin,authentication_string FROM mysql.user WHERE user='u1'; +plugin authentication_string +mysql_native_password *2B602296A79E0A8784ACC5C88D92E46588CCA3C3 CREATE OR REPLACE USER u1@localhost IDENTIFIED BY 'pw3'; -SELECT password FROM mysql.user WHERE user='u1'; -password -*77B4A70CEFD76DB9415F36D291E74C110D2738E0 +SELECT plugin,authentication_string FROM mysql.user WHERE user='u1'; +plugin authentication_string +mysql_native_password *77B4A70CEFD76DB9415F36D291E74C110D2738E0 CREATE OR REPLACE USER IF NOT EXISTS u1@localhost IDENTIFIED BY 'pw4'; ERROR HY000: Incorrect usage of OR REPLACE and IF NOT EXISTS -SELECT password FROM mysql.user WHERE user='u1'; -password -*77B4A70CEFD76DB9415F36D291E74C110D2738E0 +SELECT plugin,authentication_string FROM mysql.user WHERE user='u1'; +plugin authentication_string +mysql_native_password *77B4A70CEFD76DB9415F36D291E74C110D2738E0 DROP USER IF EXISTS u1@localhost; DROP USER IF EXISTS u1@localhost; Warnings: diff --git a/mysql-test/main/create_drop_user.test b/mysql-test/main/create_drop_user.test index 949782a2daf..234383fb4ca 100644 --- a/mysql-test/main/create_drop_user.test +++ b/mysql-test/main/create_drop_user.test @@ -1,17 +1,17 @@ --source include/not_embedded.inc CREATE USER IF NOT EXISTS u1@localhost IDENTIFIED BY 'pw1'; -SELECT password FROM mysql.user WHERE user='u1'; +SELECT plugin,authentication_string FROM mysql.user WHERE user='u1'; CREATE USER IF NOT EXISTS u1@localhost IDENTIFIED BY 'pw2'; -SELECT password FROM mysql.user WHERE user='u1'; +SELECT plugin,authentication_string FROM mysql.user WHERE user='u1'; CREATE OR REPLACE USER u1@localhost IDENTIFIED BY 'pw3'; -SELECT password FROM mysql.user WHERE user='u1'; +SELECT plugin,authentication_string FROM mysql.user WHERE user='u1'; --error ER_WRONG_USAGE CREATE OR REPLACE USER IF NOT EXISTS u1@localhost IDENTIFIED BY 'pw4'; -SELECT password FROM mysql.user WHERE user='u1'; +SELECT plugin,authentication_string FROM mysql.user WHERE user='u1'; DROP USER IF EXISTS u1@localhost; DROP USER IF EXISTS u1@localhost; diff --git a/mysql-test/main/create_or_replace.result b/mysql-test/main/create_or_replace.result index 0c1bccb861a..54bec5c3f9d 100644 --- a/mysql-test/main/create_or_replace.result +++ b/mysql-test/main/create_or_replace.result @@ -479,6 +479,21 @@ UNLOCK TABLES; DROP FUNCTION f1; DROP TABLE t1; # +# MDEV-14410 - Assertion `table->pos_in_locked_tables == __null || +# table->pos_in_locked_tables->table == table' failed in +# mark_used_tables_as_free_for_reuse +# +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (b INT); +CREATE TABLE t3 (c INT); +CREATE TRIGGER tr1 BEFORE INSERT ON t3 FOR EACH ROW INSERT INTO t1 VALUES (); +CREATE TRIGGER tr2 BEFORE INSERT ON t2 FOR EACH ROW INSERT INTO t3 SELECT * FROM t1; +LOCK TABLE t1 WRITE, t2 WRITE; +CREATE OR REPLACE TABLE t1 (i INT); +UNLOCK TABLES; +INSERT INTO t2 VALUES (1); +DROP TABLE t1, t2, t3; +# # MDEV-11071 - Assertion `thd->transaction.stmt.is_empty()' failed in # Locked_tables_list::unlock_locked_tables # @@ -488,12 +503,12 @@ CREATE TABLE t3(a INT); LOCK TABLE t2 WRITE; SELECT * FROM t2; a -CREATE OR REPLACE TEMPORARY TABLE t1(a INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; -ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +CREATE OR REPLACE TEMPORARY TABLE t1(c INT DEFAULT ''); +ERROR 42000: Invalid default value for 'c' SELECT * FROM t3; ERROR HY000: Table 't3' was not locked with LOCK TABLES -CREATE OR REPLACE TEMPORARY TABLE t2(a INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; -ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. +CREATE OR REPLACE TEMPORARY TABLE t2(c INT DEFAULT ''); +ERROR 42000: Invalid default value for 'c' SELECT * FROM t3; ERROR HY000: Table 't3' was not locked with LOCK TABLES UNLOCK TABLES; diff --git a/mysql-test/main/create_or_replace.test b/mysql-test/main/create_or_replace.test index 3ae882139bc..4b167663742 100644 --- a/mysql-test/main/create_or_replace.test +++ b/mysql-test/main/create_or_replace.test @@ -422,6 +422,27 @@ UNLOCK TABLES; DROP FUNCTION f1; DROP TABLE t1; + +--echo # +--echo # MDEV-14410 - Assertion `table->pos_in_locked_tables == __null || +--echo # table->pos_in_locked_tables->table == table' failed in +--echo # mark_used_tables_as_free_for_reuse +--echo # +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (b INT); +CREATE TABLE t3 (c INT); + +CREATE TRIGGER tr1 BEFORE INSERT ON t3 FOR EACH ROW INSERT INTO t1 VALUES (); +CREATE TRIGGER tr2 BEFORE INSERT ON t2 FOR EACH ROW INSERT INTO t3 SELECT * FROM t1; + +LOCK TABLE t1 WRITE, t2 WRITE; +CREATE OR REPLACE TABLE t1 (i INT); +UNLOCK TABLES; +INSERT INTO t2 VALUES (1); + +# Cleanup +DROP TABLE t1, t2, t3; + --echo # --echo # MDEV-11071 - Assertion `thd->transaction.stmt.is_empty()' failed in --echo # Locked_tables_list::unlock_locked_tables @@ -432,14 +453,14 @@ CREATE TABLE t3(a INT); LOCK TABLE t2 WRITE; SELECT * FROM t2; # drops t2 ---error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE -CREATE OR REPLACE TEMPORARY TABLE t1(a INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; +--error ER_INVALID_DEFAULT +CREATE OR REPLACE TEMPORARY TABLE t1(c INT DEFAULT ''); # make sure we didn't leave locked tables mode --error ER_TABLE_NOT_LOCKED SELECT * FROM t3; # drops t1 ---error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE -CREATE OR REPLACE TEMPORARY TABLE t2(a INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; +--error ER_INVALID_DEFAULT +CREATE OR REPLACE TEMPORARY TABLE t2(c INT DEFAULT ''); # make sure we didn't leave locked tables mode --error ER_TABLE_NOT_LOCKED SELECT * FROM t3; diff --git a/mysql-test/main/create_user.result b/mysql-test/main/create_user.result index 8001b43221b..bd10c6aba3b 100644 --- a/mysql-test/main/create_user.result +++ b/mysql-test/main/create_user.result @@ -1,57 +1,57 @@ create user foo; select * from mysql.user where user = 'foo'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 N N 0.000000 +% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 mysql_native_password N N 0.000000 drop user foo; create user foo identified by 'password'; select * from mysql.user where user = 'foo'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 N N 0.000000 +% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000 drop user foo; create user foo identified by 'password' require SSL; select * from mysql.user where user = 'foo'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N ANY 0 0 0 0 N N 0.000000 +% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N ANY 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000 drop user foo; create user foo identified by 'password' require X509; select * from mysql.user where user = 'foo'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N X509 0 0 0 0 N N 0.000000 +% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N X509 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000 drop user foo; create user foo identified by 'password' require CIPHER 'cipher'; select * from mysql.user where user = 'foo'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher 0 0 0 0 N N 0.000000 +% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000 drop user foo; create user foo identified by 'password' require ISSUER 'issuer'; select * from mysql.user where user = 'foo'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED issuer 0 0 0 0 N N 0.000000 +% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED issuer 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000 drop user foo; create user foo identified by 'password' require SUBJECT 'subject'; select * from mysql.user where user = 'foo'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED subject 0 0 0 0 N N 0.000000 +% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED subject 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000 drop user foo; create user foo identified by 'password' require CIPHER 'cipher' SUBJECT 'subject'; select * from mysql.user where user = 'foo'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher subject 0 0 0 0 N N 0.000000 +% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher subject 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000 drop user foo; create user foo identified by 'password' require CIPHER 'cipher' AND SUBJECT 'subject' AND ISSUER 'issuer'; select * from mysql.user where user = 'foo'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -% foo *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher issuer subject 0 0 0 0 N N 0.000000 +% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher issuer subject 0 0 0 0 mysql_native_password *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 N N 0.000000 drop user foo; create user foo, foo2 identified by 'password' require CIPHER 'cipher' AND SUBJECT 'subject' AND ISSUER 'issuer'; select * from mysql.user where user like 'foo'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher issuer subject 0 0 0 0 N N 0.000000 +% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher issuer subject 0 0 0 0 mysql_native_password N N 0.000000 #--warning ER_USER_CREATE_EXISTS create user if not exists foo, foo2 identified by 'password2' require CIPHER 'cipher2' AND SUBJECT 'subject2' AND ISSUER 'issuer2'; @@ -60,7 +60,7 @@ Note 1973 Can't create user 'foo'@'%'; it already exists Note 1973 Can't create user 'foo2'@'%'; it already exists select * from mysql.user where user like 'foo'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher issuer subject 0 0 0 0 N N 0.000000 +% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N SPECIFIED cipher issuer subject 0 0 0 0 mysql_native_password N N 0.000000 drop user foo, foo2; create user foo with MAX_QUERIES_PER_HOUR 10 MAX_UPDATES_PER_HOUR 20 @@ -68,5 +68,5 @@ MAX_CONNECTIONS_PER_HOUR 30 MAX_USER_CONNECTIONS 40; select * from mysql.user where user like 'foo'; 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 Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv Create_tablespace_priv Delete_history_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections plugin authentication_string password_expired is_role default_role max_statement_time -% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 10 20 30 40 N N 0.000000 +% foo N N N N N N N N N N N N N N N N N N N N N N N N N N N N N N 10 20 30 40 mysql_native_password N N 0.000000 drop user foo; diff --git a/mysql-test/main/cte_nonrecursive.result b/mysql-test/main/cte_nonrecursive.result index 96e9f527253..eeae6d02476 100644 --- a/mysql-test/main/cte_nonrecursive.result +++ b/mysql-test/main/cte_nonrecursive.result @@ -1512,3 +1512,150 @@ a a 1 1 drop database db_mdev_16473; use test; +# +# MDEV-17154: using parameter markers for PS within CTEs more than once +# using local variables in SP within CTEs more than once +# +prepare stmt from " +with cte(c) as (select ? ) select r.c, s.c+10 from cte as r, cte as s; +"; +set @a=2; +execute stmt using @a; +c s.c+10 +2 12 +set @a=5; +execute stmt using @a; +c s.c+10 +5 15 +deallocate prepare stmt; +prepare stmt from " +with cte(c) as (select ? ) select c from cte union select c+10 from cte; +"; +set @a=2; +execute stmt using @a; +c +2 +12 +set @a=5; +execute stmt using @a; +c +5 +15 +deallocate prepare stmt; +prepare stmt from " +with cte_e(a,b) as +( + with cte_o(c) as (select ?) + select r.c+10, s.c+20 from cte_o as r, cte_o as s +) +select * from cte_e as cte_e1 where a > 12 +union all +select * from cte_e as cte_e2; +"; +set @a=2; +execute stmt using @a; +a b +12 22 +set @a=5; +execute stmt using @a; +a b +15 25 +15 25 +deallocate prepare stmt; +create table t1 (a int, b int); +insert into t1 values +(3,33), (1,17), (7,72), (4,45), (2,27), (3,35), (4,47), (3,38), (2,22); +prepare stmt from " +with cte as (select * from t1 where a < ? and b > ?) + select r.a, r.b+10, s.a, s.b+20 from cte as r, cte as s where r.a=s.a+1; +"; +set @a=4, @b=20; +execute stmt using @a,@b; +a r.b+10 a s.b+20 +3 43 2 47 +3 45 2 47 +3 48 2 47 +3 43 2 42 +3 45 2 42 +3 48 2 42 +set @a=5, @b=20; +execute stmt using @a,@b; +a r.b+10 a s.b+20 +4 55 3 53 +4 57 3 53 +3 43 2 47 +3 45 2 47 +3 48 2 47 +4 55 3 55 +4 57 3 55 +4 55 3 58 +4 57 3 58 +3 43 2 42 +3 45 2 42 +3 48 2 42 +deallocate prepare stmt; +create procedure p1() +begin +declare i int; +set i = 0; +while i < 4 do +insert into t1 +with cte(a) as (select i) select r.a-1, s.a+1 from cte as r, cte as s; +set i = i+1; +end while; +end| +create procedure p2(in i int) +begin +insert into t1 +with cte(a) as (select i) select r.a-1, s.a+1 from cte as r, cte as s; +end| +delete from t1; +call p1(); +select * from t1; +a b +-1 1 +0 2 +1 3 +2 4 +call p1(); +select * from t1; +a b +-1 1 +0 2 +1 3 +2 4 +-1 1 +0 2 +1 3 +2 4 +delete from t1; +call p2(3); +select * from t1; +a b +2 4 +call p2(7); +select * from t1; +a b +2 4 +6 8 +drop procedure p1; +drop procedure p2; +drop table t1; +# +# MDEV-17107: PS for CREATE OR REPLACE VIEW defined by SELECT with CTEs +# +create table t1(a int); +insert into t1 values (3), (1), (2); +create table t2 (b int); +insert into t2 values (2), (10); +prepare stmt from +"create or replace view v1 as + with t as (select s.a from (select t1.a from t1) s), + r as(select t.a from t2, t where t2.b=t.a) + select a from r;"; +execute stmt; +select * from v1; +a +2 +drop view v1; +drop table t1,t2; diff --git a/mysql-test/main/cte_nonrecursive.test b/mysql-test/main/cte_nonrecursive.test index 11c864bcac1..920c27a70f9 100644 --- a/mysql-test/main/cte_nonrecursive.test +++ b/mysql-test/main/cte_nonrecursive.test @@ -1057,3 +1057,114 @@ select * from cte, db_mdev_16473.t1 as t where cte.a=t.a; drop database db_mdev_16473; use test; + +--echo # +--echo # MDEV-17154: using parameter markers for PS within CTEs more than once +--echo # using local variables in SP within CTEs more than once +--echo # + +prepare stmt from " +with cte(c) as (select ? ) select r.c, s.c+10 from cte as r, cte as s; +"; +set @a=2; +execute stmt using @a; +set @a=5; +execute stmt using @a; +deallocate prepare stmt; + +prepare stmt from " +with cte(c) as (select ? ) select c from cte union select c+10 from cte; +"; +set @a=2; +execute stmt using @a; +set @a=5; +execute stmt using @a; +deallocate prepare stmt; + +prepare stmt from " +with cte_e(a,b) as +( + with cte_o(c) as (select ?) + select r.c+10, s.c+20 from cte_o as r, cte_o as s +) +select * from cte_e as cte_e1 where a > 12 +union all +select * from cte_e as cte_e2; +"; +set @a=2; +execute stmt using @a; +set @a=5; +execute stmt using @a; +deallocate prepare stmt; + +create table t1 (a int, b int); +insert into t1 values + (3,33), (1,17), (7,72), (4,45), (2,27), (3,35), (4,47), (3,38), (2,22); + +prepare stmt from " +with cte as (select * from t1 where a < ? and b > ?) + select r.a, r.b+10, s.a, s.b+20 from cte as r, cte as s where r.a=s.a+1; +"; +set @a=4, @b=20; +execute stmt using @a,@b; +set @a=5, @b=20; +execute stmt using @a,@b; +deallocate prepare stmt; + +delimiter |; + +create procedure p1() +begin + declare i int; + set i = 0; + while i < 4 do + insert into t1 + with cte(a) as (select i) select r.a-1, s.a+1 from cte as r, cte as s; + set i = i+1; + end while; +end| + +create procedure p2(in i int) +begin + insert into t1 + with cte(a) as (select i) select r.a-1, s.a+1 from cte as r, cte as s; +end| + +delimiter ;| + +delete from t1; +call p1(); +select * from t1; +call p1(); +select * from t1; + +delete from t1; +call p2(3); +select * from t1; +call p2(7); +select * from t1; + +drop procedure p1; +drop procedure p2; +drop table t1; + +--echo # +--echo # MDEV-17107: PS for CREATE OR REPLACE VIEW defined by SELECT with CTEs +--echo # + +create table t1(a int); +insert into t1 values (3), (1), (2); +create table t2 (b int); +insert into t2 values (2), (10); + +prepare stmt from +"create or replace view v1 as + with t as (select s.a from (select t1.a from t1) s), + r as(select t.a from t2, t where t2.b=t.a) + select a from r;"; + +execute stmt; +select * from v1; + +drop view v1; +drop table t1,t2; diff --git a/mysql-test/main/cte_recursive.result b/mysql-test/main/cte_recursive.result index 4becc038543..9e934b19efc 100644 --- a/mysql-test/main/cte_recursive.result +++ b/mysql-test/main/cte_recursive.result @@ -3306,7 +3306,307 @@ SELECT func(); func() 1 DROP FUNCTION func; -# Start of 10.3 tests +# +# MDEV-17024: two materialized CTEs using the same recursive CTE +# +create table t1 (id int); +insert into t1 values (1), (2), (3); +with recursive +rcte(a) as +(select 1 union select cast(a+1 as unsigned) from rcte where a < 10), +cte1 as +(select count(*) as c1 from rcte,t1 where a between 3 and 5 and id=a-3), +cte2 as +(select count(*) as c2 from rcte,t1 where a between 7 and 8 and id=a-7) +select * from cte1, cte2; +c1 c2 +2 1 +explain extended with recursive +rcte(a) as +(select 1 union select cast(a+1 as unsigned) from rcte where a < 10), +cte1 as +(select count(*) as c1 from rcte,t1 where a between 3 and 5 and id=a-3), +cte2 as +(select count(*) as c2 from rcte,t1 where a between 7 and 8 and id=a-7) +select * from cte1, cte2; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <derived4> ALL NULL NULL NULL NULL 6 100.00 +1 PRIMARY <derived5> ALL NULL NULL NULL NULL 6 100.00 Using join buffer (flat, BNL join) +4 DERIVED <derived2> ALL NULL NULL NULL NULL 2 100.00 Using where +4 DERIVED t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join) +5 DERIVED <derived2> ALL NULL NULL NULL NULL 2 100.00 Using where +5 DERIVED t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join) +2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used +3 RECURSIVE UNION <derived2> ALL NULL NULL NULL NULL 2 100.00 Using where +NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL +Warnings: +Note 1003 with recursive rcte as (/* select#2 */ select 1 AS `a` union /* select#3 */ select cast(`rcte`.`a` + 1 as unsigned) AS `cast(a+1 as unsigned)` from `rcte` where `rcte`.`a` < 10), cte1 as (/* select#4 */ select count(0) AS `c1` from `rcte` join `test`.`t1` where `rcte`.`a` between 3 and 5 and `test`.`t1`.`id` = `rcte`.`a` - 3), cte2 as (/* select#5 */ select count(0) AS `c2` from `rcte` join `test`.`t1` where `rcte`.`a` between 7 and 8 and `test`.`t1`.`id` = `rcte`.`a` - 7)/* select#1 */ select `cte1`.`c1` AS `c1`,`cte2`.`c2` AS `c2` from `cte1` join `cte2` +prepare stmt from "with recursive +rcte(a) as +(select 1 union select cast(a+1 as unsigned) from rcte where a < 10), +cte1 as +(select count(*) as c1 from rcte,t1 where a between 3 and 5 and id=a-3), +cte2 as +(select count(*) as c2 from rcte,t1 where a between 7 and 8 and id=a-7) +select * from cte1, cte2"; +execute stmt; +c1 c2 +2 1 +execute stmt; +c1 c2 +2 1 +create table t2 (c1 int, c2 int); +create procedure p() insert into t2 with recursive +rcte(a) as +(select 1 union select cast(a+1 as unsigned) from rcte where a < 10), +cte1 as +(select count(*) as c1 from rcte,t1 where a between 3 and 5 and id=a-3), +cte2 as +(select count(*) as c2 from rcte,t1 where a between 7 and 8 and id=a-7) +select * from cte1, cte2; +call p(); +select * from t2; +c1 c2 +2 1 +with recursive +rcte(a) as +(select 1 union select cast(a+1 as unsigned) from rcte where a < 10), +cte1 as +(select count(*) as c1 from rcte,t1 where a between 3 and 5 and id=a-3), +cte2 as +(select count(*) as c2 from rcte,t1 where a between 7 and 8 and id=a-7) +select * from cte1; +c1 +2 +with recursive +rcte(a) as +(select 1 union select cast(a+1 as unsigned) from rcte where a < 10), +cte1 as +(select count(*) as c1 from t1), +cte2 as +(select count(*) as c2 from t2) +select * from cte1,cte2; +c1 c2 +3 1 +with recursive +rcte(a) as +(select 1 union select cast(a+1 as unsigned) from rcte where a < 10), +cte1 as +(select count(*) as c1 from rcte,t1 where a between 3 and 5 and id=a-3), +cte2 as +(select count(*) as c2 from rcte,t1 where a between 7 and 8 and id=a-7) +select * from cte1, cte2 where cte1.c1 = 3; +c1 c2 +drop procedure p; +drop table t1,t2; +# +# MDEV-17201: recursive part with LIMIT +# +CREATE TABLE purchases ( +id int unsigned NOT NULL AUTO_INCREMENT, +pdate date NOT NULL, +quantity int unsigned NOT NULL, +p_id int unsigned NOT NULL, +PRIMARY KEY (id) +); +INSERT INTO purchases(pdate, quantity, p_id) VALUES +('2014-11-01',5 ,1),('2014-11-03', 3 ,1), +('2014-11-01',2 ,2),('2014-11-03', 4 ,2); +CREATE TABLE expired ( +edate date NOT NULL, +quantity int unsigned NOT NULL, +p_id int unsigned NOT NULL, +PRIMARY KEY (edate,p_id) +); +INSERT INTO expired VALUES ('2014-11-12', 5 ,1),('2014-11-08', 1 ,2); +WITH RECURSIVE expired_map AS ( +SELECT edate AS expired_date, +CAST(NULL AS date) AS purchase_date, +0 AS quantity, +e.p_id, +(SELECT MAX(id)+1 FROM purchases p +WHERE pdate <= edate AND p.p_id =p_id) AS purchase_processed, +quantity AS unresolved +FROM expired e +UNION +( SELECT expired_date, +pdate, +IF(p.quantity < m.unresolved, p.quantity, m.unresolved), +p.p_id, +p.id, +IF(p.quantity < m.unresolved, m.unresolved - p.quantity, 0) +FROM purchases p JOIN expired_map m ON p.p_id = m.p_id +WHERE p.id < m.purchase_processed AND m.unresolved > 0 +ORDER BY p.id DESC +LIMIT 1 +) +) +SELECT * FROM expired_map; +expired_date purchase_date quantity p_id purchase_processed unresolved +2014-11-12 NULL 0 1 5 5 +2014-11-08 NULL 0 2 5 1 +2014-11-08 2014-11-03 1 2 4 0 +DROP TABLE purchases, expired; +# +# MDEV-17635: Two recursive CTEs, the second using the first +# +WITH RECURSIVE +x AS (SELECT 0 as k UNION ALL SELECT k + 1 FROM x WHERE k < 1), +z AS +( SELECT k1 AS cx, k2 AS cy, k1, k2 +FROM (SELECT k AS k1 FROM x) x1 JOIN (SELECT k AS k2 FROM x) y1 +UNION +SELECT 1,1,1,1 FROM z) +SELECT * FROM z; +cx cy k1 k2 +0 0 0 0 +1 0 1 0 +0 1 0 1 +1 1 1 1 +# https://wiki.postgresql.org/wiki/Mandelbrot_set: +WITH RECURSIVE x(i) AS ( +SELECT CAST(0 AS DECIMAL(13, 10)) +UNION ALL +SELECT i + 1 +FROM x +WHERE i < 101 +), +Z(Ix, Iy, Cx, Cy, X, Y, I) AS ( +SELECT Ix, Iy, X, Y, X, Y, 0 +FROM (SELECT CAST(-2.2 + 0.031 * i AS DECIMAL(13, 10)) AS X, +i AS Ix FROM x) AS xgen +CROSS JOIN ( +SELECT CAST(-1.5 + 0.031 * i AS DECIMAL(13, 10)) AS Y, +i AS iY FROM x +) AS ygen +UNION ALL +SELECT Ix, Iy, Cx, Cy, +CAST(X * X - Y * Y + Cx AS DECIMAL(13, 10)) AS X, +CAST(Y * X * 2 + Cy AS DECIMAL(13, 10)), I + 1 +FROM Z +WHERE X * X + Y * Y < 16.0 +AND I < 27 +), +Zt (Ix, Iy, I) AS ( +SELECT Ix, Iy, MAX(I) AS I +FROM Z +GROUP BY Iy, Ix +ORDER BY Iy, Ix +) +SELECT GROUP_CONCAT( +SUBSTRING( +' .,,,-----++++%%%%@@@@#### ', +GREATEST(I, 1), +1 +) ORDER BY Ix SEPARATOR '' + ) AS 'Mandelbrot Set' + FROM Zt +GROUP BY Iy +ORDER BY Iy; +Mandelbrot Set + .................................................................................... + ....................................................................................... + ......................................................................................... + ........................................................................................... + ....................................................,,,,,,,,,................................. + ................................................,,,,,,,,,,,,,,,,,,............................. + ..............................................,,,,,,,,,,,,,,,,,,,,,,,,.......................... + ............................................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,........................ + ..........................................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,...................... + .........................................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.................... + ........................................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,................... + .......................................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,................. + .......................................,,,,,,,,,,,,,,,,,,,,,,,,--,,,,,,,,,,,,,,,,,,,,................ +......................................,,,,,,,,,,,,,,,,,,,,,,,,,,-+--,,,,,,,,,,,,,,,,,,,............... +....................................,,,,,,,,,,,,,,,,,,,,,,,,,,,,-----,,,,,,,,,,,,,,,,,,,.............. +...................................,,,,,,,,,,,,,,,,,,,,,,,,,,,,--- -----,,,,,,,,,,,,,,,,,............. +.................................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,---++--++,,,,,,,,,,,,,,,,,,............ +................................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-----%++---,,,,,,,,,,,,,,,,,............ +..............................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-----+%----,,,,,,,,,,,,,,,,,,........... +.............................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,----- %%+----,,,,,,,,,,,,,,,,,,.......... +...........................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,---%-+% ----,,,,,,,,,,,,,,,,,,,......... +..........................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,---+ +## %+%---,,,,,,,,,,,,,,,,,,......... +........................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-----# # +---,,,,,,,,,,,,,,,,,,........ +.......................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-------% %-----,,,,,,,,,,,,,,,,,........ +.....................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,---------+ ------,,,,,,,,,,,,,,,,,....... +....................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-----------+@ +-----------,,,,,,,,,,,,....... +..................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,----@-------++ ++-----------,,,,,,,,,,,,...... +.................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,--+@% ---+ +@%%@ %%+@+@%------+-,,,,,,,,,,,...... +................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,---- # ++% % @-----++--,,,,,,,,,,,..... +..............,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,----+ % %%++ %+%@-,,,,,,,,,,,..... +.............,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-----+# #% ++-,,,,,,,,,,,,.... +............,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,------+ @---,,,,,,,,,,,,.... +..........,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-------++% ---,,,,,,,,,,,,.... +.........,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,--------+ + %+---,,,,,,,,,,,,,... +........,,,,,,,,,,,,,,,,,,,,,--------------------@ +----,,,,,,,,,,,,... +.......,,,,,,,,,,,,,,,,,,,,,,- +-----------------+ ----,,,,,,,,,,,,... +.......,,,,,,,,,,,,,,,,,,,,,--++------+---------+% +++--,,,,,,,,,,,,.. +......,,,,,,,,,,,,,,,,,,,,,,--%+-----++--------- #+-,,,,,,,,,,,,.. +.....,,,,,,,,,,,,,,,,,,,,,,----#%++--+@ -+-----+% --,,,,,,,,,,,,.. +.....,,,,,,,,,,,,,,,,,,,,,,-----+## ++@ + +----% +--,,,,,,,,,,,,,.. +....,,,,,,,,,,,,,,,,,,,,,,------+@ @ @@++++# +--,,,,,,,,,,,,,.. +....,,,,,,,,,,,,,,,,,,,,,-------% #++% -,,,,,,,,,,,,,.. +...,,,,,,,,,,,,,,,,,,,,,------++%# %%@ %-,,,,,,,,,,,,,,. +...,,,,,,,,,,,,,,,,,,,--------+ % +--,,,,,,,,,,,,,,. +...,,,,,,,,,,,,,,,,,,-----+--++@ # --,,,,,,,,,,,,,,. +..,,,,,,,,,,,,,,,,,-------%+++% @--,,,,,,,,,,,,,,,. +..,,,,,,,,,,,-------------+ @#@ ---,,,,,,,,,,,,,,,. +..,,,,,,,,,---@--------@-+% +---,,,,,,,,,,,,,,,. +..,,,,,------- +-++++-+%%% +----,,,,,,,,,,,,,,,. +..,,,,,,------%--------++% +----,,,,,,,,,,,,,,,. +..,,,,,,,,,,--+----------++# ---,,,,,,,,,,,,,,,. +..,,,,,,,,,,,,------------+@@@% +--,,,,,,,,,,,,,,,. +..,,,,,,,,,,,,,,,,,------- +++% %--,,,,,,,,,,,,,,,. +...,,,,,,,,,,,,,,,,,,---------+@ @ --,,,,,,,,,,,,,,. +...,,,,,,,,,,,,,,,,,,,,------- # %@ +--,,,,,,,,,,,,,,. +...,,,,,,,,,,,,,,,,,,,,,-------++@ %+ %-,,,,,,,,,,,,,,. +....,,,,,,,,,,,,,,,,,,,,,------- %++% %-,,,,,,,,,,,,,.. +....,,,,,,,,,,,,,,,,,,,,,,------+# %# #@ ++++ +--,,,,,,,,,,,,,.. +.....,,,,,,,,,,,,,,,,,,,,,,-----+ %%++% +@+----+ +--,,,,,,,,,,,,,.. +.....,,,,,,,,,,,,,,,,,,,,,,,---%+++--+#+--------% #--,,,,,,,,,,,,.. +......,,,,,,,,,,,,,,,,,,,,,,--++-----%%--------- @#--,,,,,,,,,,,,.. +.......,,,,,,,,,,,,,,,,,,,,,---------------------+@ +-++,,,,,,,,,,,,... +........,,,,,,,,,,,,,,,,,,,,,--------------------+ ----,,,,,,,,,,,,... +.........,,,,,,,,,,,,,,,,,,,,----,,,------------- #+----,,,,,,,,,,,,... +..........,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-------+ + +---,,,,,,,,,,,,,... +...........,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,--------+%# #---,,,,,,,,,,,,.... +............,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,------+# @ @---,,,,,,,,,,,,.... +.............,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-----+# + @--,,,,,,,,,,,,.... +..............,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,---+% %+@ %+-+ +++%-,,,,,,,,,,,..... +................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,----% %@++ # % -----++-,,,,,,,,,,,,..... +.................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-- ++ ---+ + +%@ %++++++------%-,,,,,,,,,,,...... +...................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,---- -------++ +------------,,,,,,,,,,,,...... +....................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-----------+% +--------,,,,,,,,,,,,,,,....... +......................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,--------+# -----,,,,,,,,,,,,,,,,,,....... +.......................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-------+ #----,,,,,,,,,,,,,,,,,,........ +.........................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,----+% %#---,,,,,,,,,,,,,,,,,,,........ +..........................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,---+%+%@ %+%%--,,,,,,,,,,,,,,,,,,......... +............................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,---+-+% %----,,,,,,,,,,,,,,,,,,.......... +.............................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-----+%@+---,,,,,,,,,,,,,,,,,,,.......... +...............................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-----+%----,,,,,,,,,,,,,,,,,,........... +................................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-----%+ +--,,,,,,,,,,,,,,,,,............ +..................................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,---++----,,,,,,,,,,,,,,,,,............. +...................................,,,,,,,,,,,,,,,,,,,,,,,,,,,,---@-----,,,,,,,,,,,,,,,,,............. +.....................................,,,,,,,,,,,,,,,,,,,,,,,,,,,-----,,,,,,,,,,,,,,,,,,,.............. + .....................................,,,,,,,,,,,,,,,,,,,,,,,,,,--%,,,,,,,,,,,,,,,,,,,,............... + .......................................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,................. + ........................................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.................. + ........................................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,................... + .........................................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.................... + ..........................................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,...................... + ............................................,,,,,,,,,,,,,,,,,,,,,,,,,,,,........................ + .............................................,,,,,,,,,,,,,,,,,,,,,,,,.......................... + ................................................,,,,,,,,,,,,,,,,,............................. + .....................................................,,,,.................................... + ........................................................................................... + ......................................................................................... + ...................................................................................... + .................................................................................... + ................................................................................. + .............................................................................. + ........................................................................... + ........................................................................ +# End of 10.2 tests # # MDEV-14217 [db crash] Recursive CTE when SELECT includes new field # @@ -3595,3 +3895,4 @@ a 0 NULL DROP TABLE t1; +# End of 10.3 tests diff --git a/mysql-test/main/cte_recursive.test b/mysql-test/main/cte_recursive.test index 109f7d73011..79809044c00 100644 --- a/mysql-test/main/cte_recursive.test +++ b/mysql-test/main/cte_recursive.test @@ -2324,7 +2324,179 @@ SELECT func(); DROP FUNCTION func; ---echo # Start of 10.3 tests +--echo # +--echo # MDEV-17024: two materialized CTEs using the same recursive CTE +--echo # + +create table t1 (id int); +insert into t1 values (1), (2), (3); + +let $q= +with recursive +rcte(a) as +(select 1 union select cast(a+1 as unsigned) from rcte where a < 10), +cte1 as +(select count(*) as c1 from rcte,t1 where a between 3 and 5 and id=a-3), +cte2 as +(select count(*) as c2 from rcte,t1 where a between 7 and 8 and id=a-7) +select * from cte1, cte2; + +eval $q; +eval explain extended $q; +eval prepare stmt from "$q"; +execute stmt; +execute stmt; + +create table t2 (c1 int, c2 int); +eval create procedure p() insert into t2 $q; +call p(); +select * from t2; + +let $q1= +with recursive +rcte(a) as +(select 1 union select cast(a+1 as unsigned) from rcte where a < 10), +cte1 as +(select count(*) as c1 from rcte,t1 where a between 3 and 5 and id=a-3), +cte2 as +(select count(*) as c2 from rcte,t1 where a between 7 and 8 and id=a-7) +select * from cte1; + +eval $q1; + +let $q2= +with recursive +rcte(a) as +(select 1 union select cast(a+1 as unsigned) from rcte where a < 10), +cte1 as +(select count(*) as c1 from t1), +cte2 as +(select count(*) as c2 from t2) +select * from cte1,cte2; + +eval $q2; + +let $q3= +with recursive +rcte(a) as +(select 1 union select cast(a+1 as unsigned) from rcte where a < 10), +cte1 as +(select count(*) as c1 from rcte,t1 where a between 3 and 5 and id=a-3), +cte2 as +(select count(*) as c2 from rcte,t1 where a between 7 and 8 and id=a-7) +select * from cte1, cte2 where cte1.c1 = 3; + +eval $q3; + +drop procedure p; +drop table t1,t2; + +--echo # +--echo # MDEV-17201: recursive part with LIMIT +--echo # + +CREATE TABLE purchases ( + id int unsigned NOT NULL AUTO_INCREMENT, + pdate date NOT NULL, + quantity int unsigned NOT NULL, + p_id int unsigned NOT NULL, + PRIMARY KEY (id) +); +INSERT INTO purchases(pdate, quantity, p_id) VALUES + ('2014-11-01',5 ,1),('2014-11-03', 3 ,1), + ('2014-11-01',2 ,2),('2014-11-03', 4 ,2); + +CREATE TABLE expired ( + edate date NOT NULL, + quantity int unsigned NOT NULL, + p_id int unsigned NOT NULL, + PRIMARY KEY (edate,p_id) +); + +INSERT INTO expired VALUES ('2014-11-12', 5 ,1),('2014-11-08', 1 ,2); + +WITH RECURSIVE expired_map AS ( + SELECT edate AS expired_date, + CAST(NULL AS date) AS purchase_date, + 0 AS quantity, + e.p_id, + (SELECT MAX(id)+1 FROM purchases p + WHERE pdate <= edate AND p.p_id =p_id) AS purchase_processed, + quantity AS unresolved + FROM expired e + UNION + ( SELECT expired_date, + pdate, + IF(p.quantity < m.unresolved, p.quantity, m.unresolved), + p.p_id, + p.id, + IF(p.quantity < m.unresolved, m.unresolved - p.quantity, 0) + FROM purchases p JOIN expired_map m ON p.p_id = m.p_id + WHERE p.id < m.purchase_processed AND m.unresolved > 0 + ORDER BY p.id DESC + LIMIT 1 + ) +) +SELECT * FROM expired_map; + +DROP TABLE purchases, expired; + +--echo # +--echo # MDEV-17635: Two recursive CTEs, the second using the first +--echo # + +WITH RECURSIVE +x AS (SELECT 0 as k UNION ALL SELECT k + 1 FROM x WHERE k < 1), +z AS + ( SELECT k1 AS cx, k2 AS cy, k1, k2 + FROM (SELECT k AS k1 FROM x) x1 JOIN (SELECT k AS k2 FROM x) y1 + UNION + SELECT 1,1,1,1 FROM z) +SELECT * FROM z; + +--echo # https://wiki.postgresql.org/wiki/Mandelbrot_set: + +WITH RECURSIVE x(i) AS ( + SELECT CAST(0 AS DECIMAL(13, 10)) + UNION ALL + SELECT i + 1 + FROM x + WHERE i < 101 +), +Z(Ix, Iy, Cx, Cy, X, Y, I) AS ( + SELECT Ix, Iy, X, Y, X, Y, 0 + FROM (SELECT CAST(-2.2 + 0.031 * i AS DECIMAL(13, 10)) AS X, + i AS Ix FROM x) AS xgen + CROSS JOIN ( + SELECT CAST(-1.5 + 0.031 * i AS DECIMAL(13, 10)) AS Y, + i AS iY FROM x + ) AS ygen + UNION ALL + SELECT Ix, Iy, Cx, Cy, + CAST(X * X - Y * Y + Cx AS DECIMAL(13, 10)) AS X, + CAST(Y * X * 2 + Cy AS DECIMAL(13, 10)), I + 1 + FROM Z + WHERE X * X + Y * Y < 16.0 + AND I < 27 +), +Zt (Ix, Iy, I) AS ( + SELECT Ix, Iy, MAX(I) AS I + FROM Z + GROUP BY Iy, Ix + ORDER BY Iy, Ix +) +SELECT GROUP_CONCAT( + SUBSTRING( + ' .,,,-----++++%%%%@@@@#### ', + GREATEST(I, 1), + 1 + ) ORDER BY Ix SEPARATOR '' + ) AS 'Mandelbrot Set' + FROM Zt +GROUP BY Iy +ORDER BY Iy; + +--echo # End of 10.2 tests --echo # --echo # MDEV-14217 [db crash] Recursive CTE when SELECT includes new field @@ -2553,3 +2725,5 @@ WITH RECURSIVE cte AS SELECT * FROM cte; DROP TABLE t1; + +--echo # End of 10.3 tests diff --git a/mysql-test/main/ctype_binary.result b/mysql-test/main/ctype_binary.result index 0afe5298411..8059e02611e 100644 --- a/mysql-test/main/ctype_binary.result +++ b/mysql-test/main/ctype_binary.result @@ -3048,6 +3048,29 @@ DROP TABLE t1; SELECT _binary 0x7E, _binary X'7E', _binary B'01111110'; _binary 0x7E _binary X'7E' _binary B'01111110' ~ ~ ~ +SET NAMES utf8, character_set_connection=binary; +# +# MDEV-13118 Wrong results with LOWER and UPPER and subquery +# +SET @save_optimizer_switch=@@optimizer_switch; +SET optimizer_switch=_latin1'derived_merge=on'; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS t LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `t` varbinary(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('abcdefghi'),('ABCDEFGHI'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT LOWER(t) t2 FROM t1) sub; +c2 +ABCDEFGHI-ABCDEFGHI +abcdefghi-abcdefghi +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT UPPER(t) t2 FROM t1) sub; +c2 +ABCDEFGHI-ABCDEFGHI +abcdefghi-abcdefghi +DROP TABLE t1; +SET optimizer_switch=@save_optimizer_switch; # # End of 10.0 tests # diff --git a/mysql-test/main/ctype_binary.test b/mysql-test/main/ctype_binary.test index 8da4eaff572..155d8548f77 100644 --- a/mysql-test/main/ctype_binary.test +++ b/mysql-test/main/ctype_binary.test @@ -24,6 +24,9 @@ SET NAMES binary; --echo # SELECT _binary 0x7E, _binary X'7E', _binary B'01111110'; +SET NAMES utf8, character_set_connection=binary; +--source include/ctype_mdev13118.inc + --echo # --echo # End of 10.0 tests --echo # diff --git a/mysql-test/main/ctype_eucjpms.result b/mysql-test/main/ctype_eucjpms.result index bc7b4b9ef9d..507d0021a1f 100644 --- a/mysql-test/main/ctype_eucjpms.result +++ b/mysql-test/main/ctype_eucjpms.result @@ -33844,6 +33844,29 @@ HEX(a) CHAR_LENGTH(a) DROP TABLE t1; SELECT _eucjpms 0x8EA0; ERROR HY000: Invalid eucjpms character string: '8EA0' +SET NAMES eucjpms; +# +# MDEV-13118 Wrong results with LOWER and UPPER and subquery +# +SET @save_optimizer_switch=@@optimizer_switch; +SET optimizer_switch=_latin1'derived_merge=on'; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS t LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `t` varchar(10) CHARACTER SET eucjpms DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('abcdefghi'),('ABCDEFGHI'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT LOWER(t) t2 FROM t1) sub; +c2 +abcdefghi-abcdefghi +abcdefghi-abcdefghi +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT UPPER(t) t2 FROM t1) sub; +c2 +ABCDEFGHI-ABCDEFGHI +ABCDEFGHI-ABCDEFGHI +DROP TABLE t1; +SET optimizer_switch=@save_optimizer_switch; # # End of 10.0 tests # diff --git a/mysql-test/main/ctype_eucjpms.test b/mysql-test/main/ctype_eucjpms.test index c69abc32a03..867ca809dbf 100644 --- a/mysql-test/main/ctype_eucjpms.test +++ b/mysql-test/main/ctype_eucjpms.test @@ -537,6 +537,8 @@ DROP TABLE t1; --error ER_INVALID_CHARACTER_STRING SELECT _eucjpms 0x8EA0; +SET NAMES eucjpms; +--source include/ctype_mdev13118.inc --echo # --echo # End of 10.0 tests diff --git a/mysql-test/main/ctype_euckr.result b/mysql-test/main/ctype_euckr.result index 3fb6f98b2eb..cc50ddd20be 100644 --- a/mysql-test/main/ctype_euckr.result +++ b/mysql-test/main/ctype_euckr.result @@ -25405,6 +25405,35 @@ A1A1A1A1A1A120202020202020202020202020202020202020 # End of 5.6 tests # # +# Start of 10.0 tests +# +SET NAMES utf8, character_set_connection=euckr; +# +# MDEV-13118 Wrong results with LOWER and UPPER and subquery +# +SET @save_optimizer_switch=@@optimizer_switch; +SET optimizer_switch=_latin1'derived_merge=on'; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS t LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `t` varchar(10) CHARACTER SET euckr DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('abcdefghi'),('ABCDEFGHI'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT LOWER(t) t2 FROM t1) sub; +c2 +abcdefghi-abcdefghi +abcdefghi-abcdefghi +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT UPPER(t) t2 FROM t1) sub; +c2 +ABCDEFGHI-ABCDEFGHI +ABCDEFGHI-ABCDEFGHI +DROP TABLE t1; +SET optimizer_switch=@save_optimizer_switch; +# +# End of 10.0 tests +# +# # Start of 10.2 tests # # diff --git a/mysql-test/main/ctype_euckr.test b/mysql-test/main/ctype_euckr.test index 950c60c47e5..46955360217 100644 --- a/mysql-test/main/ctype_euckr.test +++ b/mysql-test/main/ctype_euckr.test @@ -197,6 +197,16 @@ set collation_connection=euckr_bin; --echo # End of 5.6 tests --echo # +--echo # +--echo # Start of 10.0 tests +--echo # + +SET NAMES utf8, character_set_connection=euckr; +--source include/ctype_mdev13118.inc + +--echo # +--echo # End of 10.0 tests +--echo # --echo # --echo # Start of 10.2 tests diff --git a/mysql-test/main/ctype_gbk.result b/mysql-test/main/ctype_gbk.result index 6bbb9bb3094..4515b9fbdbf 100644 --- a/mysql-test/main/ctype_gbk.result +++ b/mysql-test/main/ctype_gbk.result @@ -5081,6 +5081,29 @@ E05C5B E05B DROP TABLE t1; # Start of ctype_E05C.inc +SET NAMES utf8, character_set_connection=gbk; +# +# MDEV-13118 Wrong results with LOWER and UPPER and subquery +# +SET @save_optimizer_switch=@@optimizer_switch; +SET optimizer_switch=_latin1'derived_merge=on'; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS t LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `t` varchar(10) CHARACTER SET gbk DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('abcdefghi'),('ABCDEFGHI'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT LOWER(t) t2 FROM t1) sub; +c2 +abcdefghi-abcdefghi +abcdefghi-abcdefghi +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT UPPER(t) t2 FROM t1) sub; +c2 +ABCDEFGHI-ABCDEFGHI +ABCDEFGHI-ABCDEFGHI +DROP TABLE t1; +SET optimizer_switch=@save_optimizer_switch; # # MDEV-9886 Illegal mix of collations with a view comparing a field to a binary constant # diff --git a/mysql-test/main/ctype_gbk.test b/mysql-test/main/ctype_gbk.test index a3dc7f4af44..d9d0a4d0ee4 100644 --- a/mysql-test/main/ctype_gbk.test +++ b/mysql-test/main/ctype_gbk.test @@ -199,6 +199,9 @@ let $ctype_unescape_combinations=selected; SET NAMES gbk; --source include/ctype_E05C.inc +SET NAMES utf8, character_set_connection=gbk; +--source include/ctype_mdev13118.inc + --echo # --echo # MDEV-9886 Illegal mix of collations with a view comparing a field to a binary constant --echo # diff --git a/mysql-test/main/ctype_latin1.result b/mysql-test/main/ctype_latin1.result index d5906cb74dd..233fd85a2c4 100644 --- a/mysql-test/main/ctype_latin1.result +++ b/mysql-test/main/ctype_latin1.result @@ -8022,6 +8022,38 @@ a 0 DROP VIEW v1; DROP TABLE t1; +SET NAMES latin1; +# +# MDEV-13118 Wrong results with LOWER and UPPER and subquery +# +SET @save_optimizer_switch=@@optimizer_switch; +SET optimizer_switch=_latin1'derived_merge=on'; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS t LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `t` varchar(10) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('abcdefghi'),('ABCDEFGHI'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT LOWER(t) t2 FROM t1) sub; +c2 +abcdefghi-abcdefghi +abcdefghi-abcdefghi +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT UPPER(t) t2 FROM t1) sub; +c2 +ABCDEFGHI-ABCDEFGHI +ABCDEFGHI-ABCDEFGHI +DROP TABLE t1; +SET optimizer_switch=@save_optimizer_switch; +# +# MDEV-17298 ASAN unknown-crash / READ of size 1 in my_strntoul_8bit upon INSERT .. SELECT +# +SET NAMES latin1; +CREATE TABLE t1 (a CHAR); +CREATE TABLE t2 (b ENUM('foo','bar')); +INSERT INTO t1 VALUES ('1'); +INSERT INTO t2 SELECT * FROM t1; +DROP TABLE t1, t2; # # End of 10.0 tests # diff --git a/mysql-test/main/ctype_latin1.test b/mysql-test/main/ctype_latin1.test index 38f147708b8..a556c86c016 100644 --- a/mysql-test/main/ctype_latin1.test +++ b/mysql-test/main/ctype_latin1.test @@ -262,6 +262,21 @@ SELECT * FROM v1; DROP VIEW v1; DROP TABLE t1; +SET NAMES latin1; +--source include/ctype_mdev13118.inc + + +--echo # +--echo # MDEV-17298 ASAN unknown-crash / READ of size 1 in my_strntoul_8bit upon INSERT .. SELECT +--echo # + +SET NAMES latin1; +CREATE TABLE t1 (a CHAR); +CREATE TABLE t2 (b ENUM('foo','bar')); +INSERT INTO t1 VALUES ('1'); +INSERT INTO t2 SELECT * FROM t1; +DROP TABLE t1, t2; + --echo # --echo # End of 10.0 tests diff --git a/mysql-test/main/ctype_uca.result b/mysql-test/main/ctype_uca.result index 725e744c44e..88fba0b3973 100644 --- a/mysql-test/main/ctype_uca.result +++ b/mysql-test/main/ctype_uca.result @@ -13940,6 +13940,27 @@ Warnings: Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 'oe' and `test`.`t1`.`a` = 'oe' DROP TABLE t1; # +# MDEV-17064 LIKE function has error behavior on the fields in which the collation is xxx_unicode_xx +# +CREATE TABLE t1 (name VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci); +INSERT INTO t1 VALUES ('radio! test'); +SELECT * FROM t1 WHERE name LIKE '%!!%' ESCAPE '!'; +name +radio! test +ALTER TABLE t1 CHANGE COLUMN name name VARCHAR(20) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci'; +SELECT * FROM t1 WHERE name LIKE '%!!%' ESCAPE '!'; +name +radio! test +DROP TABLE t1; +CREATE TABLE t1 (name VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci); +INSERT INTO t1 VALUES ('radio! test'); +SELECT name LIKE '%!!%' ESCAPE '!' AS c1, +name LIKE '%!!%' COLLATE utf8_general_ci ESCAPE '!' AS c2 +FROM t1; +c1 c2 +1 1 +DROP TABLE t1; +# # End of MariaDB-10.0 tests # # diff --git a/mysql-test/main/ctype_uca.test b/mysql-test/main/ctype_uca.test index 15a945fde6d..82be0305f07 100644 --- a/mysql-test/main/ctype_uca.test +++ b/mysql-test/main/ctype_uca.test @@ -619,6 +619,24 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='oe' COLLATE utf8_german2_ci AND a='oe DROP TABLE t1; --echo # +--echo # MDEV-17064 LIKE function has error behavior on the fields in which the collation is xxx_unicode_xx +--echo # + +CREATE TABLE t1 (name VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci); +INSERT INTO t1 VALUES ('radio! test'); +SELECT * FROM t1 WHERE name LIKE '%!!%' ESCAPE '!'; +ALTER TABLE t1 CHANGE COLUMN name name VARCHAR(20) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci'; +SELECT * FROM t1 WHERE name LIKE '%!!%' ESCAPE '!'; +DROP TABLE t1; + +CREATE TABLE t1 (name VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci); +INSERT INTO t1 VALUES ('radio! test'); +SELECT name LIKE '%!!%' ESCAPE '!' AS c1, + name LIKE '%!!%' COLLATE utf8_general_ci ESCAPE '!' AS c2 +FROM t1; +DROP TABLE t1; + +--echo # --echo # End of MariaDB-10.0 tests --echo # diff --git a/mysql-test/main/ctype_ucs.result b/mysql-test/main/ctype_ucs.result index a68309831c6..5641726a831 100644 --- a/mysql-test/main/ctype_ucs.result +++ b/mysql-test/main/ctype_ucs.result @@ -5690,6 +5690,29 @@ c2 YWJjZGVmZ2hp-YWJjZGVmZ2hp DROP TABLE t1; SET optimizer_switch=@save_optimizer_switch; +SET NAMES utf8, character_set_connection=ucs2; +# +# MDEV-13118 Wrong results with LOWER and UPPER and subquery +# +SET @save_optimizer_switch=@@optimizer_switch; +SET optimizer_switch=_latin1'derived_merge=on'; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS t LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `t` varchar(10) CHARACTER SET ucs2 DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('abcdefghi'),('ABCDEFGHI'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT LOWER(t) t2 FROM t1) sub; +c2 +abcdefghi-abcdefghi +abcdefghi-abcdefghi +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT UPPER(t) t2 FROM t1) sub; +c2 +ABCDEFGHI-ABCDEFGHI +ABCDEFGHI-ABCDEFGHI +DROP TABLE t1; +SET optimizer_switch=@save_optimizer_switch; # # End of 10.0 tests # diff --git a/mysql-test/main/ctype_ucs.test b/mysql-test/main/ctype_ucs.test index 9592e27f8e1..d0d463c0340 100644 --- a/mysql-test/main/ctype_ucs.test +++ b/mysql-test/main/ctype_ucs.test @@ -992,6 +992,10 @@ DROP TABLE t1; SET optimizer_switch=@save_optimizer_switch; +SET NAMES utf8, character_set_connection=ucs2; +--source include/ctype_mdev13118.inc + + --echo # --echo # End of 10.0 tests --echo # diff --git a/mysql-test/main/ctype_ujis.result b/mysql-test/main/ctype_ujis.result index cb9de83fedc..0b1cf606f0b 100644 --- a/mysql-test/main/ctype_ujis.result +++ b/mysql-test/main/ctype_ujis.result @@ -26149,6 +26149,29 @@ HEX(a) CHAR_LENGTH(a) DROP TABLE t1; SELECT _ujis 0x8EA0; ERROR HY000: Invalid ujis character string: '8EA0' +SET NAMES ujis; +# +# MDEV-13118 Wrong results with LOWER and UPPER and subquery +# +SET @save_optimizer_switch=@@optimizer_switch; +SET optimizer_switch=_latin1'derived_merge=on'; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS t LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `t` varchar(10) CHARACTER SET ujis DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('abcdefghi'),('ABCDEFGHI'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT LOWER(t) t2 FROM t1) sub; +c2 +abcdefghi-abcdefghi +abcdefghi-abcdefghi +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT UPPER(t) t2 FROM t1) sub; +c2 +ABCDEFGHI-ABCDEFGHI +ABCDEFGHI-ABCDEFGHI +DROP TABLE t1; +SET optimizer_switch=@save_optimizer_switch; # # End of 10.0 tests # diff --git a/mysql-test/main/ctype_ujis.test b/mysql-test/main/ctype_ujis.test index ff9c61c05ba..cf247763b46 100644 --- a/mysql-test/main/ctype_ujis.test +++ b/mysql-test/main/ctype_ujis.test @@ -1368,6 +1368,10 @@ DROP TABLE t1; SELECT _ujis 0x8EA0; +SET NAMES ujis; +--source include/ctype_mdev13118.inc + + --echo # --echo # End of 10.0 tests --echo # diff --git a/mysql-test/main/ctype_upgrade.result b/mysql-test/main/ctype_upgrade.result index 5f0be66f8fb..7f8b594cbf8 100644 --- a/mysql-test/main/ctype_upgrade.result +++ b/mysql-test/main/ctype_upgrade.result @@ -240,7 +240,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK @@ -299,7 +298,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK diff --git a/mysql-test/main/ctype_utf16.result b/mysql-test/main/ctype_utf16.result index 8de21a14bd9..a105017b726 100644 --- a/mysql-test/main/ctype_utf16.result +++ b/mysql-test/main/ctype_utf16.result @@ -2142,6 +2142,29 @@ EXECUTE stmt USING @arg00; CONCAT(_utf16'a' COLLATE utf16_unicode_ci, ?) aÿ DEALLOCATE PREPARE stmt; +SET NAMES utf8, character_set_connection=utf16; +# +# MDEV-13118 Wrong results with LOWER and UPPER and subquery +# +SET @save_optimizer_switch=@@optimizer_switch; +SET optimizer_switch=_latin1'derived_merge=on'; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS t LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `t` varchar(10) CHARACTER SET utf16 DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('abcdefghi'),('ABCDEFGHI'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT LOWER(t) t2 FROM t1) sub; +c2 +abcdefghi-abcdefghi +abcdefghi-abcdefghi +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT UPPER(t) t2 FROM t1) sub; +c2 +ABCDEFGHI-ABCDEFGHI +ABCDEFGHI-ABCDEFGHI +DROP TABLE t1; +SET optimizer_switch=@save_optimizer_switch; # # End of 10.0 tests # diff --git a/mysql-test/main/ctype_utf16.test b/mysql-test/main/ctype_utf16.test index 526f5251055..504e62e3e89 100644 --- a/mysql-test/main/ctype_utf16.test +++ b/mysql-test/main/ctype_utf16.test @@ -870,6 +870,11 @@ SET @arg00=_binary 0x00FF; EXECUTE stmt USING @arg00; DEALLOCATE PREPARE stmt; + +SET NAMES utf8, character_set_connection=utf16; +--source include/ctype_mdev13118.inc + + --echo # --echo # End of 10.0 tests --echo # diff --git a/mysql-test/main/ctype_utf16le.result b/mysql-test/main/ctype_utf16le.result index 0fedff7d3bf..6d8d7ddca2a 100644 --- a/mysql-test/main/ctype_utf16le.result +++ b/mysql-test/main/ctype_utf16le.result @@ -2326,6 +2326,35 @@ DFFFFFDFFFFF9CFFFF9DFFFF9EFFFF # End of 5.6 tests # # +# Start of 10.0 tests +# +SET NAMES utf8, character_set_connection=utf16le; +# +# MDEV-13118 Wrong results with LOWER and UPPER and subquery +# +SET @save_optimizer_switch=@@optimizer_switch; +SET optimizer_switch=_latin1'derived_merge=on'; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS t LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `t` varchar(10) CHARACTER SET utf16le DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('abcdefghi'),('ABCDEFGHI'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT LOWER(t) t2 FROM t1) sub; +c2 +abcdefghi-abcdefghi +abcdefghi-abcdefghi +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT UPPER(t) t2 FROM t1) sub; +c2 +ABCDEFGHI-ABCDEFGHI +ABCDEFGHI-ABCDEFGHI +DROP TABLE t1; +SET optimizer_switch=@save_optimizer_switch; +# +# Start of 10.0 tests +# +# # Start of 10.1 tests # # diff --git a/mysql-test/main/ctype_utf16le.test b/mysql-test/main/ctype_utf16le.test index 79cf875852a..b8728b52db2 100644 --- a/mysql-test/main/ctype_utf16le.test +++ b/mysql-test/main/ctype_utf16le.test @@ -747,6 +747,19 @@ SET NAMES utf8, collation_connection=utf16le_bin; --echo # End of 5.6 tests --echo # + +--echo # +--echo # Start of 10.0 tests +--echo # + + +SET NAMES utf8, character_set_connection=utf16le; +--source include/ctype_mdev13118.inc + +--echo # +--echo # Start of 10.0 tests +--echo # + --echo # --echo # Start of 10.1 tests --echo # diff --git a/mysql-test/main/ctype_utf32.result b/mysql-test/main/ctype_utf32.result index 59ce4c2f445..28b9caf6ffe 100644 --- a/mysql-test/main/ctype_utf32.result +++ b/mysql-test/main/ctype_utf32.result @@ -2241,6 +2241,29 @@ EXECUTE stmt USING @arg00; CONCAT(_utf32'a' COLLATE utf32_unicode_ci, ?) aÿ DEALLOCATE PREPARE stmt; +SET NAMEs utf8, character_set_connection=utf32; +# +# MDEV-13118 Wrong results with LOWER and UPPER and subquery +# +SET @save_optimizer_switch=@@optimizer_switch; +SET optimizer_switch=_latin1'derived_merge=on'; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS t LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `t` varchar(10) CHARACTER SET utf32 DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('abcdefghi'),('ABCDEFGHI'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT LOWER(t) t2 FROM t1) sub; +c2 +abcdefghi-abcdefghi +abcdefghi-abcdefghi +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT UPPER(t) t2 FROM t1) sub; +c2 +ABCDEFGHI-ABCDEFGHI +ABCDEFGHI-ABCDEFGHI +DROP TABLE t1; +SET optimizer_switch=@save_optimizer_switch; # # End of 10.0 tests # diff --git a/mysql-test/main/ctype_utf32.test b/mysql-test/main/ctype_utf32.test index 6f036898d15..2e739ebfdbc 100644 --- a/mysql-test/main/ctype_utf32.test +++ b/mysql-test/main/ctype_utf32.test @@ -983,6 +983,14 @@ SET @arg00=_binary 0x00FF; EXECUTE stmt USING @arg00; DEALLOCATE PREPARE stmt; + +# +# MDEV-13118 Wrong results with LOWER and UPPER and subquery +# +SET NAMEs utf8, character_set_connection=utf32; +--source include/ctype_mdev13118.inc + + --echo # --echo # End of 10.0 tests --echo # diff --git a/mysql-test/main/ctype_utf8.result b/mysql-test/main/ctype_utf8.result index 10d0efeff3c..d696ff78831 100644 --- a/mysql-test/main/ctype_utf8.result +++ b/mysql-test/main/ctype_utf8.result @@ -10286,6 +10286,29 @@ SELECT * FROM v1; c ß DROP VIEW v1; +SET NAMES utf8; +# +# MDEV-13118 Wrong results with LOWER and UPPER and subquery +# +SET @save_optimizer_switch=@@optimizer_switch; +SET optimizer_switch=_latin1'derived_merge=on'; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS t LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `t` varchar(10) CHARACTER SET utf8 DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('abcdefghi'),('ABCDEFGHI'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT LOWER(t) t2 FROM t1) sub; +c2 +abcdefghi-abcdefghi +abcdefghi-abcdefghi +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT UPPER(t) t2 FROM t1) sub; +c2 +ABCDEFGHI-ABCDEFGHI +ABCDEFGHI-ABCDEFGHI +DROP TABLE t1; +SET optimizer_switch=@save_optimizer_switch; # # End of 10.0 tests # diff --git a/mysql-test/main/ctype_utf8.test b/mysql-test/main/ctype_utf8.test index 20a60d370a0..6f8657dacb5 100644 --- a/mysql-test/main/ctype_utf8.test +++ b/mysql-test/main/ctype_utf8.test @@ -1890,6 +1890,13 @@ SELECT * FROM v1; DROP VIEW v1; +# +# MDEV-13118 Wrong results with LOWER and UPPER and subquery +# +SET NAMES utf8; +--source include/ctype_mdev13118.inc + + --echo # --echo # End of 10.0 tests --echo # diff --git a/mysql-test/main/ctype_utf8mb4.result b/mysql-test/main/ctype_utf8mb4.result index 7e5e99354ea..27ffd5552fa 100644 --- a/mysql-test/main/ctype_utf8mb4.result +++ b/mysql-test/main/ctype_utf8mb4.result @@ -3478,6 +3478,29 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; SET NAMES default; +SET NAMES utf8mb4; +# +# MDEV-13118 Wrong results with LOWER and UPPER and subquery +# +SET @save_optimizer_switch=@@optimizer_switch; +SET optimizer_switch=_latin1'derived_merge=on'; +CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS t LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `t` varchar(10) CHARACTER SET utf8mb4 DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES ('abcdefghi'),('ABCDEFGHI'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT LOWER(t) t2 FROM t1) sub; +c2 +abcdefghi-abcdefghi +abcdefghi-abcdefghi +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT UPPER(t) t2 FROM t1) sub; +c2 +ABCDEFGHI-ABCDEFGHI +ABCDEFGHI-ABCDEFGHI +DROP TABLE t1; +SET optimizer_switch=@save_optimizer_switch; # # End of 10.0 tests # diff --git a/mysql-test/main/ctype_utf8mb4.test b/mysql-test/main/ctype_utf8mb4.test index 545347fcd26..9cf87d12340 100644 --- a/mysql-test/main/ctype_utf8mb4.test +++ b/mysql-test/main/ctype_utf8mb4.test @@ -1959,6 +1959,14 @@ DROP TABLE t1; SET NAMES default; + +# +# MDEV-13118 Wrong results with LOWER and UPPER and subquery +# +SET NAMES utf8mb4; +--source include/ctype_mdev13118.inc + + --echo # --echo # End of 10.0 tests --echo # diff --git a/mysql-test/main/date_formats.result b/mysql-test/main/date_formats.result index 16dbdf7969c..463cce39520 100644 --- a/mysql-test/main/date_formats.result +++ b/mysql-test/main/date_formats.result @@ -442,7 +442,7 @@ f1 f2 f3 Warnings: Warning 1292 Truncated incorrect datetime value: '2003-01-02 10:11:12.0012ABCD' Warning 1292 Truncated incorrect time value: '-01:01:01.01 GGG' -Warning 1292 Truncated incorrect time value: '1997-12-31 23:59:59.01XXXX' +Warning 1292 Truncated incorrect datetime value: '1997-12-31 23:59:59.01XXXX' select str_to_date("2003-04-05 g", "%Y-%m-%d") as f1, str_to_date("2003-04-05 10:11:12.101010234567", "%Y-%m-%d %H:%i:%S.%f") as f2; f1 f2 diff --git a/mysql-test/main/delayed.result b/mysql-test/main/delayed.result index d10f4ae22cf..26a1fc670f4 100644 --- a/mysql-test/main/delayed.result +++ b/mysql-test/main/delayed.result @@ -500,7 +500,8 @@ call mtr.add_suppression("Checking table"); insert delayed into t1 values (2,2); Warnings: Error 145 Table './test/t1' is marked as crashed and should be repaired -Error 1034 1 client is using or hasn't closed the table properly +Warning 1034 1 client is using or hasn't closed the table properly +Note 1034 Table is fixed insert delayed into t1 values (3,3); flush tables t1; select * from t1; diff --git a/mysql-test/main/derived.result b/mysql-test/main/derived.result index a1dd1a77d3b..9874f16aa8a 100644 --- a/mysql-test/main/derived.result +++ b/mysql-test/main/derived.result @@ -1053,6 +1053,7 @@ INSERT INTO t2 VALUES (NULL),(NULL); CREATE TABLE t3 (c VARCHAR(1024) CHARACTER SET utf8, d INT) ENGINE=MyISAM; CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v3 AS SELECT * FROM t3; INSERT INTO t3 VALUES ('abc',NULL),('def',4); +set @save_join_cache_level= @@join_cache_level; SET join_cache_level= 8; explain SELECT * FROM v1, t2, v3 WHERE a = c AND b = d; @@ -1082,6 +1083,38 @@ i drop procedure pr; drop view v1; drop table t1; +set @@join_cache_level= @save_join_cache_level; +# +# MDEV-16307: Incorrect results when using BNLH join instead of BNL join with views +# +CREATE TABLE t1 (c1 text, c2 int); +INSERT INTO t1 VALUES ('a',1), ('c',3), ('g',7), ('d',4), ('c',3); +CREATE TABLE t2 (c1 text, c2 int); +INSERT INTO t2 VALUES ('b',2), ('c',3); +CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1; +explain SELECT v1.c1, v1.c2, t2.c1, t2.c2 FROM v1, t2 WHERE v1.c1=t2.c1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join) +2 DERIVED t1 ALL NULL NULL NULL NULL 5 +SELECT v1.c1, v1.c2, t2.c1, t2.c2 FROM v1, t2 WHERE v1.c1=t2.c1; +c1 c2 c1 c2 +c 3 c 3 +c 3 c 3 +set @save_join_cache_level= @@join_cache_level; +set @@join_cache_level=4; +explain SELECT v1.c1, v1.c2, t2.c1, t2.c2 FROM v1, t2 WHERE v1.c1=t2.c1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where +1 PRIMARY <derived2> hash_ALL NULL #hash#$hj 3 test.t2.c1 5 Using where; Using join buffer (flat, BNLH join) +2 DERIVED t1 ALL NULL NULL NULL NULL 5 +SELECT v1.c1, v1.c2, t2.c1, t2.c2 FROM v1, t2 WHERE v1.c1=t2.c1; +c1 c2 c1 c2 +c 3 c 3 +c 3 c 3 +drop table t1,t2; +drop view v1; +set @@join_cache_level= @save_join_cache_level; # end of 5.5 # # Start of 10.1 tests diff --git a/mysql-test/main/derived.test b/mysql-test/main/derived.test index 466d79af409..6c51f23c51e 100644 --- a/mysql-test/main/derived.test +++ b/mysql-test/main/derived.test @@ -913,6 +913,7 @@ CREATE TABLE t3 (c VARCHAR(1024) CHARACTER SET utf8, d INT) ENGINE=MyISAM; CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v3 AS SELECT * FROM t3; INSERT INTO t3 VALUES ('abc',NULL),('def',4); +set @save_join_cache_level= @@join_cache_level; SET join_cache_level= 8; explain SELECT * FROM v1, t2, v3 WHERE a = c AND b = d; @@ -935,7 +936,27 @@ call pr(2); drop procedure pr; drop view v1; drop table t1; +set @@join_cache_level= @save_join_cache_level; +--echo # +--echo # MDEV-16307: Incorrect results when using BNLH join instead of BNL join with views +--echo # + +CREATE TABLE t1 (c1 text, c2 int); +INSERT INTO t1 VALUES ('a',1), ('c',3), ('g',7), ('d',4), ('c',3); +CREATE TABLE t2 (c1 text, c2 int); +INSERT INTO t2 VALUES ('b',2), ('c',3); +CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1; + +explain SELECT v1.c1, v1.c2, t2.c1, t2.c2 FROM v1, t2 WHERE v1.c1=t2.c1; +SELECT v1.c1, v1.c2, t2.c1, t2.c2 FROM v1, t2 WHERE v1.c1=t2.c1; +set @save_join_cache_level= @@join_cache_level; +set @@join_cache_level=4; +explain SELECT v1.c1, v1.c2, t2.c1, t2.c2 FROM v1, t2 WHERE v1.c1=t2.c1; +SELECT v1.c1, v1.c2, t2.c1, t2.c2 FROM v1, t2 WHERE v1.c1=t2.c1; +drop table t1,t2; +drop view v1; +set @@join_cache_level= @save_join_cache_level; --echo # end of 5.5 --echo # diff --git a/mysql-test/main/derived_cond_pushdown.result b/mysql-test/main/derived_cond_pushdown.result index f882dbba466..dac180301d7 100644 --- a/mysql-test/main/derived_cond_pushdown.result +++ b/mysql-test/main/derived_cond_pushdown.result @@ -1,23 +1,23 @@ create table t1 (a int, b int, c int); create table t2 (a int, b int, c int, d decimal); -insert into t1 values +insert into t1 values (1,21,345), (1,33,7), (8,33,114), (1,21,500), (1,19,107), (5,14,787), (8,33,123), (9,10,211), (5,16,207), (1,33,988), (5,27,132), (1,21,104), (6,20,309), (6,20,315), (1,21,101), (8,33,404), (9,10,800), (1,21,123), (7,11,708), (6,20,214); insert into t2 values -(2,3,207,207.0000), (1,21,909,12.0000), (7,13,312,406.0000), +(2,3,207,207.0000), (1,21,909,12.0000), (7,13,312,406.0000), (8,64,248,107.0000), (6,20,315,279.3333), (1,19,203,107.0000), (8,80,800,314.0000), (3,12,231,190.0000), (6,23,303,909.0000); Warnings: Note 1265 Data truncated for column 'd' at row 5 create table t1_double(a int, b double, c double); -insert into t1_double values +insert into t1_double values (1,23.4,14.3333), (1,12.5,18.9), (3,12.5,18.9), (4,33.4,14.3333), (4,14.3333,13.65), (5,17.89,7.22), (6,33.4,14.3), (10,33.4,13.65), (11,33.4,13.65); create table t2_double(a int, b double, c double); -insert into t2_double values +insert into t2_double values (1,22.4,14.3333), (1,12.5,18.9), (2,22.4,18.9), (4,33.4,14.3333), (5,22.4,13.65), (7,17.89,18.9), (6,33.4,14.3333), (10,31.4,13.65), (12,33.4,13.65); @@ -41,22 +41,22 @@ insert into t2_decimal values (2,1,13),(2,2,11),(3,3,16), (1,3,22),(1,3,14),(2,2,15), (2,1,43),(2,3,11),(2,3,16); -create view v1 as select a, b, max(c) as max_c, avg(c) as avg_c from t1 +create view v1 as select a, b, max(c) as max_c, avg(c) as avg_c from t1 group by a,b having max_c < 707; -create view v2 as select a, b, max(c) as max_c, avg(c) as avg_c from t1 +create view v2 as select a, b, max(c) as max_c, avg(c) as avg_c from t1 where t1.a>5 group by a,b having max_c < 707; create view v3 as select a, b, min(c) as min_c from t1 where t1.a<10 group by a,b having min_c > 109; create view v4 as select a, b, min(max_c) as min_c from v1 where (v1.a<15) group by a,b; -create view v_union as +create view v_union as select a, b, min(c) as c from t1 where t1.a<10 group by a,b having c > 109 union select a, b, max(c) as c from t1 where t1.b>10 group by a,b having c < 300; -create view v2_union as +create view v2_union as select a, b, min(c) as c from t1 where t1.a<10 group by a,b having c > 109 union @@ -65,13 +65,13 @@ where t1.b>10 group by a,b having c < 300 union select a, b, avg(c) as c from t1 where t1.c>300 group by a,b having c < 707; -create view v3_union as +create view v3_union as select a, b, (a+1) as c from t1 where t1.a<10 union select a, b, c from t1 where t1.b>10 and t1.c>100; -create view v4_union as +create view v4_union as select a, b, max(c)-100 as c from t1 where t1.a<10 group by a,b having c > 109 union @@ -80,13 +80,13 @@ where t1.b>10; create view v_double as select a, avg(a/4) as avg_a, b, c from t1_double where (b>12.2) group by b,c having (avg_a<22.333); -create view v_char as -select a, b, max(c) as max_c from t1_char +create view v_char as +select a, b, max(c) as max_c from t1_char group by a,b having max_c < 9; create view v_decimal as select a, b, avg(c) as avg_c from t1_decimal group by a,b having (avg_c>12); -# conjunctive subformula : pushing into HAVING +# conjunctive subformula : pushing into HAVING set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where (v1.max_c>214) and (t2.a>v1.a); a b max_c avg_c a b c d 1 21 500 234.6000 2 3 207 207 @@ -161,7 +161,7 @@ EXPLAIN } set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 -group by a,b having max_c < 707) v1, +group by a,b having max_c < 707) v1, t2 where (v1.a=t2.a) and (v1.max_c>300); a b max_c avg_c a b c d 1 21 500 234.6000 1 21 909 12 @@ -172,7 +172,7 @@ a b max_c avg_c a b c d 6 20 315 279.3333 6 23 303 909 select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 -group by a,b having max_c < 707) v1, +group by a,b having max_c < 707) v1, t2 where (v1.a=t2.a) and (v1.max_c>300); a b max_c avg_c a b c d 1 21 500 234.6000 1 21 909 12 @@ -183,7 +183,7 @@ a b max_c avg_c a b c d 6 20 315 279.3333 6 23 303 909 explain select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 -group by a,b having max_c < 707) v1, +group by a,b having max_c < 707) v1, t2 where (v1.a=t2.a) and (v1.max_c>300); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where @@ -191,7 +191,7 @@ id select_type table type possible_keys key key_len ref rows Extra 2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort explain format=json select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 -group by a,b having max_c < 707) v1, +group by a,b having max_c < 707) v1, t2 where (v1.a=t2.a) and (v1.max_c>300); EXPLAIN { @@ -235,8 +235,8 @@ EXPLAIN } } } -# extracted or formula : pushing into HAVING -set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where +# extracted or formula : pushing into HAVING +set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where ((v1.max_c>400) and (t2.a>v1.a)) or ((v1.max_c<135) and (t2.a<v1.a)); a b max_c avg_c a b c d 1 21 500 234.6000 2 3 207 207 @@ -250,7 +250,7 @@ a b max_c avg_c a b c d 5 27 132 132.0000 1 21 909 12 5 27 132 132.0000 1 19 203 107 5 27 132 132.0000 3 12 231 190 -select * from v1,t2 where +select * from v1,t2 where ((v1.max_c>400) and (t2.a>v1.a)) or ((v1.max_c<135) and (t2.a<v1.a)); a b max_c avg_c a b c d 1 21 500 234.6000 2 3 207 207 @@ -264,13 +264,13 @@ a b max_c avg_c a b c d 5 27 132 132.0000 1 21 909 12 5 27 132 132.0000 1 19 203 107 5 27 132 132.0000 3 12 231 190 -explain select * from v1,t2 where +explain select * from v1,t2 where ((v1.max_c>400) and (t2.a>v1.a)) or ((v1.max_c<135) and (t2.a<v1.a)); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join) 2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort -explain format=json select * from v1,t2 where +explain format=json select * from v1,t2 where ((v1.max_c>400) and (t2.a>v1.a)) or ((v1.max_c<135) and (t2.a<v1.a)); EXPLAIN { @@ -315,7 +315,7 @@ EXPLAIN } } set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where -((v1.max_c>300) and (v1.avg_c>t2.d) and (v1.b=t2.b)) or +((v1.max_c>300) and (v1.avg_c>t2.d) and (v1.b=t2.b)) or ((v1.max_c<135) and (v1.max_c<t2.c) and (v1.a=t2.a)); a b max_c avg_c a b c d 1 19 107 107.0000 1 21 909 12 @@ -323,7 +323,7 @@ a b max_c avg_c a b c d 1 21 500 234.6000 1 21 909 12 6 20 315 279.3333 6 20 315 279 select * from v1,t2 where -((v1.max_c>300) and (v1.avg_c>t2.d) and (v1.b=t2.b)) or +((v1.max_c>300) and (v1.avg_c>t2.d) and (v1.b=t2.b)) or ((v1.max_c<135) and (v1.max_c<t2.c) and (v1.a=t2.a)); a b max_c avg_c a b c d 1 19 107 107.0000 1 21 909 12 @@ -331,14 +331,14 @@ a b max_c avg_c a b c d 1 21 500 234.6000 1 21 909 12 6 20 315 279.3333 6 20 315 279 explain select * from v1,t2 where -((v1.max_c>300) and (v1.avg_c>t2.d) and (v1.b=t2.b)) or +((v1.max_c>300) and (v1.avg_c>t2.d) and (v1.b=t2.b)) or ((v1.max_c<135) and (v1.max_c<t2.c) and (v1.a=t2.a)); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join) 2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort explain format=json select * from v1,t2 where -((v1.max_c>300) and (v1.avg_c>t2.d) and (v1.b=t2.b)) or +((v1.max_c>300) and (v1.avg_c>t2.d) and (v1.b=t2.b)) or ((v1.max_c<135) and (v1.max_c<t2.c) and (v1.a=t2.a)); EXPLAIN { @@ -508,7 +508,7 @@ EXPLAIN } } # extracted or formula : pushing into WHERE -set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where +set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where ((v1.a>7) and (t2.c<v1.max_c)) or ((v1.a<2) and (t2.b<v1.b)); a b max_c avg_c a b c d 1 19 107 107.0000 2 3 207 207 @@ -526,7 +526,7 @@ a b max_c avg_c a b c d 8 33 404 213.6667 1 19 203 107 8 33 404 213.6667 3 12 231 190 8 33 404 213.6667 6 23 303 909 -select * from v1,t2 where +select * from v1,t2 where ((v1.a>7) and (t2.c<v1.max_c)) or ((v1.a<2) and (t2.b<v1.b)); a b max_c avg_c a b c d 1 19 107 107.0000 2 3 207 207 @@ -544,13 +544,13 @@ a b max_c avg_c a b c d 8 33 404 213.6667 1 19 203 107 8 33 404 213.6667 3 12 231 190 8 33 404 213.6667 6 23 303 909 -explain select * from v1,t2 where +explain select * from v1,t2 where ((v1.a>7) and (t2.c<v1.max_c)) or ((v1.a<2) and (t2.b<v1.b)); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join) 2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort -explain format=json select * from v1,t2 where +explain format=json select * from v1,t2 where ((v1.a>7) and (t2.c<v1.max_c)) or ((v1.a<2) and (t2.b<v1.b)); EXPLAIN { @@ -595,7 +595,7 @@ EXPLAIN } } } -set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v2,t2 where +set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v2,t2 where ((v2.a>7) and (t2.c<v2.max_c)) or ((v2.a>5) and (t2.b<v2.b)); a b max_c avg_c a b c d 6 20 315 279.3333 2 3 207 207 @@ -610,7 +610,7 @@ a b max_c avg_c a b c d 8 33 404 213.6667 1 19 203 107 8 33 404 213.6667 3 12 231 190 8 33 404 213.6667 6 23 303 909 -select * from v2,t2 where +select * from v2,t2 where ((v2.a>7) and (t2.c<v2.max_c)) or ((v2.a>5) and (t2.b<v2.b)); a b max_c avg_c a b c d 6 20 315 279.3333 2 3 207 207 @@ -625,13 +625,13 @@ a b max_c avg_c a b c d 8 33 404 213.6667 1 19 203 107 8 33 404 213.6667 3 12 231 190 8 33 404 213.6667 6 23 303 909 -explain select * from v2,t2 where +explain select * from v2,t2 where ((v2.a>7) and (t2.c<v2.max_c)) or ((v2.a>5) and (t2.b<v2.b)); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join) 2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort -explain format=json select * from v2,t2 where +explain format=json select * from v2,t2 where ((v2.a>7) and (t2.c<v2.max_c)) or ((v2.a>5) and (t2.b<v2.b)); EXPLAIN { @@ -676,29 +676,29 @@ EXPLAIN } } } -set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where -((v1.a>4) and (v1.b>t2.b) and (v1.max_c=t2.d)) or +set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where +((v1.a>4) and (v1.b>t2.b) and (v1.max_c=t2.d)) or ((v1.a<2) and (v1.max_c<t2.c) and (v1.max_c=t2.d)); a b max_c avg_c a b c d 1 19 107 107.0000 8 64 248 107 1 19 107 107.0000 1 19 203 107 5 16 207 207.0000 2 3 207 207 -select * from v1,t2 where -((v1.a>4) and (v1.b>t2.b) and (v1.max_c=t2.d)) or +select * from v1,t2 where +((v1.a>4) and (v1.b>t2.b) and (v1.max_c=t2.d)) or ((v1.a<2) and (v1.max_c<t2.c) and (v1.max_c=t2.d)); a b max_c avg_c a b c d 1 19 107 107.0000 8 64 248 107 1 19 107 107.0000 1 19 203 107 5 16 207 207.0000 2 3 207 207 -explain select * from v1,t2 where -((v1.a>4) and (v1.b>t2.b) and (v1.max_c=t2.d)) or +explain select * from v1,t2 where +((v1.a>4) and (v1.b>t2.b) and (v1.max_c=t2.d)) or ((v1.a<2) and (v1.max_c<t2.c) and (v1.max_c=t2.d)); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join) 2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort -explain format=json select * from v1,t2 where -((v1.a>4) and (v1.b>t2.b) and (v1.max_c=t2.d)) or +explain format=json select * from v1,t2 where +((v1.a>4) and (v1.b>t2.b) and (v1.max_c=t2.d)) or ((v1.a<2) and (v1.max_c<t2.c) and (v1.max_c=t2.d)); EXPLAIN { @@ -934,8 +934,8 @@ EXPLAIN } } # extracted or formula : pushing into HAVING and WHERE -set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where -((v1.a>7) and (v1.max_c>300) and (t2.c<v1.max_c)) or +set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where +((v1.a>7) and (v1.max_c>300) and (t2.c<v1.max_c)) or ((v1.a<4) and (v1.max_c<500) and (t2.b<v1.b)); a b max_c avg_c a b c d 1 19 107 107.0000 2 3 207 207 @@ -948,8 +948,8 @@ a b max_c avg_c a b c d 8 33 404 213.6667 1 19 203 107 8 33 404 213.6667 3 12 231 190 8 33 404 213.6667 6 23 303 909 -select * from v1,t2 where -((v1.a>7) and (v1.max_c>300) and (t2.c<v1.max_c)) or +select * from v1,t2 where +((v1.a>7) and (v1.max_c>300) and (t2.c<v1.max_c)) or ((v1.a<4) and (v1.max_c<500) and (t2.b<v1.b)); a b max_c avg_c a b c d 1 19 107 107.0000 2 3 207 207 @@ -962,15 +962,15 @@ a b max_c avg_c a b c d 8 33 404 213.6667 1 19 203 107 8 33 404 213.6667 3 12 231 190 8 33 404 213.6667 6 23 303 909 -explain select * from v1,t2 where -((v1.a>7) and (v1.max_c>300) and (t2.c<v1.max_c)) or +explain select * from v1,t2 where +((v1.a>7) and (v1.max_c>300) and (t2.c<v1.max_c)) or ((v1.a<4) and (v1.max_c<500) and (t2.b<v1.b)); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join) 2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort -explain format=json select * from v1,t2 where -((v1.a>7) and (v1.max_c>300) and (t2.c<v1.max_c)) or +explain format=json select * from v1,t2 where +((v1.a>7) and (v1.max_c>300) and (t2.c<v1.max_c)) or ((v1.a<4) and (v1.max_c<500) and (t2.b<v1.b)); EXPLAIN { @@ -1104,8 +1104,8 @@ EXPLAIN } } } -# extracted or formulas : pushing into WHERE and HAVING -set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where +# extracted or formulas : pushing into WHERE and HAVING +set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where ((v1.a<2) and (v1.max_c>120) and (v1.b=t2.b)) or (v1.a>7); a b max_c avg_c a b c d 1 21 500 234.6000 1 21 909 12 @@ -1118,7 +1118,7 @@ a b max_c avg_c a b c d 8 33 404 213.6667 8 80 800 314 8 33 404 213.6667 3 12 231 190 8 33 404 213.6667 6 23 303 909 -select * from v1,t2 where +select * from v1,t2 where ((v1.a<2) and (v1.max_c>120) and (v1.b=t2.b)) or (v1.a>7); a b max_c avg_c a b c d 1 21 500 234.6000 1 21 909 12 @@ -1131,13 +1131,13 @@ a b max_c avg_c a b c d 8 33 404 213.6667 8 80 800 314 8 33 404 213.6667 3 12 231 190 8 33 404 213.6667 6 23 303 909 -explain select * from v1,t2 where +explain select * from v1,t2 where ((v1.a<2) and (v1.max_c>120) and (v1.b=t2.b)) or (v1.a>7); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join) 2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort -explain format=json select * from v1,t2 where +explain format=json select * from v1,t2 where ((v1.a<2) and (v1.max_c>120) and (v1.b=t2.b)) or (v1.a>7); EXPLAIN { @@ -1250,7 +1250,7 @@ EXPLAIN } } # prepare of a query containing extracted or formula -prepare stmt from "select * from v1,t2 where +prepare stmt from "select * from v1,t2 where ((v1.max_c>400) and (t2.a>v1.a)) or ((v1.max_c<135) and (t2.a<v1.a));"; execute stmt; a b max_c avg_c a b c d @@ -1279,8 +1279,8 @@ a b max_c avg_c a b c d 5 27 132 132.0000 1 19 203 107 5 27 132 132.0000 3 12 231 190 deallocate prepare stmt; -prepare stmt from -"explain format=json select * from v1,t2 where +prepare stmt from +"explain format=json select * from v1,t2 where ((v1.max_c>400) and (t2.a>v1.a)) or ((v1.max_c<135) and (t2.a<v1.a));"; execute stmt; EXPLAIN @@ -1652,7 +1652,7 @@ EXPLAIN } } } -# extracted and formula : pushing into WHERE +# extracted and formula : pushing into WHERE # pushing equalities set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where (v1.a=v1.b) and (v1.a=t2.a) and (v1.a=3); a b max_c avg_c a b c d @@ -1752,23 +1752,23 @@ EXPLAIN } } } -set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v_char as v,t2_char as t where +set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v_char as v,t2_char as t where (v.a='c') and (v.b<'Hermes') and ((v.b=t.b) or (v.max_c>20)); a b max_c a b c c Harry 4 d Harry 1 c Harry 4 b Harry 4 -select * from v_char as v,t2_char as t where +select * from v_char as v,t2_char as t where (v.a='c') and (v.b<'Hermes') and ((v.b=t.b) or (v.max_c>20)); a b max_c a b c c Harry 4 d Harry 1 c Harry 4 b Harry 4 -explain select * from v_char as v,t2_char as t where +explain select * from v_char as v,t2_char as t where (v.a='c') and (v.b<'Hermes') and ((v.b=t.b) or (v.max_c>20)); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY <derived2> ALL NULL NULL NULL NULL 12 Using where 1 PRIMARY t ALL NULL NULL NULL NULL 12 Using where; Using join buffer (flat, BNL join) 2 DERIVED t1_char ALL NULL NULL NULL NULL 12 Using where; Using temporary; Using filesort -explain format=json select * from v_char as v,t2_char as t where +explain format=json select * from v_char as v,t2_char as t where (v.a='c') and (v.b<'Hermes') and ((v.b=t.b) or (v.max_c>20)); EXPLAIN { @@ -1885,7 +1885,7 @@ EXPLAIN } } } -# extracted or formula : pushing into HAVING using equalities +# extracted or formula : pushing into HAVING using equalities set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where ((t2.a<4) and (v1.a=t2.a)) or ((t2.c>150) and (v1.max_c=t2.c)); a b max_c avg_c a b c d @@ -2014,24 +2014,24 @@ EXPLAIN } } # conjunctive subformulas : pushing into WHERE and HAVING -# pushing equalities +# pushing equalities set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 -group by a,b having max_c < 707) v1, +group by a,b having max_c < 707) v1, t2 where (v1.a=8) and (v1.a=t2.a) and (v1.max_c=404); a b max_c avg_c a b c d 8 33 404 213.6667 8 64 248 107 8 33 404 213.6667 8 80 800 314 select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 -group by a,b having max_c < 707) v1, +group by a,b having max_c < 707) v1, t2 where (v1.a=8) and (v1.a=t2.a) and (v1.max_c=404); a b max_c avg_c a b c d 8 33 404 213.6667 8 64 248 107 8 33 404 213.6667 8 80 800 314 explain select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 -group by a,b having max_c < 707) v1, +group by a,b having max_c < 707) v1, t2 where (v1.a=8) and (v1.a=t2.a) and (v1.max_c=404); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where @@ -2039,7 +2039,7 @@ id select_type table type possible_keys key key_len ref rows Extra 2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort explain format=json select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 -group by a,b having max_c < 707) v1, +group by a,b having max_c < 707) v1, t2 where (v1.a=8) and (v1.a=t2.a) and (v1.max_c=404); EXPLAIN { @@ -2084,22 +2084,22 @@ EXPLAIN } } } -# conjunctive subformulas : pushing into WHERE and HAVING -set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where +# conjunctive subformulas : pushing into WHERE and HAVING +set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where (v1.a>3) and (v1.max_c>200) and (t2.b<v1.b) and (t2.d=v1.max_c); a b max_c avg_c a b c d 5 16 207 207.0000 2 3 207 207 -select * from v1,t2 where +select * from v1,t2 where (v1.a>3) and (v1.max_c>200) and (t2.b<v1.b) and (t2.d=v1.max_c); a b max_c avg_c a b c d 5 16 207 207.0000 2 3 207 207 -explain select * from v1,t2 where +explain select * from v1,t2 where (v1.a>3) and (v1.max_c>200) and (t2.b<v1.b) and (t2.d=v1.max_c); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where 1 PRIMARY <derived2> ref key0 key0 5 test.t2.d 2 Using where 2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort -explain format=json select * from v1,t2 where +explain format=json select * from v1,t2 where (v1.a>3) and (v1.max_c>200) and (t2.b<v1.b) and (t2.d=v1.max_c); EXPLAIN { @@ -2205,7 +2205,7 @@ EXPLAIN } } # conjunctive subformula : pushing into WHERE -# extracted or formula : pushing into HAVING using equalities +# extracted or formula : pushing into HAVING using equalities set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v_double as v,t2_double as t where (((v.a>0.2) or (v.b<17)) or (t.c>17)) and (t.c=v.c) and (v.c>18); a avg_a b c a b c @@ -2366,17 +2366,17 @@ EXPLAIN } set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 -where t1.a>5 group by a,b having max_c < 707) v1, +where t1.a>5 group by a,b having max_c < 707) v1, t2 where (v1.a=t2.a) and (v1.max_c>300) and (v1.a=v1.b); a b max_c avg_c a b c d select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 -where t1.a>5 group by a,b having max_c < 707) v1, +where t1.a>5 group by a,b having max_c < 707) v1, t2 where (v1.a=t2.a) and (v1.max_c>300) and (v1.a=v1.b); a b max_c avg_c a b c d explain select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 -where t1.a>5 group by a,b having max_c < 707) v1, +where t1.a>5 group by a,b having max_c < 707) v1, t2 where (v1.a=t2.a) and (v1.max_c>300) and (v1.a=v1.b); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where @@ -2384,7 +2384,7 @@ id select_type table type possible_keys key key_len ref rows Extra 2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort explain format=json select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 -where t1.a>5 group by a,b having max_c < 707) v1, +where t1.a>5 group by a,b having max_c < 707) v1, t2 where (v1.a=t2.a) and (v1.max_c>300) and (v1.a=v1.b); EXPLAIN { @@ -2550,7 +2550,7 @@ EXPLAIN } } } -set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where +set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where (t2.a=v1.a) or (v1.b=t2.b) and ((v1.a=1) or (v1.a=6)); a b max_c avg_c a b c d 1 19 107 107.0000 1 21 909 12 @@ -2561,7 +2561,7 @@ a b max_c avg_c a b c d 6 20 315 279.3333 6 23 303 909 8 33 404 213.6667 8 64 248 107 8 33 404 213.6667 8 80 800 314 -select * from v1,t2 where +select * from v1,t2 where (t2.a=v1.a) or (v1.b=t2.b) and ((v1.a=1) or (v1.a=6)); a b max_c avg_c a b c d 1 19 107 107.0000 1 21 909 12 @@ -2572,13 +2572,13 @@ a b max_c avg_c a b c d 6 20 315 279.3333 6 23 303 909 8 33 404 213.6667 8 64 248 107 8 33 404 213.6667 8 80 800 314 -explain select * from v1,t2 where +explain select * from v1,t2 where (t2.a=v1.a) or (v1.b=t2.b) and ((v1.a=1) or (v1.a=6)); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join) 2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort -explain format=json select * from v1,t2 where +explain format=json select * from v1,t2 where (t2.a=v1.a) or (v1.b=t2.b) and ((v1.a=1) or (v1.a=6)); EXPLAIN { @@ -2716,7 +2716,7 @@ EXPLAIN } } } -set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where +set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where (t2.a<2) and (t2.c>900) and ((v1.a<t2.a) or (t2.a<11)); a b max_c avg_c a b c d 1 19 107 107.0000 1 21 909 12 @@ -2725,7 +2725,7 @@ a b max_c avg_c a b c d 5 27 132 132.0000 1 21 909 12 6 20 315 279.3333 1 21 909 12 8 33 404 213.6667 1 21 909 12 -select * from v1,t2 where +select * from v1,t2 where (t2.a<2) and (t2.c>900) and ((v1.a<t2.a) or (t2.a<11)); a b max_c avg_c a b c d 1 19 107 107.0000 1 21 909 12 @@ -2734,13 +2734,13 @@ a b max_c avg_c a b c d 5 27 132 132.0000 1 21 909 12 6 20 315 279.3333 1 21 909 12 8 33 404 213.6667 1 21 909 12 -explain select * from v1,t2 where +explain select * from v1,t2 where (t2.a<2) and (t2.c>900) and ((v1.a<t2.a) or (t2.a<11)); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where 1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join) 2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort -explain format=json select * from v1,t2 where +explain format=json select * from v1,t2 where (t2.a<2) and (t2.c>900) and ((v1.a<t2.a) or (t2.a<11)); EXPLAIN { @@ -2785,21 +2785,21 @@ EXPLAIN } } # using several derived tables : nothing to push -set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,v2,t2 where +set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,v2,t2 where (v1.a=v2.a) and (v1.a=t2.a) and (v2.b<50); a b max_c avg_c a b max_c avg_c a b c d 8 33 404 213.6667 8 33 404 213.6667 8 64 248 107 6 20 315 279.3333 6 20 315 279.3333 6 20 315 279 8 33 404 213.6667 8 33 404 213.6667 8 80 800 314 6 20 315 279.3333 6 20 315 279.3333 6 23 303 909 -select * from v1,v2,t2 where +select * from v1,v2,t2 where (v1.a=v2.a) and (v1.a=t2.a) and (v2.b<50); a b max_c avg_c a b max_c avg_c a b c d 8 33 404 213.6667 8 33 404 213.6667 8 64 248 107 6 20 315 279.3333 6 20 315 279.3333 6 20 315 279 8 33 404 213.6667 8 33 404 213.6667 8 80 800 314 6 20 315 279.3333 6 20 315 279.3333 6 23 303 909 -explain select * from v1,v2,t2 where +explain select * from v1,v2,t2 where (v1.a=v2.a) and (v1.a=t2.a) and (v2.b<50); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where @@ -2807,7 +2807,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY <derived3> ref key0 key0 5 test.t2.a 2 Using where 3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort 2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort -explain format=json select * from v1,v2,t2 where +explain format=json select * from v1,v2,t2 where (v1.a=v2.a) and (v1.a=t2.a) and (v2.b<50); EXPLAIN { @@ -2880,7 +2880,7 @@ EXPLAIN } } } -set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,v2,t2 where +set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,v2,t2 where ((v1.a=v2.a) or (v1.a=t2.a)) and (t2.b<50) and (v1.b=v2.b); a b max_c avg_c a b max_c avg_c a b c d 6 20 315 279.3333 6 20 315 279.3333 2 3 207 207 @@ -2897,7 +2897,7 @@ a b max_c avg_c a b max_c avg_c a b c d 8 33 404 213.6667 8 33 404 213.6667 1 19 203 107 8 33 404 213.6667 8 33 404 213.6667 3 12 231 190 8 33 404 213.6667 8 33 404 213.6667 6 23 303 909 -select * from v1,v2,t2 where +select * from v1,v2,t2 where ((v1.a=v2.a) or (v1.a=t2.a)) and (t2.b<50) and (v1.b=v2.b); a b max_c avg_c a b max_c avg_c a b c d 6 20 315 279.3333 6 20 315 279.3333 2 3 207 207 @@ -2914,7 +2914,7 @@ a b max_c avg_c a b max_c avg_c a b c d 8 33 404 213.6667 8 33 404 213.6667 1 19 203 107 8 33 404 213.6667 8 33 404 213.6667 3 12 231 190 8 33 404 213.6667 8 33 404 213.6667 6 23 303 909 -explain select * from v1,v2,t2 where +explain select * from v1,v2,t2 where ((v1.a=v2.a) or (v1.a=t2.a)) and (t2.b<50) and (v1.b=v2.b); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where @@ -2922,7 +2922,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY <derived3> ref key0 key0 5 v1.b 2 Using where 3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort 2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort -explain format=json select * from v1,v2,t2 where +explain format=json select * from v1,v2,t2 where ((v1.a=v2.a) or (v1.a=t2.a)) and (t2.b<50) and (v1.b=v2.b); EXPLAIN { @@ -2996,21 +2996,21 @@ EXPLAIN } } } -set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,v2,t2 where +set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,v2,t2 where ((v1.a=v2.a) and (v1.a=t2.a)) or ((v2.b>13) and (t2.c<115)); a b max_c avg_c a b max_c avg_c a b c d 6 20 315 279.3333 6 20 315 279.3333 6 20 315 279 6 20 315 279.3333 6 20 315 279.3333 6 23 303 909 8 33 404 213.6667 8 33 404 213.6667 8 64 248 107 8 33 404 213.6667 8 33 404 213.6667 8 80 800 314 -select * from v1,v2,t2 where +select * from v1,v2,t2 where ((v1.a=v2.a) and (v1.a=t2.a)) or ((v2.b>13) and (t2.c<115)); a b max_c avg_c a b max_c avg_c a b c d 6 20 315 279.3333 6 20 315 279.3333 6 20 315 279 6 20 315 279.3333 6 20 315 279.3333 6 23 303 909 8 33 404 213.6667 8 33 404 213.6667 8 64 248 107 8 33 404 213.6667 8 33 404 213.6667 8 80 800 314 -explain select * from v1,v2,t2 where +explain select * from v1,v2,t2 where ((v1.a=v2.a) and (v1.a=t2.a)) or ((v2.b>13) and (t2.c<115)); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 @@ -3018,7 +3018,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY <derived3> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (incremental, BNL join) 3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort 2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort -explain format=json select * from v1,v2,t2 where +explain format=json select * from v1,v2,t2 where ((v1.a=v2.a) and (v1.a=t2.a)) or ((v2.b>13) and (t2.c<115)); EXPLAIN { @@ -3094,22 +3094,22 @@ EXPLAIN # using several derived tables : pushing in all tables # conjunctive subformula : pushing into HAVING # extracted or formula : pushing into WHERE -# pushing equalities -set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,v2,t2 where ((v1.a=v2.a) or (v1.a=t2.a)) and +# pushing equalities +set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,v2,t2 where ((v1.a=v2.a) or (v1.a=t2.a)) and ((v2.b<50) or (v2.b=19)) and (v1.max_c<300); a b max_c avg_c a b max_c avg_c a b c d 1 19 107 107.0000 6 20 315 279.3333 1 21 909 12 1 19 107 107.0000 6 20 315 279.3333 1 19 203 107 1 19 107 107.0000 8 33 404 213.6667 1 21 909 12 1 19 107 107.0000 8 33 404 213.6667 1 19 203 107 -select * from v1,v2,t2 where ((v1.a=v2.a) or (v1.a=t2.a)) and +select * from v1,v2,t2 where ((v1.a=v2.a) or (v1.a=t2.a)) and ((v2.b<50) or (v2.b=19)) and (v1.max_c<300); a b max_c avg_c a b max_c avg_c a b c d 1 19 107 107.0000 6 20 315 279.3333 1 21 909 12 1 19 107 107.0000 6 20 315 279.3333 1 19 203 107 1 19 107 107.0000 8 33 404 213.6667 1 21 909 12 1 19 107 107.0000 8 33 404 213.6667 1 19 203 107 -explain select * from v1,v2,t2 where ((v1.a=v2.a) or (v1.a=t2.a)) and +explain select * from v1,v2,t2 where ((v1.a=v2.a) or (v1.a=t2.a)) and ((v2.b<50) or (v2.b=19)) and (v1.max_c<300); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 @@ -3117,7 +3117,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY <derived3> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (incremental, BNL join) 3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort 2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort -explain format=json select * from v1,v2,t2 where ((v1.a=v2.a) or (v1.a=t2.a)) and +explain format=json select * from v1,v2,t2 where ((v1.a=v2.a) or (v1.a=t2.a)) and ((v2.b<50) or (v2.b=19)) and (v1.max_c<300); EXPLAIN { @@ -3194,13 +3194,13 @@ EXPLAIN # using several derived tables : pushing only in one table # conjunctive subformula : pushing into WHERE # pushing equalities -set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,v2,t2 where +set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,v2,t2 where (v1.a=t2.a) and (v1.a=v1.b) and (v1.a=v2.a) and (v2.max_c<300); a b max_c avg_c a b max_c avg_c a b c d -select * from v1,v2,t2 where +select * from v1,v2,t2 where (v1.a=t2.a) and (v1.a=v1.b) and (v1.a=v2.a) and (v2.max_c<300); a b max_c avg_c a b max_c avg_c a b c d -explain select * from v1,v2,t2 where +explain select * from v1,v2,t2 where (v1.a=t2.a) and (v1.a=v1.b) and (v1.a=v2.a) and (v2.max_c<300); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where @@ -3208,7 +3208,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY <derived3> ref key0 key0 5 test.t2.a 2 Using where 3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort 2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort -explain format=json select * from v1,v2,t2 where +explain format=json select * from v1,v2,t2 where (v1.a=t2.a) and (v1.a=v1.b) and (v1.a=v2.a) and (v2.max_c<300); EXPLAIN { @@ -3373,7 +3373,7 @@ EXPLAIN # extracted or formula : pushing into WHERE # conjunctive subformula : pushing into WHERE using equalities # pushing equalities -set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v_char as v,t2_char as t where +set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v_char as v,t2_char as t where (v.a=t.a) and (t.a='b') and ((v.b='Vika') or (v.b='Ali')); a b max_c a b c b Vika 2 b Ivan 1 @@ -3381,7 +3381,7 @@ b Vika 2 b Ali 6 b Vika 2 b Hermes 3 b Vika 2 b Ivan 11 b Vika 2 b Harry 4 -select * from v_char as v,t2_char as t where +select * from v_char as v,t2_char as t where (v.a=t.a) and (t.a='b') and ((v.b='Vika') or (v.b='Ali')); a b max_c a b c b Vika 2 b Ivan 1 @@ -3389,13 +3389,13 @@ b Vika 2 b Ali 6 b Vika 2 b Hermes 3 b Vika 2 b Ivan 11 b Vika 2 b Harry 4 -explain select * from v_char as v,t2_char as t where +explain select * from v_char as v,t2_char as t where (v.a=t.a) and (t.a='b') and ((v.b='Vika') or (v.b='Ali')); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY <derived2> ALL NULL NULL NULL NULL 12 Using where 1 PRIMARY t ALL NULL NULL NULL NULL 12 Using where; Using join buffer (flat, BNL join) 2 DERIVED t1_char ALL NULL NULL NULL NULL 12 Using where; Using temporary; Using filesort -explain format=json select * from v_char as v,t2_char as t where +explain format=json select * from v_char as v,t2_char as t where (v.a=t.a) and (t.a='b') and ((v.b='Vika') or (v.b='Ali')); EXPLAIN { @@ -3442,10 +3442,10 @@ EXPLAIN } # using several derived tables : pushing in all tables # extracted or formula : pushing into WHERE -# conjunctive subformulas : pushing into HAVING +# conjunctive subformulas : pushing into HAVING # pushing equalities -set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,v2,v3,t2 where -((v1.a=v2.a) or (v1.a=t2.a)) and ((v3.b<50) or (v3.b=33)) +set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,v2,v3,t2 where +((v1.a=v2.a) or (v1.a=t2.a)) and ((v3.b<50) or (v3.b=33)) and (v1.max_c<500) and (v3.a=t2.a) and (v2.max_c>300); a b max_c avg_c a b max_c avg_c a b min_c a b c d 6 20 315 279.3333 6 20 315 279.3333 7 11 708 7 13 312 406 @@ -3462,8 +3462,8 @@ a b max_c avg_c a b max_c avg_c a b min_c a b c d 8 33 404 213.6667 8 33 404 213.6667 6 20 214 6 20 315 279 8 33 404 213.6667 8 33 404 213.6667 8 33 114 8 80 800 314 8 33 404 213.6667 8 33 404 213.6667 6 20 214 6 23 303 909 -select * from v1,v2,v3,t2 where -((v1.a=v2.a) or (v1.a=t2.a)) and ((v3.b<50) or (v3.b=33)) +select * from v1,v2,v3,t2 where +((v1.a=v2.a) or (v1.a=t2.a)) and ((v3.b<50) or (v3.b=33)) and (v1.max_c<500) and (v3.a=t2.a) and (v2.max_c>300); a b max_c avg_c a b max_c avg_c a b min_c a b c d 6 20 315 279.3333 6 20 315 279.3333 7 11 708 7 13 312 406 @@ -3480,8 +3480,8 @@ a b max_c avg_c a b max_c avg_c a b min_c a b c d 8 33 404 213.6667 8 33 404 213.6667 6 20 214 6 20 315 279 8 33 404 213.6667 8 33 404 213.6667 8 33 114 8 80 800 314 8 33 404 213.6667 8 33 404 213.6667 6 20 214 6 23 303 909 -explain select * from v1,v2,v3,t2 where -((v1.a=v2.a) or (v1.a=t2.a)) and ((v3.b<50) or (v3.b=33)) +explain select * from v1,v2,v3,t2 where +((v1.a=v2.a) or (v1.a=t2.a)) and ((v3.b<50) or (v3.b=33)) and (v1.max_c<500) and (v3.a=t2.a) and (v2.max_c>300); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where @@ -3491,8 +3491,8 @@ id select_type table type possible_keys key key_len ref rows Extra 4 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort 3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort 2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort -explain format=json select * from v1,v2,v3,t2 where -((v1.a=v2.a) or (v1.a=t2.a)) and ((v3.b<50) or (v3.b=33)) +explain format=json select * from v1,v2,v3,t2 where +((v1.a=v2.a) or (v1.a=t2.a)) and ((v3.b<50) or (v3.b=33)) and (v1.max_c<500) and (v3.a=t2.a) and (v2.max_c>300); EXPLAIN { @@ -3598,7 +3598,7 @@ EXPLAIN } } # using several derived tables : pushing in all tables -# conjunctive subformulas : pushing into HAVING +# conjunctive subformulas : pushing into HAVING set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 where t1.a>5 group by a,b having max_c < 707) v1, @@ -3706,7 +3706,7 @@ EXPLAIN } # using several derived tables : pushing in all tables # extracted or formulas : pushing into HAVING -# conjunctive subformula : pushing into HAVING +# conjunctive subformula : pushing into HAVING set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 where t1.a>5 group by a,b having max_c < 707) v1, @@ -3875,10 +3875,10 @@ EXPLAIN } } # extracted or formula : pushing into HAVING -# conjunctive subformula : pushing into WHERE +# conjunctive subformula : pushing into WHERE set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 -group by a,b having max_c < 707) v1, +group by a,b having max_c < 707) v1, t2 where ((v1.a=1) or (v1.max_c<300)) and (v1.b>25); a b max_c avg_c a b c d 5 27 132 132.0000 2 3 207 207 @@ -3892,7 +3892,7 @@ a b max_c avg_c a b c d 5 27 132 132.0000 6 23 303 909 select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 -group by a,b having max_c < 707) v1, +group by a,b having max_c < 707) v1, t2 where ((v1.a=1) or (v1.max_c<300)) and (v1.b>25); a b max_c avg_c a b c d 5 27 132 132.0000 2 3 207 207 @@ -3906,7 +3906,7 @@ a b max_c avg_c a b c d 5 27 132 132.0000 6 23 303 909 explain select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 -group by a,b having max_c < 707) v1, +group by a,b having max_c < 707) v1, t2 where ((v1.a=1) or (v1.max_c<300)) and (v1.b>25); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 @@ -3914,7 +3914,7 @@ id select_type table type possible_keys key key_len ref rows Extra 2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort explain format=json select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 -group by a,b having max_c < 707) v1, +group by a,b having max_c < 707) v1, t2 where ((v1.a=1) or (v1.max_c<300)) and (v1.b>25); EXPLAIN { @@ -3960,24 +3960,24 @@ EXPLAIN } } # extracted and formula : pushing into WHERE -# conjunctive subformula : pushing into HAVING +# conjunctive subformula : pushing into HAVING set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 -where t1.a>5 group by a,b having max_c < 707) v1, +where t1.a>5 group by a,b having max_c < 707) v1, t2 where (v1.a=t2.a) and (v1.max_c>300) and (v1.b<30); a b max_c avg_c a b c d 6 20 315 279.3333 6 20 315 279 6 20 315 279.3333 6 23 303 909 select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 -where t1.a>5 group by a,b having max_c < 707) v1, +where t1.a>5 group by a,b having max_c < 707) v1, t2 where (v1.a=t2.a) and (v1.max_c>300) and (v1.b<30); a b max_c avg_c a b c d 6 20 315 279.3333 6 20 315 279 6 20 315 279.3333 6 23 303 909 explain select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 -where t1.a>5 group by a,b having max_c < 707) v1, +where t1.a>5 group by a,b having max_c < 707) v1, t2 where (v1.a=t2.a) and (v1.max_c>300) and (v1.b<30); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where @@ -3985,7 +3985,7 @@ id select_type table type possible_keys key key_len ref rows Extra 2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort explain format=json select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 -where t1.a>5 group by a,b having max_c < 707) v1, +where t1.a>5 group by a,b having max_c < 707) v1, t2 where (v1.a=t2.a) and (v1.max_c>300) and (v1.b<30); EXPLAIN { @@ -4156,11 +4156,11 @@ EXPLAIN } } # using query with union -# extracted and formula : pushing into WHERE -# extracted or formula : pushing into HAVING +# extracted and formula : pushing into WHERE +# extracted or formula : pushing into HAVING # pushing equalities set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where (v1.a<5) and (v1.b=t2.b) and (v1.b=19) -union +union select * from v1,t2 where ((v1.max_c>400) or (v1.avg_c>270)) and (v1.a<t2.a); a b max_c avg_c a b c d 1 19 107 107.0000 1 19 203 107 @@ -4175,7 +4175,7 @@ a b max_c avg_c a b c d 6 20 315 279.3333 8 64 248 107 6 20 315 279.3333 8 80 800 314 select * from v1,t2 where (v1.a<5) and (v1.b=t2.b) and (v1.b=19) -union +union select * from v1,t2 where ((v1.max_c>400) or (v1.avg_c>270)) and (v1.a<t2.a); a b max_c avg_c a b c d 1 19 107 107.0000 1 19 203 107 @@ -4190,7 +4190,7 @@ a b max_c avg_c a b c d 6 20 315 279.3333 8 64 248 107 6 20 315 279.3333 8 80 800 314 explain select * from v1,t2 where (v1.a<5) and (v1.b=t2.b) and (v1.b=19) -union +union select * from v1,t2 where ((v1.max_c>400) or (v1.avg_c>270)) and (v1.a<t2.a); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where @@ -4201,7 +4201,7 @@ id select_type table type possible_keys key key_len ref rows Extra 4 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL explain format=json select * from v1,t2 where (v1.a<5) and (v1.b=t2.b) and (v1.b=19) -union +union select * from v1,t2 where ((v1.max_c>400) or (v1.avg_c>270)) and (v1.a<t2.a); EXPLAIN { @@ -4299,10 +4299,10 @@ EXPLAIN } } # using query with union -# extracted or formula : pushing into HAVING +# extracted or formula : pushing into HAVING # extracted or formula : pushing into WHERE # pushing equalities -set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where +set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where ((t2.a=v1.a) or (v1.b=t2.b)) and ((v1.a=1) or (v1.a=6)) union select * from v1,t2 where ((v1.a>3) and (v1.b>27)) or (v1.max_c>550); @@ -4322,7 +4322,7 @@ a b max_c avg_c a b c d 8 33 404 213.6667 8 80 800 314 8 33 404 213.6667 3 12 231 190 8 33 404 213.6667 6 23 303 909 -select * from v1,t2 where +select * from v1,t2 where ((t2.a=v1.a) or (v1.b=t2.b)) and ((v1.a=1) or (v1.a=6)) union select * from v1,t2 where ((v1.a>3) and (v1.b>27)) or (v1.max_c>550); @@ -4342,7 +4342,7 @@ a b max_c avg_c a b c d 8 33 404 213.6667 8 80 800 314 8 33 404 213.6667 3 12 231 190 8 33 404 213.6667 6 23 303 909 -explain select * from v1,t2 where +explain select * from v1,t2 where ((t2.a=v1.a) or (v1.b=t2.b)) and ((v1.a=1) or (v1.a=6)) union select * from v1,t2 where ((v1.a>3) and (v1.b>27)) or (v1.max_c>550); @@ -4354,7 +4354,7 @@ id select_type table type possible_keys key key_len ref rows Extra 2 UNION <derived4> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join) 4 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL -explain format=json select * from v1,t2 where +explain format=json select * from v1,t2 where ((t2.a=v1.a) or (v1.b=t2.b)) and ((v1.a=1) or (v1.a=6)) union select * from v1,t2 where ((v1.a>3) and (v1.b>27)) or (v1.max_c>550); @@ -4454,10 +4454,10 @@ EXPLAIN } } # using query with union -# extracted or formula : pushing into HAVING -# conjunctive subformulas : pushing into WHERE +# extracted or formula : pushing into HAVING +# conjunctive subformulas : pushing into WHERE # pushing equalities -set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where +set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where ((v1.a=1) and (v1.a=t2.a)) and ((v1.max_c<500) or (v1.avg_c>500)) union select * from v2,t2 where @@ -4472,7 +4472,7 @@ a b max_c avg_c a b c d 6 20 315 279.3333 1 19 203 107 8 33 404 213.6667 1 21 909 12 8 33 404 213.6667 1 19 203 107 -select * from v1,t2 where +select * from v1,t2 where ((v1.a=1) and (v1.a=t2.a)) and ((v1.max_c<500) or (v1.avg_c>500)) union select * from v2,t2 where @@ -4487,7 +4487,7 @@ a b max_c avg_c a b c d 6 20 315 279.3333 1 19 203 107 8 33 404 213.6667 1 21 909 12 8 33 404 213.6667 1 19 203 107 -explain select * from v1,t2 where +explain select * from v1,t2 where ((v1.a=1) and (v1.a=t2.a)) and ((v1.max_c<500) or (v1.avg_c>500)) union select * from v2,t2 where @@ -4506,7 +4506,7 @@ id select_type table type possible_keys key key_len ref rows Extra 3 UNION <derived6> ref key0 key0 5 test.t2.c 2 Using where 6 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort NULL UNION RESULT <union1,2,3> ALL NULL NULL NULL NULL NULL -explain format=json select * from v1,t2 where +explain format=json select * from v1,t2 where ((v1.a=1) and (v1.a=t2.a)) and ((v1.max_c<500) or (v1.avg_c>500)) union select * from v2,t2 where @@ -4760,7 +4760,7 @@ EXPLAIN } # using derived table with union # conjunctive subformula : pushing into WHERE -# extracted or formula : pushing into HAVING +# extracted or formula : pushing into HAVING set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v_union,t2 where ((v_union.a<2) or (v_union.c>800)) and (v_union.b>12); a b c a b c d @@ -4963,27 +4963,27 @@ EXPLAIN } } } -set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v_char as v,t2_char as t where +set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v_char as v,t2_char as t where (v.a=t.a) and (v.b='Vika') and (v.max_c>2); a b max_c a b c c Vika 7 c Vinny 3 c Vika 7 c Inga 9 c Vika 7 c Ivan 2 c Vika 7 c Inga 2 -select * from v_char as v,t2_char as t where +select * from v_char as v,t2_char as t where (v.a=t.a) and (v.b='Vika') and (v.max_c>2); a b max_c a b c c Vika 7 c Vinny 3 c Vika 7 c Inga 9 c Vika 7 c Ivan 2 c Vika 7 c Inga 2 -explain select * from v_char as v,t2_char as t where +explain select * from v_char as v,t2_char as t where (v.a=t.a) and (v.b='Vika') and (v.max_c>2); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t ALL NULL NULL NULL NULL 12 Using where 1 PRIMARY <derived2> ref key0 key0 2 test.t.a 2 Using where 2 DERIVED t1_char ALL NULL NULL NULL NULL 12 Using where; Using temporary; Using filesort -explain format=json select * from v_char as v,t2_char as t where +explain format=json select * from v_char as v,t2_char as t where (v.a=t.a) and (v.b='Vika') and (v.max_c>2); EXPLAIN { @@ -5033,19 +5033,19 @@ EXPLAIN # conjunctive subformula : pushing into WHERE using equalities # pushing equalities set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v_union,v1,t2 where -(v_union.a=v1.a) and (v1.a=t2.a) and (t2.a=1) +(v_union.a=v1.a) and (v1.a=t2.a) and (t2.a=1) and ((v_union.c>800) or (v1.max_c>200)); a b c a b max_c avg_c a b c d 1 19 107 1 21 500 234.6000 1 21 909 12 1 19 107 1 21 500 234.6000 1 19 203 107 select * from v_union,v1,t2 where -(v_union.a=v1.a) and (v1.a=t2.a) and (t2.a=1) +(v_union.a=v1.a) and (v1.a=t2.a) and (t2.a=1) and ((v_union.c>800) or (v1.max_c>200)); a b c a b max_c avg_c a b c d 1 19 107 1 21 500 234.6000 1 21 909 12 1 19 107 1 21 500 234.6000 1 19 203 107 explain select * from v_union,v1,t2 where -(v_union.a=v1.a) and (v1.a=t2.a) and (t2.a=1) +(v_union.a=v1.a) and (v1.a=t2.a) and (t2.a=1) and ((v_union.c>800) or (v1.max_c>200)); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where @@ -5056,7 +5056,7 @@ id select_type table type possible_keys key key_len ref rows Extra 3 UNION t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL explain format=json select * from v_union,v1,t2 where -(v_union.a=v1.a) and (v1.a=t2.a) and (t2.a=1) +(v_union.a=v1.a) and (v1.a=t2.a) and (t2.a=1) and ((v_union.c>800) or (v1.max_c>200)); EXPLAIN { @@ -5161,11 +5161,11 @@ EXPLAIN } } } -# using derived table with union -# extracted or formula : pushing into WHERE +# using derived table with union +# extracted or formula : pushing into WHERE # conjunctive subformula : pushing into HAVING # pushing equalities -set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v2_union as v,t2 where +set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v2_union as v,t2 where ((v.a=6) or (v.a=8)) and (v.c>200) and (v.a=t2.a); a b c a b c d 8 33 404.0000 8 64 248 107 @@ -5174,7 +5174,7 @@ a b c a b c d 8 33 404.0000 8 80 800 314 6 20 312.0000 6 23 303 909 6 20 214.0000 6 23 303 909 -select * from v2_union as v,t2 where +select * from v2_union as v,t2 where ((v.a=6) or (v.a=8)) and (v.c>200) and (v.a=t2.a); a b c a b c d 8 33 404.0000 8 64 248 107 @@ -5183,7 +5183,7 @@ a b c a b c d 8 33 404.0000 8 80 800 314 6 20 312.0000 6 23 303 909 6 20 214.0000 6 23 303 909 -explain select * from v2_union as v,t2 where +explain select * from v2_union as v,t2 where ((v.a=6) or (v.a=8)) and (v.c>200) and (v.a=t2.a); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where @@ -5192,7 +5192,7 @@ id select_type table type possible_keys key key_len ref rows Extra 3 UNION t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort 4 UNION t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort NULL UNION RESULT <union2,3,4> ALL NULL NULL NULL NULL NULL -explain format=json select * from v2_union as v,t2 where +explain format=json select * from v2_union as v,t2 where ((v.a=6) or (v.a=8)) and (v.c>200) and (v.a=t2.a); EXPLAIN { @@ -5543,21 +5543,21 @@ EXPLAIN } # using derived table with union of selects without aggregation # extracted the whole condition: in WHERE of both selects -set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v3_union as v,t2 where +set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v3_union as v,t2 where (v.a=t2.a) and ((v.b=19) or (v.b=21)) and ((v.c<3) or (v.c>600)); a b c a b c d 1 19 2 1 21 909 12 1 21 2 1 21 909 12 1 19 2 1 19 203 107 1 21 2 1 19 203 107 -select * from v3_union as v,t2 where +select * from v3_union as v,t2 where (v.a=t2.a) and ((v.b=19) or (v.b=21)) and ((v.c<3) or (v.c>600)); a b c a b c d 1 19 2 1 21 909 12 1 21 2 1 21 909 12 1 19 2 1 19 203 107 1 21 2 1 19 203 107 -explain select * from v3_union as v,t2 where +explain select * from v3_union as v,t2 where (v.a=t2.a) and ((v.b=19) or (v.b=21)) and ((v.c<3) or (v.c>600)); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where @@ -5565,7 +5565,7 @@ id select_type table type possible_keys key key_len ref rows Extra 2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where 3 UNION t1 ALL NULL NULL NULL NULL 20 Using where NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL -explain format=json select * from v3_union as v,t2 where +explain format=json select * from v3_union as v,t2 where (v.a=t2.a) and ((v.b=19) or (v.b=21)) and ((v.c<3) or (v.c>600)); EXPLAIN { @@ -5627,7 +5627,7 @@ EXPLAIN } } } -# using derived table with union of +# using derived table with union of # a select without aggregation and a select with aggregation # extracted conjunctive predicate: pushing in WHERE of both selects set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v4_union as v,t2 where (v.a=t2.a) and (v.b<20); @@ -5716,13 +5716,13 @@ EXPLAIN } } } -# using derived table with union of +# using derived table with union of # a select without aggregation and a select with aggregation # extracted subformula: pushing in WHERE of one select # extracted subformula: pushing in HAVING of the other select # extracted sub-subformula: pushing in WHERE of the other select # using an equality in all pushdowns -set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v4_union as v,t2 where +set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v4_union as v,t2 where (v.a=t2.a) and ((t2.a<3) or (v.b<40)) and (v.c>500); a b c a b c d 1 33 1088 1 21 909 12 @@ -5735,7 +5735,7 @@ a b c a b c d 1 21 600 1 19 203 107 1 33 888 1 19 203 107 8 33 504 8 80 800 314 -select * from v4_union as v,t2 where +select * from v4_union as v,t2 where (v.a=t2.a) and ((t2.a<3) or (v.b<40)) and (v.c>500); a b c a b c d 1 33 1088 1 21 909 12 @@ -5748,7 +5748,7 @@ a b c a b c d 1 21 600 1 19 203 107 1 33 888 1 19 203 107 8 33 504 8 80 800 314 -explain select * from v4_union as v,t2 where +explain select * from v4_union as v,t2 where (v.a=t2.a) and ((t2.a<3) or (v.b<40)) and (v.c>500); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where @@ -5756,7 +5756,7 @@ id select_type table type possible_keys key key_len ref rows Extra 2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort 3 UNION t1 ALL NULL NULL NULL NULL 20 Using where NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL -explain format=json select * from v4_union as v,t2 where +explain format=json select * from v4_union as v,t2 where (v.a=t2.a) and ((t2.a<3) or (v.b<40)) and (v.c>500); EXPLAIN { @@ -6773,7 +6773,7 @@ EXPLAIN # using several derived tables : pushing in all tables # extracted or formula : pushing into WHERE # conjunctive subformula : pushing into WHERE -# pushing equalities +# pushing equalities set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v4,v2 where (((v4.a<12) and (v4.b>13)) or (v4.a>10)) and (v4.min_c=v2.max_c) and (v4.min_c>100); @@ -6999,6 +6999,3412 @@ drop view v_union,v2_union,v3_union,v4_union; drop view v_double,v_char,v_decimal; drop table t1,t2,t1_double,t2_double,t1_char,t2_char,t1_decimal,t2_decimal; # +# MDEV-10782: condition extracted from a multiple equality +# pushed into HAVING +# +CREATE TABLE t1 (i int); +INSERT INTO t1 VALUES (1),(2); +EXPLAIN EXTENDED +SELECT * +FROM ( SELECT * FROM ( SELECT MIN(i) as f FROM t1 ) sq1 ) AS sq2 +WHERE f = 8; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <derived3> ALL NULL NULL NULL NULL 2 100.00 Using where +3 DERIVED t1 ALL NULL NULL NULL NULL 2 100.00 +Warnings: +Note 1003 /* select#1 */ select `sq1`.`f` AS `f` from (/* select#3 */ select min(`test`.`t1`.`i`) AS `f` from `test`.`t1` having `f` = 8) `sq1` where `sq1`.`f` = 8 +SELECT * +FROM ( SELECT * FROM ( SELECT MIN(i) as f FROM t1 ) sq1 ) AS sq2 +WHERE f = 8; +f +SELECT * +FROM ( SELECT * FROM ( SELECT MIN(i) as f FROM t1 ) sq1 ) AS sq2 +WHERE f = 1; +f +1 +DROP TABLE t1; +# +# MDEV-10783: pushdown into constant view +# +CREATE TABLE t1 (i int) ENGINE=MyISAM; +CREATE VIEW v AS SELECT 5; +SELECT * FROM t1 WHERE 1 IN ( SELECT * FROM v ); +i +DROP VIEW v; +DROP TABLE t1; +# +# MDEV-10785: second execution of a query with condition +# pushed into view +# +CREATE TABLE t1 (i int); +CREATE VIEW v1 AS SELECT i FROM t1 WHERE i < 5; +CREATE FUNCTION f (in1 int) RETURNS int RETURN in1; +CREATE VIEW v2 AS SELECT * FROM v1 GROUP BY i; +PREPARE stmt FROM "SELECT * FROM v2 WHERE f(0) <> 2"; +EXECUTE stmt; +i +EXECUTE stmt; +i +DROP FUNCTION f; +DROP VIEW v2,v1; +DROP TABLE t1; +# +# MDEV-10884: condition pushdown into derived specified by +# 1. unit with SELECT containing ORDER BY ... LIMIT +# 2. unit containing global ORDER BY ... LIMIT +# +create table t1(a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +select a from t1 order by a limit 5; +a +0 +1 +2 +3 +4 +set statement optimizer_switch='condition_pushdown_for_derived=off' for +select * from (select a from t1 order by a limit 5) t where t.a not in (1,2,3); +a +0 +4 +set statement optimizer_switch='condition_pushdown_for_derived=on' for +select * from (select a from t1 order by a limit 5) t where t.a not in (1,2,3); +a +0 +4 +select a from t1 where a < 4 union select a from t1 where a > 5 +order by a limit 5; +a +0 +1 +2 +3 +6 +set statement optimizer_switch='condition_pushdown_for_derived=off' for +select * from +(select a from t1 where a < 4 union select a from t1 where a > 5 +order by a limit 5) t where t.a not in (2,9); +a +0 +1 +3 +6 +set statement optimizer_switch='condition_pushdown_for_derived=on' for +select * from +(select a from t1 where a < 4 union select a from t1 where a > 5 +order by a limit 5) t where t.a not in (2,9); +a +0 +1 +3 +6 +drop table t1; +# +# MDEV-11072: pushdown of the condition obtained +# after constant row substitution +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +CREATE OR REPLACE VIEW v2 AS SELECT * FROM t2; +CREATE TABLE t3 (c INT) ENGINE=MyISAM; +CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v3 AS SELECT * FROM t3; +SELECT * FROM t1 WHERE a IN ( +SELECT b FROM v2 WHERE b < a OR b IN ( +SELECT c FROM v3 WHERE c = a +) +); +a +INSERT INTO t1 VALUES (2); +INSERT INTO t2 VALUES (3), (2); +INSERT INTO t3 VALUES (4), (1), (2), (7); +SELECT * FROM t1 WHERE a IN ( +SELECT b FROM v2 WHERE b < a OR b IN ( +SELECT c FROM v3 WHERE c = a +) +); +a +2 +EXPLAIN FORMAT=JSON +SELECT * FROM t1 WHERE a IN ( +SELECT b FROM v2 WHERE b < a OR b IN ( +SELECT c FROM v3 WHERE c = a +) +); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "const_condition": "0 or <in_optimizer>(2,<exists>(subquery#3))", + "table": { + "table_name": "t1", + "access_type": "system", + "rows": 1, + "filtered": 100 + }, + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "t2.b = 2", + "first_match": "t1" + }, + "subqueries": [ + { + "query_block": { + "select_id": 3, + "table": { + "table_name": "<derived5>", + "access_type": "index_subquery", + "possible_keys": ["key0"], + "key": "key0", + "key_length": "5", + "used_key_parts": ["c"], + "ref": ["func"], + "rows": 2, + "filtered": 100, + "materialized": { + "query_block": { + "select_id": 5, + "table": { + "table_name": "t3", + "access_type": "ALL", + "rows": 4, + "filtered": 100, + "attached_condition": "t3.c = 2" + } + } + } + } + } + } + ] + } +} +CREATE TABLE t4 (d INT, e INT) ENGINE=MyISAM; +INSERT INTO t4 VALUES (1,10),(3,11),(2,10),(2,20),(3,21); +CREATE OR REPLACE VIEW v4 AS +SELECT d, sum(e) AS s FROM t4 GROUP BY d; +set statement optimizer_switch='condition_pushdown_for_derived=off' for SELECT * FROM t1 WHERE a IN ( +SELECT b FROM v2 WHERE b < a OR b IN ( +SELECT d FROM v4 WHERE s > a +) +); +a +2 +SELECT * FROM t1 WHERE a IN ( +SELECT b FROM v2 WHERE b < a OR b IN ( +SELECT d FROM v4 WHERE s > a +) +); +a +2 +explain SELECT * FROM t1 WHERE a IN ( +SELECT b FROM v2 WHERE b < a OR b IN ( +SELECT d FROM v4 WHERE s > a +) +); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 system NULL NULL NULL NULL 1 +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where; FirstMatch(t1) +3 DEPENDENT SUBQUERY <derived5> index_subquery key0 key0 5 func 2 Using where +5 DERIVED t4 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort +explain format=json SELECT * FROM t1 WHERE a IN ( +SELECT b FROM v2 WHERE b < a OR b IN ( +SELECT d FROM v4 WHERE s > a +) +); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "const_condition": "0 or <in_optimizer>(2,<exists>(subquery#3))", + "table": { + "table_name": "t1", + "access_type": "system", + "rows": 1, + "filtered": 100 + }, + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "t2.b = 2", + "first_match": "t1" + }, + "subqueries": [ + { + "query_block": { + "select_id": 3, + "table": { + "table_name": "<derived5>", + "access_type": "index_subquery", + "possible_keys": ["key0"], + "key": "key0", + "key_length": "5", + "used_key_parts": ["d"], + "ref": ["func"], + "rows": 2, + "filtered": 100, + "materialized": { + "query_block": { + "select_id": 5, + "having_condition": "s > 2", + "filesort": { + "sort_key": "t4.d", + "temporary_table": { + "table": { + "table_name": "t4", + "access_type": "ALL", + "rows": 5, + "filtered": 100 + } + } + } + } + } + } + } + } + ] + } +} +DROP VIEW v2,v3,v4; +DROP TABLE t1,t2,t3,t4; +# +# MDEV-10800: pushdown of the condition obtained +# after constant row substitution +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1); +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (3),(4); +CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v2 AS SELECT * FROM t2; +SELECT * FROM +( SELECT * FROM t1 +WHERE EXISTS ( SELECT * FROM v2 WHERE b = a ) ) AS sq; +a +EXPLAIN FORMAT=JSON +SELECT * FROM +( SELECT * FROM t1 +WHERE EXISTS ( SELECT * FROM v2 WHERE b = a ) ) AS sq; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "const_condition": "<in_optimizer>(1,exists(subquery#3))", + "table": { + "table_name": "t1", + "access_type": "system", + "rows": 1, + "filtered": 100 + }, + "subqueries": [ + { + "query_block": { + "select_id": 3, + "table": { + "table_name": "<derived4>", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "v2.b = 1", + "materialized": { + "query_block": { + "select_id": 4, + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "t2.b = 1" + } + } + } + } + } + } + ] + } +} +DROP VIEW v2; +DROP TABLE t1,t2; +# +# MDEV-11102: condition pushdown into materialized inner table +# of outer join is not applied as not being valid +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (0),(2); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (1),(2); +CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v2 AS SELECT * FROM t2; +SELECT * FROM t1 LEFT JOIN t2 ON a = b WHERE b IS NULL; +a b +0 NULL +SELECT * FROM t1 LEFT JOIN v2 ON a = b WHERE b IS NULL; +a b +0 NULL +EXPLAIN FORMAT=JSON +SELECT * FROM t1 LEFT JOIN v2 ON a = b WHERE b IS NULL; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 2, + "filtered": 100 + }, + "table": { + "table_name": "<derived2>", + "access_type": "ref", + "possible_keys": ["key0"], + "key": "key0", + "key_length": "5", + "used_key_parts": ["b"], + "ref": ["test.t1.a"], + "rows": 2, + "filtered": 100, + "attached_condition": "trigcond(v2.b is null) and trigcond(trigcond(t1.a is not null))", + "materialized": { + "query_block": { + "select_id": 2, + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 2, + "filtered": 100 + } + } + } + } + } +} +DROP VIEW v2; +DROP TABLE t1,t2; +# +# MDEV-11103: pushdown condition with ANY subquery +# +CREATE TABLE t1 (i INT); +CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 VALUES (1),(2); +EXPLAIN FORMAT=JSON +SELECT * FROM v1 WHERE i <= ANY ( SELECT 3 ); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<derived3>", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "<nop>(v1.i <= 3)", + "materialized": { + "query_block": { + "select_id": 3, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "<nop>(t1.i <= 3)" + } + } + } + } + } +} +Warnings: +Note 1249 Select 2 was reduced during optimization +SELECT * FROM v1 WHERE i <= ANY ( SELECT 3 ); +i +1 +2 +DROP VIEW v1; +DROP TABLE t1; +# +# MDEV-11315: condition with outer reference to mergeable derived +# +CREATE TABLE t1 (pk1 INT PRIMARY KEY, a INT, b INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (10,7,1),(11,0,2); +CREATE TABLE t2 (pk2 INT PRIMARY KEY, c INT, d DATETIME) ENGINE=MyISAM; +INSERT INTO t2 VALUES +(1,4,'2008-09-27 00:34:58'), +(2,5,'2007-05-28 00:00:00'), +(3,6,'2009-07-25 09:21:20'); +CREATE VIEW v1 AS SELECT * FROM t1; +CREATE ALGORITHM=TEMPTABLE VIEW v2 AS SELECT * FROM t2; +SELECT * FROM v1 AS sq +WHERE b IN ( SELECT pk2 FROM v2 WHERE c > sq.b ) OR b = 100; +pk1 a b +10 7 1 +11 0 2 +EXPLAIN FORMAT=JSON +SELECT * FROM v1 AS sq +WHERE b IN ( SELECT pk2 FROM v2 WHERE c > sq.b ) OR b = 100; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "<in_optimizer>(t1.b,<exists>(subquery#2)) or t1.b = 100" + }, + "subqueries": [ + { + "query_block": { + "select_id": 2, + "table": { + "table_name": "<derived4>", + "access_type": "index_subquery", + "possible_keys": ["key0"], + "key": "key0", + "key_length": "4", + "used_key_parts": ["pk2"], + "ref": ["func"], + "rows": 2, + "filtered": 100, + "materialized": { + "query_block": { + "select_id": 4, + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 3, + "filtered": 100 + } + } + } + } + } + } + ] + } +} +SELECT * FROM ( SELECT * FROM t1 ) AS sq +WHERE b IN ( SELECT pk2 FROM v2 WHERE c > sq.b ) OR b = 100; +pk1 a b +10 7 1 +11 0 2 +EXPLAIN FORMAT=JSON +SELECT * FROM ( SELECT * FROM t1 ) AS sq +WHERE b IN ( SELECT pk2 FROM v2 WHERE c > sq.b ) OR b = 100; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "<in_optimizer>(t1.b,<exists>(subquery#3)) or t1.b = 100" + }, + "subqueries": [ + { + "query_block": { + "select_id": 3, + "table": { + "table_name": "<derived4>", + "access_type": "index_subquery", + "possible_keys": ["key0"], + "key": "key0", + "key_length": "4", + "used_key_parts": ["pk2"], + "ref": ["func"], + "rows": 2, + "filtered": 100, + "materialized": { + "query_block": { + "select_id": 4, + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 3, + "filtered": 100 + } + } + } + } + } + } + ] + } +} +DROP VIEW v1,v2; +DROP TABLE t1,t2; +# +# MDEV-11313: pushdown of the condition obtained +# after constant row substitution +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (50); +CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1; +SELECT ( SELECT COUNT(*) FROM v1 WHERE a = t2.b ) AS f FROM t2 GROUP BY f; +f +0 +EXPLAIN FORMAT=JSON +SELECT ( SELECT COUNT(*) FROM v1 WHERE a = t2.b ) AS f FROM t2 GROUP BY f; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t2", + "access_type": "system", + "rows": 1, + "filtered": 100 + }, + "subqueries": [ + { + "query_block": { + "select_id": 2, + "table": { + "table_name": "<derived3>", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "v1.a = 50", + "materialized": { + "query_block": { + "select_id": 3, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "t1.a = 50" + } + } + } + } + } + } + ] + } +} +CREATE TABLE t3 (a INT, b INT) ENGINE=MYISAM; +INSERT INTO t3 VALUES (1,10),(3,11),(2,10),(2,20),(3,21); +CREATE VIEW v2 AS SELECT a, sum(b) AS s FROM t3 GROUP BY a ; +SELECT ( SELECT COUNT(*) FROM v2 WHERE s < t2.b ) AS f FROM t2 GROUP BY f; +f +3 +EXPLAIN FORMAT=JSON +SELECT ( SELECT COUNT(*) FROM v2 WHERE s < t2.b ) AS f FROM t2 GROUP BY f; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t2", + "access_type": "system", + "rows": 1, + "filtered": 100 + }, + "subqueries": [ + { + "query_block": { + "select_id": 2, + "table": { + "table_name": "<derived3>", + "access_type": "ALL", + "rows": 5, + "filtered": 100, + "attached_condition": "v2.s < 50", + "materialized": { + "query_block": { + "select_id": 3, + "having_condition": "s < 50", + "filesort": { + "sort_key": "t3.a", + "temporary_table": { + "table": { + "table_name": "t3", + "access_type": "ALL", + "rows": 5, + "filtered": 100 + } + } + } + } + } + } + } + } + ] + } +} +DROP VIEW v1,v2; +DROP TABLE t1,t2,t3; +# +# MDEV-10882: pushdown of the predicate with cached value +# +CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL) ENGINE=MyISAM; +CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 VALUES (1,2),(3,4); +CREATE TABLE t2 (c INT NOT NULL) ENGINE=MyISAM; +INSERT INTO t2 VALUES (5),(6); +SELECT a, GROUP_CONCAT(b) FROM v1 +WHERE b IN ( SELECT COUNT(c) FROM t2 ) GROUP BY a; +a GROUP_CONCAT(b) +1 2 +EXPLAIN FORMAT=JSON +SELECT a, GROUP_CONCAT(b) FROM v1 +WHERE b IN ( SELECT COUNT(c) FROM t2 ) GROUP BY a; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<subquery2>", + "access_type": "system", + "rows": 1, + "filtered": 100, + "materialized": { + "unique": 1, + "query_block": { + "select_id": 2, + "table": { + "message": "Select tables optimized away" + } + } + } + }, + "read_sorted_file": { + "filesort": { + "sort_key": "v1.a", + "table": { + "table_name": "<derived3>", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "v1.b = 2", + "materialized": { + "query_block": { + "select_id": 3, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "t1.b = 2" + } + } + } + } + } + } + } +} +DROP VIEW v1; +DROP TABLE t1,t2; +# +# MDEV-10836: pushdown of the predicate with cached value +# +CREATE TABLE t (pk INT PRIMARY KEY, f INT) ENGINE=MyISAM; +CREATE ALGORITHM=TEMPTABLE VIEW v AS SELECT * FROM t; +INSERT INTO t VALUES (1,1),(3,2); +SELECT * FROM v AS v1, v AS v2 +WHERE v2.pk > v1.f AND v1.f IN ( SELECT COUNT(pk) FROM t ); +pk f pk f +3 2 3 2 +EXPLAIN FORMAT=JSON +SELECT * FROM v AS v1, v AS v2 +WHERE v2.pk > v1.f AND v1.f IN ( SELECT COUNT(pk) FROM t ); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<subquery2>", + "access_type": "system", + "rows": 1, + "filtered": 100, + "materialized": { + "unique": 1, + "query_block": { + "select_id": 2, + "table": { + "message": "Select tables optimized away" + } + } + } + }, + "table": { + "table_name": "<derived3>", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "v1.f = 2", + "materialized": { + "query_block": { + "select_id": 3, + "table": { + "table_name": "t", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "t.f = 2" + } + } + } + }, + "block-nl-join": { + "table": { + "table_name": "<derived4>", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "v2.pk > 2" + }, + "buffer_type": "flat", + "buffer_size": "256Kb", + "join_type": "BNL", + "materialized": { + "query_block": { + "select_id": 4, + "table": { + "table_name": "t", + "access_type": "range", + "possible_keys": ["PRIMARY"], + "key": "PRIMARY", + "key_length": "4", + "used_key_parts": ["pk"], + "rows": 2, + "filtered": 100, + "index_condition": "t.pk > 2" + } + } + } + } + } +} +DROP VIEW v; +DROP TABLE t; +# +# MDEV-11488: pushdown of the predicate with cached value +# +CREATE TABLE t1 (i INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(3),(2); +CREATE TABLE t2 (j INT, KEY(j)) ENGINE=MyISAM; +INSERT INTO t2 VALUES (3),(4); +SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq +WHERE i IN ( SELECT MIN(j) FROM t2 ); +i +3 +EXPLAIN FORMAT=JSON +SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq +WHERE i IN ( SELECT MIN(j) FROM t2 ); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<subquery3>", + "access_type": "system", + "rows": 1, + "filtered": 100, + "materialized": { + "unique": 1, + "query_block": { + "select_id": 3, + "table": { + "message": "Select tables optimized away" + } + } + } + }, + "table": { + "table_name": "<derived2>", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "sq.i = 3", + "materialized": { + "query_block": { + "select_id": 2, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "t1.i = 3" + } + } + } + } + } +} +UPDATE t2 SET j = 2 WHERE j = 3; +SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq +WHERE i IN ( SELECT MIN(j) FROM t2 ); +i +2 +DROP TABLE t1,t2; +CREATE TABLE t1 (i FLOAT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1.5),(3.2),(2.71); +CREATE TABLE t2 (j FLOAT, KEY(j)) ENGINE=MyISAM; +INSERT INTO t2 VALUES (3.2),(2.71); +SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq +WHERE i IN ( SELECT MIN(j) FROM t2 ); +i +2.71 +EXPLAIN FORMAT=JSON +SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq +WHERE i IN ( SELECT MIN(j) FROM t2 ); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<subquery3>", + "access_type": "system", + "rows": 1, + "filtered": 100, + "materialized": { + "unique": 1, + "query_block": { + "select_id": 3, + "table": { + "message": "Select tables optimized away" + } + } + } + }, + "table": { + "table_name": "<derived2>", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "sq.i = 2.7100000381469727", + "materialized": { + "query_block": { + "select_id": 2, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "t1.i = 2.7100000381469727" + } + } + } + } + } +} +DROP TABLE t1,t2; +CREATE TABLE t1 (i DECIMAL(10,2)) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1.5),(3.21),(2.47); +CREATE TABLE t2 (j DECIMAL(10,2), KEY(j)) ENGINE=MyISAM; +INSERT INTO t2 VALUES (3.21),(4.55); +SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq +WHERE i IN ( SELECT MIN(j) FROM t2 ); +i +3.21 +EXPLAIN FORMAT=JSON +SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq +WHERE i IN ( SELECT MIN(j) FROM t2 ); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<subquery3>", + "access_type": "system", + "rows": 1, + "filtered": 100, + "materialized": { + "unique": 1, + "query_block": { + "select_id": 3, + "table": { + "message": "Select tables optimized away" + } + } + } + }, + "table": { + "table_name": "<derived2>", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "sq.i = 3.21", + "materialized": { + "query_block": { + "select_id": 2, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "t1.i = 3.21" + } + } + } + } + } +} +DROP TABLE t1,t2; +CREATE TABLE t1 (i VARCHAR(32)) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('cc'),('aa'),('ddd'); +CREATE TABLE t2 (j VARCHAR(16), KEY(j)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('bbb'),('aa'); +SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq +WHERE i IN ( SELECT MIN(j) FROM t2 ); +i +aa +EXPLAIN FORMAT=JSON +SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq +WHERE i IN ( SELECT MIN(j) FROM t2 ); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<subquery3>", + "access_type": "system", + "rows": 1, + "filtered": 100, + "materialized": { + "unique": 1, + "query_block": { + "select_id": 3, + "table": { + "message": "Select tables optimized away" + } + } + } + }, + "table": { + "table_name": "<derived2>", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "sq.i = 'aa'", + "materialized": { + "query_block": { + "select_id": 2, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "t1.i = 'aa'" + } + } + } + } + } +} +DROP TABLE t1,t2; +CREATE TABLE t1 (i DATETIME) ENGINE=MyISAM; +INSERT INTO t1 VALUES +('2008-09-27 00:34:58'),('2007-05-28 00:00:00'), ('2009-07-25 09:21:20'); +CREATE TABLE t2 (j DATETIME, KEY(j)) ENGINE=MyISAM; +INSERT INTO t2 VALUES +('2007-05-28 00:00:00'), ('2010-08-25 00:00:00'); +SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq +WHERE i IN ( SELECT MIN(j) FROM t2 ); +i +2007-05-28 00:00:00 +EXPLAIN FORMAT=JSON +SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq +WHERE i IN ( SELECT MIN(j) FROM t2 ); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<subquery3>", + "access_type": "system", + "rows": 1, + "filtered": 100, + "materialized": { + "unique": 1, + "query_block": { + "select_id": 3, + "table": { + "message": "Select tables optimized away" + } + } + } + }, + "table": { + "table_name": "<derived2>", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "sq.i = '2007-05-28 00:00:00'", + "materialized": { + "query_block": { + "select_id": 2, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "t1.i = TIMESTAMP'2007-05-28 00:00:00'" + } + } + } + } + } +} +DROP TABLE t1,t2; +CREATE TABLE t1 (i DATE) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('2008-09-27'),('2007-05-28'), ('2009-07-25'); +CREATE TABLE t2 (j DATE, KEY(j)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('2007-05-28'), ('2010-08-25'); +SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq +WHERE i IN ( SELECT MIN(j) FROM t2 ); +i +2007-05-28 +EXPLAIN FORMAT=JSON +SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq +WHERE i IN ( SELECT MIN(j) FROM t2 ); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<subquery3>", + "access_type": "system", + "rows": 1, + "filtered": 100, + "materialized": { + "unique": 1, + "query_block": { + "select_id": 3, + "table": { + "message": "Select tables optimized away" + } + } + } + }, + "table": { + "table_name": "<derived2>", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "sq.i = '2007-05-28'", + "materialized": { + "query_block": { + "select_id": 2, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "t1.i = DATE'2007-05-28'" + } + } + } + } + } +} +DROP TABLE t1,t2; +CREATE TABLE t1 (i TIME) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('00:34:58'),('10:00:02'), ('09:21:20'); +CREATE TABLE t2 (j TIME, KEY(j)) ENGINE=MyISAM; +INSERT INTO t2 VALUES ('10:00:02'), ('11:00:10'); +SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq +WHERE i IN ( SELECT MIN(j) FROM t2 ); +i +10:00:02 +EXPLAIN FORMAT=JSON +SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq +WHERE i IN ( SELECT MIN(j) FROM t2 ); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<subquery3>", + "access_type": "system", + "rows": 1, + "filtered": 100, + "materialized": { + "unique": 1, + "query_block": { + "select_id": 3, + "table": { + "message": "Select tables optimized away" + } + } + } + }, + "table": { + "table_name": "<derived2>", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "sq.i = '10:00:02'", + "materialized": { + "query_block": { + "select_id": 2, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "t1.i = TIME'10:00:02'" + } + } + } + } + } +} +DROP TABLE t1,t2; +# +# MDEV-11593: pushdown of condition with NULLIF +# +CREATE TABLE t1 (i INT); +CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 VALUES (2), (1); +SELECT * FROM v1 WHERE NULLIF(1, i); +i +2 +EXPLAIN FORMAT=JSON +SELECT * FROM v1 WHERE NULLIF(1, i); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<derived2>", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "nullif(1,v1.i)", + "materialized": { + "query_block": { + "select_id": 2, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "nullif(1,t1.i)" + } + } + } + } + } +} +DROP VIEW v1; +DROP TABLE t1; +# +# MDEV-11608: pushdown of the predicate with cached null value +# +CREATE TABLE t1 (c VARCHAR(3)); +CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 VALUES ('foo'),('bar'); +CREATE TABLE t2 (c VARCHAR(3)); +INSERT INTO t2 VALUES ('foo'),('xyz'); +SELECT * FROM v1 WHERE v1.c IN ( SELECT MIN(c) FROM t2 WHERE 0 ); +c +EXPLAIN FORMAT=JSON +SELECT * FROM v1 WHERE v1.c IN ( SELECT MIN(c) FROM t2 WHERE 0 ); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<subquery2>", + "access_type": "system", + "rows": 1, + "filtered": 100, + "materialized": { + "unique": 1, + "query_block": { + "select_id": 2, + "table": { + "message": "Impossible WHERE" + } + } + } + }, + "table": { + "table_name": "<derived3>", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "v1.c = NULL", + "materialized": { + "query_block": { + "select_id": 3, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "t1.c = NULL" + } + } + } + } + } +} +DROP VIEW v1; +DROP TABLE t1,t2; +CREATE TABLE t1 (d DECIMAL(10,2)); +CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 VALUES (5.37),(1.1); +CREATE TABLE t2 (d DECIMAL(10,2)); +INSERT INTO t2 VALUES ('1.1'),('2.23'); +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": "<derived3>", + "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": "<derived3>", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "<cache>(<in_optimizer>(1,<exists>(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; +# +# MDEV-12373: pushdown into derived with side effects is prohibited +# +CREATE TABLE sales_documents ( +id int NOT NULL AUTO_INCREMENT, +sale_id int NULL DEFAULT NULL, +type tinyint unsigned NULL DEFAULT NULL, +data text NULL DEFAULT NULL COLLATE 'utf8_unicode_ci', +date date NULL DEFAULT NULL, +order_number int unsigned NULL DEFAULT NULL, +created_at int NULL DEFAULT NULL, +updated_at int NULL DEFAULT NULL, +generated tinyint NOT NULL DEFAULT '0', +synced_at int NOT NULL DEFAULT '0', +sum decimal(13,2) NOT NULL DEFAULT '0', +PRIMARY KEY (id) +); +INSERT INTO sales_documents +(id, sale_id, type, order_number, data, created_at, +updated_at, date, generated, synced_at, sum) +VALUES +(555, 165, 3, 5, '{}', 1486538300, 1486722835, '2017-02-17', 0, 1486538313, 2320.00), +(556, 165, 2, 3, '{}', 1486538304, 1486563125, '2017-02-08', 1, 1486538302, 2320.00), +(557, 158, 2, 2, '{}', 1486538661, 1486538661, '2017-02-08', 0, 1486538660, 2320.00), +(558, 171, 1, 3, '{}', 1486539104, 1488203405, '2017-02-08', 1, 1486539102, 23230.00), +(559, 171, 2, 5, '{}', 1486549233, 1487146010, '2017-02-08', 1, 1486549225, 37690.00), +(560, 172, 1, 1, '{}', 1486658260, 1488203409, '2017-02-09', 1, 1486658256, 40312.00), +(561, 172, 2, 1, '{}', 1486711997, 1486711997, '2017-02-10', 1, 1486711996, 40312.00), +(562, 172, 3, 1, '{}', 1486712104, 1486721395, '2017-02-10', 1, 1486712101, 40312.00), +(563, 171, 3, 2, '{}', 1486712953, 1486720244, '2017-02-10', 1, 1486712910, 23230.00), +(564, 170, 1, 2, '{}', 1486715948, 1488203410, '2017-02-10', 1, 1486715930, 28873.00), +(565, 170, 3, 3, '{}', 1486716782, 1486717426, '2017-02-10', 1, 1486716779, 61948.00), +(566, 166, 3, 4, '{}', 1486720947, 1486720947, '2017-02-10', 1, 1486720945, 4640.00), +(567, 167, 3, 5, '{}', 1486722741, 1486722783, '2017-02-26', 0, 1486722738, 14755.00), +(568, 165, 1, 4, '{}', 1486722849, 1486722849, '2017-02-10', 0, 1486722846, 2320.00), +(569, 173, 2, 2, '{}', 1486723073, 1487071275, '2017-02-10', 1, 1486723071, 14282.00), +(570, 173, 1, 4, '{}', 1486723100, 1488203412, '2017-02-10', 1, 1486723099, 14282.00), +(571, 167, 2, 4, '{}', 1486730859, 1486730859, '2017-02-10', 1, 1486730856, 18655.00), +(572, 167, 1, 5, '{}', 1486730883, 1488203412, '2017-02-10', 1, 1486730877, 18655.00), +(573, 174, 2, 51, '{}', 1486731622, 1487060259, '2017-02-10', 1, 1486731620, 7140.00), +(574, 174, 3, 5, '{}', 1486993472, 1486993472, '2017-02-13', 1, 1488216147, 28020.00), +(575, 174, 1, 6, '{}', 1486993530, 1488203412, '2017-02-13', 1, 1486993505, 7140.00), +(576, 173, 3, 6, '{}', 1487071425, 1487071425, '2017-02-14', 0, 1487071422, 14282.00), +(577, 178, 2, 6, '{}', 1487327372, 1487327372, '2017-02-17', 1, 1487327370, 12321.00), +(578, 177, 2, 7, '{}', 1487327394, 1487327394, '2017-02-17', 0, 1487327391, 4270.00), +(579, 182, 3, 6, '{}', 1487750589, 1487751693, '2017-02-22', 1, 1487751688, 4270.00), +(580, 182, 2, 7, '{}', 1487750601, 1487750663, '2017-02-22', 1, 1487750598, 4270.00), +(581, 182, 1, 7, '{}', 1487750694, 1488203412, '2017-02-22', 1, 1487750692, 4270.00), +(582, 185, 3, 7, '{}', 1487774051, 1487774051, '2017-02-22', 0, 1487774043, 8913.00), +(583, 184, 3, 7, '{}', 1487774071, 1487774235, '2017-02-22', 0, 1487774093, 3285.00), +(584, 184, 2, 8, '{}', 1487774074, 1487774074, '2017-02-22', 0, 1487774073, 3285.00), +(585, 184, 1, 8, '{}', 1487774081, 1487774081, '2017-02-22', 0, 1487774075, 3285.00), +(586, 193, 2, 8, '{}', 1487955294, 1487955318, '2017-02-24', 0, 1487955311, 4270.00), +(587, 193, 1, 8, '{}', 1487955324, 1487955324, '2017-02-24', 0, 1487955320, 4270.00), +(588, 193, 3, 7, '{}', 1487955341, 1487955341, '2017-02-24', 0, 1487955325, 4270.00), +(589, 186, 1, 8, '{}', 1487957291, 1487957464, '2017-02-24', 0, 1487957459, 6960.00), +(590, 186, 2, 8, '{}', 1487957308, 1487957468, '2017-02-24', 0, 1487957465, 6960.00), +(591, 186, 3, 7, '{}', 1487957312, 1487957473, '2017-02-24', 0, 1487957469, 6960.00), +(592, 194, 1, 8, '{}', 1488193293, 1488203412, '2017-02-27', 1, 1488193280, 2320.00), +(593, 194, 2, 8, '{}', 1488193304, 1488193304, '2017-02-27', 1, 1488193303, 2320.00), +(594, 210, 1, 9, '{}', 1488198896, 1488198896, '2017-02-27', 0, 1488198885, 4270.00), +(595, 210, 2, 12, '{}', 1488198901, 1488198901, '2017-02-27', 1, 1488532585, 4270.00), +(596, 210, 3, 10, '{}', 1488198904, 1488198904, '2017-02-27', 1, 1488532565, 4270.00), +(597, 209, 2, 9, '{}', 1488200016, 1488450772, '2017-02-27', 1, 1488450449, 4270.00), +(598, 209, 1, 9, '{}', 1488200020, 1488200063, '2017-02-27', 1, 1488200017, 4271.00), +(599, 209, 3, 7, '{}', 1488200053, 1488200053, '2017-02-27', 0, 1488200021, 4271.00), +(600, 211, 2, 10, '{}', 1488216265, 1489402027, '2017-02-27', 1, 1488216264, 2320.00), +(601, 211, 3, 7, '{}', 1488216281, 1488216281, '2017-02-27', 1, 1488216276, 2320.00), +(602, 211, 1, 10, '{}', 1488216283, 1488216283, '2017-02-27', 1, 1488216282, 2320.00), +(603, 198, 2, 11, '{}', 1488280125, 1488280125, '2017-02-28', 0, 1488280095, 4270.00), +(604, 198, 1, 11, '{}', 1488280160, 1488280160, '2017-02-28', 0, 1488280126, 4270.00), +(605, 198, 3, 8, '{}', 1488280440, 1488280440, '2017-02-28', 0, 1488280435, 4270.00), +(606, 212, 1, 12, '{}', 1488286301, 1489402168, '2017-02-28', 1, 1488286295, 13825.00), +(607, 212, 3, 8, '{}', 1488289644, 1488289690, '2017-02-28', 1, 1488289642, 25295.00), +(608, 212, 2, 13, '{}', 1488290350, 1488290431, '2017-02-28', 1, 1488290347, 13133.75), +(609, 213, 1, 11, '{}', 1488529470, 1488529470, '2017-03-03', 1, 1488529461, 5660.00), +(610, 213, 2, 11, '{}', 1488529484, 1488529484, '2017-03-03', 1, 1488529479, 5660.00), +(611, 213, 3, 9, '{}', 1488529493, 1488529493, '2017-03-03', 1, 1488529489, 5660.00), +(612, 197, 2, 13, '{}', 1489400715, 1489400715, '2017-03-13', 0, 1489398959, 4270.00), +(613, 219, 3, 11, '{}', 1490084337, 1490181958, '2017-03-21', 1, 1490084334, 73526.00), +(614, 216, 3, 11, '{}', 1490085757, 1490086717, '2017-03-21', 0, 1490085755, 5377.00); +SELECT * FROM +(SELECT @row := @row + 1 as row, a.* from ( +SELECT t.order_number +FROM sales_documents t +WHERE +t.type = 2 AND +t.date >= '2017-01-01' AND +t.date <= '2017-12-31' AND +t.order_number IS NOT NULL AND +t.generated = 1 +GROUP BY t.order_number +) a, (SELECT @row := 0) r) t +WHERE row <> order_number; +row order_number +14 51 +DROP TABLE sales_documents; +# +# MDEV-12845: pushdown from merged derived using equalities +# +create table t1 (a int); +insert into t1 values +(4), (8), (5), (3), (10), (2), (7); +create table t2 (b int, c int); +insert into t2 values +(2,1), (5,2), (2,2), (4,1), (4,3), +(5,3), (2,4), (4,6), (2,1); +create view v1 as +select b, sum(c) as s from t2 group by b; +create view v2 as +select distinct b, c from t2; +create view v3 as +select b, max(c) as m from t2 group by b; +select b +from ( select t1.a, v1.b, v1.s from t1, v1 where t1.a = v1.b ) as t +where b > 2; +b +4 +5 +explain format=json select b +from ( select t1.a, v1.b, v1.s from t1, v1 where t1.a = v1.b ) as t +where b > 2; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 7, + "filtered": 100, + "attached_condition": "t1.a > 2 and t1.a is not null" + }, + "table": { + "table_name": "<derived3>", + "access_type": "ref", + "possible_keys": ["key0"], + "key": "key0", + "key_length": "5", + "used_key_parts": ["b"], + "ref": ["test.t1.a"], + "rows": 2, + "filtered": 100, + "materialized": { + "query_block": { + "select_id": 3, + "filesort": { + "sort_key": "t2.b", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 9, + "filtered": 100, + "attached_condition": "t2.b > 2" + } + } + } + } + } + } + } +} +select a +from ( select t1.a, v1.b, v1.s from t1, v1 where t1.a = v1.b ) as t +where a > 2; +a +4 +5 +explain format=json select a +from ( select t1.a, v1.b, v1.s from t1, v1 where t1.a = v1.b ) as t +where a > 2; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 7, + "filtered": 100, + "attached_condition": "t1.a > 2 and t1.a is not null" + }, + "table": { + "table_name": "<derived3>", + "access_type": "ref", + "possible_keys": ["key0"], + "key": "key0", + "key_length": "5", + "used_key_parts": ["b"], + "ref": ["test.t1.a"], + "rows": 2, + "filtered": 100, + "materialized": { + "query_block": { + "select_id": 3, + "filesort": { + "sort_key": "t2.b", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 9, + "filtered": 100, + "attached_condition": "t2.b > 2" + } + } + } + } + } + } + } +} +select a +from ( select t1.a, v2.b, v2.c from t1, v2 where t1.a = v2.b ) as t +where a > 2; +a +4 +4 +4 +5 +5 +explain format=json select a +from ( select t1.a, v2.b, v2.c from t1, v2 where t1.a = v2.b ) as t +where a > 2; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 7, + "filtered": 100, + "attached_condition": "t1.a > 2 and t1.a is not null" + }, + "table": { + "table_name": "<derived3>", + "access_type": "ref", + "possible_keys": ["key0"], + "key": "key0", + "key_length": "5", + "used_key_parts": ["b"], + "ref": ["test.t1.a"], + "rows": 2, + "filtered": 100, + "materialized": { + "query_block": { + "select_id": 3, + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 9, + "filtered": 100, + "attached_condition": "t2.b > 2" + } + } + } + } + } + } +} +select a +from ( select t1.a, v3.b, v3.m from t1, v3 where t1.a = v3.m ) as t +where a > 2; +a +4 +3 +explain format=json select a +from ( select t1.a, v3.b, v3.m from t1, v3 where t1.a = v3.m ) as t +where a > 2; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 7, + "filtered": 100, + "attached_condition": "t1.a > 2 and t1.a is not null" + }, + "table": { + "table_name": "<derived3>", + "access_type": "ref", + "possible_keys": ["key0"], + "key": "key0", + "key_length": "5", + "used_key_parts": ["m"], + "ref": ["test.t1.a"], + "rows": 2, + "filtered": 100, + "materialized": { + "query_block": { + "select_id": 3, + "having_condition": "m > 2", + "filesort": { + "sort_key": "t2.b", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 9, + "filtered": 100 + } + } + } + } + } + } + } +} +drop view v1,v2,v3; +drop table t1,t2; +# +# MDEV-13166: pushdown from merged derived +# +CREATE TABLE t1 (i int) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); +CREATE VIEW v1 AS SELECT MAX(i) AS f FROM t1; +SELECT * FROM ( SELECT * FROM v1 ) AS sq WHERE f > 0; +f +2 +explain format=json SELECT * FROM ( SELECT * FROM v1 ) AS sq WHERE f > 0; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<derived3>", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "v1.f > 0", + "materialized": { + "query_block": { + "select_id": 3, + "having_condition": "f > 0", + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 2, + "filtered": 100 + } + } + } + } + } +} +DROP VIEW v1; +DROP TABLE t1; +# +# MDEV-13193: pushdown of equality extracted from multiple equality +# +CREATE TABLE t1 (i1 int, KEY(i1)) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); +CREATE TABLE t2 (i2 int) ENGINE=MyISAM; +INSERT INTO t2 VALUES (2),(4); +CREATE ALGORITHM=TEMPTABLE VIEW v2 AS SELECT * FROM t2; +SELECT * FROM t1, ( SELECT * FROM v2 ) AS sq +WHERE i1 = 1 AND ( i1 = i2 OR i1 = 2 ); +i1 i2 +explain format=json SELECT * FROM t1, ( SELECT * FROM v2 ) AS sq +WHERE i1 = 1 AND ( i1 = i2 OR i1 = 2 ); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t1", + "access_type": "ref", + "possible_keys": ["i1"], + "key": "i1", + "key_length": "5", + "used_key_parts": ["i1"], + "ref": ["const"], + "rows": 1, + "filtered": 100, + "using_index": true + }, + "block-nl-join": { + "table": { + "table_name": "<derived3>", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "v2.i2 = 1" + }, + "buffer_type": "flat", + "buffer_size": "256Kb", + "join_type": "BNL", + "materialized": { + "query_block": { + "select_id": 3, + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "t2.i2 = 1" + } + } + } + } + } +} +DROP VIEW v2; +DROP TABLE t1,t2; +# +# MDEV-14237: derived with regexp_substr() in select list +# +create table t1 (a char(8)); +insert into t1 values ('b'), ('a'), ('xx'); +select * +from ( select distinct regexp_substr(t1.a,'^[A-Za-z]+') as f from t1) as t +where t.f = 'a' or t.f = 'b'; +f +b +a +explain format=json select * +from ( select distinct regexp_substr(t1.a,'^[A-Za-z]+') as f from t1) as t +where t.f = 'a' or t.f = 'b'; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<derived2>", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "t.f = 'a' or t.f = 'b'", + "materialized": { + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 3, + "filtered": 100 + } + } + } + } + } + } +} +drop table t1; +# +# MDEV-13454: consequence of mdev-14368 fixed for 5.5 +# +SET sql_mode = 'ONLY_FULL_GROUP_BY'; +create table t1 (id int, id2 int); +insert into t1 values (1,1),(2,3),(3,4),(7,2); +create table t2(id2 int); +insert t2 values (1),(2),(3); +SELECT * FROM t1 +LEFT OUTER JOIN +(SELECT id2, COUNT(*) as ct FROM t2 GROUP BY id2) vc USING (id2) +WHERE (vc.ct>0); +id2 id ct +1 1 1 +3 2 1 +2 7 1 +EXPLAIN FORMAT=JSON SELECT * FROM t1 +LEFT OUTER JOIN +(SELECT id2, COUNT(*) as ct FROM t2 GROUP BY id2) vc USING (id2) +WHERE (vc.ct>0); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<derived2>", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "vc.ct > 0", + "materialized": { + "query_block": { + "select_id": 2, + "having_condition": "ct > 0", + "filesort": { + "sort_key": "t2.id2", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 3, + "filtered": 100 + } + } + } + } + } + }, + "block-nl-join": { + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 4, + "filtered": 100 + }, + "buffer_type": "flat", + "buffer_size": "256Kb", + "join_type": "BNL", + "attached_condition": "t1.id2 = vc.id2" + } + } +} +DROP TABLE t1,t2; +SET sql_mode = DEFAULT; +# +# MDEV-15579: incorrect removal of sub-formulas to be pushed +# into WHERE of materialized derived with GROUP BY +# +CREATE TABLE t1 (a INT, b INT, c INT, d INT); +CREATE TABLE t2 (x INT, y INT, z INT); +INSERT INTO t1 VALUES (1,1,66,1), (1,1,56,2), (3,2,42,3); +INSERT INTO t2 VALUES (1,1,66), (1,12,32); +SELECT * +FROM t2, +( +SELECT a, b, max(c) AS max_c +FROM t1 +GROUP BY a +HAVING max_c > 37 +) AS v1 +WHERE (v1.a=1) AND (v1.b=v1.a) AND +(v1.a=t2.x) AND (v1.max_c>30); +x y z a b max_c +1 1 66 1 1 66 +1 12 32 1 1 66 +EXPLAIN SELECT * +FROM t2, +( +SELECT a, b, max(c) AS max_c +FROM t1 +GROUP BY a +HAVING max_c > 37 +) AS v1 +WHERE (v1.a=1) AND (v1.b=v1.a) AND +(v1.a=t2.x) AND (v1.max_c>30); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3 Using where; Using join buffer (flat, BNL join) +2 DERIVED t1 ALL NULL NULL NULL NULL 3 Using where +EXPLAIN FORMAT=JSON SELECT * +FROM t2, +( +SELECT a, b, max(c) AS max_c +FROM t1 +GROUP BY a +HAVING max_c > 37 +) AS v1 +WHERE (v1.a=1) AND (v1.b=v1.a) AND +(v1.a=t2.x) AND (v1.max_c>30); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "t2.x = 1" + }, + "block-nl-join": { + "table": { + "table_name": "<derived2>", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "v1.a = 1 and v1.b = 1 and v1.max_c > 30" + }, + "buffer_type": "flat", + "buffer_size": "256Kb", + "join_type": "BNL", + "materialized": { + "query_block": { + "select_id": 2, + "having_condition": "max_c > 37 and max_c > 30 and t1.b = 1", + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "t1.a = 1" + } + } + } + } + } +} +SELECT * +FROM t2, +( +SELECT a, b, d, max(c) AS max_c +FROM t1 +GROUP BY a,d +HAVING max_c > 37 +) AS v1 +WHERE (v1.a=1) AND (v1.b=v1.a) AND (v1.b=v1.d) AND +(v1.a=t2.x) AND (v1.max_c>30); +x y z a b d max_c +1 1 66 1 1 1 66 +1 12 32 1 1 1 66 +EXPLAIN SELECT * +FROM t2, +( +SELECT a, b, d, max(c) AS max_c +FROM t1 +GROUP BY a,d +HAVING max_c > 37 +) AS v1 +WHERE (v1.a=1) AND (v1.b=v1.a) AND (v1.b=v1.d) AND +(v1.a=t2.x) AND (v1.max_c>30); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3 Using where; Using join buffer (flat, BNL join) +2 DERIVED t1 ALL NULL NULL NULL NULL 3 Using where +EXPLAIN FORMAT=JSON SELECT * +FROM t2, +( +SELECT a, b, d, max(c) AS max_c +FROM t1 +GROUP BY a,d +HAVING max_c > 37 +) AS v1 +WHERE (v1.a=1) AND (v1.b=v1.a) AND (v1.b=v1.d) AND +(v1.a=t2.x) AND (v1.max_c>30); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "t2.x = 1" + }, + "block-nl-join": { + "table": { + "table_name": "<derived2>", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "v1.a = 1 and v1.b = 1 and v1.d = 1 and v1.max_c > 30" + }, + "buffer_type": "flat", + "buffer_size": "256Kb", + "join_type": "BNL", + "materialized": { + "query_block": { + "select_id": 2, + "having_condition": "max_c > 37 and max_c > 30 and t1.b = 1", + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "t1.a = 1 and t1.d = 1" + } + } + } + } + } +} +DROP TABLE t1,t2; +# +# MDEV-15765: pushing condition with temporal constants +# into constant tables +# +select * from (select date('2018-01-01') as d +union all +select date('2018-01-01') as d) as t +where t.d between date ('2017-01-01') and date ('2019-01-01'); +d +2018-01-01 +2018-01-01 +select * from (select date('2018-01-01') as d) as t +where t.d between date ('2017-01-01') and date ('2019-01-01'); +d +2018-01-01 +# +# MDEV-16088: pushdown into derived defined in the IN subquery +# +CREATE TABLE t1 (a INT, b INT); +CREATE TABLE t2 (e INT, f INT, g INT); +INSERT INTO t1 VALUES (1,14),(2,13),(1,19),(2,32),(3,24); +INSERT INTO t2 VALUES (1,19,2),(3,24,1),(1,12,2),(3,11,3),(2,32,1); +SELECT * FROM t1 +WHERE (t1.a,t1.b) IN +( +SELECT d_tab.e,d_tab.max_f +FROM ( +SELECT t2.e, MAX(t2.f) AS max_f +FROM t2 +GROUP BY t2.e +HAVING max_f>18 +) as d_tab +WHERE d_tab.e>1 +) +; +a b +2 32 +3 24 +EXPLAIN SELECT * FROM t1 +WHERE (t1.a,t1.b) IN +( +SELECT d_tab.e,d_tab.max_f +FROM ( +SELECT t2.e, MAX(t2.f) AS max_f +FROM t2 +GROUP BY t2.e +HAVING max_f>18 +) as d_tab +WHERE d_tab.e>1 +) +; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 func,func 1 +2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 5 Using where +3 DERIVED t2 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort +EXPLAIN FORMAT=JSON SELECT * FROM t1 +WHERE (t1.a,t1.b) IN +( +SELECT d_tab.e,d_tab.max_f +FROM ( +SELECT t2.e, MAX(t2.f) AS max_f +FROM t2 +GROUP BY t2.e +HAVING max_f>18 +) as d_tab +WHERE d_tab.e>1 +) +; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 5, + "filtered": 100 + }, + "table": { + "table_name": "<subquery2>", + "access_type": "eq_ref", + "possible_keys": ["distinct_key"], + "key": "distinct_key", + "key_length": "8", + "used_key_parts": ["e", "max_f"], + "ref": ["func", "func"], + "rows": 1, + "filtered": 100, + "materialized": { + "unique": 1, + "query_block": { + "select_id": 2, + "table": { + "table_name": "<derived3>", + "access_type": "ALL", + "rows": 5, + "filtered": 100, + "attached_condition": "d_tab.e > 1", + "materialized": { + "query_block": { + "select_id": 3, + "having_condition": "max_f > 18", + "filesort": { + "sort_key": "t2.e", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 5, + "filtered": 100, + "attached_condition": "t2.e > 1" + } + } + } + } + } + } + } + } + } + } +} +SELECT * FROM t1 +WHERE (t1.a,t1.b) IN +( +SELECT d_tab.e,d_tab.max_f +FROM ( +SELECT t2.e, MAX(t2.f) AS max_f +FROM t2 +GROUP BY t2.e +HAVING max_f>18 +) as d_tab +WHERE d_tab.max_f<25 +) +; +a b +1 19 +3 24 +EXPLAIN SELECT * FROM t1 +WHERE (t1.a,t1.b) IN +( +SELECT d_tab.e,d_tab.max_f +FROM ( +SELECT t2.e, MAX(t2.f) AS max_f +FROM t2 +GROUP BY t2.e +HAVING max_f>18 +) as d_tab +WHERE d_tab.max_f<25 +) +; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 func,func 1 +2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 5 Using where +3 DERIVED t2 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort +EXPLAIN FORMAT=JSON SELECT * FROM t1 +WHERE (t1.a,t1.b) IN +( +SELECT d_tab.e,d_tab.max_f +FROM ( +SELECT t2.e, MAX(t2.f) AS max_f +FROM t2 +GROUP BY t2.e +HAVING max_f>18 +) as d_tab +WHERE d_tab.max_f<25 +) +; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 5, + "filtered": 100 + }, + "table": { + "table_name": "<subquery2>", + "access_type": "eq_ref", + "possible_keys": ["distinct_key"], + "key": "distinct_key", + "key_length": "8", + "used_key_parts": ["e", "max_f"], + "ref": ["func", "func"], + "rows": 1, + "filtered": 100, + "materialized": { + "unique": 1, + "query_block": { + "select_id": 2, + "table": { + "table_name": "<derived3>", + "access_type": "ALL", + "rows": 5, + "filtered": 100, + "attached_condition": "d_tab.max_f < 25", + "materialized": { + "query_block": { + "select_id": 3, + "having_condition": "max_f > 18 and max_f < 25", + "filesort": { + "sort_key": "t2.e", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 5, + "filtered": 100 + } + } + } + } + } + } + } + } + } + } +} +SELECT * FROM t1 +WHERE (t1.a,t1.b) IN +( +SELECT d_tab.e, MAX(d_tab.max_f) AS max_f +FROM ( +SELECT t2.e, MAX(t2.f) as max_f, t2.g +FROM t2 +GROUP BY t2.e +) as d_tab +WHERE d_tab.e>1 +GROUP BY d_tab.g +) +; +a b +2 32 +EXPLAIN SELECT * FROM t1 +WHERE (t1.a,t1.b) IN +( +SELECT d_tab.e, MAX(d_tab.max_f) AS max_f +FROM ( +SELECT t2.e, MAX(t2.f) as max_f, t2.g +FROM t2 +GROUP BY t2.e +) as d_tab +WHERE d_tab.e>1 +GROUP BY d_tab.g +) +; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 test.t1.a,test.t1.b 1 +2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 5 Using where; Using temporary +3 DERIVED t2 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort +EXPLAIN FORMAT=JSON SELECT * FROM t1 +WHERE (t1.a,t1.b) IN +( +SELECT d_tab.e, MAX(d_tab.max_f) AS max_f +FROM ( +SELECT t2.e, MAX(t2.f) as max_f, t2.g +FROM t2 +GROUP BY t2.e +) as d_tab +WHERE d_tab.e>1 +GROUP BY d_tab.g +) +; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 5, + "filtered": 100, + "attached_condition": "t1.a is not null and t1.b is not null" + }, + "table": { + "table_name": "<subquery2>", + "access_type": "eq_ref", + "possible_keys": ["distinct_key"], + "key": "distinct_key", + "key_length": "8", + "used_key_parts": ["e", "max_f"], + "ref": ["test.t1.a", "test.t1.b"], + "rows": 1, + "filtered": 100, + "materialized": { + "unique": 1, + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "<derived3>", + "access_type": "ALL", + "rows": 5, + "filtered": 100, + "attached_condition": "d_tab.e > 1", + "materialized": { + "query_block": { + "select_id": 3, + "filesort": { + "sort_key": "t2.e", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 5, + "filtered": 100, + "attached_condition": "t2.e > 1" + } + } + } + } + } + } + } + } + } + } + } +} +SELECT * FROM t1 +WHERE (t1.a,t1.b) IN +( +SELECT d_tab.e, MAX(d_tab.max_f) AS max_f +FROM ( +SELECT t2.e, MAX(t2.f) as max_f, t2.g +FROM t2 +GROUP BY t2.e +) as d_tab +WHERE d_tab.max_f>20 +GROUP BY d_tab.g +) +; +a b +2 32 +EXPLAIN SELECT * FROM t1 +WHERE (t1.a,t1.b) IN +( +SELECT d_tab.e, MAX(d_tab.max_f) AS max_f +FROM ( +SELECT t2.e, MAX(t2.f) as max_f, t2.g +FROM t2 +GROUP BY t2.e +) as d_tab +WHERE d_tab.max_f>20 +GROUP BY d_tab.g +) +; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 test.t1.a,test.t1.b 1 +2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 5 Using where; Using temporary +3 DERIVED t2 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort +EXPLAIN FORMAT=JSON SELECT * FROM t1 +WHERE (t1.a,t1.b) IN +( +SELECT d_tab.e, MAX(d_tab.max_f) AS max_f +FROM ( +SELECT t2.e, MAX(t2.f) as max_f, t2.g +FROM t2 +GROUP BY t2.e +) as d_tab +WHERE d_tab.max_f>20 +GROUP BY d_tab.g +) +; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 5, + "filtered": 100, + "attached_condition": "t1.a is not null and t1.b is not null" + }, + "table": { + "table_name": "<subquery2>", + "access_type": "eq_ref", + "possible_keys": ["distinct_key"], + "key": "distinct_key", + "key_length": "8", + "used_key_parts": ["e", "max_f"], + "ref": ["test.t1.a", "test.t1.b"], + "rows": 1, + "filtered": 100, + "materialized": { + "unique": 1, + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "<derived3>", + "access_type": "ALL", + "rows": 5, + "filtered": 100, + "attached_condition": "d_tab.max_f > 20", + "materialized": { + "query_block": { + "select_id": 3, + "having_condition": "max_f > 20", + "filesort": { + "sort_key": "t2.e", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 5, + "filtered": 100 + } + } + } + } + } + } + } + } + } + } + } +} +DROP TABLE t1,t2; +# +# MDEV-15765: pushing condition with IN subquery defined with constants +# using substitution +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2); +SELECT * FROM +( +SELECT DISTINCT * FROM t1 +) der_tab +WHERE (a>0 AND a<2 OR a IN (2,3)) AND +(a=2 OR 0); +a +2 +DROP TABLE t1; +# +# MDEV-16386: pushing condition into the HAVING clause when ambiguous +# fields warning appears +# +CREATE TABLE t1 (a INT, b INT); +INSERT INTO t1 VALUES (1,2),(2,3),(3,4); +SELECT * FROM +( +SELECT t1.b AS a +FROM t1 +GROUP BY t1.a +) dt +WHERE (dt.a=2); +a +2 +EXPLAIN FORMAT=JSON SELECT * FROM +( +SELECT t1.b AS a +FROM t1 +GROUP BY t1.a +) dt +WHERE (dt.a=2); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<derived2>", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "dt.a = 2", + "materialized": { + "query_block": { + "select_id": 2, + "having_condition": "a = 2", + "filesort": { + "sort_key": "t1.a", + "temporary_table": { + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 3, + "filtered": 100 + } + } + } + } + } + } + } +} +SELECT * FROM +( +SELECT t1.b AS a +FROM t1 +GROUP BY t1.a +HAVING (t1.a<3) +) dt +WHERE (dt.a>1); +a +2 +3 +EXPLAIN FORMAT=JSON SELECT * FROM +( +SELECT t1.b AS a +FROM t1 +GROUP BY t1.a +HAVING (t1.a<3) +) dt +WHERE (dt.a>1); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<derived2>", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "dt.a > 1", + "materialized": { + "query_block": { + "select_id": 2, + "having_condition": "t1.a < 3 and a > 1", + "filesort": { + "sort_key": "t1.a", + "temporary_table": { + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 3, + "filtered": 100 + } + } + } + } + } + } + } +} +SELECT * FROM +( +SELECT 'ab' AS a +FROM t1 +GROUP BY t1.a +) dt +WHERE (dt.a='ab'); +a +ab +ab +ab +EXPLAIN FORMAT=JSON SELECT * FROM +( +SELECT 'ab' AS a +FROM t1 +GROUP BY t1.a +) dt +WHERE (dt.a='ab'); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<derived2>", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "dt.a = 'ab'", + "materialized": { + "query_block": { + "select_id": 2, + "filesort": { + "sort_key": "t1.a", + "temporary_table": { + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 3, + "filtered": 100 + } + } + } + } + } + } + } +} +SELECT * FROM +( +SELECT 1 AS a +FROM t1 +GROUP BY t1.a +) dt +WHERE (dt.a=1); +a +1 +1 +1 +EXPLAIN FORMAT=JSON SELECT * FROM +( +SELECT 1 AS a +FROM t1 +GROUP BY t1.a +) dt +WHERE (dt.a=1); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<derived2>", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "dt.a = 1", + "materialized": { + "query_block": { + "select_id": 2, + "filesort": { + "sort_key": "t1.a", + "temporary_table": { + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 3, + "filtered": 100 + } + } + } + } + } + } + } +} +DROP TABLE t1; +# +# MDEV-16517: pushdown condition with the IN predicate defined +# with non-constant values +# +CREATE TABLE t1 (a INT, b INT); +INSERT INTO t1 VALUES (1,2),(1,3); +SELECT * FROM +( +SELECT t1.a +FROM t1 +WHERE 1 IN (0,t1.a) +GROUP BY t1.a +) AS dt1 +JOIN +( +SELECT t1.a +FROM t1 +WHERE 1 IN (0,t1.a) +) AS dt2 +ON dt1.a = dt2.a; +a a +1 1 +1 1 +EXPLAIN FORMAT=JSON SELECT * FROM +( +SELECT t1.a +FROM t1 +WHERE 1 IN (0,t1.a) +GROUP BY t1.a +) AS dt1 +JOIN +( +SELECT t1.a +FROM t1 +WHERE 1 IN (0,t1.a) +) AS dt2 +ON dt1.a = dt2.a; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<derived2>", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "1 in (0,dt1.a)", + "materialized": { + "query_block": { + "select_id": 2, + "filesort": { + "sort_key": "t1.a", + "temporary_table": { + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "1 in (0,t1.a) and 1 in (0,t1.a)" + } + } + } + } + } + }, + "block-nl-join": { + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 2, + "filtered": 100 + }, + "buffer_type": "flat", + "buffer_size": "256Kb", + "join_type": "BNL", + "attached_condition": "t1.a = dt1.a" + } + } +} +SELECT * FROM +( +SELECT t1.a,MAX(t1.b) +FROM t1 +GROUP BY t1.a +) AS dt, t1 +WHERE dt.a=t1.a AND dt.a IN (1,t1.a); +a MAX(t1.b) a b +1 3 1 2 +1 3 1 3 +EXPLAIN FORMAT=JSON SELECT * FROM +( +SELECT t1.a,MAX(t1.b) +FROM t1 +GROUP BY t1.a +) AS dt, t1 +WHERE dt.a=t1.a AND dt.a IN (1,t1.a); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<derived2>", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "dt.a in (1,dt.a)", + "materialized": { + "query_block": { + "select_id": 2, + "filesort": { + "sort_key": "t1.a", + "temporary_table": { + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "t1.a in (1,t1.a)" + } + } + } + } + } + }, + "block-nl-join": { + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 2, + "filtered": 100 + }, + "buffer_type": "flat", + "buffer_size": "256Kb", + "join_type": "BNL", + "attached_condition": "t1.a = dt.a" + } + } +} +DROP TABLE t1; +# +# MDEV-15087: error from inexpensive subquery before check +# for condition pushdown into derived +# +CREATE TABLE t1 (i1 int, v1 varchar(1)); +INSERT INTO t1 VALUES (7,'x'); +CREATE TABLE t2 (i1 int); +INSERT INTO t2 VALUES (8); +CREATE TABLE t3 (i1 int ,v1 varchar(1), v2 varchar(1)); +INSERT INTO t3 VALUES (4, 'v','v'),(62,'v','k'),(7, 'n', NULL); +SELECT 1 +FROM (t1 AS a1 +JOIN (((SELECT DISTINCT t3.* +FROM t3) AS a2 +JOIN t1 ON (t1.v1 = a2.v2))) ON (t1.v1 = a2.v1)) +WHERE (SELECT BIT_COUNT(t2.i1) +FROM (t2 JOIN t3)) IS NULL; +ERROR 21000: Subquery returns more than 1 row +DROP TABLE t1, t2, t3; +# +# MDEV-16614 signal 7 after calling stored procedure, that uses regexp +# +CREATE PROCEDURE p1(m1 varchar(5), m2 varchar(5)) +BEGIN +SELECT a FROM +(SELECT "aa" a) t +JOIN (SELECT "aa" b) t1 on t.a=t1.b +WHERE t.a regexp m1 and t1.b regexp m2 +GROUP BY a; +END$$ +CALL p1('a','a'); +a +aa +DROP PROCEDURE p1; +CREATE PROCEDURE p1(m1 varchar(5)) +BEGIN +SELECT a FROM (SELECT "aa" a) t WHERE t.a regexp m1; +END$$ +CALL p1('a'); +a +aa +DROP PROCEDURE p1; +SELECT a FROM (SELECT "aa" a) t WHERE REGEXP_INSTR(t.a, (SELECT MAX('aa') FROM DUAL LIMIT 1)); +a +aa +CREATE OR REPLACE FUNCTION f1(a VARCHAR(10), b VARCHAR(10)) RETURNS INT +BEGIN +RETURN 1; +END;$$ +CREATE OR REPLACE PROCEDURE p1(m1 varchar(5)) +BEGIN +SELECT a FROM (SELECT "aa" a) t WHERE f1(t.a, m1); +END$$ +CALL p1('a'); +a +aa +DROP PROCEDURE p1; +DROP FUNCTION f1; +CREATE OR REPLACE FUNCTION f1(a VARCHAR(10), b VARCHAR(10)) RETURNS INT +BEGIN +RETURN 1; +END;$$ +SELECT a FROM (SELECT "aa" a) t WHERE f1(t.a, (SELECT MAX('aa') FROM DUAL LIMIT 1)); +a +aa +DROP FUNCTION f1; +# +# MDEV-17011: condition pushdown into materialized derived used +# in INSERT SELECT, multi-table UPDATE and DELETE +# +CREATE TABLE t1 (a int ,b int) ENGINE=MyISAM; +INSERT INTO t1 VALUES +(1, 1), (1, 2), (2, 1), (2, 2), (3,1), (3,3), (4,2); +CREATE TABLE t2 (a int) ENGINE MYISAM; +INSERT INTO t2 VALUES +(3), (7), (1), (4), (1); +CREATE TABLE t3 (a int, b int) ENGINE MYISAM; +EXPLAIN FORMAT=JSON INSERT INTO t3 +SELECT * FROM (SELECT a, count(*) as c FROM t1 GROUP BY a) t WHERE a<=2; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<derived2>", + "access_type": "ALL", + "rows": 7, + "filtered": 100, + "attached_condition": "t.a <= 2", + "materialized": { + "query_block": { + "select_id": 2, + "filesort": { + "sort_key": "t1.a", + "temporary_table": { + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 7, + "filtered": 100, + "attached_condition": "t1.a <= 2" + } + } + } + } + } + } + } +} +INSERT INTO t3 +SELECT * FROM (SELECT a, count(*) as c FROM t1 GROUP BY a) t WHERE a<=2; +SELECT * FROM t3; +a b +1 2 +2 2 +EXPLAIN FORMAT=JSON UPDATE t2, (SELECT a, count(*) as c FROM t1 GROUP BY a) t SET t2.a=t.c+10 +WHERE t2.a= t.c and t.a>=3; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 5, + "filtered": 100, + "attached_condition": "t2.a is not null" + }, + "table": { + "table_name": "<derived2>", + "access_type": "ref", + "possible_keys": ["key0"], + "key": "key0", + "key_length": "8", + "used_key_parts": ["c"], + "ref": ["test.t2.a"], + "rows": 2, + "filtered": 100, + "attached_condition": "t2.a = t.c and t.a >= 3", + "materialized": { + "query_block": { + "select_id": 2, + "filesort": { + "sort_key": "t1.a", + "temporary_table": { + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 7, + "filtered": 100, + "attached_condition": "t1.a >= 3" + } + } + } + } + } + } + } +} +UPDATE t2, (SELECT a, count(*) as c FROM t1 GROUP BY a) t SET t2.a=t.c+10 +WHERE t2.a= t.c and t.a>=3; +SELECT * FROM t2; +a +3 +7 +11 +4 +11 +EXPLAIN FORMAT=JSON DELETE t2 FROM t2, (SELECT a, count(*) as c FROM t1 GROUP BY a) t +WHERE t2.a= t.c+9 and t.a=2; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 5, + "filtered": 100 + }, + "table": { + "table_name": "<derived2>", + "access_type": "ALL", + "rows": 7, + "filtered": 100, + "attached_condition": "t.a = 2 and t2.a = t.c + 9", + "materialized": { + "query_block": { + "select_id": 2, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 7, + "filtered": 100, + "attached_condition": "t1.a = 2" + } + } + } + } + } +} +DELETE t2 FROM t2, (SELECT a, count(*) as c FROM t1 GROUP BY a) t +WHERE t2.a= t.c+9 and t.a=2; +SELECT * FROM t2; +a +3 +7 +4 +DROP TABLE t1,t2,t3; +# +# MDEV-16765: pushdown condition with the CASE structure +# defined with Item_cond item +# +CREATE TABLE t1(a INT, b INT); +INSERT INTO t1 VALUES (1,2), (3,4), (2,3); +SELECT * +FROM +( +SELECT CASE WHEN ((tab2.max_a=1) OR (tab2.max_a=2)) +THEN 1 ELSE 0 END AS max_a,b +FROM (SELECT MAX(a) as max_a,b FROM t1 GROUP BY t1.b) AS tab2 +) AS tab1 +WHERE (tab1.max_a=1); +max_a b +1 2 +1 3 +EXPLAIN FORMAT=JSON SELECT * +FROM +( +SELECT CASE WHEN ((tab2.max_a=1) OR (tab2.max_a=2)) +THEN 1 ELSE 0 END AS max_a,b +FROM (SELECT MAX(a) as max_a,b FROM t1 GROUP BY t1.b) AS tab2 +) AS tab1 +WHERE (tab1.max_a=1); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<derived3>", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "case when (tab2.max_a = 1 or tab2.max_a = 2) then 1 else 0 end = 1", + "materialized": { + "query_block": { + "select_id": 3, + "having_condition": "case when (max_a = 1 or max_a = 2) then 1 else 0 end = 1", + "filesort": { + "sort_key": "t1.b", + "temporary_table": { + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 3, + "filtered": 100 + } + } + } + } + } + } + } +} +SELECT * +FROM +( +SELECT CASE WHEN ((tab2.max_a=1) OR ((tab2.max_a>2) AND (tab2.max_a<4))) +THEN 1 ELSE 0 END AS max_a,b +FROM (SELECT MAX(a) as max_a,b FROM t1 GROUP BY t1.b) AS tab2 +) AS tab1 +WHERE (tab1.max_a=1); +max_a b +1 2 +1 4 +EXPLAIN FORMAT=JSON SELECT * +FROM +( +SELECT CASE WHEN ((tab2.max_a=1) OR ((tab2.max_a>2) AND (tab2.max_a<4))) +THEN 1 ELSE 0 END AS max_a,b +FROM (SELECT MAX(a) as max_a,b FROM t1 GROUP BY t1.b) AS tab2 +) AS tab1 +WHERE (tab1.max_a=1); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<derived3>", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "case when (tab2.max_a = 1 or tab2.max_a > 2 and tab2.max_a < 4) then 1 else 0 end = 1", + "materialized": { + "query_block": { + "select_id": 3, + "having_condition": "case when (max_a = 1 or max_a > 2 and max_a < 4) then 1 else 0 end = 1", + "filesort": { + "sort_key": "t1.b", + "temporary_table": { + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 3, + "filtered": 100 + } + } + } + } + } + } + } +} +SELECT * +FROM +( +SELECT CASE WHEN ((tab2.max_a>1) AND ((tab2.max_a=2) OR (tab2.max_a>2))) +THEN 1 ELSE 0 END AS max_a,b +FROM (SELECT MAX(a) as max_a,b FROM t1 GROUP BY t1.b) AS tab2 +) AS tab1 +WHERE (tab1.max_a=1); +max_a b +1 3 +1 4 +EXPLAIN FORMAT=JSON SELECT * +FROM +( +SELECT CASE WHEN ((tab2.max_a>1) AND ((tab2.max_a=2) OR (tab2.max_a>2))) +THEN 1 ELSE 0 END AS max_a,b +FROM (SELECT MAX(a) as max_a,b FROM t1 GROUP BY t1.b) AS tab2 +) AS tab1 +WHERE (tab1.max_a=1); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<derived3>", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "case when (tab2.max_a > 1 and (tab2.max_a = 2 or tab2.max_a > 2)) then 1 else 0 end = 1", + "materialized": { + "query_block": { + "select_id": 3, + "having_condition": "case when (max_a > 1 and (max_a = 2 or max_a > 2)) then 1 else 0 end = 1", + "filesort": { + "sort_key": "t1.b", + "temporary_table": { + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 3, + "filtered": 100 + } + } + } + } + } + } + } +} +SELECT * +FROM +( +SELECT CASE WHEN ((tab2.b=2) OR (tab2.b=4)) +THEN 1 ELSE 0 END AS max_a,b +FROM (SELECT MAX(a) as max_a,b FROM t1 GROUP BY t1.b) AS tab2 +) AS tab1 +WHERE (tab1.max_a=1); +max_a b +1 2 +1 4 +EXPLAIN FORMAT=JSON SELECT * +FROM +( +SELECT CASE WHEN ((tab2.b=2) OR (tab2.b=4)) +THEN 1 ELSE 0 END AS max_a,b +FROM (SELECT MAX(a) as max_a,b FROM t1 GROUP BY t1.b) AS tab2 +) AS tab1 +WHERE (tab1.max_a=1); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<derived3>", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "case when (tab2.b = 2 or tab2.b = 4) then 1 else 0 end = 1", + "materialized": { + "query_block": { + "select_id": 3, + "filesort": { + "sort_key": "t1.b", + "temporary_table": { + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "case when (t1.b = 2 or t1.b = 4) then 1 else 0 end = 1" + } + } + } + } + } + } + } +} +DROP TABLE t1; +# +# MDEV-16803: pushdown condition with IN predicate in the derived table +# defined with several SELECT statements +# +CREATE TABLE t1 (a INT, b INT); +INSERT INTO t1 VALUES (1,2),(3,2),(1,1); +SELECT * FROM +( +SELECT a,b,1 as c +FROM t1 +UNION ALL +SELECT a,b,2 as c +FROM t1 +) AS tab +WHERE ((a,b) IN ((1,2),(3,2))); +a b c +1 2 1 +3 2 1 +1 2 2 +3 2 2 +DROP TABLE t1; +# +# MDEV-17354: INSERT SELECT with condition pushdown into derived +# +CREATE TABLE t1 (f INT NOT NULL); +INSERT INTO t1 VALUES (3), (7), (3); +CREATE ALGORITHM= TEMPTABLE VIEW v1 AS SELECT * FROM ( SELECT * FROM t1 ) AS sq; +INSERT INTO t1 +SELECT * FROM ( SELECT t1.f FROM v1 JOIN t1 ) AS t WHERE f IS NOT NULL; +EXPLAIN INSERT INTO t1 +SELECT * FROM ( SELECT t1.f FROM v1 JOIN t1 ) AS t WHERE f IS NOT NULL; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 144 Using where +2 DERIVED <derived4> ALL NULL NULL NULL NULL 12 +2 DERIVED t1 ALL NULL NULL NULL NULL 12 Using where; Using join buffer (flat, BNL join) +4 DERIVED t1 ALL NULL NULL NULL NULL 12 +EXPLAIN FORMAT=JSON INSERT INTO t1 +SELECT * FROM ( SELECT t1.f FROM v1 JOIN t1 ) AS t WHERE f IS NOT NULL; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<derived2>", + "access_type": "ALL", + "rows": 144, + "filtered": 100, + "attached_condition": "t.f is not null", + "materialized": { + "query_block": { + "select_id": 2, + "table": { + "table_name": "<derived4>", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "materialized": { + "query_block": { + "select_id": 4, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 12, + "filtered": 100 + } + } + } + }, + "block-nl-join": { + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t1.f is not null" + }, + "buffer_type": "flat", + "buffer_size": "256Kb", + "join_type": "BNL" + } + } + } + } + } +} +SELECT * FROM t1; +f +3 +7 +3 +3 +3 +3 +7 +7 +7 +3 +3 +3 +DELETE FROM t1; +INSERT INTO t1 VALUES (3), (7), (3); +INSERT INTO t1 +SELECT * FROM ( SELECT t1.f FROM v1 JOIN t1 ON v1.f=t1.f) AS t +WHERE f IS NOT NULL; +EXPLAIN FORMAT=JSON INSERT INTO t1 +SELECT * FROM ( SELECT t1.f FROM v1 JOIN t1 ON v1.f=t1.f) AS t +WHERE f IS NOT NULL; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "<derived2>", + "access_type": "ALL", + "rows": 16, + "filtered": 100, + "attached_condition": "t.f is not null", + "materialized": { + "query_block": { + "select_id": 2, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 8, + "filtered": 100, + "attached_condition": "t1.f is not null" + }, + "table": { + "table_name": "<derived4>", + "access_type": "ref", + "possible_keys": ["key0"], + "key": "key0", + "key_length": "4", + "used_key_parts": ["f"], + "ref": ["test.t1.f"], + "rows": 2, + "filtered": 100, + "materialized": { + "query_block": { + "select_id": 4, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 8, + "filtered": 100, + "attached_condition": "t1.f is not null" + } + } + } + } + } + } + } + } +} +SELECT * FROM t1; +f +3 +7 +3 +3 +3 +7 +3 +3 +DROP VIEW v1; +DROP TABLE t1; +# End of 10.2 tests +# # MDEV-14579: pushdown conditions into materialized views/derived tables # that are defined with EXIST or/and INTERSECT # @@ -10715,2833 +14121,7 @@ drop view v1; alter table t3 drop index i1; drop table t1,t2,t3; # -# MDEV-10782: condition extracted from a multiple equality -# pushed into HAVING -# -CREATE TABLE t1 (i int); -INSERT INTO t1 VALUES (1),(2); -EXPLAIN EXTENDED -SELECT * -FROM ( SELECT * FROM ( SELECT MIN(i) as f FROM t1 ) sq1 ) AS sq2 -WHERE f = 8; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY <derived3> ALL NULL NULL NULL NULL 2 100.00 Using where -3 DERIVED t1 ALL NULL NULL NULL NULL 2 100.00 -Warnings: -Note 1003 /* select#1 */ select `sq1`.`f` AS `f` from (/* select#3 */ select min(`test`.`t1`.`i`) AS `f` from `test`.`t1` having `f` = 8) `sq1` where `sq1`.`f` = 8 -SELECT * -FROM ( SELECT * FROM ( SELECT MIN(i) as f FROM t1 ) sq1 ) AS sq2 -WHERE f = 8; -f -SELECT * -FROM ( SELECT * FROM ( SELECT MIN(i) as f FROM t1 ) sq1 ) AS sq2 -WHERE f = 1; -f -1 -DROP TABLE t1; -# -# MDEV-10783: pushdown into constant view -# -CREATE TABLE t1 (i int) ENGINE=MyISAM; -CREATE VIEW v AS SELECT 5; -SELECT * FROM t1 WHERE 1 IN ( SELECT * FROM v ); -i -DROP VIEW v; -DROP TABLE t1; -# -# MDEV-10785: second execution of a query with condition -# pushed into view -# -CREATE TABLE t1 (i int); -CREATE VIEW v1 AS SELECT i FROM t1 WHERE i < 5; -CREATE FUNCTION f (in1 int) RETURNS int RETURN in1; -CREATE VIEW v2 AS SELECT * FROM v1 GROUP BY i; -PREPARE stmt FROM "SELECT * FROM v2 WHERE f(0) <> 2"; -EXECUTE stmt; -i -EXECUTE stmt; -i -DROP FUNCTION f; -DROP VIEW v2,v1; -DROP TABLE t1; -# -# MDEV-10884: condition pushdown into derived specified by -# 1. unit with SELECT containing ORDER BY ... LIMIT -# 2. unit containing global ORDER BY ... LIMIT -# -create table t1(a int); -insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); -select a from t1 order by a limit 5; -a -0 -1 -2 -3 -4 -set statement optimizer_switch='condition_pushdown_for_derived=off' for -select * from (select a from t1 order by a limit 5) t where t.a not in (1,2,3); -a -0 -4 -set statement optimizer_switch='condition_pushdown_for_derived=on' for -select * from (select a from t1 order by a limit 5) t where t.a not in (1,2,3); -a -0 -4 -select a from t1 where a < 4 union select a from t1 where a > 5 -order by a limit 5; -a -0 -1 -2 -3 -6 -set statement optimizer_switch='condition_pushdown_for_derived=off' for -select * from -(select a from t1 where a < 4 union select a from t1 where a > 5 -order by a limit 5) t where t.a not in (2,9); -a -0 -1 -3 -6 -set statement optimizer_switch='condition_pushdown_for_derived=on' for -select * from -(select a from t1 where a < 4 union select a from t1 where a > 5 -order by a limit 5) t where t.a not in (2,9); -a -0 -1 -3 -6 -drop table t1; -# -# MDEV-11072: pushdown of the condition obtained -# after constant row substitution -# -CREATE TABLE t1 (a INT) ENGINE=MyISAM; -CREATE TABLE t2 (b INT) ENGINE=MyISAM; -CREATE OR REPLACE VIEW v2 AS SELECT * FROM t2; -CREATE TABLE t3 (c INT) ENGINE=MyISAM; -CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v3 AS SELECT * FROM t3; -SELECT * FROM t1 WHERE a IN ( -SELECT b FROM v2 WHERE b < a OR b IN ( -SELECT c FROM v3 WHERE c = a -) -); -a -INSERT INTO t1 VALUES (2); -INSERT INTO t2 VALUES (3), (2); -INSERT INTO t3 VALUES (4), (1), (2), (7); -SELECT * FROM t1 WHERE a IN ( -SELECT b FROM v2 WHERE b < a OR b IN ( -SELECT c FROM v3 WHERE c = a -) -); -a -2 -EXPLAIN FORMAT=JSON -SELECT * FROM t1 WHERE a IN ( -SELECT b FROM v2 WHERE b < a OR b IN ( -SELECT c FROM v3 WHERE c = a -) -); -EXPLAIN -{ - "query_block": { - "select_id": 1, - "const_condition": "0 or <in_optimizer>(2,<exists>(subquery#3))", - "table": { - "table_name": "t1", - "access_type": "system", - "rows": 1, - "filtered": 100 - }, - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "t2.b = 2", - "first_match": "t1" - }, - "subqueries": [ - { - "query_block": { - "select_id": 3, - "table": { - "table_name": "<derived5>", - "access_type": "index_subquery", - "possible_keys": ["key0"], - "key": "key0", - "key_length": "5", - "used_key_parts": ["c"], - "ref": ["func"], - "rows": 2, - "filtered": 100, - "materialized": { - "query_block": { - "select_id": 5, - "table": { - "table_name": "t3", - "access_type": "ALL", - "rows": 4, - "filtered": 100, - "attached_condition": "t3.c = 2" - } - } - } - } - } - } - ] - } -} -CREATE TABLE t4 (d INT, e INT) ENGINE=MyISAM; -INSERT INTO t4 VALUES (1,10),(3,11),(2,10),(2,20),(3,21); -CREATE OR REPLACE VIEW v4 AS -SELECT d, sum(e) AS s FROM t4 GROUP BY d; -set statement optimizer_switch='condition_pushdown_for_derived=off' for SELECT * FROM t1 WHERE a IN ( -SELECT b FROM v2 WHERE b < a OR b IN ( -SELECT d FROM v4 WHERE s > a -) -); -a -2 -SELECT * FROM t1 WHERE a IN ( -SELECT b FROM v2 WHERE b < a OR b IN ( -SELECT d FROM v4 WHERE s > a -) -); -a -2 -explain SELECT * FROM t1 WHERE a IN ( -SELECT b FROM v2 WHERE b < a OR b IN ( -SELECT d FROM v4 WHERE s > a -) -); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 system NULL NULL NULL NULL 1 -1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where; FirstMatch(t1) -3 DEPENDENT SUBQUERY <derived5> index_subquery key0 key0 5 func 2 Using where -5 DERIVED t4 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort -explain format=json SELECT * FROM t1 WHERE a IN ( -SELECT b FROM v2 WHERE b < a OR b IN ( -SELECT d FROM v4 WHERE s > a -) -); -EXPLAIN -{ - "query_block": { - "select_id": 1, - "const_condition": "0 or <in_optimizer>(2,<exists>(subquery#3))", - "table": { - "table_name": "t1", - "access_type": "system", - "rows": 1, - "filtered": 100 - }, - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "t2.b = 2", - "first_match": "t1" - }, - "subqueries": [ - { - "query_block": { - "select_id": 3, - "table": { - "table_name": "<derived5>", - "access_type": "index_subquery", - "possible_keys": ["key0"], - "key": "key0", - "key_length": "5", - "used_key_parts": ["d"], - "ref": ["func"], - "rows": 2, - "filtered": 100, - "materialized": { - "query_block": { - "select_id": 5, - "having_condition": "s > 2", - "filesort": { - "sort_key": "t4.d", - "temporary_table": { - "table": { - "table_name": "t4", - "access_type": "ALL", - "rows": 5, - "filtered": 100 - } - } - } - } - } - } - } - } - ] - } -} -DROP VIEW v2,v3,v4; -DROP TABLE t1,t2,t3,t4; -# -# MDEV-10800: pushdown of the condition obtained -# after constant row substitution -# -CREATE TABLE t1 (a INT) ENGINE=MyISAM; -INSERT INTO t1 VALUES (1); -CREATE TABLE t2 (b INT) ENGINE=MyISAM; -INSERT INTO t2 VALUES (3),(4); -CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v2 AS SELECT * FROM t2; -SELECT * FROM -( SELECT * FROM t1 -WHERE EXISTS ( SELECT * FROM v2 WHERE b = a ) ) AS sq; -a -EXPLAIN FORMAT=JSON -SELECT * FROM -( SELECT * FROM t1 -WHERE EXISTS ( SELECT * FROM v2 WHERE b = a ) ) AS sq; -EXPLAIN -{ - "query_block": { - "select_id": 1, - "const_condition": "<in_optimizer>(1,exists(subquery#3))", - "table": { - "table_name": "t1", - "access_type": "system", - "rows": 1, - "filtered": 100 - }, - "subqueries": [ - { - "query_block": { - "select_id": 3, - "table": { - "table_name": "<derived4>", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "v2.b = 1", - "materialized": { - "query_block": { - "select_id": 4, - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "t2.b = 1" - } - } - } - } - } - } - ] - } -} -DROP VIEW v2; -DROP TABLE t1,t2; -# -# MDEV-11102: condition pushdown into materialized inner table -# of outer join is not applied as not being valid -# -CREATE TABLE t1 (a INT); -INSERT INTO t1 VALUES (0),(2); -CREATE TABLE t2 (b INT); -INSERT INTO t2 VALUES (1),(2); -CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v2 AS SELECT * FROM t2; -SELECT * FROM t1 LEFT JOIN t2 ON a = b WHERE b IS NULL; -a b -0 NULL -SELECT * FROM t1 LEFT JOIN v2 ON a = b WHERE b IS NULL; -a b -0 NULL -EXPLAIN FORMAT=JSON -SELECT * FROM t1 LEFT JOIN v2 ON a = b WHERE b IS NULL; -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 2, - "filtered": 100 - }, - "table": { - "table_name": "<derived2>", - "access_type": "ref", - "possible_keys": ["key0"], - "key": "key0", - "key_length": "5", - "used_key_parts": ["b"], - "ref": ["test.t1.a"], - "rows": 2, - "filtered": 100, - "attached_condition": "trigcond(v2.b is null) and trigcond(trigcond(t1.a is not null))", - "materialized": { - "query_block": { - "select_id": 2, - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 2, - "filtered": 100 - } - } - } - } - } -} -DROP VIEW v2; -DROP TABLE t1,t2; -# -# MDEV-11103: pushdown condition with ANY subquery -# -CREATE TABLE t1 (i INT); -CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1; -INSERT INTO t1 VALUES (1),(2); -EXPLAIN FORMAT=JSON -SELECT * FROM v1 WHERE i <= ANY ( SELECT 3 ); -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "<derived3>", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "<nop>(v1.i <= 3)", - "materialized": { - "query_block": { - "select_id": 3, - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "<nop>(t1.i <= 3)" - } - } - } - } - } -} -Warnings: -Note 1249 Select 2 was reduced during optimization -SELECT * FROM v1 WHERE i <= ANY ( SELECT 3 ); -i -1 -2 -DROP VIEW v1; -DROP TABLE t1; -# -# MDEV-11315: condition with outer reference to mergeable derived -# -CREATE TABLE t1 (pk1 INT PRIMARY KEY, a INT, b INT) ENGINE=MyISAM; -INSERT INTO t1 VALUES (10,7,1),(11,0,2); -CREATE TABLE t2 (pk2 INT PRIMARY KEY, c INT, d DATETIME) ENGINE=MyISAM; -INSERT INTO t2 VALUES -(1,4,'2008-09-27 00:34:58'), -(2,5,'2007-05-28 00:00:00'), -(3,6,'2009-07-25 09:21:20'); -CREATE VIEW v1 AS SELECT * FROM t1; -CREATE ALGORITHM=TEMPTABLE VIEW v2 AS SELECT * FROM t2; -SELECT * FROM v1 AS sq -WHERE b IN ( SELECT pk2 FROM v2 WHERE c > sq.b ) OR b = 100; -pk1 a b -10 7 1 -11 0 2 -EXPLAIN FORMAT=JSON -SELECT * FROM v1 AS sq -WHERE b IN ( SELECT pk2 FROM v2 WHERE c > sq.b ) OR b = 100; -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "<in_optimizer>(t1.b,<exists>(subquery#2)) or t1.b = 100" - }, - "subqueries": [ - { - "query_block": { - "select_id": 2, - "table": { - "table_name": "<derived4>", - "access_type": "index_subquery", - "possible_keys": ["key0"], - "key": "key0", - "key_length": "4", - "used_key_parts": ["pk2"], - "ref": ["func"], - "rows": 2, - "filtered": 100, - "materialized": { - "query_block": { - "select_id": 4, - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 3, - "filtered": 100 - } - } - } - } - } - } - ] - } -} -SELECT * FROM ( SELECT * FROM t1 ) AS sq -WHERE b IN ( SELECT pk2 FROM v2 WHERE c > sq.b ) OR b = 100; -pk1 a b -10 7 1 -11 0 2 -EXPLAIN FORMAT=JSON -SELECT * FROM ( SELECT * FROM t1 ) AS sq -WHERE b IN ( SELECT pk2 FROM v2 WHERE c > sq.b ) OR b = 100; -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "<in_optimizer>(t1.b,<exists>(subquery#3)) or t1.b = 100" - }, - "subqueries": [ - { - "query_block": { - "select_id": 3, - "table": { - "table_name": "<derived4>", - "access_type": "index_subquery", - "possible_keys": ["key0"], - "key": "key0", - "key_length": "4", - "used_key_parts": ["pk2"], - "ref": ["func"], - "rows": 2, - "filtered": 100, - "materialized": { - "query_block": { - "select_id": 4, - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 3, - "filtered": 100 - } - } - } - } - } - } - ] - } -} -DROP VIEW v1,v2; -DROP TABLE t1,t2; -# -# MDEV-11313: pushdown of the condition obtained -# after constant row substitution -# -CREATE TABLE t1 (a INT) ENGINE=MyISAM; -INSERT INTO t1 VALUES (1),(2); -CREATE TABLE t2 (b INT) ENGINE=MyISAM; -INSERT INTO t2 VALUES (50); -CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1; -SELECT ( SELECT COUNT(*) FROM v1 WHERE a = t2.b ) AS f FROM t2 GROUP BY f; -f -0 -EXPLAIN FORMAT=JSON -SELECT ( SELECT COUNT(*) FROM v1 WHERE a = t2.b ) AS f FROM t2 GROUP BY f; -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "t2", - "access_type": "system", - "rows": 1, - "filtered": 100 - }, - "subqueries": [ - { - "query_block": { - "select_id": 2, - "table": { - "table_name": "<derived3>", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "v1.a = 50", - "materialized": { - "query_block": { - "select_id": 3, - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "t1.a = 50" - } - } - } - } - } - } - ] - } -} -CREATE TABLE t3 (a INT, b INT) ENGINE=MYISAM; -INSERT INTO t3 VALUES (1,10),(3,11),(2,10),(2,20),(3,21); -CREATE VIEW v2 AS SELECT a, sum(b) AS s FROM t3 GROUP BY a ; -SELECT ( SELECT COUNT(*) FROM v2 WHERE s < t2.b ) AS f FROM t2 GROUP BY f; -f -3 -EXPLAIN FORMAT=JSON -SELECT ( SELECT COUNT(*) FROM v2 WHERE s < t2.b ) AS f FROM t2 GROUP BY f; -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "t2", - "access_type": "system", - "rows": 1, - "filtered": 100 - }, - "subqueries": [ - { - "query_block": { - "select_id": 2, - "table": { - "table_name": "<derived3>", - "access_type": "ALL", - "rows": 5, - "filtered": 100, - "attached_condition": "v2.s < 50", - "materialized": { - "query_block": { - "select_id": 3, - "having_condition": "s < 50", - "filesort": { - "sort_key": "t3.a", - "temporary_table": { - "table": { - "table_name": "t3", - "access_type": "ALL", - "rows": 5, - "filtered": 100 - } - } - } - } - } - } - } - } - ] - } -} -DROP VIEW v1,v2; -DROP TABLE t1,t2,t3; -# -# MDEV-10882: pushdown of the predicate with cached value -# -CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL) ENGINE=MyISAM; -CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1; -INSERT INTO t1 VALUES (1,2),(3,4); -CREATE TABLE t2 (c INT NOT NULL) ENGINE=MyISAM; -INSERT INTO t2 VALUES (5),(6); -SELECT a, GROUP_CONCAT(b) FROM v1 -WHERE b IN ( SELECT COUNT(c) FROM t2 ) GROUP BY a; -a GROUP_CONCAT(b) -1 2 -EXPLAIN FORMAT=JSON -SELECT a, GROUP_CONCAT(b) FROM v1 -WHERE b IN ( SELECT COUNT(c) FROM t2 ) GROUP BY a; -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "<subquery2>", - "access_type": "system", - "rows": 1, - "filtered": 100, - "materialized": { - "unique": 1, - "query_block": { - "select_id": 2, - "table": { - "message": "Select tables optimized away" - } - } - } - }, - "read_sorted_file": { - "filesort": { - "sort_key": "v1.a", - "table": { - "table_name": "<derived3>", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "v1.b = 2", - "materialized": { - "query_block": { - "select_id": 3, - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "t1.b = 2" - } - } - } - } - } - } - } -} -DROP VIEW v1; -DROP TABLE t1,t2; -# -# MDEV-10836: pushdown of the predicate with cached value -# -CREATE TABLE t (pk INT PRIMARY KEY, f INT) ENGINE=MyISAM; -CREATE ALGORITHM=TEMPTABLE VIEW v AS SELECT * FROM t; -INSERT INTO t VALUES (1,1),(3,2); -SELECT * FROM v AS v1, v AS v2 -WHERE v2.pk > v1.f AND v1.f IN ( SELECT COUNT(pk) FROM t ); -pk f pk f -3 2 3 2 -EXPLAIN FORMAT=JSON -SELECT * FROM v AS v1, v AS v2 -WHERE v2.pk > v1.f AND v1.f IN ( SELECT COUNT(pk) FROM t ); -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "<subquery2>", - "access_type": "system", - "rows": 1, - "filtered": 100, - "materialized": { - "unique": 1, - "query_block": { - "select_id": 2, - "table": { - "message": "Select tables optimized away" - } - } - } - }, - "table": { - "table_name": "<derived3>", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "v1.f = 2", - "materialized": { - "query_block": { - "select_id": 3, - "table": { - "table_name": "t", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "t.f = 2" - } - } - } - }, - "block-nl-join": { - "table": { - "table_name": "<derived4>", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "v2.pk > 2" - }, - "buffer_type": "flat", - "buffer_size": "256Kb", - "join_type": "BNL", - "materialized": { - "query_block": { - "select_id": 4, - "table": { - "table_name": "t", - "access_type": "range", - "possible_keys": ["PRIMARY"], - "key": "PRIMARY", - "key_length": "4", - "used_key_parts": ["pk"], - "rows": 2, - "filtered": 100, - "index_condition": "t.pk > 2" - } - } - } - } - } -} -DROP VIEW v; -DROP TABLE t; -# -# MDEV-11488: pushdown of the predicate with cached value -# -CREATE TABLE t1 (i INT) ENGINE=MyISAM; -INSERT INTO t1 VALUES (1),(3),(2); -CREATE TABLE t2 (j INT, KEY(j)) ENGINE=MyISAM; -INSERT INTO t2 VALUES (3),(4); -SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq -WHERE i IN ( SELECT MIN(j) FROM t2 ); -i -3 -EXPLAIN FORMAT=JSON -SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq -WHERE i IN ( SELECT MIN(j) FROM t2 ); -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "<subquery3>", - "access_type": "system", - "rows": 1, - "filtered": 100, - "materialized": { - "unique": 1, - "query_block": { - "select_id": 3, - "table": { - "message": "Select tables optimized away" - } - } - } - }, - "table": { - "table_name": "<derived2>", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "sq.i = 3", - "materialized": { - "query_block": { - "select_id": 2, - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "t1.i = 3" - } - } - } - } - } -} -UPDATE t2 SET j = 2 WHERE j = 3; -SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq -WHERE i IN ( SELECT MIN(j) FROM t2 ); -i -2 -DROP TABLE t1,t2; -CREATE TABLE t1 (i FLOAT) ENGINE=MyISAM; -INSERT INTO t1 VALUES (1.5),(3.2),(2.71); -CREATE TABLE t2 (j FLOAT, KEY(j)) ENGINE=MyISAM; -INSERT INTO t2 VALUES (3.2),(2.71); -SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq -WHERE i IN ( SELECT MIN(j) FROM t2 ); -i -2.71 -EXPLAIN FORMAT=JSON -SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq -WHERE i IN ( SELECT MIN(j) FROM t2 ); -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "<subquery3>", - "access_type": "system", - "rows": 1, - "filtered": 100, - "materialized": { - "unique": 1, - "query_block": { - "select_id": 3, - "table": { - "message": "Select tables optimized away" - } - } - } - }, - "table": { - "table_name": "<derived2>", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "sq.i = 2.7100000381469727", - "materialized": { - "query_block": { - "select_id": 2, - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "t1.i = 2.7100000381469727" - } - } - } - } - } -} -DROP TABLE t1,t2; -CREATE TABLE t1 (i DECIMAL(10,2)) ENGINE=MyISAM; -INSERT INTO t1 VALUES (1.5),(3.21),(2.47); -CREATE TABLE t2 (j DECIMAL(10,2), KEY(j)) ENGINE=MyISAM; -INSERT INTO t2 VALUES (3.21),(4.55); -SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq -WHERE i IN ( SELECT MIN(j) FROM t2 ); -i -3.21 -EXPLAIN FORMAT=JSON -SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq -WHERE i IN ( SELECT MIN(j) FROM t2 ); -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "<subquery3>", - "access_type": "system", - "rows": 1, - "filtered": 100, - "materialized": { - "unique": 1, - "query_block": { - "select_id": 3, - "table": { - "message": "Select tables optimized away" - } - } - } - }, - "table": { - "table_name": "<derived2>", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "sq.i = 3.21", - "materialized": { - "query_block": { - "select_id": 2, - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "t1.i = 3.21" - } - } - } - } - } -} -DROP TABLE t1,t2; -CREATE TABLE t1 (i VARCHAR(32)) ENGINE=MyISAM; -INSERT INTO t1 VALUES ('cc'),('aa'),('ddd'); -CREATE TABLE t2 (j VARCHAR(16), KEY(j)) ENGINE=MyISAM; -INSERT INTO t2 VALUES ('bbb'),('aa'); -SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq -WHERE i IN ( SELECT MIN(j) FROM t2 ); -i -aa -EXPLAIN FORMAT=JSON -SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq -WHERE i IN ( SELECT MIN(j) FROM t2 ); -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "<subquery3>", - "access_type": "system", - "rows": 1, - "filtered": 100, - "materialized": { - "unique": 1, - "query_block": { - "select_id": 3, - "table": { - "message": "Select tables optimized away" - } - } - } - }, - "table": { - "table_name": "<derived2>", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "sq.i = 'aa'", - "materialized": { - "query_block": { - "select_id": 2, - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "t1.i = 'aa'" - } - } - } - } - } -} -DROP TABLE t1,t2; -CREATE TABLE t1 (i DATETIME) ENGINE=MyISAM; -INSERT INTO t1 VALUES -('2008-09-27 00:34:58'),('2007-05-28 00:00:00'), ('2009-07-25 09:21:20'); -CREATE TABLE t2 (j DATETIME, KEY(j)) ENGINE=MyISAM; -INSERT INTO t2 VALUES -('2007-05-28 00:00:00'), ('2010-08-25 00:00:00'); -SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq -WHERE i IN ( SELECT MIN(j) FROM t2 ); -i -2007-05-28 00:00:00 -EXPLAIN FORMAT=JSON -SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq -WHERE i IN ( SELECT MIN(j) FROM t2 ); -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "<subquery3>", - "access_type": "system", - "rows": 1, - "filtered": 100, - "materialized": { - "unique": 1, - "query_block": { - "select_id": 3, - "table": { - "message": "Select tables optimized away" - } - } - } - }, - "table": { - "table_name": "<derived2>", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "sq.i = '2007-05-28 00:00:00'", - "materialized": { - "query_block": { - "select_id": 2, - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "t1.i = TIMESTAMP'2007-05-28 00:00:00'" - } - } - } - } - } -} -DROP TABLE t1,t2; -CREATE TABLE t1 (i DATE) ENGINE=MyISAM; -INSERT INTO t1 VALUES ('2008-09-27'),('2007-05-28'), ('2009-07-25'); -CREATE TABLE t2 (j DATE, KEY(j)) ENGINE=MyISAM; -INSERT INTO t2 VALUES ('2007-05-28'), ('2010-08-25'); -SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq -WHERE i IN ( SELECT MIN(j) FROM t2 ); -i -2007-05-28 -EXPLAIN FORMAT=JSON -SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq -WHERE i IN ( SELECT MIN(j) FROM t2 ); -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "<subquery3>", - "access_type": "system", - "rows": 1, - "filtered": 100, - "materialized": { - "unique": 1, - "query_block": { - "select_id": 3, - "table": { - "message": "Select tables optimized away" - } - } - } - }, - "table": { - "table_name": "<derived2>", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "sq.i = '2007-05-28'", - "materialized": { - "query_block": { - "select_id": 2, - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "t1.i = DATE'2007-05-28'" - } - } - } - } - } -} -DROP TABLE t1,t2; -CREATE TABLE t1 (i TIME) ENGINE=MyISAM; -INSERT INTO t1 VALUES ('00:34:58'),('10:00:02'), ('09:21:20'); -CREATE TABLE t2 (j TIME, KEY(j)) ENGINE=MyISAM; -INSERT INTO t2 VALUES ('10:00:02'), ('11:00:10'); -SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq -WHERE i IN ( SELECT MIN(j) FROM t2 ); -i -10:00:02 -EXPLAIN FORMAT=JSON -SELECT * FROM ( SELECT DISTINCT * FROM t1 ) AS sq -WHERE i IN ( SELECT MIN(j) FROM t2 ); -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "<subquery3>", - "access_type": "system", - "rows": 1, - "filtered": 100, - "materialized": { - "unique": 1, - "query_block": { - "select_id": 3, - "table": { - "message": "Select tables optimized away" - } - } - } - }, - "table": { - "table_name": "<derived2>", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "sq.i = '10:00:02'", - "materialized": { - "query_block": { - "select_id": 2, - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "t1.i = TIME'10:00:02'" - } - } - } - } - } -} -DROP TABLE t1,t2; -# -# MDEV-11593: pushdown of condition with NULLIF -# -CREATE TABLE t1 (i INT); -CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1; -INSERT INTO t1 VALUES (2), (1); -SELECT * FROM v1 WHERE NULLIF(1, i); -i -2 -EXPLAIN FORMAT=JSON -SELECT * FROM v1 WHERE NULLIF(1, i); -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "<derived2>", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "nullif(1,v1.i)", - "materialized": { - "query_block": { - "select_id": 2, - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "nullif(1,t1.i)" - } - } - } - } - } -} -DROP VIEW v1; -DROP TABLE t1; -# -# MDEV-11608: pushdown of the predicate with cached null value -# -CREATE TABLE t1 (c VARCHAR(3)); -CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1; -INSERT INTO t1 VALUES ('foo'),('bar'); -CREATE TABLE t2 (c VARCHAR(3)); -INSERT INTO t2 VALUES ('foo'),('xyz'); -SELECT * FROM v1 WHERE v1.c IN ( SELECT MIN(c) FROM t2 WHERE 0 ); -c -EXPLAIN FORMAT=JSON -SELECT * FROM v1 WHERE v1.c IN ( SELECT MIN(c) FROM t2 WHERE 0 ); -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "<subquery2>", - "access_type": "system", - "rows": 1, - "filtered": 100, - "materialized": { - "unique": 1, - "query_block": { - "select_id": 2, - "table": { - "message": "Impossible WHERE" - } - } - } - }, - "table": { - "table_name": "<derived3>", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "v1.c = NULL", - "materialized": { - "query_block": { - "select_id": 3, - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "t1.c = NULL" - } - } - } - } - } -} -DROP VIEW v1; -DROP TABLE t1,t2; -CREATE TABLE t1 (d DECIMAL(10,2)); -CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1; -INSERT INTO t1 VALUES (5.37),(1.1); -CREATE TABLE t2 (d DECIMAL(10,2)); -INSERT INTO t2 VALUES ('1.1'),('2.23'); -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": "<derived3>", - "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": "<derived3>", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "<cache>(<in_optimizer>(1,<exists>(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; -# -# MDEV-12373: pushdown into derived with side effects is prohibited -# -CREATE TABLE sales_documents ( -id int NOT NULL AUTO_INCREMENT, -sale_id int NULL DEFAULT NULL, -type tinyint unsigned NULL DEFAULT NULL, -data text NULL DEFAULT NULL COLLATE 'utf8_unicode_ci', -date date NULL DEFAULT NULL, -order_number int unsigned NULL DEFAULT NULL, -created_at int NULL DEFAULT NULL, -updated_at int NULL DEFAULT NULL, -generated tinyint NOT NULL DEFAULT '0', -synced_at int NOT NULL DEFAULT '0', -sum decimal(13,2) NOT NULL DEFAULT '0', -PRIMARY KEY (id) -); -INSERT INTO sales_documents -(id, sale_id, type, order_number, data, created_at, -updated_at, date, generated, synced_at, sum) -VALUES -(555, 165, 3, 5, '{}', 1486538300, 1486722835, '2017-02-17', 0, 1486538313, 2320.00), -(556, 165, 2, 3, '{}', 1486538304, 1486563125, '2017-02-08', 1, 1486538302, 2320.00), -(557, 158, 2, 2, '{}', 1486538661, 1486538661, '2017-02-08', 0, 1486538660, 2320.00), -(558, 171, 1, 3, '{}', 1486539104, 1488203405, '2017-02-08', 1, 1486539102, 23230.00), -(559, 171, 2, 5, '{}', 1486549233, 1487146010, '2017-02-08', 1, 1486549225, 37690.00), -(560, 172, 1, 1, '{}', 1486658260, 1488203409, '2017-02-09', 1, 1486658256, 40312.00), -(561, 172, 2, 1, '{}', 1486711997, 1486711997, '2017-02-10', 1, 1486711996, 40312.00), -(562, 172, 3, 1, '{}', 1486712104, 1486721395, '2017-02-10', 1, 1486712101, 40312.00), -(563, 171, 3, 2, '{}', 1486712953, 1486720244, '2017-02-10', 1, 1486712910, 23230.00), -(564, 170, 1, 2, '{}', 1486715948, 1488203410, '2017-02-10', 1, 1486715930, 28873.00), -(565, 170, 3, 3, '{}', 1486716782, 1486717426, '2017-02-10', 1, 1486716779, 61948.00), -(566, 166, 3, 4, '{}', 1486720947, 1486720947, '2017-02-10', 1, 1486720945, 4640.00), -(567, 167, 3, 5, '{}', 1486722741, 1486722783, '2017-02-26', 0, 1486722738, 14755.00), -(568, 165, 1, 4, '{}', 1486722849, 1486722849, '2017-02-10', 0, 1486722846, 2320.00), -(569, 173, 2, 2, '{}', 1486723073, 1487071275, '2017-02-10', 1, 1486723071, 14282.00), -(570, 173, 1, 4, '{}', 1486723100, 1488203412, '2017-02-10', 1, 1486723099, 14282.00), -(571, 167, 2, 4, '{}', 1486730859, 1486730859, '2017-02-10', 1, 1486730856, 18655.00), -(572, 167, 1, 5, '{}', 1486730883, 1488203412, '2017-02-10', 1, 1486730877, 18655.00), -(573, 174, 2, 51, '{}', 1486731622, 1487060259, '2017-02-10', 1, 1486731620, 7140.00), -(574, 174, 3, 5, '{}', 1486993472, 1486993472, '2017-02-13', 1, 1488216147, 28020.00), -(575, 174, 1, 6, '{}', 1486993530, 1488203412, '2017-02-13', 1, 1486993505, 7140.00), -(576, 173, 3, 6, '{}', 1487071425, 1487071425, '2017-02-14', 0, 1487071422, 14282.00), -(577, 178, 2, 6, '{}', 1487327372, 1487327372, '2017-02-17', 1, 1487327370, 12321.00), -(578, 177, 2, 7, '{}', 1487327394, 1487327394, '2017-02-17', 0, 1487327391, 4270.00), -(579, 182, 3, 6, '{}', 1487750589, 1487751693, '2017-02-22', 1, 1487751688, 4270.00), -(580, 182, 2, 7, '{}', 1487750601, 1487750663, '2017-02-22', 1, 1487750598, 4270.00), -(581, 182, 1, 7, '{}', 1487750694, 1488203412, '2017-02-22', 1, 1487750692, 4270.00), -(582, 185, 3, 7, '{}', 1487774051, 1487774051, '2017-02-22', 0, 1487774043, 8913.00), -(583, 184, 3, 7, '{}', 1487774071, 1487774235, '2017-02-22', 0, 1487774093, 3285.00), -(584, 184, 2, 8, '{}', 1487774074, 1487774074, '2017-02-22', 0, 1487774073, 3285.00), -(585, 184, 1, 8, '{}', 1487774081, 1487774081, '2017-02-22', 0, 1487774075, 3285.00), -(586, 193, 2, 8, '{}', 1487955294, 1487955318, '2017-02-24', 0, 1487955311, 4270.00), -(587, 193, 1, 8, '{}', 1487955324, 1487955324, '2017-02-24', 0, 1487955320, 4270.00), -(588, 193, 3, 7, '{}', 1487955341, 1487955341, '2017-02-24', 0, 1487955325, 4270.00), -(589, 186, 1, 8, '{}', 1487957291, 1487957464, '2017-02-24', 0, 1487957459, 6960.00), -(590, 186, 2, 8, '{}', 1487957308, 1487957468, '2017-02-24', 0, 1487957465, 6960.00), -(591, 186, 3, 7, '{}', 1487957312, 1487957473, '2017-02-24', 0, 1487957469, 6960.00), -(592, 194, 1, 8, '{}', 1488193293, 1488203412, '2017-02-27', 1, 1488193280, 2320.00), -(593, 194, 2, 8, '{}', 1488193304, 1488193304, '2017-02-27', 1, 1488193303, 2320.00), -(594, 210, 1, 9, '{}', 1488198896, 1488198896, '2017-02-27', 0, 1488198885, 4270.00), -(595, 210, 2, 12, '{}', 1488198901, 1488198901, '2017-02-27', 1, 1488532585, 4270.00), -(596, 210, 3, 10, '{}', 1488198904, 1488198904, '2017-02-27', 1, 1488532565, 4270.00), -(597, 209, 2, 9, '{}', 1488200016, 1488450772, '2017-02-27', 1, 1488450449, 4270.00), -(598, 209, 1, 9, '{}', 1488200020, 1488200063, '2017-02-27', 1, 1488200017, 4271.00), -(599, 209, 3, 7, '{}', 1488200053, 1488200053, '2017-02-27', 0, 1488200021, 4271.00), -(600, 211, 2, 10, '{}', 1488216265, 1489402027, '2017-02-27', 1, 1488216264, 2320.00), -(601, 211, 3, 7, '{}', 1488216281, 1488216281, '2017-02-27', 1, 1488216276, 2320.00), -(602, 211, 1, 10, '{}', 1488216283, 1488216283, '2017-02-27', 1, 1488216282, 2320.00), -(603, 198, 2, 11, '{}', 1488280125, 1488280125, '2017-02-28', 0, 1488280095, 4270.00), -(604, 198, 1, 11, '{}', 1488280160, 1488280160, '2017-02-28', 0, 1488280126, 4270.00), -(605, 198, 3, 8, '{}', 1488280440, 1488280440, '2017-02-28', 0, 1488280435, 4270.00), -(606, 212, 1, 12, '{}', 1488286301, 1489402168, '2017-02-28', 1, 1488286295, 13825.00), -(607, 212, 3, 8, '{}', 1488289644, 1488289690, '2017-02-28', 1, 1488289642, 25295.00), -(608, 212, 2, 13, '{}', 1488290350, 1488290431, '2017-02-28', 1, 1488290347, 13133.75), -(609, 213, 1, 11, '{}', 1488529470, 1488529470, '2017-03-03', 1, 1488529461, 5660.00), -(610, 213, 2, 11, '{}', 1488529484, 1488529484, '2017-03-03', 1, 1488529479, 5660.00), -(611, 213, 3, 9, '{}', 1488529493, 1488529493, '2017-03-03', 1, 1488529489, 5660.00), -(612, 197, 2, 13, '{}', 1489400715, 1489400715, '2017-03-13', 0, 1489398959, 4270.00), -(613, 219, 3, 11, '{}', 1490084337, 1490181958, '2017-03-21', 1, 1490084334, 73526.00), -(614, 216, 3, 11, '{}', 1490085757, 1490086717, '2017-03-21', 0, 1490085755, 5377.00); -SELECT * FROM -(SELECT @row := @row + 1 as row, a.* from ( -SELECT t.order_number -FROM sales_documents t -WHERE -t.type = 2 AND -t.date >= '2017-01-01' AND -t.date <= '2017-12-31' AND -t.order_number IS NOT NULL AND -t.generated = 1 -GROUP BY t.order_number -) a, (SELECT @row := 0) r) t -WHERE row <> order_number; -row order_number -14 51 -DROP TABLE sales_documents; -# -# MDEV-12845: pushdown from merged derived using equalities -# -create table t1 (a int); -insert into t1 values -(4), (8), (5), (3), (10), (2), (7); -create table t2 (b int, c int); -insert into t2 values -(2,1), (5,2), (2,2), (4,1), (4,3), -(5,3), (2,4), (4,6), (2,1); -create view v1 as -select b, sum(c) as s from t2 group by b; -create view v2 as -select distinct b, c from t2; -create view v3 as -select b, max(c) as m from t2 group by b; -select b -from ( select t1.a, v1.b, v1.s from t1, v1 where t1.a = v1.b ) as t -where b > 2; -b -4 -5 -explain format=json select b -from ( select t1.a, v1.b, v1.s from t1, v1 where t1.a = v1.b ) as t -where b > 2; -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 7, - "filtered": 100, - "attached_condition": "t1.a > 2 and t1.a is not null" - }, - "table": { - "table_name": "<derived3>", - "access_type": "ref", - "possible_keys": ["key0"], - "key": "key0", - "key_length": "5", - "used_key_parts": ["b"], - "ref": ["test.t1.a"], - "rows": 2, - "filtered": 100, - "materialized": { - "query_block": { - "select_id": 3, - "filesort": { - "sort_key": "t2.b", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 9, - "filtered": 100, - "attached_condition": "t2.b > 2" - } - } - } - } - } - } - } -} -select a -from ( select t1.a, v1.b, v1.s from t1, v1 where t1.a = v1.b ) as t -where a > 2; -a -4 -5 -explain format=json select a -from ( select t1.a, v1.b, v1.s from t1, v1 where t1.a = v1.b ) as t -where a > 2; -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 7, - "filtered": 100, - "attached_condition": "t1.a > 2 and t1.a is not null" - }, - "table": { - "table_name": "<derived3>", - "access_type": "ref", - "possible_keys": ["key0"], - "key": "key0", - "key_length": "5", - "used_key_parts": ["b"], - "ref": ["test.t1.a"], - "rows": 2, - "filtered": 100, - "materialized": { - "query_block": { - "select_id": 3, - "filesort": { - "sort_key": "t2.b", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 9, - "filtered": 100, - "attached_condition": "t2.b > 2" - } - } - } - } - } - } - } -} -select a -from ( select t1.a, v2.b, v2.c from t1, v2 where t1.a = v2.b ) as t -where a > 2; -a -4 -4 -4 -5 -5 -explain format=json select a -from ( select t1.a, v2.b, v2.c from t1, v2 where t1.a = v2.b ) as t -where a > 2; -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 7, - "filtered": 100, - "attached_condition": "t1.a > 2 and t1.a is not null" - }, - "table": { - "table_name": "<derived3>", - "access_type": "ref", - "possible_keys": ["key0"], - "key": "key0", - "key_length": "5", - "used_key_parts": ["b"], - "ref": ["test.t1.a"], - "rows": 2, - "filtered": 100, - "materialized": { - "query_block": { - "select_id": 3, - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 9, - "filtered": 100, - "attached_condition": "t2.b > 2" - } - } - } - } - } - } -} -select a -from ( select t1.a, v3.b, v3.m from t1, v3 where t1.a = v3.m ) as t -where a > 2; -a -4 -3 -explain format=json select a -from ( select t1.a, v3.b, v3.m from t1, v3 where t1.a = v3.m ) as t -where a > 2; -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 7, - "filtered": 100, - "attached_condition": "t1.a > 2 and t1.a is not null" - }, - "table": { - "table_name": "<derived3>", - "access_type": "ref", - "possible_keys": ["key0"], - "key": "key0", - "key_length": "5", - "used_key_parts": ["m"], - "ref": ["test.t1.a"], - "rows": 2, - "filtered": 100, - "materialized": { - "query_block": { - "select_id": 3, - "having_condition": "m > 2", - "filesort": { - "sort_key": "t2.b", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 9, - "filtered": 100 - } - } - } - } - } - } - } -} -drop view v1,v2,v3; -drop table t1,t2; -# -# MDEV-13166: pushdown from merged derived -# -CREATE TABLE t1 (i int) ENGINE=MyISAM; -INSERT INTO t1 VALUES (1),(2); -CREATE VIEW v1 AS SELECT MAX(i) AS f FROM t1; -SELECT * FROM ( SELECT * FROM v1 ) AS sq WHERE f > 0; -f -2 -explain format=json SELECT * FROM ( SELECT * FROM v1 ) AS sq WHERE f > 0; -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "<derived3>", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "v1.f > 0", - "materialized": { - "query_block": { - "select_id": 3, - "having_condition": "f > 0", - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 2, - "filtered": 100 - } - } - } - } - } -} -DROP VIEW v1; -DROP TABLE t1; -# -# MDEV-13193: pushdown of equality extracted from multiple equality -# -CREATE TABLE t1 (i1 int, KEY(i1)) ENGINE=MyISAM; -INSERT INTO t1 VALUES (1),(2); -CREATE TABLE t2 (i2 int) ENGINE=MyISAM; -INSERT INTO t2 VALUES (2),(4); -CREATE ALGORITHM=TEMPTABLE VIEW v2 AS SELECT * FROM t2; -SELECT * FROM t1, ( SELECT * FROM v2 ) AS sq -WHERE i1 = 1 AND ( i1 = i2 OR i1 = 2 ); -i1 i2 -explain format=json SELECT * FROM t1, ( SELECT * FROM v2 ) AS sq -WHERE i1 = 1 AND ( i1 = i2 OR i1 = 2 ); -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "t1", - "access_type": "ref", - "possible_keys": ["i1"], - "key": "i1", - "key_length": "5", - "used_key_parts": ["i1"], - "ref": ["const"], - "rows": 1, - "filtered": 100, - "using_index": true - }, - "block-nl-join": { - "table": { - "table_name": "<derived3>", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "v2.i2 = 1" - }, - "buffer_type": "flat", - "buffer_size": "256Kb", - "join_type": "BNL", - "materialized": { - "query_block": { - "select_id": 3, - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "t2.i2 = 1" - } - } - } - } - } -} -DROP VIEW v2; -DROP TABLE t1,t2; -# -# MDEV-14237: derived with regexp_substr() in select list -# -create table t1 (a char(8)); -insert into t1 values ('b'), ('a'), ('xx'); -select * -from ( select distinct regexp_substr(t1.a,'^[A-Za-z]+') as f from t1) as t -where t.f = 'a' or t.f = 'b'; -f -b -a -explain format=json select * -from ( select distinct regexp_substr(t1.a,'^[A-Za-z]+') as f from t1) as t -where t.f = 'a' or t.f = 'b'; -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "<derived2>", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "t.f = 'a' or t.f = 'b'", - "materialized": { - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 3, - "filtered": 100 - } - } - } - } - } - } -} -drop table t1; -# -# MDEV-13454: consequence of mdev-14368 fixed for 5.5 -# -SET sql_mode = 'ONLY_FULL_GROUP_BY'; -create table t1 (id int, id2 int); -insert into t1 values (1,1),(2,3),(3,4),(7,2); -create table t2(id2 int); -insert t2 values (1),(2),(3); -SELECT * FROM t1 -LEFT OUTER JOIN -(SELECT id2, COUNT(*) as ct FROM t2 GROUP BY id2) vc USING (id2) -WHERE (vc.ct>0); -id2 id ct -1 1 1 -3 2 1 -2 7 1 -EXPLAIN FORMAT=JSON SELECT * FROM t1 -LEFT OUTER JOIN -(SELECT id2, COUNT(*) as ct FROM t2 GROUP BY id2) vc USING (id2) -WHERE (vc.ct>0); -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "<derived2>", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "vc.ct > 0", - "materialized": { - "query_block": { - "select_id": 2, - "having_condition": "ct > 0", - "filesort": { - "sort_key": "t2.id2", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 3, - "filtered": 100 - } - } - } - } - } - }, - "block-nl-join": { - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 4, - "filtered": 100 - }, - "buffer_type": "flat", - "buffer_size": "256Kb", - "join_type": "BNL", - "attached_condition": "t1.id2 = vc.id2" - } - } -} -DROP TABLE t1,t2; -SET sql_mode = DEFAULT; -# -# MDEV-15579: incorrect removal of sub-formulas to be pushed -# into WHERE of materialized derived with GROUP BY -# -CREATE TABLE t1 (a INT, b INT, c INT, d INT); -CREATE TABLE t2 (x INT, y INT, z INT); -INSERT INTO t1 VALUES (1,1,66,1), (1,1,56,2), (3,2,42,3); -INSERT INTO t2 VALUES (1,1,66), (1,12,32); -SELECT * -FROM t2, -( -SELECT a, b, max(c) AS max_c -FROM t1 -GROUP BY a -HAVING max_c > 37 -) AS v1 -WHERE (v1.a=1) AND (v1.b=v1.a) AND -(v1.a=t2.x) AND (v1.max_c>30); -x y z a b max_c -1 1 66 1 1 66 -1 12 32 1 1 66 -EXPLAIN SELECT * -FROM t2, -( -SELECT a, b, max(c) AS max_c -FROM t1 -GROUP BY a -HAVING max_c > 37 -) AS v1 -WHERE (v1.a=1) AND (v1.b=v1.a) AND -(v1.a=t2.x) AND (v1.max_c>30); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3 Using where; Using join buffer (flat, BNL join) -2 DERIVED t1 ALL NULL NULL NULL NULL 3 Using where -EXPLAIN FORMAT=JSON SELECT * -FROM t2, -( -SELECT a, b, max(c) AS max_c -FROM t1 -GROUP BY a -HAVING max_c > 37 -) AS v1 -WHERE (v1.a=1) AND (v1.b=v1.a) AND -(v1.a=t2.x) AND (v1.max_c>30); -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "t2.x = 1" - }, - "block-nl-join": { - "table": { - "table_name": "<derived2>", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "v1.a = 1 and v1.b = 1 and v1.max_c > 30" - }, - "buffer_type": "flat", - "buffer_size": "256Kb", - "join_type": "BNL", - "materialized": { - "query_block": { - "select_id": 2, - "having_condition": "max_c > 37 and max_c > 30 and t1.b = 1", - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "t1.a = 1" - } - } - } - } - } -} -SELECT * -FROM t2, -( -SELECT a, b, d, max(c) AS max_c -FROM t1 -GROUP BY a,d -HAVING max_c > 37 -) AS v1 -WHERE (v1.a=1) AND (v1.b=v1.a) AND (v1.b=v1.d) AND -(v1.a=t2.x) AND (v1.max_c>30); -x y z a b d max_c -1 1 66 1 1 1 66 -1 12 32 1 1 1 66 -EXPLAIN SELECT * -FROM t2, -( -SELECT a, b, d, max(c) AS max_c -FROM t1 -GROUP BY a,d -HAVING max_c > 37 -) AS v1 -WHERE (v1.a=1) AND (v1.b=v1.a) AND (v1.b=v1.d) AND -(v1.a=t2.x) AND (v1.max_c>30); -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where -1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3 Using where; Using join buffer (flat, BNL join) -2 DERIVED t1 ALL NULL NULL NULL NULL 3 Using where -EXPLAIN FORMAT=JSON SELECT * -FROM t2, -( -SELECT a, b, d, max(c) AS max_c -FROM t1 -GROUP BY a,d -HAVING max_c > 37 -) AS v1 -WHERE (v1.a=1) AND (v1.b=v1.a) AND (v1.b=v1.d) AND -(v1.a=t2.x) AND (v1.max_c>30); -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "t2.x = 1" - }, - "block-nl-join": { - "table": { - "table_name": "<derived2>", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "v1.a = 1 and v1.b = 1 and v1.d = 1 and v1.max_c > 30" - }, - "buffer_type": "flat", - "buffer_size": "256Kb", - "join_type": "BNL", - "materialized": { - "query_block": { - "select_id": 2, - "having_condition": "max_c > 37 and max_c > 30 and t1.b = 1", - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "t1.a = 1 and t1.d = 1" - } - } - } - } - } -} -DROP TABLE t1,t2; -# -# MDEV-15765: pushing condition with temporal constants -# into constant tables -# -select * from (select date('2018-01-01') as d -union all -select date('2018-01-01') as d) as t -where t.d between date ('2017-01-01') and date ('2019-01-01'); -d -2018-01-01 -2018-01-01 -select * from (select date('2018-01-01') as d) as t -where t.d between date ('2017-01-01') and date ('2019-01-01'); -d -2018-01-01 -# -# MDEV-16088: pushdown into derived defined in the IN subquery -# -CREATE TABLE t1 (a INT, b INT); -CREATE TABLE t2 (e INT, f INT, g INT); -INSERT INTO t1 VALUES (1,14),(2,13),(1,19),(2,32),(3,24); -INSERT INTO t2 VALUES (1,19,2),(3,24,1),(1,12,2),(3,11,3),(2,32,1); -SELECT * FROM t1 -WHERE (t1.a,t1.b) IN -( -SELECT d_tab.e,d_tab.max_f -FROM ( -SELECT t2.e, MAX(t2.f) AS max_f -FROM t2 -GROUP BY t2.e -HAVING max_f>18 -) as d_tab -WHERE d_tab.e>1 -) -; -a b -2 32 -3 24 -EXPLAIN SELECT * FROM t1 -WHERE (t1.a,t1.b) IN -( -SELECT d_tab.e,d_tab.max_f -FROM ( -SELECT t2.e, MAX(t2.f) AS max_f -FROM t2 -GROUP BY t2.e -HAVING max_f>18 -) as d_tab -WHERE d_tab.e>1 -) -; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 5 -1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 func,func 1 -2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 5 Using where -3 DERIVED t2 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort -EXPLAIN FORMAT=JSON SELECT * FROM t1 -WHERE (t1.a,t1.b) IN -( -SELECT d_tab.e,d_tab.max_f -FROM ( -SELECT t2.e, MAX(t2.f) AS max_f -FROM t2 -GROUP BY t2.e -HAVING max_f>18 -) as d_tab -WHERE d_tab.e>1 -) -; -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 5, - "filtered": 100 - }, - "table": { - "table_name": "<subquery2>", - "access_type": "eq_ref", - "possible_keys": ["distinct_key"], - "key": "distinct_key", - "key_length": "8", - "used_key_parts": ["e", "max_f"], - "ref": ["func", "func"], - "rows": 1, - "filtered": 100, - "materialized": { - "unique": 1, - "query_block": { - "select_id": 2, - "table": { - "table_name": "<derived3>", - "access_type": "ALL", - "rows": 5, - "filtered": 100, - "attached_condition": "d_tab.e > 1", - "materialized": { - "query_block": { - "select_id": 3, - "having_condition": "max_f > 18", - "filesort": { - "sort_key": "t2.e", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 5, - "filtered": 100, - "attached_condition": "t2.e > 1" - } - } - } - } - } - } - } - } - } - } -} -SELECT * FROM t1 -WHERE (t1.a,t1.b) IN -( -SELECT d_tab.e,d_tab.max_f -FROM ( -SELECT t2.e, MAX(t2.f) AS max_f -FROM t2 -GROUP BY t2.e -HAVING max_f>18 -) as d_tab -WHERE d_tab.max_f<25 -) -; -a b -1 19 -3 24 -EXPLAIN SELECT * FROM t1 -WHERE (t1.a,t1.b) IN -( -SELECT d_tab.e,d_tab.max_f -FROM ( -SELECT t2.e, MAX(t2.f) AS max_f -FROM t2 -GROUP BY t2.e -HAVING max_f>18 -) as d_tab -WHERE d_tab.max_f<25 -) -; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 5 -1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 func,func 1 -2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 5 Using where -3 DERIVED t2 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort -EXPLAIN FORMAT=JSON SELECT * FROM t1 -WHERE (t1.a,t1.b) IN -( -SELECT d_tab.e,d_tab.max_f -FROM ( -SELECT t2.e, MAX(t2.f) AS max_f -FROM t2 -GROUP BY t2.e -HAVING max_f>18 -) as d_tab -WHERE d_tab.max_f<25 -) -; -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 5, - "filtered": 100 - }, - "table": { - "table_name": "<subquery2>", - "access_type": "eq_ref", - "possible_keys": ["distinct_key"], - "key": "distinct_key", - "key_length": "8", - "used_key_parts": ["e", "max_f"], - "ref": ["func", "func"], - "rows": 1, - "filtered": 100, - "materialized": { - "unique": 1, - "query_block": { - "select_id": 2, - "table": { - "table_name": "<derived3>", - "access_type": "ALL", - "rows": 5, - "filtered": 100, - "attached_condition": "d_tab.max_f < 25", - "materialized": { - "query_block": { - "select_id": 3, - "having_condition": "max_f > 18 and max_f < 25", - "filesort": { - "sort_key": "t2.e", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 5, - "filtered": 100 - } - } - } - } - } - } - } - } - } - } -} -SELECT * FROM t1 -WHERE (t1.a,t1.b) IN -( -SELECT d_tab.e, MAX(d_tab.max_f) AS max_f -FROM ( -SELECT t2.e, MAX(t2.f) as max_f, t2.g -FROM t2 -GROUP BY t2.e -) as d_tab -WHERE d_tab.e>1 -GROUP BY d_tab.g -) -; -a b -2 32 -EXPLAIN SELECT * FROM t1 -WHERE (t1.a,t1.b) IN -( -SELECT d_tab.e, MAX(d_tab.max_f) AS max_f -FROM ( -SELECT t2.e, MAX(t2.f) as max_f, t2.g -FROM t2 -GROUP BY t2.e -) as d_tab -WHERE d_tab.e>1 -GROUP BY d_tab.g -) -; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where -1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 test.t1.a,test.t1.b 1 -2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 5 Using where; Using temporary -3 DERIVED t2 ALL NULL NULL NULL NULL 5 Using where; Using temporary; Using filesort -EXPLAIN FORMAT=JSON SELECT * FROM t1 -WHERE (t1.a,t1.b) IN -( -SELECT d_tab.e, MAX(d_tab.max_f) AS max_f -FROM ( -SELECT t2.e, MAX(t2.f) as max_f, t2.g -FROM t2 -GROUP BY t2.e -) as d_tab -WHERE d_tab.e>1 -GROUP BY d_tab.g -) -; -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 5, - "filtered": 100, - "attached_condition": "t1.a is not null and t1.b is not null" - }, - "table": { - "table_name": "<subquery2>", - "access_type": "eq_ref", - "possible_keys": ["distinct_key"], - "key": "distinct_key", - "key_length": "8", - "used_key_parts": ["e", "max_f"], - "ref": ["test.t1.a", "test.t1.b"], - "rows": 1, - "filtered": 100, - "materialized": { - "unique": 1, - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "<derived3>", - "access_type": "ALL", - "rows": 5, - "filtered": 100, - "attached_condition": "d_tab.e > 1", - "materialized": { - "query_block": { - "select_id": 3, - "filesort": { - "sort_key": "t2.e", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 5, - "filtered": 100, - "attached_condition": "t2.e > 1" - } - } - } - } - } - } - } - } - } - } - } -} -SELECT * FROM t1 -WHERE (t1.a,t1.b) IN -( -SELECT d_tab.e, MAX(d_tab.max_f) AS max_f -FROM ( -SELECT t2.e, MAX(t2.f) as max_f, t2.g -FROM t2 -GROUP BY t2.e -) as d_tab -WHERE d_tab.max_f>20 -GROUP BY d_tab.g -) -; -a b -2 32 -EXPLAIN SELECT * FROM t1 -WHERE (t1.a,t1.b) IN -( -SELECT d_tab.e, MAX(d_tab.max_f) AS max_f -FROM ( -SELECT t2.e, MAX(t2.f) as max_f, t2.g -FROM t2 -GROUP BY t2.e -) as d_tab -WHERE d_tab.max_f>20 -GROUP BY d_tab.g -) -; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 5 Using where -1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 8 test.t1.a,test.t1.b 1 -2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 5 Using where; Using temporary -3 DERIVED t2 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort -EXPLAIN FORMAT=JSON SELECT * FROM t1 -WHERE (t1.a,t1.b) IN -( -SELECT d_tab.e, MAX(d_tab.max_f) AS max_f -FROM ( -SELECT t2.e, MAX(t2.f) as max_f, t2.g -FROM t2 -GROUP BY t2.e -) as d_tab -WHERE d_tab.max_f>20 -GROUP BY d_tab.g -) -; -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 5, - "filtered": 100, - "attached_condition": "t1.a is not null and t1.b is not null" - }, - "table": { - "table_name": "<subquery2>", - "access_type": "eq_ref", - "possible_keys": ["distinct_key"], - "key": "distinct_key", - "key_length": "8", - "used_key_parts": ["e", "max_f"], - "ref": ["test.t1.a", "test.t1.b"], - "rows": 1, - "filtered": 100, - "materialized": { - "unique": 1, - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "<derived3>", - "access_type": "ALL", - "rows": 5, - "filtered": 100, - "attached_condition": "d_tab.max_f > 20", - "materialized": { - "query_block": { - "select_id": 3, - "having_condition": "max_f > 20", - "filesort": { - "sort_key": "t2.e", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 5, - "filtered": 100 - } - } - } - } - } - } - } - } - } - } - } -} -DROP TABLE t1,t2; -# -# MDEV-15765: pushing condition with IN subquery defined with constants -# using substitution -# -CREATE TABLE t1 (a INT); -INSERT INTO t1 VALUES (1),(2); -SELECT * FROM -( -SELECT DISTINCT * FROM t1 -) der_tab -WHERE (a>0 AND a<2 OR a IN (2,3)) AND -(a=2 OR 0); -a -2 -DROP TABLE t1; -# -# MDEV-16386: pushing condition into the HAVING clause when ambiguous -# fields warning appears -# -CREATE TABLE t1 (a INT, b INT); -INSERT INTO t1 VALUES (1,2),(2,3),(3,4); -SELECT * FROM -( -SELECT t1.b AS a -FROM t1 -GROUP BY t1.a -) dt -WHERE (dt.a=2); -a -2 -EXPLAIN FORMAT=JSON SELECT * FROM -( -SELECT t1.b AS a -FROM t1 -GROUP BY t1.a -) dt -WHERE (dt.a=2); -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "<derived2>", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "dt.a = 2", - "materialized": { - "query_block": { - "select_id": 2, - "having_condition": "a = 2", - "filesort": { - "sort_key": "t1.a", - "temporary_table": { - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 3, - "filtered": 100 - } - } - } - } - } - } - } -} -SELECT * FROM -( -SELECT t1.b AS a -FROM t1 -GROUP BY t1.a -HAVING (t1.a<3) -) dt -WHERE (dt.a>1); -a -2 -3 -EXPLAIN FORMAT=JSON SELECT * FROM -( -SELECT t1.b AS a -FROM t1 -GROUP BY t1.a -HAVING (t1.a<3) -) dt -WHERE (dt.a>1); -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "<derived2>", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "dt.a > 1", - "materialized": { - "query_block": { - "select_id": 2, - "having_condition": "t1.a < 3 and a > 1", - "filesort": { - "sort_key": "t1.a", - "temporary_table": { - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 3, - "filtered": 100 - } - } - } - } - } - } - } -} -SELECT * FROM -( -SELECT 'ab' AS a -FROM t1 -GROUP BY t1.a -) dt -WHERE (dt.a='ab'); -a -ab -ab -ab -EXPLAIN FORMAT=JSON SELECT * FROM -( -SELECT 'ab' AS a -FROM t1 -GROUP BY t1.a -) dt -WHERE (dt.a='ab'); -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "<derived2>", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "dt.a = 'ab'", - "materialized": { - "query_block": { - "select_id": 2, - "filesort": { - "sort_key": "t1.a", - "temporary_table": { - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 3, - "filtered": 100 - } - } - } - } - } - } - } -} -SELECT * FROM -( -SELECT 1 AS a -FROM t1 -GROUP BY t1.a -) dt -WHERE (dt.a=1); -a -1 -1 -1 -EXPLAIN FORMAT=JSON SELECT * FROM -( -SELECT 1 AS a -FROM t1 -GROUP BY t1.a -) dt -WHERE (dt.a=1); -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "<derived2>", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "dt.a = 1", - "materialized": { - "query_block": { - "select_id": 2, - "filesort": { - "sort_key": "t1.a", - "temporary_table": { - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 3, - "filtered": 100 - } - } - } - } - } - } - } -} -DROP TABLE t1; -# -# MDEV-16517: pushdown condition with the IN predicate defined -# with non-constant values -# -CREATE TABLE t1 (a INT, b INT); -INSERT INTO t1 VALUES (1,2),(1,3); -SELECT * FROM -( -SELECT t1.a -FROM t1 -WHERE 1 IN (0,t1.a) -GROUP BY t1.a -) AS dt1 -JOIN -( -SELECT t1.a -FROM t1 -WHERE 1 IN (0,t1.a) -) AS dt2 -ON dt1.a = dt2.a; -a a -1 1 -1 1 -EXPLAIN FORMAT=JSON SELECT * FROM -( -SELECT t1.a -FROM t1 -WHERE 1 IN (0,t1.a) -GROUP BY t1.a -) AS dt1 -JOIN -( -SELECT t1.a -FROM t1 -WHERE 1 IN (0,t1.a) -) AS dt2 -ON dt1.a = dt2.a; -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "<derived2>", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "1 in (0,dt1.a)", - "materialized": { - "query_block": { - "select_id": 2, - "filesort": { - "sort_key": "t1.a", - "temporary_table": { - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "1 in (0,t1.a) and 1 in (0,t1.a)" - } - } - } - } - } - }, - "block-nl-join": { - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 2, - "filtered": 100 - }, - "buffer_type": "flat", - "buffer_size": "256Kb", - "join_type": "BNL", - "attached_condition": "t1.a = dt1.a" - } - } -} -SELECT * FROM -( -SELECT t1.a,MAX(t1.b) -FROM t1 -GROUP BY t1.a -) AS dt, t1 -WHERE dt.a=t1.a AND dt.a IN (1,t1.a); -a MAX(t1.b) a b -1 3 1 2 -1 3 1 3 -EXPLAIN FORMAT=JSON SELECT * FROM -( -SELECT t1.a,MAX(t1.b) -FROM t1 -GROUP BY t1.a -) AS dt, t1 -WHERE dt.a=t1.a AND dt.a IN (1,t1.a); -EXPLAIN -{ - "query_block": { - "select_id": 1, - "table": { - "table_name": "<derived2>", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "dt.a in (1,dt.a)", - "materialized": { - "query_block": { - "select_id": 2, - "filesort": { - "sort_key": "t1.a", - "temporary_table": { - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 2, - "filtered": 100, - "attached_condition": "t1.a in (1,t1.a)" - } - } - } - } - } - }, - "block-nl-join": { - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 2, - "filtered": 100 - }, - "buffer_type": "flat", - "buffer_size": "256Kb", - "join_type": "BNL", - "attached_condition": "t1.a = dt.a" - } - } -} -DROP TABLE t1; -# -# MDEV-10855: Pushdown into derived with window functions +# MDEV-10855: Pushdown into derived with window functions # set @save_optimizer_switch= @@optimizer_switch; set optimizer_switch='split_materialized=off'; @@ -13558,27 +14138,27 @@ insert into t2 values set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from (select a, c, sum(b) over (partition by a,c) from t2) as t where t.a > 2 and t.c in ('aa','bb','cc'); a c sum(b) over (partition by a,c) -7 cc 28 -7 cc 28 3 aa 92 -7 bb 126 +3 aa 92 +3 bb 40 4 aa 15 7 bb 126 7 bb 126 -3 bb 40 -3 aa 92 +7 bb 126 +7 cc 28 +7 cc 28 select * from (select a, c, sum(b) over (partition by a,c) from t2) as t where t.a > 2 and t.c in ('aa','bb','cc'); a c sum(b) over (partition by a,c) -7 cc 28 -7 cc 28 3 aa 92 -7 bb 126 +3 aa 92 +3 bb 40 4 aa 15 7 bb 126 7 bb 126 -3 bb 40 -3 aa 92 +7 bb 126 +7 cc 28 +7 cc 28 explain select * from (select a, c, sum(b) over (partition by a,c) from t2) as t where t.a > 2 and t.c in ('aa','bb','cc'); id select_type table type possible_keys key key_len ref rows Extra @@ -13622,59 +14202,59 @@ EXPLAIN } } set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from -( +( select 1 as n, a, c, sum(b) over (partition by a,c) as s from t2 union all select 2 as n, a, c, sum(b) over (partition by a) as s from t2 ) as t where t.a > 2 and t.c in ('aa','bb','cc'); n a c s -1 7 cc 28 -1 7 cc 28 1 3 aa 92 -1 7 bb 126 +1 3 aa 92 +1 3 bb 40 1 4 aa 15 1 7 bb 126 1 7 bb 126 -1 3 bb 40 -1 3 aa 92 -2 7 cc 154 -2 7 cc 154 +1 7 bb 126 +1 7 cc 28 +1 7 cc 28 2 3 aa 132 -2 7 bb 154 +2 3 aa 132 +2 3 bb 132 2 4 aa 139 2 7 bb 154 2 7 bb 154 -2 3 bb 132 -2 3 aa 132 +2 7 bb 154 +2 7 cc 154 +2 7 cc 154 select * from -( +( select 1 as n, a, c, sum(b) over (partition by a,c) as s from t2 union all select 2 as n, a, c, sum(b) over (partition by a) as s from t2 ) as t where t.a > 2 and t.c in ('aa','bb','cc'); n a c s -1 7 cc 28 -1 7 cc 28 1 3 aa 92 -1 7 bb 126 +1 3 aa 92 +1 3 bb 40 1 4 aa 15 1 7 bb 126 1 7 bb 126 -1 3 bb 40 -1 3 aa 92 -2 7 cc 154 -2 7 cc 154 +1 7 bb 126 +1 7 cc 28 +1 7 cc 28 2 3 aa 132 -2 7 bb 154 +2 3 aa 132 +2 3 bb 132 2 4 aa 139 2 7 bb 154 2 7 bb 154 -2 3 bb 132 -2 3 aa 132 +2 7 bb 154 +2 7 cc 154 +2 7 cc 154 explain select * from -( +( select 1 as n, a, c, sum(b) over (partition by a,c) as s from t2 union all select 2 as n, a, c, sum(b) over (partition by a) as s from t2 @@ -13685,7 +14265,7 @@ id select_type table type possible_keys key key_len ref rows Extra 2 DERIVED t2 ALL idx NULL NULL NULL 20 Using where; Using temporary 3 UNION t2 ALL idx NULL NULL NULL 20 Using where; Using temporary explain format=json select * from -( +( select 1 as n, a, c, sum(b) over (partition by a,c) as s from t2 union all select 2 as n, a, c, sum(b) over (partition by a) as s from t2 @@ -13759,7 +14339,7 @@ EXPLAIN } } } -set statement optimizer_switch='condition_pushdown_for_derived=off' for select * +set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from (select a, c, sum(b) over (partition by a,c) as s from t2) as t, t1 where t1.a=t.a and t1.c=t.c and t1.c in ('aa','bb','cc'); a c s a c @@ -13767,7 +14347,7 @@ a c s a c 7 bb 126 7 bb 7 bb 126 7 bb 7 bb 126 7 bb -select * +select * from (select a, c, sum(b) over (partition by a,c) as s from t2) as t, t1 where t1.a=t.a and t1.c=t.c and t1.c in ('aa','bb','cc'); a c s a c @@ -13775,14 +14355,14 @@ a c s a c 7 bb 126 7 bb 7 bb 126 7 bb 7 bb 126 7 bb -explain select * +explain select * from (select a, c, sum(b) over (partition by a,c) as s from t2) as t, t1 where t1.a=t.a and t1.c=t.c and t1.c in ('aa','bb','cc'); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 8 Using where 1 PRIMARY <derived2> ref key0 key0 24 test.t1.a,test.t1.c 2 2 DERIVED t2 ALL NULL NULL NULL NULL 20 Using where; Using temporary -explain format=json select * +explain format=json select * from (select a, c, sum(b) over (partition by a,c) as s from t2) as t, t1 where t1.a=t.a and t1.c=t.c and t1.c in ('aa','bb','cc'); EXPLAIN @@ -13831,7 +14411,7 @@ EXPLAIN } } set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from -( +( select 1 as n, a, c, sum(b) over (partition by a,c) as s from t2 union all select 2 as n, a, c, sum(b) over (partition by a) as s from t2 @@ -13840,28 +14420,28 @@ select 3 as n, a, c, sum(b) as s from t2 group by a ) as t where t.a > 2 and t.c in ('aa','bb','cc'); n a c s -1 7 cc 28 -1 7 cc 28 1 3 aa 92 -1 7 bb 126 +1 3 aa 92 +1 3 bb 40 1 4 aa 15 1 7 bb 126 1 7 bb 126 -1 3 bb 40 -1 3 aa 92 -2 7 cc 154 -2 7 cc 154 +1 7 bb 126 +1 7 cc 28 +1 7 cc 28 2 3 aa 132 -2 7 bb 154 +2 3 aa 132 +2 3 bb 132 2 4 aa 139 2 7 bb 154 2 7 bb 154 -2 3 bb 132 -2 3 aa 132 +2 7 bb 154 +2 7 cc 154 +2 7 cc 154 3 3 aa 132 3 7 cc 154 select * from -( +( select 1 as n, a, c, sum(b) over (partition by a,c) as s from t2 union all select 2 as n, a, c, sum(b) over (partition by a) as s from t2 @@ -13870,28 +14450,28 @@ select 3 as n, a, c, sum(b) as s from t2 group by a ) as t where t.a > 2 and t.c in ('aa','bb','cc'); n a c s -1 7 cc 28 -1 7 cc 28 1 3 aa 92 -1 7 bb 126 +1 3 aa 92 +1 3 bb 40 1 4 aa 15 1 7 bb 126 1 7 bb 126 -1 3 bb 40 -1 3 aa 92 -2 7 cc 154 -2 7 cc 154 +1 7 bb 126 +1 7 cc 28 +1 7 cc 28 2 3 aa 132 -2 7 bb 154 +2 3 aa 132 +2 3 bb 132 2 4 aa 139 2 7 bb 154 2 7 bb 154 -2 3 bb 132 -2 3 aa 132 +2 7 bb 154 +2 7 cc 154 +2 7 cc 154 3 3 aa 132 3 7 cc 154 explain select * from -( +( select 1 as n, a, c, sum(b) over (partition by a,c) as s from t2 union all select 2 as n, a, c, sum(b) over (partition by a) as s from t2 @@ -13905,7 +14485,7 @@ id select_type table type possible_keys key key_len ref rows Extra 3 UNION t2 ALL idx NULL NULL NULL 20 Using where; Using temporary 4 UNION t2 ALL idx NULL NULL NULL 20 Using where; Using temporary; Using filesort explain format=json select * from -( +( select 1 as n, a, c, sum(b) over (partition by a,c) as s from t2 union all select 2 as n, a, c, sum(b) over (partition by a) as s from t2 @@ -14007,30 +14587,30 @@ avg(b) over (partition by a,c) as avg_b from t2 ) as t where t.a > 2 and t.c in ('aa','bb','cc'); a c sum_b avg_b -7 cc 28 14.0000 -7 cc 28 14.0000 3 aa 92 46.0000 -7 bb 126 42.0000 +3 aa 92 46.0000 +3 bb 40 40.0000 4 aa 15 15.0000 7 bb 126 42.0000 7 bb 126 42.0000 -3 bb 40 40.0000 -3 aa 92 46.0000 +7 bb 126 42.0000 +7 cc 28 14.0000 +7 cc 28 14.0000 select * from (select a, c, sum(b) over (partition by a,c) as sum_b, avg(b) over (partition by a,c) as avg_b from t2 ) as t where t.a > 2 and t.c in ('aa','bb','cc'); a c sum_b avg_b -7 cc 28 14.0000 -7 cc 28 14.0000 3 aa 92 46.0000 -7 bb 126 42.0000 +3 aa 92 46.0000 +3 bb 40 40.0000 4 aa 15 15.0000 7 bb 126 42.0000 7 bb 126 42.0000 -3 bb 40 40.0000 -3 aa 92 46.0000 +7 bb 126 42.0000 +7 cc 28 14.0000 +7 cc 28 14.0000 explain select * from (select a, c, sum(b) over (partition by a,c) as sum_b, avg(b) over (partition by a,c) as avg_b @@ -14085,30 +14665,30 @@ avg(b) over (partition by a) as avg_b from t2 ) as t where t.a > 2 and t.c in ('aa','bb','cc'); a c sum_b avg_b -7 cc 28 30.8000 -7 cc 28 30.8000 3 aa 92 44.0000 -7 bb 126 30.8000 +3 aa 92 44.0000 +3 bb 40 44.0000 4 aa 15 46.3333 7 bb 126 30.8000 7 bb 126 30.8000 -3 bb 40 44.0000 -3 aa 92 44.0000 +7 bb 126 30.8000 +7 cc 28 30.8000 +7 cc 28 30.8000 select * from (select a, c, sum(b) over (partition by a,c) as sum_b, avg(b) over (partition by a) as avg_b from t2 ) as t where t.a > 2 and t.c in ('aa','bb','cc'); a c sum_b avg_b -7 cc 28 30.8000 -7 cc 28 30.8000 3 aa 92 44.0000 -7 bb 126 30.8000 +3 aa 92 44.0000 +3 bb 40 44.0000 4 aa 15 46.3333 7 bb 126 30.8000 7 bb 126 30.8000 -3 bb 40 44.0000 -3 aa 92 44.0000 +7 bb 126 30.8000 +7 cc 28 30.8000 +7 cc 28 30.8000 explain select * from (select a, c, sum(b) over (partition by a,c) as sum_b, avg(b) over (partition by a) as avg_b @@ -14163,30 +14743,30 @@ avg(b) over (partition by c) as avg_b from t2 ) as t where t.a > 2 and t.c in ('aa','bb','cc'); a c sum_b avg_b -7 cc 28 14.0000 -7 cc 28 14.0000 3 aa 92 35.4000 -7 bb 126 36.5000 +3 aa 92 35.4000 +3 bb 40 36.5000 4 aa 15 35.4000 7 bb 126 36.5000 7 bb 126 36.5000 -3 bb 40 36.5000 -3 aa 92 35.4000 +7 bb 126 36.5000 +7 cc 28 14.0000 +7 cc 28 14.0000 select * from (select a, c, sum(b) over (partition by a,c) as sum_b, avg(b) over (partition by c) as avg_b from t2 ) as t where t.a > 2 and t.c in ('aa','bb','cc'); a c sum_b avg_b -7 cc 28 14.0000 -7 cc 28 14.0000 3 aa 92 35.4000 -7 bb 126 36.5000 +3 aa 92 35.4000 +3 bb 40 36.5000 4 aa 15 35.4000 7 bb 126 36.5000 7 bb 126 36.5000 -3 bb 40 36.5000 -3 aa 92 35.4000 +7 bb 126 36.5000 +7 cc 28 14.0000 +7 cc 28 14.0000 explain select * from (select a, c, sum(b) over (partition by a,c) as sum_b, avg(b) over (partition by c) as avg_b @@ -14240,7 +14820,7 @@ EXPLAIN drop table t1,t2; set optimizer_switch= @save_optimizer_switch; # -# MDEV-13369: Optimization for equi-joins of grouping derived tables +# MDEV-13369: Optimization for equi-joins of grouping derived tables # (Splitting derived tables / views with GROUP BY) # MDEV-13389: Optimization for equi-joins of derived tables with WF # (Splitting derived tables / views with window functions) @@ -14893,16 +15473,16 @@ set statement optimizer_switch='split_materialized=off' for select t2.a,t2.b,t2. from t2, t3, (select c, max(b) max, min(b) min from t4 group by c) t where t2.b between 80 and 85 and t2.c in ('y','z') and t2.a=t3.a and t3.c=t.c; a b c t_c max min -7 82 y cc 18 10 7 82 y aa 82 15 7 82 y bb 40 23 +7 82 y cc 18 10 select t2.a,t2.b,t2.c,t.c as t_c,t.max,t.min from t2, t3, (select c, max(b) max, min(b) min from t4 group by c) t where t2.b between 80 and 85 and t2.c in ('y','z') and t2.a=t3.a and t3.c=t.c; a b c t_c max min -7 82 y cc 18 10 7 82 y aa 82 15 7 82 y bb 40 23 +7 82 y cc 18 10 explain extended select t2.a,t2.b,t2.c,t.c as t_c,t.max,t.min from t2, t3, (select c, max(b) max, min(b) min from t4 group by c) t where t2.b between 80 and 85 and t2.c in ('y','z') and t2.a=t3.a and t3.c=t.c; @@ -15120,36 +15700,36 @@ set statement optimizer_switch='split_materialized=off' for select * from t2, t3, (select c, b, sum(b) over (partition by c) from t4 ) t where t2.b between 80 and 85 and t2.c in ('y','z') and t2.a=t3.a and t3.c=t.c; a b c a b c c b sum(b) over (partition by c) +7 82 y 7 10 bb bb 23 125 +7 82 y 7 10 bb bb 30 125 +7 82 y 7 10 bb bb 32 125 +7 82 y 7 10 bb bb 40 125 +7 82 y 7 17 cc cc 10 40 7 82 y 7 17 cc cc 12 40 7 82 y 7 17 cc cc 18 40 -7 82 y 7 17 cc cc 10 40 -7 82 y 7 18 aa aa 77 259 -7 82 y 7 18 aa aa 50 259 7 82 y 7 18 aa aa 15 259 -7 82 y 7 18 aa aa 82 259 7 82 y 7 18 aa aa 15 259 7 82 y 7 18 aa aa 20 259 -7 82 y 7 10 bb bb 40 125 -7 82 y 7 10 bb bb 32 125 -7 82 y 7 10 bb bb 30 125 -7 82 y 7 10 bb bb 23 125 +7 82 y 7 18 aa aa 50 259 +7 82 y 7 18 aa aa 77 259 +7 82 y 7 18 aa aa 82 259 select * from t2, t3, (select c, b, sum(b) over (partition by c) from t4 ) t where t2.b between 80 and 85 and t2.c in ('y','z') and t2.a=t3.a and t3.c=t.c; a b c a b c c b sum(b) over (partition by c) +7 82 y 7 10 bb bb 23 125 +7 82 y 7 10 bb bb 30 125 +7 82 y 7 10 bb bb 32 125 +7 82 y 7 10 bb bb 40 125 +7 82 y 7 17 cc cc 10 40 7 82 y 7 17 cc cc 12 40 7 82 y 7 17 cc cc 18 40 -7 82 y 7 17 cc cc 10 40 -7 82 y 7 18 aa aa 77 259 -7 82 y 7 18 aa aa 50 259 7 82 y 7 18 aa aa 15 259 -7 82 y 7 18 aa aa 82 259 7 82 y 7 18 aa aa 15 259 7 82 y 7 18 aa aa 20 259 -7 82 y 7 10 bb bb 40 125 -7 82 y 7 10 bb bb 32 125 -7 82 y 7 10 bb bb 30 125 -7 82 y 7 10 bb bb 23 125 +7 82 y 7 18 aa aa 50 259 +7 82 y 7 18 aa aa 77 259 +7 82 y 7 18 aa aa 82 259 explain extended select * from t2, t3, (select c, b, sum(b) over (partition by c) from t4 ) t where t2.b between 80 and 85 and t2.c in ('y','z') and t2.a=t3.a and t3.c=t.c; @@ -15234,318 +15814,318 @@ set statement optimizer_switch='split_materialized=off' for select * from t2, t3, (select c, b, sum(b) over (partition by c) from t4 ) t where t2.b < 40 and t2.a=t3.a and t3.c=t.c; a b c a b c c b sum(b) over (partition by c) -7 10 x 7 17 cc cc 12 40 -7 10 x 7 17 cc cc 18 40 -7 10 x 7 17 cc cc 10 40 -7 10 x 7 18 aa aa 77 259 -7 10 x 7 18 aa aa 50 259 -7 10 x 7 18 aa aa 15 259 -7 10 x 7 18 aa aa 82 259 -7 10 x 7 18 aa aa 15 259 -7 10 x 7 18 aa aa 20 259 -7 10 x 7 10 bb bb 40 125 -7 10 x 7 10 bb bb 32 125 -7 10 x 7 10 bb bb 30 125 -7 10 x 7 10 bb bb 23 125 -1 20 a 1 14 bb bb 40 125 -1 20 a 1 14 bb bb 32 125 -1 20 a 1 14 bb bb 30 125 1 20 a 1 14 bb bb 23 125 -2 23 b 2 12 aa aa 77 259 -2 23 b 2 12 aa aa 50 259 -2 23 b 2 12 aa aa 15 259 -2 23 b 2 12 aa aa 82 259 -2 23 b 2 12 aa aa 15 259 -2 23 b 2 12 aa aa 20 259 -2 23 b 2 11 aa aa 77 259 -2 23 b 2 11 aa aa 50 259 -2 23 b 2 11 aa aa 15 259 -2 23 b 2 11 aa aa 82 259 -2 23 b 2 11 aa aa 15 259 -2 23 b 2 11 aa aa 20 259 -7 18 z 7 17 cc cc 12 40 -7 18 z 7 17 cc cc 18 40 -7 18 z 7 17 cc cc 10 40 -7 18 z 7 18 aa aa 77 259 -7 18 z 7 18 aa aa 50 259 -7 18 z 7 18 aa aa 15 259 -7 18 z 7 18 aa aa 82 259 -7 18 z 7 18 aa aa 15 259 -7 18 z 7 18 aa aa 20 259 -7 18 z 7 10 bb bb 40 125 -7 18 z 7 10 bb bb 32 125 -7 18 z 7 10 bb bb 30 125 -7 18 z 7 10 bb bb 23 125 -1 30 c 1 14 bb bb 40 125 -1 30 c 1 14 bb bb 32 125 -1 30 c 1 14 bb bb 30 125 +1 20 a 1 14 bb bb 30 125 +1 20 a 1 14 bb bb 32 125 +1 20 a 1 14 bb bb 40 125 1 30 c 1 14 bb bb 23 125 -3 15 x 3 11 dd dd 20 32 -3 15 x 3 11 dd dd 12 32 -8 12 t 8 11 aa aa 77 259 -8 12 t 8 11 aa aa 50 259 -8 12 t 8 11 aa aa 15 259 -8 12 t 8 11 aa aa 82 259 -8 12 t 8 11 aa aa 15 259 -8 12 t 8 11 aa aa 20 259 -11 33 a 11 24 bbf bbf 50 165 -11 33 a 11 24 bbf bbf 42 165 -11 33 a 11 24 bbf bbf 40 165 +1 30 c 1 14 bb bb 30 125 +1 30 c 1 14 bb bb 32 125 +1 30 c 1 14 bb bb 40 125 +11 20 v 11 24 bbf bbf 33 165 +11 20 v 11 24 bbf bbf 40 165 +11 20 v 11 24 bbf bbf 42 165 +11 20 v 11 24 bbf bbf 50 165 +11 30 af 11 24 bbf bbf 33 165 +11 30 af 11 24 bbf bbf 40 165 +11 30 af 11 24 bbf bbf 42 165 +11 30 af 11 24 bbf bbf 50 165 +11 30 d 11 24 bbf bbf 33 165 +11 30 d 11 24 bbf bbf 40 165 +11 30 d 11 24 bbf bbf 42 165 +11 30 d 11 24 bbf bbf 50 165 11 33 a 11 24 bbf bbf 33 165 +11 33 a 11 24 bbf bbf 40 165 +11 33 a 11 24 bbf bbf 42 165 +11 33 a 11 24 bbf bbf 50 165 +12 23 y 12 21 aaf aaf 25 319 +12 23 y 12 21 aaf aaf 25 319 +12 23 y 12 21 aaf aaf 30 319 +12 23 y 12 21 aaf aaf 60 319 +12 23 y 12 21 aaf aaf 87 319 +12 23 y 12 21 aaf aaf 92 319 +12 23 y 12 22 aaf aaf 25 319 +12 23 y 12 22 aaf aaf 25 319 +12 23 y 12 22 aaf aaf 30 319 +12 23 y 12 22 aaf aaf 60 319 +12 23 y 12 22 aaf aaf 87 319 +12 23 y 12 22 aaf aaf 92 319 +12 33 bf 12 21 aaf aaf 25 319 +12 33 bf 12 21 aaf aaf 25 319 +12 33 bf 12 21 aaf aaf 30 319 +12 33 bf 12 21 aaf aaf 60 319 +12 33 bf 12 21 aaf aaf 87 319 +12 33 bf 12 21 aaf aaf 92 319 +12 33 bf 12 22 aaf aaf 25 319 +12 33 bf 12 22 aaf aaf 25 319 +12 33 bf 12 22 aaf aaf 30 319 +12 33 bf 12 22 aaf aaf 60 319 +12 33 bf 12 22 aaf aaf 87 319 +12 33 bf 12 22 aaf aaf 92 319 +13 25 xf 13 21 ddf ddf 22 52 +13 25 xf 13 21 ddf ddf 30 52 +17 10 s 17 20 bbf bbf 33 165 +17 10 s 17 20 bbf bbf 40 165 +17 10 s 17 20 bbf bbf 42 165 +17 10 s 17 20 bbf bbf 50 165 +17 10 s 17 27 ccf ccf 20 70 17 10 s 17 27 ccf ccf 22 70 17 10 s 17 27 ccf ccf 28 70 -17 10 s 17 27 ccf ccf 20 70 -17 10 s 17 28 aaf aaf 87 319 -17 10 s 17 28 aaf aaf 60 319 17 10 s 17 28 aaf aaf 25 319 -17 10 s 17 28 aaf aaf 92 319 17 10 s 17 28 aaf aaf 25 319 17 10 s 17 28 aaf aaf 30 319 -17 10 s 17 20 bbf bbf 50 165 -17 10 s 17 20 bbf bbf 42 165 -17 10 s 17 20 bbf bbf 40 165 -17 10 s 17 20 bbf bbf 33 165 -11 20 v 11 24 bbf bbf 50 165 -11 20 v 11 24 bbf bbf 42 165 -11 20 v 11 24 bbf bbf 40 165 -11 20 v 11 24 bbf bbf 33 165 -12 23 y 12 22 aaf aaf 87 319 -12 23 y 12 22 aaf aaf 60 319 -12 23 y 12 22 aaf aaf 25 319 -12 23 y 12 22 aaf aaf 92 319 -12 23 y 12 22 aaf aaf 25 319 -12 23 y 12 22 aaf aaf 30 319 -12 23 y 12 21 aaf aaf 87 319 -12 23 y 12 21 aaf aaf 60 319 -12 23 y 12 21 aaf aaf 25 319 -12 23 y 12 21 aaf aaf 92 319 -12 23 y 12 21 aaf aaf 25 319 -12 23 y 12 21 aaf aaf 30 319 +17 10 s 17 28 aaf aaf 60 319 +17 10 s 17 28 aaf aaf 87 319 +17 10 s 17 28 aaf aaf 92 319 +17 18 a 17 20 bbf bbf 33 165 +17 18 a 17 20 bbf bbf 40 165 +17 18 a 17 20 bbf bbf 42 165 +17 18 a 17 20 bbf bbf 50 165 +17 18 a 17 27 ccf ccf 20 70 17 18 a 17 27 ccf ccf 22 70 17 18 a 17 27 ccf ccf 28 70 -17 18 a 17 27 ccf ccf 20 70 -17 18 a 17 28 aaf aaf 87 319 -17 18 a 17 28 aaf aaf 60 319 17 18 a 17 28 aaf aaf 25 319 -17 18 a 17 28 aaf aaf 92 319 17 18 a 17 28 aaf aaf 25 319 17 18 a 17 28 aaf aaf 30 319 -17 18 a 17 20 bbf bbf 50 165 -17 18 a 17 20 bbf bbf 42 165 -17 18 a 17 20 bbf bbf 40 165 -17 18 a 17 20 bbf bbf 33 165 -11 30 d 11 24 bbf bbf 50 165 -11 30 d 11 24 bbf bbf 42 165 -11 30 d 11 24 bbf bbf 40 165 -11 30 d 11 24 bbf bbf 33 165 +17 18 a 17 28 aaf aaf 60 319 +17 18 a 17 28 aaf aaf 87 319 +17 18 a 17 28 aaf aaf 92 319 +17 20 xf 17 20 bbf bbf 33 165 +17 20 xf 17 20 bbf bbf 40 165 +17 20 xf 17 20 bbf bbf 42 165 +17 20 xf 17 20 bbf bbf 50 165 +17 20 xf 17 27 ccf ccf 20 70 17 20 xf 17 27 ccf ccf 22 70 17 20 xf 17 27 ccf ccf 28 70 -17 20 xf 17 27 ccf ccf 20 70 -17 20 xf 17 28 aaf aaf 87 319 -17 20 xf 17 28 aaf aaf 60 319 17 20 xf 17 28 aaf aaf 25 319 -17 20 xf 17 28 aaf aaf 92 319 17 20 xf 17 28 aaf aaf 25 319 17 20 xf 17 28 aaf aaf 30 319 -17 20 xf 17 20 bbf bbf 50 165 -17 20 xf 17 20 bbf bbf 42 165 -17 20 xf 17 20 bbf bbf 40 165 -17 20 xf 17 20 bbf bbf 33 165 -11 30 af 11 24 bbf bbf 50 165 -11 30 af 11 24 bbf bbf 42 165 -11 30 af 11 24 bbf bbf 40 165 -11 30 af 11 24 bbf bbf 33 165 -12 33 bf 12 22 aaf aaf 87 319 -12 33 bf 12 22 aaf aaf 60 319 -12 33 bf 12 22 aaf aaf 25 319 -12 33 bf 12 22 aaf aaf 92 319 -12 33 bf 12 22 aaf aaf 25 319 -12 33 bf 12 22 aaf aaf 30 319 -12 33 bf 12 21 aaf aaf 87 319 -12 33 bf 12 21 aaf aaf 60 319 -12 33 bf 12 21 aaf aaf 25 319 -12 33 bf 12 21 aaf aaf 92 319 -12 33 bf 12 21 aaf aaf 25 319 -12 33 bf 12 21 aaf aaf 30 319 +17 20 xf 17 28 aaf aaf 60 319 +17 20 xf 17 28 aaf aaf 87 319 +17 20 xf 17 28 aaf aaf 92 319 +17 28 zf 17 20 bbf bbf 33 165 +17 28 zf 17 20 bbf bbf 40 165 +17 28 zf 17 20 bbf bbf 42 165 +17 28 zf 17 20 bbf bbf 50 165 +17 28 zf 17 27 ccf ccf 20 70 17 28 zf 17 27 ccf ccf 22 70 17 28 zf 17 27 ccf ccf 28 70 -17 28 zf 17 27 ccf ccf 20 70 -17 28 zf 17 28 aaf aaf 87 319 -17 28 zf 17 28 aaf aaf 60 319 17 28 zf 17 28 aaf aaf 25 319 -17 28 zf 17 28 aaf aaf 92 319 17 28 zf 17 28 aaf aaf 25 319 17 28 zf 17 28 aaf aaf 30 319 -17 28 zf 17 20 bbf bbf 50 165 -17 28 zf 17 20 bbf bbf 42 165 -17 28 zf 17 20 bbf bbf 40 165 -17 28 zf 17 20 bbf bbf 33 165 -13 25 xf 13 21 ddf ddf 30 52 -13 25 xf 13 21 ddf ddf 22 52 -18 22 tf 18 21 aaf aaf 87 319 -18 22 tf 18 21 aaf aaf 60 319 +17 28 zf 17 28 aaf aaf 60 319 +17 28 zf 17 28 aaf aaf 87 319 +17 28 zf 17 28 aaf aaf 92 319 18 22 tf 18 21 aaf aaf 25 319 -18 22 tf 18 21 aaf aaf 92 319 18 22 tf 18 21 aaf aaf 25 319 18 22 tf 18 21 aaf aaf 30 319 -select * -from t2, t3, (select c, b, sum(b) over (partition by c) from t4 ) t -where t2.b < 40 and t2.a=t3.a and t3.c=t.c; -a b c a b c c b sum(b) over (partition by c) +18 22 tf 18 21 aaf aaf 60 319 +18 22 tf 18 21 aaf aaf 87 319 +18 22 tf 18 21 aaf aaf 92 319 +2 23 b 2 11 aa aa 15 259 +2 23 b 2 11 aa aa 15 259 +2 23 b 2 11 aa aa 20 259 +2 23 b 2 11 aa aa 50 259 +2 23 b 2 11 aa aa 77 259 +2 23 b 2 11 aa aa 82 259 +2 23 b 2 12 aa aa 15 259 +2 23 b 2 12 aa aa 15 259 +2 23 b 2 12 aa aa 20 259 +2 23 b 2 12 aa aa 50 259 +2 23 b 2 12 aa aa 77 259 +2 23 b 2 12 aa aa 82 259 +3 15 x 3 11 dd dd 12 32 +3 15 x 3 11 dd dd 20 32 +7 10 x 7 10 bb bb 23 125 +7 10 x 7 10 bb bb 30 125 +7 10 x 7 10 bb bb 32 125 +7 10 x 7 10 bb bb 40 125 +7 10 x 7 17 cc cc 10 40 7 10 x 7 17 cc cc 12 40 7 10 x 7 17 cc cc 18 40 -7 10 x 7 17 cc cc 10 40 -7 10 x 7 18 aa aa 77 259 -7 10 x 7 18 aa aa 50 259 7 10 x 7 18 aa aa 15 259 -7 10 x 7 18 aa aa 82 259 7 10 x 7 18 aa aa 15 259 7 10 x 7 18 aa aa 20 259 -7 10 x 7 10 bb bb 40 125 -7 10 x 7 10 bb bb 32 125 -7 10 x 7 10 bb bb 30 125 -7 10 x 7 10 bb bb 23 125 -1 20 a 1 14 bb bb 40 125 -1 20 a 1 14 bb bb 32 125 -1 20 a 1 14 bb bb 30 125 -1 20 a 1 14 bb bb 23 125 -2 23 b 2 12 aa aa 77 259 -2 23 b 2 12 aa aa 50 259 -2 23 b 2 12 aa aa 15 259 -2 23 b 2 12 aa aa 82 259 -2 23 b 2 12 aa aa 15 259 -2 23 b 2 12 aa aa 20 259 -2 23 b 2 11 aa aa 77 259 -2 23 b 2 11 aa aa 50 259 -2 23 b 2 11 aa aa 15 259 -2 23 b 2 11 aa aa 82 259 -2 23 b 2 11 aa aa 15 259 -2 23 b 2 11 aa aa 20 259 +7 10 x 7 18 aa aa 50 259 +7 10 x 7 18 aa aa 77 259 +7 10 x 7 18 aa aa 82 259 +7 18 z 7 10 bb bb 23 125 +7 18 z 7 10 bb bb 30 125 +7 18 z 7 10 bb bb 32 125 +7 18 z 7 10 bb bb 40 125 +7 18 z 7 17 cc cc 10 40 7 18 z 7 17 cc cc 12 40 7 18 z 7 17 cc cc 18 40 -7 18 z 7 17 cc cc 10 40 -7 18 z 7 18 aa aa 77 259 -7 18 z 7 18 aa aa 50 259 7 18 z 7 18 aa aa 15 259 -7 18 z 7 18 aa aa 82 259 7 18 z 7 18 aa aa 15 259 7 18 z 7 18 aa aa 20 259 -7 18 z 7 10 bb bb 40 125 -7 18 z 7 10 bb bb 32 125 -7 18 z 7 10 bb bb 30 125 -7 18 z 7 10 bb bb 23 125 -1 30 c 1 14 bb bb 40 125 -1 30 c 1 14 bb bb 32 125 -1 30 c 1 14 bb bb 30 125 -1 30 c 1 14 bb bb 23 125 -3 15 x 3 11 dd dd 20 32 -3 15 x 3 11 dd dd 12 32 -8 12 t 8 11 aa aa 77 259 -8 12 t 8 11 aa aa 50 259 +7 18 z 7 18 aa aa 50 259 +7 18 z 7 18 aa aa 77 259 +7 18 z 7 18 aa aa 82 259 8 12 t 8 11 aa aa 15 259 -8 12 t 8 11 aa aa 82 259 8 12 t 8 11 aa aa 15 259 8 12 t 8 11 aa aa 20 259 -11 33 a 11 24 bbf bbf 50 165 -11 33 a 11 24 bbf bbf 42 165 -11 33 a 11 24 bbf bbf 40 165 +8 12 t 8 11 aa aa 50 259 +8 12 t 8 11 aa aa 77 259 +8 12 t 8 11 aa aa 82 259 +select * +from t2, t3, (select c, b, sum(b) over (partition by c) from t4 ) t +where t2.b < 40 and t2.a=t3.a and t3.c=t.c; +a b c a b c c b sum(b) over (partition by c) +1 20 a 1 14 bb bb 23 125 +1 20 a 1 14 bb bb 30 125 +1 20 a 1 14 bb bb 32 125 +1 20 a 1 14 bb bb 40 125 +1 30 c 1 14 bb bb 23 125 +1 30 c 1 14 bb bb 30 125 +1 30 c 1 14 bb bb 32 125 +1 30 c 1 14 bb bb 40 125 +11 20 v 11 24 bbf bbf 33 165 +11 20 v 11 24 bbf bbf 40 165 +11 20 v 11 24 bbf bbf 42 165 +11 20 v 11 24 bbf bbf 50 165 +11 30 af 11 24 bbf bbf 33 165 +11 30 af 11 24 bbf bbf 40 165 +11 30 af 11 24 bbf bbf 42 165 +11 30 af 11 24 bbf bbf 50 165 +11 30 d 11 24 bbf bbf 33 165 +11 30 d 11 24 bbf bbf 40 165 +11 30 d 11 24 bbf bbf 42 165 +11 30 d 11 24 bbf bbf 50 165 11 33 a 11 24 bbf bbf 33 165 +11 33 a 11 24 bbf bbf 40 165 +11 33 a 11 24 bbf bbf 42 165 +11 33 a 11 24 bbf bbf 50 165 +12 23 y 12 21 aaf aaf 25 319 +12 23 y 12 21 aaf aaf 25 319 +12 23 y 12 21 aaf aaf 30 319 +12 23 y 12 21 aaf aaf 60 319 +12 23 y 12 21 aaf aaf 87 319 +12 23 y 12 21 aaf aaf 92 319 +12 23 y 12 22 aaf aaf 25 319 +12 23 y 12 22 aaf aaf 25 319 +12 23 y 12 22 aaf aaf 30 319 +12 23 y 12 22 aaf aaf 60 319 +12 23 y 12 22 aaf aaf 87 319 +12 23 y 12 22 aaf aaf 92 319 +12 33 bf 12 21 aaf aaf 25 319 +12 33 bf 12 21 aaf aaf 25 319 +12 33 bf 12 21 aaf aaf 30 319 +12 33 bf 12 21 aaf aaf 60 319 +12 33 bf 12 21 aaf aaf 87 319 +12 33 bf 12 21 aaf aaf 92 319 +12 33 bf 12 22 aaf aaf 25 319 +12 33 bf 12 22 aaf aaf 25 319 +12 33 bf 12 22 aaf aaf 30 319 +12 33 bf 12 22 aaf aaf 60 319 +12 33 bf 12 22 aaf aaf 87 319 +12 33 bf 12 22 aaf aaf 92 319 +13 25 xf 13 21 ddf ddf 22 52 +13 25 xf 13 21 ddf ddf 30 52 +17 10 s 17 20 bbf bbf 33 165 +17 10 s 17 20 bbf bbf 40 165 +17 10 s 17 20 bbf bbf 42 165 +17 10 s 17 20 bbf bbf 50 165 +17 10 s 17 27 ccf ccf 20 70 17 10 s 17 27 ccf ccf 22 70 17 10 s 17 27 ccf ccf 28 70 -17 10 s 17 27 ccf ccf 20 70 -17 10 s 17 28 aaf aaf 87 319 -17 10 s 17 28 aaf aaf 60 319 17 10 s 17 28 aaf aaf 25 319 -17 10 s 17 28 aaf aaf 92 319 17 10 s 17 28 aaf aaf 25 319 17 10 s 17 28 aaf aaf 30 319 -17 10 s 17 20 bbf bbf 50 165 -17 10 s 17 20 bbf bbf 42 165 -17 10 s 17 20 bbf bbf 40 165 -17 10 s 17 20 bbf bbf 33 165 -11 20 v 11 24 bbf bbf 50 165 -11 20 v 11 24 bbf bbf 42 165 -11 20 v 11 24 bbf bbf 40 165 -11 20 v 11 24 bbf bbf 33 165 -12 23 y 12 22 aaf aaf 87 319 -12 23 y 12 22 aaf aaf 60 319 -12 23 y 12 22 aaf aaf 25 319 -12 23 y 12 22 aaf aaf 92 319 -12 23 y 12 22 aaf aaf 25 319 -12 23 y 12 22 aaf aaf 30 319 -12 23 y 12 21 aaf aaf 87 319 -12 23 y 12 21 aaf aaf 60 319 -12 23 y 12 21 aaf aaf 25 319 -12 23 y 12 21 aaf aaf 92 319 -12 23 y 12 21 aaf aaf 25 319 -12 23 y 12 21 aaf aaf 30 319 +17 10 s 17 28 aaf aaf 60 319 +17 10 s 17 28 aaf aaf 87 319 +17 10 s 17 28 aaf aaf 92 319 +17 18 a 17 20 bbf bbf 33 165 +17 18 a 17 20 bbf bbf 40 165 +17 18 a 17 20 bbf bbf 42 165 +17 18 a 17 20 bbf bbf 50 165 +17 18 a 17 27 ccf ccf 20 70 17 18 a 17 27 ccf ccf 22 70 17 18 a 17 27 ccf ccf 28 70 -17 18 a 17 27 ccf ccf 20 70 -17 18 a 17 28 aaf aaf 87 319 -17 18 a 17 28 aaf aaf 60 319 17 18 a 17 28 aaf aaf 25 319 -17 18 a 17 28 aaf aaf 92 319 17 18 a 17 28 aaf aaf 25 319 17 18 a 17 28 aaf aaf 30 319 -17 18 a 17 20 bbf bbf 50 165 -17 18 a 17 20 bbf bbf 42 165 -17 18 a 17 20 bbf bbf 40 165 -17 18 a 17 20 bbf bbf 33 165 -11 30 d 11 24 bbf bbf 50 165 -11 30 d 11 24 bbf bbf 42 165 -11 30 d 11 24 bbf bbf 40 165 -11 30 d 11 24 bbf bbf 33 165 +17 18 a 17 28 aaf aaf 60 319 +17 18 a 17 28 aaf aaf 87 319 +17 18 a 17 28 aaf aaf 92 319 +17 20 xf 17 20 bbf bbf 33 165 +17 20 xf 17 20 bbf bbf 40 165 +17 20 xf 17 20 bbf bbf 42 165 +17 20 xf 17 20 bbf bbf 50 165 +17 20 xf 17 27 ccf ccf 20 70 17 20 xf 17 27 ccf ccf 22 70 17 20 xf 17 27 ccf ccf 28 70 -17 20 xf 17 27 ccf ccf 20 70 -17 20 xf 17 28 aaf aaf 87 319 -17 20 xf 17 28 aaf aaf 60 319 17 20 xf 17 28 aaf aaf 25 319 -17 20 xf 17 28 aaf aaf 92 319 17 20 xf 17 28 aaf aaf 25 319 17 20 xf 17 28 aaf aaf 30 319 -17 20 xf 17 20 bbf bbf 50 165 -17 20 xf 17 20 bbf bbf 42 165 -17 20 xf 17 20 bbf bbf 40 165 -17 20 xf 17 20 bbf bbf 33 165 -11 30 af 11 24 bbf bbf 50 165 -11 30 af 11 24 bbf bbf 42 165 -11 30 af 11 24 bbf bbf 40 165 -11 30 af 11 24 bbf bbf 33 165 -12 33 bf 12 22 aaf aaf 87 319 -12 33 bf 12 22 aaf aaf 60 319 -12 33 bf 12 22 aaf aaf 25 319 -12 33 bf 12 22 aaf aaf 92 319 -12 33 bf 12 22 aaf aaf 25 319 -12 33 bf 12 22 aaf aaf 30 319 -12 33 bf 12 21 aaf aaf 87 319 -12 33 bf 12 21 aaf aaf 60 319 -12 33 bf 12 21 aaf aaf 25 319 -12 33 bf 12 21 aaf aaf 92 319 -12 33 bf 12 21 aaf aaf 25 319 -12 33 bf 12 21 aaf aaf 30 319 +17 20 xf 17 28 aaf aaf 60 319 +17 20 xf 17 28 aaf aaf 87 319 +17 20 xf 17 28 aaf aaf 92 319 +17 28 zf 17 20 bbf bbf 33 165 +17 28 zf 17 20 bbf bbf 40 165 +17 28 zf 17 20 bbf bbf 42 165 +17 28 zf 17 20 bbf bbf 50 165 +17 28 zf 17 27 ccf ccf 20 70 17 28 zf 17 27 ccf ccf 22 70 17 28 zf 17 27 ccf ccf 28 70 -17 28 zf 17 27 ccf ccf 20 70 -17 28 zf 17 28 aaf aaf 87 319 -17 28 zf 17 28 aaf aaf 60 319 17 28 zf 17 28 aaf aaf 25 319 -17 28 zf 17 28 aaf aaf 92 319 17 28 zf 17 28 aaf aaf 25 319 17 28 zf 17 28 aaf aaf 30 319 -17 28 zf 17 20 bbf bbf 50 165 -17 28 zf 17 20 bbf bbf 42 165 -17 28 zf 17 20 bbf bbf 40 165 -17 28 zf 17 20 bbf bbf 33 165 -13 25 xf 13 21 ddf ddf 30 52 -13 25 xf 13 21 ddf ddf 22 52 -18 22 tf 18 21 aaf aaf 87 319 -18 22 tf 18 21 aaf aaf 60 319 +17 28 zf 17 28 aaf aaf 60 319 +17 28 zf 17 28 aaf aaf 87 319 +17 28 zf 17 28 aaf aaf 92 319 18 22 tf 18 21 aaf aaf 25 319 -18 22 tf 18 21 aaf aaf 92 319 18 22 tf 18 21 aaf aaf 25 319 18 22 tf 18 21 aaf aaf 30 319 +18 22 tf 18 21 aaf aaf 60 319 +18 22 tf 18 21 aaf aaf 87 319 +18 22 tf 18 21 aaf aaf 92 319 +2 23 b 2 11 aa aa 15 259 +2 23 b 2 11 aa aa 15 259 +2 23 b 2 11 aa aa 20 259 +2 23 b 2 11 aa aa 50 259 +2 23 b 2 11 aa aa 77 259 +2 23 b 2 11 aa aa 82 259 +2 23 b 2 12 aa aa 15 259 +2 23 b 2 12 aa aa 15 259 +2 23 b 2 12 aa aa 20 259 +2 23 b 2 12 aa aa 50 259 +2 23 b 2 12 aa aa 77 259 +2 23 b 2 12 aa aa 82 259 +3 15 x 3 11 dd dd 12 32 +3 15 x 3 11 dd dd 20 32 +7 10 x 7 10 bb bb 23 125 +7 10 x 7 10 bb bb 30 125 +7 10 x 7 10 bb bb 32 125 +7 10 x 7 10 bb bb 40 125 +7 10 x 7 17 cc cc 10 40 +7 10 x 7 17 cc cc 12 40 +7 10 x 7 17 cc cc 18 40 +7 10 x 7 18 aa aa 15 259 +7 10 x 7 18 aa aa 15 259 +7 10 x 7 18 aa aa 20 259 +7 10 x 7 18 aa aa 50 259 +7 10 x 7 18 aa aa 77 259 +7 10 x 7 18 aa aa 82 259 +7 18 z 7 10 bb bb 23 125 +7 18 z 7 10 bb bb 30 125 +7 18 z 7 10 bb bb 32 125 +7 18 z 7 10 bb bb 40 125 +7 18 z 7 17 cc cc 10 40 +7 18 z 7 17 cc cc 12 40 +7 18 z 7 17 cc cc 18 40 +7 18 z 7 18 aa aa 15 259 +7 18 z 7 18 aa aa 15 259 +7 18 z 7 18 aa aa 20 259 +7 18 z 7 18 aa aa 50 259 +7 18 z 7 18 aa aa 77 259 +7 18 z 7 18 aa aa 82 259 +8 12 t 8 11 aa aa 15 259 +8 12 t 8 11 aa aa 15 259 +8 12 t 8 11 aa aa 20 259 +8 12 t 8 11 aa aa 50 259 +8 12 t 8 11 aa aa 77 259 +8 12 t 8 11 aa aa 82 259 explain extended select * from t2, t3, (select c, b, sum(b) over (partition by c) from t4 ) t where t2.b < 40 and t2.a=t3.a and t3.c=t.c; @@ -15892,31 +16472,31 @@ cte as (select median(f2) over (partition by f1) as k1 from t1 order by f1), cte1 as (select median(f4) over (partition by f1) as k2 from t1) select k1,k2 from cte1, cte; k1 k2 -1.0000000000 9.0000000000 -1.0000000000 9.0000000000 -1.0000000000 8.0000000000 -1.0000000000 0.0000000000 -1.0000000000 9.0000000000 +0.0000000000 0.0000000000 +0.0000000000 0.0000000000 +0.0000000000 0.0000000000 +0.0000000000 0.0000000000 +0.0000000000 8.0000000000 +0.0000000000 8.0000000000 +0.0000000000 8.0000000000 +0.0000000000 8.0000000000 0.0000000000 9.0000000000 0.0000000000 9.0000000000 -0.0000000000 8.0000000000 -0.0000000000 0.0000000000 0.0000000000 9.0000000000 0.0000000000 9.0000000000 0.0000000000 9.0000000000 -0.0000000000 8.0000000000 -0.0000000000 0.0000000000 0.0000000000 9.0000000000 0.0000000000 9.0000000000 0.0000000000 9.0000000000 -0.0000000000 8.0000000000 -0.0000000000 0.0000000000 0.0000000000 9.0000000000 0.0000000000 9.0000000000 0.0000000000 9.0000000000 -0.0000000000 8.0000000000 -0.0000000000 0.0000000000 0.0000000000 9.0000000000 +1.0000000000 0.0000000000 +1.0000000000 8.0000000000 +1.0000000000 9.0000000000 +1.0000000000 9.0000000000 +1.0000000000 9.0000000000 explain with cte as (select median(f2) over (partition by f1) as k1 from t1 order by f1), cte1 as (select median(f4) over (partition by f1) as k2 from t1) @@ -15960,3 +16540,98 @@ f c 9 1 DROP VIEW v1; DROP TABLE t1; +# +# MDEV-16801: splittable materialized derived/views with +# one grouping field from table without keys +# +CREATE TABLE t1 (a int, b int, INDEX idx_a(a), INDEX idx_b(b)) ENGINE=MYISAM; +CREATE TABLE t2 (c int) ENGINE=MYISAM; +CREATE TABLE t3 (d int) ENGINE=MYISAM; +INSERT INTO t1 VALUES +(77,7), (11,1), (33,3), (44,4), (8,88), +(78,7), (98,9), (38,3), (28,2), (79,7), +(58,5), (42,4), (71,7), (27,2), (91,9); +INSERT INTO t1 SELECT a+100, b+10 FROM t1; +INSERT INTO t2 VALUES +(100), (700), (200), (100), (200); +INSERT INTO t3 VALUES +(3), (4), (1), (8), (3); +ANALYZE tables t1,t2,t3; +Table Op Msg_type Msg_text +test.t1 analyze status OK +test.t2 analyze status OK +test.t3 analyze status OK +SELECT * +FROM t3, +(SELECT t1.b, t2.c +FROM t1, t2 +GROUP BY t1.b,t2.c) dt +WHERE t3.d = dt.b; +d b c +3 3 700 +3 3 200 +3 3 100 +4 4 700 +4 4 200 +4 4 100 +1 1 700 +1 1 200 +1 1 100 +3 3 700 +3 3 200 +3 3 100 +EXPLAIN EXTENDED SELECT * +FROM t3, +(SELECT t1.b, t2.c +FROM t1, t2 +GROUP BY t1.b,t2.c) dt +WHERE t3.d = dt.b; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t3 ALL NULL NULL NULL NULL 5 100.00 Using where +1 PRIMARY <derived2> ref key0 key0 5 test.t3.d 2 100.00 +2 LATERAL DERIVED t1 ref idx_b idx_b 5 test.t3.d 2 100.00 Using index; Using temporary; Using filesort +2 LATERAL DERIVED t2 ALL NULL NULL NULL NULL 5 100.00 Using join buffer (flat, BNL join) +Warnings: +Note 1003 /* select#1 */ select `test`.`t3`.`d` AS `d`,`dt`.`b` AS `b`,`dt`.`c` AS `c` from `test`.`t3` join (/* select#2 */ select `test`.`t1`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t1` join `test`.`t2` where `test`.`t1`.`b` = `test`.`t3`.`d` group by `test`.`t1`.`b`,`test`.`t2`.`c`) `dt` where `dt`.`b` = `test`.`t3`.`d` +DROP TABLE t1,t2,t3; +# +# MDEV-17419: splittable materialized derived/view +# when join_cache_level = 4 +# +set join_cache_level = 4; +CREATE TABLE t1 ( +id INT UNSIGNED NOT NULL AUTO_INCREMENT, +username VARCHAR(50) NULL DEFAULT '0', +PRIMARY KEY (id) +) COLLATE='utf8_general_ci'; +CREATE TABLE t2 ( +id INT UNSIGNED NOT NULL AUTO_INCREMENT, +userid INT UNSIGNED NOT NULL, +logindate DATETIME NOT NULL, +PRIMARY KEY (id) +) COLLATE='utf8_general_ci'; +INSERT INTO t1 (id, username) VALUES +(1,"user1"), (2, "user2"); +INSERT INTO t2 (id, userid, logindate) VALUES +(1,1,"2015-06-19 12:17:02.828"), +(2,1,"2016-06-19 12:17:02.828"), +(3,2,"2017-06-19 12:17:02.828"), +(4,2,"2018-06-19 12:17:02.828"); +EXPLAIN select * from t1 as u +left join +(select * from t2 as au group by au.userid) as auditlastlogin +on u.id=auditlastlogin.userid; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY u ALL NULL NULL NULL NULL 2 +1 PRIMARY <derived2> ref key0 key0 5 test.u.id 2 +2 DERIVED au ALL NULL NULL NULL NULL 4 Using temporary; Using filesort +select * from t1 as u +left join +(select * from t2 as au group by au.userid) as auditlastlogin +on u.id=auditlastlogin.userid; +id username id userid logindate +1 user1 1 1 2015-06-19 12:17:02 +2 user2 3 2 2017-06-19 12:17:02 +set join_cache_level=default; +DROP TABLE t1,t2; +# End of 10.3 tests diff --git a/mysql-test/main/derived_cond_pushdown.test b/mysql-test/main/derived_cond_pushdown.test index e51646a9764..659bc2026ff 100644 --- a/mysql-test/main/derived_cond_pushdown.test +++ b/mysql-test/main/derived_cond_pushdown.test @@ -1,46 +1,46 @@ -let $no_pushdown= set statement optimizer_switch='condition_pushdown_for_derived=off' for; +let $no_pushdown= set statement optimizer_switch='condition_pushdown_for_derived=off' for; create table t1 (a int, b int, c int); create table t2 (a int, b int, c int, d decimal); -insert into t1 values +insert into t1 values (1,21,345), (1,33,7), (8,33,114), (1,21,500), (1,19,107), (5,14,787), (8,33,123), (9,10,211), (5,16,207), (1,33,988), (5,27,132), (1,21,104), (6,20,309), (6,20,315), (1,21,101), (8,33,404), (9,10,800), (1,21,123), (7,11,708), (6,20,214); insert into t2 values - (2,3,207,207.0000), (1,21,909,12.0000), (7,13,312,406.0000), + (2,3,207,207.0000), (1,21,909,12.0000), (7,13,312,406.0000), (8,64,248,107.0000), (6,20,315,279.3333), (1,19,203,107.0000), (8,80,800,314.0000), (3,12,231,190.0000), (6,23,303,909.0000); - + create table t1_double(a int, b double, c double); -insert into t1_double values +insert into t1_double values (1,23.4,14.3333), (1,12.5,18.9), (3,12.5,18.9), (4,33.4,14.3333), (4,14.3333,13.65), (5,17.89,7.22), (6,33.4,14.3), (10,33.4,13.65), (11,33.4,13.65); - + create table t2_double(a int, b double, c double); -insert into t2_double values +insert into t2_double values (1,22.4,14.3333), (1,12.5,18.9), (2,22.4,18.9), (4,33.4,14.3333), (5,22.4,13.65), (7,17.89,18.9), - (6,33.4,14.3333), (10,31.4,13.65), (12,33.4,13.65); - + (6,33.4,14.3333), (10,31.4,13.65), (12,33.4,13.65); + create table t1_char(a char, b char(8), c int); insert into t1_char values ('a','Ivan',1), ('b','Vika',2), ('b','Inga',6), ('c','Vika',7), ('b','Ivan',7), ('a','Alex',6), ('b','Inga',5), ('d','Ron',9), - ('d','Harry',2), ('d','Hermione',3), ('c','Ivan',3), ('c','Harry',4); - + ('d','Harry',2), ('d','Hermione',3), ('c','Ivan',3), ('c','Harry',4); + create table t2_char(a char, b char(8), c int); insert into t2_char values ('b','Ivan',1), ('c','Vinny',3), ('c','Inga',9), ('a','Vika',1), ('c','Ivan',2), ('b','Ali',6), ('c','Inga',2), ('a','Ron',9), ('d','Harry',1), ('b','Hermes',3), ('b','Ivan',11), ('b','Harry',4); - + create table t1_decimal (a decimal(3,1), b decimal(3,1), c int); insert into t1_decimal values (1,1,23),(2,2,11),(3,3,16), (1,1,12),(1,1,14),(2,3,15), - (2,1,13),(2,3,11),(3,3,16); + (2,1,13),(2,3,11),(3,3,16); create table t2_decimal (a decimal(3,1), b decimal(3,1), c int); insert into t2_decimal values @@ -48,27 +48,27 @@ insert into t2_decimal values (1,3,22),(1,3,14),(2,2,15), (2,1,43),(2,3,11),(2,3,16); -create view v1 as select a, b, max(c) as max_c, avg(c) as avg_c from t1 +create view v1 as select a, b, max(c) as max_c, avg(c) as avg_c from t1 group by a,b having max_c < 707; - -create view v2 as select a, b, max(c) as max_c, avg(c) as avg_c from t1 - where t1.a>5 group by a,b having max_c < 707; - + +create view v2 as select a, b, max(c) as max_c, avg(c) as avg_c from t1 + where t1.a>5 group by a,b having max_c < 707; + create view v3 as select a, b, min(c) as min_c from t1 where t1.a<10 group by a,b having min_c > 109; - + create view v4 as select a, b, min(max_c) as min_c from v1 - where (v1.a<15) group by a,b; - -create view v_union as + where (v1.a<15) group by a,b; + +create view v_union as select a, b, min(c) as c from t1 where t1.a<10 group by a,b having c > 109 union select a, b, max(c) as c from t1 - where t1.b>10 group by a,b having c < 300; - -create view v2_union as + where t1.b>10 group by a,b having c < 300; + +create view v2_union as select a, b, min(c) as c from t1 where t1.a<10 group by a,b having c > 109 union @@ -76,117 +76,117 @@ create view v2_union as where t1.b>10 group by a,b having c < 300 union select a, b, avg(c) as c from t1 - where t1.c>300 group by a,b having c < 707; + where t1.c>300 group by a,b having c < 707; -create view v3_union as +create view v3_union as select a, b, (a+1) as c from t1 where t1.a<10 union select a, b, c from t1 - where t1.b>10 and t1.c>100; - -create view v4_union as + where t1.b>10 and t1.c>100; + +create view v4_union as select a, b, max(c)-100 as c from t1 where t1.a<10 group by a,b having c > 109 union select a, b, (c+100) as c from t1 - where t1.b>10; + where t1.b>10; create view v_double as select a, avg(a/4) as avg_a, b, c from t1_double - where (b>12.2) group by b,c having (avg_a<22.333); - -create view v_char as - select a, b, max(c) as max_c from t1_char - group by a,b having max_c < 9; - + where (b>12.2) group by b,c having (avg_a<22.333); + +create view v_char as + select a, b, max(c) as max_c from t1_char + group by a,b having max_c < 9; + create view v_decimal as select a, b, avg(c) as avg_c from t1_decimal - group by a,b having (avg_c>12); + group by a,b having (avg_c>12); ---echo # conjunctive subformula : pushing into HAVING +--echo # conjunctive subformula : pushing into HAVING let $query= select * from v1,t2 where (v1.max_c>214) and (t2.a>v1.a); eval $no_pushdown $query; eval $query; eval explain $query; eval explain format=json $query; -let $query= +let $query= select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 - group by a,b having max_c < 707) v1, + group by a,b having max_c < 707) v1, t2 where (v1.a=t2.a) and (v1.max_c>300); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; ---echo # extracted or formula : pushing into HAVING -let $query= - select * from v1,t2 where +--echo # extracted or formula : pushing into HAVING +let $query= + select * from v1,t2 where ((v1.max_c>400) and (t2.a>v1.a)) or ((v1.max_c<135) and (t2.a<v1.a)); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; - -let $query= +eval explain format=json $query; + +let $query= select * from v1,t2 where - ((v1.max_c>300) and (v1.avg_c>t2.d) and (v1.b=t2.b)) or + ((v1.max_c>300) and (v1.avg_c>t2.d) and (v1.b=t2.b)) or ((v1.max_c<135) and (v1.max_c<t2.c) and (v1.a=t2.a)); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # conjunctive subformula : pushing into WHERE let $query= select * from v1,t2 where (v1.a>6) and (t2.b>v1.b); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; let $query= select * from v2,t2 where (v2.b>25) and (t2.a<v2.a); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # extracted or formula : pushing into WHERE -let $query= - select * from v1,t2 where +let $query= + select * from v1,t2 where ((v1.a>7) and (t2.c<v1.max_c)) or ((v1.a<2) and (t2.b<v1.b)); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; - -let $query= - select * from v2,t2 where +eval explain format=json $query; + +let $query= + select * from v2,t2 where ((v2.a>7) and (t2.c<v2.max_c)) or ((v2.a>5) and (t2.b<v2.b)); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; - -let $query= - select * from v1,t2 where - ((v1.a>4) and (v1.b>t2.b) and (v1.max_c=t2.d)) or +eval explain format=json $query; + +let $query= + select * from v1,t2 where + ((v1.a>4) and (v1.b>t2.b) and (v1.max_c=t2.d)) or ((v1.a<2) and (v1.max_c<t2.c) and (v1.max_c=t2.d)); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # conjunctive subformulas : pushing into HAVING and WHERE -let $query= - select * from v1,t2 where (v1.a<2) and (v1.max_c>400) and (t2.b>v1.b); +let $query= + select * from v1,t2 where (v1.a<2) and (v1.max_c>400) and (t2.b>v1.b); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; -let $query= +let $query= select * from v_double as v,t2_double as t where (v.a=t.a) and (v.avg_a>0.45) and (v.b>10); eval $no_pushdown $query; @@ -194,57 +194,57 @@ eval $query; eval explain $query; eval explain format=json $query; -let $query= +let $query= select * from v_decimal as v,t2_decimal as t where (v.a=t.a) and (v.avg_c>15) and (v.b>1); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; - +eval explain format=json $query; + --echo # extracted or formula : pushing into HAVING and WHERE -let $query= - select * from v1,t2 where - ((v1.a>7) and (v1.max_c>300) and (t2.c<v1.max_c)) or - ((v1.a<4) and (v1.max_c<500) and (t2.b<v1.b)); +let $query= + select * from v1,t2 where + ((v1.a>7) and (v1.max_c>300) and (t2.c<v1.max_c)) or + ((v1.a<4) and (v1.max_c<500) and (t2.b<v1.b)); eval $no_pushdown $query; eval $query; eval explain $query; eval explain format=json $query; - -let $query= + +let $query= select * from v1,t2 where ((v1.a<2) and (v1.max_c>120)) or (v1.a>7); eval $no_pushdown $query; eval $query; eval explain $query; eval explain format=json $query; - ---echo # extracted or formulas : pushing into WHERE and HAVING -let $query= - select * from v1,t2 where + +--echo # extracted or formulas : pushing into WHERE and HAVING +let $query= + select * from v1,t2 where ((v1.a<2) and (v1.max_c>120) and (v1.b=t2.b)) or (v1.a>7); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; - -let $query= +eval explain format=json $query; + +let $query= select * from v1,t2 where ((v1.a<2) and (v1.max_c<200) and (t2.c>v1.max_c) and (v1.max_c=t2.d)) or - ((v1.a>4) and (v1.max_c<500) and (t2.b<v1.b) and (v1.max_c=t2.c)); + ((v1.a>4) and (v1.max_c<500) and (t2.b<v1.b) and (v1.max_c=t2.c)); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; - +eval explain format=json $query; + --echo # prepare of a query containing extracted or formula -prepare stmt from "select * from v1,t2 where +prepare stmt from "select * from v1,t2 where ((v1.max_c>400) and (t2.a>v1.a)) or ((v1.max_c<135) and (t2.a<v1.a));"; execute stmt; execute stmt; deallocate prepare stmt; -prepare stmt from - "explain format=json select * from v1,t2 where +prepare stmt from + "explain format=json select * from v1,t2 where ((v1.max_c>400) and (t2.a>v1.a)) or ((v1.max_c<135) and (t2.a<v1.a));"; execute stmt; execute stmt; @@ -252,12 +252,12 @@ deallocate prepare stmt; --echo # conjunctive subformula : pushing into WHERE --echo # pushing equalities -let $query= +let $query= select * from v1,t2 where (t2.a=v1.a) and (v1.b=t2.b) and (v1.a=1); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; let $query= select * from v1,t2 where (v1.a=5) and (v1.max_c=t2.d); eval $no_pushdown $query; @@ -270,15 +270,15 @@ let $query= select * from v1,t2 where (t2.a<5) and (v1.a=t2.a); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; - -let $query= +eval explain format=json $query; + +let $query= select * from v1,t2 where (v1.a=v1.b) and (v1.a=t2.a); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; - +eval explain format=json $query; + --echo # conjunctive subformula : pushing into HAVING using equalities let $query= select * from v1,t2 where (t2.c>150) and (v1.max_c=t2.c); eval $no_pushdown $query; @@ -286,73 +286,73 @@ eval $query; eval explain $query; eval explain format=json $query; ---echo # extracted and formula : pushing into WHERE +--echo # extracted and formula : pushing into WHERE --echo # pushing equalities -let $query= +let $query= select * from v1,t2 where (v1.a=v1.b) and (v1.a=t2.a) and (v1.a=3); eval $no_pushdown $query; eval $query; eval explain $query; eval explain format=json $query; - -let $query= + +let $query= select * from v1,t2 where (v1.a=1) and (v1.b=21) and (t2.a=2); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; -let $query= - select * from v_char as v,t2_char as t where - (v.a='c') and (v.b<'Hermes') and ((v.b=t.b) or (v.max_c>20)); +let $query= + select * from v_char as v,t2_char as t where + (v.a='c') and (v.b<'Hermes') and ((v.b=t.b) or (v.max_c>20)); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # extracted and formula : pushing into WHERE using equalities --echo # pushing equalities -let $query= +let $query= select * from v_decimal as v,t2_decimal as t where (v.a=v.b) and (v.b=t.b) and ((t.b>1) or (v.a=1)); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; ---echo # extracted or formula : pushing into HAVING using equalities -let $query= +--echo # extracted or formula : pushing into HAVING using equalities +let $query= select * from v1,t2 - where ((t2.a<4) and (v1.a=t2.a)) or ((t2.c>150) and (v1.max_c=t2.c)); + where ((t2.a<4) and (v1.a=t2.a)) or ((t2.c>150) and (v1.max_c=t2.c)); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # conjunctive subformulas : pushing into WHERE and HAVING using equalities -let $query= +let $query= select * from v1,t2 where ((t2.a>5) and (v1.a=t2.a)) and ((t2.c>250) and (v1.max_c=t2.c)); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # conjunctive subformulas : pushing into WHERE and HAVING ---echo # pushing equalities -let $query= +--echo # pushing equalities +let $query= select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 - group by a,b having max_c < 707) v1, + group by a,b having max_c < 707) v1, t2 where (v1.a=8) and (v1.a=t2.a) and (v1.max_c=404); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; - ---echo # conjunctive subformulas : pushing into WHERE and HAVING -let $query= - select * from v1,t2 where +eval explain format=json $query; + +--echo # conjunctive subformulas : pushing into WHERE and HAVING +let $query= + select * from v1,t2 where (v1.a>3) and (v1.max_c>200) and (t2.b<v1.b) and (t2.d=v1.max_c); eval $no_pushdown $query; eval $query; @@ -362,17 +362,17 @@ eval explain format=json $query; --echo # conjunctive subformula : pushing into WHERE --echo # extracted or formula : pushing into HAVING using equalities --echo # pushing equalities -let $query= +let $query= select * from v_double as v,t2_double as t where (v.b=v.c) and (v.c=t.c) and ((t.c>10) or (v.a=1)); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # conjunctive subformula : pushing into WHERE ---echo # extracted or formula : pushing into HAVING using equalities -let $query= +--echo # extracted or formula : pushing into HAVING using equalities +let $query= select * from v_double as v,t2_double as t where (((v.a>0.2) or (v.b<17)) or (t.c>17)) and (t.c=v.c) and (v.c>18); eval $no_pushdown $query; @@ -383,146 +383,146 @@ eval explain format=json $query; --echo # extracted or formula : pushing into WHERE --echo # conjunctive subformula : pushing into HAVING --echo # pushing equalities -let $query= +let $query= select * from v_decimal as v,t2_decimal as t where - (((v.a>4) or (v.a=2)) or (v.b>3)) and (v.avg_c=13); + (((v.a>4) or (v.a=2)) or (v.b>3)) and (v.avg_c=13); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; -let $query= +let $query= select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 - where t1.a>5 group by a,b having max_c < 707) v1, + where t1.a>5 group by a,b having max_c < 707) v1, t2 where (v1.a=t2.a) and (v1.max_c>300) and (v1.a=v1.b); eval $no_pushdown $query; eval $query; eval explain $query; eval explain format=json $query; - + --echo # nothing to push -let $query= +let $query= select * from v1,t2 where (t2.a<2) and (t2.c>900); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.b=t2.b); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; - -let $query= - select * from v1,t2 where - (t2.a=v1.a) or (v1.b=t2.b) and ((v1.a=1) or (v1.a=6)); +eval explain format=json $query; + +let $query= + select * from v1,t2 where + (t2.a=v1.a) or (v1.b=t2.b) and ((v1.a=1) or (v1.a=6)); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; - -let $query= +eval explain format=json $query; + +let $query= select * from v1,t2 where (v1.a=1) or (v1.b=21) or (t2.a=2); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; -let $query= - select * from v1,t2 where +let $query= + select * from v1,t2 where (t2.a<2) and (t2.c>900) and ((v1.a<t2.a) or (t2.a<11)); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # using several derived tables : nothing to push -let $query= select * from v1,v2,t2 where +let $query= select * from v1,v2,t2 where (v1.a=v2.a) and (v1.a=t2.a) and (v2.b<50); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; -let $query= - select * from v1,v2,t2 where +let $query= + select * from v1,v2,t2 where ((v1.a=v2.a) or (v1.a=t2.a)) and (t2.b<50) and (v1.b=v2.b); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; -let $query= - select * from v1,v2,t2 where +let $query= + select * from v1,v2,t2 where ((v1.a=v2.a) and (v1.a=t2.a)) or ((v2.b>13) and (t2.c<115)); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # using several derived tables : pushing in all tables --echo # conjunctive subformula : pushing into HAVING --echo # extracted or formula : pushing into WHERE ---echo # pushing equalities -let $query= - select * from v1,v2,t2 where ((v1.a=v2.a) or (v1.a=t2.a)) and +--echo # pushing equalities +let $query= + select * from v1,v2,t2 where ((v1.a=v2.a) or (v1.a=t2.a)) and ((v2.b<50) or (v2.b=19)) and (v1.max_c<300); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; - +eval explain format=json $query; + --echo # using several derived tables : pushing only in one table --echo # conjunctive subformula : pushing into WHERE --echo # pushing equalities -let $query= - select * from v1,v2,t2 where - (v1.a=t2.a) and (v1.a=v1.b) and (v1.a=v2.a) and (v2.max_c<300); +let $query= + select * from v1,v2,t2 where + (v1.a=t2.a) and (v1.a=v1.b) and (v1.a=v2.a) and (v2.max_c<300); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # using several derived tables : pushing only in one table --echo # extracted and formula : pushing into WHERE --echo # conjunctive subformula : pushing into WHERE using equalities --echo # pushing equalities -let $query= +let $query= select * from v1,v2,t2 where (v1.a=1) and (v1.b>10) and (v1.b=v2.b); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # extracted or formula : pushing into WHERE --echo # conjunctive subformula : pushing into WHERE using equalities --echo # pushing equalities -let $query= - select * from v_char as v,t2_char as t where +let $query= + select * from v_char as v,t2_char as t where (v.a=t.a) and (t.a='b') and ((v.b='Vika') or (v.b='Ali')); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # using several derived tables : pushing in all tables --echo # extracted or formula : pushing into WHERE ---echo # conjunctive subformulas : pushing into HAVING +--echo # conjunctive subformulas : pushing into HAVING --echo # pushing equalities -let $query= - select * from v1,v2,v3,t2 where - ((v1.a=v2.a) or (v1.a=t2.a)) and ((v3.b<50) or (v3.b=33)) +let $query= + select * from v1,v2,v3,t2 where + ((v1.a=v2.a) or (v1.a=t2.a)) and ((v3.b<50) or (v3.b=33)) and (v1.max_c<500) and (v3.a=t2.a) and (v2.max_c>300); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # using several derived tables : pushing in all tables ---echo # conjunctive subformulas : pushing into HAVING -let $query= +--echo # conjunctive subformulas : pushing into HAVING +let $query= select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 where t1.a>5 group by a,b having max_c < 707) v1, @@ -532,11 +532,11 @@ let $query= eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # using several derived tables : pushing in all tables --echo # extracted or formulas : pushing into HAVING ---echo # conjunctive subformula : pushing into HAVING +--echo # conjunctive subformula : pushing into HAVING let $query= select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 @@ -550,51 +550,51 @@ let $query= eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; - +eval explain format=json $query; + --echo # extracted or formula : pushing into HAVING ---echo # conjunctive subformula : pushing into WHERE -let $query= +--echo # conjunctive subformula : pushing into WHERE +let $query= select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 - group by a,b having max_c < 707) v1, - t2 where ((v1.a=1) or (v1.max_c<300)) and (v1.b>25); + group by a,b having max_c < 707) v1, + t2 where ((v1.a=1) or (v1.max_c<300)) and (v1.b>25); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; - +eval explain format=json $query; + --echo # extracted and formula : pushing into WHERE ---echo # conjunctive subformula : pushing into HAVING -let $query= +--echo # conjunctive subformula : pushing into HAVING +let $query= select * from (select a, b, max(c) as max_c, avg(c) as avg_c from t1 - where t1.a>5 group by a,b having max_c < 707) v1, - t2 where (v1.a=t2.a) and (v1.max_c>300) and (v1.b<30); + where t1.a>5 group by a,b having max_c < 707) v1, + t2 where (v1.a=t2.a) and (v1.max_c>300) and (v1.b<30); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # using query with union --echo # conjunctive subformula : pushing into WHERE --echo # conjunctive subformulas : pushing into HAVING and WHERE -let $query= +let $query= select * from v1,t2 where (v1.a<5) and (v1.b=t2.b) and (t2.c>800) union - select * from v1,t2 where (v1.max_c>100) and (v1.a>7) and (t2.d>800); + select * from v1,t2 where (v1.max_c>100) and (v1.a>7) and (t2.d>800); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # using query with union ---echo # extracted and formula : pushing into WHERE ---echo # extracted or formula : pushing into HAVING +--echo # extracted and formula : pushing into WHERE +--echo # extracted or formula : pushing into HAVING --echo # pushing equalities -let $query= +let $query= select * from v1,t2 where (v1.a<5) and (v1.b=t2.b) and (v1.b=19) - union + union select * from v1,t2 where ((v1.max_c>400) or (v1.avg_c>270)) and (v1.a<t2.a); eval $no_pushdown $query; eval $query; @@ -602,25 +602,25 @@ eval explain $query; eval explain format=json $query; --echo # using query with union ---echo # extracted or formula : pushing into HAVING +--echo # extracted or formula : pushing into HAVING --echo # extracted or formula : pushing into WHERE --echo # pushing equalities -let $query= - select * from v1,t2 where +let $query= + select * from v1,t2 where ((t2.a=v1.a) or (v1.b=t2.b)) and ((v1.a=1) or (v1.a=6)) union - select * from v1,t2 where ((v1.a>3) and (v1.b>27)) or (v1.max_c>550); + select * from v1,t2 where ((v1.a>3) and (v1.b>27)) or (v1.max_c>550); eval $no_pushdown $query; eval $query; eval explain $query; eval explain format=json $query; --echo # using query with union ---echo # extracted or formula : pushing into HAVING ---echo # conjunctive subformulas : pushing into WHERE +--echo # extracted or formula : pushing into HAVING +--echo # conjunctive subformulas : pushing into WHERE --echo # pushing equalities -let $query= - select * from v1,t2 where +let $query= + select * from v1,t2 where ((v1.a=1) and (v1.a=t2.a)) and ((v1.max_c<500) or (v1.avg_c>500)) union select * from v2,t2 where @@ -643,8 +643,8 @@ eval explain format=json $query; --echo # using derived table with union --echo # conjunctive subformula : pushing into WHERE ---echo # extracted or formula : pushing into HAVING -let $query= +--echo # extracted or formula : pushing into HAVING +let $query= select * from v_union,t2 where ((v_union.a<2) or (v_union.c>800)) and (v_union.b>12); eval $no_pushdown $query; @@ -656,7 +656,7 @@ eval explain format=json $query; --echo # conjunctive subformula : pushing into HAVING --echo # conjunctive subformula : pushing into WHERE --echo # pushing equalities -let $query= +let $query= select * from v_union,t2 where (v_union.a=1) and (v_union.a=t2.a) and (v_union.c<200); eval $no_pushdown $query; @@ -664,215 +664,215 @@ eval $query; eval explain $query; eval explain format=json $query; -let $query= - select * from v_char as v,t2_char as t where +let $query= + select * from v_char as v,t2_char as t where (v.a=t.a) and (v.b='Vika') and (v.max_c>2); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # using derived table with union --echo # using several derived tables : pushing in all tables --echo # conjunctive subformula : pushing into WHERE using equalities --echo # pushing equalities -let $query= +let $query= select * from v_union,v1,t2 where - (v_union.a=v1.a) and (v1.a=t2.a) and (t2.a=1) - and ((v_union.c>800) or (v1.max_c>200)); + (v_union.a=v1.a) and (v1.a=t2.a) and (t2.a=1) + and ((v_union.c>800) or (v1.max_c>200)); eval $no_pushdown $query; eval $query; eval explain $query; eval explain format=json $query; ---echo # using derived table with union ---echo # extracted or formula : pushing into WHERE +--echo # using derived table with union +--echo # extracted or formula : pushing into WHERE --echo # conjunctive subformula : pushing into HAVING --echo # pushing equalities -let $query= - select * from v2_union as v,t2 where +let $query= + select * from v2_union as v,t2 where ((v.a=6) or (v.a=8)) and (v.c>200) and (v.a=t2.a); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # using derived table with union of selects without aggregation --echo # extracted conjunctive predicate: pushing in WHERE of both selects -let $query= +let $query= select * from v3_union as v,t2 where (v.a=t2.a) and (v.c>6); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # using derived table with union of selects without aggregation --echo # extracted conjunctive OR subformula: pushing in WHERE using equalities -let $query= +let $query= select * from v3_union as v,t2 where (v.a=t2.a) and ((t2.a>1) or (v.b<20)); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # using derived table with union of selects without aggregation --echo # extracted the whole condition: in WHERE of both selects -let $query= - select * from v3_union as v,t2 where +let $query= + select * from v3_union as v,t2 where (v.a=t2.a) and ((v.b=19) or (v.b=21)) and ((v.c<3) or (v.c>600)); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; ---echo # using derived table with union of +--echo # using derived table with union of --echo # a select without aggregation and a select with aggregation --echo # extracted conjunctive predicate: pushing in WHERE of both selects -let $query= +let $query= select * from v4_union as v,t2 where (v.a=t2.a) and (v.b<20); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; ---echo # using derived table with union of +--echo # using derived table with union of --echo # a select without aggregation and a select with aggregation --echo # extracted subformula: pushing in WHERE of one select --echo # extracted subformula: pushing in HAVING of the other select --echo # extracted sub-subformula: pushing in WHERE of the other select --echo # using an equality in all pushdowns -let $query= - select * from v4_union as v,t2 where +let $query= + select * from v4_union as v,t2 where (v.a=t2.a) and ((t2.a<3) or (v.b<40)) and (v.c>500); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # using embedded derived table : pushing the same conditions --echo # using several derived tables : pushing in all tables --echo # conjunctive subformula : pushing into WHERE --echo # extracted and formula : pushing into WHERE -let $query= +let $query= select * from v4,v1 where - (v4.a<13) and (v1.a>5) and (v1.b>12); + (v4.a<13) and (v1.a>5) and (v1.b>12); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # using embedded view : nothing to push --echo # using several derived tables : pushing only in one table --echo # conjunctive subformula : pushing into WHERE -let $query= +let $query= select * from v4,v1,t2 where (v4.a=t2.a) and (v4.a=v1.a) and (v1.b>30); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # using embedded view : pushing different conditions --echo # using several derived tables : pushing in all tables --echo # conjunctive subformula : pushing into WHERE using equalities --echo # extracted and formula : pushing into WHERE using equalities --echo # conjunctive subformula : pushing into HAVING -let $query= +let $query= select * from v4,v1,t2 where - (v4.a=t2.a) and (v4.a>1) and (v4.a=v1.a) and (v4.min_c>100) and (v1.b<30); + (v4.a=t2.a) and (v4.a>1) and (v4.a=v1.a) and (v4.min_c>100) and (v1.b<30); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # using embedded view : pushing different conditions --echo # using several derived tables : pushing in all tables --echo # extracted or formula : pushing into WHERE --echo # conjunctive subformula : pushing into HAVING -let $query= +let $query= select * from v4,v1,t2 where (((v4.b>10) and (v4.a>1)) or (v4.b<20)) and (v1.max_c>200) and (v1.a=v4.a); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; - +eval explain format=json $query; + --echo # using embedded view : pushing different conditions --echo # using several derived tables : pushing only in one table --echo # extracted or formula : pushing into WHERE --echo # extracted or formula : pushing into HAVING -let $query= +let $query= select * from v4,v2 where ((v4.a>12) and (v4.min_c<300) and (v4.b>13)) or (v4.a<1); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; - +eval explain format=json $query; + --echo # using embedded view : pushing different conditions --echo # using several derived tables : pushing only in one table --echo # conjunctive subformula : pushing into WHERE --echo # conjunctive subformula : pushing into HAVING --echo # pushing equalities -let $query= +let $query= select * from v4,v2 where - (v4.a=v2.b) and (v4.a=v4.b) and (v4.min_c<100); + (v4.a=v2.b) and (v4.a=v4.b) and (v4.min_c<100); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; - +eval explain format=json $query; + --echo # using embedded view : pushing the same conditions --echo # using several derived tables : pushing in all tables --echo # extracted and formula : pushing into WHERE using equalities --echo # conjunctive subformula : pushing into WHERE --echo # pushing equalities -let $query= +let $query= select * from v4,v2 where - (v4.a=v2.b) and (v4.a=v4.b) and (v2.b<30); + (v4.a=v2.b) and (v4.a=v4.b) and (v2.b<30); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # using embedded view : pushing the same conditions --echo # using several derived tables : pushing in all tables --echo # extracted or formula : pushing into WHERE using equalities --echo # extracted and formula : pushing into WHERE using equalities --echo # pushing equalities -let $query= +let $query= select * from v4,v2 where (v4.a=v2.b) and (v4.a=v4.b) and ((v2.b<30) or (v4.a>2)); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; - +eval explain format=json $query; + --echo # using embedded view : pushing the same conditions --echo # using several derived tables : pushing in all tables --echo # extracted or formula : pushing into WHERE --echo # conjunctive subformula : pushing into WHERE ---echo # pushing equalities -let $query= +--echo # pushing equalities +let $query= select * from v4,v2 where (((v4.a<12) and (v4.b>13)) or (v4.a>10)) and (v4.min_c=v2.max_c) and (v4.min_c>100); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; --echo # using embedded view : pushing the same conditions --echo # using several derived tables : pushing only in one table --echo # extracted or formula : pushing into WHERE -let $query= +let $query= select * from v4,v2,t2 where (((v4.a<12) and (t2.b>13)) or (v4.a>10)) and (v4.min_c=t2.c) and (t2.c>100); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; drop view v1,v2,v3,v4; drop view v_union,v2_union,v3_union,v4_union; @@ -880,580 +880,6 @@ drop view v_double,v_char,v_decimal; drop table t1,t2,t1_double,t2_double,t1_char,t2_char,t1_decimal,t2_decimal; --echo # ---echo # MDEV-14579: pushdown conditions into materialized views/derived tables ---echo # that are defined with EXIST or/and INTERSECT ---echo # - -create table t1 (a int, b int, c int); -create table t2 (a int, b int, c int); - -insert into t1 values - (1,21,345), (1,33,7), (8,33,114), (1,21,500), (1,19,117), (5,14,787), - (8,33,123), (9,10,211), (5,16,207), (1,33,988), (5,27,132), (1,21,104), - (6,20,309), (6,20,315), (1,21,101), (4,33,404), (9,10,800), (1,21,123); - -insert into t2 values - (2,3,207), (1,16,909), (5,14,312), - (5,33,207), (6,20,211), (1,19,132), - (8,33,117), (3,21,231), (6,23,303); - -create view v1 as - select a, b, min(c) as c from t1 - where t1.a<9 group by a,b having c < 300 - intersect - select a, b, min(c) as c from t1 - where t1.b>10 group by a,b having c > 100; - ---echo # using intersect in view definition ---echo # conjunctive subformulas : pushing into WHERE -let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a<5); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - ---echo # using intersect in view definition ---echo # conjunctive subformulas : pushing into WHERE ---echo # pushing equalities -let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a=8); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - ---echo # using intersect in view definition ---echo # conjunctive subformulas : pushing into WHERE using equalities -let $query= select * from v1,t2 where (v1.a=t2.a) and (t2.a=8); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - ---echo # using intersect in view definition ---echo # conjunctive subformulas : pushing into HAVING -let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.c>200); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - ---echo # using intersect in view definition ---echo # conjunctive subformulas : pushing into WHERE ---echo # conjunctive subformulas : pushing into HAVING -let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a<5) and (v1.c>110); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - ---echo # using intersect in view definition ---echo # extracted or formula : pushing into WHERE -let $query= - select * from v1,t2 where (v1.a=t2.a) and ((v1.b>27) or (v1.b<19)); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - ---echo # using intersect in view definition ---echo # extracted or formula : pushing into HAVING -let $query= - select * from v1,t2 where - (v1.a=t2.a) and ((v1.c>200) or (v1.c<105)); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - ---echo # using intersect in view definition ---echo # extracted or formula : pushing into WHERE ---echo # extracted or formula : pushing into HAVING using equalities ---echo # pushing equalities -let $query= - select * from v1,t2 where - ((v1.a>3) and (t2.c>110) and (v1.c=t2.c)) or - ((v1.a=1) and (v1.c<110)); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - ---echo # using intersect in view definition ---echo # prepare of a query ---echo # conjunctive subformulas : pushing into WHERE ---echo # conjunctive subformulas : pushing into HAVING -prepare stmt from "select * from v1,t2 - where (v1.a=t2.a) and (v1.a<5) and (v1.c>110);"; -execute stmt; -execute stmt; -deallocate prepare stmt; - ---echo # using intersect in derived table definition ---echo # extracted or formula : pushing into WHERE using equalities ---echo # extracted or formula : pushing into HAVING ---echo # pushing equalities -let $query= - select * - from t2, - (select a, b, min(c) as c from t1 - where t1.a<9 group by a,b having c < 300 - intersect - select a, b, min(c) as c from t1 - where t1.b>10 group by a,b having c > 100) as d1 - where - (d1.b=t2.b) and - (((t2.b>13) and (t2.c=909)) or - ((d1.a<4) and (d1.c<200))); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - -drop view v1; - -create view v1 as - select a, b, max(c) as c from t1 - where t1.a<9 group by a,b having c > 200 - except - select a, b, max(c) as c from t1 - where t1.b>10 group by a,b having c < 300; - ---echo # using except in view definition ---echo # conjunctive subformulas : pushing into WHERE -let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a<5); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - ---echo # using except in view definition ---echo # conjunctive subformulas : pushing into WHERE ---echo # pushing equalities -let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a=6); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - ---echo # using except in view definition ---echo # conjunctive subformulas : pushing into WHERE using equalities -let $query= select * from v1,t2 where (v1.a=t2.a) and (t2.a=6); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - ---echo # using except in view definition ---echo # conjunctive subformulas : pushing into HAVING -let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.c>500); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - ---echo # using except in view definition ---echo # conjunctive subformulas : pushing into WHERE ---echo # conjunctive subformulas : pushing into HAVING -let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a<5) and (v1.c>500); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - ---echo # using except in view definition ---echo # extracted or formula : pushing into WHERE -let $query= - select * from v1,t2 where (v1.a=t2.a) and ((v1.b>27) or (v1.b<19)); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - ---echo # using except in view definition ---echo # extracted or formula : pushing into HAVING -let $query= - select * from v1,t2 where - (v1.a=t2.a) and ((v1.c<400) or (v1.c>800)); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - ---echo # using except in view definition ---echo # extracted or formula : pushing into WHERE ---echo # extracted or formula : pushing into HAVING using equalities ---echo # pushing equalities -let $query= - select * from v1,t2 where - (v1.c=t2.c) and - ((v1.a>1) and (t2.c<500)) or - ((v1.a=1) and (v1.c>500)); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - ---echo # using except in view definition ---echo # prepare of a query ---echo # conjunctive subformulas : pushing into WHERE ---echo # conjunctive subformulas : pushing into HAVING -prepare stmt from "select * from v1,t2 - where (v1.a=t2.a) and (v1.a<5) and (v1.c>500);"; -execute stmt; -execute stmt; -deallocate prepare stmt; - ---echo # using except in view definition ---echo # extracted or formula : pushing into WHERE using equalities ---echo # extracted or formula : pushing into HAVING ---echo # pushing equalities -let $query= - select * - from t2, - (select a, b, max(c) as c from t1 - where t1.a<9 group by a,b having c > 200 - except - select a, b, max(c) as c from t1 - where t1.b>10 group by a,b having c < 300) as d1 - where - (d1.b=t2.b) and - (((t2.b>13) and (t2.c=988)) or - ((d1.a>4) and (d1.c>500))); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - -drop view v1; - ---echo # using union and intersect in view definition ---echo # conjunctive subformulas : pushing into WHERE and HAVING -create view v1 as - select a, b, min(c) as c from t1 - where t1.a<9 group by a,b having c > 200 - union - select a, b, max(c) as c from t1 - where t1.b>10 group by a,b having c < 300 - intersect - select a, b, max(c) as c from t1 - where t1.a>3 group by a,b having c < 530; - -let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a>5) and (v1.c>200); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - -drop view v1; - ---echo # using union and intersect in view definition ---echo # conjunctive subformulas : pushing into WHERE and HAVING -create view v1 as - select a, b, min(c) as c from t1 - where t1.a<9 group by a,b having c > 200 - intersect - select a, b, max(c) as c from t1 - where t1.a>3 group by a,b having c < 500 - union - select a, b, max(c) as c from t1 - where t1.b>10 group by a,b having c < 300; - -let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a>4) and (v1.c<200); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - -drop view v1; - ---echo # using union and except in view definition ---echo # conjunctive subformulas : pushing into WHERE and HAVING -create view v1 as - select a, b, min(c) as c from t1 - where t1.a<9 group by a,b having c > 200 - union - select a, b, max(c) as c from t1 - where t1.b>10 group by a,b having c < 300 - except - select a, b, max(c) as c from t1 - where t1.a>3 group by a,b having c < 530; - -let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a>5) and (v1.c>200); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - -drop view v1; - ---echo # using union and except in view definition ---echo # conjunctive subformulas : pushing into WHERE and HAVING -create view v1 as - select a, b, min(c) as c from t1 - where t1.a<9 group by a,b having c > 200 - except - select a, b, max(c) as c from t1 - where t1.a>3 group by a,b having c < 500 - union - select a, b, max(c) as c from t1 - where t1.b>10 group by a,b having c < 300; - -let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a>4) and (v1.c<200); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - -drop view v1; - ---echo # using except and intersect in view definition ---echo # conjunctive subformulas : pushing into WHERE and HAVING -create view v1 as - select a, b, max(c) as c from t1 - where t1.b>10 group by a,b having c < 300 - intersect - select a, b, max(c) as c from t1 - where t1.a<7 group by a,b having c < 500 - except - select a, b, max(c) as c from t1 - where t1.a<9 group by a,b having c > 150; - -let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a>4) and (v1.c<150); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - -drop view v1; - ---echo # using except and intersect in view definition ---echo # conjunctive subformulas : pushing into WHERE and HAVING -create view v1 as - select a, b, max(c) as c from t1 - where t1.b>10 group by a,b having c < 300 - except - select a, b, max(c) as c from t1 - where t1.a<9 group by a,b having c > 150 - intersect - select a, b, max(c) as c from t1 - where t1.a<7 group by a,b having c < 500; - -let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a>4) and (v1.c<130); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - -drop view v1; - ---echo # using except, intersect and union in view definition ---echo # conjunctive subformulas : pushing into WHERE and HAVING -create view v1 as - select a, b, max(c) as c from t1 - where t1.b>10 group by a,b having c < 300 - except - select a, b, max(c) as c from t1 - where t1.a<9 group by a,b having c > 150 - intersect - select a, b, max(c) as c from t1 - where t1.a<7 group by a,b having c < 500 - union - select a, b, max(c) as c from t1 - where t1.a<7 group by a,b having c < 120; - -let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a>4) and (v1.c<130); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - -drop view v1; - ---echo # using intersect in view definition ---echo # using embedded view ---echo # conjunctive subformulas : pushing into WHERE and HAVING -create view v1 as - select a, b, max(c) as c from t1 - where t1.b>10 group by a,b having c < 300 - intersect - select a, b, max(c) as c from t1 - where t1.a<9 group by a,b having c > 120; - -create view v2 as - select a, b, max(c) as c from v1 - where v1.a<7 group by a,b; - -let $query= select * from v2,t2 where (v2.a=t2.a) and (v2.a>4) and (v2.c<150); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - -drop view v1,v2; - ---echo # using except in view definition ---echo # using embedded view ---echo # conjunctive subformulas : pushing into WHERE and HAVING -create view v1 as - select a, b, max(c) as c from t1 - where t1.b>10 group by a,b having c < 300 - except - select a, b, max(c) as c from t1 - where t1.a<9 group by a,b having c > 150; - -create view v2 as - select a, b, max(c) as c from v1 - where v1.a<7 group by a,b; - -let $query= select * from v2,t2 where (v2.a=t2.a) and (v2.a>4) and (v2.c<150); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - -drop view v1,v2; - ---echo # using intersect in view definition ---echo # conditions are pushed in different parts of selects ---echo # conjunctive subformulas : pushing into WHERE and HAVING -create view v1 as - select a, b, max(c) as c from t1 - where t1.a<9 group by a having c > 300 - intersect - select a, b, max(c) as c from t1 - where t1.b<21 group by b having c > 200; - -let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a>4) and (v1.b>12) and (v1.c<450); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - -drop view v1; - ---echo # using except in view definition ---echo # conditions are pushed in different parts of selects ---echo # conjunctive subformulas : pushing into WHERE and HAVING -create view v1 as - select a, b, max(c) as c from t1 - where t1.b>20 group by a having c > 300 - except - select a, b, max(c) as c from t1 - where t1.a<7 group by b having c > 150; - -let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a<2) and (v1.b<30) and (v1.c>450); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - -drop view v1; - ---echo # using except and union in view definition ---echo # conditions are pushed in different parts of selects ---echo # conjunctive subformulas : pushing into HAVING ---echo # extracted or formula : pushing into WHERE ---echo # extracted or formula : pushing into HAVING -create view v1 as - select a, b, max(c) as c from t1 - where t1.b>20 group by a having c > 300 - except - select a, b, max(c) as c from t1 - where t1.a<7 group by b having c > 150; - -let $query= select * from v1,t2 where (v1.a=t2.a) and ((v1.a<2) or (v1.a<5)) and (v1.c>450); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - -drop view v1; - ---echo # using union and intersect in view definition ---echo # conditions are pushed in different parts of selects ---echo # conjunctive subformulas : pushing into WHERE and HAVING -create view v1 as - select a, b, max(c) as c from t1 - where t1.a<9 group by a having c > 100 - intersect - select a, b, max(c) as c from t1 - where t1.a>3 group by b having c < 800 - union - select a, b, max(c) as c from t1 - where t1.b>10 group by a,b having c > 300; - -let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a>1) and (v1.b > 12) and (v1.c>400); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - -drop view v1; - -create table t3 (a int, b int, c int); -insert into t3 values - (1,21,345), (2,33,7), (8,33,114), (3,21,500), (1,19,107), (5,14,787), - (4,33,123), (9,10,211), (11,16,207), (10,33,988), (5,27,132), (12,21,104), - (6,20,309), (16,20,315), (16,21,101), (18,33,404), (19,10,800), (10,21,123), - (17,11,708), (6,20,214); - -create index i1 on t3(a); - ---echo # conjunctive subformulas : pushing into WHERE ---echo # pushed condition gives range access -create view v1 as - select a, b, max(c) as max_c from t3 - where a>0 group by a; - -let $query= select * from v1,t2 where (v1.b=t2.b) and (v1.a<5); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - -drop view v1; - ---echo # using union in view definition ---echo # conjunctive subformulas : pushing into WHERE ---echo # pushed condition gives range access -create view v1 as - select a, b, max(c) as c from t3 - where t3.a>1 group by a - union - select a, b, max(c) as c from t3 - where t3.a>2 group by a; - -let $query= select * from v1,t2 where (v1.b=t2.b) and (v1.a<4); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - -drop view v1; - ---echo # using union in view definition ---echo # conjunctive subformulas : pushing into WHERE ---echo # pushed condition gives range access in one of the selects -create view v1 as - select a, b, max(c) as c from t3 - where t3.a>1 group by a - union - select a, b, max(c) as c from t3 - where t3.b<21 group by b; - -let $query= select * from v1,t2 where (v1.b=t2.b) and (v1.a<3); -eval $no_pushdown $query; -eval $query; -eval explain $query; -eval explain format=json $query; - -drop view v1; - -alter table t3 drop index i1; - -drop table t1,t2,t3; - ---echo # --echo # MDEV-10782: condition extracted from a multiple equality --echo # pushed into HAVING --echo # @@ -1480,8 +906,8 @@ CREATE TABLE t1 (i int) ENGINE=MyISAM; CREATE VIEW v AS SELECT 5; SELECT * FROM t1 WHERE 1 IN ( SELECT * FROM v ); DROP VIEW v; -DROP TABLE t1; - +DROP TABLE t1; + --echo # --echo # MDEV-10785: second execution of a query with condition --echo # pushed into view @@ -1510,17 +936,17 @@ select a from t1 order by a limit 5; set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from (select a from t1 order by a limit 5) t where t.a not in (1,2,3); -set statement optimizer_switch='condition_pushdown_for_derived=on' for +set statement optimizer_switch='condition_pushdown_for_derived=on' for select * from (select a from t1 order by a limit 5) t where t.a not in (1,2,3); select a from t1 where a < 4 union select a from t1 where a > 5 order by a limit 5; set statement optimizer_switch='condition_pushdown_for_derived=off' for -select * from +select * from (select a from t1 where a < 4 union select a from t1 where a > 5 order by a limit 5) t where t.a not in (2,9); -set statement optimizer_switch='condition_pushdown_for_derived=on' for -select * from +set statement optimizer_switch='condition_pushdown_for_derived=on' for +select * from (select a from t1 where a < 4 union select a from t1 where a > 5 order by a limit 5) t where t.a not in (2,9); @@ -1537,45 +963,45 @@ CREATE OR REPLACE VIEW v2 AS SELECT * FROM t2; CREATE TABLE t3 (c INT) ENGINE=MyISAM; CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v3 AS SELECT * FROM t3; -SELECT * FROM t1 WHERE a IN ( - SELECT b FROM v2 WHERE b < a OR b IN ( - SELECT c FROM v3 WHERE c = a - ) +SELECT * FROM t1 WHERE a IN ( + SELECT b FROM v2 WHERE b < a OR b IN ( + SELECT c FROM v3 WHERE c = a + ) ); INSERT INTO t1 VALUES (2); INSERT INTO t2 VALUES (3), (2); INSERT INTO t3 VALUES (4), (1), (2), (7); -SELECT * FROM t1 WHERE a IN ( - SELECT b FROM v2 WHERE b < a OR b IN ( - SELECT c FROM v3 WHERE c = a - ) +SELECT * FROM t1 WHERE a IN ( + SELECT b FROM v2 WHERE b < a OR b IN ( + SELECT c FROM v3 WHERE c = a + ) ); EXPLAIN FORMAT=JSON -SELECT * FROM t1 WHERE a IN ( - SELECT b FROM v2 WHERE b < a OR b IN ( - SELECT c FROM v3 WHERE c = a - ) +SELECT * FROM t1 WHERE a IN ( + SELECT b FROM v2 WHERE b < a OR b IN ( + SELECT c FROM v3 WHERE c = a + ) ); CREATE TABLE t4 (d INT, e INT) ENGINE=MyISAM; INSERT INTO t4 VALUES (1,10),(3,11),(2,10),(2,20),(3,21); -CREATE OR REPLACE VIEW v4 AS +CREATE OR REPLACE VIEW v4 AS SELECT d, sum(e) AS s FROM t4 GROUP BY d; -let $query = -SELECT * FROM t1 WHERE a IN ( - SELECT b FROM v2 WHERE b < a OR b IN ( - SELECT d FROM v4 WHERE s > a - ) +let $query = +SELECT * FROM t1 WHERE a IN ( + SELECT b FROM v2 WHERE b < a OR b IN ( + SELECT d FROM v4 WHERE s > a + ) ); eval $no_pushdown $query; eval $query; eval explain $query; -eval explain format=json $query; +eval explain format=json $query; DROP VIEW v2,v3,v4; DROP TABLE t1,t2,t3,t4; @@ -1588,17 +1014,17 @@ DROP TABLE t1,t2,t3,t4; CREATE TABLE t1 (a INT) ENGINE=MyISAM; INSERT INTO t1 VALUES (1); - + CREATE TABLE t2 (b INT) ENGINE=MyISAM; INSERT INTO t2 VALUES (3),(4); CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v2 AS SELECT * FROM t2; - -SELECT * FROM + +SELECT * FROM ( SELECT * FROM t1 WHERE EXISTS ( SELECT * FROM v2 WHERE b = a ) ) AS sq; EXPLAIN FORMAT=JSON -SELECT * FROM +SELECT * FROM ( SELECT * FROM t1 WHERE EXISTS ( SELECT * FROM v2 WHERE b = a ) ) AS sq; @@ -1606,18 +1032,18 @@ DROP VIEW v2; DROP TABLE t1,t2; --echo # ---echo # MDEV-11102: condition pushdown into materialized inner table ---echo # of outer join is not applied as not being valid +--echo # MDEV-11102: condition pushdown into materialized inner table +--echo # of outer join is not applied as not being valid --echo # CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (0),(2); - + CREATE TABLE t2 (b INT); INSERT INTO t2 VALUES (1),(2); - + CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v2 AS SELECT * FROM t2; - + SELECT * FROM t1 LEFT JOIN t2 ON a = b WHERE b IS NULL; SELECT * FROM t1 LEFT JOIN v2 ON a = b WHERE b IS NULL; @@ -1650,26 +1076,26 @@ DROP TABLE t1; CREATE TABLE t1 (pk1 INT PRIMARY KEY, a INT, b INT) ENGINE=MyISAM; INSERT INTO t1 VALUES (10,7,1),(11,0,2); - + CREATE TABLE t2 (pk2 INT PRIMARY KEY, c INT, d DATETIME) ENGINE=MyISAM; -INSERT INTO t2 VALUES +INSERT INTO t2 VALUES (1,4,'2008-09-27 00:34:58'), (2,5,'2007-05-28 00:00:00'), (3,6,'2009-07-25 09:21:20'); - + CREATE VIEW v1 AS SELECT * FROM t1; CREATE ALGORITHM=TEMPTABLE VIEW v2 AS SELECT * FROM t2; -SELECT * FROM v1 AS sq +SELECT * FROM v1 AS sq WHERE b IN ( SELECT pk2 FROM v2 WHERE c > sq.b ) OR b = 100; EXPLAIN FORMAT=JSON -SELECT * FROM v1 AS sq +SELECT * FROM v1 AS sq WHERE b IN ( SELECT pk2 FROM v2 WHERE c > sq.b ) OR b = 100; -SELECT * FROM ( SELECT * FROM t1 ) AS sq +SELECT * FROM ( SELECT * FROM t1 ) AS sq WHERE b IN ( SELECT pk2 FROM v2 WHERE c > sq.b ) OR b = 100; EXPLAIN FORMAT=JSON -SELECT * FROM ( SELECT * FROM t1 ) AS sq +SELECT * FROM ( SELECT * FROM t1 ) AS sq WHERE b IN ( SELECT pk2 FROM v2 WHERE c > sq.b ) OR b = 100; DROP VIEW v1,v2; @@ -1729,7 +1155,7 @@ DROP TABLE t1,t2; CREATE TABLE t (pk INT PRIMARY KEY, f INT) ENGINE=MyISAM; CREATE ALGORITHM=TEMPTABLE VIEW v AS SELECT * FROM t; INSERT INTO t VALUES (1,1),(3,2); - + SELECT * FROM v AS v1, v AS v2 WHERE v2.pk > v1.f AND v1.f IN ( SELECT COUNT(pk) FROM t ); @@ -1871,10 +1297,10 @@ DROP TABLE t1; CREATE TABLE t1 (c VARCHAR(3)); CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1; INSERT INTO t1 VALUES ('foo'),('bar'); - + CREATE TABLE t2 (c VARCHAR(3)); INSERT INTO t2 VALUES ('foo'),('xyz'); - + SELECT * FROM v1 WHERE v1.c IN ( SELECT MIN(c) FROM t2 WHERE 0 ); EXPLAIN FORMAT=JSON SELECT * FROM v1 WHERE v1.c IN ( SELECT MIN(c) FROM t2 WHERE 0 ); @@ -1885,18 +1311,18 @@ DROP TABLE t1,t2; CREATE TABLE t1 (d DECIMAL(10,2)); CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1; INSERT INTO t1 VALUES (5.37),(1.1); - + CREATE TABLE t2 (d DECIMAL(10,2)); INSERT INTO t2 VALUES ('1.1'),('2.23'); - + 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 # MDEV-11820: second execution of PS for query +--echo # with false subquery predicate in WHERE --echo # CREATE TABLE t1 (c VARCHAR(3)) ENGINE=MyISAM; @@ -1905,10 +1331,10 @@ CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1; CREATE TABLE t2 (a INT); INSERT INTO t2 VALUES (3), (4); -PREPARE stmt1 FROM +PREPARE stmt1 FROM " SELECT * FROM v1 WHERE 1 IN (SELECT a FROM t2) OR c = 'foo'"; -PREPARE stmt2 FROM -"EXPLAIN FORMAT=JSON +PREPARE stmt2 FROM +"EXPLAIN FORMAT=JSON SELECT * FROM v1 WHERE 1 IN (SELECT a FROM t2) OR c = 'foo'"; EXECUTE stmt1; EXECUTE stmt2; @@ -1921,14 +1347,14 @@ 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 +# the result here will change after the merge with the fix for mdev-11859 DEALLOCATE PREPARE stmt2; DROP VIEW v1; DROP TABLE t1,t2; --echo # ---echo # MDEV-12373: pushdown into derived with side effects is prohibited +--echo # MDEV-12373: pushdown into derived with side effects is prohibited --echo # CREATE TABLE sales_documents ( @@ -1946,9 +1372,9 @@ CREATE TABLE sales_documents ( PRIMARY KEY (id) ); -INSERT INTO sales_documents -(id, sale_id, type, order_number, data, created_at, - updated_at, date, generated, synced_at, sum) +INSERT INTO sales_documents +(id, sale_id, type, order_number, data, created_at, + updated_at, date, generated, synced_at, sum) VALUES (555, 165, 3, 5, '{}', 1486538300, 1486722835, '2017-02-17', 0, 1486538313, 2320.00), (556, 165, 2, 3, '{}', 1486538304, 1486563125, '2017-02-08', 1, 1486538302, 2320.00), @@ -2024,11 +1450,11 @@ SELECT * FROM GROUP BY t.order_number ) a, (SELECT @row := 0) r) t WHERE row <> order_number; - + DROP TABLE sales_documents; --echo # ---echo # MDEV-12845: pushdown from merged derived using equalities +--echo # MDEV-12845: pushdown from merged derived using equalities --echo # create table t1 (a int); @@ -2414,20 +1840,829 @@ eval $query; eval EXPLAIN FORMAT=JSON $query; DROP TABLE t1; -# Start of 10.3 tests +--echo # +--echo # MDEV-15087: error from inexpensive subquery before check +--echo # for condition pushdown into derived +--echo # + +CREATE TABLE t1 (i1 int, v1 varchar(1)); +INSERT INTO t1 VALUES (7,'x'); + +CREATE TABLE t2 (i1 int); +INSERT INTO t2 VALUES (8); + +CREATE TABLE t3 (i1 int ,v1 varchar(1), v2 varchar(1)); +INSERT INTO t3 VALUES (4, 'v','v'),(62,'v','k'),(7, 'n', NULL); + +--error ER_SUBQUERY_NO_1_ROW +SELECT 1 +FROM (t1 AS a1 + JOIN (((SELECT DISTINCT t3.* + FROM t3) AS a2 + JOIN t1 ON (t1.v1 = a2.v2))) ON (t1.v1 = a2.v1)) +WHERE (SELECT BIT_COUNT(t2.i1) + FROM (t2 JOIN t3)) IS NULL; + +DROP TABLE t1, t2, t3; + +--echo # +--echo # MDEV-16614 signal 7 after calling stored procedure, that uses regexp +--echo # + +DELIMITER $$; +CREATE PROCEDURE p1(m1 varchar(5), m2 varchar(5)) +BEGIN +SELECT a FROM + (SELECT "aa" a) t + JOIN (SELECT "aa" b) t1 on t.a=t1.b +WHERE t.a regexp m1 and t1.b regexp m2 +GROUP BY a; +END$$ +DELIMITER ;$$ +CALL p1('a','a'); +DROP PROCEDURE p1; + + +DELIMITER $$; +CREATE PROCEDURE p1(m1 varchar(5)) +BEGIN + SELECT a FROM (SELECT "aa" a) t WHERE t.a regexp m1; +END$$ +DELIMITER ;$$ +CALL p1('a'); +DROP PROCEDURE p1; + + +SELECT a FROM (SELECT "aa" a) t WHERE REGEXP_INSTR(t.a, (SELECT MAX('aa') FROM DUAL LIMIT 1)); + + +DELIMITER $$; +CREATE OR REPLACE FUNCTION f1(a VARCHAR(10), b VARCHAR(10)) RETURNS INT +BEGIN + RETURN 1; +END;$$ +CREATE OR REPLACE PROCEDURE p1(m1 varchar(5)) +BEGIN + SELECT a FROM (SELECT "aa" a) t WHERE f1(t.a, m1); +END$$ +DELIMITER ;$$ +CALL p1('a'); +DROP PROCEDURE p1; +DROP FUNCTION f1; + + +DELIMITER $$; +CREATE OR REPLACE FUNCTION f1(a VARCHAR(10), b VARCHAR(10)) RETURNS INT +BEGIN + RETURN 1; +END;$$ +DELIMITER ;$$ +SELECT a FROM (SELECT "aa" a) t WHERE f1(t.a, (SELECT MAX('aa') FROM DUAL LIMIT 1)); +DROP FUNCTION f1; + +--echo # +--echo # MDEV-17011: condition pushdown into materialized derived used +--echo # in INSERT SELECT, multi-table UPDATE and DELETE +--echo # + +CREATE TABLE t1 (a int ,b int) ENGINE=MyISAM; +INSERT INTO t1 VALUES + (1, 1), (1, 2), (2, 1), (2, 2), (3,1), (3,3), (4,2); + +CREATE TABLE t2 (a int) ENGINE MYISAM; +INSERT INTO t2 VALUES + (3), (7), (1), (4), (1); + +CREATE TABLE t3 (a int, b int) ENGINE MYISAM; + +let $q1= +INSERT INTO t3 +SELECT * FROM (SELECT a, count(*) as c FROM t1 GROUP BY a) t WHERE a<=2; + +eval EXPLAIN FORMAT=JSON $q1; +eval $q1; + +SELECT * FROM t3; + +let $q2= +UPDATE t2, (SELECT a, count(*) as c FROM t1 GROUP BY a) t SET t2.a=t.c+10 + WHERE t2.a= t.c and t.a>=3; + +eval EXPLAIN FORMAT=JSON $q2; +eval $q2; + +SELECT * FROM t2; + +let $q3= +DELETE t2 FROM t2, (SELECT a, count(*) as c FROM t1 GROUP BY a) t + WHERE t2.a= t.c+9 and t.a=2; + +eval EXPLAIN FORMAT=JSON $q3; +eval $q3; + +SELECT * FROM t2; + +DROP TABLE t1,t2,t3; + +--echo # +--echo # MDEV-16765: pushdown condition with the CASE structure +--echo # defined with Item_cond item +--echo # + +CREATE TABLE t1(a INT, b INT); +INSERT INTO t1 VALUES (1,2), (3,4), (2,3); + +LET $query= +SELECT * +FROM +( + SELECT CASE WHEN ((tab2.max_a=1) OR (tab2.max_a=2)) + THEN 1 ELSE 0 END AS max_a,b + FROM (SELECT MAX(a) as max_a,b FROM t1 GROUP BY t1.b) AS tab2 +) AS tab1 +WHERE (tab1.max_a=1); +EVAL $query; +EVAL EXPLAIN FORMAT=JSON $query; + +LET $query= +SELECT * +FROM +( + SELECT CASE WHEN ((tab2.max_a=1) OR ((tab2.max_a>2) AND (tab2.max_a<4))) + THEN 1 ELSE 0 END AS max_a,b + FROM (SELECT MAX(a) as max_a,b FROM t1 GROUP BY t1.b) AS tab2 +) AS tab1 +WHERE (tab1.max_a=1); +EVAL $query; +EVAL EXPLAIN FORMAT=JSON $query; + +LET $query= +SELECT * +FROM +( + SELECT CASE WHEN ((tab2.max_a>1) AND ((tab2.max_a=2) OR (tab2.max_a>2))) + THEN 1 ELSE 0 END AS max_a,b + FROM (SELECT MAX(a) as max_a,b FROM t1 GROUP BY t1.b) AS tab2 +) AS tab1 +WHERE (tab1.max_a=1); +EVAL $query; +EVAL EXPLAIN FORMAT=JSON $query; + +LET $query= +SELECT * +FROM +( + SELECT CASE WHEN ((tab2.b=2) OR (tab2.b=4)) + THEN 1 ELSE 0 END AS max_a,b + FROM (SELECT MAX(a) as max_a,b FROM t1 GROUP BY t1.b) AS tab2 +) AS tab1 +WHERE (tab1.max_a=1); +EVAL $query; +EVAL EXPLAIN FORMAT=JSON $query; + +DROP TABLE t1; + +--echo # +--echo # MDEV-16803: pushdown condition with IN predicate in the derived table +--echo # defined with several SELECT statements +--echo # + +CREATE TABLE t1 (a INT, b INT); +INSERT INTO t1 VALUES (1,2),(3,2),(1,1); + +SELECT * FROM +( + SELECT a,b,1 as c + FROM t1 + UNION ALL + SELECT a,b,2 as c + FROM t1 +) AS tab +WHERE ((a,b) IN ((1,2),(3,2))); + +DROP TABLE t1; --echo # ---echo # MDEV-10855: Pushdown into derived with window functions +--echo # MDEV-17354: INSERT SELECT with condition pushdown into derived +--echo # + +CREATE TABLE t1 (f INT NOT NULL); +INSERT INTO t1 VALUES (3), (7), (3); + +CREATE ALGORITHM= TEMPTABLE VIEW v1 AS SELECT * FROM ( SELECT * FROM t1 ) AS sq; + +let $q1= +INSERT INTO t1 +SELECT * FROM ( SELECT t1.f FROM v1 JOIN t1 ) AS t WHERE f IS NOT NULL; + +eval $q1; +eval EXPLAIN $q1; +eval EXPLAIN FORMAT=JSON $q1; +SELECT * FROM t1; + +DELETE FROM t1; +INSERT INTO t1 VALUES (3), (7), (3); + +let $q2= +INSERT INTO t1 +SELECT * FROM ( SELECT t1.f FROM v1 JOIN t1 ON v1.f=t1.f) AS t + WHERE f IS NOT NULL; + +eval $q2; +eval EXPLAIN FORMAT=JSON $q2; +SELECT * FROM t1; + +DROP VIEW v1; +DROP TABLE t1; + +--echo # End of 10.2 tests + +--echo # +--echo # MDEV-14579: pushdown conditions into materialized views/derived tables +--echo # that are defined with EXIST or/and INTERSECT +--echo # + +create table t1 (a int, b int, c int); +create table t2 (a int, b int, c int); + +insert into t1 values + (1,21,345), (1,33,7), (8,33,114), (1,21,500), (1,19,117), (5,14,787), + (8,33,123), (9,10,211), (5,16,207), (1,33,988), (5,27,132), (1,21,104), + (6,20,309), (6,20,315), (1,21,101), (4,33,404), (9,10,800), (1,21,123); + +insert into t2 values + (2,3,207), (1,16,909), (5,14,312), + (5,33,207), (6,20,211), (1,19,132), + (8,33,117), (3,21,231), (6,23,303); + +create view v1 as + select a, b, min(c) as c from t1 + where t1.a<9 group by a,b having c < 300 + intersect + select a, b, min(c) as c from t1 + where t1.b>10 group by a,b having c > 100; + +--echo # using intersect in view definition +--echo # conjunctive subformulas : pushing into WHERE +let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a<5); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +--echo # using intersect in view definition +--echo # conjunctive subformulas : pushing into WHERE +--echo # pushing equalities +let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a=8); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +--echo # using intersect in view definition +--echo # conjunctive subformulas : pushing into WHERE using equalities +let $query= select * from v1,t2 where (v1.a=t2.a) and (t2.a=8); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +--echo # using intersect in view definition +--echo # conjunctive subformulas : pushing into HAVING +let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.c>200); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +--echo # using intersect in view definition +--echo # conjunctive subformulas : pushing into WHERE +--echo # conjunctive subformulas : pushing into HAVING +let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a<5) and (v1.c>110); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +--echo # using intersect in view definition +--echo # extracted or formula : pushing into WHERE +let $query= + select * from v1,t2 where (v1.a=t2.a) and ((v1.b>27) or (v1.b<19)); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +--echo # using intersect in view definition +--echo # extracted or formula : pushing into HAVING +let $query= + select * from v1,t2 where + (v1.a=t2.a) and ((v1.c>200) or (v1.c<105)); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +--echo # using intersect in view definition +--echo # extracted or formula : pushing into WHERE +--echo # extracted or formula : pushing into HAVING using equalities +--echo # pushing equalities +let $query= + select * from v1,t2 where + ((v1.a>3) and (t2.c>110) and (v1.c=t2.c)) or + ((v1.a=1) and (v1.c<110)); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +--echo # using intersect in view definition +--echo # prepare of a query +--echo # conjunctive subformulas : pushing into WHERE +--echo # conjunctive subformulas : pushing into HAVING +prepare stmt from "select * from v1,t2 + where (v1.a=t2.a) and (v1.a<5) and (v1.c>110);"; +execute stmt; +execute stmt; +deallocate prepare stmt; + +--echo # using intersect in derived table definition +--echo # extracted or formula : pushing into WHERE using equalities +--echo # extracted or formula : pushing into HAVING +--echo # pushing equalities +let $query= + select * + from t2, + (select a, b, min(c) as c from t1 + where t1.a<9 group by a,b having c < 300 + intersect + select a, b, min(c) as c from t1 + where t1.b>10 group by a,b having c > 100) as d1 + where + (d1.b=t2.b) and + (((t2.b>13) and (t2.c=909)) or + ((d1.a<4) and (d1.c<200))); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +drop view v1; + +create view v1 as + select a, b, max(c) as c from t1 + where t1.a<9 group by a,b having c > 200 + except + select a, b, max(c) as c from t1 + where t1.b>10 group by a,b having c < 300; + +--echo # using except in view definition +--echo # conjunctive subformulas : pushing into WHERE +let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a<5); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +--echo # using except in view definition +--echo # conjunctive subformulas : pushing into WHERE +--echo # pushing equalities +let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a=6); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +--echo # using except in view definition +--echo # conjunctive subformulas : pushing into WHERE using equalities +let $query= select * from v1,t2 where (v1.a=t2.a) and (t2.a=6); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +--echo # using except in view definition +--echo # conjunctive subformulas : pushing into HAVING +let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.c>500); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +--echo # using except in view definition +--echo # conjunctive subformulas : pushing into WHERE +--echo # conjunctive subformulas : pushing into HAVING +let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a<5) and (v1.c>500); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +--echo # using except in view definition +--echo # extracted or formula : pushing into WHERE +let $query= + select * from v1,t2 where (v1.a=t2.a) and ((v1.b>27) or (v1.b<19)); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +--echo # using except in view definition +--echo # extracted or formula : pushing into HAVING +let $query= + select * from v1,t2 where + (v1.a=t2.a) and ((v1.c<400) or (v1.c>800)); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +--echo # using except in view definition +--echo # extracted or formula : pushing into WHERE +--echo # extracted or formula : pushing into HAVING using equalities +--echo # pushing equalities +let $query= + select * from v1,t2 where + (v1.c=t2.c) and + ((v1.a>1) and (t2.c<500)) or + ((v1.a=1) and (v1.c>500)); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +--echo # using except in view definition +--echo # prepare of a query +--echo # conjunctive subformulas : pushing into WHERE +--echo # conjunctive subformulas : pushing into HAVING +prepare stmt from "select * from v1,t2 + where (v1.a=t2.a) and (v1.a<5) and (v1.c>500);"; +execute stmt; +execute stmt; +deallocate prepare stmt; + +--echo # using except in view definition +--echo # extracted or formula : pushing into WHERE using equalities +--echo # extracted or formula : pushing into HAVING +--echo # pushing equalities +let $query= + select * + from t2, + (select a, b, max(c) as c from t1 + where t1.a<9 group by a,b having c > 200 + except + select a, b, max(c) as c from t1 + where t1.b>10 group by a,b having c < 300) as d1 + where + (d1.b=t2.b) and + (((t2.b>13) and (t2.c=988)) or + ((d1.a>4) and (d1.c>500))); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +drop view v1; + +--echo # using union and intersect in view definition +--echo # conjunctive subformulas : pushing into WHERE and HAVING +create view v1 as + select a, b, min(c) as c from t1 + where t1.a<9 group by a,b having c > 200 + union + select a, b, max(c) as c from t1 + where t1.b>10 group by a,b having c < 300 + intersect + select a, b, max(c) as c from t1 + where t1.a>3 group by a,b having c < 530; + +let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a>5) and (v1.c>200); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +drop view v1; + +--echo # using union and intersect in view definition +--echo # conjunctive subformulas : pushing into WHERE and HAVING +create view v1 as + select a, b, min(c) as c from t1 + where t1.a<9 group by a,b having c > 200 + intersect + select a, b, max(c) as c from t1 + where t1.a>3 group by a,b having c < 500 + union + select a, b, max(c) as c from t1 + where t1.b>10 group by a,b having c < 300; + +let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a>4) and (v1.c<200); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +drop view v1; + +--echo # using union and except in view definition +--echo # conjunctive subformulas : pushing into WHERE and HAVING +create view v1 as + select a, b, min(c) as c from t1 + where t1.a<9 group by a,b having c > 200 + union + select a, b, max(c) as c from t1 + where t1.b>10 group by a,b having c < 300 + except + select a, b, max(c) as c from t1 + where t1.a>3 group by a,b having c < 530; + +let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a>5) and (v1.c>200); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +drop view v1; + +--echo # using union and except in view definition +--echo # conjunctive subformulas : pushing into WHERE and HAVING +create view v1 as + select a, b, min(c) as c from t1 + where t1.a<9 group by a,b having c > 200 + except + select a, b, max(c) as c from t1 + where t1.a>3 group by a,b having c < 500 + union + select a, b, max(c) as c from t1 + where t1.b>10 group by a,b having c < 300; + +let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a>4) and (v1.c<200); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +drop view v1; + +--echo # using except and intersect in view definition +--echo # conjunctive subformulas : pushing into WHERE and HAVING +create view v1 as + select a, b, max(c) as c from t1 + where t1.b>10 group by a,b having c < 300 + intersect + select a, b, max(c) as c from t1 + where t1.a<7 group by a,b having c < 500 + except + select a, b, max(c) as c from t1 + where t1.a<9 group by a,b having c > 150; + +let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a>4) and (v1.c<150); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +drop view v1; + +--echo # using except and intersect in view definition +--echo # conjunctive subformulas : pushing into WHERE and HAVING +create view v1 as + select a, b, max(c) as c from t1 + where t1.b>10 group by a,b having c < 300 + except + select a, b, max(c) as c from t1 + where t1.a<9 group by a,b having c > 150 + intersect + select a, b, max(c) as c from t1 + where t1.a<7 group by a,b having c < 500; + +let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a>4) and (v1.c<130); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +drop view v1; + +--echo # using except, intersect and union in view definition +--echo # conjunctive subformulas : pushing into WHERE and HAVING +create view v1 as + select a, b, max(c) as c from t1 + where t1.b>10 group by a,b having c < 300 + except + select a, b, max(c) as c from t1 + where t1.a<9 group by a,b having c > 150 + intersect + select a, b, max(c) as c from t1 + where t1.a<7 group by a,b having c < 500 + union + select a, b, max(c) as c from t1 + where t1.a<7 group by a,b having c < 120; + +let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a>4) and (v1.c<130); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +drop view v1; + +--echo # using intersect in view definition +--echo # using embedded view +--echo # conjunctive subformulas : pushing into WHERE and HAVING +create view v1 as + select a, b, max(c) as c from t1 + where t1.b>10 group by a,b having c < 300 + intersect + select a, b, max(c) as c from t1 + where t1.a<9 group by a,b having c > 120; + +create view v2 as + select a, b, max(c) as c from v1 + where v1.a<7 group by a,b; + +let $query= select * from v2,t2 where (v2.a=t2.a) and (v2.a>4) and (v2.c<150); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +drop view v1,v2; + +--echo # using except in view definition +--echo # using embedded view +--echo # conjunctive subformulas : pushing into WHERE and HAVING +create view v1 as + select a, b, max(c) as c from t1 + where t1.b>10 group by a,b having c < 300 + except + select a, b, max(c) as c from t1 + where t1.a<9 group by a,b having c > 150; + +create view v2 as + select a, b, max(c) as c from v1 + where v1.a<7 group by a,b; + +let $query= select * from v2,t2 where (v2.a=t2.a) and (v2.a>4) and (v2.c<150); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +drop view v1,v2; + +--echo # using intersect in view definition +--echo # conditions are pushed in different parts of selects +--echo # conjunctive subformulas : pushing into WHERE and HAVING +create view v1 as + select a, b, max(c) as c from t1 + where t1.a<9 group by a having c > 300 + intersect + select a, b, max(c) as c from t1 + where t1.b<21 group by b having c > 200; + +let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a>4) and (v1.b>12) and (v1.c<450); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +drop view v1; + +--echo # using except in view definition +--echo # conditions are pushed in different parts of selects +--echo # conjunctive subformulas : pushing into WHERE and HAVING +create view v1 as + select a, b, max(c) as c from t1 + where t1.b>20 group by a having c > 300 + except + select a, b, max(c) as c from t1 + where t1.a<7 group by b having c > 150; + +let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a<2) and (v1.b<30) and (v1.c>450); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +drop view v1; + +--echo # using except and union in view definition +--echo # conditions are pushed in different parts of selects +--echo # conjunctive subformulas : pushing into HAVING +--echo # extracted or formula : pushing into WHERE +--echo # extracted or formula : pushing into HAVING +create view v1 as + select a, b, max(c) as c from t1 + where t1.b>20 group by a having c > 300 + except + select a, b, max(c) as c from t1 + where t1.a<7 group by b having c > 150; + +let $query= select * from v1,t2 where (v1.a=t2.a) and ((v1.a<2) or (v1.a<5)) and (v1.c>450); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +drop view v1; + +--echo # using union and intersect in view definition +--echo # conditions are pushed in different parts of selects +--echo # conjunctive subformulas : pushing into WHERE and HAVING +create view v1 as + select a, b, max(c) as c from t1 + where t1.a<9 group by a having c > 100 + intersect + select a, b, max(c) as c from t1 + where t1.a>3 group by b having c < 800 + union + select a, b, max(c) as c from t1 + where t1.b>10 group by a,b having c > 300; + +let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.a>1) and (v1.b > 12) and (v1.c>400); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +drop view v1; + +create table t3 (a int, b int, c int); +insert into t3 values + (1,21,345), (2,33,7), (8,33,114), (3,21,500), (1,19,107), (5,14,787), + (4,33,123), (9,10,211), (11,16,207), (10,33,988), (5,27,132), (12,21,104), + (6,20,309), (16,20,315), (16,21,101), (18,33,404), (19,10,800), (10,21,123), + (17,11,708), (6,20,214); + +create index i1 on t3(a); + +--echo # conjunctive subformulas : pushing into WHERE +--echo # pushed condition gives range access +create view v1 as + select a, b, max(c) as max_c from t3 + where a>0 group by a; + +let $query= select * from v1,t2 where (v1.b=t2.b) and (v1.a<5); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +drop view v1; + +--echo # using union in view definition +--echo # conjunctive subformulas : pushing into WHERE +--echo # pushed condition gives range access +create view v1 as + select a, b, max(c) as c from t3 + where t3.a>1 group by a + union + select a, b, max(c) as c from t3 + where t3.a>2 group by a; + +let $query= select * from v1,t2 where (v1.b=t2.b) and (v1.a<4); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +drop view v1; + +--echo # using union in view definition +--echo # conjunctive subformulas : pushing into WHERE +--echo # pushed condition gives range access in one of the selects +create view v1 as + select a, b, max(c) as c from t3 + where t3.a>1 group by a + union + select a, b, max(c) as c from t3 + where t3.b<21 group by b; + +let $query= select * from v1,t2 where (v1.b=t2.b) and (v1.a<3); +eval $no_pushdown $query; +eval $query; +eval explain $query; +eval explain format=json $query; + +drop view v1; + +alter table t3 drop index i1; + +drop table t1,t2,t3; + +--echo # +--echo # MDEV-10855: Pushdown into derived with window functions --echo # set @save_optimizer_switch= @@optimizer_switch; set optimizer_switch='split_materialized=off'; - + create table t1 (a int, c varchar(16)); insert into t1 values (8,'aa'), (5,'cc'), (1,'bb'), (2,'aa'), (9,'cc'), (7,'aa'), (2,'aa'), (7,'bb'); - + create table t2 (a int, b int, c varchar(16), index idx(a,c)); insert into t2 values (7,10,'cc'), (1,20,'aa'), (2,23,'bb'), (7,18,'cc'), (1,30,'bb'), @@ -2439,27 +2674,31 @@ let $q1= select * from (select a, c, sum(b) over (partition by a,c) from t2) as t where t.a > 2 and t.c in ('aa','bb','cc'); +--sorted_result eval $no_pushdown $q1; +--sorted_result eval $q1; eval explain $q1; eval explain format=json $q1; let $q2= select * from -( +( select 1 as n, a, c, sum(b) over (partition by a,c) as s from t2 union all select 2 as n, a, c, sum(b) over (partition by a) as s from t2 ) as t where t.a > 2 and t.c in ('aa','bb','cc'); +--sorted_result eval $no_pushdown $q2; +--sorted_result eval $q2; eval explain $q2; eval explain format=json $q2; let $q3= -select * +select * from (select a, c, sum(b) over (partition by a,c) as s from t2) as t, t1 where t1.a=t.a and t1.c=t.c and t1.c in ('aa','bb','cc'); @@ -2467,10 +2706,10 @@ eval $no_pushdown $q3; eval $q3; eval explain $q3; eval explain format=json $q3; - + let $q4= select * from -( +( select 1 as n, a, c, sum(b) over (partition by a,c) as s from t2 union all select 2 as n, a, c, sum(b) over (partition by a) as s from t2 @@ -2479,7 +2718,9 @@ select * from ) as t where t.a > 2 and t.c in ('aa','bb','cc'); +--sorted_result eval $no_pushdown $q4; +--sorted_result eval $q4; eval explain $q4; eval explain format=json $q4; @@ -2491,7 +2732,9 @@ select * from (select a, c, from t2 ) as t where t.a > 2 and t.c in ('aa','bb','cc'); +--sorted_result eval $no_pushdown $q5; +--sorted_result eval $q5; eval explain $q5; eval explain format=json $q5; @@ -2503,7 +2746,9 @@ select * from (select a, c, from t2 ) as t where t.a > 2 and t.c in ('aa','bb','cc'); +--sorted_result eval $no_pushdown $q6; +--sorted_result eval $q6; eval explain $q6; eval explain format=json $q6; @@ -2515,7 +2760,9 @@ select * from (select a, c, from t2 ) as t where t.a > 2 and t.c in ('aa','bb','cc'); +--sorted_result eval $no_pushdown $q7; +--sorted_result eval $q7; eval explain $q7; eval explain format=json $q7; @@ -2525,14 +2772,14 @@ drop table t1,t2; set optimizer_switch= @save_optimizer_switch; --echo # ---echo # MDEV-13369: Optimization for equi-joins of grouping derived tables +--echo # MDEV-13369: Optimization for equi-joins of grouping derived tables --echo # (Splitting derived tables / views with GROUP BY) --echo # MDEV-13389: Optimization for equi-joins of derived tables with WF --echo # (Splitting derived tables / views with window functions) --echo # let -$no_splitting= set statement optimizer_switch='split_materialized=off' for; +$no_splitting= set statement optimizer_switch='split_materialized=off' for; create table t1 (a int, b int, index idx_b(b)) engine=myisam; insert into t1 values @@ -2605,7 +2852,7 @@ insert into t3 values (8,11,'aa'), (5,15,'cc'), (1,14,'bb'), (2,12,'aa'), (7,17,'cc'), (7,18,'aa'), (2,11,'aa'), (7,10,'bb'), (3,11,'dd'), (4,12,'ee'), (5,14,'dd'), (9,12,'ee'); - + create table t4 (a int, b int, c char(127), index idx(a,c)) engine=myisam; insert into t4 values (7,10,'cc'), (1,20,'aa'), (2,23,'bb'), (7,18,'cc'), (1,30,'bb'), @@ -2627,7 +2874,7 @@ where t3.b > 15; eval $no_splitting $q3; eval $q3; eval explain extended $q3; -eval explain format=json $q3; +eval explain format=json $q3; let $q30= select t3.a,t3.c,t.max,t.min @@ -2639,7 +2886,7 @@ where t3.b <= 15; eval $no_splitting $q30; eval $q30; eval explain extended $q30; -eval explain format=json $q30; +eval explain format=json $q30; let $q4= select t3.a,t3.c,t.max,t.min @@ -2651,7 +2898,7 @@ where t3.b > 15; eval $no_splitting $q4; eval $q4; eval explain extended $q4; -eval explain format=json $q4; +eval explain format=json $q4; let $q40= select t3.a,t3.c,t.max,t.min @@ -2663,7 +2910,7 @@ where t3.b <= 15; eval $no_splitting $q40; eval $q40; eval explain extended $q40; -eval explain format=json $q40; +eval explain format=json $q40; drop index idx_a on t2; create index idx on t2(c,b); @@ -2681,7 +2928,9 @@ select t2.a,t2.b,t2.c,t.c as t_c,t.max,t.min from t2, t3, (select c, max(b) max, min(b) min from t4 group by c) t where t2.b between 80 and 85 and t2.c in ('y','z') and t2.a=t3.a and t3.c=t.c; +--sorted_result eval $no_splitting $q5; +--sorted_result eval $q5; eval explain extended $q5; eval explain format=json $q5; @@ -2701,7 +2950,9 @@ select * from t2, t3, (select c, b, sum(b) over (partition by c) from t4 ) t where t2.b between 80 and 85 and t2.c in ('y','z') and t2.a=t3.a and t3.c=t.c; +--sorted_result eval $no_splitting $q6; +--sorted_result eval $q6; eval explain extended $q6; eval explain format=json $q6; @@ -2711,7 +2962,9 @@ select * from t2, t3, (select c, b, sum(b) over (partition by c) from t4 ) t where t2.b < 40 and t2.a=t3.a and t3.c=t.c; +--sorted_result eval $no_splitting $q60; +--sorted_result eval $q60; eval explain extended $q60; eval explain format=json $q60; @@ -2879,6 +3132,7 @@ cte as (select median(f2) over (partition by f1) as k1 from t1 order by f1), cte1 as (select median(f4) over (partition by f1) as k2 from t1) select k1,k2 from cte1, cte; +--sorted_result eval $q; eval explain $q; @@ -2906,3 +3160,79 @@ SELECT * FROM ( SELECT STRAIGHT_JOIN f, COUNT(*) as c FROM v1 GROUP BY f ) AS s; DROP VIEW v1; DROP TABLE t1; + +--echo # +--echo # MDEV-16801: splittable materialized derived/views with +--echo # one grouping field from table without keys +--echo # + +CREATE TABLE t1 (a int, b int, INDEX idx_a(a), INDEX idx_b(b)) ENGINE=MYISAM; +CREATE TABLE t2 (c int) ENGINE=MYISAM; +CREATE TABLE t3 (d int) ENGINE=MYISAM; +INSERT INTO t1 VALUES + (77,7), (11,1), (33,3), (44,4), (8,88), + (78,7), (98,9), (38,3), (28,2), (79,7), + (58,5), (42,4), (71,7), (27,2), (91,9); +INSERT INTO t1 SELECT a+100, b+10 FROM t1; +INSERT INTO t2 VALUES + (100), (700), (200), (100), (200); +INSERT INTO t3 VALUES + (3), (4), (1), (8), (3); + +ANALYZE tables t1,t2,t3; + +let $q= +SELECT * + FROM t3, + (SELECT t1.b, t2.c + FROM t1, t2 + GROUP BY t1.b,t2.c) dt +WHERE t3.d = dt.b; + +eval $q; +eval EXPLAIN EXTENDED $q; + +DROP TABLE t1,t2,t3; + +--echo # +--echo # MDEV-17419: splittable materialized derived/view +--echo # when join_cache_level = 4 +--echo # + +set join_cache_level = 4; + +CREATE TABLE t1 ( + id INT UNSIGNED NOT NULL AUTO_INCREMENT, + username VARCHAR(50) NULL DEFAULT '0', + PRIMARY KEY (id) +) COLLATE='utf8_general_ci'; + +CREATE TABLE t2 ( + id INT UNSIGNED NOT NULL AUTO_INCREMENT, + userid INT UNSIGNED NOT NULL, + logindate DATETIME NOT NULL, + PRIMARY KEY (id) +) COLLATE='utf8_general_ci'; + +INSERT INTO t1 (id, username) VALUES + (1,"user1"), (2, "user2"); +INSERT INTO t2 (id, userid, logindate) VALUES + (1,1,"2015-06-19 12:17:02.828"), + (2,1,"2016-06-19 12:17:02.828"), + (3,2,"2017-06-19 12:17:02.828"), + (4,2,"2018-06-19 12:17:02.828"); + +let $q= +select * from t1 as u + left join + (select * from t2 as au group by au.userid) as auditlastlogin + on u.id=auditlastlogin.userid; + +eval EXPLAIN $q; +eval $q; + +set join_cache_level=default; + +DROP TABLE t1,t2; + +--echo # End of 10.3 tests diff --git a/mysql-test/main/derived_opt.result b/mysql-test/main/derived_opt.result index 6e4ea1b5d36..48ac7e62653 100644 --- a/mysql-test/main/derived_opt.result +++ b/mysql-test/main/derived_opt.result @@ -499,9 +499,45 @@ where D1.a= t1.a; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 10 Using where -1 PRIMARY <derived2> hash_ALL key0 #hash#key0 5 test.t1.a 100 Using join buffer (flat, BNLH join) +1 PRIMARY <derived2> ref key0 key0 5 test.t1.a 10 2 DERIVED t2 ALL NULL NULL NULL NULL 100 Using filesort set join_cache_level=@tmp_jcl; set optimizer_switch=@tmp_os; drop table t1, t2; +# +# Bug mdev-17382: equi-join of derived table with join_cache_level=4 +# +CREATE TABLE t1 ( +id int NOT NULL, +amount decimal DEFAULT NULL, +PRIMARY KEY (id) +); +CREATE TABLE t2 ( +id int NOT NULL, +name varchar(50) DEFAULT NULL, +PRIMARY KEY (id) +); +INSERT INTO t1 VALUES +(1, 10.0000), (2, 20.0000), (3, 30.0000), (4, 40.0000), +(5, NULL), (6, NULL), (7, 70.0000), (8, 80.0000); +INSERT INTO t2 VALUES +(1,'A'), (2,'B'), (3,'C'), (4,'D'), (5, NULL), (6, NULL), +(7,'E'), (8,'F'), (9,'G'), (10,'H'), (11, NULL), (12, NULL); +set @save_optimizer_switch= @@optimizer_switch; +set optimizer_switch='split_materialized=off'; +set join_cache_level=4; +EXPLAIN +SELECT t2.id,t2.name,t.total_amt +FROM t2 +LEFT JOIN +(SELECT id, sum(amount) total_amt FROM t1 GROUP BY id) AS t +ON t2.id=t.id +WHERE t2.id < 3; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 range PRIMARY PRIMARY 4 NULL 3 Using index condition +1 PRIMARY <derived2> ref key0 key0 5 test.t2.id 2 +2 DERIVED t1 ALL NULL NULL NULL NULL 8 Using temporary; Using filesort +set join_cache_level=default; +set optimizer_switch= @save_optimizer_switch; +DROP TABLE t1,t2; set optimizer_switch=@exit_optimizer_switch; diff --git a/mysql-test/main/derived_opt.test b/mysql-test/main/derived_opt.test index 7f19553e4e5..eccf4c13020 100644 --- a/mysql-test/main/derived_opt.test +++ b/mysql-test/main/derived_opt.test @@ -363,5 +363,48 @@ set join_cache_level=@tmp_jcl; set optimizer_switch=@tmp_os; drop table t1, t2; +--echo # +--echo # Bug mdev-17382: equi-join of derived table with join_cache_level=4 +--echo # + +CREATE TABLE t1 ( + id int NOT NULL, + amount decimal DEFAULT NULL, +PRIMARY KEY (id) +); + +CREATE TABLE t2 ( + id int NOT NULL, + name varchar(50) DEFAULT NULL, +PRIMARY KEY (id) +); + +INSERT INTO t1 VALUES +(1, 10.0000), (2, 20.0000), (3, 30.0000), (4, 40.0000), +(5, NULL), (6, NULL), (7, 70.0000), (8, 80.0000); + +INSERT INTO t2 VALUES +(1,'A'), (2,'B'), (3,'C'), (4,'D'), (5, NULL), (6, NULL), +(7,'E'), (8,'F'), (9,'G'), (10,'H'), (11, NULL), (12, NULL); + +set @save_optimizer_switch= @@optimizer_switch; +set optimizer_switch='split_materialized=off'; + +set join_cache_level=4; + +EXPLAIN +SELECT t2.id,t2.name,t.total_amt + FROM t2 + LEFT JOIN + (SELECT id, sum(amount) total_amt FROM t1 GROUP BY id) AS t + ON t2.id=t.id + WHERE t2.id < 3; + +set join_cache_level=default; + +set optimizer_switch= @save_optimizer_switch; + +DROP TABLE t1,t2; + # The following command must be the last one the file set optimizer_switch=@exit_optimizer_switch; diff --git a/mysql-test/main/derived_split_innodb.result b/mysql-test/main/derived_split_innodb.result new file mode 100644 index 00000000000..21dbd494e4b --- /dev/null +++ b/mysql-test/main/derived_split_innodb.result @@ -0,0 +1,101 @@ +# +# MDEV-16917: do not use splitting for derived with join cache +# +CREATE TABLE t1 ( +n1 int(10) NOT NULL, +n2 int(10) NOT NULL, +c1 char(1) NOT NULL, +KEY c1 (c1), +KEY n1_c1_n2 (n1,c1,n2) +) ENGINE=InnoDB; +INSERT INTO t1 VALUES (0, 2, 'a'), (1, 3, 'a'); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +EXPLAIN SELECT t1.n1 FROM t1, (SELECT n1, n2 FROM t1 WHERE c1 = 'a' GROUP BY n1) as t +WHERE t.n1 = t1.n1 AND t.n2 = t1.n2 AND c1 = 'a' GROUP BY n1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 index c1,n1_c1_n2 n1_c1_n2 9 NULL 2 Using where; Using index +1 PRIMARY <derived2> ref key0 key0 8 test.t1.n1,test.t1.n2 2 +2 LATERAL DERIVED t1 ref c1,n1_c1_n2 n1_c1_n2 4 test.t1.n1 1 Using where; Using index +SELECT t1.n1 FROM t1, (SELECT n1, n2 FROM t1 WHERE c1 = 'a' GROUP BY n1) as t +WHERE t.n1 = t1.n1 AND t.n2 = t1.n2 AND c1 = 'a' GROUP BY n1; +n1 +0 +1 +DROP TABLE t1; +# +# MDEV-17211: splittable materialized derived joining 3 tables with +# GROUP BY list containing fields from 2 of them +# +CREATE TABLE t1 ( +id1 int, i1 int, id2 int, +PRIMARY KEY (id1), KEY (i1), KEY (id2) +) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1,1,1); +CREATE TABLE t2 (id2 int, i2 int) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1, 1); +CREATE TABLE t3 (id3 int, i3 int, PRIMARY KEY (id3)) ENGINE=InnoDB; +INSERT INTO t3 VALUES (1,1); +EXPLAIN SELECT id3 +FROM (SELECT t3.id3, t2.i2, t1.id2 FROM t3,t1,t2 +WHERE t3.i3=t1.id1 AND t2.id2=t1.id2 +GROUP BY t3.id3, t1.id2) AS t, +t2 +WHERE t2.id2=t.id2; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 1 Using where +1 PRIMARY <derived2> ref key0 key0 5 test.t2.id2 2 +2 DERIVED t3 ALL NULL NULL NULL NULL 1 Using where; Using temporary; Using filesort +2 DERIVED t1 eq_ref PRIMARY,id2 PRIMARY 4 test.t3.i3 1 +2 DERIVED t2 ALL NULL NULL NULL NULL 1 Using where; Using join buffer (flat, BNL join) +SELECT id3 +FROM (SELECT t3.id3, t2.i2, t1.id2 FROM t3,t1,t2 +WHERE t3.i3=t1.id1 AND t2.id2=t1.id2 +GROUP BY t3.id3, t1.id2) AS t, +t2 +WHERE t2.id2=t.id2; +id3 +1 +DROP TABLE t1,t2,t3; +# +# Bug mdev-17381: equi-join of derived table with join_cache_level=4 +# +CREATE TABLE t1 ( +id int NOT NULL, +amount decimal DEFAULT NULL, +PRIMARY KEY (id) +) ENGINE=INNODB; +CREATE TABLE t2 ( +id int NOT NULL, +name varchar(50) DEFAULT NULL, +PRIMARY KEY (id) +) ENGINE=INNODB; +INSERT INTO t1 VALUES +(1, 10.0000), (2, 20.0000), (3, 30.0000), (4, 40.0000), +(5, NULL), (6, NULL), (7, 70.0000), (8, 80.0000); +INSERT INTO t2 VALUES +(1,'A'), (2,'B'), (3,'C'), (4,'D'), (5, NULL), (6, NULL), +(7,'E'), (8,'F'), (9,'G'), (10,'H'), (11, NULL), (12, NULL); +set join_cache_level=4; +SELECT t2.id,t2.name,t.total_amt +FROM t2 +LEFT JOIN +(SELECT id, sum(amount) total_amt FROM t1 GROUP BY id) AS t +ON t2.id=t.id +WHERE t2.id < 3; +id name total_amt +1 A 10 +2 B 20 +EXPLAIN SELECT t2.id,t2.name,t.total_amt +FROM t2 +LEFT JOIN +(SELECT id, sum(amount) total_amt FROM t1 GROUP BY id) AS t +ON t2.id=t.id +WHERE t2.id < 3; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 range PRIMARY PRIMARY 4 NULL 2 Using where +1 PRIMARY <derived2> ref key0 key0 5 test.t2.id 2 +2 LATERAL DERIVED t1 eq_ref PRIMARY PRIMARY 4 test.t2.id 1 +set join_cache_level=default; +DROP TABLE t1,t2; diff --git a/mysql-test/main/derived_split_innodb.test b/mysql-test/main/derived_split_innodb.test new file mode 100644 index 00000000000..c3b3bcabede --- /dev/null +++ b/mysql-test/main/derived_split_innodb.test @@ -0,0 +1,96 @@ +--source include/have_innodb.inc + +--echo # +--echo # MDEV-16917: do not use splitting for derived with join cache +--echo # + +CREATE TABLE t1 ( + n1 int(10) NOT NULL, + n2 int(10) NOT NULL, + c1 char(1) NOT NULL, + KEY c1 (c1), + KEY n1_c1_n2 (n1,c1,n2) +) ENGINE=InnoDB; +INSERT INTO t1 VALUES (0, 2, 'a'), (1, 3, 'a'); + +ANALYZE TABLE t1; + +Let $q= +SELECT t1.n1 FROM t1, (SELECT n1, n2 FROM t1 WHERE c1 = 'a' GROUP BY n1) as t + WHERE t.n1 = t1.n1 AND t.n2 = t1.n2 AND c1 = 'a' GROUP BY n1; + +eval EXPLAIN $q; +eval $q; + +DROP TABLE t1; + +--echo # +--echo # MDEV-17211: splittable materialized derived joining 3 tables with +--echo # GROUP BY list containing fields from 2 of them +--echo # + +CREATE TABLE t1 ( + id1 int, i1 int, id2 int, + PRIMARY KEY (id1), KEY (i1), KEY (id2) +) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1,1,1); + +CREATE TABLE t2 (id2 int, i2 int) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1, 1); + +CREATE TABLE t3 (id3 int, i3 int, PRIMARY KEY (id3)) ENGINE=InnoDB; +INSERT INTO t3 VALUES (1,1); + +let $q= +SELECT id3 + FROM (SELECT t3.id3, t2.i2, t1.id2 FROM t3,t1,t2 + WHERE t3.i3=t1.id1 AND t2.id2=t1.id2 + GROUP BY t3.id3, t1.id2) AS t, + t2 + WHERE t2.id2=t.id2; + +eval EXPLAIN $q; +eval $q; + +DROP TABLE t1,t2,t3; + +--echo # +--echo # Bug mdev-17381: equi-join of derived table with join_cache_level=4 +--echo # + +CREATE TABLE t1 ( + id int NOT NULL, + amount decimal DEFAULT NULL, +PRIMARY KEY (id) +) ENGINE=INNODB; + +CREATE TABLE t2 ( + id int NOT NULL, + name varchar(50) DEFAULT NULL, +PRIMARY KEY (id) +) ENGINE=INNODB; + +INSERT INTO t1 VALUES +(1, 10.0000), (2, 20.0000), (3, 30.0000), (4, 40.0000), +(5, NULL), (6, NULL), (7, 70.0000), (8, 80.0000); + +INSERT INTO t2 VALUES +(1,'A'), (2,'B'), (3,'C'), (4,'D'), (5, NULL), (6, NULL), +(7,'E'), (8,'F'), (9,'G'), (10,'H'), (11, NULL), (12, NULL); + +set join_cache_level=4; + +let $q= +SELECT t2.id,t2.name,t.total_amt + FROM t2 + LEFT JOIN + (SELECT id, sum(amount) total_amt FROM t1 GROUP BY id) AS t + ON t2.id=t.id + WHERE t2.id < 3; + +eval $q; +eval EXPLAIN $q; + +set join_cache_level=default; + +DROP TABLE t1,t2; diff --git a/mysql-test/main/drop.test b/mysql-test/main/drop.test index 6f506dd7215..fe8d39c0d7e 100644 --- a/mysql-test/main/drop.test +++ b/mysql-test/main/drop.test @@ -190,28 +190,28 @@ CREATE DATABASE mysql_test; let $MYSQLD_DATADIR= `select @@datadir`; --let $proc_frm = $MYSQLD_DATADIR/mysql/proc.frm ---let $proc_MYD = $MYSQLD_DATADIR/mysql/proc.MYD ---let $proc_MYI = $MYSQLD_DATADIR/mysql/proc.MYI +--let $proc_MAD = $MYSQLD_DATADIR/mysql/proc.MAD +--let $proc_MAI = $MYSQLD_DATADIR/mysql/proc.MAI --let $copy_of_proc_frm = $MYSQLTEST_VARDIR/tmp/bug29958.copy.frm ---let $copy_of_proc_MYD = $MYSQLTEST_VARDIR/tmp/bug29958.copy.MYD ---let $copy_of_proc_MYI = $MYSQLTEST_VARDIR/tmp/bug29958.copy.MYI +--let $copy_of_proc_MAD = $MYSQLTEST_VARDIR/tmp/bug29958.copy.MAD +--let $copy_of_proc_MAI = $MYSQLTEST_VARDIR/tmp/bug29958.copy.MAI --copy_file $proc_frm $copy_of_proc_frm ---copy_file $proc_MYD $copy_of_proc_MYD ---copy_file $proc_MYI $copy_of_proc_MYI +--copy_file $proc_MAD $copy_of_proc_MAD +--copy_file $proc_MAI $copy_of_proc_MAI DROP TABLE mysql.proc; DROP DATABASE mysql_test; --copy_file $copy_of_proc_frm $proc_frm ---copy_file $copy_of_proc_MYD $proc_MYD ---copy_file $copy_of_proc_MYI $proc_MYI +--copy_file $copy_of_proc_MAD $proc_MAD +--copy_file $copy_of_proc_MAI $proc_MAI --remove_file $copy_of_proc_frm ---remove_file $copy_of_proc_MYD ---remove_file $copy_of_proc_MYI +--remove_file $copy_of_proc_MAD +--remove_file $copy_of_proc_MAI --echo --echo # -- diff --git a/mysql-test/main/dyncol.result b/mysql-test/main/dyncol.result index 7a5eeac67cc..cc9a94e74be 100644 --- a/mysql-test/main/dyncol.result +++ b/mysql-test/main/dyncol.result @@ -1028,12 +1028,12 @@ select column_get(column_create(1, "2011-02-32 8:46:06.23434" AS CHAR), 1 as tim column_get(column_create(1, "2011-02-32 8:46:06.23434" AS CHAR), 1 as time) NULL Warnings: -Warning 1292 Truncated incorrect time value: '2011-02-32 8:46:06.23434' +Warning 1292 Incorrect time value: '2011-02-32 8:46:06.23434' select column_get(column_create(1, "2011-13-01 8:46:06.23434" AS CHAR), 1 as time); column_get(column_create(1, "2011-13-01 8:46:06.23434" AS CHAR), 1 as time) NULL Warnings: -Warning 1292 Truncated incorrect time value: '2011-13-01 8:46:06.23434' +Warning 1292 Incorrect time value: '2011-13-01 8:46:06.23434' select column_get(column_create(1, "2011-02-30 8:46:06.23434" AS CHAR), 1 as time); column_get(column_create(1, "2011-02-30 8:46:06.23434" AS CHAR), 1 as time) 08:46:06 diff --git a/mysql-test/main/failed_auth_3909.result b/mysql-test/main/failed_auth_3909.result index d0fd2c41221..4c3c0aba9df 100644 --- a/mysql-test/main/failed_auth_3909.result +++ b/mysql-test/main/failed_auth_3909.result @@ -1,7 +1,7 @@ optimize table mysql.user; Table Op Msg_type Msg_text mysql.user optimize status OK -insert ignore mysql.user (user,plugin) values ('foo','bar'),('bar','bar'),('baz','bar'); +insert ignore mysql.user (user,plugin) values ('foo','mysql_old_password'),('bar','mysql_old_password'),('baz','mysql_old_password'); Warnings: Warning 1364 Field 'ssl_cipher' doesn't have a default value Warning 1364 Field 'x509_issuer' doesn't have a default value @@ -10,15 +10,15 @@ Warning 1364 Field 'authentication_string' doesn't have a default value flush privileges; connect(localhost,u1,,test,MASTER_PORT,MASTER_SOCKET); connect fail,localhost,u1; -ERROR HY000: Plugin 'bar' is not loaded +ERROR HY000: Server is running in --secure-auth mode, but 'u1'@'localhost' has a password in the old format; please change the password to the new format connect(localhost,u2,,test,MASTER_PORT,MASTER_SOCKET); connect fail,localhost,u2; ERROR 28000: Access denied for user 'u2'@'localhost' (using password: NO) connect(localhost,u2,password,test,MASTER_PORT,MASTER_SOCKET); connect fail,localhost,u2,password; ERROR 28000: Access denied for user 'u2'@'localhost' (using password: YES) -ERROR HY000: Plugin 'bar' is not loaded +ERROR HY000: Server is running in --secure-auth mode, but 'u1'@'localhost' has a password in the old format; please change the password to the new format ERROR 28000: Access denied for user 'u2'@'localhost' (using password: NO) ERROR 28000: Access denied for user 'u2'@'localhost' (using password: YES) -delete from mysql.user where plugin = 'bar'; +delete from mysql.user where plugin = 'mysql_old_password'; flush privileges; diff --git a/mysql-test/main/failed_auth_3909.test b/mysql-test/main/failed_auth_3909.test index f72460691ea..fb104cf4b81 100644 --- a/mysql-test/main/failed_auth_3909.test +++ b/mysql-test/main/failed_auth_3909.test @@ -7,11 +7,11 @@ source include/not_embedded.inc; # the server requests a plugin # optimize table mysql.user; -insert ignore mysql.user (user,plugin) values ('foo','bar'),('bar','bar'),('baz','bar'); +insert ignore mysql.user (user,plugin) values ('foo','mysql_old_password'),('bar','mysql_old_password'),('baz','mysql_old_password'); flush privileges; --replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT ---error ER_PLUGIN_IS_NOT_LOADED +--error ER_SERVER_IS_IN_SECURE_AUTH_MODE connect (fail,localhost,u1); --replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT @@ -22,7 +22,7 @@ connect (fail,localhost,u2); --error ER_ACCESS_DENIED_ERROR connect (fail,localhost,u2,password); ---error ER_PLUGIN_IS_NOT_LOADED +--error ER_SERVER_IS_IN_SECURE_AUTH_MODE change_user u1; --error ER_ACCESS_DENIED_ERROR @@ -31,7 +31,7 @@ change_user u2; --error ER_ACCESS_DENIED_ERROR change_user u2,password; -delete from mysql.user where plugin = 'bar'; +delete from mysql.user where plugin = 'mysql_old_password'; flush privileges; diff --git a/mysql-test/main/failed_auth_unixsocket.result b/mysql-test/main/failed_auth_unixsocket.result index 680d3b48a33..3b2cff7e845 100644 --- a/mysql-test/main/failed_auth_unixsocket.result +++ b/mysql-test/main/failed_auth_unixsocket.result @@ -1,10 +1,15 @@ update mysql.user set plugin='unix_socket'; flush privileges; +Warnings: +Warning 1524 Plugin 'unix_socket' is not loaded +Warning 1524 Plugin 'unix_socket' is not loaded +Warning 1524 Plugin 'unix_socket' is not loaded +Warning 1524 Plugin 'unix_socket' is not loaded connect(localhost,USER,,test,MASTER_PORT,MASTER_SOCKET); -connect fail,localhost,$USER; -ERROR HY000: Plugin 'unix_socket' is not loaded -ERROR HY000: Plugin 'unix_socket' is not loaded +ERROR 28000: Access denied for user 'USER'@'localhost' (using password: NO) +ERROR 28000: Access denied for user 'USER'@'localhost' (using password: NO) install plugin unix_socket soname 'auth_socket.so'; +flush privileges; connect(localhost,USER,,test,MASTER_PORT,MASTER_SOCKET); ERROR 28000: Access denied for user 'USER'@'localhost' ERROR 28000: Access denied for user 'USER'@'localhost' diff --git a/mysql-test/main/failed_auth_unixsocket.test b/mysql-test/main/failed_auth_unixsocket.test index f7345f44698..5dfd9585882 100644 --- a/mysql-test/main/failed_auth_unixsocket.test +++ b/mysql-test/main/failed_auth_unixsocket.test @@ -7,20 +7,26 @@ update mysql.user set plugin='unix_socket'; flush privileges; ---replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT $USER USER ---error ER_PLUGIN_IS_NOT_LOADED +# Make sure that the replace works, even if $USER is 'user' or something else +# that matches other parts of the error message. +let $replace=Access denied for user '$USER'; + +--echo connect(localhost,USER,,test,MASTER_PORT,MASTER_SOCKET); +--replace_result $replace "Access denied for user 'USER'" +--disable_query_log +--error ER_ACCESS_DENIED_ERROR connect (fail,localhost,$USER); +--enable_query_log ---error ER_PLUGIN_IS_NOT_LOADED +--replace_result $replace "Access denied for user 'USER'" +--error ER_ACCESS_DENIED_ERROR change_user $USER; eval install plugin unix_socket soname '$AUTH_SOCKET_SO'; +flush privileges; -# Make sure that the replace works, even if $USER is 'user' or something else -# that matches other parts of the error message. --echo connect(localhost,USER,,test,MASTER_PORT,MASTER_SOCKET); ---let $replace=Access denied for user '$USER' ---replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT $replace "Access denied for user 'USER'" +--replace_result $replace "Access denied for user 'USER'" --disable_query_log --error ER_ACCESS_DENIED_NO_PASSWORD_ERROR connect (fail,localhost,$USER); diff --git a/mysql-test/main/flush.result b/mysql-test/main/flush.result index 5cd4fde477d..af8e327657b 100644 --- a/mysql-test/main/flush.result +++ b/mysql-test/main/flush.result @@ -542,3 +542,26 @@ flush relay logs,relay logs; ERROR HY000: Incorrect usage of FLUSH and RELAY LOGS flush slave,slave; ERROR HY000: Incorrect usage of FLUSH and SLAVE +# +# MDEV-15890 Strange error message if you try to +# FLUSH TABLES <view> after LOCK TABLES <view>. +# +CREATE TABLE t1 (qty INT, price INT); +CREATE VIEW v1 AS SELECT qty, price, qty*price AS value FROM t1; +LOCK TABLES v1 READ; +FLUSH TABLES v1; +ERROR HY000: Table 't1' was locked with a READ lock and can't be updated +UNLOCK TABLES; +LOCK TABLES v1 WRITE; +FLUSH TABLES v1; +UNLOCK TABLES; +LOCK TABLES v1 READ; +FLUSH TABLES t1; +ERROR HY000: Table 't1' was locked with a READ lock and can't be updated +UNLOCK TABLES; +LOCK TABLES t1 READ; +FLUSH TABLES v1; +ERROR HY000: Table 'v1' was not locked with LOCK TABLES +UNLOCK TABLES; +DROP VIEW v1; +DROP TABLE t1; diff --git a/mysql-test/main/flush.test b/mysql-test/main/flush.test index 81834b7de10..51b5c48c137 100644 --- a/mysql-test/main/flush.test +++ b/mysql-test/main/flush.test @@ -673,3 +673,34 @@ DROP TABLE t1; flush relay logs,relay logs; --error ER_WRONG_USAGE flush slave,slave; + +--echo # +--echo # MDEV-15890 Strange error message if you try to +--echo # FLUSH TABLES <view> after LOCK TABLES <view>. +--echo # + +CREATE TABLE t1 (qty INT, price INT); +CREATE VIEW v1 AS SELECT qty, price, qty*price AS value FROM t1; + +LOCK TABLES v1 READ; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +FLUSH TABLES v1; +UNLOCK TABLES; + +LOCK TABLES v1 WRITE; +FLUSH TABLES v1; +UNLOCK TABLES; + +LOCK TABLES v1 READ; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +FLUSH TABLES t1; +UNLOCK TABLES; + +LOCK TABLES t1 READ; +--error ER_TABLE_NOT_LOCKED +FLUSH TABLES v1; +UNLOCK TABLES; + +DROP VIEW v1; +DROP TABLE t1; + diff --git a/mysql-test/main/func_concat.result b/mysql-test/main/func_concat.result index 9ab6f74653e..acde1be051b 100644 --- a/mysql-test/main/func_concat.result +++ b/mysql-test/main/func_concat.result @@ -268,3 +268,23 @@ SET optimizer_switch=@save_optimizer_switch; SELECT UNHEX(CONCAT('414C2', HEX(8 + ROUND(RAND()*7)), SUBSTR(SHA(UUID()),6,33),HEX(2+ROUND(RAND()*8)))) IS NULL AS c1; c1 0 +# +# MDEV-13119 Wrong results with CAST(AS CHAR) and subquery +# +SET optimizer_switch=_utf8'derived_merge=on'; +CREATE TABLE t1 (t VARCHAR(10) CHARSET latin1); +INSERT INTO t1 VALUES('abcdefghi'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT CAST(t AS CHAR CHARACTER SET utf8) t2 FROM t1) sub; +c2 +abcdefghi-abcdefghi +DROP TABLE t1; +SET optimizer_switch=@save_optimizer_switch; +# +# MDEV-13120 Wrong results with MAKE_SET() and subquery +# +CREATE TABLE t1 (t VARCHAR(10) CHARSET latin1); +INSERT INTO t1 VALUES('abcdefghi'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT MAKE_SET(3,t,t) t2 FROM t1) sub; +c2 +abcdefghi,abcdefghi-abcdefghi,abcdefghi +DROP TABLE t1; diff --git a/mysql-test/main/func_concat.test b/mysql-test/main/func_concat.test index 69dd2c4063e..e1bda4be29e 100644 --- a/mysql-test/main/func_concat.test +++ b/mysql-test/main/func_concat.test @@ -242,3 +242,25 @@ SET optimizer_switch=@save_optimizer_switch; --echo # SELECT UNHEX(CONCAT('414C2', HEX(8 + ROUND(RAND()*7)), SUBSTR(SHA(UUID()),6,33),HEX(2+ROUND(RAND()*8)))) IS NULL AS c1; + + +--echo # +--echo # MDEV-13119 Wrong results with CAST(AS CHAR) and subquery +--echo # + +SET optimizer_switch=_utf8'derived_merge=on'; +CREATE TABLE t1 (t VARCHAR(10) CHARSET latin1); +INSERT INTO t1 VALUES('abcdefghi'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT CAST(t AS CHAR CHARACTER SET utf8) t2 FROM t1) sub; +DROP TABLE t1; +SET optimizer_switch=@save_optimizer_switch; + + +--echo # +--echo # MDEV-13120 Wrong results with MAKE_SET() and subquery +--echo # + +CREATE TABLE t1 (t VARCHAR(10) CHARSET latin1); +INSERT INTO t1 VALUES('abcdefghi'); +SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT MAKE_SET(3,t,t) t2 FROM t1) sub; +DROP TABLE t1; diff --git a/mysql-test/main/func_hybrid_type.result b/mysql-test/main/func_hybrid_type.result index ebf7191a3f7..a86fd8d1d6f 100644 --- a/mysql-test/main/func_hybrid_type.result +++ b/mysql-test/main/func_hybrid_type.result @@ -3755,3 +3755,193 @@ DROP TABLE t1; # # End of 10.3 tests # +# +# Start of 10.4 tests +# +# +# MDEV-17325 NULL-ability problems with LEAST() in combination with NO_ZERO_DATE and NO_ZERO_IN_DATE +# +SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE'; +SELECT +LEAST('0000-00-00',DATE'2001-01-01') AS s1, +LEAST('0001-00-01',DATE'2001-01-01') AS s2, +LEAST('0000-00-00',TIMESTAMP'2001-01-01 00:00:00') AS s3, +LEAST('0001-00-01',TIMESTAMP'2001-01-01 00:00:00') AS s4, +LEAST(0,DATE'2001-01-01') AS i1, +LEAST(20010001,DATE'2001-01-01') AS i2, +LEAST(0,TIMESTAMP'2001-01-01 00:00:00') AS i3, +LEAST(20010001,TIMESTAMP'2001-01-01 00:00:00') AS i4; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def s1 10 10 0 Y 128 0 63 +def s2 10 10 0 Y 128 0 63 +def s3 12 26 0 Y 128 0 63 +def s4 12 26 0 Y 128 0 63 +def i1 10 10 0 Y 128 0 63 +def i2 10 10 0 Y 128 0 63 +def i3 12 19 0 Y 128 0 63 +def i4 12 19 0 Y 128 0 63 +s1 s2 s3 s4 i1 i2 i3 i4 +NULL NULL NULL NULL NULL NULL NULL NULL +Warnings: +Warning 1292 Incorrect datetime value: '0000-00-00' +Warning 1292 Incorrect datetime value: '0001-00-01' +Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00' +Warning 1292 Incorrect datetime value: '0001-00-01 00:00:00' +Warning 1292 Incorrect datetime value: '0000-00-00' +Warning 1292 Incorrect datetime value: '2001-00-01' +Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00' +Warning 1292 Incorrect datetime value: '2001-00-01 00:00:00' +SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE'; +CREATE TABLE t1 AS SELECT +LEAST('0000-00-00',DATE'2001-01-01') AS s1, +LEAST('0001-00-01',DATE'2001-01-01') AS s2, +LEAST('0000-00-00',TIMESTAMP'2001-01-01 00:00:00') AS s3, +LEAST('0001-00-01',TIMESTAMP'2001-01-01 00:00:00') AS s4, +LEAST(0,DATE'2001-01-01') AS i1, +LEAST(20010001,DATE'2001-01-01') AS i2, +LEAST(0,TIMESTAMP'2001-01-01 00:00:00') AS i3, +LEAST(20010001,TIMESTAMP'2001-01-01 00:00:00') AS i4; +Warnings: +Warning 1292 Incorrect datetime value: '0000-00-00' +Warning 1292 Incorrect datetime value: '0001-00-01' +Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00' +Warning 1292 Incorrect datetime value: '0001-00-01 00:00:00' +Warning 1292 Incorrect datetime value: '0000-00-00' +Warning 1292 Incorrect datetime value: '2001-00-01' +Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00' +Warning 1292 Incorrect datetime value: '2001-00-01 00:00:00' +SELECT * FROM t1; +s1 s2 s3 s4 i1 i2 i3 i4 +NULL NULL NULL NULL NULL NULL NULL NULL +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `s1` date DEFAULT NULL, + `s2` date DEFAULT NULL, + `s3` datetime DEFAULT NULL, + `s4` datetime DEFAULT NULL, + `i1` date DEFAULT NULL, + `i2` date DEFAULT NULL, + `i3` datetime DEFAULT NULL, + `i4` datetime DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30'); +CREATE TABLE t1 AS SELECT LEAST(CURRENT_DATE,CURRENT_TIME) AS c1; +SELECT * FROM t1; +c1 +2001-01-01 00:00:00 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` datetime NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +SET old_mode=ZERO_DATE_TIME_CAST; +CREATE TABLE t1 AS SELECT LEAST(CURRENT_DATE,CURRENT_TIME) AS c1; +Warnings: +Warning 1292 Incorrect datetime value: '0000-00-00 10:20:30' +SELECT * FROM t1; +c1 +NULL +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` datetime DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +SET old_mode=DEFAULT; +SET timestamp=DEFAULT; +SET sql_mode=DEFAULT; +SET sql_mode=''; +SELECT LEAST(999,TIME'10:20:30') AS c1; +c1 +NULL +Warnings: +Warning 1292 Incorrect time value: '999' +CREATE TABLE t1 AS SELECT LEAST(999,TIME'10:20:30') AS c1; +Warnings: +Warning 1292 Incorrect time value: '999' +SELECT * FROM t1; +c1 +NULL +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` time DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +SET sql_mode=DEFAULT; +# +# MDEV-17318 CAST(LEAST(zero_date,non_zero_date) AS numeric_data_type) returns a wrong result +# +SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE'; +SELECT +LEAST('0000-00-00',DATE'2001-01-01') AS c0, +CAST(LEAST('0000-00-00',DATE'2001-01-01') AS CHAR) AS string, +CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DATE) AS date, +CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DATETIME) AS datetime, +CAST(LEAST('0000-00-00',DATE'2001-01-01') AS TIME) AS time, +CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DECIMAL) AS dc, +CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DOUBLE) AS dbl, +CAST(LEAST('0000-00-00',DATE'2001-01-01') AS SIGNED) AS sint, +CAST(LEAST('0000-00-00',DATE'2001-01-01') AS UNSIGNED) AS uint; +c0 string date datetime time dc dbl sint uint +NULL NULL NULL NULL NULL NULL NULL NULL NULL +Warnings: +Warning 1292 Incorrect datetime value: '0000-00-00' +Warning 1292 Incorrect datetime value: '0000-00-00' +Warning 1292 Incorrect datetime value: '0000-00-00' +Warning 1292 Incorrect datetime value: '0000-00-00' +Warning 1292 Incorrect datetime value: '0000-00-00' +Warning 1292 Incorrect datetime value: '0000-00-00' +Warning 1292 Incorrect datetime value: '0000-00-00' +Warning 1292 Incorrect datetime value: '0000-00-00' +Warning 1292 Incorrect datetime value: '0000-00-00' +CREATE TABLE t1 AS SELECT +LEAST('0000-00-00',DATE'2001-01-01') AS c0, +CAST(LEAST('0000-00-00',DATE'2001-01-01') AS CHAR) AS string, +CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DATE) AS date, +CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DATETIME) AS datetime, +CAST(LEAST('0000-00-00',DATE'2001-01-01') AS TIME) AS time, +CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DECIMAL) AS dc, +CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DOUBLE) AS dbl, +CAST(LEAST('0000-00-00',DATE'2001-01-01') AS SIGNED) AS sint, +CAST(LEAST('0000-00-00',DATE'2001-01-01') AS UNSIGNED) AS uint; +Warnings: +Warning 1292 Incorrect datetime value: '0000-00-00' +Warning 1292 Incorrect datetime value: '0000-00-00' +Warning 1292 Incorrect datetime value: '0000-00-00' +Warning 1292 Incorrect datetime value: '0000-00-00' +Warning 1292 Incorrect datetime value: '0000-00-00' +Warning 1292 Incorrect datetime value: '0000-00-00' +Warning 1292 Incorrect datetime value: '0000-00-00' +Warning 1292 Incorrect datetime value: '0000-00-00' +Warning 1292 Incorrect datetime value: '0000-00-00' +SELECT * FROM t1; +c0 string date datetime time dc dbl sint uint +NULL NULL NULL NULL NULL NULL NULL NULL NULL +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c0` date DEFAULT NULL, + `string` varchar(10) DEFAULT NULL, + `date` date DEFAULT NULL, + `datetime` datetime DEFAULT NULL, + `time` time DEFAULT NULL, + `dc` decimal(10,0) DEFAULT NULL, + `dbl` double DEFAULT NULL, + `sint` bigint(10) DEFAULT NULL, + `uint` bigint(20) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +SET sql_mode=DEFAULT; +# +# MDEV-17330 Wrong result for 0 + LEAST(TIME'-10:00:00',TIME'10:00:00') +# +SELECT 0 + LEAST(TIME'-10:00:00',TIME'10:00:00') AS c; +c +-100000 +# +# End of 10.4 tests +# diff --git a/mysql-test/main/func_hybrid_type.test b/mysql-test/main/func_hybrid_type.test index 954c7de53fa..6b32f331d34 100644 --- a/mysql-test/main/func_hybrid_type.test +++ b/mysql-test/main/func_hybrid_type.test @@ -615,3 +615,108 @@ DROP TABLE t1; --echo # End of 10.3 tests --echo # +--echo # +--echo # Start of 10.4 tests +--echo # + +--echo # +--echo # MDEV-17325 NULL-ability problems with LEAST() in combination with NO_ZERO_DATE and NO_ZERO_IN_DATE +--echo # + +SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE'; + +--disable_ps_protocol +--enable_metadata +SELECT + LEAST('0000-00-00',DATE'2001-01-01') AS s1, + LEAST('0001-00-01',DATE'2001-01-01') AS s2, + LEAST('0000-00-00',TIMESTAMP'2001-01-01 00:00:00') AS s3, + LEAST('0001-00-01',TIMESTAMP'2001-01-01 00:00:00') AS s4, + LEAST(0,DATE'2001-01-01') AS i1, + LEAST(20010001,DATE'2001-01-01') AS i2, + LEAST(0,TIMESTAMP'2001-01-01 00:00:00') AS i3, + LEAST(20010001,TIMESTAMP'2001-01-01 00:00:00') AS i4; +--disable_metadata +--enable_ps_protocol + +SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE'; +CREATE TABLE t1 AS SELECT + LEAST('0000-00-00',DATE'2001-01-01') AS s1, + LEAST('0001-00-01',DATE'2001-01-01') AS s2, + LEAST('0000-00-00',TIMESTAMP'2001-01-01 00:00:00') AS s3, + LEAST('0001-00-01',TIMESTAMP'2001-01-01 00:00:00') AS s4, + LEAST(0,DATE'2001-01-01') AS i1, + LEAST(20010001,DATE'2001-01-01') AS i2, + LEAST(0,TIMESTAMP'2001-01-01 00:00:00') AS i3, + LEAST(20010001,TIMESTAMP'2001-01-01 00:00:00') AS i4; +SELECT * FROM t1; +SHOW CREATE TABLE t1; +DROP TABLE t1; + +SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30'); + +# A TIME always converts to a non-NULL DATETIME with the new CAST style +# Expect a NOT NULL column +CREATE TABLE t1 AS SELECT LEAST(CURRENT_DATE,CURRENT_TIME) AS c1; +SELECT * FROM t1; +SHOW CREATE TABLE t1; +DROP TABLE t1; + +# A TIME can convert to a NULL DATETIME with old CAST style +# Expect a NULL-able column +SET old_mode=ZERO_DATE_TIME_CAST; +CREATE TABLE t1 AS SELECT LEAST(CURRENT_DATE,CURRENT_TIME) AS c1; +SELECT * FROM t1; +SHOW CREATE TABLE t1; +DROP TABLE t1; +SET old_mode=DEFAULT; +SET timestamp=DEFAULT; + +SET sql_mode=DEFAULT; + +SET sql_mode=''; +SELECT LEAST(999,TIME'10:20:30') AS c1; +CREATE TABLE t1 AS SELECT LEAST(999,TIME'10:20:30') AS c1; +SELECT * FROM t1; +SHOW CREATE TABLE t1; +DROP TABLE t1; +SET sql_mode=DEFAULT; + +--echo # +--echo # MDEV-17318 CAST(LEAST(zero_date,non_zero_date) AS numeric_data_type) returns a wrong result +--echo # +SET sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE'; +SELECT + LEAST('0000-00-00',DATE'2001-01-01') AS c0, + CAST(LEAST('0000-00-00',DATE'2001-01-01') AS CHAR) AS string, + CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DATE) AS date, + CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DATETIME) AS datetime, + CAST(LEAST('0000-00-00',DATE'2001-01-01') AS TIME) AS time, + CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DECIMAL) AS dc, + CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DOUBLE) AS dbl, + CAST(LEAST('0000-00-00',DATE'2001-01-01') AS SIGNED) AS sint, + CAST(LEAST('0000-00-00',DATE'2001-01-01') AS UNSIGNED) AS uint; +CREATE TABLE t1 AS SELECT + LEAST('0000-00-00',DATE'2001-01-01') AS c0, + CAST(LEAST('0000-00-00',DATE'2001-01-01') AS CHAR) AS string, + CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DATE) AS date, + CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DATETIME) AS datetime, + CAST(LEAST('0000-00-00',DATE'2001-01-01') AS TIME) AS time, + CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DECIMAL) AS dc, + CAST(LEAST('0000-00-00',DATE'2001-01-01') AS DOUBLE) AS dbl, + CAST(LEAST('0000-00-00',DATE'2001-01-01') AS SIGNED) AS sint, + CAST(LEAST('0000-00-00',DATE'2001-01-01') AS UNSIGNED) AS uint; +SELECT * FROM t1; +SHOW CREATE TABLE t1; +DROP TABLE t1; +SET sql_mode=DEFAULT; + +--echo # +--echo # MDEV-17330 Wrong result for 0 + LEAST(TIME'-10:00:00',TIME'10:00:00') +--echo # +SELECT 0 + LEAST(TIME'-10:00:00',TIME'10:00:00') AS c; + + +--echo # +--echo # End of 10.4 tests +--echo # diff --git a/mysql-test/main/func_in.result b/mysql-test/main/func_in.result index a86781b156c..acf718c453e 100644 --- a/mysql-test/main/func_in.result +++ b/mysql-test/main/func_in.result @@ -481,7 +481,7 @@ SELECT * FROM t4 WHERE a IN ('1972-02-06','19772-07-29'); a 1972-02-06 Warnings: -Warning 1292 Incorrect datetime value: '19772-07-29' +Warning 1292 Truncated incorrect datetime value: '19772-07-29' DROP TABLE t1,t2,t3,t4; CREATE TABLE t1 (id int not null); INSERT INTO t1 VALUES (1),(2); diff --git a/mysql-test/main/func_isnull.result b/mysql-test/main/func_isnull.result index 15d87997e29..8cbd528f2de 100644 --- a/mysql-test/main/func_isnull.result +++ b/mysql-test/main/func_isnull.result @@ -106,5 +106,25 @@ Note 1003 select `test`.`t2`.`d1` AS `d1`,`test`.`t1`.`d1` AS `d1` from `test`.` DROP VIEW v1; DROP TABLE t1,t2; # +# MDEV-15475: Assertion `!table || (!table->read_set || +# bitmap_is_set(table->read_set, field_index))' +# failed on EXPLAIN EXTENDED with constant table and view +# +CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=MyISAM; +CREATE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 VALUES (1); +EXPLAIN EXTENDED SELECT ISNULL(pk) FROM v1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00 +Warnings: +Note 1003 select /*always not null*/ 1 is null AS `ISNULL(pk)` from dual +EXPLAIN EXTENDED SELECT IFNULL(pk,0) FROM v1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00 +Warnings: +Note 1003 select ifnull(1,0) AS `IFNULL(pk,0)` from dual +DROP VIEW v1; +DROP TABLE t1; +# # End of 5.5 tests # diff --git a/mysql-test/main/func_isnull.test b/mysql-test/main/func_isnull.test index 4c59fa3cbe8..7d1a7e83a1a 100644 --- a/mysql-test/main/func_isnull.test +++ b/mysql-test/main/func_isnull.test @@ -83,6 +83,22 @@ SELECT * FROM t2 LEFT JOIN v1 ON t2.d1=v1.d1 WHERE v1.d1 IS NULL; DROP VIEW v1; DROP TABLE t1,t2; + +--echo # +--echo # MDEV-15475: Assertion `!table || (!table->read_set || +--echo # bitmap_is_set(table->read_set, field_index))' +--echo # failed on EXPLAIN EXTENDED with constant table and view +--echo # + +CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=MyISAM; +CREATE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 VALUES (1); +EXPLAIN EXTENDED SELECT ISNULL(pk) FROM v1; +EXPLAIN EXTENDED SELECT IFNULL(pk,0) FROM v1; +# Cleanup +DROP VIEW v1; +DROP TABLE t1; + --echo # --echo # End of 5.5 tests --echo # diff --git a/mysql-test/main/func_json.result b/mysql-test/main/func_json.result index a7e8b5c9e59..cc9fd146e63 100644 --- a/mysql-test/main/func_json.result +++ b/mysql-test/main/func_json.result @@ -761,6 +761,56 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; # +# MDEV-16054 simple json functions flatline cpu on garbage input. +# +select json_array(1,uuid(),compress(5.140264e+307)); +json_array(1,uuid(),compress(5.140264e+307)) +NULL +# +# MDEV-16869 String functions don't respect character set of JSON_VALUE. +# +create table t1(json_col TEXT) DEFAULT CHARSET=latin1; +insert into t1 values (_latin1 X'7B226B657931223A2253EC227D'); +select JSON_VALUE(json_col, '$.key1')= _latin1 X'53EC' from t1; +JSON_VALUE(json_col, '$.key1')= _latin1 X'53EC' +1 +select REPLACE(JSON_VALUE(json_col, '$.key1'), 'null', '') = _latin1 X'53EC' from t1; +REPLACE(JSON_VALUE(json_col, '$.key1'), 'null', '') = _latin1 X'53EC' +1 +drop table t1; +# +# MDEV-16750 JSON_SET mishandles unicode every second pair of arguments. +# +SELECT JSON_SET('{}', '$.a', _utf8 0xC3B6); +JSON_SET('{}', '$.a', _utf8 0xC3B6) +{"a": "ö"} +SELECT JSON_SET('{}', '$.a', _utf8 0xC3B6, '$.b', _utf8 0xC3B6); +JSON_SET('{}', '$.a', _utf8 0xC3B6, '$.b', _utf8 0xC3B6) +{"a": "ö", "b": "ö"} +SELECT JSON_SET('{}', '$.a', _utf8 X'C3B6', '$.x', 1, '$.b', _utf8 X'C3B6'); +JSON_SET('{}', '$.a', _utf8 X'C3B6', '$.x', 1, '$.b', _utf8 X'C3B6') +{"a": "ö", "x": 1, "b": "ö"} +# +# MDEV-17121 JSON_ARRAY_APPEND +# +select json_array_append('[ ]', '$', 'aue'); +json_array_append('[ ]', '$', 'aue') +["aue"] +# +# MDEV-17018 JSON_SEARCH and User-Defined Variables. +# +SET @`json` := '["A", [{"B": "1"}], {"C": "AB"}, {"D": "BC"}]', @`value` := 'AB'; +SELECT JSON_SEARCH(@`json`, 'one', @`value`); +JSON_SEARCH(@`json`, 'one', @`value`) +"$[2].C" +SET @`json` := NULL, @`value` := NULL; +# +# MDEV-17001 JSON_MERGE returns nullwhen merging empty array. +# +SELECT JSON_MERGE('[1]', '[]'); +JSON_MERGE('[1]', '[]') +[1] +# # End of 10.2 tests # # diff --git a/mysql-test/main/func_json.test b/mysql-test/main/func_json.test index 8d72e5afa59..9a0699ac23d 100644 --- a/mysql-test/main/func_json.test +++ b/mysql-test/main/func_json.test @@ -423,6 +423,50 @@ SHOW CREATE TABLE t1; DROP TABLE t1; --echo # +--echo # MDEV-16054 simple json functions flatline cpu on garbage input. +--echo # + +select json_array(1,uuid(),compress(5.140264e+307)); + +--echo # +--echo # MDEV-16869 String functions don't respect character set of JSON_VALUE. +--echo # + +create table t1(json_col TEXT) DEFAULT CHARSET=latin1; +insert into t1 values (_latin1 X'7B226B657931223A2253EC227D'); +select JSON_VALUE(json_col, '$.key1')= _latin1 X'53EC' from t1; +select REPLACE(JSON_VALUE(json_col, '$.key1'), 'null', '') = _latin1 X'53EC' from t1; +drop table t1; + +--echo # +--echo # MDEV-16750 JSON_SET mishandles unicode every second pair of arguments. +--echo # + +SELECT JSON_SET('{}', '$.a', _utf8 0xC3B6); +SELECT JSON_SET('{}', '$.a', _utf8 0xC3B6, '$.b', _utf8 0xC3B6); +SELECT JSON_SET('{}', '$.a', _utf8 X'C3B6', '$.x', 1, '$.b', _utf8 X'C3B6'); + +--echo # +--echo # MDEV-17121 JSON_ARRAY_APPEND +--echo # + +select json_array_append('[ ]', '$', 'aue'); + +--echo # +--echo # MDEV-17018 JSON_SEARCH and User-Defined Variables. +--echo # + +SET @`json` := '["A", [{"B": "1"}], {"C": "AB"}, {"D": "BC"}]', @`value` := 'AB'; +SELECT JSON_SEARCH(@`json`, 'one', @`value`); +SET @`json` := NULL, @`value` := NULL; + +--echo # +--echo # MDEV-17001 JSON_MERGE returns nullwhen merging empty array. +--echo # + +SELECT JSON_MERGE('[1]', '[]'); + +--echo # --echo # End of 10.2 tests --echo # diff --git a/mysql-test/main/func_like.result b/mysql-test/main/func_like.result index 0ba8e41f164..06a549e94b2 100644 --- a/mysql-test/main/func_like.result +++ b/mysql-test/main/func_like.result @@ -289,3 +289,120 @@ a b c d 3 f_ 1 0 1 3 f\_ 0 1 0 drop table t1; +# +# MDEV-17359 - Extend expression supported by like (| & << >> || + - * / DIV MOD ^ ) +# +SELECT 1 LIKE +1; +1 LIKE +1 +1 +SELECT -1 LIKE -1; +-1 LIKE -1 +1 +SELECT 1 LIKE (1); +1 LIKE (1) +1 +SELECT 1 LIKE 1|2, 3 LIKE 1|2; +1 LIKE 1|2 3 LIKE 1|2 +0 1 +SELECT 1 LIKE 3&2, 2 LIKE 3&2; +1 LIKE 3&2 2 LIKE 3&2 +0 1 +SELECT 1 LIKE 1>>0, 1 LIKE 1>>1 , 64 LIKE 256>>2; +1 LIKE 1>>0 1 LIKE 1>>1 64 LIKE 256>>2 +1 0 1 +SELECT 1 LIKE 1<<0, 1 LIKE 0<<2, 32 LIKE 1<<5; +1 LIKE 1<<0 1 LIKE 0<<2 32 LIKE 1<<5 +1 0 1 +SELECT 1 LIKE 1||2, 1 LIKE 0||2; +1 LIKE 1||2 1 LIKE 0||2 +1 1 +SELECT 2 LIKE 1+1, 2.0 LIKE 1+1.0, 2 LIKE 1+1.0, 1+1 LIKE 2, 1+1 LIKE 0+2; +2 LIKE 1+1 2.0 LIKE 1+1.0 2 LIKE 1+1.0 1+1 LIKE 2 1+1 LIKE 0+2 +1 1 0 1 1 +SELECT 0 LIKE 1-1, 2.0 LIKE 3-1.0, 2 LIKE 3-1.0, 2-1 LIKE 1, 3-1 LIKE 4-1; +0 LIKE 1-1 2.0 LIKE 3-1.0 2 LIKE 3-1.0 2-1 LIKE 1 3-1 LIKE 4-1 +1 1 0 1 0 +SELECT 1 LIKE 1*1, 2.0 LIKE 2*1.0, 2 LIKE 2*1.0, 2*1 LIKE 2, 2*3 LIKE 6*1; +1 LIKE 1*1 2.0 LIKE 2*1.0 2 LIKE 2*1.0 2*1 LIKE 2 2*3 LIKE 6*1 +1 1 0 1 1 +SELECT 1 LIKE 1/1, 1.0000 LIKE 1/1, 1.0000 LIKE 1/1.000000, 1.000000 LIKE 1.0/1.000000, 1/1 like 1/1; +1 LIKE 1/1 1.0000 LIKE 1/1 1.0000 LIKE 1/1.000000 1.000000 LIKE 1.0/1.000000 1/1 like 1/1 +0 1 1 0 1 +SELECT 1 LIKE 1 DIV 1, 1 LIKE 1.0 DIV 1.0 ; +1 LIKE 1 DIV 1 1 LIKE 1.0 DIV 1.0 +1 1 +SELECT 2 LIKE 10 MOD 8, 1.9 LIKE 10 MOD 8.1, 1.9 LIKE 10 MOD 8.10 ; +2 LIKE 10 MOD 8 1.9 LIKE 10 MOD 8.1 1.9 LIKE 10 MOD 8.10 +1 1 0 +SELECT 1 LIKE CAST(1 AS CHAR(10)); +1 LIKE CAST(1 AS CHAR(10)) +1 +SELECT 1 LIKE CASE WHEN 1=1 THEN '1' ELSE '0' END; +1 LIKE CASE WHEN 1=1 THEN '1' ELSE '0' END +1 +SELECT 1 LIKE COALESCE(1+0, 1); +1 LIKE COALESCE(1+0, 1) +1 +CREATE TABLE t1(c1 INTEGER, c2 INTEGER); +INSERT INTO t1 VALUES(1,1); +INSERT INTO t1 VALUES(1,2); +SELECT c1, c2, c1|c2, 1 LIKE c1|c2 FROM t1 ORDER BY c2; +c1 c2 c1|c2 1 LIKE c1|c2 +1 1 1 1 +1 2 3 0 +SELECT c1, c2, c1&c2, 1 LIKE c1&c2 FROM t1 ORDER BY c2; +c1 c2 c1&c2 1 LIKE c1&c2 +1 1 1 1 +1 2 0 0 +SELECT c1, c2, c2>>c1, 1 LIKE c2>>c1 FROM t1 ORDER BY c2; +c1 c2 c2>>c1 1 LIKE c2>>c1 +1 1 0 0 +1 2 1 1 +SELECT c1, c2, c2<<c1, 2 LIKE c2<<c1 FROM t1 ORDER BY c2; +c1 c2 c2<<c1 2 LIKE c2<<c1 +1 1 2 1 +1 2 4 0 +SELECT c1, c2, c1||c2, 1 LIKE c1||c2 FROM t1 ORDER BY c2; +c1 c2 c1||c2 1 LIKE c1||c2 +1 1 1 1 +1 2 1 1 +SELECT c1, c2, c1+c2, 2 LIKE c1+c2 FROM t1 ORDER BY c2; +c1 c2 c1+c2 2 LIKE c1+c2 +1 1 2 1 +1 2 3 0 +SELECT c1, c2, c1-c2, -1 LIKE c1-c2 FROM t1 ORDER BY c2; +c1 c2 c1-c2 -1 LIKE c1-c2 +1 1 0 0 +1 2 -1 1 +SELECT c1, c2, c1*c2, 2 LIKE c1*c2 FROM t1 ORDER BY c2; +c1 c2 c1*c2 2 LIKE c1*c2 +1 1 1 0 +1 2 2 1 +SELECT c1, c2, c1/c2, 0.5000 LIKE c1/c2 FROM t1 ORDER BY c2; +c1 c2 c1/c2 0.5000 LIKE c1/c2 +1 1 1.0000 0 +1 2 0.5000 1 +SELECT c1, c2, c1 DIV c2, 0 LIKE c1 DIV c2 FROM t1 ORDER BY c2; +c1 c2 c1 DIV c2 0 LIKE c1 DIV c2 +1 1 1 0 +1 2 0 1 +SELECT c1, c2, c1 MOD c2, 0 LIKE c1 MOD c2 FROM t1 ORDER BY c2; +c1 c2 c1 MOD c2 0 LIKE c1 MOD c2 +1 1 0 1 +1 2 1 0 +CREATE VIEW v1 AS +SELECT 1 LIKE c1|c2, 1 LIKE c1&c2, 1 LIKE c2>>c1, 2 LIKE c2<<c1, +1 LIKE c1||c2, 2 LIKE c1+c2, -1 LIKE c1-c2, 2 LIKE c1*c2, +0.5000 LIKE c1/c2, 0 LIKE c1 DIV c2, 0 LIKE c1 MOD c2 +FROM t1 ORDER BY c2; +SELECT * FROM v1; +1 LIKE c1|c2 1 LIKE c1&c2 1 LIKE c2>>c1 2 LIKE c2<<c1 1 LIKE c1||c2 2 LIKE c1+c2 -1 LIKE c1-c2 2 LIKE c1*c2 0.5000 LIKE c1/c2 0 LIKE c1 DIV c2 0 LIKE c1 MOD c2 +1 1 0 1 1 1 0 0 0 0 1 +0 0 1 0 1 0 1 1 1 1 0 +EXPLAIN EXTENDED SELECT * FROM v1; +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 Using filesort +Warnings: +Note 1003 select 1 like `test`.`t1`.`c1` | `test`.`t1`.`c2` AS `1 LIKE c1|c2`,1 like `test`.`t1`.`c1` & `test`.`t1`.`c2` AS `1 LIKE c1&c2`,1 like `test`.`t1`.`c2` >> `test`.`t1`.`c1` AS `1 LIKE c2>>c1`,2 like `test`.`t1`.`c2` << `test`.`t1`.`c1` AS `2 LIKE c2<<c1`,1 like `test`.`t1`.`c1` or `test`.`t1`.`c2` <> 0 AS `1 LIKE c1||c2`,2 like `test`.`t1`.`c1` + `test`.`t1`.`c2` AS `2 LIKE c1+c2`,-1 like `test`.`t1`.`c1` - `test`.`t1`.`c2` AS `-1 LIKE c1-c2`,2 like `test`.`t1`.`c1` * `test`.`t1`.`c2` AS `2 LIKE c1*c2`,0.5000 like `test`.`t1`.`c1` / `test`.`t1`.`c2` AS `0.5000 LIKE c1/c2`,0 like `test`.`t1`.`c1` DIV `test`.`t1`.`c2` AS `0 LIKE c1 DIV c2`,0 like `test`.`t1`.`c1` MOD `test`.`t1`.`c2` AS `0 LIKE c1 MOD c2` from `test`.`t1` order by `test`.`t1`.`c2` +DROP VIEW v1; +DROP TABLE t1; diff --git a/mysql-test/main/func_like.test b/mysql-test/main/func_like.test index 5026bb76aa3..cb50fb91879 100644 --- a/mysql-test/main/func_like.test +++ b/mysql-test/main/func_like.test @@ -207,3 +207,53 @@ insert t1 (a) values ('3 f_'), ('3 f\_'); set sql_mode=default; select * from t1; drop table t1; + +--echo # +--echo # MDEV-17359 - Extend expression supported by like (| & << >> || + - * / DIV MOD ^ ) +--echo # + +SELECT 1 LIKE +1; +SELECT -1 LIKE -1; +SELECT 1 LIKE (1); +SELECT 1 LIKE 1|2, 3 LIKE 1|2; +SELECT 1 LIKE 3&2, 2 LIKE 3&2; +SELECT 1 LIKE 1>>0, 1 LIKE 1>>1 , 64 LIKE 256>>2; +SELECT 1 LIKE 1<<0, 1 LIKE 0<<2, 32 LIKE 1<<5; +SELECT 1 LIKE 1||2, 1 LIKE 0||2; +SELECT 2 LIKE 1+1, 2.0 LIKE 1+1.0, 2 LIKE 1+1.0, 1+1 LIKE 2, 1+1 LIKE 0+2; +SELECT 0 LIKE 1-1, 2.0 LIKE 3-1.0, 2 LIKE 3-1.0, 2-1 LIKE 1, 3-1 LIKE 4-1; +SELECT 1 LIKE 1*1, 2.0 LIKE 2*1.0, 2 LIKE 2*1.0, 2*1 LIKE 2, 2*3 LIKE 6*1; +SELECT 1 LIKE 1/1, 1.0000 LIKE 1/1, 1.0000 LIKE 1/1.000000, 1.000000 LIKE 1.0/1.000000, 1/1 like 1/1; +SELECT 1 LIKE 1 DIV 1, 1 LIKE 1.0 DIV 1.0 ; +SELECT 2 LIKE 10 MOD 8, 1.9 LIKE 10 MOD 8.1, 1.9 LIKE 10 MOD 8.10 ; + +SELECT 1 LIKE CAST(1 AS CHAR(10)); +SELECT 1 LIKE CASE WHEN 1=1 THEN '1' ELSE '0' END; +SELECT 1 LIKE COALESCE(1+0, 1); + +CREATE TABLE t1(c1 INTEGER, c2 INTEGER); +INSERT INTO t1 VALUES(1,1); +INSERT INTO t1 VALUES(1,2); + +SELECT c1, c2, c1|c2, 1 LIKE c1|c2 FROM t1 ORDER BY c2; +SELECT c1, c2, c1&c2, 1 LIKE c1&c2 FROM t1 ORDER BY c2; +SELECT c1, c2, c2>>c1, 1 LIKE c2>>c1 FROM t1 ORDER BY c2; +SELECT c1, c2, c2<<c1, 2 LIKE c2<<c1 FROM t1 ORDER BY c2; +SELECT c1, c2, c1||c2, 1 LIKE c1||c2 FROM t1 ORDER BY c2; +SELECT c1, c2, c1+c2, 2 LIKE c1+c2 FROM t1 ORDER BY c2; +SELECT c1, c2, c1-c2, -1 LIKE c1-c2 FROM t1 ORDER BY c2; +SELECT c1, c2, c1*c2, 2 LIKE c1*c2 FROM t1 ORDER BY c2; +SELECT c1, c2, c1/c2, 0.5000 LIKE c1/c2 FROM t1 ORDER BY c2; +SELECT c1, c2, c1 DIV c2, 0 LIKE c1 DIV c2 FROM t1 ORDER BY c2; +SELECT c1, c2, c1 MOD c2, 0 LIKE c1 MOD c2 FROM t1 ORDER BY c2; + +CREATE VIEW v1 AS +SELECT 1 LIKE c1|c2, 1 LIKE c1&c2, 1 LIKE c2>>c1, 2 LIKE c2<<c1, + 1 LIKE c1||c2, 2 LIKE c1+c2, -1 LIKE c1-c2, 2 LIKE c1*c2, + 0.5000 LIKE c1/c2, 0 LIKE c1 DIV c2, 0 LIKE c1 MOD c2 + FROM t1 ORDER BY c2; + +SELECT * FROM v1; +EXPLAIN EXTENDED SELECT * FROM v1; +DROP VIEW v1; +DROP TABLE t1; diff --git a/mysql-test/main/func_sapdb.result b/mysql-test/main/func_sapdb.result index 5b9743fb33f..27f1d74bc41 100644 --- a/mysql-test/main/func_sapdb.result +++ b/mysql-test/main/func_sapdb.result @@ -107,9 +107,13 @@ subtime("1997-12-31 23:59:59.000001", "1 1:1:1.000002") select addtime("1997-12-31 23:59:59.999999", "1998-01-01 01:01:01.999999"); addtime("1997-12-31 23:59:59.999999", "1998-01-01 01:01:01.999999") NULL +Warnings: +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '1998-01-01 01:01:01.999999' select subtime("1997-12-31 23:59:59.999999", "1998-01-01 01:01:01.999999"); subtime("1997-12-31 23:59:59.999999", "1998-01-01 01:01:01.999999") NULL +Warnings: +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '1998-01-01 01:01:01.999999' select subtime("01:00:00.999999", "02:00:00.999998"); subtime("01:00:00.999999", "02:00:00.999998") -00:59:59.999999 @@ -180,7 +184,7 @@ select time("1997-12-31 25:59:59.000001"); time("1997-12-31 25:59:59.000001") NULL Warnings: -Warning 1292 Truncated incorrect time value: '1997-12-31 25:59:59.000001' +Warning 1292 Incorrect time value: '1997-12-31 25:59:59.000001' select microsecond("1997-12-31 23:59:59.000001"); microsecond("1997-12-31 23:59:59.000001") 1 diff --git a/mysql-test/main/func_time.result b/mysql-test/main/func_time.result index 075f5b9ec51..a6e1ed9cb19 100644 --- a/mysql-test/main/func_time.result +++ b/mysql-test/main/func_time.result @@ -941,7 +941,7 @@ f1 select f1 from t1 where cast("2006-1-1" as date) between f1 and cast('zzz' as date); f1 Warnings: -Warning 1292 Incorrect datetime value: 'zzz' +Warning 1292 Truncated incorrect datetime value: 'zzz' select f1 from t1 where makedate(2006,1) between date(f1) and date(f3); f1 2006-01-01 @@ -1105,7 +1105,7 @@ week(20061108), week(20061108.01), week(20061108085411.000002); isnull(week(now() + 0)) isnull(week(now() + 0.2)) week(20061108) week(20061108.01) week(20061108085411.000002) 0 0 45 45 45 Warnings: -Warning 1292 Truncated incorrect datetime value: '20061108.01' +Note 1292 Truncated incorrect date value: '20061108.01' End of 4.1 tests select time_format('100:00:00', '%H %k %h %I %l'); time_format('100:00:00', '%H %k %h %I %l') @@ -1382,9 +1382,9 @@ SELECT COUNT(*) FROM t1 GROUP BY TIME_TO_SEC(a); COUNT(*) 2 Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '' +Warning 1292 Incorrect time value: '' +Warning 1292 Incorrect time value: '' +Warning 1292 Incorrect time value: '' DROP TABLE t1; # # Bug#11766112 59151:UNINITIALIZED VALUES IN EXTRACT_DATE_TIME WITH STR_TO_DATE(SPACE(..) ... @@ -1735,7 +1735,7 @@ select 1 from t1 where 1 < some (select cast(a as datetime) from t1); 1 1 Warnings: -Warning 1292 Incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '1' drop table t1; SET timestamp=DEFAULT; # @@ -1842,7 +1842,7 @@ select cast('131415.123e0' as time); cast('131415.123e0' as time) NULL Warnings: -Warning 1292 Truncated incorrect time value: '131415.123e0' +Warning 1292 Incorrect time value: '131415.123e0' select cast('2010-01-02 03:04:05' as datetime) between null and '2010-01-02 03:04:04'; cast('2010-01-02 03:04:05' as datetime) between null and '2010-01-02 03:04:04' 0 @@ -1918,7 +1918,7 @@ select least(1, f1) from t1; least(1, f1) 0000-00-00 00:00:00 Warnings: -Warning 1292 Incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '1' drop table t1; SET timestamp=UNIX_TIMESTAMP('2014-04-14 10:10:10'); select now() > coalesce(time('21:43:24'), date('2010-05-03')); @@ -2519,7 +2519,7 @@ TIMESTAMP('2001-01-01','10:10:10.12345'), TIMESTAMP('2001-01-01','10:10:10.123456'), TIMESTAMP('2001-01-01','10:10:10.1234567'); Warnings: -Note 1292 Truncated incorrect time value: '10:10:10.1234567' +Note 1292 Truncated incorrect INTERVAL DAY TO SECOND value: '10:10:10.1234567' SHOW COLUMNS FROM t1; Field Type Null Key Default Extra TIMESTAMP('2001-01-01','10:10:10') datetime YES NULL @@ -2805,6 +2805,169 @@ SEC_TO_TIME(MAKEDATE(0,RAND(~0))) 838:59:59 Warnings: Warning 1292 Truncated incorrect seconds value: '20000101' +SELECT PERIOD_DIFF(2018, AES_ENCRYPT('Rae Bareli', 'Rae Bareli')); +PERIOD_DIFF(2018, AES_ENCRYPT('Rae Bareli', 'Rae Bareli')) +24257 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-3S\xFA\xDE?\x00\x00\xCA\xB3\xEEE\xA4\xD1\xC1\xA8' +# +# MDEV-17249 MAKETIME(-1e50,0,0) returns a wrong result +# +SELECT +MAKETIME(1e10,0,0), +MAKETIME(-1e10,0,0), +MAKETIME(1e50,0,0), +MAKETIME(-1e50,0,0), +MAKETIME(COALESCE(1e50),0,0), +MAKETIME(COALESCE(-1e50),0,0); +MAKETIME(1e10,0,0) 838:59:59 +MAKETIME(-1e10,0,0) -838:59:59 +MAKETIME(1e50,0,0) 838:59:59 +MAKETIME(-1e50,0,0) -838:59:59 +MAKETIME(COALESCE(1e50),0,0) 838:59:59 +MAKETIME(COALESCE(-1e50),0,0) -838:59:59 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '10000000000:00:00' +Level Warning +Code 1292 +Message Truncated incorrect time value: '-10000000000:00:00' +Level Warning +Code 1292 +Message Truncated incorrect time value: '9223372036854775807:00:00' +Level Warning +Code 1292 +Message Truncated incorrect time value: '-9223372036854775808:00:00' +Level Warning +Code 1292 +Message Truncated incorrect time value: '9223372036854775807:00:00' +Level Warning +Code 1292 +Message Truncated incorrect time value: '-9223372036854775808:00:00' +CREATE TABLE t1 (a FLOAT); +INSERT INTO t1 VALUES (1e30),(-1e30); +SELECT MAKETIME(a,0,0) FROM t1; +MAKETIME(a,0,0) +838:59:59 +-838:59:59 +Warnings: +Warning 1292 Truncated incorrect time value: '9223372036854775807:00:00' +Warning 1292 Truncated incorrect time value: '-9223372036854775808:00:00' +DROP TABLE t1; +# +# MDEV-17244 MAKETIME(900,0,0.111) returns a wrong result +# +SELECT MAKETIME(900,0,0); +MAKETIME(900,0,0) +838:59:59 +Warnings: +Warning 1292 Truncated incorrect time value: '900:00:00' +SELECT MAKETIME(900,0,0.1); +MAKETIME(900,0,0.1) +838:59:59.9 +Warnings: +Warning 1292 Truncated incorrect time value: '900:00:00' +SELECT MAKETIME(900,0,0.11); +MAKETIME(900,0,0.11) +838:59:59.99 +Warnings: +Warning 1292 Truncated incorrect time value: '900:00:00' +SELECT MAKETIME(900,0,0.111); +MAKETIME(900,0,0.111) +838:59:59.999 +Warnings: +Warning 1292 Truncated incorrect time value: '900:00:00' +SELECT MAKETIME(900,0,0.1111); +MAKETIME(900,0,0.1111) +838:59:59.9999 +Warnings: +Warning 1292 Truncated incorrect time value: '900:00:00' +SELECT MAKETIME(900,0,0.11111); +MAKETIME(900,0,0.11111) +838:59:59.99999 +Warnings: +Warning 1292 Truncated incorrect time value: '900:00:00' +SELECT MAKETIME(900,0,0.111111); +MAKETIME(900,0,0.111111) +838:59:59.999999 +Warnings: +Warning 1292 Truncated incorrect time value: '900:00:00' +SELECT MAKETIME(900,0,0.1111111); +MAKETIME(900,0,0.1111111) +838:59:59.999999 +Warnings: +Warning 1292 Truncated incorrect time value: '900:00:00' +SELECT MAKETIME(900,0,0.11111111); +MAKETIME(900,0,0.11111111) +838:59:59.999999 +Warnings: +Warning 1292 Truncated incorrect time value: '900:00:00' +SELECT MAKETIME(900,0,0.111111111); +MAKETIME(900,0,0.111111111) +838:59:59.999999 +Warnings: +Warning 1292 Truncated incorrect time value: '900:00:00' +SELECT MAKETIME(900,0,EXP(1)); +MAKETIME(900,0,EXP(1)) +838:59:59.999999 +Warnings: +Warning 1292 Truncated incorrect time value: '900:00:02' +SELECT MAKETIME(-900,0,0); +MAKETIME(-900,0,0) +-838:59:59 +Warnings: +Warning 1292 Truncated incorrect time value: '-900:00:00' +SELECT MAKETIME(-900,0,0.1); +MAKETIME(-900,0,0.1) +-838:59:59.9 +Warnings: +Warning 1292 Truncated incorrect time value: '-900:00:00' +SELECT MAKETIME(-900,0,0.11); +MAKETIME(-900,0,0.11) +-838:59:59.99 +Warnings: +Warning 1292 Truncated incorrect time value: '-900:00:00' +SELECT MAKETIME(-900,0,0.111); +MAKETIME(-900,0,0.111) +-838:59:59.999 +Warnings: +Warning 1292 Truncated incorrect time value: '-900:00:00' +SELECT MAKETIME(-900,0,0.1111); +MAKETIME(-900,0,0.1111) +-838:59:59.9999 +Warnings: +Warning 1292 Truncated incorrect time value: '-900:00:00' +SELECT MAKETIME(-900,0,0.11111); +MAKETIME(-900,0,0.11111) +-838:59:59.99999 +Warnings: +Warning 1292 Truncated incorrect time value: '-900:00:00' +SELECT MAKETIME(-900,0,0.111111); +MAKETIME(-900,0,0.111111) +-838:59:59.999999 +Warnings: +Warning 1292 Truncated incorrect time value: '-900:00:00' +SELECT MAKETIME(-900,0,0.1111111); +MAKETIME(-900,0,0.1111111) +-838:59:59.999999 +Warnings: +Warning 1292 Truncated incorrect time value: '-900:00:00' +SELECT MAKETIME(-900,0,0.11111111); +MAKETIME(-900,0,0.11111111) +-838:59:59.999999 +Warnings: +Warning 1292 Truncated incorrect time value: '-900:00:00' +SELECT MAKETIME(-900,0,0.111111111); +MAKETIME(-900,0,0.111111111) +-838:59:59.999999 +Warnings: +Warning 1292 Truncated incorrect time value: '-900:00:00' +SELECT MAKETIME(-900,0,EXP(1)); +MAKETIME(-900,0,EXP(1)) +-838:59:59.999999 +Warnings: +Warning 1292 Truncated incorrect time value: '-900:00:02' # # End of 5.5 tests # @@ -2977,7 +3140,7 @@ def EXTRACT(YEAR_MONTH FROM a) 3 6 6 Y 32896 0 63 def EXTRACT(QUARTER FROM a) 3 2 1 Y 32896 0 63 def EXTRACT(MONTH FROM a) 3 2 2 Y 32896 0 63 def EXTRACT(WEEK FROM a) 3 2 2 Y 32896 0 63 -def EXTRACT(DAY FROM a) 3 2 2 Y 32896 0 63 +def EXTRACT(DAY FROM a) 3 3 2 Y 32896 0 63 def EXTRACT(DAY_HOUR FROM a) 3 5 4 Y 32896 0 63 def EXTRACT(DAY_MINUTE FROM a) 3 7 6 Y 32896 0 63 def EXTRACT(DAY_SECOND FROM a) 3 9 8 Y 32896 0 63 @@ -3067,7 +3230,7 @@ t2 CREATE TABLE `t2` ( `EXTRACT(QUARTER FROM a)` int(2) DEFAULT NULL, `EXTRACT(MONTH FROM a)` int(2) DEFAULT NULL, `EXTRACT(WEEK FROM a)` int(2) DEFAULT NULL, - `EXTRACT(DAY FROM a)` int(2) DEFAULT NULL, + `EXTRACT(DAY FROM a)` int(3) DEFAULT NULL, `EXTRACT(DAY_HOUR FROM a)` int(5) DEFAULT NULL, `EXTRACT(DAY_MINUTE FROM a)` int(7) DEFAULT NULL, `EXTRACT(DAY_SECOND FROM a)` int(9) DEFAULT NULL, @@ -3116,7 +3279,7 @@ def EXTRACT(YEAR_MONTH FROM a) 3 6 1 Y 32896 0 63 def EXTRACT(QUARTER FROM a) 3 2 1 Y 32896 0 63 def EXTRACT(MONTH FROM a) 3 2 1 Y 32896 0 63 def EXTRACT(WEEK FROM a) 3 2 9 Y 32896 0 63 -def EXTRACT(DAY FROM a) 3 2 2 Y 32896 0 63 +def EXTRACT(DAY FROM a) 3 3 3 Y 32896 0 63 def EXTRACT(DAY_HOUR FROM a) 3 5 5 Y 32896 0 63 def EXTRACT(DAY_MINUTE FROM a) 3 7 7 Y 32896 0 63 def EXTRACT(DAY_SECOND FROM a) 3 9 9 Y 32896 0 63 @@ -3137,7 +3300,7 @@ EXTRACT(YEAR_MONTH FROM a) 0 EXTRACT(QUARTER FROM a) 0 EXTRACT(MONTH FROM a) 0 EXTRACT(WEEK FROM a) 613566757 -EXTRACT(DAY FROM a) 34 +EXTRACT(DAY FROM a) -34 EXTRACT(DAY_HOUR FROM a) -3422 EXTRACT(DAY_MINUTE FROM a) -342259 EXTRACT(DAY_SECOND FROM a) -34225959 @@ -3203,7 +3366,7 @@ EXTRACT(YEAR_MONTH FROM a) 0 EXTRACT(QUARTER FROM a) 0 EXTRACT(MONTH FROM a) 0 EXTRACT(WEEK FROM a) 613566757 -EXTRACT(DAY FROM a) 34 +EXTRACT(DAY FROM a) -34 EXTRACT(DAY_HOUR FROM a) -3422 EXTRACT(DAY_MINUTE FROM a) -342259 EXTRACT(DAY_SECOND FROM a) -34225959 @@ -3248,7 +3411,7 @@ t2 CREATE TABLE `t2` ( `EXTRACT(QUARTER FROM a)` int(2) DEFAULT NULL, `EXTRACT(MONTH FROM a)` int(2) DEFAULT NULL, `EXTRACT(WEEK FROM a)` int(2) DEFAULT NULL, - `EXTRACT(DAY FROM a)` int(2) DEFAULT NULL, + `EXTRACT(DAY FROM a)` int(3) DEFAULT NULL, `EXTRACT(DAY_HOUR FROM a)` int(5) DEFAULT NULL, `EXTRACT(DAY_MINUTE FROM a)` int(7) DEFAULT NULL, `EXTRACT(DAY_SECOND FROM a)` int(9) DEFAULT NULL, @@ -3414,6 +3577,11 @@ ADDTIME(TIME'10:20:30', DATE'2001-01-01') AS c3, ADDTIME(TIME'10:20:30', COALESCE(DATE'2001-01-01',TIMESTAMP'2001-01-01 00:00:00')) AS c4; c1 c2 c3 c4 NULL NULL NULL NULL +Warnings: +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '2001-01-01 00:00:00' +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '2001-01-01 00:00:00' +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '2001-01-01' +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '2001-01-01 00:00:00' SELECT HOUR(TIMESTAMP'0000-00-01 10:00:00') AS h0, TIME_TO_SEC(TIMESTAMP'0000-00-01 10:00:00') AS tts0, @@ -3554,6 +3722,39 @@ DROP FUNCTION fn_sleep_before_now; DROP TRIGGER trg_insert_t_ts; DROP TABLE t_ts, t_trig; # +# MDEV-16878 Functions ADDTIME and SUBTIME get wrongly removed from WHERE by the equal expression optimizer +# +CREATE TABLE t1 (a TIME); +INSERT INTO t1 VALUES ('00:00:10'),('00:00:20'); +SELECT a, SUBTIME(a,TIME'00:00:01'), ADDTIME(a,TIME'00:00:01') FROM t1; +a SUBTIME(a,TIME'00:00:01') ADDTIME(a,TIME'00:00:01') +00:00:10 00:00:09 00:00:11 +00:00:20 00:00:19 00:00:21 +SELECT * FROM t1 WHERE SUBTIME(a,TIME'00:00:01')=TIME'00:00:09'; +a +00:00:10 +SELECT * FROM t1 WHERE ADDTIME(a,TIME'00:00:01')<=TIME'00:00:09'; +a +SELECT * FROM t1 WHERE SUBTIME(a,TIME'00:00:01')=TIME'00:00:09' AND ADDTIME(a,TIME'00:00:01')<=TIME'00:00:09'; +a +EXPLAIN EXTENDED SELECT * FROM t1 WHERE SUBTIME(a,TIME'00:00:01')=TIME'00:00:09' AND ADDTIME(a,TIME'00:00:01')<=TIME'00:00:09'; +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 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where subtime(`test`.`t1`.`a`,TIME'00:00:01') = TIME'00:00:09' and addtime(`test`.`t1`.`a`,TIME'00:00:01') <= TIME'00:00:09' +DROP TABLE t1; +# +# MDEV-15363 Wrong result for CAST(LAST_DAY(TIME'00:00:00') AS TIME) +# +set timestamp=unix_timestamp('2018-08-02 10:10:10'); +SELECT +LAST_DAY(TIME'00:00:00') AS c1, +CAST(CAST(LAST_DAY(TIME'00:00:00') AS DATE) AS TIME) AS c2, +CAST(LAST_DAY(TIME'00:00:00') AS TIME) AS c3; +c1 c2 c3 +2018-08-31 00:00:00 00:00:00 +# End of 10.3 tests +# # MDEV-14032 SEC_TO_TIME executes side effect two times # SET @a=10000000; @@ -3582,3 +3783,2463 @@ a f1 was called DROP TABLE t1; DROP FUNCTION f1; +# +# MDEV-17351 MICROSECOND(XXX(int_number_out_of_range)) erroneously returns 999999 +# +# Reject anything that's parsed as DATETIME or DATE +CREATE TABLE t1 (a VARCHAR(64)); +INSERT INTO t1 VALUES +('2001-01-01 10:20:30'), +('01-01-01 10:20:30'), +('2001-01-01 '), +('20010101102030'), +('010101102030'); +SELECT ADDTIME(DATE'2001-01-01',a), a FROM t1; +ADDTIME(DATE'2001-01-01',a) a +NULL 2001-01-01 10:20:30 +NULL 01-01-01 10:20:30 +NULL 2001-01-01 +NULL 20010101102030 +NULL 010101102030 +Warnings: +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '2001-01-01 10:20:30' +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '01-01-01 10:20:30' +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '2001-01-01 ' +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '20010101102030' +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '010101102030' +DROP TABLE t1; +# GREATEST(decimal, time) +SELECT +GREATEST(8395959, TIME'00:00:00') AS c0, +GREATEST(8395959.0, TIME'00:00:00') AS c1, +GREATEST(8395959.00, TIME'00:00:00') AS c2, +GREATEST(8395959.000, TIME'00:00:00') AS c3, +GREATEST(8395959.0000, TIME'00:00:00') AS c4, +GREATEST(8395959.00000, TIME'00:00:00') AS c5, +GREATEST(8395959.000000, TIME'00:00:00') AS c6, +GREATEST(8395959.0000000, TIME'00:00:00') AS c7; +c0 838:59:59 +c1 838:59:59.9 +c2 838:59:59.99 +c3 838:59:59.999 +c4 838:59:59.9999 +c5 838:59:59.99999 +c6 838:59:59.999999 +c7 838:59:59.999999 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959.0' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959.00' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959.000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959.0000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959.00000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959.000000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959.0000000' +SELECT +MICROSECOND(GREATEST(8395959, TIME'00:00:00')) AS c0, +MICROSECOND(GREATEST(8395959.0, TIME'00:00:00')) AS c1, +MICROSECOND(GREATEST(8395959.00, TIME'00:00:00')) AS c2, +MICROSECOND(GREATEST(8395959.000, TIME'00:00:00')) AS c3, +MICROSECOND(GREATEST(8395959.0000, TIME'00:00:00')) AS c4, +MICROSECOND(GREATEST(8395959.00000, TIME'00:00:00')) AS c5, +MICROSECOND(GREATEST(8395959.000000, TIME'00:00:00')) AS c6, +MICROSECOND(GREATEST(8395959.0000000, TIME'00:00:00')) AS c7; +c0 0 +c1 900000 +c2 990000 +c3 999000 +c4 999900 +c5 999990 +c6 999999 +c7 999999 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959.0' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959.00' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959.000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959.0000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959.00000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959.000000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959.0000000' +SELECT +CAST(GREATEST(8395959, TIME'00:00:00') AS SIGNED) AS ci, +CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,0)) AS c0, +CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,1)) AS c1, +CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,2)) AS c2, +CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,3)) AS c3, +CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,4)) AS c4, +CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,5)) AS c5, +CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,6)) AS c6, +CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,7)) AS c7; +ci 8385959 +c0 8385959 +c1 8385959.0 +c2 8385959.00 +c3 8385959.000 +c4 8385959.0000 +c5 8385959.00000 +c6 8385959.000000 +c7 8385959.0000000 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959' +SELECT +GREATEST(8395959, TIME'00:00:00') AS ci, +GREATEST(8395959, TIME'00:00:00')+0 AS c0, +GREATEST(8395959, TIME'00:00:00')+0.0 AS c1, +GREATEST(8395959, TIME'00:00:00')+0.00 AS c2, +GREATEST(8395959, TIME'00:00:00')+0.000 AS c3, +GREATEST(8395959, TIME'00:00:00')+0.0000 AS c4, +GREATEST(8395959, TIME'00:00:00')+0.00000 AS c5, +GREATEST(8395959, TIME'00:00:00')+0.000000 AS c6, +GREATEST(8395959, TIME'00:00:00')+0.0000000 AS c7; +ci 838:59:59 +c0 8385959 +c1 8385959.0 +c2 8385959.00 +c3 8385959.000 +c4 8385959.0000 +c5 8385959.00000 +c6 8385959.000000 +c7 8385959.0000000 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959' +Level Warning +Code 1292 +Message Truncated incorrect time value: '8395959' +# GREATEST(string, time) +SELECT +GREATEST('839:59:59', TIME'00:00:00') AS ci, +GREATEST('839:59:59.0', TIME'00:00:00') AS c1, +GREATEST('839:59:59.00', TIME'00:00:00') AS c2, +GREATEST('839:59:59.000', TIME'00:00:00') AS c3, +GREATEST('839:59:59.0000', TIME'00:00:00') AS c4, +GREATEST('839:59:59.00000', TIME'00:00:00') AS c5, +GREATEST('839:59:59.000000', TIME'00:00:00') AS c6, +GREATEST('839:59:59.0000000', TIME'00:00:00') AS c7; +ci 838:59:59 +c1 838:59:59.9 +c2 838:59:59.99 +c3 838:59:59.999 +c4 838:59:59.9999 +c5 838:59:59.99999 +c6 838:59:59.999999 +c7 838:59:59.999999 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59.0' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59.00' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59.000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59.0000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59.00000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59.000000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59.0000000' +SELECT +MICROSECOND(GREATEST('839:59:59', TIME'00:00:00')) AS ci, +MICROSECOND(GREATEST('839:59:59.0', TIME'00:00:00')) AS c1, +MICROSECOND(GREATEST('839:59:59.00', TIME'00:00:00')) AS c2, +MICROSECOND(GREATEST('839:59:59.000', TIME'00:00:00')) AS c3, +MICROSECOND(GREATEST('839:59:59.0000', TIME'00:00:00')) AS c4, +MICROSECOND(GREATEST('839:59:59.00000', TIME'00:00:00')) AS c5, +MICROSECOND(GREATEST('839:59:59.000000', TIME'00:00:00')) AS c6, +MICROSECOND(GREATEST('839:59:59.0000000', TIME'00:00:00')) AS c7; +ci 0 +c1 900000 +c2 990000 +c3 999000 +c4 999900 +c5 999990 +c6 999999 +c7 999999 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59.0' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59.00' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59.000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59.0000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59.00000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59.000000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59.0000000' +SELECT +CAST(GREATEST('839:59:59', TIME'00:00:00') AS SIGNED) AS ci, +CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,0)) AS c0, +CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,1)) AS c1, +CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,2)) AS c2, +CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,3)) AS c3, +CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,4)) AS c4, +CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,5)) AS c5, +CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,6)) AS c6, +CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,7)) AS c7; +ci 8385959 +c0 8385959 +c1 8385959.0 +c2 8385959.00 +c3 8385959.000 +c4 8385959.0000 +c5 8385959.00000 +c6 8385959.000000 +c7 8385959.0000000 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +SELECT +GREATEST('839:59:59', TIME'00:00:00') AS ci, +GREATEST('839:59:59', TIME'00:00:00')+0 AS c0, +GREATEST('839:59:59', TIME'00:00:00')+0.0 AS c1, +GREATEST('839:59:59', TIME'00:00:00')+0.00 AS c2, +GREATEST('839:59:59', TIME'00:00:00')+0.000 AS c3, +GREATEST('839:59:59', TIME'00:00:00')+0.0000 AS c4, +GREATEST('839:59:59', TIME'00:00:00')+0.00000 AS c5, +GREATEST('839:59:59', TIME'00:00:00')+0.000000 AS c6, +GREATEST('839:59:59', TIME'00:00:00')+0.0000000 AS c7; +ci 838:59:59 +c0 8385959 +c1 8385959.0 +c2 8385959.00 +c3 8385959.000 +c4 8385959.0000 +c5 8385959.00000 +c6 8385959.000000 +c7 8385959.0000000 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +# ADDTIME(datetime, decimal) +SELECT +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS c0, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.0) AS c1, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.00) AS c2, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.000) AS c3, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.0000) AS c4, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.00000) AS c5, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.000000) AS c6, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.0000000) AS c7; +c0 2001-02-04 23:59:59 +c1 2001-02-04 23:59:59.0 +c2 2001-02-04 23:59:59.00 +c3 2001-02-04 23:59:59.000 +c4 2001-02-04 23:59:59.0000 +c5 2001-02-04 23:59:59.00000 +c6 2001-02-04 23:59:59.000000 +c7 2001-02-04 23:59:59.000000 +Warnings: +Level Note +Code 1292 +Message Truncated incorrect INTERVAL DAY TO SECOND value: '8395959.0000000' +SELECT +MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)) AS c0, +MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.0)) AS c1, +MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.00)) AS c2, +MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.000)) AS c3, +MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.0000)) AS c4, +MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.00000)) AS c5, +MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.000000)) AS c6, +MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.0000000)) AS c7; +c0 0 +c1 0 +c2 0 +c3 0 +c4 0 +c5 0 +c6 0 +c7 0 +Warnings: +Level Note +Code 1292 +Message Truncated incorrect INTERVAL DAY TO SECOND value: '8395959.0000000' +SELECT +CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS SIGNED) AS ci, +CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,0)) AS c0, +CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,1)) AS c1, +CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,2)) AS c2, +CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,3)) AS c3, +CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,4)) AS c4, +CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,5)) AS c5, +CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,6)) AS c6, +CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,7)) AS c7; +ci 20010204235959 +c0 20010204235959 +c1 20010204235959.0 +c2 20010204235959.00 +c3 20010204235959.000 +c4 20010204235959.0000 +c5 20010204235959.00000 +c6 20010204235959.000000 +c7 20010204235959.0000000 +SELECT +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS ci, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0 AS c0, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.0 AS c1, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.00 AS c2, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.000 AS c3, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.0000 AS c4, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.00000 AS c5, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.000000 AS c6, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.0000000 AS c7; +ci 2001-02-04 23:59:59 +c0 20010204235959 +c1 20010204235959.0 +c2 20010204235959.00 +c3 20010204235959.000 +c4 20010204235959.0000 +c5 20010204235959.00000 +c6 20010204235959.000000 +c7 20010204235959.0000000 +# ADDTIME(datetime, string) +SELECT +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS c0, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.0') AS c1, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.00') AS c2, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.000') AS c3, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.0000') AS c4, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.00000') AS c5, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.000000') AS c6, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.0000000') AS c7; +c0 2001-02-04 23:59:59 +c1 2001-02-04 23:59:59.0 +c2 2001-02-04 23:59:59.00 +c3 2001-02-04 23:59:59.000 +c4 2001-02-04 23:59:59.0000 +c5 2001-02-04 23:59:59.00000 +c6 2001-02-04 23:59:59.000000 +c7 2001-02-04 23:59:59.000000 +Warnings: +Level Note +Code 1292 +Message Truncated incorrect INTERVAL DAY TO SECOND value: '839:59:59.0000000' +SELECT +MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')) AS c0, +MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.0')) AS c1, +MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.00')) AS c2, +MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.000')) AS c3, +MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.0000')) AS c4, +MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.00000')) AS c5, +MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.000000')) AS c6, +MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.0000000')) AS c7; +c0 0 +c1 0 +c2 0 +c3 0 +c4 0 +c5 0 +c6 0 +c7 0 +Warnings: +Level Note +Code 1292 +Message Truncated incorrect INTERVAL DAY TO SECOND value: '839:59:59.0000000' +SELECT +CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS SIGNED) AS ci, +CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,0)) AS c0, +CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,1)) AS c1, +CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,2)) AS c2, +CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,3)) AS c3, +CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,4)) AS c4, +CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,5)) AS c5, +CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,6)) AS c6, +CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,7)) AS c7; +ci 20010204235959 +c0 20010204235959 +c1 20010204235959.0 +c2 20010204235959.00 +c3 20010204235959.000 +c4 20010204235959.0000 +c5 20010204235959.00000 +c6 20010204235959.000000 +c7 20010204235959.0000000 +SELECT +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS ci, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0 AS c0, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.0 AS c1, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.00 AS c2, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.000 AS c3, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.0000 AS c4, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.00000 AS c5, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.000000 AS c6, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.0000000 AS c7; +ci 2001-02-04 23:59:59 +c0 20010204235959 +c1 20010204235959.0 +c2 20010204235959.00 +c3 20010204235959.000 +c4 20010204235959.0000 +c5 20010204235959.00000 +c6 20010204235959.000000 +c7 20010204235959.0000000 +# ADDTIME(time, decimal) +SELECT +ADDTIME(TIME'00:00:00', 8395959) AS c0, +ADDTIME(TIME'00:00:00', 8395959.0) AS c1, +ADDTIME(TIME'00:00:00', 8395959.00) AS c2, +ADDTIME(TIME'00:00:00', 8395959.000) AS c3, +ADDTIME(TIME'00:00:00', 8395959.0000) AS c4, +ADDTIME(TIME'00:00:00', 8395959.00000) AS c5, +ADDTIME(TIME'00:00:00', 8395959.000000) AS c6, +ADDTIME(TIME'00:00:00', 8395959.0000000) AS c7; +c0 838:59:59 +c1 838:59:59.9 +c2 838:59:59.99 +c3 838:59:59.999 +c4 838:59:59.9999 +c5 838:59:59.99999 +c6 838:59:59.999999 +c7 838:59:59.999999 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Note +Code 1292 +Message Truncated incorrect INTERVAL DAY TO SECOND value: '8395959.0000000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +SELECT +MICROSECOND(ADDTIME(TIME'00:00:00', 8395959)) AS c0, +MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.0)) AS c1, +MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.00)) AS c2, +MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.000)) AS c3, +MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.0000)) AS c4, +MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.00000)) AS c5, +MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.000000)) AS c6, +MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.0000000)) AS c7; +c0 0 +c1 900000 +c2 990000 +c3 999000 +c4 999900 +c5 999990 +c6 999999 +c7 999999 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Note +Code 1292 +Message Truncated incorrect INTERVAL DAY TO SECOND value: '8395959.0000000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +SELECT +CAST(ADDTIME(TIME'00:00:00', 8395959) AS SIGNED) AS ci, +CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,0)) AS c0, +CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,1)) AS c1, +CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,2)) AS c2, +CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,3)) AS c3, +CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,4)) AS c4, +CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,5)) AS c5, +CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,6)) AS c6, +CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,7)) AS c7; +ci 8385959 +c0 8385959 +c1 8385959.0 +c2 8385959.00 +c3 8385959.000 +c4 8385959.0000 +c5 8385959.00000 +c6 8385959.000000 +c7 8385959.0000000 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +SELECT +ADDTIME(TIME'00:00:00', 8395959) AS ci, +ADDTIME(TIME'00:00:00', 8395959)+0 AS c0, +ADDTIME(TIME'00:00:00', 8395959)+0.0 AS c1, +ADDTIME(TIME'00:00:00', 8395959)+0.00 AS c2, +ADDTIME(TIME'00:00:00', 8395959)+0.000 AS c3, +ADDTIME(TIME'00:00:00', 8395959)+0.0000 AS c4, +ADDTIME(TIME'00:00:00', 8395959)+0.00000 AS c5, +ADDTIME(TIME'00:00:00', 8395959)+0.000000 AS c6, +ADDTIME(TIME'00:00:00', 8395959)+0.0000000 AS c7; +ci 838:59:59 +c0 8385959 +c1 8385959.0 +c2 8385959.00 +c3 8385959.000 +c4 8385959.0000 +c5 8385959.00000 +c6 8385959.000000 +c7 8385959.0000000 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +# ADDTIME(time,string) +SELECT +ADDTIME(TIME'00:00:00', '839:59:59') AS c0, +ADDTIME(TIME'00:00:00', '839:59:59.0') AS c1, +ADDTIME(TIME'00:00:00', '839:59:59.00') AS c2, +ADDTIME(TIME'00:00:00', '839:59:59.000') AS c3, +ADDTIME(TIME'00:00:00', '839:59:59.0000') AS c4, +ADDTIME(TIME'00:00:00', '839:59:59.00000') AS c5, +ADDTIME(TIME'00:00:00', '839:59:59.000000') AS c6, +ADDTIME(TIME'00:00:00', '839:59:59.0000000') AS c7; +c0 838:59:59 +c1 838:59:59.9 +c2 838:59:59.99 +c3 838:59:59.999 +c4 838:59:59.9999 +c5 838:59:59.99999 +c6 838:59:59.999999 +c7 838:59:59.999999 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Note +Code 1292 +Message Truncated incorrect INTERVAL DAY TO SECOND value: '839:59:59.0000000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +SELECT +MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59')) AS c0, +MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.0')) AS c1, +MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.00')) AS c2, +MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.000')) AS c3, +MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.0000')) AS c4, +MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.00000')) AS c5, +MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.000000')) AS c6, +MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.0000000')) AS c7; +c0 0 +c1 900000 +c2 990000 +c3 999000 +c4 999900 +c5 999990 +c6 999999 +c7 999999 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Note +Code 1292 +Message Truncated incorrect INTERVAL DAY TO SECOND value: '839:59:59.0000000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +SELECT +CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS SIGNED) AS ci, +CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,0)) AS c0, +CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,1)) AS c1, +CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,2)) AS c2, +CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,3)) AS c3, +CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,4)) AS c4, +CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,5)) AS c5, +CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,6)) AS c6, +CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,7)) AS c7; +ci 8385959 +c0 8385959 +c1 8385959.0 +c2 8385959.00 +c3 8385959.000 +c4 8385959.0000 +c5 8385959.00000 +c6 8385959.000000 +c7 8385959.0000000 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +SELECT +ADDTIME(TIME'00:00:00', '839:59:59') AS ci, +ADDTIME(TIME'00:00:00', '839:59:59')+0 AS c0, +ADDTIME(TIME'00:00:00', '839:59:59')+0.0 AS c1, +ADDTIME(TIME'00:00:00', '839:59:59')+0.00 AS c2, +ADDTIME(TIME'00:00:00', '839:59:59')+0.000 AS c3, +ADDTIME(TIME'00:00:00', '839:59:59')+0.0000 AS c4, +ADDTIME(TIME'00:00:00', '839:59:59')+0.00000 AS c5, +ADDTIME(TIME'00:00:00', '839:59:59')+0.000000 AS c6, +ADDTIME(TIME'00:00:00', '839:59:59')+0.0000000 AS c7; +ci 838:59:59 +c0 8385959 +c1 8385959.0 +c2 8385959.00 +c3 8385959.000 +c4 8385959.0000 +c5 8385959.00000 +c6 8385959.000000 +c7 8385959.0000000 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +# ADDTIME(int,int) +SELECT +ADDTIME(0, 8395959) AS c, +MICROSECOND(ADDTIME(0, 8395959)) AS cm, +CAST(ADDTIME(0, 8395959) AS SIGNED) AS cs_fixme_mdev_17384, +CAST(ADDTIME(0, 8395959) AS DECIMAL(30,0)) AS cd300; +c 838:59:59 +cm 0 +cs_fixme_mdev_17384 838 +cd300 8385959 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect INTEGER value: '838:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +SELECT +ADDTIME(20010101000000, 8395959) AS c, +MICROSECOND(ADDTIME(20010101000000, 8395959)) AS cm, +CAST(ADDTIME(20010101000000, 8395959) AS SIGNED) AS cs_fixme_mdev_17384, +CAST(ADDTIME(20010101000000, 8395959) AS DECIMAL(30,0)) AS cd300; +c 2001-02-04 23:59:59 +cm 0 +cs_fixme_mdev_17384 2001 +cd300 20010204235959 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect INTEGER value: '2001-02-04 23:59:59' +# ADDTIME(decimal,int) +# 8385960 in cd300 is correct: addtime returns '838:59:59.9' +# which is further *rounded* to a decimals(30,0) +SELECT +ADDTIME(0.0, 8395959) AS c, +MICROSECOND(ADDTIME(0.0, 8395959)) AS cm, +CAST(ADDTIME(0.0, 8395959) AS SIGNED) AS cs_fixme_mdev_17384, +CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,0)) AS cd300; +c 838:59:59.9 +cm 900000 +cs_fixme_mdev_17384 838 +cd300 8385960 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect INTEGER value: '838:59:59.9' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +SELECT +ADDTIME(20010101000000.0, 8395959) AS c, +MICROSECOND(ADDTIME(20010101000000.0, 8395959)) AS cm, +CAST(ADDTIME(20010101000000.0, 8395959) AS SIGNED) AS cs_fixme_mdev_17384, +CAST(ADDTIME(20010101000000.0, 8395959) AS DECIMAL(30,0)) AS cd300; +c 2001-02-04 23:59:59.0 +cm 0 +cs_fixme_mdev_17384 2001 +cd300 20010204235959 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect INTEGER value: '2001-02-04 23:59:59.0' +# ADDTIME(decimal,decimal) +SELECT +ADDTIME(0.0, 8395959.0) AS c1, +ADDTIME(0.0, 8395959.00) AS c2, +ADDTIME(0.0, 8395959.000) AS c3, +ADDTIME(0.0, 8395959.0000) AS c4, +ADDTIME(0.0, 8395959.00000) AS c5, +ADDTIME(0.0, 8395959.000000) AS c6, +ADDTIME(0.0, 8395959.0000000) AS c7; +c1 838:59:59.9 +c2 838:59:59.99 +c3 838:59:59.999 +c4 838:59:59.9999 +c5 838:59:59.99999 +c6 838:59:59.999999 +c7 838:59:59.999999 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Note +Code 1292 +Message Truncated incorrect INTERVAL DAY TO SECOND value: '8395959.0000000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +SELECT +MICROSECOND(ADDTIME(0.0, 8395959.0)) AS c1, +MICROSECOND(ADDTIME(0.0, 8395959.00)) AS c2, +MICROSECOND(ADDTIME(0.0, 8395959.000)) AS c3, +MICROSECOND(ADDTIME(0.0, 8395959.0000)) AS c4, +MICROSECOND(ADDTIME(0.0, 8395959.00000)) AS c5, +MICROSECOND(ADDTIME(0.0, 8395959.000000)) AS c6, +MICROSECOND(ADDTIME(0.0, 8395959.0000000)) AS c7; +c1 900000 +c2 990000 +c3 999000 +c4 999900 +c5 999990 +c6 999999 +c7 999999 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Note +Code 1292 +Message Truncated incorrect INTERVAL DAY TO SECOND value: '8395959.0000000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +# 8385960 in c1 is correct: addtime returns '838:59:59.9' +# which is further *rounded* to a decimals(30,0) +SELECT +CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,0)) AS c0, +CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,1)) AS c1, +CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,2)) AS c2, +CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,3)) AS c3, +CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,4)) AS c4, +CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,5)) AS c5, +CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,6)) AS c6, +CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,7)) AS c7; +c0 8385960 +c1 8385959.9 +c2 8385959.90 +c3 8385959.900 +c4 8385959.9000 +c5 8385959.90000 +c6 8385959.900000 +c7 8385959.9000000 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +SELECT +ADDTIME(0.0, 8395959)+0 AS c0, +ADDTIME(0.0, 8395959)+0.0 AS c1, +ADDTIME(0.0, 8395959)+0.00 AS c2, +ADDTIME(0.0, 8395959)+0.000 AS c3, +ADDTIME(0.0, 8395959)+0.0000 AS c4, +ADDTIME(0.0, 8395959)+0.00000 AS c5, +ADDTIME(0.0, 8395959)+0.000000 AS c6, +ADDTIME(0.0, 8395959)+0.0000000 AS c7; +c0 8385959.9 +c1 8385959.9 +c2 8385959.90 +c3 8385959.900 +c4 8385959.9000 +c5 8385959.90000 +c6 8385959.900000 +c7 8385959.9000000 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '839:59:59' +# TIMESTAMP(string,decimal) +SELECT +TIMESTAMP('2001-01-01', 8395959) AS ci, +TIMESTAMP('2001-01-01', 8395959.0) AS c1, +TIMESTAMP('2001-01-01', 8395959.00) AS c2, +TIMESTAMP('2001-01-01', 8395959.000) AS c3, +TIMESTAMP('2001-01-01', 8395959.0000) AS c4, +TIMESTAMP('2001-01-01', 8395959.00000) AS c5, +TIMESTAMP('2001-01-01', 8395959.000000) AS c6, +TIMESTAMP('2001-01-01', 8395959.0000000) AS c7; +ci 2001-02-04 23:59:59 +c1 2001-02-04 23:59:59.0 +c2 2001-02-04 23:59:59.00 +c3 2001-02-04 23:59:59.000 +c4 2001-02-04 23:59:59.0000 +c5 2001-02-04 23:59:59.00000 +c6 2001-02-04 23:59:59.000000 +c7 2001-02-04 23:59:59.000000 +Warnings: +Level Note +Code 1292 +Message Truncated incorrect INTERVAL DAY TO SECOND value: '8395959.0000000' +SELECT +MICROSECOND(TIMESTAMP('2001-01-01', 8395959)) AS ci, +MICROSECOND(TIMESTAMP('2001-01-01', 8395959.0)) AS c1, +MICROSECOND(TIMESTAMP('2001-01-01', 8395959.00)) AS c2, +MICROSECOND(TIMESTAMP('2001-01-01', 8395959.000)) AS c3, +MICROSECOND(TIMESTAMP('2001-01-01', 8395959.0000)) AS c4, +MICROSECOND(TIMESTAMP('2001-01-01', 8395959.00000)) AS c5, +MICROSECOND(TIMESTAMP('2001-01-01', 8395959.000000)) AS c6, +MICROSECOND(TIMESTAMP('2001-01-01', 8395959.0000000)) AS c7; +ci 0 +c1 0 +c2 0 +c3 0 +c4 0 +c5 0 +c6 0 +c7 0 +Warnings: +Level Note +Code 1292 +Message Truncated incorrect INTERVAL DAY TO SECOND value: '8395959.0000000' +SELECT +CAST(TIMESTAMP('2001-01-01', 8395959) AS SIGNED) AS ci, +CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,0)) AS c0, +CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,1)) AS c1, +CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,2)) AS c2, +CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,3)) AS c3, +CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,4)) AS c4, +CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,5)) AS c5, +CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,6)) AS c6; +ci 20010204235959 +c0 20010204235959 +c1 20010204235959.0 +c2 20010204235959.00 +c3 20010204235959.000 +c4 20010204235959.0000 +c5 20010204235959.00000 +c6 20010204235959.000000 +SELECT +TIMESTAMP('2001-01-01', 8395959) AS ci, +TIMESTAMP('2001-01-01', 8395959)+0 AS c0, +TIMESTAMP('2001-01-01', 8395959)+0.0 AS c1, +TIMESTAMP('2001-01-01', 8395959)+0.00 AS c2, +TIMESTAMP('2001-01-01', 8395959)+0.000 AS c3, +TIMESTAMP('2001-01-01', 8395959)+0.0000 AS c4, +TIMESTAMP('2001-01-01', 8395959)+0.00000 AS c5, +TIMESTAMP('2001-01-01', 8395959)+0.000000 AS c6, +TIMESTAMP('2001-01-01', 8395959)+0.0000000 AS c7; +ci 2001-02-04 23:59:59 +c0 20010204235959 +c1 20010204235959.0 +c2 20010204235959.00 +c3 20010204235959.000 +c4 20010204235959.0000 +c5 20010204235959.00000 +c6 20010204235959.000000 +c7 20010204235959.0000000 +# TIMESTAMP(string,string) +SELECT +TIMESTAMP('2001-01-01', '839:59:59') AS ci, +TIMESTAMP('2001-01-01', '839:59:59.0') AS c1, +TIMESTAMP('2001-01-01', '839:59:59.00') AS c2, +TIMESTAMP('2001-01-01', '839:59:59.000') AS c3, +TIMESTAMP('2001-01-01', '839:59:59.0000') AS c4, +TIMESTAMP('2001-01-01', '839:59:59.00000') AS c5, +TIMESTAMP('2001-01-01', '839:59:59.000000') AS c6, +TIMESTAMP('2001-01-01', '839:59:59.0000000') AS c7; +ci 2001-02-04 23:59:59 +c1 2001-02-04 23:59:59.0 +c2 2001-02-04 23:59:59.00 +c3 2001-02-04 23:59:59.000 +c4 2001-02-04 23:59:59.0000 +c5 2001-02-04 23:59:59.00000 +c6 2001-02-04 23:59:59.000000 +c7 2001-02-04 23:59:59.000000 +Warnings: +Level Note +Code 1292 +Message Truncated incorrect INTERVAL DAY TO SECOND value: '839:59:59.0000000' +SELECT +MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59')) AS ci, +MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.0')) AS c1, +MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.00')) AS c2, +MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.000')) AS c3, +MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.0000')) AS c4, +MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.00000')) AS c5, +MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.000000')) AS c6, +MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.0000000')) AS c7; +ci 0 +c1 0 +c2 0 +c3 0 +c4 0 +c5 0 +c6 0 +c7 0 +Warnings: +Level Note +Code 1292 +Message Truncated incorrect INTERVAL DAY TO SECOND value: '839:59:59.0000000' +SELECT +CAST(TIMESTAMP('2001-01-01', '839:59:59') AS SIGNED) AS ci, +CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,0)) AS c0, +CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,1)) AS c1, +CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,2)) AS c2, +CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,3)) AS c3, +CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,4)) AS c4, +CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,5)) AS c5, +CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,6)) AS c6; +ci 20010204235959 +c0 20010204235959 +c1 20010204235959.0 +c2 20010204235959.00 +c3 20010204235959.000 +c4 20010204235959.0000 +c5 20010204235959.00000 +c6 20010204235959.000000 +SELECT +TIMESTAMP('2001-01-01', '839:59:59') AS ci, +TIMESTAMP('2001-01-01', '839:59:59')+0 AS c0, +TIMESTAMP('2001-01-01', '839:59:59')+0.0 AS c1, +TIMESTAMP('2001-01-01', '839:59:59')+0.00 AS c2, +TIMESTAMP('2001-01-01', '839:59:59')+0.000 AS c3, +TIMESTAMP('2001-01-01', '839:59:59')+0.0000 AS c4, +TIMESTAMP('2001-01-01', '839:59:59')+0.00000 AS c5, +TIMESTAMP('2001-01-01', '839:59:59')+0.000000 AS c6, +TIMESTAMP('2001-01-01', '839:59:59')+0.0000000 AS c7; +ci 2001-02-04 23:59:59 +c0 20010204235959 +c1 20010204235959.0 +c2 20010204235959.00 +c3 20010204235959.000 +c4 20010204235959.0000 +c5 20010204235959.00000 +c6 20010204235959.000000 +c7 20010204235959.0000000 +# Corner cases for TIMESTAMP(timestamp,xxx) +# HOUR is outside of supported INTERVAL DAYS TO SECONDS range +# Expect NULL with INTERVAL warnings +CREATE TABLE t1 (a VARCHAR(64), b VARCHAR(64)); +INSERT INTO t1 VALUES ('4294967296:00:00', '178956970 16:00:00'); +INSERT INTO t1 VALUES ('4294967295:59:59', '178956970 15:59:59'); +INSERT INTO t1 VALUES ('4294967294:59:59', '178956970 14:59:59'); +INSERT INTO t1 VALUES ('87649416:00:00', '3652059 00:00:00'); +SELECT TIMESTAMP('0001-01-01 00:00:00', a) AS ta, TIMESTAMP('0001-01-01 00:00:00', b) AS tb FROM t1; +ta tb +NULL NULL +NULL NULL +NULL NULL +NULL NULL +Warnings: +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '4294967296:00:00' +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '178956970 16:00:00' +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59' +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '178956970 15:59:59' +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '4294967294:59:59' +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '178956970 14:59:59' +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '87649416:00:00' +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '3652059 00:00:00' +DROP TABLE t1; +CREATE TABLE t1 (a VARCHAR(64), b VARCHAR(64)); +INSERT INTO t1 VALUES ('-4294967296:00:00', '-178956970 16:00:00'); +INSERT INTO t1 VALUES ('-4294967295:59:59', '-178956970 15:59:59'); +INSERT INTO t1 VALUES ('-4294967294:59:59', '-178956970 14:59:59'); +INSERT INTO t1 VALUES ('-87649416:00:00', '-3652059 00:00:00'); +SELECT TIMESTAMP('9999-12-31 23:59:59', a) AS ta, TIMESTAMP('9999-12-31 23:59:59.999999', b) AS tb FROM t1; +ta tb +NULL NULL +NULL NULL +NULL NULL +NULL NULL +Warnings: +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '-4294967296:00:00' +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '-178956970 16:00:00' +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '-4294967295:59:59' +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '-178956970 15:59:59' +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '-4294967294:59:59' +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '-178956970 14:59:59' +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '-87649416:00:00' +Warning 1292 Incorrect INTERVAL DAY TO SECOND value: '-3652059 00:00:00' +DROP TABLE t1; +# HOUR is OK +# Expect max or near-max DATETIME value + no INTERVAL warnings +CREATE TABLE t1 (a VARCHAR(64), b VARCHAR(64)); +INSERT INTO t1 VALUES ('87649415:59:59.999999', '3652058 23:59:59.999999'); +INSERT INTO t1 VALUES ('87649415:59:59', '3652058 23:59:59'); +SELECT TIMESTAMP('0001-01-01 00:00:00', a) AS ta, TIMESTAMP('0001-01-01 00:00:00', b) AS tb FROM t1; +ta tb +9999-12-31 23:59:59.999999 9999-12-31 23:59:59.999999 +9999-12-31 23:59:59.000000 9999-12-31 23:59:59.000000 +DROP TABLE t1; +# HOUR is OK +# Expect near '0001-01-01 00:00:00' DATETIME value + no INTERVAL warnings +CREATE TABLE t1 (a VARCHAR(64), b VARCHAR(64)); +INSERT INTO t1 VALUES ('-87649415:59:59.999999', '-3652058 23:59:59.999999'); +INSERT INTO t1 VALUES ('-87649415:59:59', '-3652058 23:59:59'); +SELECT TIMESTAMP('9999-12-31 23:59:59', a) AS ta, TIMESTAMP('9999-12-31 23:59:59.999999', b) AS tb FROM t1; +ta tb +NULL 0001-01-01 00:00:00.000000 +0001-01-01 00:00:00.000000 0001-01-01 00:00:00.999999 +DROP TABLE t1; +# HOUR is OK +# Expect NULL on datetime arithmetic overflow + no INTERVAL warnings +CREATE TABLE t1 (a VARCHAR(64), b VARCHAR(64)); +INSERT INTO t1 VALUES ('-00:00:00.000001', '-0 00:00:00.000001'); +SELECT TIMESTAMP('0001-01-01 00:00:00', a) AS ta, TIMESTAMP('0001-01-01 00:00:00', b) AS tb FROM t1; +ta tb +NULL NULL +DROP TABLE t1; +# Corner cases for ADDTIME(timestamp,xxx) +# HOUR is outside of UINT_MAX32 range +# Expect NULL + "Incorrect INTERVAL DAY TO SECOND value" +SELECT +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959) AS ci, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0 AS c0, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.0 AS c1, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.00 AS c2, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.000 AS c3, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.0000 AS c4, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.00000 AS c5, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.000000 AS c6, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.0000000 AS c7; +ci NULL +c0 NULL +c1 NULL +c2 NULL +c3 NULL +c4 NULL +c5 NULL +c6 NULL +c7 NULL +Warnings: +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959' +SELECT +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59') AS ci, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0 AS c0, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.0 AS c1, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.00 AS c2, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.000 AS c3, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.0000 AS c4, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.00000 AS c5, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.000000 AS c6, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.0000000 AS c7; +ci NULL +c0 NULL +c1 NULL +c2 NULL +c3 NULL +c4 NULL +c5 NULL +c6 NULL +c7 NULL +Warnings: +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59' +# HOUR UINT_MAX32 +# Expect NULL + "Incorrect INTERVAL DAY TO SECOND value" +SELECT +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959) AS ci, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0 AS c0, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.0 AS c1, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.00 AS c2, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.000 AS c3, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.0000 AS c4, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.00000 AS c5, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.000000 AS c6, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.0000000 AS c7; +ci NULL +c0 NULL +c1 NULL +c2 NULL +c3 NULL +c4 NULL +c5 NULL +c6 NULL +c7 NULL +Warnings: +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959' +SELECT +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59') AS ci, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0 AS c0, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.0 AS c1, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.00 AS c2, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.000 AS c3, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.0000 AS c4, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.00000 AS c5, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.000000 AS c6, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.0000000 AS c7; +ci NULL +c0 NULL +c1 NULL +c2 NULL +c3 NULL +c4 NULL +c5 NULL +c6 NULL +c7 NULL +Warnings: +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59' +# HOUR is max_useful_hour()+1 +# Expect NULL + "Incorrect INTERVAL DAY TO SECOND value" +SELECT +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959) AS ci, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0 AS c0, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.0 AS c1, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.00 AS c2, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.000 AS c3, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.0000 AS c4, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.00000 AS c5, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.000000 AS c6, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.0000000 AS c7; +ci NULL +c0 NULL +c1 NULL +c2 NULL +c3 NULL +c4 NULL +c5 NULL +c6 NULL +c7 NULL +Warnings: +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +SELECT +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59') AS ci, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0 AS c0, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.0 AS c1, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.00 AS c2, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.000 AS c3, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.0000 AS c4, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.00000 AS c5, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.000000 AS c6, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.0000000 AS c7; +ci NULL +c0 NULL +c1 NULL +c2 NULL +c3 NULL +c4 NULL +c5 NULL +c6 NULL +c7 NULL +Warnings: +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +# HOUR is max_useful_hour() +# Expect NULL (calc_time_diff overflows ) + no INTERVAL warnings +SELECT +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959) AS ci, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0 AS c0, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.0 AS c1, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.00 AS c2, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.000 AS c3, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.0000 AS c4, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.00000 AS c5, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.000000 AS c6, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.0000000 AS c7; +ci NULL +c0 NULL +c1 NULL +c2 NULL +c3 NULL +c4 NULL +c5 NULL +c6 NULL +c7 NULL +SELECT +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59') AS ci, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0 AS c0, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.0 AS c1, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.00 AS c2, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.000 AS c3, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.0000 AS c4, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.00000 AS c5, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.000000 AS c6, +ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.0000000 AS c7; +ci NULL +c0 NULL +c1 NULL +c2 NULL +c3 NULL +c4 NULL +c5 NULL +c6 NULL +c7 NULL +# HOUR is max_useful_hour() +# Expect non-NULL + no warnings +SELECT +ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959) AS ci, +ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0 AS c0, +ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.0 AS c1, +ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.00 AS c2, +ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.000 AS c3, +ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.0000 AS c4, +ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.00000 AS c5, +ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.000000 AS c6, +ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.0000000 AS c7; +ci 9999-12-31 23:59:59 +c0 99991231235959 +c1 99991231235959.0 +c2 99991231235959.00 +c3 99991231235959.000 +c4 99991231235959.0000 +c5 99991231235959.00000 +c6 99991231235959.000000 +c7 99991231235959.0000000 +SELECT +ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59') AS ci, +ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0 AS c0, +ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.0 AS c1, +ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.00 AS c2, +ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.000 AS c3, +ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.0000 AS c4, +ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.00000 AS c5, +ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.000000 AS c6, +ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.0000000 AS c7; +ci 9999-12-31 23:59:59 +c0 99991231235959 +c1 99991231235959.0 +c2 99991231235959.00 +c3 99991231235959.000 +c4 99991231235959.0000 +c5 99991231235959.00000 +c6 99991231235959.000000 +c7 99991231235959.0000000 +# Corner cases for ADDTIME(time,xxx) +# HOUR outside of UINT32 range +# Expect NULL + "Incorrect INTERVAL DAY TO SECOND value" +SELECT +ADDTIME(TIME'00:00:00', 42949672965959) AS ci, +ADDTIME(TIME'00:00:00', 42949672965959)+0 AS c0, +ADDTIME(TIME'00:00:00', 42949672965959)+0.0 AS c1, +ADDTIME(TIME'00:00:00', 42949672965959)+0.00 AS c2, +ADDTIME(TIME'00:00:00', 42949672965959)+0.000 AS c3, +ADDTIME(TIME'00:00:00', 42949672965959)+0.0000 AS c4, +ADDTIME(TIME'00:00:00', 42949672965959)+0.00000 AS c5, +ADDTIME(TIME'00:00:00', 42949672965959)+0.000000 AS c6, +ADDTIME(TIME'00:00:00', 42949672965959)+0.0000000 AS c7; +ci NULL +c0 NULL +c1 NULL +c2 NULL +c3 NULL +c4 NULL +c5 NULL +c6 NULL +c7 NULL +Warnings: +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672965959' +SELECT +ADDTIME(TIME'00:00:00', '4294967296:59:59') AS ci, +ADDTIME(TIME'00:00:00', '4294967296:59:59')+0 AS c0, +ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.0 AS c1, +ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.00 AS c2, +ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.000 AS c3, +ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.0000 AS c4, +ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.00000 AS c5, +ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.000000 AS c6, +ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.0000000 AS c7; +ci NULL +c0 NULL +c1 NULL +c2 NULL +c3 NULL +c4 NULL +c5 NULL +c6 NULL +c7 NULL +Warnings: +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967296:59:59' +# HOUR is UINT_MAX32 (outside of INTERVAL DAY TO SECOND range) +# Expect NULL + "Incorrect INTERVAL DAY TO SECOND value" +SELECT +ADDTIME(TIME'00:00:00', 42949672955959) AS ci, +ADDTIME(TIME'00:00:00', 42949672955959)+0 AS c0, +ADDTIME(TIME'00:00:00', 42949672955959)+0.0 AS c1, +ADDTIME(TIME'00:00:00', 42949672955959)+0.00 AS c2, +ADDTIME(TIME'00:00:00', 42949672955959)+0.000 AS c3, +ADDTIME(TIME'00:00:00', 42949672955959)+0.0000 AS c4, +ADDTIME(TIME'00:00:00', 42949672955959)+0.00000 AS c5, +ADDTIME(TIME'00:00:00', 42949672955959)+0.000000 AS c6, +ADDTIME(TIME'00:00:00', 42949672955959)+0.0000000 AS c7; +ci NULL +c0 NULL +c1 NULL +c2 NULL +c3 NULL +c4 NULL +c5 NULL +c6 NULL +c7 NULL +Warnings: +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '42949672955959' +SELECT +ADDTIME(TIME'00:00:00', '4294967295:59:59') AS ci, +ADDTIME(TIME'00:00:00', '4294967295:59:59')+0 AS c0, +ADDTIME(TIME'00:00:00', '4294967295:59:59')+0.0 AS c1, +ADDTIME(TIME'00:00:00', '4294967295:59:59')+0.00 AS c2, +ADDTIME(TIME'00:00:00', '4294967295:59:59')+0.000 AS c3, +ADDTIME(TIME'00:00:00', '4294967295:59:59')+0.0000 AS c4, +ADDTIME(TIME'00:00:00', '4294967295:59:59')+0.00000 AS c5, +ADDTIME(TIME'00:00:00', '4294967295:59:59')+0.000000 AS c6, +ADDTIME(TIME'00:00:00', '4294967295;00:00')+0.0000000 AS c7; +ci NULL +c0 NULL +c1 NULL +c2 NULL +c3 NULL +c4 NULL +c5 NULL +c6 NULL +c7 NULL +Warnings: +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967295:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '4294967295;00:00' +# HOUR is max_useful_hour()+1 (outside of INTERVAL DAY TO SECOND range) +# Expect NULL + "Incorrect INTERVAL DAY TO SECOND value" +SELECT +ADDTIME(TIME'00:00:00', 876494165959) AS ci, +ADDTIME(TIME'00:00:00', 876494165959)+0 AS c0, +ADDTIME(TIME'00:00:00', 876494165959)+0.0 AS c1, +ADDTIME(TIME'00:00:00', 876494165959)+0.00 AS c2, +ADDTIME(TIME'00:00:00', 876494165959)+0.000 AS c3, +ADDTIME(TIME'00:00:00', 876494165959)+0.0000 AS c4, +ADDTIME(TIME'00:00:00', 876494165959)+0.00000 AS c5, +ADDTIME(TIME'00:00:00', 876494165959)+0.000000 AS c6, +ADDTIME(TIME'00:00:00', 876494165959)+0.0000000 AS c7; +ci NULL +c0 NULL +c1 NULL +c2 NULL +c3 NULL +c4 NULL +c5 NULL +c6 NULL +c7 NULL +Warnings: +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +SELECT +ADDTIME(TIME'00:00:00', '87649416:59:59') AS ci, +ADDTIME(TIME'00:00:00', '87649416:59:59')+0 AS c0, +ADDTIME(TIME'00:00:00', '87649416:59:59')+0.0 AS c1, +ADDTIME(TIME'00:00:00', '87649416:59:59')+0.00 AS c2, +ADDTIME(TIME'00:00:00', '87649416:59:59')+0.000 AS c3, +ADDTIME(TIME'00:00:00', '87649416:59:59')+0.0000 AS c4, +ADDTIME(TIME'00:00:00', '87649416:59:59')+0.00000 AS c5, +ADDTIME(TIME'00:00:00', '87649416:59:59')+0.000000 AS c6, +ADDTIME(TIME'00:00:00', '87649416:59:59')+0.0000000 AS c7; +ci NULL +c0 NULL +c1 NULL +c2 NULL +c3 NULL +c4 NULL +c5 NULL +c6 NULL +c7 NULL +Warnings: +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +# HOUR is max_useful_hour()+1 (outside of INTERVAL DAY TO SECOND range) +# Expect NULL + "Incorrect INTERVAL DAY TO SECOND value" +SELECT +ADDTIME(TIME'-838:59:59', 876494165959) AS ci, +ADDTIME(TIME'-838:59:59.9', 876494165959) AS c1, +ADDTIME(TIME'-838:59:59.99', 876494165959) AS c2, +ADDTIME(TIME'-838:59:59.999', 876494165959) AS c3, +ADDTIME(TIME'-838:59:59.9999', 876494165959) AS c4, +ADDTIME(TIME'-838:59:59.99999', 876494165959) AS c5, +ADDTIME(TIME'-838:59:59.999999', 876494165959) AS c6; +ci NULL +c1 NULL +c2 NULL +c3 NULL +c4 NULL +c5 NULL +c6 NULL +Warnings: +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '876494165959' +SELECT +ADDTIME(TIME'-838:59:59', '87649416:59:59') AS ci, +ADDTIME(TIME'-838:59:59.9', '87649416:59:59') AS c1, +ADDTIME(TIME'-838:59:59.99', '87649416:59:59') AS c2, +ADDTIME(TIME'-838:59:59.999', '87649416:59:59') AS c3, +ADDTIME(TIME'-838:59:59.9999', '87649416:59:59') AS c4, +ADDTIME(TIME'-838:59:59.99999', '87649416:59:59') AS c5, +ADDTIME(TIME'-838:59:59.999999', '87649416:59:59') AS c6; +ci NULL +c1 NULL +c2 NULL +c3 NULL +c4 NULL +c5 NULL +c6 NULL +Warnings: +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +Level Warning +Code 1292 +Message Incorrect INTERVAL DAY TO SECOND value: '87649416:59:59' +SELECT +ADDTIME(TIME'-838:59:59.9999999', '87649416:59:59') AS c7; +c7 NULL +# HOUR is max_useful_hour() (inside INTERVAL DAY TO SECOND range) +# Expect max TIME(0) + zero fraction + TIME warnings + no INTEVAL warnings +SELECT +ADDTIME(TIME'00:00:00', 876494155959) AS ci, +ADDTIME(TIME'00:00:00', 876494155959)+0 AS c0, +ADDTIME(TIME'00:00:00', 876494155959)+0.0 AS c1, +ADDTIME(TIME'00:00:00', 876494155959)+0.00 AS c2, +ADDTIME(TIME'00:00:00', 876494155959)+0.000 AS c3, +ADDTIME(TIME'00:00:00', 876494155959)+0.0000 AS c4, +ADDTIME(TIME'00:00:00', 876494155959)+0.00000 AS c5, +ADDTIME(TIME'00:00:00', 876494155959)+0.000000 AS c6, +ADDTIME(TIME'00:00:00', 876494155959)+0.0000000 AS c7; +ci 838:59:59 +c0 8385959 +c1 8385959.0 +c2 8385959.00 +c3 8385959.000 +c4 8385959.0000 +c5 8385959.00000 +c6 8385959.000000 +c7 8385959.0000000 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '87649415:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87649415:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87649415:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87649415:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87649415:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87649415:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87649415:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87649415:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87649415:59:59' +SELECT +ADDTIME(TIME'00:00:00', '87649415:59:59') AS ci, +ADDTIME(TIME'00:00:00', '87649415:59:59')+0 AS c0, +ADDTIME(TIME'00:00:00', '87649415:59:59')+0.0 AS c1, +ADDTIME(TIME'00:00:00', '87649415:59:59')+0.00 AS c2, +ADDTIME(TIME'00:00:00', '87649415:59:59')+0.000 AS c3, +ADDTIME(TIME'00:00:00', '87649415:59:59')+0.0000 AS c4, +ADDTIME(TIME'00:00:00', '87649415:59:59')+0.00000 AS c5, +ADDTIME(TIME'00:00:00', '87649415:59:59')+0.000000 AS c6, +ADDTIME(TIME'00:00:00', '87649415:59:59')+0.0000000 AS c7; +ci 838:59:59 +c0 8385959 +c1 8385959.0 +c2 8385959.00 +c3 8385959.000 +c4 8385959.0000 +c5 8385959.00000 +c6 8385959.000000 +c7 8385959.0000000 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '87649415:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87649415:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87649415:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87649415:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87649415:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87649415:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87649415:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87649415:59:59' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87649415:59:59' +# HOUR is max_useful_hour() (inside INTERVAL DAY TO SECOND range) +# Expect max TIME(N) + TIME warnings + no INTERVAL warnings +SELECT +ADDTIME(TIME'-838:59:59', 876494155959) AS ci, +ADDTIME(TIME'-838:59:59.9', 876494155959) AS c1, +ADDTIME(TIME'-838:59:59.99', 876494155959) AS c2, +ADDTIME(TIME'-838:59:59.999', 876494155959) AS c3, +ADDTIME(TIME'-838:59:59.9999', 876494155959) AS c4, +ADDTIME(TIME'-838:59:59.99999', 876494155959) AS c5, +ADDTIME(TIME'-838:59:59.999999', 876494155959) AS c6; +ci 838:59:59 +c1 838:59:59.9 +c2 838:59:59.99 +c3 838:59:59.999 +c4 838:59:59.9999 +c5 838:59:59.99999 +c6 838:59:59.999999 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '87648577:00:00' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87648576:59:59.100000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87648576:59:59.010000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87648576:59:59.001000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87648576:59:59.000100' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87648576:59:59.000010' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87648576:59:59.000001' +SELECT +ADDTIME(TIME'-838:59:59', '87649415:59:59') AS ci, +ADDTIME(TIME'-838:59:59.9', '87649415:59:59') AS c1, +ADDTIME(TIME'-838:59:59.99', '87649415:59:59') AS c2, +ADDTIME(TIME'-838:59:59.999', '87649415:59:59') AS c3, +ADDTIME(TIME'-838:59:59.9999', '87649415:59:59') AS c4, +ADDTIME(TIME'-838:59:59.99999', '87649415:59:59') AS c5, +ADDTIME(TIME'-838:59:59.999999', '87649415:59:59') AS c6; +ci 838:59:59 +c1 838:59:59.9 +c2 838:59:59.99 +c3 838:59:59.999 +c4 838:59:59.9999 +c5 838:59:59.99999 +c6 838:59:59.999999 +Warnings: +Level Warning +Code 1292 +Message Truncated incorrect time value: '87648577:00:00' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87648576:59:59.100000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87648576:59:59.010000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87648576:59:59.001000' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87648576:59:59.000100' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87648576:59:59.000010' +Level Warning +Code 1292 +Message Truncated incorrect time value: '87648576:59:59.000001' +SELECT +ADDTIME(TIME'-838:59:59.9999999', '87649415:59:59') AS c7; +c7 838:59:59.999999 +# +# MDEV-17400 The result of TIME('42949672965959-01') depends on architecture +# +SELECT TIME('42949672955959-01'), TIME('42949672965959-01'); +TIME('42949672955959-01') TIME('42949672965959-01') +NULL NULL +Warnings: +Warning 1292 Incorrect time value: '42949672955959-01' +Warning 1292 Incorrect time value: '42949672965959-01' +SELECT TIME('18446744073709551615-01'), TIME('18446744073709551616-01'); +TIME('18446744073709551615-01') TIME('18446744073709551616-01') +NULL NULL +Warnings: +Warning 1292 Incorrect time value: '18446744073709551615-01' +Warning 1292 Incorrect time value: '18446744073709551616-01' +# +# MDEV-17434 EXTRACT(DAY FROM negative_time) returns wrong result +# +CREATE TABLE t1 (a TIME(6)); +INSERT INTO t1 VALUES ('-24:10:10.10'); +SELECT +EXTRACT(MINUTE FROM a), +EXTRACT(SECOND FROM a), +EXTRACT(MICROSECOND FROM a), +EXTRACT(DAY FROM a), +EXTRACT(DAY_HOUR FROM a), +EXTRACT(DAY_MINUTE FROM a), +EXTRACT(DAY_SECOND FROM a), +EXTRACT(DAY_MICROSECOND FROM a) +FROM t1; +EXTRACT(MINUTE FROM a) EXTRACT(SECOND FROM a) EXTRACT(MICROSECOND FROM a) EXTRACT(DAY FROM a) EXTRACT(DAY_HOUR FROM a) EXTRACT(DAY_MINUTE FROM a) EXTRACT(DAY_SECOND FROM a) EXTRACT(DAY_MICROSECOND FROM a) +-10 -10 -100000 -1 -100 -10010 -1001010 -1001010100000 +CREATE TABLE t2 AS +SELECT +EXTRACT(MINUTE FROM a), +EXTRACT(SECOND FROM a), +EXTRACT(MICROSECOND FROM a), +EXTRACT(DAY FROM a), +EXTRACT(DAY_HOUR FROM a), +EXTRACT(DAY_MINUTE FROM a), +EXTRACT(DAY_SECOND FROM a), +EXTRACT(DAY_MICROSECOND FROM a) +FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `EXTRACT(MINUTE FROM a)` int(3) DEFAULT NULL, + `EXTRACT(SECOND FROM a)` int(3) DEFAULT NULL, + `EXTRACT(MICROSECOND FROM a)` int(7) DEFAULT NULL, + `EXTRACT(DAY FROM a)` int(3) DEFAULT NULL, + `EXTRACT(DAY_HOUR FROM a)` int(5) DEFAULT NULL, + `EXTRACT(DAY_MINUTE FROM a)` int(7) DEFAULT NULL, + `EXTRACT(DAY_SECOND FROM a)` int(9) DEFAULT NULL, + `EXTRACT(DAY_MICROSECOND FROM a)` bigint(15) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2; +DROP TABLE t1; +# +# MDEV-17478 Wrong result for TIME('+100:20:30') +# +SELECT TIME('+100:20:30'); +TIME('+100:20:30') +100:20:30 +# +# MDEV-17477 Wrong result for TIME('-2001-01-01 10:20:30') +# +SELECT TIME('-2001-01-01 10:20:30'); +TIME('-2001-01-01 10:20:30') +NULL +Warnings: +Warning 1292 Incorrect time value: '-2001-01-01 10:20:30' +SELECT TIME('2001-01-01') AS c1, TIME('2001-01-01 ') AS c2; +c1 c2 +00:20:01 00:20:01 +Warnings: +Warning 1292 Truncated incorrect time value: '2001-01-01' +Warning 1292 Truncated incorrect time value: '2001-01-01 ' +SELECT TIME('0001:01:01 '), TIME('0001:01:01 '); +TIME('0001:01:01 ') TIME('0001:01:01 ') +01:01:01 01:01:01 +SELECT TIME('1 2'), TIME('1 2 '); +TIME('1 2') TIME('1 2 ') +00:00:01 00:00:01 +Warnings: +Warning 1292 Truncated incorrect time value: '1 2' +Warning 1292 Truncated incorrect time value: '1 2 ' +SELECT TIME('2001-01-01T'), TIME('2001-01-01T '); +TIME('2001-01-01T') TIME('2001-01-01T ') +00:00:00 00:00:00 +SELECT TIME('901-01-01T1'), TIME('901-01-01T10'); +TIME('901-01-01T1') TIME('901-01-01T10') +01:00:00 10:00:00 +SELECT TIME('091-01-01T1'), TIME('091-01-01T10'); +TIME('091-01-01T1') TIME('091-01-01T10') +01:00:00 10:00:00 +SELECT TIME('0001:01:01x'), TIME('0001:01:01xx'); +TIME('0001:01:01x') TIME('0001:01:01xx') +01:01:01 01:01:01 +Warnings: +Warning 1292 Truncated incorrect time value: '0001:01:01x' +Warning 1292 Truncated incorrect time value: '0001:01:01xx' +SELECT TIME('0001:01:01.'), TIME('0001:01:01..'); +TIME('0001:01:01.') TIME('0001:01:01..') +01:01:01 01:01:01 +Warnings: +Warning 1292 Truncated incorrect time value: '0001:01:01..' +SELECT TIME('0001:01:01-'), TIME('0001:01:01--'); +TIME('0001:01:01-') TIME('0001:01:01--') +01:01:01 01:01:01 +Warnings: +Warning 1292 Truncated incorrect time value: '0001:01:01-' +Warning 1292 Truncated incorrect time value: '0001:01:01--' +SELECT TIME('0001:01:01-'), TIME('0001:01:01--'); +TIME('0001:01:01-') TIME('0001:01:01--') +01:01:01 01:01:01 +Warnings: +Warning 1292 Truncated incorrect time value: '0001:01:01-' +Warning 1292 Truncated incorrect time value: '0001:01:01--' +SELECT TIME('-xxx'), TIME('-xxxxxxxxxxxxxxxxxxxx'); +TIME('-xxx') TIME('-xxxxxxxxxxxxxxxxxxxx') +NULL NULL +Warnings: +Warning 1292 Incorrect time value: '-xxx' +Warning 1292 Incorrect time value: '-xxxxxxxxxxxxxxxxxxxx' +SELECT TIME('- '), TIME('- '); +TIME('- ') TIME('- ') +NULL NULL +Warnings: +Warning 1292 Incorrect time value: '- ' +Warning 1292 Incorrect time value: '- ' +SELECT TIME('-'), TIME('-'); +TIME('-') TIME('-') +NULL NULL +Warnings: +Warning 1292 Incorrect time value: '-' +Warning 1292 Incorrect time value: '-' +SELECT TIME('1-1-1 1:1:1'), TIME('1-1-1 1:1:1.0'); +TIME('1-1-1 1:1:1') TIME('1-1-1 1:1:1.0') +01:01:01 01:01:01.0 +SELECT TIME('1-1-1 1:2:3'), TIME('1-1-1 1:2:3.0'); +TIME('1-1-1 1:2:3') TIME('1-1-1 1:2:3.0') +01:02:03 01:02:03.0 +SELECT +CAST('20050326112233 garbage' as datetime), +CAST('20050326 garbage' as date), +CAST('50326 garbage' as time); +CAST('20050326112233 garbage' as datetime) CAST('20050326 garbage' as date) CAST('50326 garbage' as time) +2005-03-26 11:22:33 2005-03-26 05:03:26 +Warnings: +Warning 1292 Truncated incorrect datetime value: '20050326112233 garbage' +Warning 1292 Truncated incorrect date value: '20050326 garbage' +Warning 1292 Truncated incorrect time value: '50326 garbage' +SELECT TIME('- 01:00:00'), TIME('- 1 01:00:00'); +TIME('- 01:00:00') TIME('- 1 01:00:00') +-01:00:00 -25:00:00 diff --git a/mysql-test/main/func_time.test b/mysql-test/main/func_time.test index f6f39d967f2..4c9315629f1 100644 --- a/mysql-test/main/func_time.test +++ b/mysql-test/main/func_time.test @@ -1705,6 +1705,59 @@ DO TO_DAYS(SEC_TO_TIME(TIME(CEILING(UUID())))); DO TO_DAYS(SEC_TO_TIME(MAKEDATE('',RAND(~(''))))); SELECT SEC_TO_TIME(MAKEDATE(0,RAND(~0))); +# +# MDEV-16810 AddressSanitizer: stack-buffer-overflow in int10_to_str +# +SELECT PERIOD_DIFF(2018, AES_ENCRYPT('Rae Bareli', 'Rae Bareli')); + + +--echo # +--echo # MDEV-17249 MAKETIME(-1e50,0,0) returns a wrong result +--echo # + +--vertical_results +SELECT + MAKETIME(1e10,0,0), + MAKETIME(-1e10,0,0), + MAKETIME(1e50,0,0), + MAKETIME(-1e50,0,0), + MAKETIME(COALESCE(1e50),0,0), + MAKETIME(COALESCE(-1e50),0,0); +--horizontal_results + +CREATE TABLE t1 (a FLOAT); +INSERT INTO t1 VALUES (1e30),(-1e30); +SELECT MAKETIME(a,0,0) FROM t1; +DROP TABLE t1; + +--echo # +--echo # MDEV-17244 MAKETIME(900,0,0.111) returns a wrong result +--echo # + +SELECT MAKETIME(900,0,0); +SELECT MAKETIME(900,0,0.1); +SELECT MAKETIME(900,0,0.11); +SELECT MAKETIME(900,0,0.111); +SELECT MAKETIME(900,0,0.1111); +SELECT MAKETIME(900,0,0.11111); +SELECT MAKETIME(900,0,0.111111); +SELECT MAKETIME(900,0,0.1111111); +SELECT MAKETIME(900,0,0.11111111); +SELECT MAKETIME(900,0,0.111111111); +SELECT MAKETIME(900,0,EXP(1)); + +SELECT MAKETIME(-900,0,0); +SELECT MAKETIME(-900,0,0.1); +SELECT MAKETIME(-900,0,0.11); +SELECT MAKETIME(-900,0,0.111); +SELECT MAKETIME(-900,0,0.1111); +SELECT MAKETIME(-900,0,0.11111); +SELECT MAKETIME(-900,0,0.111111); +SELECT MAKETIME(-900,0,0.1111111); +SELECT MAKETIME(-900,0,0.11111111); +SELECT MAKETIME(-900,0,0.111111111); +SELECT MAKETIME(-900,0,EXP(1)); + --echo # --echo # End of 5.5 tests @@ -2141,6 +2194,32 @@ DROP TABLE t_ts, t_trig; --echo # +--echo # MDEV-16878 Functions ADDTIME and SUBTIME get wrongly removed from WHERE by the equal expression optimizer +--echo # + +CREATE TABLE t1 (a TIME); +INSERT INTO t1 VALUES ('00:00:10'),('00:00:20'); +SELECT a, SUBTIME(a,TIME'00:00:01'), ADDTIME(a,TIME'00:00:01') FROM t1; +SELECT * FROM t1 WHERE SUBTIME(a,TIME'00:00:01')=TIME'00:00:09'; +SELECT * FROM t1 WHERE ADDTIME(a,TIME'00:00:01')<=TIME'00:00:09'; +SELECT * FROM t1 WHERE SUBTIME(a,TIME'00:00:01')=TIME'00:00:09' AND ADDTIME(a,TIME'00:00:01')<=TIME'00:00:09'; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE SUBTIME(a,TIME'00:00:01')=TIME'00:00:09' AND ADDTIME(a,TIME'00:00:01')<=TIME'00:00:09'; +DROP TABLE t1; + + +--echo # +--echo # MDEV-15363 Wrong result for CAST(LAST_DAY(TIME'00:00:00') AS TIME) +--echo # + +set timestamp=unix_timestamp('2018-08-02 10:10:10'); +SELECT + LAST_DAY(TIME'00:00:00') AS c1, + CAST(CAST(LAST_DAY(TIME'00:00:00') AS DATE) AS TIME) AS c2, + CAST(LAST_DAY(TIME'00:00:00') AS TIME) AS c3; + +--echo # End of 10.3 tests + +--echo # --echo # MDEV-14032 SEC_TO_TIME executes side effect two times --echo # @@ -2161,3 +2240,857 @@ SELECT SEC_TO_TIME(f1()); SELECT * FROM t1; DROP TABLE t1; DROP FUNCTION f1; + +--echo # +--echo # MDEV-17351 MICROSECOND(XXX(int_number_out_of_range)) erroneously returns 999999 +--echo # + +--echo # Reject anything that's parsed as DATETIME or DATE + +CREATE TABLE t1 (a VARCHAR(64)); +INSERT INTO t1 VALUES +('2001-01-01 10:20:30'), +('01-01-01 10:20:30'), +('2001-01-01 '), +('20010101102030'), +('010101102030'); +SELECT ADDTIME(DATE'2001-01-01',a), a FROM t1; +DROP TABLE t1; + + +--vertical_results + +--echo # GREATEST(decimal, time) + +SELECT + GREATEST(8395959, TIME'00:00:00') AS c0, + GREATEST(8395959.0, TIME'00:00:00') AS c1, + GREATEST(8395959.00, TIME'00:00:00') AS c2, + GREATEST(8395959.000, TIME'00:00:00') AS c3, + GREATEST(8395959.0000, TIME'00:00:00') AS c4, + GREATEST(8395959.00000, TIME'00:00:00') AS c5, + GREATEST(8395959.000000, TIME'00:00:00') AS c6, + GREATEST(8395959.0000000, TIME'00:00:00') AS c7; + +SELECT + MICROSECOND(GREATEST(8395959, TIME'00:00:00')) AS c0, + MICROSECOND(GREATEST(8395959.0, TIME'00:00:00')) AS c1, + MICROSECOND(GREATEST(8395959.00, TIME'00:00:00')) AS c2, + MICROSECOND(GREATEST(8395959.000, TIME'00:00:00')) AS c3, + MICROSECOND(GREATEST(8395959.0000, TIME'00:00:00')) AS c4, + MICROSECOND(GREATEST(8395959.00000, TIME'00:00:00')) AS c5, + MICROSECOND(GREATEST(8395959.000000, TIME'00:00:00')) AS c6, + MICROSECOND(GREATEST(8395959.0000000, TIME'00:00:00')) AS c7; + +SELECT + CAST(GREATEST(8395959, TIME'00:00:00') AS SIGNED) AS ci, + CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,0)) AS c0, + CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,1)) AS c1, + CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,2)) AS c2, + CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,3)) AS c3, + CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,4)) AS c4, + CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,5)) AS c5, + CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,6)) AS c6, + CAST(GREATEST(8395959, TIME'00:00:00') AS DECIMAL(30,7)) AS c7; + +SELECT + GREATEST(8395959, TIME'00:00:00') AS ci, + GREATEST(8395959, TIME'00:00:00')+0 AS c0, + GREATEST(8395959, TIME'00:00:00')+0.0 AS c1, + GREATEST(8395959, TIME'00:00:00')+0.00 AS c2, + GREATEST(8395959, TIME'00:00:00')+0.000 AS c3, + GREATEST(8395959, TIME'00:00:00')+0.0000 AS c4, + GREATEST(8395959, TIME'00:00:00')+0.00000 AS c5, + GREATEST(8395959, TIME'00:00:00')+0.000000 AS c6, + GREATEST(8395959, TIME'00:00:00')+0.0000000 AS c7; + + + +--echo # GREATEST(string, time) + +SELECT + GREATEST('839:59:59', TIME'00:00:00') AS ci, + GREATEST('839:59:59.0', TIME'00:00:00') AS c1, + GREATEST('839:59:59.00', TIME'00:00:00') AS c2, + GREATEST('839:59:59.000', TIME'00:00:00') AS c3, + GREATEST('839:59:59.0000', TIME'00:00:00') AS c4, + GREATEST('839:59:59.00000', TIME'00:00:00') AS c5, + GREATEST('839:59:59.000000', TIME'00:00:00') AS c6, + GREATEST('839:59:59.0000000', TIME'00:00:00') AS c7; + +SELECT + MICROSECOND(GREATEST('839:59:59', TIME'00:00:00')) AS ci, + MICROSECOND(GREATEST('839:59:59.0', TIME'00:00:00')) AS c1, + MICROSECOND(GREATEST('839:59:59.00', TIME'00:00:00')) AS c2, + MICROSECOND(GREATEST('839:59:59.000', TIME'00:00:00')) AS c3, + MICROSECOND(GREATEST('839:59:59.0000', TIME'00:00:00')) AS c4, + MICROSECOND(GREATEST('839:59:59.00000', TIME'00:00:00')) AS c5, + MICROSECOND(GREATEST('839:59:59.000000', TIME'00:00:00')) AS c6, + MICROSECOND(GREATEST('839:59:59.0000000', TIME'00:00:00')) AS c7; + +SELECT + CAST(GREATEST('839:59:59', TIME'00:00:00') AS SIGNED) AS ci, + CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,0)) AS c0, + CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,1)) AS c1, + CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,2)) AS c2, + CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,3)) AS c3, + CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,4)) AS c4, + CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,5)) AS c5, + CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,6)) AS c6, + CAST(GREATEST('839:59:59', TIME'00:00:00') AS DECIMAL(30,7)) AS c7; + +SELECT + GREATEST('839:59:59', TIME'00:00:00') AS ci, + GREATEST('839:59:59', TIME'00:00:00')+0 AS c0, + GREATEST('839:59:59', TIME'00:00:00')+0.0 AS c1, + GREATEST('839:59:59', TIME'00:00:00')+0.00 AS c2, + GREATEST('839:59:59', TIME'00:00:00')+0.000 AS c3, + GREATEST('839:59:59', TIME'00:00:00')+0.0000 AS c4, + GREATEST('839:59:59', TIME'00:00:00')+0.00000 AS c5, + GREATEST('839:59:59', TIME'00:00:00')+0.000000 AS c6, + GREATEST('839:59:59', TIME'00:00:00')+0.0000000 AS c7; + + +--echo # ADDTIME(datetime, decimal) + +SELECT + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS c0, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.0) AS c1, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.00) AS c2, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.000) AS c3, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.0000) AS c4, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.00000) AS c5, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.000000) AS c6, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.0000000) AS c7; + +SELECT + MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)) AS c0, + MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.0)) AS c1, + MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.00)) AS c2, + MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.000)) AS c3, + MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.0000)) AS c4, + MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.00000)) AS c5, + MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.000000)) AS c6, + MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959.0000000)) AS c7; + +SELECT + CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS SIGNED) AS ci, + CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,0)) AS c0, + CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,1)) AS c1, + CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,2)) AS c2, + CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,3)) AS c3, + CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,4)) AS c4, + CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,5)) AS c5, + CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,6)) AS c6, + CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS DECIMAL(30,7)) AS c7; + +SELECT + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959) AS ci, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0 AS c0, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.0 AS c1, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.00 AS c2, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.000 AS c3, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.0000 AS c4, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.00000 AS c5, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.000000 AS c6, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 8395959)+0.0000000 AS c7; + +--echo # ADDTIME(datetime, string) + +SELECT + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS c0, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.0') AS c1, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.00') AS c2, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.000') AS c3, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.0000') AS c4, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.00000') AS c5, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.000000') AS c6, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.0000000') AS c7; + +SELECT + MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')) AS c0, + MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.0')) AS c1, + MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.00')) AS c2, + MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.000')) AS c3, + MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.0000')) AS c4, + MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.00000')) AS c5, + MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.000000')) AS c6, + MICROSECOND(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59.0000000')) AS c7; + +SELECT + CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS SIGNED) AS ci, + CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,0)) AS c0, + CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,1)) AS c1, + CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,2)) AS c2, + CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,3)) AS c3, + CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,4)) AS c4, + CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,5)) AS c5, + CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,6)) AS c6, + CAST(ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS DECIMAL(30,7)) AS c7; + +SELECT + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59') AS ci, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0 AS c0, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.0 AS c1, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.00 AS c2, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.000 AS c3, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.0000 AS c4, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.00000 AS c5, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.000000 AS c6, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '839:59:59')+0.0000000 AS c7; + +--echo # ADDTIME(time, decimal) + +SELECT + ADDTIME(TIME'00:00:00', 8395959) AS c0, + ADDTIME(TIME'00:00:00', 8395959.0) AS c1, + ADDTIME(TIME'00:00:00', 8395959.00) AS c2, + ADDTIME(TIME'00:00:00', 8395959.000) AS c3, + ADDTIME(TIME'00:00:00', 8395959.0000) AS c4, + ADDTIME(TIME'00:00:00', 8395959.00000) AS c5, + ADDTIME(TIME'00:00:00', 8395959.000000) AS c6, + ADDTIME(TIME'00:00:00', 8395959.0000000) AS c7; + +SELECT + MICROSECOND(ADDTIME(TIME'00:00:00', 8395959)) AS c0, + MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.0)) AS c1, + MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.00)) AS c2, + MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.000)) AS c3, + MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.0000)) AS c4, + MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.00000)) AS c5, + MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.000000)) AS c6, + MICROSECOND(ADDTIME(TIME'00:00:00', 8395959.0000000)) AS c7; + +SELECT + CAST(ADDTIME(TIME'00:00:00', 8395959) AS SIGNED) AS ci, + CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,0)) AS c0, + CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,1)) AS c1, + CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,2)) AS c2, + CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,3)) AS c3, + CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,4)) AS c4, + CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,5)) AS c5, + CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,6)) AS c6, + CAST(ADDTIME(TIME'00:00:00', 8395959) AS DECIMAL(30,7)) AS c7; + +SELECT + ADDTIME(TIME'00:00:00', 8395959) AS ci, + ADDTIME(TIME'00:00:00', 8395959)+0 AS c0, + ADDTIME(TIME'00:00:00', 8395959)+0.0 AS c1, + ADDTIME(TIME'00:00:00', 8395959)+0.00 AS c2, + ADDTIME(TIME'00:00:00', 8395959)+0.000 AS c3, + ADDTIME(TIME'00:00:00', 8395959)+0.0000 AS c4, + ADDTIME(TIME'00:00:00', 8395959)+0.00000 AS c5, + ADDTIME(TIME'00:00:00', 8395959)+0.000000 AS c6, + ADDTIME(TIME'00:00:00', 8395959)+0.0000000 AS c7; + +--echo # ADDTIME(time,string) + +SELECT + ADDTIME(TIME'00:00:00', '839:59:59') AS c0, + ADDTIME(TIME'00:00:00', '839:59:59.0') AS c1, + ADDTIME(TIME'00:00:00', '839:59:59.00') AS c2, + ADDTIME(TIME'00:00:00', '839:59:59.000') AS c3, + ADDTIME(TIME'00:00:00', '839:59:59.0000') AS c4, + ADDTIME(TIME'00:00:00', '839:59:59.00000') AS c5, + ADDTIME(TIME'00:00:00', '839:59:59.000000') AS c6, + ADDTIME(TIME'00:00:00', '839:59:59.0000000') AS c7; + +SELECT + MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59')) AS c0, + MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.0')) AS c1, + MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.00')) AS c2, + MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.000')) AS c3, + MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.0000')) AS c4, + MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.00000')) AS c5, + MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.000000')) AS c6, + MICROSECOND(ADDTIME(TIME'00:00:00', '839:59:59.0000000')) AS c7; + +SELECT + CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS SIGNED) AS ci, + CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,0)) AS c0, + CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,1)) AS c1, + CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,2)) AS c2, + CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,3)) AS c3, + CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,4)) AS c4, + CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,5)) AS c5, + CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,6)) AS c6, + CAST(ADDTIME(TIME'00:00:00', '839:59:59') AS DECIMAL(30,7)) AS c7; + +SELECT + ADDTIME(TIME'00:00:00', '839:59:59') AS ci, + ADDTIME(TIME'00:00:00', '839:59:59')+0 AS c0, + ADDTIME(TIME'00:00:00', '839:59:59')+0.0 AS c1, + ADDTIME(TIME'00:00:00', '839:59:59')+0.00 AS c2, + ADDTIME(TIME'00:00:00', '839:59:59')+0.000 AS c3, + ADDTIME(TIME'00:00:00', '839:59:59')+0.0000 AS c4, + ADDTIME(TIME'00:00:00', '839:59:59')+0.00000 AS c5, + ADDTIME(TIME'00:00:00', '839:59:59')+0.000000 AS c6, + ADDTIME(TIME'00:00:00', '839:59:59')+0.0000000 AS c7; + +--echo # ADDTIME(int,int) +SELECT + ADDTIME(0, 8395959) AS c, + MICROSECOND(ADDTIME(0, 8395959)) AS cm, + CAST(ADDTIME(0, 8395959) AS SIGNED) AS cs_fixme_mdev_17384, + CAST(ADDTIME(0, 8395959) AS DECIMAL(30,0)) AS cd300; + +SELECT + ADDTIME(20010101000000, 8395959) AS c, + MICROSECOND(ADDTIME(20010101000000, 8395959)) AS cm, + CAST(ADDTIME(20010101000000, 8395959) AS SIGNED) AS cs_fixme_mdev_17384, + CAST(ADDTIME(20010101000000, 8395959) AS DECIMAL(30,0)) AS cd300; + +--echo # ADDTIME(decimal,int) +--echo # 8385960 in cd300 is correct: addtime returns '838:59:59.9' +--echo # which is further *rounded* to a decimals(30,0) +SELECT + ADDTIME(0.0, 8395959) AS c, + MICROSECOND(ADDTIME(0.0, 8395959)) AS cm, + CAST(ADDTIME(0.0, 8395959) AS SIGNED) AS cs_fixme_mdev_17384, + CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,0)) AS cd300; + +SELECT + ADDTIME(20010101000000.0, 8395959) AS c, + MICROSECOND(ADDTIME(20010101000000.0, 8395959)) AS cm, + CAST(ADDTIME(20010101000000.0, 8395959) AS SIGNED) AS cs_fixme_mdev_17384, + CAST(ADDTIME(20010101000000.0, 8395959) AS DECIMAL(30,0)) AS cd300; + + +--echo # ADDTIME(decimal,decimal) + +SELECT + ADDTIME(0.0, 8395959.0) AS c1, + ADDTIME(0.0, 8395959.00) AS c2, + ADDTIME(0.0, 8395959.000) AS c3, + ADDTIME(0.0, 8395959.0000) AS c4, + ADDTIME(0.0, 8395959.00000) AS c5, + ADDTIME(0.0, 8395959.000000) AS c6, + ADDTIME(0.0, 8395959.0000000) AS c7; + +SELECT + MICROSECOND(ADDTIME(0.0, 8395959.0)) AS c1, + MICROSECOND(ADDTIME(0.0, 8395959.00)) AS c2, + MICROSECOND(ADDTIME(0.0, 8395959.000)) AS c3, + MICROSECOND(ADDTIME(0.0, 8395959.0000)) AS c4, + MICROSECOND(ADDTIME(0.0, 8395959.00000)) AS c5, + MICROSECOND(ADDTIME(0.0, 8395959.000000)) AS c6, + MICROSECOND(ADDTIME(0.0, 8395959.0000000)) AS c7; + +--echo # 8385960 in c1 is correct: addtime returns '838:59:59.9' +--echo # which is further *rounded* to a decimals(30,0) +SELECT + CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,0)) AS c0, + CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,1)) AS c1, + CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,2)) AS c2, + CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,3)) AS c3, + CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,4)) AS c4, + CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,5)) AS c5, + CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,6)) AS c6, + CAST(ADDTIME(0.0, 8395959) AS DECIMAL(30,7)) AS c7; + +SELECT + ADDTIME(0.0, 8395959)+0 AS c0, + ADDTIME(0.0, 8395959)+0.0 AS c1, + ADDTIME(0.0, 8395959)+0.00 AS c2, + ADDTIME(0.0, 8395959)+0.000 AS c3, + ADDTIME(0.0, 8395959)+0.0000 AS c4, + ADDTIME(0.0, 8395959)+0.00000 AS c5, + ADDTIME(0.0, 8395959)+0.000000 AS c6, + ADDTIME(0.0, 8395959)+0.0000000 AS c7; + + +--echo # TIMESTAMP(string,decimal) + +SELECT + TIMESTAMP('2001-01-01', 8395959) AS ci, + TIMESTAMP('2001-01-01', 8395959.0) AS c1, + TIMESTAMP('2001-01-01', 8395959.00) AS c2, + TIMESTAMP('2001-01-01', 8395959.000) AS c3, + TIMESTAMP('2001-01-01', 8395959.0000) AS c4, + TIMESTAMP('2001-01-01', 8395959.00000) AS c5, + TIMESTAMP('2001-01-01', 8395959.000000) AS c6, + TIMESTAMP('2001-01-01', 8395959.0000000) AS c7; + +SELECT + MICROSECOND(TIMESTAMP('2001-01-01', 8395959)) AS ci, + MICROSECOND(TIMESTAMP('2001-01-01', 8395959.0)) AS c1, + MICROSECOND(TIMESTAMP('2001-01-01', 8395959.00)) AS c2, + MICROSECOND(TIMESTAMP('2001-01-01', 8395959.000)) AS c3, + MICROSECOND(TIMESTAMP('2001-01-01', 8395959.0000)) AS c4, + MICROSECOND(TIMESTAMP('2001-01-01', 8395959.00000)) AS c5, + MICROSECOND(TIMESTAMP('2001-01-01', 8395959.000000)) AS c6, + MICROSECOND(TIMESTAMP('2001-01-01', 8395959.0000000)) AS c7; + +SELECT + CAST(TIMESTAMP('2001-01-01', 8395959) AS SIGNED) AS ci, + CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,0)) AS c0, + CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,1)) AS c1, + CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,2)) AS c2, + CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,3)) AS c3, + CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,4)) AS c4, + CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,5)) AS c5, + CAST(TIMESTAMP('2001-01-01', 8395959) AS DECIMAL(30,6)) AS c6; + +SELECT + TIMESTAMP('2001-01-01', 8395959) AS ci, + TIMESTAMP('2001-01-01', 8395959)+0 AS c0, + TIMESTAMP('2001-01-01', 8395959)+0.0 AS c1, + TIMESTAMP('2001-01-01', 8395959)+0.00 AS c2, + TIMESTAMP('2001-01-01', 8395959)+0.000 AS c3, + TIMESTAMP('2001-01-01', 8395959)+0.0000 AS c4, + TIMESTAMP('2001-01-01', 8395959)+0.00000 AS c5, + TIMESTAMP('2001-01-01', 8395959)+0.000000 AS c6, + TIMESTAMP('2001-01-01', 8395959)+0.0000000 AS c7; + +--echo # TIMESTAMP(string,string) + +SELECT + TIMESTAMP('2001-01-01', '839:59:59') AS ci, + TIMESTAMP('2001-01-01', '839:59:59.0') AS c1, + TIMESTAMP('2001-01-01', '839:59:59.00') AS c2, + TIMESTAMP('2001-01-01', '839:59:59.000') AS c3, + TIMESTAMP('2001-01-01', '839:59:59.0000') AS c4, + TIMESTAMP('2001-01-01', '839:59:59.00000') AS c5, + TIMESTAMP('2001-01-01', '839:59:59.000000') AS c6, + TIMESTAMP('2001-01-01', '839:59:59.0000000') AS c7; + +SELECT + MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59')) AS ci, + MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.0')) AS c1, + MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.00')) AS c2, + MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.000')) AS c3, + MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.0000')) AS c4, + MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.00000')) AS c5, + MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.000000')) AS c6, + MICROSECOND(TIMESTAMP('2001-01-01', '839:59:59.0000000')) AS c7; + +SELECT + CAST(TIMESTAMP('2001-01-01', '839:59:59') AS SIGNED) AS ci, + CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,0)) AS c0, + CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,1)) AS c1, + CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,2)) AS c2, + CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,3)) AS c3, + CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,4)) AS c4, + CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,5)) AS c5, + CAST(TIMESTAMP('2001-01-01', '839:59:59') AS DECIMAL(30,6)) AS c6; + +SELECT + TIMESTAMP('2001-01-01', '839:59:59') AS ci, + TIMESTAMP('2001-01-01', '839:59:59')+0 AS c0, + TIMESTAMP('2001-01-01', '839:59:59')+0.0 AS c1, + TIMESTAMP('2001-01-01', '839:59:59')+0.00 AS c2, + TIMESTAMP('2001-01-01', '839:59:59')+0.000 AS c3, + TIMESTAMP('2001-01-01', '839:59:59')+0.0000 AS c4, + TIMESTAMP('2001-01-01', '839:59:59')+0.00000 AS c5, + TIMESTAMP('2001-01-01', '839:59:59')+0.000000 AS c6, + TIMESTAMP('2001-01-01', '839:59:59')+0.0000000 AS c7; + +--horizontal_results + +--echo # Corner cases for TIMESTAMP(timestamp,xxx) + +--echo # HOUR is outside of supported INTERVAL DAYS TO SECONDS range +--echo # Expect NULL with INTERVAL warnings +CREATE TABLE t1 (a VARCHAR(64), b VARCHAR(64)); +INSERT INTO t1 VALUES ('4294967296:00:00', '178956970 16:00:00'); +INSERT INTO t1 VALUES ('4294967295:59:59', '178956970 15:59:59'); +INSERT INTO t1 VALUES ('4294967294:59:59', '178956970 14:59:59'); +INSERT INTO t1 VALUES ('87649416:00:00', '3652059 00:00:00'); +SELECT TIMESTAMP('0001-01-01 00:00:00', a) AS ta, TIMESTAMP('0001-01-01 00:00:00', b) AS tb FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 (a VARCHAR(64), b VARCHAR(64)); +INSERT INTO t1 VALUES ('-4294967296:00:00', '-178956970 16:00:00'); +INSERT INTO t1 VALUES ('-4294967295:59:59', '-178956970 15:59:59'); +INSERT INTO t1 VALUES ('-4294967294:59:59', '-178956970 14:59:59'); +INSERT INTO t1 VALUES ('-87649416:00:00', '-3652059 00:00:00'); +SELECT TIMESTAMP('9999-12-31 23:59:59', a) AS ta, TIMESTAMP('9999-12-31 23:59:59.999999', b) AS tb FROM t1; +DROP TABLE t1; + +--echo # HOUR is OK +--echo # Expect max or near-max DATETIME value + no INTERVAL warnings +CREATE TABLE t1 (a VARCHAR(64), b VARCHAR(64)); +INSERT INTO t1 VALUES ('87649415:59:59.999999', '3652058 23:59:59.999999'); +INSERT INTO t1 VALUES ('87649415:59:59', '3652058 23:59:59'); +SELECT TIMESTAMP('0001-01-01 00:00:00', a) AS ta, TIMESTAMP('0001-01-01 00:00:00', b) AS tb FROM t1; +DROP TABLE t1; + +--echo # HOUR is OK +--echo # Expect near '0001-01-01 00:00:00' DATETIME value + no INTERVAL warnings +CREATE TABLE t1 (a VARCHAR(64), b VARCHAR(64)); +INSERT INTO t1 VALUES ('-87649415:59:59.999999', '-3652058 23:59:59.999999'); +INSERT INTO t1 VALUES ('-87649415:59:59', '-3652058 23:59:59'); +SELECT TIMESTAMP('9999-12-31 23:59:59', a) AS ta, TIMESTAMP('9999-12-31 23:59:59.999999', b) AS tb FROM t1; +DROP TABLE t1; + +--echo # HOUR is OK +--echo # Expect NULL on datetime arithmetic overflow + no INTERVAL warnings +CREATE TABLE t1 (a VARCHAR(64), b VARCHAR(64)); +INSERT INTO t1 VALUES ('-00:00:00.000001', '-0 00:00:00.000001'); +SELECT TIMESTAMP('0001-01-01 00:00:00', a) AS ta, TIMESTAMP('0001-01-01 00:00:00', b) AS tb FROM t1; +DROP TABLE t1; + + +--echo # Corner cases for ADDTIME(timestamp,xxx) +--vertical_results + +--echo # HOUR is outside of UINT_MAX32 range +--echo # Expect NULL + "Incorrect INTERVAL DAY TO SECOND value" + +SELECT + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959) AS ci, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0 AS c0, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.0 AS c1, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.00 AS c2, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.000 AS c3, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.0000 AS c4, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.00000 AS c5, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.000000 AS c6, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672965959)+0.0000000 AS c7; + +SELECT + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59') AS ci, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0 AS c0, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.0 AS c1, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.00 AS c2, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.000 AS c3, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.0000 AS c4, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.00000 AS c5, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.000000 AS c6, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967296:59:59')+0.0000000 AS c7; + +## TODO: add '0001-01-01 00:00:00' + +--echo # HOUR UINT_MAX32 +--echo # Expect NULL + "Incorrect INTERVAL DAY TO SECOND value" +SELECT + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959) AS ci, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0 AS c0, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.0 AS c1, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.00 AS c2, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.000 AS c3, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.0000 AS c4, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.00000 AS c5, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.000000 AS c6, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 42949672955959)+0.0000000 AS c7; + +SELECT + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59') AS ci, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0 AS c0, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.0 AS c1, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.00 AS c2, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.000 AS c3, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.0000 AS c4, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.00000 AS c5, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.000000 AS c6, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '4294967295:59:59')+0.0000000 AS c7; + +--echo # HOUR is max_useful_hour()+1 +--echo # Expect NULL + "Incorrect INTERVAL DAY TO SECOND value" +SELECT + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959) AS ci, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0 AS c0, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.0 AS c1, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.00 AS c2, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.000 AS c3, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.0000 AS c4, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.00000 AS c5, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.000000 AS c6, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494165959)+0.0000000 AS c7; + +SELECT + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59') AS ci, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0 AS c0, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.0 AS c1, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.00 AS c2, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.000 AS c3, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.0000 AS c4, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.00000 AS c5, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.000000 AS c6, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649416:59:59')+0.0000000 AS c7; + +--echo # HOUR is max_useful_hour() +--echo # Expect NULL (calc_time_diff overflows ) + no INTERVAL warnings +SELECT + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959) AS ci, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0 AS c0, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.0 AS c1, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.00 AS c2, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.000 AS c3, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.0000 AS c4, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.00000 AS c5, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.000000 AS c6, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', 876494155959)+0.0000000 AS c7; + +SELECT + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59') AS ci, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0 AS c0, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.0 AS c1, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.00 AS c2, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.000 AS c3, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.0000 AS c4, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.00000 AS c5, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.000000 AS c6, + ADDTIME(TIMESTAMP'2001-01-01 00:00:00', '87649415:59:59')+0.0000000 AS c7; + +--echo # HOUR is max_useful_hour() +--echo # Expect non-NULL + no warnings +SELECT + ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959) AS ci, + ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0 AS c0, + ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.0 AS c1, + ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.00 AS c2, + ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.000 AS c3, + ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.0000 AS c4, + ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.00000 AS c5, + ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.000000 AS c6, + ADDTIME(TIMESTAMP'0001-01-01 00:00:00', 876494155959)+0.0000000 AS c7; + +SELECT + ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59') AS ci, + ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0 AS c0, + ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.0 AS c1, + ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.00 AS c2, + ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.000 AS c3, + ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.0000 AS c4, + ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.00000 AS c5, + ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.000000 AS c6, + ADDTIME(TIMESTAMP'0001-01-01 00:00:00', '87649415:59:59')+0.0000000 AS c7; +--horizontal_results + + +--echo # Corner cases for ADDTIME(time,xxx) +--vertical_results + +--echo # HOUR outside of UINT32 range +--echo # Expect NULL + "Incorrect INTERVAL DAY TO SECOND value" +SELECT + ADDTIME(TIME'00:00:00', 42949672965959) AS ci, + ADDTIME(TIME'00:00:00', 42949672965959)+0 AS c0, + ADDTIME(TIME'00:00:00', 42949672965959)+0.0 AS c1, + ADDTIME(TIME'00:00:00', 42949672965959)+0.00 AS c2, + ADDTIME(TIME'00:00:00', 42949672965959)+0.000 AS c3, + ADDTIME(TIME'00:00:00', 42949672965959)+0.0000 AS c4, + ADDTIME(TIME'00:00:00', 42949672965959)+0.00000 AS c5, + ADDTIME(TIME'00:00:00', 42949672965959)+0.000000 AS c6, + ADDTIME(TIME'00:00:00', 42949672965959)+0.0000000 AS c7; + +SELECT + ADDTIME(TIME'00:00:00', '4294967296:59:59') AS ci, + ADDTIME(TIME'00:00:00', '4294967296:59:59')+0 AS c0, + ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.0 AS c1, + ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.00 AS c2, + ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.000 AS c3, + ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.0000 AS c4, + ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.00000 AS c5, + ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.000000 AS c6, + ADDTIME(TIME'00:00:00', '4294967296:59:59')+0.0000000 AS c7; + +--echo # HOUR is UINT_MAX32 (outside of INTERVAL DAY TO SECOND range) +--echo # Expect NULL + "Incorrect INTERVAL DAY TO SECOND value" +SELECT + ADDTIME(TIME'00:00:00', 42949672955959) AS ci, + ADDTIME(TIME'00:00:00', 42949672955959)+0 AS c0, + ADDTIME(TIME'00:00:00', 42949672955959)+0.0 AS c1, + ADDTIME(TIME'00:00:00', 42949672955959)+0.00 AS c2, + ADDTIME(TIME'00:00:00', 42949672955959)+0.000 AS c3, + ADDTIME(TIME'00:00:00', 42949672955959)+0.0000 AS c4, + ADDTIME(TIME'00:00:00', 42949672955959)+0.00000 AS c5, + ADDTIME(TIME'00:00:00', 42949672955959)+0.000000 AS c6, + ADDTIME(TIME'00:00:00', 42949672955959)+0.0000000 AS c7; + +SELECT + ADDTIME(TIME'00:00:00', '4294967295:59:59') AS ci, + ADDTIME(TIME'00:00:00', '4294967295:59:59')+0 AS c0, + ADDTIME(TIME'00:00:00', '4294967295:59:59')+0.0 AS c1, + ADDTIME(TIME'00:00:00', '4294967295:59:59')+0.00 AS c2, + ADDTIME(TIME'00:00:00', '4294967295:59:59')+0.000 AS c3, + ADDTIME(TIME'00:00:00', '4294967295:59:59')+0.0000 AS c4, + ADDTIME(TIME'00:00:00', '4294967295:59:59')+0.00000 AS c5, + ADDTIME(TIME'00:00:00', '4294967295:59:59')+0.000000 AS c6, + ADDTIME(TIME'00:00:00', '4294967295;00:00')+0.0000000 AS c7; + +--echo # HOUR is max_useful_hour()+1 (outside of INTERVAL DAY TO SECOND range) +--echo # Expect NULL + "Incorrect INTERVAL DAY TO SECOND value" + +SELECT + ADDTIME(TIME'00:00:00', 876494165959) AS ci, + ADDTIME(TIME'00:00:00', 876494165959)+0 AS c0, + ADDTIME(TIME'00:00:00', 876494165959)+0.0 AS c1, + ADDTIME(TIME'00:00:00', 876494165959)+0.00 AS c2, + ADDTIME(TIME'00:00:00', 876494165959)+0.000 AS c3, + ADDTIME(TIME'00:00:00', 876494165959)+0.0000 AS c4, + ADDTIME(TIME'00:00:00', 876494165959)+0.00000 AS c5, + ADDTIME(TIME'00:00:00', 876494165959)+0.000000 AS c6, + ADDTIME(TIME'00:00:00', 876494165959)+0.0000000 AS c7; + +SELECT + ADDTIME(TIME'00:00:00', '87649416:59:59') AS ci, + ADDTIME(TIME'00:00:00', '87649416:59:59')+0 AS c0, + ADDTIME(TIME'00:00:00', '87649416:59:59')+0.0 AS c1, + ADDTIME(TIME'00:00:00', '87649416:59:59')+0.00 AS c2, + ADDTIME(TIME'00:00:00', '87649416:59:59')+0.000 AS c3, + ADDTIME(TIME'00:00:00', '87649416:59:59')+0.0000 AS c4, + ADDTIME(TIME'00:00:00', '87649416:59:59')+0.00000 AS c5, + ADDTIME(TIME'00:00:00', '87649416:59:59')+0.000000 AS c6, + ADDTIME(TIME'00:00:00', '87649416:59:59')+0.0000000 AS c7; + +--echo # HOUR is max_useful_hour()+1 (outside of INTERVAL DAY TO SECOND range) +--echo # Expect NULL + "Incorrect INTERVAL DAY TO SECOND value" + +SELECT + ADDTIME(TIME'-838:59:59', 876494165959) AS ci, + ADDTIME(TIME'-838:59:59.9', 876494165959) AS c1, + ADDTIME(TIME'-838:59:59.99', 876494165959) AS c2, + ADDTIME(TIME'-838:59:59.999', 876494165959) AS c3, + ADDTIME(TIME'-838:59:59.9999', 876494165959) AS c4, + ADDTIME(TIME'-838:59:59.99999', 876494165959) AS c5, + ADDTIME(TIME'-838:59:59.999999', 876494165959) AS c6; + +SELECT + ADDTIME(TIME'-838:59:59', '87649416:59:59') AS ci, + ADDTIME(TIME'-838:59:59.9', '87649416:59:59') AS c1, + ADDTIME(TIME'-838:59:59.99', '87649416:59:59') AS c2, + ADDTIME(TIME'-838:59:59.999', '87649416:59:59') AS c3, + ADDTIME(TIME'-838:59:59.9999', '87649416:59:59') AS c4, + ADDTIME(TIME'-838:59:59.99999', '87649416:59:59') AS c5, + ADDTIME(TIME'-838:59:59.999999', '87649416:59:59') AS c6; + +# This does not give a warning about nanosecond truncation in --ps runs +# so disable warnings +--disable_warnings +SELECT + ADDTIME(TIME'-838:59:59.9999999', '87649416:59:59') AS c7; +--enable_warnings + +--echo # HOUR is max_useful_hour() (inside INTERVAL DAY TO SECOND range) +--echo # Expect max TIME(0) + zero fraction + TIME warnings + no INTEVAL warnings +SELECT + ADDTIME(TIME'00:00:00', 876494155959) AS ci, + ADDTIME(TIME'00:00:00', 876494155959)+0 AS c0, + ADDTIME(TIME'00:00:00', 876494155959)+0.0 AS c1, + ADDTIME(TIME'00:00:00', 876494155959)+0.00 AS c2, + ADDTIME(TIME'00:00:00', 876494155959)+0.000 AS c3, + ADDTIME(TIME'00:00:00', 876494155959)+0.0000 AS c4, + ADDTIME(TIME'00:00:00', 876494155959)+0.00000 AS c5, + ADDTIME(TIME'00:00:00', 876494155959)+0.000000 AS c6, + ADDTIME(TIME'00:00:00', 876494155959)+0.0000000 AS c7; + +SELECT + ADDTIME(TIME'00:00:00', '87649415:59:59') AS ci, + ADDTIME(TIME'00:00:00', '87649415:59:59')+0 AS c0, + ADDTIME(TIME'00:00:00', '87649415:59:59')+0.0 AS c1, + ADDTIME(TIME'00:00:00', '87649415:59:59')+0.00 AS c2, + ADDTIME(TIME'00:00:00', '87649415:59:59')+0.000 AS c3, + ADDTIME(TIME'00:00:00', '87649415:59:59')+0.0000 AS c4, + ADDTIME(TIME'00:00:00', '87649415:59:59')+0.00000 AS c5, + ADDTIME(TIME'00:00:00', '87649415:59:59')+0.000000 AS c6, + ADDTIME(TIME'00:00:00', '87649415:59:59')+0.0000000 AS c7; + + +--echo # HOUR is max_useful_hour() (inside INTERVAL DAY TO SECOND range) +--echo # Expect max TIME(N) + TIME warnings + no INTERVAL warnings + +SELECT + ADDTIME(TIME'-838:59:59', 876494155959) AS ci, + ADDTIME(TIME'-838:59:59.9', 876494155959) AS c1, + ADDTIME(TIME'-838:59:59.99', 876494155959) AS c2, + ADDTIME(TIME'-838:59:59.999', 876494155959) AS c3, + ADDTIME(TIME'-838:59:59.9999', 876494155959) AS c4, + ADDTIME(TIME'-838:59:59.99999', 876494155959) AS c5, + ADDTIME(TIME'-838:59:59.999999', 876494155959) AS c6; + +SELECT + ADDTIME(TIME'-838:59:59', '87649415:59:59') AS ci, + ADDTIME(TIME'-838:59:59.9', '87649415:59:59') AS c1, + ADDTIME(TIME'-838:59:59.99', '87649415:59:59') AS c2, + ADDTIME(TIME'-838:59:59.999', '87649415:59:59') AS c3, + ADDTIME(TIME'-838:59:59.9999', '87649415:59:59') AS c4, + ADDTIME(TIME'-838:59:59.99999', '87649415:59:59') AS c5, + ADDTIME(TIME'-838:59:59.999999', '87649415:59:59') AS c6; + +# This does not give a warning about nanosecond truncation in --ps runs +# so disable warnings +--disable_warnings +SELECT + ADDTIME(TIME'-838:59:59.9999999', '87649415:59:59') AS c7; +--enable_warnings + +--horizontal_results + + +--echo # +--echo # MDEV-17400 The result of TIME('42949672965959-01') depends on architecture +--echo # + +SELECT TIME('42949672955959-01'), TIME('42949672965959-01'); +SELECT TIME('18446744073709551615-01'), TIME('18446744073709551616-01'); + +--echo # +--echo # MDEV-17434 EXTRACT(DAY FROM negative_time) returns wrong result +--echo # + +CREATE TABLE t1 (a TIME(6)); +INSERT INTO t1 VALUES ('-24:10:10.10'); +SELECT + EXTRACT(MINUTE FROM a), + EXTRACT(SECOND FROM a), + EXTRACT(MICROSECOND FROM a), + EXTRACT(DAY FROM a), + EXTRACT(DAY_HOUR FROM a), + EXTRACT(DAY_MINUTE FROM a), + EXTRACT(DAY_SECOND FROM a), + EXTRACT(DAY_MICROSECOND FROM a) +FROM t1; +CREATE TABLE t2 AS +SELECT + EXTRACT(MINUTE FROM a), + EXTRACT(SECOND FROM a), + EXTRACT(MICROSECOND FROM a), + EXTRACT(DAY FROM a), + EXTRACT(DAY_HOUR FROM a), + EXTRACT(DAY_MINUTE FROM a), + EXTRACT(DAY_SECOND FROM a), + EXTRACT(DAY_MICROSECOND FROM a) +FROM t1; +SHOW CREATE TABLE t2; +DROP TABLE t2; +DROP TABLE t1; + + +--echo # +--echo # MDEV-17478 Wrong result for TIME('+100:20:30') +--echo # + +SELECT TIME('+100:20:30'); + +--echo # +--echo # MDEV-17477 Wrong result for TIME('-2001-01-01 10:20:30') +--echo # + +SELECT TIME('-2001-01-01 10:20:30'); +SELECT TIME('2001-01-01') AS c1, TIME('2001-01-01 ') AS c2; +SELECT TIME('0001:01:01 '), TIME('0001:01:01 '); +SELECT TIME('1 2'), TIME('1 2 '); + +SELECT TIME('2001-01-01T'), TIME('2001-01-01T '); +SELECT TIME('901-01-01T1'), TIME('901-01-01T10'); +SELECT TIME('091-01-01T1'), TIME('091-01-01T10'); + +SELECT TIME('0001:01:01x'), TIME('0001:01:01xx'); +SELECT TIME('0001:01:01.'), TIME('0001:01:01..'); +SELECT TIME('0001:01:01-'), TIME('0001:01:01--'); +SELECT TIME('0001:01:01-'), TIME('0001:01:01--'); + +SELECT TIME('-xxx'), TIME('-xxxxxxxxxxxxxxxxxxxx'); +SELECT TIME('- '), TIME('- '); +SELECT TIME('-'), TIME('-'); +SELECT TIME('1-1-1 1:1:1'), TIME('1-1-1 1:1:1.0'); +SELECT TIME('1-1-1 1:2:3'), TIME('1-1-1 1:2:3.0'); + +SELECT + CAST('20050326112233 garbage' as datetime), + CAST('20050326 garbage' as date), + CAST('50326 garbage' as time); + +SELECT TIME('- 01:00:00'), TIME('- 1 01:00:00'); diff --git a/mysql-test/main/gis-precise.result b/mysql-test/main/gis-precise.result index 7b553387fde..8382a94e358 100644 --- a/mysql-test/main/gis-precise.result +++ b/mysql-test/main/gis-precise.result @@ -504,6 +504,9 @@ GEOMETRYFROMTEXT('POINT(4599 60359)'), ) as relate_res; relate_res 0 +with cte1 as( select (st_symdifference(point(1,1),point(1,1))) as a1 ), cte2 as(select 1 as a2) select 1 from cte1 where cte1.a1 < '1'; +1 +1 DROP TABLE IF EXISTS p1; CREATE PROCEDURE p1(dist DOUBLE, geom TEXT) BEGIN diff --git a/mysql-test/main/gis-precise.test b/mysql-test/main/gis-precise.test index 07fabae6025..0bb445924b8 100644 --- a/mysql-test/main/gis-precise.test +++ b/mysql-test/main/gis-precise.test @@ -382,5 +382,9 @@ SELECT ST_RELATE( 'F*FFFF**F' ) as relate_res; +# MDEV- 16050 cte + geometry functions lead to crash. + +with cte1 as( select (st_symdifference(point(1,1),point(1,1))) as a1 ), cte2 as(select 1 as a2) select 1 from cte1 where cte1.a1 < '1'; + --source include/gis_debug.inc diff --git a/mysql-test/main/gis.result b/mysql-test/main/gis.result index 886b1b5f6a8..05e6e41852a 100644 --- a/mysql-test/main/gis.result +++ b/mysql-test/main/gis.result @@ -1721,6 +1721,22 @@ c2 DROP TABLE t1; SET optimizer_switch=@save_optimizer_switch; # +# MDEV-16995: ER_CANT_CREATE_GEOMETRY_OBJECT encountered for a query with +# optimizer_use_condition_selectivity>=3 +# +CREATE TABLE t1 (a POINT); +INSERT INTO t1 VALUES (POINT(1,1)),(POINT(1,2)),(POINT(1,3)); +set @save_use_stat_tables= @@use_stat_tables; +set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity; +set @@use_stat_tables= PREFERABLY; +set @@optimizer_use_condition_selectivity=3; +SELECT COUNT(*) FROM t1 WHERE a IN ('test','test1'); +COUNT(*) +0 +set @@use_stat_tables= @save_use_stat_tables; +set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity; +drop table t1; +# # End 10.0 tests # SHOW CREATE TABLE information_schema.geometry_columns; diff --git a/mysql-test/main/gis.test b/mysql-test/main/gis.test index 97a655bf51e..c3d0fb43520 100644 --- a/mysql-test/main/gis.test +++ b/mysql-test/main/gis.test @@ -1481,6 +1481,21 @@ SELECT LENGTH(CONCAT(t2,'--',t2)) c2 FROM (SELECT ST_BUFFER(POINT(x,y), 0) t2 FR DROP TABLE t1; SET optimizer_switch=@save_optimizer_switch; +--echo # +--echo # MDEV-16995: ER_CANT_CREATE_GEOMETRY_OBJECT encountered for a query with +--echo # optimizer_use_condition_selectivity>=3 +--echo # + +CREATE TABLE t1 (a POINT); +INSERT INTO t1 VALUES (POINT(1,1)),(POINT(1,2)),(POINT(1,3)); +set @save_use_stat_tables= @@use_stat_tables; +set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity; +set @@use_stat_tables= PREFERABLY; +set @@optimizer_use_condition_selectivity=3; +SELECT COUNT(*) FROM t1 WHERE a IN ('test','test1'); +set @@use_stat_tables= @save_use_stat_tables; +set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity; +drop table t1; --echo # --echo # End 10.0 tests diff --git a/mysql-test/main/grant.result b/mysql-test/main/grant.result index ff7ff2b3611..74f86edd4ea 100644 --- a/mysql-test/main/grant.result +++ b/mysql-test/main/grant.result @@ -58,7 +58,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -134,7 +134,7 @@ max_questions 10 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -186,7 +186,7 @@ max_questions 10 max_updates 20 max_connections 30 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -1759,6 +1759,7 @@ drop user mysqltest@localhost; disconnect user1; drop database mysqltest; use test; +call mtr.add_suppression("Can't open and lock privilege tables"); FLUSH PRIVILEGES without procs_priv table. RENAME TABLE mysql.procs_priv TO mysql.procs_gone; FLUSH PRIVILEGES; @@ -1852,8 +1853,6 @@ BEGIN SET @x = 0; REPEAT SET @x = @x + 1; UNTIL @x > p1 END REPEAT; END ;|| -Warnings: -Warning 1404 Failed to grant EXECUTE and ALTER ROUTINE privileges connection default; SHOW GRANTS FOR 'user1'@'localhost'; Grants for user1@localhost @@ -1864,6 +1863,7 @@ SHOW GRANTS FOR 'user2'; Grants for user2@% GRANT USAGE ON *.* TO 'user2'@'%' GRANT CREATE, CREATE ROUTINE ON `db1`.* TO 'user2'@'%' +GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `db1`.`proc2` TO 'user2'@'%' disconnect con1; disconnect con2; DROP PROCEDURE db1.proc1; @@ -2672,6 +2672,38 @@ disconnect conn2; disconnect conn3; DROP USER foo@'127.0.0.1'; # End of Bug#12766319 +create user foo@localhost; +create database foodb; +grant create routine on foodb.* to foo@localhost; +connect con1,localhost,foo; +create procedure fooproc() select 'i am fooproc'; +show grants; +Grants for foo@localhost +GRANT USAGE ON *.* TO 'foo'@'localhost' +GRANT CREATE ROUTINE ON `foodb`.* TO 'foo'@'localhost' +GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `test`.`fooproc` TO 'foo'@'localhost' +disconnect con1; +connection default; +rename table mysql.procs_priv to mysql.procs_priv1; +flush privileges; +show grants for foo@localhost; +Grants for foo@localhost +GRANT USAGE ON *.* TO 'foo'@'localhost' +GRANT CREATE ROUTINE ON `foodb`.* TO 'foo'@'localhost' +rename table mysql.procs_priv1 to mysql.procs_priv; +show grants for foo@localhost; +Grants for foo@localhost +GRANT USAGE ON *.* TO 'foo'@'localhost' +GRANT CREATE ROUTINE ON `foodb`.* TO 'foo'@'localhost' +flush privileges; +show grants for foo@localhost; +Grants for foo@localhost +GRANT USAGE ON *.* TO 'foo'@'localhost' +GRANT CREATE ROUTINE ON `foodb`.* TO 'foo'@'localhost' +GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `test`.`fooproc` TO 'foo'@'localhost' +drop user foo@localhost; +drop procedure fooproc; +drop database foodb; # # Bug#11756966 - 48958: STORED PROCEDURES CAN BE LEVERAGED TO BYPASS # DATABASE SECURITY diff --git a/mysql-test/main/grant.test b/mysql-test/main/grant.test index cb4254fe8c6..f54c4bd981d 100644 --- a/mysql-test/main/grant.test +++ b/mysql-test/main/grant.test @@ -1598,6 +1598,9 @@ use test; # # Bug#16470 crash on grant if old grant tables # + +call mtr.add_suppression("Can't open and lock privilege tables"); + --echo FLUSH PRIVILEGES without procs_priv table. RENAME TABLE mysql.procs_priv TO mysql.procs_gone; FLUSH PRIVILEGES; @@ -2172,6 +2175,28 @@ DROP USER foo@'127.0.0.1'; --echo # End of Bug#12766319 +# +# Bug#27230925: HANDLE_FATAL_SIGNAL (SIG=11) IN SHOW_ROUTINE_GRANTS +# +create user foo@localhost; +create database foodb; +grant create routine on foodb.* to foo@localhost; +connect con1,localhost,foo; +create procedure fooproc() select 'i am fooproc'; +show grants; +disconnect con1; +connection default; +rename table mysql.procs_priv to mysql.procs_priv1; +flush privileges; +show grants for foo@localhost; +rename table mysql.procs_priv1 to mysql.procs_priv; +show grants for foo@localhost; +flush privileges; +show grants for foo@localhost; +drop user foo@localhost; +drop procedure fooproc; +drop database foodb; + --echo # --echo # Bug#11756966 - 48958: STORED PROCEDURES CAN BE LEVERAGED TO BYPASS diff --git a/mysql-test/main/grant2.result b/mysql-test/main/grant2.result index 632a9524b45..4fd1a6c3fe7 100644 --- a/mysql-test/main/grant2.result +++ b/mysql-test/main/grant2.result @@ -181,19 +181,19 @@ grant select on *.* to 'mysqltest_2'; grant insert on test.* to 'mysqltest_2'; grant update on test.t1 to 'mysqltest_2'; grant update (c2) on test.t2 to 'mysqltest_2'; -select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password; -host user password -% mysqltest_1 -% mysqltest_2 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1 -% mysqltest_3 fffffffffffffffffffffffffffffffffffffffff -select host,db,user from mysql.db where user like 'mysqltest_%' order by host,db,user; +select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%'; +host user password plugin authentication_string +% mysqltest_1 mysql_native_password +% mysqltest_2 mysql_native_password *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1 +% mysqltest_3 mysql_native_password fffffffffffffffffffffffffffffffffffffffff +select host,db,user from mysql.db where user like 'mysqltest_%'; host db user % test mysqltest_2 -select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' order by host,db,user,table_name; +select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%'; host db user table_name % test mysqltest_2 t1 % test mysqltest_2 t2 -select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' order by host,db,user,table_name,column_name; +select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%'; host db user table_name column_name % test mysqltest_2 t2 c2 show grants for 'mysqltest_1'; @@ -206,35 +206,35 @@ GRANT INSERT ON "test".* TO 'mysqltest_2'@'%' GRANT UPDATE (c2) ON "test"."t2" TO 'mysqltest_2'@'%' GRANT UPDATE ON "test"."t1" TO 'mysqltest_2'@'%' drop user 'mysqltest_1'; -select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password; -host user password -% mysqltest_2 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1 -% mysqltest_3 fffffffffffffffffffffffffffffffffffffffff -select host,db,user from mysql.db where user like 'mysqltest_%' order by host,db,user; +select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%'; +host user password plugin authentication_string +% mysqltest_2 mysql_native_password *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1 +% mysqltest_3 mysql_native_password fffffffffffffffffffffffffffffffffffffffff +select host,db,user from mysql.db where user like 'mysqltest_%'; host db user % test mysqltest_2 -select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' order by host,db,user,table_name; +select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%'; host db user table_name % test mysqltest_2 t1 % test mysqltest_2 t2 -select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' order by host,db,user,table_name,column_name; +select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%'; host db user table_name column_name % test mysqltest_2 t2 c2 show grants for 'mysqltest_1'; ERROR 42000: There is no such grant defined for user 'mysqltest_1' on host '%' rename user 'mysqltest_2' to 'mysqltest_1'; -select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password; -host user password -% mysqltest_1 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1 -% mysqltest_3 fffffffffffffffffffffffffffffffffffffffff -select host,db,user from mysql.db where user like 'mysqltest_%' order by host,db,user; +select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%' ; +host user password plugin authentication_string +% mysqltest_1 mysql_native_password *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1 +% mysqltest_3 mysql_native_password fffffffffffffffffffffffffffffffffffffffff +select host,db,user from mysql.db where user like 'mysqltest_%' ; host db user % test mysqltest_1 -select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' order by host,db,user,table_name; +select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' ; host db user table_name % test mysqltest_1 t1 % test mysqltest_1 t2 -select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' order by host,db,user,table_name,column_name; +select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' ; host db user table_name column_name % test mysqltest_1 t2 c2 show grants for 'mysqltest_1'; @@ -254,21 +254,21 @@ ERROR 42000: There is no such grant defined for user 'mysqltest_1' on host '%' revoke all privileges, grant option from 'mysqltest_1'; ERROR HY000: Can't revoke all privileges for one or more of the requested users drop user 'mysqltest_1'; -select host,db,user from mysql.db where user = 'mysqltest_1' order by host,db,user; +select host,db,user from mysql.db where user = 'mysqltest_1' ; host db user insert into mysql.tables_priv set host='%', db='test', user='mysqltest_1', table_name='t1'; flush privileges; show grants for 'mysqltest_1'; ERROR 42000: There is no such grant defined for user 'mysqltest_1' on host '%' drop user 'mysqltest_1'; -select host,db,user,table_name from mysql.tables_priv where user = 'mysqltest_1' order by host,db,user,table_name; +select host,db,user,table_name from mysql.tables_priv where user = 'mysqltest_1' ; host db user table_name insert into mysql.columns_priv set host='%', db='test', user='mysqltest_1', table_name='t1', column_name='c1'; flush privileges; show grants for 'mysqltest_1'; ERROR 42000: There is no such grant defined for user 'mysqltest_1' on host '%' drop user 'mysqltest_1'; -select host,db,user,table_name,column_name from mysql.columns_priv where user = 'mysqltest_1' order by host,db,user,table_name,column_name; +select host,db,user,table_name,column_name from mysql.columns_priv where user = 'mysqltest_1' ; host db user table_name column_name create user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3'; drop user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3'; @@ -310,7 +310,7 @@ create user mysqltest_2@localhost; grant create user on *.* to mysqltest_2@localhost; connect user3,localhost,mysqltest_2,,; connection user3; -select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password; +select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%' ; ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 'user' create user mysqltest_A@'%'; rename user mysqltest_A@'%' to mysqltest_B@'%'; @@ -326,7 +326,7 @@ show grants; Grants for mysqltest_3@localhost GRANT USAGE ON *.* TO 'mysqltest_3'@'localhost' GRANT INSERT, UPDATE, DELETE ON `mysql`.* TO 'mysqltest_3'@'localhost' -select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password; +select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%' ; ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 'user' insert into mysql.user set host='%', user='mysqltest_B'; Warnings: @@ -555,29 +555,26 @@ End of 5.0 tests USE mysql; SELECT LEFT(CURRENT_USER(),INSTR(CURRENT_USER(),'@')-1) INTO @u; SELECT MID(CURRENT_USER(),INSTR(CURRENT_USER(),'@')+1) INTO @h; -SELECT password FROM user WHERE user=@u AND host=@h INTO @pwd; -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h; -user host password insert_priv -root localhost Y +SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h; +user host password plugin authentication_string insert_priv +root localhost Y UPDATE user SET insert_priv='N' WHERE user=@u AND host=@h; -SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h; -user host password insert_priv -root localhost N +SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h; +user host password plugin authentication_string insert_priv +root localhost N GRANT INSERT ON *.* TO CURRENT_USER(); -SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h; -user host password insert_priv -root localhost Y +SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h; +user host password plugin authentication_string insert_priv +root localhost mysql_native_password Y UPDATE user SET insert_priv='N' WHERE user=@u AND host=@h; GRANT INSERT ON *.* TO CURRENT_USER() IDENTIFIED BY 'keksdose'; -SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h; -user host password insert_priv -root localhost *0BB7188CF0DE9B403BA66E9DD810D82652D002EB Y -UPDATE user SET password=@pwd WHERE user=@u AND host=@h; -SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h; -user host password insert_priv -root localhost Y +SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h; +user host password plugin authentication_string insert_priv +root localhost mysql_native_password *0BB7188CF0DE9B403BA66E9DD810D82652D002EB Y +UPDATE user SET plugin='', authentication_string='' WHERE user=@u AND host=@h; +SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h; +user host password plugin authentication_string insert_priv +root localhost Y FLUSH PRIVILEGES; USE test; End of 5.1 tests diff --git a/mysql-test/main/grant2.test b/mysql-test/main/grant2.test index 1f7450df6c1..f0b58da4cb5 100644 --- a/mysql-test/main/grant2.test +++ b/mysql-test/main/grant2.test @@ -231,28 +231,40 @@ grant select on *.* to 'mysqltest_2'; grant insert on test.* to 'mysqltest_2'; grant update on test.t1 to 'mysqltest_2'; grant update (c2) on test.t2 to 'mysqltest_2'; -select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password; -select host,db,user from mysql.db where user like 'mysqltest_%' order by host,db,user; -select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' order by host,db,user,table_name; -select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' order by host,db,user,table_name,column_name; +--sorted_result +select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%'; +--sorted_result +select host,db,user from mysql.db where user like 'mysqltest_%'; +--sorted_result +select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%'; +--sorted_result +select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%'; show grants for 'mysqltest_1'; show grants for 'mysqltest_2'; # # Drop drop user 'mysqltest_1'; -select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password; -select host,db,user from mysql.db where user like 'mysqltest_%' order by host,db,user; -select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' order by host,db,user,table_name; -select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' order by host,db,user,table_name,column_name; +--sorted_result +select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%'; +--sorted_result +select host,db,user from mysql.db where user like 'mysqltest_%'; +--sorted_result +select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%'; +--sorted_result +select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%'; --error ER_NONEXISTING_GRANT show grants for 'mysqltest_1'; # # Rename rename user 'mysqltest_2' to 'mysqltest_1'; -select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password; -select host,db,user from mysql.db where user like 'mysqltest_%' order by host,db,user; -select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' order by host,db,user,table_name; -select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' order by host,db,user,table_name,column_name; +--sorted_result +select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%' ; +--sorted_result +select host,db,user from mysql.db where user like 'mysqltest_%' ; +--sorted_result +select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' ; +--sorted_result +select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' ; show grants for 'mysqltest_1'; drop user 'mysqltest_1', 'mysqltest_3'; --error ER_CANNOT_USER @@ -269,7 +281,8 @@ show grants for 'mysqltest_1'; --error ER_REVOKE_GRANTS revoke all privileges, grant option from 'mysqltest_1'; drop user 'mysqltest_1'; -select host,db,user from mysql.db where user = 'mysqltest_1' order by host,db,user; +--sorted_result +select host,db,user from mysql.db where user = 'mysqltest_1' ; # # Add a stray record insert into mysql.tables_priv set host='%', db='test', user='mysqltest_1', table_name='t1'; @@ -277,7 +290,8 @@ flush privileges; --error ER_NONEXISTING_GRANT show grants for 'mysqltest_1'; drop user 'mysqltest_1'; -select host,db,user,table_name from mysql.tables_priv where user = 'mysqltest_1' order by host,db,user,table_name; +--sorted_result +select host,db,user,table_name from mysql.tables_priv where user = 'mysqltest_1' ; # # Add a stray record insert into mysql.columns_priv set host='%', db='test', user='mysqltest_1', table_name='t1', column_name='c1'; @@ -285,7 +299,8 @@ flush privileges; --error ER_NONEXISTING_GRANT show grants for 'mysqltest_1'; drop user 'mysqltest_1'; -select host,db,user,table_name,column_name from mysql.columns_priv where user = 'mysqltest_1' order by host,db,user,table_name,column_name; +--sorted_result +select host,db,user,table_name,column_name from mysql.columns_priv where user = 'mysqltest_1' ; # # Handle multi user lists create user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3'; @@ -330,7 +345,7 @@ grant create user on *.* to mysqltest_2@localhost; connect (user3,localhost,mysqltest_2,,); connection user3; --error ER_TABLEACCESS_DENIED_ERROR -select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password; +select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%' ; create user mysqltest_A@'%'; rename user mysqltest_A@'%' to mysqltest_B@'%'; drop user mysqltest_B@'%'; @@ -345,7 +360,7 @@ connect (user4,localhost,mysqltest_3,,); connection user4; show grants; --error ER_TABLEACCESS_DENIED_ERROR -select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password; +select host,user,password,plugin,authentication_string from mysql.user where user like 'mysqltest_%' ; insert into mysql.user set host='%', user='mysqltest_B'; create user mysqltest_A@'%'; rename user mysqltest_B@'%' to mysqltest_C@'%'; @@ -642,26 +657,25 @@ DROP DATABASE db1; USE mysql; SELECT LEFT(CURRENT_USER(),INSTR(CURRENT_USER(),'@')-1) INTO @u; SELECT MID(CURRENT_USER(),INSTR(CURRENT_USER(),'@')+1) INTO @h; -SELECT password FROM user WHERE user=@u AND host=@h INTO @pwd; # show current privs. -SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h; +SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h; # toggle INSERT UPDATE user SET insert_priv='N' WHERE user=@u AND host=@h; -SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h; +SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h; # show that GRANT ... TO CURRENT_USER() no longer crashes GRANT INSERT ON *.* TO CURRENT_USER(); -SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h; +SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h; UPDATE user SET insert_priv='N' WHERE user=@u AND host=@h; # show that GRANT ... TO CURRENT_USER() IDENTIFIED BY ... works now GRANT INSERT ON *.* TO CURRENT_USER() IDENTIFIED BY 'keksdose'; -SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h; +SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h; -UPDATE user SET password=@pwd WHERE user=@u AND host=@h; -SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h; +UPDATE user SET plugin='', authentication_string='' WHERE user=@u AND host=@h; +SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h; FLUSH PRIVILEGES; diff --git a/mysql-test/main/grant4.result b/mysql-test/main/grant4.result index c3db2e03e3e..735b8260fce 100644 --- a/mysql-test/main/grant4.result +++ b/mysql-test/main/grant4.result @@ -199,14 +199,14 @@ grant select on test.* to foo7 identified via mysql_native_password using '11111 grant select on test.* to foo8 identified via mysql_old_password using '2222222222222222'; select user,password,plugin,authentication_string from mysql.user where user like 'foo%'; user password plugin authentication_string -foo1 11111111111111111111111111111111111111111 -foo2 2222222222222222 -foo3 11111111111111111111111111111111111111111 -foo4 2222222222222222 -foo5 11111111111111111111111111111111111111111 -foo6 2222222222222222 -foo7 11111111111111111111111111111111111111111 -foo8 2222222222222222 +foo1 mysql_native_password 11111111111111111111111111111111111111111 +foo2 mysql_old_password 2222222222222222 +foo3 mysql_native_password 11111111111111111111111111111111111111111 +foo4 mysql_old_password 2222222222222222 +foo5 mysql_native_password 11111111111111111111111111111111111111111 +foo6 mysql_old_password 2222222222222222 +foo7 mysql_native_password 11111111111111111111111111111111111111111 +foo8 mysql_old_password 2222222222222222 drop user foo1; drop user foo2; drop user foo3; diff --git a/mysql-test/main/grant5.result b/mysql-test/main/grant5.result index 24abc61a348..af7b75277b8 100644 --- a/mysql-test/main/grant5.result +++ b/mysql-test/main/grant5.result @@ -18,3 +18,84 @@ ERROR 42000: Access denied for user 'test'@'%' to database 'mysql' connection default; drop user test, foo; drop role foo; +create user u1@h identified with 'mysql_native_password' using 'pwd'; +ERROR HY000: Password hash should be a 41-digit hexadecimal number +create user u1@h identified with 'mysql_native_password' using password('pwd'); +create user u2@h identified with 'mysql_native_password' using '*975B2CD4FF9AE554FE8AD33168FBFC326D2021DD'; +create user u3@h identified with 'mysql_native_password'; +set password for u3@h = 'pwd'; +ERROR HY000: Password hash should be a 41-digit hexadecimal number +set password for u3@h = password('pwd'); +create user u4@h identified with 'mysql_native_password'; +set password for u4@h = '*975B2CD4FF9AE554FE8AD33168FBFC326D2021DD'; +create user u5@h identified with 'mysql_old_password' using 'pwd'; +ERROR HY000: Password hash should be a 16-digit hexadecimal number +create user u5@h identified with 'mysql_old_password' using password('pwd'); +create user u6@h identified with 'mysql_old_password' using '78a302dd267f6044'; +create user u7@h identified with 'mysql_old_password'; +set password for u7@h = 'pwd'; +ERROR HY000: Password hash should be a 41-digit hexadecimal number +set password for u7@h = old_password('pwd'); +create user u8@h identified with 'mysql_old_password'; +set password for u8@h = '78a302dd267f6044'; +select user,host,password,plugin,authentication_string from mysql.user where host='h'; +user host password plugin authentication_string +u1 h mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD +u2 h mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD +u3 h mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD +u4 h mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD +u5 h mysql_old_password 78a302dd267f6044 +u6 h mysql_old_password 78a302dd267f6044 +u7 h mysql_old_password 78a302dd267f6044 +u8 h mysql_old_password 78a302dd267f6044 +update mysql.user set authentication_string='bad' where user='u1'; +update mysql.user set authentication_string='bad' where user='u5'; +update mysql.user set plugin='nonexistent' where user='u8'; +flush privileges; +Warnings: +Error 1372 Password hash should be a 41-digit hexadecimal number +Error 1372 Password hash should be a 16-digit hexadecimal number +Warning 1524 Plugin 'nonexistent' is not loaded +show create user u1@h; +ERROR 28000: Can't find any matching row in the user table +show create user u2@h; +CREATE USER for u2@h +CREATE USER 'u2'@'h' IDENTIFIED BY PASSWORD '*975B2CD4FF9AE554FE8AD33168FBFC326D2021DD' +show create user u3@h; +CREATE USER for u3@h +CREATE USER 'u3'@'h' IDENTIFIED BY PASSWORD '*975B2CD4FF9AE554FE8AD33168FBFC326D2021DD' +show create user u4@h; +CREATE USER for u4@h +CREATE USER 'u4'@'h' IDENTIFIED BY PASSWORD '*975B2CD4FF9AE554FE8AD33168FBFC326D2021DD' +show create user u5@h; +ERROR 28000: Can't find any matching row in the user table +show create user u6@h; +CREATE USER for u6@h +CREATE USER 'u6'@'h' IDENTIFIED BY PASSWORD '78a302dd267f6044' +show create user u7@h; +CREATE USER for u7@h +CREATE USER 'u7'@'h' IDENTIFIED BY PASSWORD '78a302dd267f6044' +show create user u8@h; +ERROR 28000: Can't find any matching row in the user table +grant select on *.* to u1@h; +ERROR 28000: Can't find any matching row in the user table +grant select on *.* to u2@h; +grant select on *.* to u3@h; +grant select on *.* to u4@h; +grant select on *.* to u5@h; +ERROR 28000: Can't find any matching row in the user table +grant select on *.* to u6@h; +grant select on *.* to u7@h; +grant select on *.* to u8@h; +ERROR 28000: Can't find any matching row in the user table +select user,select_priv,plugin,authentication_string from mysql.user where user like 'u_'; +user select_priv plugin authentication_string +u1 N mysql_native_password bad +u2 Y mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD +u3 Y mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD +u4 Y mysql_native_password *975B2CD4FF9AE554FE8AD33168FBFC326D2021DD +u5 N mysql_old_password bad +u6 Y mysql_old_password 78a302dd267f6044 +u7 Y mysql_old_password 78a302dd267f6044 +u8 N nonexistent 78a302dd267f6044 +drop user u1@h, u2@h, u3@h, u4@h, u5@h, u6@h, u7@h, u8@h; diff --git a/mysql-test/main/grant5.test b/mysql-test/main/grant5.test index 14f2fd65020..1ab68b82066 100644 --- a/mysql-test/main/grant5.test +++ b/mysql-test/main/grant5.test @@ -23,3 +23,63 @@ show grants for foo@'%'; # user drop user test, foo; drop role foo; +# +# MDEV-12321 authentication plugin: SET PASSWORD support +# +error ER_PASSWD_LENGTH; +create user u1@h identified with 'mysql_native_password' using 'pwd'; +create user u1@h identified with 'mysql_native_password' using password('pwd'); +let p=`select password('pwd')`; +eval create user u2@h identified with 'mysql_native_password' using '$p'; +create user u3@h identified with 'mysql_native_password'; +error ER_PASSWD_LENGTH; +set password for u3@h = 'pwd'; +set password for u3@h = password('pwd'); +create user u4@h identified with 'mysql_native_password'; +eval set password for u4@h = '$p'; +error ER_PASSWD_LENGTH; +create user u5@h identified with 'mysql_old_password' using 'pwd'; +create user u5@h identified with 'mysql_old_password' using password('pwd'); +let p=`select old_password('pwd')`; +eval create user u6@h identified with 'mysql_old_password' using '$p'; +create user u7@h identified with 'mysql_old_password'; +error ER_PASSWD_LENGTH; +set password for u7@h = 'pwd'; +set password for u7@h = old_password('pwd'); +create user u8@h identified with 'mysql_old_password'; +eval set password for u8@h = '$p'; +sorted_result; +select user,host,password,plugin,authentication_string from mysql.user where host='h'; +# test with invalid entries +update mysql.user set authentication_string='bad' where user='u1'; +update mysql.user set authentication_string='bad' where user='u5'; +update mysql.user set plugin='nonexistent' where user='u8'; +flush privileges; +# invalid entries are skipped, users don't exist +error ER_PASSWORD_NO_MATCH; +show create user u1@h; +show create user u2@h; +show create user u3@h; +show create user u4@h; +error ER_PASSWORD_NO_MATCH; +show create user u5@h; +show create user u6@h; +show create user u7@h; +error ER_PASSWORD_NO_MATCH; +show create user u8@h; +#grants don't work either +error ER_PASSWORD_NO_MATCH; +grant select on *.* to u1@h; +grant select on *.* to u2@h; +grant select on *.* to u3@h; +grant select on *.* to u4@h; +error ER_PASSWORD_NO_MATCH; +grant select on *.* to u5@h; +grant select on *.* to u6@h; +grant select on *.* to u7@h; +error ER_PASSWORD_NO_MATCH; +grant select on *.* to u8@h; +select user,select_priv,plugin,authentication_string from mysql.user where user like 'u_'; + +# but they still can be dropped +drop user u1@h, u2@h, u3@h, u4@h, u5@h, u6@h, u7@h, u8@h; diff --git a/mysql-test/main/grant_lowercase.result b/mysql-test/main/grant_lowercase.result index d4a1667595e..a87f74721bc 100644 --- a/mysql-test/main/grant_lowercase.result +++ b/mysql-test/main/grant_lowercase.result @@ -9,17 +9,11 @@ connection default; disconnect conn1; drop user user1@localhost; call mtr.add_suppression("Incorrect database name"); -alter table mysql.host modify Db varchar(200); alter table mysql.db modify User char(16) default "", modify Db varchar(200) default ""; -insert mysql.host set db=concat('=>', repeat(_utf8 'й', 200)); -Warnings: -Warning 1265 Data truncated for column 'Db' at row 1 insert mysql.db set db=concat('=>', repeat(_utf8 'й', 200)); Warnings: Warning 1265 Data truncated for column 'Db' at row 1 flush privileges; -delete from mysql.host where db like '=>%'; delete from mysql.db where db like '=>%'; -alter table mysql.host modify Db char(64) default ""; alter table mysql.db modify Db char(64) default "", modify User char(80) default ""; flush privileges; diff --git a/mysql-test/main/grant_lowercase.test b/mysql-test/main/grant_lowercase.test index e31a72b890e..ffd1d4682a0 100644 --- a/mysql-test/main/grant_lowercase.test +++ b/mysql-test/main/grant_lowercase.test @@ -18,13 +18,9 @@ drop user user1@localhost; # in acl_load() call mtr.add_suppression("Incorrect database name"); -alter table mysql.host modify Db varchar(200); alter table mysql.db modify User char(16) default "", modify Db varchar(200) default ""; -insert mysql.host set db=concat('=>', repeat(_utf8 'й', 200)); insert mysql.db set db=concat('=>', repeat(_utf8 'й', 200)); flush privileges; # shouldn't crash here -delete from mysql.host where db like '=>%'; delete from mysql.db where db like '=>%'; -alter table mysql.host modify Db char(64) default ""; alter table mysql.db modify Db char(64) default "", modify User char(80) default ""; flush privileges; diff --git a/mysql-test/main/group_min_max.result b/mysql-test/main/group_min_max.result index 36a44b05817..cfdf9ef9865 100644 --- a/mysql-test/main/group_min_max.result +++ b/mysql-test/main/group_min_max.result @@ -3733,6 +3733,34 @@ id MIN(a) MAX(a) 4 2001-01-04 2001-01-04 DROP TABLE t1; # +# MDEV-17039: Query plan changes when we use GROUP BY optimization with optimizer_use_condition_selectivity=4 +# and use_stat_tables= PREFERABLY +# +CREATE TABLE t1 (a INT, b INT,c INT DEFAULT 0, INDEX (a,b)); +INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3), (1,4), (1,5), +(2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6); +set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity; +set @save_use_stat_tables= @@use_stat_tables; +set @@optimizer_use_condition_selectivity=4; +set @@use_stat_tables=PREFERABLY; +explain extended SELECT a FROM t1 AS t1_outer WHERE a IN (SELECT max(b) FROM t1 GROUP BY a); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 8 100.00 +1 PRIMARY t1_outer ref a a 5 <subquery2>.max(b) 2 100.00 Using index +2 MATERIALIZED t1 range NULL a 5 NULL 8 100.00 Using index for group-by +Warnings: +Note 1003 /* select#1 */ select `test`.`t1_outer`.`a` AS `a` from <materialize> (/* select#2 */ select max(`test`.`t1`.`b`) from `test`.`t1` group by `test`.`t1`.`a`) join `test`.`t1` `t1_outer` where `test`.`t1_outer`.`a` = `<subquery2>`.`max(b)` +set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +set @@use_stat_tables=@save_use_stat_tables; +explain extended SELECT a FROM t1 AS t1_outer WHERE a IN (SELECT max(b) FROM t1 GROUP BY a); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 8 100.00 +1 PRIMARY t1_outer ref a a 5 <subquery2>.max(b) 2 100.00 Using index +2 MATERIALIZED t1 range NULL a 5 NULL 8 100.00 Using index for group-by +Warnings: +Note 1003 /* select#1 */ select `test`.`t1_outer`.`a` AS `a` from <materialize> (/* select#2 */ select max(`test`.`t1`.`b`) from `test`.`t1` group by `test`.`t1`.`a`) join `test`.`t1` `t1_outer` where `test`.`t1_outer`.`a` = `<subquery2>`.`max(b)` +drop table t1; +# # End of 10.0 tests # # @@ -3893,5 +3921,22 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index a a 13 NULL 2 Using where; Using index drop table t1; # +# MDEV-15433: Optimizer does not use group by optimization with distinct +# +CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, a INT NOT NULL, KEY(a)); +OPTIMIZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 optimize status OK +EXPLAIN SELECT DISTINCT a FROM t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL a 4 NULL 5 Using index for group-by +SELECT DISTINCT a FROM t1; +a +1 +2 +3 +4 +drop table t1; +# # End of 10.1 tests # diff --git a/mysql-test/main/group_min_max.test b/mysql-test/main/group_min_max.test index b0bc42d7f8c..e8245dd2898 100644 --- a/mysql-test/main/group_min_max.test +++ b/mysql-test/main/group_min_max.test @@ -1519,6 +1519,23 @@ ALTER TABLE t1 ADD KEY(id,a); SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>=DATE'2001-01-04' GROUP BY id; DROP TABLE t1; +--echo # +--echo # MDEV-17039: Query plan changes when we use GROUP BY optimization with optimizer_use_condition_selectivity=4 +--echo # and use_stat_tables= PREFERABLY +--echo # + +CREATE TABLE t1 (a INT, b INT,c INT DEFAULT 0, INDEX (a,b)); +INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3), (1,4), (1,5), +(2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6); +set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity; +set @save_use_stat_tables= @@use_stat_tables; +set @@optimizer_use_condition_selectivity=4; +set @@use_stat_tables=PREFERABLY; +explain extended SELECT a FROM t1 AS t1_outer WHERE a IN (SELECT max(b) FROM t1 GROUP BY a); +set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +set @@use_stat_tables=@save_use_stat_tables; +explain extended SELECT a FROM t1 AS t1_outer WHERE a IN (SELECT max(b) FROM t1 GROUP BY a); +drop table t1; --echo # --echo # End of 10.0 tests @@ -1609,5 +1626,32 @@ explain select min(a) from t1 where a between "abbbbbbbbbbbbbbbbbbbb" and "Cafe2 drop table t1; --echo # +--echo # MDEV-15433: Optimizer does not use group by optimization with distinct +--echo # + +CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, a INT NOT NULL, KEY(a)); +--disable_query_log +INSERT INTO t1(a) VALUES (1), (2), (3), (4); +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +INSERT INTO t1(a) SELECT a FROM t1; +--enable_query_log +OPTIMIZE TABLE t1; +EXPLAIN SELECT DISTINCT a FROM t1; +SELECT DISTINCT a FROM t1; +drop table t1; + +--echo # --echo # End of 10.1 tests --echo # diff --git a/mysql-test/main/help.result b/mysql-test/main/help.result index 66850e75dc1..130aacf6644 100644 --- a/mysql-test/main/help.result +++ b/mysql-test/main/help.result @@ -255,10 +255,10 @@ help 'impossible_category_1'; source_category_name name is_it_category impossible_category_1 impossible_function_1 N impossible_category_1 impossible_function_2 N -alter table mysql.help_relation engine=myisam; -alter table mysql.help_keyword engine=myisam; -alter table mysql.help_topic engine=myisam; -alter table mysql.help_category engine=myisam; +alter table mysql.help_relation engine=aria; +alter table mysql.help_keyword engine=aria; +alter table mysql.help_topic engine=aria; +alter table mysql.help_category engine=aria; delete from mysql.help_topic where help_topic_id=@topic1_id; delete from mysql.help_topic where help_topic_id=@topic2_id; delete from mysql.help_topic where help_topic_id=@topic3_id; diff --git a/mysql-test/main/help.test b/mysql-test/main/help.test index 802f24f80a9..725eec2771f 100644 --- a/mysql-test/main/help.test +++ b/mysql-test/main/help.test @@ -98,10 +98,10 @@ help 'impossible_function_1'; help 'impossible_category_1'; ############## -alter table mysql.help_relation engine=myisam; -alter table mysql.help_keyword engine=myisam; -alter table mysql.help_topic engine=myisam; -alter table mysql.help_category engine=myisam; +alter table mysql.help_relation engine=aria; +alter table mysql.help_keyword engine=aria; +alter table mysql.help_topic engine=aria; +alter table mysql.help_category engine=aria; delete from mysql.help_topic where help_topic_id=@topic1_id; delete from mysql.help_topic where help_topic_id=@topic2_id; diff --git a/mysql-test/main/in_subq_cond_pushdown.result b/mysql-test/main/in_subq_cond_pushdown.result index c9319a5fb86..06248895bd3 100644 --- a/mysql-test/main/in_subq_cond_pushdown.result +++ b/mysql-test/main/in_subq_cond_pushdown.result @@ -3855,3 +3855,35 @@ ORDER BY t4.d a b c x x NULL DROP TABLE t1,t2,t3,t4; +# +# MDEV-17360: IN subquery predicate with outer reference in the left part +# that refers to a field of a mergeable derived table +# +CREATE TABLE t1 (id1 int) ENGINE=MYISAM; +INSERT INTO t1 VALUES (1814),(0),(NULL),(1); +CREATE TABLE t2 (id2 int) ENGINE=MYISAM; +SELECT 1 AS r FROM t2,t1,(SELECT * FROM t1) dt1 +WHERE NOT EXISTS (SELECT id2 FROM t2 +WHERE dt1.id1 IN (SELECT t2.id2 FROM t2 +HAVING t2.id2 >= 1)); +r +DROP TABLE t1,t2; +# +# MDEV-17027: IN subquery predicate with outer reference in the left part +# conjuncted with equality predicate +# +CREATE TABLE t1 (pk int, i1 int, v1 varchar(1)); +INSERT INTO t1 VALUES (3,2,'x'), (1,1,'y'), (4,2,'z'); +CREATE TABLE t2 (pk int, i1 int, v1 varchar(1)); +INSERT INTO t2 VALUES (5,2,'x'), (7,1,'x'); +CREATE TABLE t3 (pk int, i1 int, v1 varchar(1)); +INSERT INTO t3 VALUES (8,2,'x'), (7,1,'z'); +SELECT t3.i1 FROM t3 +WHERE EXISTS ( SELECT t2.v1 FROM t1,t2 +WHERE t1.v1 = t2.v1 AND +t3.i1 IN (SELECT t.i1 FROM t1 as t +GROUP BY i1 HAVING t.i1 < 3)); +i1 +2 +1 +DROP TABLE t1,t2,t3; diff --git a/mysql-test/main/in_subq_cond_pushdown.test b/mysql-test/main/in_subq_cond_pushdown.test index 3c673fb128b..2482fd91103 100644 --- a/mysql-test/main/in_subq_cond_pushdown.test +++ b/mysql-test/main/in_subq_cond_pushdown.test @@ -821,3 +821,42 @@ WHERE (t1.a) IN ); DROP TABLE t1,t2,t3,t4; + +--echo # +--echo # MDEV-17360: IN subquery predicate with outer reference in the left part +--echo # that refers to a field of a mergeable derived table +--echo # + +CREATE TABLE t1 (id1 int) ENGINE=MYISAM; +INSERT INTO t1 VALUES (1814),(0),(NULL),(1); + +CREATE TABLE t2 (id2 int) ENGINE=MYISAM; + +SELECT 1 AS r FROM t2,t1,(SELECT * FROM t1) dt1 + WHERE NOT EXISTS (SELECT id2 FROM t2 + WHERE dt1.id1 IN (SELECT t2.id2 FROM t2 + HAVING t2.id2 >= 1)); + +DROP TABLE t1,t2; + +--echo # +--echo # MDEV-17027: IN subquery predicate with outer reference in the left part +--echo # conjuncted with equality predicate +--echo # + +CREATE TABLE t1 (pk int, i1 int, v1 varchar(1)); +INSERT INTO t1 VALUES (3,2,'x'), (1,1,'y'), (4,2,'z'); + +CREATE TABLE t2 (pk int, i1 int, v1 varchar(1)); +INSERT INTO t2 VALUES (5,2,'x'), (7,1,'x'); + +CREATE TABLE t3 (pk int, i1 int, v1 varchar(1)); +INSERT INTO t3 VALUES (8,2,'x'), (7,1,'z'); + +SELECT t3.i1 FROM t3 + WHERE EXISTS ( SELECT t2.v1 FROM t1,t2 + WHERE t1.v1 = t2.v1 AND + t3.i1 IN (SELECT t.i1 FROM t1 as t + GROUP BY i1 HAVING t.i1 < 3)); + +DROP TABLE t1,t2,t3; diff --git a/mysql-test/main/index_merge_myisam.result b/mysql-test/main/index_merge_myisam.result index 992e1d831b5..725a888c914 100644 --- a/mysql-test/main/index_merge_myisam.result +++ b/mysql-test/main/index_merge_myisam.result @@ -1715,3 +1715,53 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL PRIMARY,c1,i,c2 NULL NULL NULL 69 Using where DROP TABLE t1; set optimizer_switch= @optimizer_switch_save; +# +# MDEV-16695: Estimate for rows of derived tables is very high when we are using index_merge union +# +create table t0 +( +key1 int not null, +INDEX i1(key1) +); +insert into t0 values (1),(2),(3),(4),(5),(6),(7),(8); +set @d=8; +insert into t0 select key1+ @d from t0; +set @d=@d*2; +insert into t0 select key1+ @d from t0; +set @d=@d*2; +insert into t0 select key1+ @d from t0; +set @d=@d*2; +insert into t0 select key1+ @d from t0; +set @d=@d*2; +insert into t0 select key1+ @d from t0; +set @d=@d*2; +insert into t0 select key1+ @d from t0; +set @d=@d*2; +insert into t0 select key1+ @d from t0; +set @d=@d*2; +alter table t0 add key2 int not null, add index i2(key2); +alter table t0 add key3 int not null, add index i3(key3); +alter table t0 add key8 int not null, add index i8(key8); +update t0 set key2=key1,key3=key1,key8=1024-key1; +analyze table t0; +Table Op Msg_type Msg_text +test.t0 analyze status OK +set @optimizer_switch_save=@@optimizer_switch; +set optimizer_switch='derived_merge=off,derived_with_keys=off'; +explain select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 Using where +2 DERIVED t0 index_merge i1,i2,i8 i1,i2 4,4 NULL 2 Using union(i1,i2); Using where +select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; +key1 key2 key3 key8 +3 3 3 1021 +set optimizer_use_condition_selectivity=2; +explain select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 Using where +2 DERIVED t0 index_merge i1,i2,i8 i1,i2 4,4 NULL 2 Using union(i1,i2); Using where +select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; +key1 key2 key3 key8 +3 3 3 1021 +set @@optimizer_switch= @optimizer_switch_save; +drop table t0; diff --git a/mysql-test/main/index_merge_myisam.test b/mysql-test/main/index_merge_myisam.test index d265007431e..75beb9bd883 100644 --- a/mysql-test/main/index_merge_myisam.test +++ b/mysql-test/main/index_merge_myisam.test @@ -243,3 +243,38 @@ DROP TABLE t1; set optimizer_switch= @optimizer_switch_save; +--echo # +--echo # MDEV-16695: Estimate for rows of derived tables is very high when we are using index_merge union +--echo # + +create table t0 +( + key1 int not null, + INDEX i1(key1) +); + +insert into t0 values (1),(2),(3),(4),(5),(6),(7),(8); +let $1=7; +set @d=8; +while ($1) +{ + eval insert into t0 select key1+ @d from t0; + eval set @d=@d*2; + dec $1; +} +alter table t0 add key2 int not null, add index i2(key2); +alter table t0 add key3 int not null, add index i3(key3); +alter table t0 add key8 int not null, add index i8(key8); + +update t0 set key2=key1,key3=key1,key8=1024-key1; +analyze table t0; + +set @optimizer_switch_save=@@optimizer_switch; +set optimizer_switch='derived_merge=off,derived_with_keys=off'; +explain select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; +select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; +set optimizer_use_condition_selectivity=2; +explain select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; +select * from (select * from t0 where key1 = 3 or key2 =3) as Z where Z.key8 > 5; +set @@optimizer_switch= @optimizer_switch_save; +drop table t0; diff --git a/mysql-test/main/information_schema-big.result b/mysql-test/main/information_schema-big.result index cbd8191bc54..d4aa6deb2e2 100644 --- a/mysql-test/main/information_schema-big.result +++ b/mysql-test/main/information_schema-big.result @@ -20,6 +20,7 @@ table_name column_name ALL_PLUGINS PLUGIN_NAME APPLICABLE_ROLES GRANTEE CHARACTER_SETS CHARACTER_SET_NAME +CHECK_CONSTRAINTS CONSTRAINT_SCHEMA CLIENT_STATISTICS CLIENT COLLATIONS COLLATION_NAME COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME @@ -77,6 +78,7 @@ table_name column_name ALL_PLUGINS PLUGIN_NAME APPLICABLE_ROLES GRANTEE CHARACTER_SETS CHARACTER_SET_NAME +CHECK_CONSTRAINTS CONSTRAINT_SCHEMA CLIENT_STATISTICS CLIENT COLLATIONS COLLATION_NAME COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME diff --git a/mysql-test/main/information_schema.result b/mysql-test/main/information_schema.result index 0e6b4168ea5..b6e331a0382 100644 --- a/mysql-test/main/information_schema.result +++ b/mysql-test/main/information_schema.result @@ -51,6 +51,7 @@ c ALL_PLUGINS APPLICABLE_ROLES CHARACTER_SETS +CHECK_CONSTRAINTS CLIENT_STATISTICS COLLATIONS COLLATION_CHARACTER_SET_APPLICABILITY @@ -100,7 +101,6 @@ help_category help_keyword help_relation help_topic -host index_stats plugin proc @@ -938,6 +938,7 @@ connection user10261; SELECT TABLE_NAME, COLUMN_NAME, PRIVILEGES FROM INFORMATION_SCHEMA.COLUMNS where COLUMN_NAME='TABLE_NAME' and table_name not like 'innodb%'; TABLE_NAME COLUMN_NAME PRIVILEGES +CHECK_CONSTRAINTS TABLE_NAME select COLUMNS TABLE_NAME select COLUMN_PRIVILEGES TABLE_NAME select FILES TABLE_NAME select diff --git a/mysql-test/main/information_schema_all_engines.result b/mysql-test/main/information_schema_all_engines.result index 8a92f0226ff..0ce9f15f753 100644 --- a/mysql-test/main/information_schema_all_engines.result +++ b/mysql-test/main/information_schema_all_engines.result @@ -4,6 +4,7 @@ Tables_in_information_schema ALL_PLUGINS APPLICABLE_ROLES CHARACTER_SETS +CHECK_CONSTRAINTS CLIENT_STATISTICS COLLATIONS COLLATION_CHARACTER_SET_APPLICABILITY @@ -83,6 +84,7 @@ table_name column_name ALL_PLUGINS PLUGIN_NAME APPLICABLE_ROLES GRANTEE CHARACTER_SETS CHARACTER_SET_NAME +CHECK_CONSTRAINTS CONSTRAINT_SCHEMA CLIENT_STATISTICS CLIENT COLLATIONS COLLATION_NAME COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME @@ -162,6 +164,7 @@ table_name column_name ALL_PLUGINS PLUGIN_NAME APPLICABLE_ROLES GRANTEE CHARACTER_SETS CHARACTER_SET_NAME +CHECK_CONSTRAINTS CONSTRAINT_SCHEMA CLIENT_STATISTICS CLIENT COLLATIONS COLLATION_NAME COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME @@ -247,6 +250,7 @@ table_name group_concat(t.table_schema, '.', t.table_name) num1 ALL_PLUGINS information_schema.ALL_PLUGINS 1 APPLICABLE_ROLES information_schema.APPLICABLE_ROLES 1 CHARACTER_SETS information_schema.CHARACTER_SETS 1 +CHECK_CONSTRAINTS information_schema.CHECK_CONSTRAINTS 1 CLIENT_STATISTICS information_schema.CLIENT_STATISTICS 1 COLLATIONS information_schema.COLLATIONS 1 COLLATION_CHARACTER_SET_APPLICABILITY information_schema.COLLATION_CHARACTER_SET_APPLICABILITY 1 @@ -315,6 +319,7 @@ Database: information_schema | ALL_PLUGINS | | APPLICABLE_ROLES | | CHARACTER_SETS | +| CHECK_CONSTRAINTS | | CLIENT_STATISTICS | | COLLATIONS | | COLLATION_CHARACTER_SET_APPLICABILITY | @@ -384,6 +389,7 @@ Database: INFORMATION_SCHEMA | ALL_PLUGINS | | APPLICABLE_ROLES | | CHARACTER_SETS | +| CHECK_CONSTRAINTS | | CLIENT_STATISTICS | | COLLATIONS | | COLLATION_CHARACTER_SET_APPLICABILITY | @@ -453,5 +459,5 @@ Wildcard: inf_rmation_schema | information_schema | SELECT table_schema, count(*) FROM information_schema.TABLES WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') GROUP BY TABLE_SCHEMA; table_schema count(*) -information_schema 64 -mysql 31 +information_schema 65 +mysql 30 diff --git a/mysql-test/main/init_file_set_password-7656.result b/mysql-test/main/init_file_set_password-7656.result index e5b3fc75706..99a16a395d7 100644 --- a/mysql-test/main/init_file_set_password-7656.result +++ b/mysql-test/main/init_file_set_password-7656.result @@ -2,7 +2,7 @@ create user foo@localhost; select user,host,password from mysql.user where user='foo'; user host password foo localhost -select user,host,password from mysql.user where user='foo'; -user host password -foo localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 +select user,host,password,plugin,authentication_string from mysql.user where user='foo'; +user host password plugin authentication_string +foo localhost mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 drop user foo@localhost; diff --git a/mysql-test/main/init_file_set_password-7656.test b/mysql-test/main/init_file_set_password-7656.test index ecee3924355..c695d01b675 100644 --- a/mysql-test/main/init_file_set_password-7656.test +++ b/mysql-test/main/init_file_set_password-7656.test @@ -21,6 +21,6 @@ EOF --exec echo "restart:--init-file=$MYSQLTEST_VARDIR/init.file " > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --source include/wait_until_connected_again.inc -select user,host,password from mysql.user where user='foo'; +select user,host,password,plugin,authentication_string from mysql.user where user='foo'; drop user foo@localhost; diff --git a/mysql-test/main/innodb_mrr_cpk.result b/mysql-test/main/innodb_mrr_cpk.result index 28d7dd51df8..a2e43d7d127 100644 --- a/mysql-test/main/innodb_mrr_cpk.result +++ b/mysql-test/main/innodb_mrr_cpk.result @@ -226,7 +226,7 @@ set join_cache_level=3; explain SELECT 1 FROM (SELECT url, id FROM t2 LIMIT 1 OFFSET 20) derived RIGHT JOIN t1 ON t1.id = derived.id; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL # -1 PRIMARY <derived2> hash_ALL key0 #hash#key0 25 test.t1.id # Using join buffer (flat, BNLH join) +1 PRIMARY <derived2> ref key0 key0 25 test.t1.id # 2 DERIVED t2 ALL NULL NULL NULL NULL # set join_cache_level= @tmp_mdev5037; drop table t0,t1,t2; diff --git a/mysql-test/main/invisible_field_debug.result b/mysql-test/main/invisible_field_debug.result index 4c4ebffbdfc..b3c84d18333 100644 --- a/mysql-test/main/invisible_field_debug.result +++ b/mysql-test/main/invisible_field_debug.result @@ -369,3 +369,8 @@ t1 1 invisible 1 c A NULL NULL NULL YES BTREE t1 1 invisible_2 1 invisible A NULL NULL NULL YES BTREE drop table t1; set @old_debug= @@debug_dbug; +CREATE TABLE t1 (i INT ); +SET debug_dbug="+d,test_completely_invisible,test_invisible_index"; +CREATE TABLE t2 LIKE t1; +SET debug_dbug= DEFAULT; +DROP TABLE t1, t2; diff --git a/mysql-test/main/invisible_field_debug.test b/mysql-test/main/invisible_field_debug.test index 8674620e055..c1d6899d16e 100644 --- a/mysql-test/main/invisible_field_debug.test +++ b/mysql-test/main/invisible_field_debug.test @@ -270,3 +270,9 @@ explain select * from t1 where invisible =9; show indexes in t1; drop table t1; set @old_debug= @@debug_dbug; +## MDEV 15127 +CREATE TABLE t1 (i INT ); +SET debug_dbug="+d,test_completely_invisible,test_invisible_index"; +CREATE TABLE t2 LIKE t1; +SET debug_dbug= DEFAULT; +DROP TABLE t1, t2; diff --git a/mysql-test/main/join.result b/mysql-test/main/join.result index 5978b261b3a..6ff294906e7 100644 --- a/mysql-test/main/join.result +++ b/mysql-test/main/join.result @@ -1506,6 +1506,48 @@ DROP VIEW v2; DROP TABLE t1,t2; SET optimizer_switch=@save_optimizer_switch; # +# MDEV-16512 +# Server crashes in find_field_in_table_ref on 2nd execution of SP referring to +# non-existing field +# +CREATE TABLE t (i INT); +CREATE PROCEDURE p() SELECT t1.f FROM t AS t1 JOIN t AS t2 USING (f); +CALL p; +ERROR 42S22: Unknown column 'f' in 'from clause' +CALL p; +ERROR 42S22: Unknown column 'f' in 'from clause' +FLUSH TABLES; +CALL p; +ERROR 42S22: Unknown column 'f' in 'from clause' +DROP TABLE t; +CREATE TABLE t (f INT); +CALL p; +f +DROP TABLE t; +CREATE TABLE t (i INT); +CALL p; +ERROR 42S22: Unknown column 't1.f' in 'field list' +CALL p; +ERROR 42S22: Unknown column 't1.f' in 'field list' +DROP PROCEDURE p; +DROP TABLE t; +CREATE TABLE t1 (a INT, b INT); +CREATE TABLE t2 (a INT); +CREATE TABLE t3 (a INT, c INT); +CREATE TABLE t4 (a INT, c INT); +CREATE TABLE t5 (a INT, c INT); +CREATE PROCEDURE p1() SELECT c FROM t1 JOIN (t2 LEFT JOIN t3 USING (a) LEFT JOIN t4 USING (a) +LEFT JOIN t5 USING (a)) USING (a); +CALL p1; +ERROR 23000: Column 'c' in field list is ambiguous +CALL p1; +ERROR 23000: Column 'c' in field list is ambiguous +DROP PROCEDURE p1; +DROP TABLE t1,t2,t3,t4,t5; +# +# End of MariaDB 5.5 tests +# +# # Bug #35268: Parser can't handle STRAIGHT_JOIN with USING # CREATE TABLE t1 (a int); diff --git a/mysql-test/main/join.test b/mysql-test/main/join.test index e07a3665920..3d2a02e2346 100644 --- a/mysql-test/main/join.test +++ b/mysql-test/main/join.test @@ -1161,6 +1161,60 @@ DROP TABLE t1,t2; SET optimizer_switch=@save_optimizer_switch; --echo # +--echo # MDEV-16512 +--echo # Server crashes in find_field_in_table_ref on 2nd execution of SP referring to +--echo # non-existing field +--echo # + +CREATE TABLE t (i INT); +CREATE PROCEDURE p() SELECT t1.f FROM t AS t1 JOIN t AS t2 USING (f); +--error ER_BAD_FIELD_ERROR +CALL p; +--error ER_BAD_FIELD_ERROR +CALL p; +FLUSH TABLES; +--error ER_BAD_FIELD_ERROR +CALL p; +DROP TABLE t; + +# +# Fix the table definition to match the using +# + +CREATE TABLE t (f INT); +# +# The following shouldn't fail as the table is now matching the using +# +CALL p; +DROP TABLE t; +CREATE TABLE t (i INT); +--error ER_BAD_FIELD_ERROR +CALL p; +--error ER_BAD_FIELD_ERROR +CALL p; +DROP PROCEDURE p; +DROP TABLE t; + +CREATE TABLE t1 (a INT, b INT); +CREATE TABLE t2 (a INT); +CREATE TABLE t3 (a INT, c INT); +CREATE TABLE t4 (a INT, c INT); +CREATE TABLE t5 (a INT, c INT); +CREATE PROCEDURE p1() SELECT c FROM t1 JOIN (t2 LEFT JOIN t3 USING (a) LEFT JOIN t4 USING (a) +LEFT JOIN t5 USING (a)) USING (a); +--error ER_NON_UNIQ_ERROR +CALL p1; +--error ER_NON_UNIQ_ERROR +CALL p1; +DROP PROCEDURE p1; +DROP TABLE t1,t2,t3,t4,t5; + +--echo # +--echo # End of MariaDB 5.5 tests +--echo # + + +--echo # --echo # Bug #35268: Parser can't handle STRAIGHT_JOIN with USING --echo # diff --git a/mysql-test/main/join_cache.result b/mysql-test/main/join_cache.result index eea397402ad..fde6e0fec6b 100644 --- a/mysql-test/main/join_cache.result +++ b/mysql-test/main/join_cache.result @@ -5925,6 +5925,39 @@ SET join_buffer_space_limit= default; set optimizer_switch=@save_optimizer_switch; DROP TABLE t1,t4,t5,t2; # +# MDEV-16603: BNLH for query with materialized semi-join +# +set join_cache_level=4; +CREATE TABLE t1 ( i1 int, v1 varchar(1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (7,'x'); +CREATE TABLE t2 (i1 int, v1 varchar(1), KEY v1 (v1,i1)) ENGINE=InnoDB; +INSERT INTO t2 VALUES +(NULL,'x'),(1,'x'),(3,'x'),(5,'x'),(8,'x'),(48,'x'), +(228,'x'),(3,'y'),(1,'z'),(9,'z'); +CREATE TABLE temp +SELECT t1.i1 AS f1, t1.v1 AS f2 FROM (t2 JOIN t1 ON (t1.v1 = t2.v1)); +SELECT * FROM temp +WHERE (f1,f2) IN (SELECT t1.i1, t1.v1 FROM (t2 JOIN t1 ON (t1.v1 = t2.v1))); +f1 f2 +7 x +7 x +7 x +7 x +7 x +7 x +7 x +EXPLAIN EXTENDED SELECT * FROM temp +WHERE (f1,f2) IN (SELECT t1.i1, t1.v1 FROM (t2 JOIN t1 ON (t1.v1 = t2.v1))); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 1 100.00 +1 PRIMARY temp hash_ALL NULL #hash#$hj 9 test.t1.i1,test.t1.v1 7 100.00 Using where; Using join buffer (flat, BNLH join) +2 MATERIALIZED t1 ALL NULL NULL NULL NULL 1 100.00 Using where +2 MATERIALIZED t2 hash_index v1 #hash#v1:v1 4:9 test.t1.v1 10 10.00 Using index; Using join buffer (flat, BNLH join) +Warnings: +Note 1003 select `test`.`temp`.`f1` AS `f1`,`test`.`temp`.`f2` AS `f2` from `test`.`temp` semi join (`test`.`t2` join `test`.`t1`) where `test`.`temp`.`f1` = `test`.`t1`.`i1` and `test`.`t2`.`v1` = `test`.`t1`.`v1` and `test`.`temp`.`f2` = `test`.`t1`.`v1` +DROP TABLE t1,t2,temp; +SET join_cache_level = default; +# # MDEV-5123 Remove duplicated conditions pushed both to join_tab->select_cond and join_tab->cache_select->cond for blocked joins. # set join_cache_level=default; diff --git a/mysql-test/main/join_cache.test b/mysql-test/main/join_cache.test index b775725903c..df89fc30dee 100644 --- a/mysql-test/main/join_cache.test +++ b/mysql-test/main/join_cache.test @@ -3870,6 +3870,37 @@ set optimizer_switch=@save_optimizer_switch; DROP TABLE t1,t4,t5,t2; --echo # +--echo # MDEV-16603: BNLH for query with materialized semi-join +--echo # + +--source include/have_innodb.inc + +set join_cache_level=4; + +CREATE TABLE t1 ( i1 int, v1 varchar(1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (7,'x'); + +CREATE TABLE t2 (i1 int, v1 varchar(1), KEY v1 (v1,i1)) ENGINE=InnoDB; + +INSERT INTO t2 VALUES + (NULL,'x'),(1,'x'),(3,'x'),(5,'x'),(8,'x'),(48,'x'), + (228,'x'),(3,'y'),(1,'z'),(9,'z'); + +CREATE TABLE temp +SELECT t1.i1 AS f1, t1.v1 AS f2 FROM (t2 JOIN t1 ON (t1.v1 = t2.v1)); + +let $q = +SELECT * FROM temp +WHERE (f1,f2) IN (SELECT t1.i1, t1.v1 FROM (t2 JOIN t1 ON (t1.v1 = t2.v1))); + +eval $q; +eval EXPLAIN EXTENDED $q; + +DROP TABLE t1,t2,temp; + +SET join_cache_level = default; + +--echo # --echo # MDEV-5123 Remove duplicated conditions pushed both to join_tab->select_cond and join_tab->cache_select->cond for blocked joins. --echo # @@ -3958,5 +3989,4 @@ drop table t1, t2; set join_buffer_size = default; # The following command must be the last one the file -# this must be the last command in the file set @@optimizer_switch=@save_optimizer_switch; diff --git a/mysql-test/main/join_nested_jcl6.result b/mysql-test/main/join_nested_jcl6.result index de5ebfbe989..6b1901d8642 100644 --- a/mysql-test/main/join_nested_jcl6.result +++ b/mysql-test/main/join_nested_jcl6.result @@ -2055,7 +2055,7 @@ ON (t5.b=t8.b); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t5 ALL NULL NULL NULL NULL 2 1 SIMPLE t6 ALL NULL NULL NULL NULL 1 Using join buffer (flat, BNL join) -1 SIMPLE t7 ref b_i b_i 5 const 0 Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan +1 SIMPLE t7 ref b_i b_i 5 const 1 Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan 1 SIMPLE t8 ALL b_i NULL NULL NULL 1 Using where; Using join buffer (incremental, BNL join) SELECT t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b FROM t5 LEFT JOIN diff --git a/mysql-test/main/join_outer.result b/mysql-test/main/join_outer.result index 6753349dece..6b671a0759f 100644 --- a/mysql-test/main/join_outer.result +++ b/mysql-test/main/join_outer.result @@ -2460,5 +2460,123 @@ id sid id 1 NULL NULL 2 NULL NULL drop table t1, t2; +# +# MDEV-16726: SELECT with STRAGHT JOIN containing NESTED RIGHT JOIN +# converted to INNER JOIN with first constant inner table +# +CREATE TABLE t1 ( +pk int PRIMARY KEY, i1 int, v1 varchar(1), v2 varchar(1), KEY v1 (v1,i1) +) engine=MyISAM; +INSERT INTO t1 VALUES +(8,3,'c','c'),(9,4,'z','z'),(10,3,'i','i'),(11,186,'x','x'), +(14,226,'m','m'),(15,133,'p','p'); +CREATE TABLE t2 ( +pk int PRIMARY KEY, i1 int, v1 varchar(1), v2 varchar(1) +) engine=MyISAM; +INSERT INTO t2 VALUES (10,6,'p','p'); +EXPLAIN EXTENDED +SELECT STRAIGHT_JOIN t2.v2 +FROM +(t1 as tb1 LEFT JOIN t1 AS tb2 ON tb2.v1 = tb1.v2) +RIGHT JOIN +(t2,t1) +ON t1.pk = t2.pk AND t2.v2 = tb1.v1 +WHERE tb1.pk = 40 +ORDER BY tb1.i1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +Warnings: +Note 1003 select straight_join 'p' AS `v2` from `test`.`t1` join `test`.`t1` `tb1` left join `test`.`t1` `tb2` on(multiple equal(NULL, NULL)) where 0 order by NULL +EXPLAIN EXTENDED +SELECT STRAIGHT_JOIN t2.v2 +FROM +(t2,t1) +LEFT JOIN +(t1 as tb1 LEFT JOIN t1 AS tb2 ON tb2.v1 = tb1.v2) +ON t1.pk = t2.pk AND t2.v2 = tb1.v1 +WHERE tb1.pk = 40 +ORDER BY tb1.i1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +Warnings: +Note 1003 select straight_join 'p' AS `v2` from `test`.`t1` join `test`.`t1` `tb1` left join `test`.`t1` `tb2` on(multiple equal(NULL, NULL)) where 0 order by NULL +SELECT STRAIGHT_JOIN DISTINCT t2.v2 +FROM +(t1 as tb1 LEFT JOIN t1 AS tb2 ON tb2.v1 = tb1.v2) +RIGHT JOIN +(t2,t1) +ON t1.pk = t2.pk AND t2.v2 = tb1.v1 +WHERE tb1.pk = 40 +ORDER BY tb1.i1; +v2 +DROP TABLE t1,t2; # end of 5.5 tests +# +# MDEV-17518: Range optimization doesn't use ON expressions from nested outer joins +# +create table t1(a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t2(a int); +insert into t2 values (0),(1); +create table t3 (a int, b int, key(a)); +insert into t3 select A.a + B.a* 10 + C.a * 100, 12345 from t1 A, t1 B, t1 C; +# Uses range for table t3: +explain select * from t1 left join t3 on t1.a=t3.b and t3.a<5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 +1 SIMPLE t3 range a a 5 NULL 5 Using where +# This must use range for table t3, too: +explain select * from t1 left join (t3 join t2) on t1.a=t3.b and t3.a<5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 +1 SIMPLE t2 ALL NULL NULL NULL NULL 2 +1 SIMPLE t3 range a a 5 NULL 5 Using where +# +# .. part 2: make sure condition selectivity can use the condition too. +# +alter table t3 drop key a; +set @tmp1=@@optimizer_use_condition_selectivity; +set @tmp2=@@use_stat_tables; +set @tmp3=@@histogram_size; +set use_stat_tables=preferably; +set optimizer_use_condition_selectivity=4; +set histogram_size=100; +analyze table t3 persistent for all; +Table Op Msg_type Msg_text +test.t3 analyze status Engine-independent statistics collected +test.t3 analyze status OK +# t3.filtered is less than 100%: +explain extended select * from t1 left join t3 on t1.a=t3.b and t3.a<5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00 +1 SIMPLE t3 ALL NULL NULL NULL NULL 1000 0.99 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t1` left join `test`.`t3` on(`test`.`t3`.`b` = `test`.`t1`.`a` and `test`.`t3`.`a` < 5) where 1 +# t3.filtered must less than 100%, too: +explain extended select * from t1 left join (t3 join t2) on t1.a=t3.b and t3.a<5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00 +1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 +1 SIMPLE t3 ALL NULL NULL NULL NULL 1000 0.99 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t2`.`a` AS `a` from `test`.`t1` left join (`test`.`t3` join `test`.`t2`) on(`test`.`t3`.`b` = `test`.`t1`.`a` and `test`.`t3`.`a` < 5) where 1 +drop table t1,t2,t3; +set optimizer_use_condition_selectivity= @tmp1; +set use_stat_tables= @tmp2; +set histogram_size= @tmp3; +# Another test +CREATE TABLE t1 (i1 int) ; +CREATE TABLE t2 (pk int NOT NULL PRIMARY KEY) ; +CREATE TABLE t3 (pk int NOT NULL, i1 int, PRIMARY KEY (pk)) ; +INSERT INTO t3 VALUES (2, NULL); +CREATE TABLE t4 (pk int NOT NULL, i1 int, PRIMARY KEY (pk), KEY i1 (i1)) ; +CREATE VIEW v4 AS SELECT * FROM t4; +SELECT 1 +FROM t3 RIGHT JOIN t1 ON t3.i1 = t1.i1 +LEFT JOIN v4 +RIGHT JOIN t2 ON v4.i1 = t2.pk ON t1.i1 = t2.pk +WHERE t3.pk IN (2); +1 +drop view v4; +drop table t1,t2,t3,t4; SET optimizer_switch=@save_optimizer_switch; diff --git a/mysql-test/main/join_outer.test b/mysql-test/main/join_outer.test index 34b0551a32e..82127397bee 100644 --- a/mysql-test/main/join_outer.test +++ b/mysql-test/main/join_outer.test @@ -1992,6 +1992,114 @@ select * from t1 t on t.id=r.id ; drop table t1, t2; +--echo # +--echo # MDEV-16726: SELECT with STRAGHT JOIN containing NESTED RIGHT JOIN +--echo # converted to INNER JOIN with first constant inner table +--echo # + +CREATE TABLE t1 ( + pk int PRIMARY KEY, i1 int, v1 varchar(1), v2 varchar(1), KEY v1 (v1,i1) +) engine=MyISAM; +INSERT INTO t1 VALUES + (8,3,'c','c'),(9,4,'z','z'),(10,3,'i','i'),(11,186,'x','x'), + (14,226,'m','m'),(15,133,'p','p'); + +CREATE TABLE t2 ( + pk int PRIMARY KEY, i1 int, v1 varchar(1), v2 varchar(1) +) engine=MyISAM; +INSERT INTO t2 VALUES (10,6,'p','p'); + +EXPLAIN EXTENDED +SELECT STRAIGHT_JOIN t2.v2 +FROM + (t1 as tb1 LEFT JOIN t1 AS tb2 ON tb2.v1 = tb1.v2) + RIGHT JOIN + (t2,t1) + ON t1.pk = t2.pk AND t2.v2 = tb1.v1 +WHERE tb1.pk = 40 +ORDER BY tb1.i1; + +EXPLAIN EXTENDED +SELECT STRAIGHT_JOIN t2.v2 +FROM + (t2,t1) + LEFT JOIN + (t1 as tb1 LEFT JOIN t1 AS tb2 ON tb2.v1 = tb1.v2) + ON t1.pk = t2.pk AND t2.v2 = tb1.v1 +WHERE tb1.pk = 40 +ORDER BY tb1.i1; + +SELECT STRAIGHT_JOIN DISTINCT t2.v2 +FROM + (t1 as tb1 LEFT JOIN t1 AS tb2 ON tb2.v1 = tb1.v2) + RIGHT JOIN + (t2,t1) + ON t1.pk = t2.pk AND t2.v2 = tb1.v1 +WHERE tb1.pk = 40 +ORDER BY tb1.i1; + +DROP TABLE t1,t2; + --echo # end of 5.5 tests +--echo # +--echo # MDEV-17518: Range optimization doesn't use ON expressions from nested outer joins +--echo # +create table t1(a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); + +create table t2(a int); +insert into t2 values (0),(1); + +create table t3 (a int, b int, key(a)); +insert into t3 select A.a + B.a* 10 + C.a * 100, 12345 from t1 A, t1 B, t1 C; + +--echo # Uses range for table t3: +explain select * from t1 left join t3 on t1.a=t3.b and t3.a<5; + +--echo # This must use range for table t3, too: +explain select * from t1 left join (t3 join t2) on t1.a=t3.b and t3.a<5; + +--echo # +--echo # .. part 2: make sure condition selectivity can use the condition too. +--echo # +alter table t3 drop key a; +set @tmp1=@@optimizer_use_condition_selectivity; +set @tmp2=@@use_stat_tables; +set @tmp3=@@histogram_size; +set use_stat_tables=preferably; +set optimizer_use_condition_selectivity=4; +set histogram_size=100; + +analyze table t3 persistent for all; + +--echo # t3.filtered is less than 100%: +explain extended select * from t1 left join t3 on t1.a=t3.b and t3.a<5; + +--echo # t3.filtered must less than 100%, too: +explain extended select * from t1 left join (t3 join t2) on t1.a=t3.b and t3.a<5; + +drop table t1,t2,t3; +set optimizer_use_condition_selectivity= @tmp1; +set use_stat_tables= @tmp2; +set histogram_size= @tmp3; + +--echo # Another test +CREATE TABLE t1 (i1 int) ; +CREATE TABLE t2 (pk int NOT NULL PRIMARY KEY) ; +CREATE TABLE t3 (pk int NOT NULL, i1 int, PRIMARY KEY (pk)) ; +INSERT INTO t3 VALUES (2, NULL); + +CREATE TABLE t4 (pk int NOT NULL, i1 int, PRIMARY KEY (pk), KEY i1 (i1)) ; +CREATE VIEW v4 AS SELECT * FROM t4; + +SELECT 1 +FROM t3 RIGHT JOIN t1 ON t3.i1 = t1.i1 + LEFT JOIN v4 + RIGHT JOIN t2 ON v4.i1 = t2.pk ON t1.i1 = t2.pk +WHERE t3.pk IN (2); + +drop view v4; +drop table t1,t2,t3,t4; + SET optimizer_switch=@save_optimizer_switch; diff --git a/mysql-test/main/join_outer_jcl6.result b/mysql-test/main/join_outer_jcl6.result index 9ff501baf6a..f46f3e2df21 100644 --- a/mysql-test/main/join_outer_jcl6.result +++ b/mysql-test/main/join_outer_jcl6.result @@ -2471,7 +2471,125 @@ id sid id 1 NULL NULL 2 NULL NULL drop table t1, t2; +# +# MDEV-16726: SELECT with STRAGHT JOIN containing NESTED RIGHT JOIN +# converted to INNER JOIN with first constant inner table +# +CREATE TABLE t1 ( +pk int PRIMARY KEY, i1 int, v1 varchar(1), v2 varchar(1), KEY v1 (v1,i1) +) engine=MyISAM; +INSERT INTO t1 VALUES +(8,3,'c','c'),(9,4,'z','z'),(10,3,'i','i'),(11,186,'x','x'), +(14,226,'m','m'),(15,133,'p','p'); +CREATE TABLE t2 ( +pk int PRIMARY KEY, i1 int, v1 varchar(1), v2 varchar(1) +) engine=MyISAM; +INSERT INTO t2 VALUES (10,6,'p','p'); +EXPLAIN EXTENDED +SELECT STRAIGHT_JOIN t2.v2 +FROM +(t1 as tb1 LEFT JOIN t1 AS tb2 ON tb2.v1 = tb1.v2) +RIGHT JOIN +(t2,t1) +ON t1.pk = t2.pk AND t2.v2 = tb1.v1 +WHERE tb1.pk = 40 +ORDER BY tb1.i1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +Warnings: +Note 1003 select straight_join 'p' AS `v2` from `test`.`t1` join `test`.`t1` `tb1` left join `test`.`t1` `tb2` on(multiple equal(NULL, NULL)) where 0 order by NULL +EXPLAIN EXTENDED +SELECT STRAIGHT_JOIN t2.v2 +FROM +(t2,t1) +LEFT JOIN +(t1 as tb1 LEFT JOIN t1 AS tb2 ON tb2.v1 = tb1.v2) +ON t1.pk = t2.pk AND t2.v2 = tb1.v1 +WHERE tb1.pk = 40 +ORDER BY tb1.i1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +Warnings: +Note 1003 select straight_join 'p' AS `v2` from `test`.`t1` join `test`.`t1` `tb1` left join `test`.`t1` `tb2` on(multiple equal(NULL, NULL)) where 0 order by NULL +SELECT STRAIGHT_JOIN DISTINCT t2.v2 +FROM +(t1 as tb1 LEFT JOIN t1 AS tb2 ON tb2.v1 = tb1.v2) +RIGHT JOIN +(t2,t1) +ON t1.pk = t2.pk AND t2.v2 = tb1.v1 +WHERE tb1.pk = 40 +ORDER BY tb1.i1; +v2 +DROP TABLE t1,t2; # end of 5.5 tests +# +# MDEV-17518: Range optimization doesn't use ON expressions from nested outer joins +# +create table t1(a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t2(a int); +insert into t2 values (0),(1); +create table t3 (a int, b int, key(a)); +insert into t3 select A.a + B.a* 10 + C.a * 100, 12345 from t1 A, t1 B, t1 C; +# Uses range for table t3: +explain select * from t1 left join t3 on t1.a=t3.b and t3.a<5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 +1 SIMPLE t3 range a a 5 NULL 5 Using where; Rowid-ordered scan; Using join buffer (flat, BNL join) +# This must use range for table t3, too: +explain select * from t1 left join (t3 join t2) on t1.a=t3.b and t3.a<5; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 +1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using join buffer (flat, BNL join) +1 SIMPLE t3 range a a 5 NULL 5 Using where; Rowid-ordered scan; Using join buffer (incremental, BNL join) +# +# .. part 2: make sure condition selectivity can use the condition too. +# +alter table t3 drop key a; +set @tmp1=@@optimizer_use_condition_selectivity; +set @tmp2=@@use_stat_tables; +set @tmp3=@@histogram_size; +set use_stat_tables=preferably; +set optimizer_use_condition_selectivity=4; +set histogram_size=100; +analyze table t3 persistent for all; +Table Op Msg_type Msg_text +test.t3 analyze status Engine-independent statistics collected +test.t3 analyze status OK +# t3.filtered is less than 100%: +explain extended select * from t1 left join t3 on t1.a=t3.b and t3.a<5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00 +1 SIMPLE t3 hash_ALL NULL #hash#$hj 5 test.t1.a 1000 0.99 Using where; Using join buffer (flat, BNLH join) +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t1` left join `test`.`t3` on(`test`.`t3`.`b` = `test`.`t1`.`a` and `test`.`t3`.`a` < 5 and `test`.`t1`.`a` is not null) where 1 +# t3.filtered must less than 100%, too: +explain extended select * from t1 left join (t3 join t2) on t1.a=t3.b and t3.a<5; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 100.00 +1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 Using where +1 SIMPLE t3 ALL NULL NULL NULL NULL 1000 0.99 Using where +Warnings: +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t2`.`a` AS `a` from `test`.`t1` left join (`test`.`t3` join `test`.`t2`) on(`test`.`t3`.`b` = `test`.`t1`.`a` and `test`.`t3`.`a` < 5 and `test`.`t1`.`a` is not null) where 1 +drop table t1,t2,t3; +set optimizer_use_condition_selectivity= @tmp1; +set use_stat_tables= @tmp2; +set histogram_size= @tmp3; +# Another test +CREATE TABLE t1 (i1 int) ; +CREATE TABLE t2 (pk int NOT NULL PRIMARY KEY) ; +CREATE TABLE t3 (pk int NOT NULL, i1 int, PRIMARY KEY (pk)) ; +INSERT INTO t3 VALUES (2, NULL); +CREATE TABLE t4 (pk int NOT NULL, i1 int, PRIMARY KEY (pk), KEY i1 (i1)) ; +CREATE VIEW v4 AS SELECT * FROM t4; +SELECT 1 +FROM t3 RIGHT JOIN t1 ON t3.i1 = t1.i1 +LEFT JOIN v4 +RIGHT JOIN t2 ON v4.i1 = t2.pk ON t1.i1 = t2.pk +WHERE t3.pk IN (2); +1 +drop view v4; +drop table t1,t2,t3,t4; SET optimizer_switch=@save_optimizer_switch; set join_cache_level=default; show variables like 'join_cache_level'; diff --git a/mysql-test/main/lock.result b/mysql-test/main/lock.result index 0805fd45864..339cfcaa441 100644 --- a/mysql-test/main/lock.result +++ b/mysql-test/main/lock.result @@ -136,7 +136,7 @@ select * from t1; ERROR HY000: Table 't1' was not locked with LOCK TABLES unlock tables; create or replace view v_bug5719 as select * from t1; -lock tables v_bug5719 write; +lock tables v_bug5719 read; select * from v_bug5719; a @@ -303,7 +303,7 @@ create table t2 (j int); # # Try to perform DDL on table which is locked through view. create view v1 as select * from t2; -lock tables t1 write, v1 write; +lock tables t1 write, v1 read; flush table t2; ERROR HY000: Table 't2' was locked with a READ lock and can't be updated drop table t2; diff --git a/mysql-test/main/lock.test b/mysql-test/main/lock.test index 92ab8294273..ff77b4991c0 100644 --- a/mysql-test/main/lock.test +++ b/mysql-test/main/lock.test @@ -192,7 +192,7 @@ drop view v_bug5719; select * from t1; unlock tables; create or replace view v_bug5719 as select * from t1; -lock tables v_bug5719 write; +lock tables v_bug5719 read; select * from v_bug5719; --echo --echo Allowed to use an underlying table under LOCK TABLES <view> @@ -368,7 +368,7 @@ create table t2 (j int); --echo # --echo # Try to perform DDL on table which is locked through view. create view v1 as select * from t2; -lock tables t1 write, v1 write; +lock tables t1 write, v1 read; --error ER_TABLE_NOT_LOCKED_FOR_WRITE flush table t2; --error ER_TABLE_NOT_LOCKED_FOR_WRITE diff --git a/mysql-test/main/lock_multi.result b/mysql-test/main/lock_multi.result index d4e0edaf1c2..52b4608fdd2 100644 --- a/mysql-test/main/lock_multi.result +++ b/mysql-test/main/lock_multi.result @@ -114,17 +114,16 @@ unlock tables; drop table t1; connection locker; USE mysql; -LOCK TABLES columns_priv WRITE, db WRITE, host WRITE, user WRITE; +LOCK TABLES columns_priv WRITE, db WRITE, user WRITE; FLUSH TABLES; connection reader; USE mysql; SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1; connection locker; -OPTIMIZE TABLES columns_priv, db, host, user; +OPTIMIZE TABLES columns_priv, db, user; Table Op Msg_type Msg_text mysql.columns_priv optimize status OK mysql.db optimize status OK -mysql.host optimize status OK mysql.user optimize status OK UNLOCK TABLES; connection reader; @@ -395,15 +394,17 @@ DROP VIEW IF EXISTS v1; # # Test 1: LOCK TABLES v1 WRITE, t1 READ; # -# Thanks to the fact that we no longer allow DDL on tables -# which are locked for write implicitly, the exact scenario -# in which assert was failing is no longer repeatable. CREATE TABLE t1 ( f1 integer ); CREATE VIEW v1 AS SELECT f1 FROM t1 ; +# Connection 2 +connect con2,localhost,root; LOCK TABLES v1 WRITE, t1 READ; FLUSH TABLE t1; -ERROR HY000: Table 't1' was locked with a READ lock and can't be updated -UNLOCK TABLES; +disconnect con2; +# Connection 1 +connection default; +LOCK TABLES t1 WRITE; +FLUSH TABLE t1; DROP TABLE t1; DROP VIEW v1; # diff --git a/mysql-test/main/lock_multi.test b/mysql-test/main/lock_multi.test index 51cc4a50233..ce901126ce5 100644 --- a/mysql-test/main/lock_multi.test +++ b/mysql-test/main/lock_multi.test @@ -184,7 +184,7 @@ drop table t1; connection locker; USE mysql; -LOCK TABLES columns_priv WRITE, db WRITE, host WRITE, user WRITE; +LOCK TABLES columns_priv WRITE, db WRITE, user WRITE; FLUSH TABLES; # connection reader; @@ -202,7 +202,7 @@ let $wait_condition= --source include/wait_condition.inc # Make test case independent from earlier grants. --replace_result "Table is already up to date" "OK" -OPTIMIZE TABLES columns_priv, db, host, user; +OPTIMIZE TABLES columns_priv, db, user; UNLOCK TABLES; # connection reader; @@ -734,17 +734,21 @@ DROP VIEW IF EXISTS v1; --echo # --echo # Test 1: LOCK TABLES v1 WRITE, t1 READ; --echo # ---echo # Thanks to the fact that we no longer allow DDL on tables ---echo # which are locked for write implicitly, the exact scenario ---echo # in which assert was failing is no longer repeatable. CREATE TABLE t1 ( f1 integer ); CREATE VIEW v1 AS SELECT f1 FROM t1 ; +--echo # Connection 2 +connect (con2,localhost,root); LOCK TABLES v1 WRITE, t1 READ; ---error ER_TABLE_NOT_LOCKED_FOR_WRITE FLUSH TABLE t1; -UNLOCK TABLES; +disconnect con2; +--source include/wait_until_disconnected.inc + +--echo # Connection 1 +connection default; +LOCK TABLES t1 WRITE; +FLUSH TABLE t1; # Assertion happened here # Cleanup DROP TABLE t1; diff --git a/mysql-test/main/log_tables_upgrade.result b/mysql-test/main/log_tables_upgrade.result index 8f822d56020..df6ea72f3ca 100644 --- a/mysql-test/main/log_tables_upgrade.result +++ b/mysql-test/main/log_tables_upgrade.result @@ -24,7 +24,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK diff --git a/mysql-test/main/lowercase_fs_off.result b/mysql-test/main/lowercase_fs_off.result index 91bd2924096..e05fd50caeb 100644 --- a/mysql-test/main/lowercase_fs_off.result +++ b/mysql-test/main/lowercase_fs_off.result @@ -83,6 +83,74 @@ CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET new.a= 1; RENAME TABLE t1 TO T1; ALTER TABLE T1 RENAME t1; DROP TABLE t1; +create database TEST; +create procedure TEST.pr() begin end; +create procedure test.pr() begin end; +Phase 1/7: Checking and upgrading mysql database +Processing databases +mysql +mysql.column_stats OK +mysql.columns_priv OK +mysql.db OK +mysql.event OK +mysql.func OK +mysql.gtid_slave_pos OK +mysql.help_category OK +mysql.help_keyword OK +mysql.help_relation OK +mysql.help_topic OK +mysql.index_stats OK +mysql.innodb_index_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +mysql.innodb_table_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +mysql.plugin OK +mysql.proc OK +mysql.procs_priv OK +mysql.proxies_priv OK +mysql.roles_mapping OK +mysql.servers OK +mysql.table_stats OK +mysql.tables_priv OK +mysql.time_zone OK +mysql.time_zone_leap_second OK +mysql.time_zone_name OK +mysql.time_zone_transition OK +mysql.time_zone_transition_type OK +mysql.transaction_registry +Error : Unknown storage engine 'InnoDB' +error : Corrupt +mysql.user OK + +Repairing tables +mysql.innodb_index_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +mysql.innodb_table_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +mysql.transaction_registry +Error : Unknown storage engine 'InnoDB' +error : Corrupt +Phase 2/7: Installing used storage engines... Skipped +Phase 3/7: Fixing views +Phase 4/7: Running 'mysql_fix_privilege_tables' +Phase 5/7: Fixing table and database names +Phase 6/7: Checking and upgrading tables +Processing databases +TEST +information_schema +mtr +mtr.global_suppressions OK +mtr.test_suppressions OK +performance_schema +test +Phase 7/7: Running 'FLUSH PRIVILEGES' +OK +drop procedure test.pr; +drop database TEST; create table t1 (a int); create trigger t1_bi before insert on t1 for each row set new.a= 1; show triggers like '%T1%'; diff --git a/mysql-test/main/lowercase_fs_off.test b/mysql-test/main/lowercase_fs_off.test index b8a9795db9a..7c5811f9cc3 100644 --- a/mysql-test/main/lowercase_fs_off.test +++ b/mysql-test/main/lowercase_fs_off.test @@ -106,6 +106,18 @@ ALTER TABLE T1 RENAME t1; DROP TABLE t1; # +# MDEV-13912 mysql_upgrade: case (in)sensitivity for stored procedures +# +create database TEST; +create procedure TEST.pr() begin end; +create procedure test.pr() begin end; +--exec $MYSQL_UPGRADE --force 2>&1 +drop procedure test.pr; +drop database TEST; + +# End of 5.5 tests + +# # MDEV-9014 SHOW TRIGGERS not case sensitive # create table t1 (a int); @@ -113,4 +125,7 @@ create trigger t1_bi before insert on t1 for each row set new.a= 1; show triggers like '%T1%'; drop table t1; +let $datadir= `select @@datadir`; +remove_file $datadir/mysql_upgrade_info; + set GLOBAL sql_mode=default; diff --git a/mysql-test/main/multi_update.result b/mysql-test/main/multi_update.result index c40de47668a..9f9af8f79f8 100644 --- a/mysql-test/main/multi_update.result +++ b/mysql-test/main/multi_update.result @@ -603,11 +603,11 @@ CREATE TABLE t1 (f1 DATE); INSERT INTO t1 VALUES('2001-01-01'); UPDATE IGNORE (SELECT 1 FROM t1 WHERE f1 = (SELECT f1() FROM t1)) x, t1 SET f1 = 1; Warnings: -Warning 1292 Incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '1' CREATE view v1 as SELECT f1() FROM t1; UPDATE IGNORE (SELECT 1 FROM t1 WHERE f1 = (select * from v1)) x, t1 SET f1 = 1; Warnings: -Warning 1292 Incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '1' DROP VIEW v1; DROP FUNCTION f1; DROP TABLE t1; diff --git a/mysql-test/main/myisam.result b/mysql-test/main/myisam.result index 4864ef0bb13..bef8790e141 100644 --- a/mysql-test/main/myisam.result +++ b/mysql-test/main/myisam.result @@ -2545,7 +2545,7 @@ INSERT INTO t1 VALUES ('0'),('0'),('0'),('0'),('0'),('0'),('0'); Warnings: Error 1034 myisam_sort_buffer_size is too small. X -Error 1034 Number of rows changed from 0 to 157 +Warning 1034 Number of rows changed from 0 to 157 SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size; INSERT INTO t1 VALUES('1'); SELECT * FROM t1, t1 AS a1 WHERE t1.a=1 AND a1.a=1; diff --git a/mysql-test/main/myisam_recover.result b/mysql-test/main/myisam_recover.result index 92df67b42d1..3a2c424c8b2 100644 --- a/mysql-test/main/myisam_recover.result +++ b/mysql-test/main/myisam_recover.result @@ -87,7 +87,7 @@ a 6 Warnings: Error 145 Table 't1' is marked as crashed and should be repaired -Error 1034 Number of rows changed from 3 to 6 +Warning 1034 Number of rows changed from 3 to 6 # # Cleanup # @@ -139,7 +139,7 @@ a 4 Warnings: Error 145 Table 't1' is marked as crashed and should be repaired -Error 1034 Number of rows changed from 1 to 2 +Warning 1034 Number of rows changed from 1 to 2 connect con2, localhost, root; ALTER TABLE t2 ADD val INT; connection default; diff --git a/mysql-test/main/mysql.result b/mysql-test/main/mysql.result index 09f014da627..06ef7e95bc9 100644 --- a/mysql-test/main/mysql.result +++ b/mysql-test/main/mysql.result @@ -538,8 +538,6 @@ a # # End of 10.1 tests # -ERROR 1300 (HY000): Invalid utf8 character string: 'test\xF0\x9F\x98\x81 ' -ERROR 1300 (HY000): Invalid binary character string: 'test\xF0\x9F\x98\x81 ' ERROR 1300 (HY000) at line 2: Invalid utf8 character string: 'test\xF0\x9F\x98\x81' set GLOBAL sql_mode=default; diff --git a/mysql-test/main/mysql.test b/mysql-test/main/mysql.test index 01953ba2112..c65860eb822 100644 --- a/mysql-test/main/mysql.test +++ b/mysql-test/main/mysql.test @@ -638,10 +638,7 @@ EOF --echo # End of 10.1 tests --echo # ---error 1 ---exec $MYSQL --default-character-set=utf8 -e "select 1" "test😠" 2>&1 ---error 1 ---exec $MYSQL --default-character-set=binary -e "select 1" "test😠" 2>&1 + --write_file $MYSQLTEST_VARDIR/tmp/mdev-6572.sql SET NAMES utf8; USE test😠; diff --git a/mysql-test/main/mysql_not_windows.result b/mysql-test/main/mysql_not_windows.result index 1df62d9a12d..96210a366a6 100644 --- a/mysql-test/main/mysql_not_windows.result +++ b/mysql-test/main/mysql_not_windows.result @@ -9,3 +9,5 @@ End of tests 2 X 3 +ERROR 1300 (HY000): Invalid utf8 character string: 'test\xF0\x9F\x98\x81 ' +ERROR 1300 (HY000): Invalid binary character string: 'test\xF0\x9F\x98\x81 ' diff --git a/mysql-test/main/mysql_not_windows.test b/mysql-test/main/mysql_not_windows.test index 591de74cbbf..816160c4f3e 100644 --- a/mysql-test/main/mysql_not_windows.test +++ b/mysql-test/main/mysql_not_windows.test @@ -22,3 +22,10 @@ exec $MYSQL test -e "select let $query = select 3 as X; exec $MYSQL test -e "$query"; + +# Not ran on Windows, since non-ASCII does not work on command line. +# (MDEV-16220) +--error 1 +--exec $MYSQL --default-character-set=utf8 -e "select 1" "test😠" 2>&1 +--error 1 +--exec $MYSQL --default-character-set=binary -e "select 1" "test😠" 2>&1 diff --git a/mysql-test/main/mysql_protocols.result b/mysql-test/main/mysql_protocols.result index c6207c4f4f5..746e4a46100 100644 --- a/mysql-test/main/mysql_protocols.result +++ b/mysql-test/main/mysql_protocols.result @@ -5,6 +5,7 @@ TCP SOCKET ok ERROR 2047 (HY000): Wrong or unknown protocol -ERROR 2047 (HY000): Wrong or unknown protocol +Unknown option to protocol: MEMORY +Alternatives are: 'TCP','SOCKET','PIPE' Unknown option to protocol: NullS -Alternatives are: 'TCP','SOCKET','PIPE','MEMORY' +Alternatives are: 'TCP','SOCKET','PIPE' diff --git a/mysql-test/main/mysql_upgrade-6984.result b/mysql-test/main/mysql_upgrade-6984.result index 6c711b4847f..a7b5bcb86bf 100644 --- a/mysql-test/main/mysql_upgrade-6984.result +++ b/mysql-test/main/mysql_upgrade-6984.result @@ -12,7 +12,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats Error : Unknown storage engine 'InnoDB' diff --git a/mysql-test/main/mysql_upgrade.result b/mysql-test/main/mysql_upgrade.result index 08efe0e8bc8..54146787123 100644 --- a/mysql-test/main/mysql_upgrade.result +++ b/mysql-test/main/mysql_upgrade.result @@ -13,7 +13,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK @@ -62,7 +61,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK @@ -111,7 +109,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK @@ -165,7 +162,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK @@ -220,7 +216,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK @@ -278,7 +273,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK @@ -331,7 +325,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK @@ -376,7 +369,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK @@ -442,7 +434,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK @@ -525,7 +516,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK diff --git a/mysql-test/main/mysql_upgrade_no_innodb.result b/mysql-test/main/mysql_upgrade_no_innodb.result index 8e051bb7c16..90e96800bff 100644 --- a/mysql-test/main/mysql_upgrade_no_innodb.result +++ b/mysql-test/main/mysql_upgrade_no_innodb.result @@ -12,7 +12,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats Error : Unknown storage engine 'InnoDB' diff --git a/mysql-test/main/mysql_upgrade_noengine.result b/mysql-test/main/mysql_upgrade_noengine.result index 7b3b1610ee0..5dfe8aeb289 100644 --- a/mysql-test/main/mysql_upgrade_noengine.result +++ b/mysql-test/main/mysql_upgrade_noengine.result @@ -66,7 +66,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK @@ -155,7 +154,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK @@ -244,7 +242,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK diff --git a/mysql-test/main/mysql_upgrade_ssl.result b/mysql-test/main/mysql_upgrade_ssl.result index 172a1401cdb..6c6d0859016 100644 --- a/mysql-test/main/mysql_upgrade_ssl.result +++ b/mysql-test/main/mysql_upgrade_ssl.result @@ -14,7 +14,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK diff --git a/mysql-test/main/mysql_upgrade_view.result b/mysql-test/main/mysql_upgrade_view.result index 813138b57a8..3d885c569bb 100644 --- a/mysql-test/main/mysql_upgrade_view.result +++ b/mysql-test/main/mysql_upgrade_view.result @@ -76,7 +76,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats Error : Unknown storage engine 'InnoDB' @@ -226,7 +225,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats Error : Unknown storage engine 'InnoDB' @@ -351,7 +349,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats Error : Unknown storage engine 'InnoDB' diff --git a/mysql-test/main/mysqlbinlog_row_compressed.result b/mysql-test/main/mysqlbinlog_row_compressed.result index cbea1cf9def..705683322f8 100644 --- a/mysql-test/main/mysqlbinlog_row_compressed.result +++ b/mysql-test/main/mysqlbinlog_row_compressed.result @@ -61,7 +61,7 @@ BEGIN #Q> INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "") #<date> server id 1 end_log_pos 899 CRC32 XXX Table_map: `test`.`t1` mapped to number num # at 899 -#<date> server id 1 end_log_pos 967 CRC32 XXX Write_compressed_rows: table id 31 flags: STMT_END_F +#<date> 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 */ @@ -90,7 +90,7 @@ BEGIN #Q> INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL) #<date> server id 1 end_log_pos 1214 CRC32 XXX Table_map: `test`.`t1` mapped to number num # at 1214 -#<date> server id 1 end_log_pos 1281 CRC32 XXX Write_compressed_rows: table id 31 flags: STMT_END_F +#<date> 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 */ @@ -119,7 +119,7 @@ BEGIN #Q> INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A") #<date> server id 1 end_log_pos 1530 CRC32 XXX Table_map: `test`.`t1` mapped to number num # at 1530 -#<date> server id 1 end_log_pos 1596 CRC32 XXX Write_compressed_rows: table id 31 flags: STMT_END_F +#<date> 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 */ @@ -148,7 +148,7 @@ BEGIN #Q> INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A") #<date> server id 1 end_log_pos 1842 CRC32 XXX Table_map: `test`.`t1` mapped to number num # at 1842 -#<date> server id 1 end_log_pos 1909 CRC32 XXX Write_compressed_rows: table id 31 flags: STMT_END_F +#<date> 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 */ @@ -177,7 +177,7 @@ BEGIN #Q> INSERT INTO t2 SELECT * FROM t1 #<date> server id 1 end_log_pos 2134 CRC32 XXX Table_map: `test`.`t2` mapped to number num # at 2134 -#<date> server id 1 end_log_pos 2225 CRC32 XXX Write_compressed_rows: table id 32 flags: STMT_END_F +#<date> 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 */ @@ -239,7 +239,7 @@ BEGIN #Q> UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL #<date> server id 1 end_log_pos 2462 CRC32 XXX Table_map: `test`.`t2` mapped to number num # at 2462 -#<date> server id 1 end_log_pos 2561 CRC32 XXX Update_compressed_rows: table id 32 flags: STMT_END_F +#<date> 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 */ @@ -320,7 +320,7 @@ BEGIN #Q> DELETE FROM t1 #<date> server id 1 end_log_pos 2769 CRC32 XXX Table_map: `test`.`t1` mapped to number num # at 2769 -#<date> server id 1 end_log_pos 2861 CRC32 XXX Delete_compressed_rows: table id 31 flags: STMT_END_F +#<date> 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 */ @@ -382,7 +382,7 @@ BEGIN #Q> DELETE FROM t2 #<date> server id 1 end_log_pos 3069 CRC32 XXX Table_map: `test`.`t2` mapped to number num # at 3069 -#<date> server id 1 end_log_pos 3154 CRC32 XXX Delete_compressed_rows: table id 32 flags: STMT_END_F +#<date> 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 */ diff --git a/mysql-test/main/mysqlbinlog_row_minimal.result b/mysql-test/main/mysqlbinlog_row_minimal.result index 6417a528638..a030f202f45 100644 --- a/mysql-test/main/mysqlbinlog_row_minimal.result +++ b/mysql-test/main/mysqlbinlog_row_minimal.result @@ -59,7 +59,7 @@ BEGIN #Q> INSERT INTO t1 VALUES (10, 1, 2, 3, 4, 5, 6, 7, "") #<date> server id 1 end_log_pos 946 CRC32 XXX Table_map: `test`.`t1` mapped to number num # at 946 -#<date> server id 1 end_log_pos 1015 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F +#<date> 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 */ @@ -88,7 +88,7 @@ BEGIN #Q> INSERT INTO t1 VALUES (11, 1, 2, 3, 4, 5, 6, 7, NULL) #<date> server id 1 end_log_pos 1262 CRC32 XXX Table_map: `test`.`t1` mapped to number num # at 1262 -#<date> server id 1 end_log_pos 1330 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F +#<date> 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 */ @@ -117,7 +117,7 @@ BEGIN #Q> INSERT INTO t1 VALUES (12, 1, 2, 3, NULL, 5, 6, 7, "A") #<date> server id 1 end_log_pos 1579 CRC32 XXX Table_map: `test`.`t1` mapped to number num # at 1579 -#<date> server id 1 end_log_pos 1646 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F +#<date> 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 */ @@ -146,7 +146,7 @@ BEGIN #Q> INSERT INTO t1 VALUES (13, 1, 2, 3, 0, 5, 6, 7, "A") #<date> server id 1 end_log_pos 1892 CRC32 XXX Table_map: `test`.`t1` mapped to number num # at 1892 -#<date> server id 1 end_log_pos 1962 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F +#<date> 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 */ @@ -175,7 +175,7 @@ BEGIN #Q> INSERT INTO t2 SELECT * FROM t1 #<date> server id 1 end_log_pos 2187 CRC32 XXX Table_map: `test`.`t2` mapped to number num # at 2187 -#<date> server id 1 end_log_pos 2354 CRC32 XXX Write_rows: table id 32 flags: STMT_END_F +#<date> 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 */ @@ -237,7 +237,7 @@ BEGIN #Q> UPDATE t2 SET f4=5 WHERE f4>0 or f4 is NULL #<date> server id 1 end_log_pos 2591 CRC32 XXX Table_map: `test`.`t2` mapped to number num # at 2591 -#<date> server id 1 end_log_pos 2665 CRC32 XXX Update_rows: table id 32 flags: STMT_END_F +#<date> 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 */ @@ -273,7 +273,7 @@ BEGIN #Q> DELETE FROM t1 #<date> server id 1 end_log_pos 2873 CRC32 XXX Table_map: `test`.`t1` mapped to number num # at 2873 -#<date> server id 1 end_log_pos 2927 CRC32 XXX Delete_rows: table id 31 flags: STMT_END_F +#<date> 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 */ @@ -303,7 +303,7 @@ BEGIN #Q> DELETE FROM t2 #<date> server id 1 end_log_pos 3135 CRC32 XXX Table_map: `test`.`t2` mapped to number num # at 3135 -#<date> server id 1 end_log_pos 3189 CRC32 XXX Delete_rows: table id 32 flags: STMT_END_F +#<date> 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 */ diff --git a/mysql-test/main/mysqlcheck.result b/mysql-test/main/mysqlcheck.result index 7259b68be50..2b4d4cb5647 100644 --- a/mysql-test/main/mysqlcheck.result +++ b/mysql-test/main/mysqlcheck.result @@ -14,7 +14,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK @@ -45,7 +44,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats note : Table does not support optimize, doing recreate + analyze instead @@ -80,7 +78,6 @@ mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK -mysql.host OK mysql.index_stats OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK @@ -109,7 +106,6 @@ mysql.help_category Table is already up to date mysql.help_keyword Table is already up to date mysql.help_relation Table is already up to date mysql.help_topic Table is already up to date -mysql.host Table is already up to date mysql.index_stats Table is already up to date mysql.innodb_index_stats note : Table does not support optimize, doing recreate + analyze instead @@ -438,7 +434,6 @@ mysql.help_category Table is already up to date mysql.help_keyword Table is already up to date mysql.help_relation Table is already up to date mysql.help_topic Table is already up to date -mysql.host Table is already up to date mysql.index_stats Table is already up to date mysql.innodb_index_stats OK mysql.innodb_table_stats OK diff --git a/mysql-test/main/mysqld--help,win.rdiff b/mysql-test/main/mysqld--help,win.rdiff index 89d2cd36112..6aba3acab28 100644 --- a/mysql-test/main/mysqld--help,win.rdiff +++ b/mysql-test/main/mysqld--help,win.rdiff @@ -1,6 +1,6 @@ ---- a/mysql-test/r/mysqld--help.result -+++ b/mysql-test/r/mysqld--help.result -@@ -381,7 +381,6 @@ The following options may be given as the first argument: +--- mysqld--help.result 2018-08-12 00:10:13.694793500 +0100 ++++ mysqld--help,win.reject 2018-08-16 20:31:08.353317200 +0100 +@@ -386,7 +386,6 @@ The number of segments in a key cache -L, --language=name Client error messages in given language. May be given as a full path. Deprecated. Use --lc-messages-dir instead. @@ -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 -@@ -603,6 +602,7 @@ The following options may be given as the first argument: +@@ -608,6 +607,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,17 +16,7 @@ --net-buffer-length=# Buffer length for TCP/IP and socket communication --net-read-timeout=# -@@ -1048,6 +1048,9 @@ The following options may be given as the first argument: - characteristics (isolation level, read only/read - write,snapshot - but not any work done / data modified - within the transaction). -+ --shared-memory Enable the shared memory -+ --shared-memory-base-name=name -+ Base name of shared memory - --show-slave-auth-info - Show user and password in SHOW SLAVE HOSTS on this - master. -@@ -1171,6 +1174,10 @@ The following options may be given as the first argument: +@@ -1188,6 +1188,10 @@ Log slow queries to given log file. Defaults logging to 'hostname'-slow.log. Must be enabled to activate other slow log options @@ -37,7 +27,7 @@ --socket=name Socket file to use for connection --sort-buffer-size=# Each thread that needs to do a sort allocates a buffer of -@@ -1190,6 +1197,7 @@ The following options may be given as the first argument: +@@ -1207,6 +1211,7 @@ EMPTY_STRING_IS_NULL, SIMULTANEOUS_ASSIGNMENT --stack-trace Print a symbolic stack trace on failure (Defaults to on; use --skip-stack-trace to disable.) @@ -45,7 +35,7 @@ --standard-compliant-cte Allow only CTEs compliant to SQL standard (Defaults to on; use --skip-standard-compliant-cte to disable.) -@@ -1257,6 +1265,11 @@ The following options may be given as the first argument: +@@ -1277,6 +1282,11 @@ --thread-pool-max-threads=# Maximum allowed number of worker threads in the thread pool @@ -57,7 +47,7 @@ --thread-pool-oversubscribe=# How many additional active worker threads in a group are allowed. -@@ -1295,8 +1308,8 @@ The following options may be given as the first argument: +@@ -1315,8 +1325,8 @@ 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 +58,7 @@ --transaction-alloc-block-size=# Allocation block size for transactions to be stored in binary log -@@ -1430,7 +1443,6 @@ key-cache-block-size 1024 +@@ -1451,7 +1461,6 @@ key-cache-division-limit 100 key-cache-file-hash-size 512 key-cache-segments 0 @@ -76,7 +66,7 @@ lc-messages en_US lc-messages-dir MYSQL_SHAREDIR/ lc-time-names en_US -@@ -1502,6 +1514,7 @@ myisam-sort-buffer-size 134216704 +@@ -1523,6 +1532,7 @@ myisam-stats-method NULLS_UNEQUAL myisam-use-mmap FALSE mysql56-temporal-format TRUE @@ -84,16 +74,7 @@ net-buffer-length 16384 net-read-timeout 30 net-retry-count 10 -@@ -1612,6 +1625,8 @@ session-track-schema TRUE - session-track-state-change FALSE - session-track-system-variables autocommit,character_set_client,character_set_connection,character_set_results,time_zone - session-track-transaction-info OFF -+shared-memory FALSE -+shared-memory-base-name MYSQL - show-slave-auth-info FALSE - silent-startup FALSE - skip-grant-tables TRUE -@@ -1638,6 +1653,7 @@ slave-transaction-retry-interval 0 +@@ -1660,6 +1670,7 @@ slave-type-conversions slow-launch-time 2 slow-query-log FALSE @@ -101,7 +82,7 @@ sort-buffer-size 2097152 sql-mode STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION stack-trace TRUE -@@ -1652,9 +1668,9 @@ sync-relay-log 10000 +@@ -1674,9 +1685,9 @@ sync-relay-log-info 10000 sysdate-is-now FALSE system-versioning-alter-history ERROR @@ -113,7 +94,7 @@ table-open-cache-instances 8 tc-heuristic-recover OFF tcp-keepalive-interval 0 -@@ -1663,6 +1679,8 @@ tcp-keepalive-time 0 +@@ -1686,6 +1697,8 @@ thread-cache-size 151 thread-pool-idle-timeout 60 thread-pool-max-threads 65536 diff --git a/mysql-test/main/mysqld--help.result b/mysql-test/main/mysqld--help.result index ac490afe229..5ee85eee7de 100644 --- a/mysql-test/main/mysqld--help.result +++ b/mysql-test/main/mysqld--help.result @@ -231,6 +231,11 @@ The following specify which files/extra groups are read (specified before remain cache, etc) --enforce-storage-engine=name Force the use of a storage engine for new tables + --eq-range-index-dive-limit=# + The optimizer will use existing index statistics instead + of doing index dives for equality ranges if the number of + equality ranges for the index is larger than or equal to + this number. If set to 0, index dives are always used. --event-scheduler[=name] Enable the event scheduler. Possible values are ON, OFF, and DISABLED (keep the event scheduler completely @@ -1205,6 +1210,10 @@ The following specify which files/extra groups are read (specified before remain NO_AUTO_CREATE_USER, HIGH_NOT_PRECEDENCE, NO_ENGINE_SUBSTITUTION, PAD_CHAR_TO_FULL_LENGTH, EMPTY_STRING_IS_NULL, SIMULTANEOUS_ASSIGNMENT + --sql-safe-updates If set to 1, UPDATEs and DELETEs need either a key in the + WHERE clause, or a LIMIT clause, or else they will + aborted. Prevents the common mistake of accidentally + deleting or updating every row in a table. --stack-trace Print a symbolic stack trace on failure (Defaults to on; use --skip-stack-trace to disable.) --standard-compliant-cte @@ -1404,6 +1413,7 @@ encrypt-binlog FALSE encrypt-tmp-disk-tables FALSE encrypt-tmp-files FALSE enforce-storage-engine (No default value) +eq-range-index-dive-limit 0 event-scheduler OFF expensive-subquery-limit 100 expire-logs-days 0 @@ -1662,6 +1672,7 @@ slow-launch-time 2 slow-query-log FALSE sort-buffer-size 2097152 sql-mode STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION +sql-safe-updates FALSE stack-trace TRUE standard-compliant-cte TRUE stored-program-cache 256 diff --git a/mysql-test/main/mysqldump-max.result b/mysql-test/main/mysqldump-max.result index b75eb969da6..f936184849f 100644 --- a/mysql-test/main/mysqldump-max.result +++ b/mysql-test/main/mysqldump-max.result @@ -81,7 +81,7 @@ id name /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -178,7 +178,7 @@ INSERT IGNORE INTO `t6` VALUES (1,'first value'),(2,'first value'),(3,'first va /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; diff --git a/mysql-test/main/mysqldump-max.test b/mysql-test/main/mysqldump-max.test index c0596f27e4f..4aadb09de53 100644 --- a/mysql-test/main/mysqldump-max.test +++ b/mysql-test/main/mysqldump-max.test @@ -1,3 +1,5 @@ +--source include/have_utf8mb4.inc + # Embedded server doesn't support external clients --source include/not_embedded.inc --source include/have_innodb.inc diff --git a/mysql-test/main/mysqldump-utf8mb4.result b/mysql-test/main/mysqldump-utf8mb4.result new file mode 100644 index 00000000000..3bafd6da6c9 --- /dev/null +++ b/mysql-test/main/mysqldump-utf8mb4.result @@ -0,0 +1,86 @@ +SET NAMES utf8mb4; +# +# MDEV-8765 mysqldump silently corrupts 4-byte UTF-8 data +# +CREATE TABLE t1 ( +point VARCHAR(10) PRIMARY KEY, +data VARCHAR(10), +comment VARCHAR(64) +) CHARACTER SET utf8mb4; +INSERT INTO t1 VALUES ('01f300', UNHEX('f09f8c80'), 'U+1F300 CYCLONE'); +---- +Testing XML format output +---- +<?xml version="1.0"?> +<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +<database name="test"> + <table_structure name="t1"> + <field Field="point" Type="varchar(10)" Null="NO" Key="PRI" Extra="" Comment="" /> + <field Field="data" Type="varchar(10)" Null="YES" Key="" Default="NULL" Extra="" Comment="" /> + <field Field="comment" Type="varchar(64)" Null="YES" Key="" Default="NULL" Extra="" Comment="" /> + <key Table="t1" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1" Column_name="point" Collation="A" Cardinality="1" Null="" Index_type="BTREE" Comment="" Index_comment="" /> + </table_structure> + <table_data name="t1"> + <row> + <field name="point">01f300</field> + <field name="data">🌀</field> + <field name="comment">U+1F300 CYCLONE</field> + </row> + </table_data> +</database> +</mysqldump> +---- +Testing text format output +---- + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +DROP TABLE IF EXISTS `t1`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t1` ( + `point` varchar(10) NOT NULL, + `data` varchar(10) DEFAULT NULL, + `comment` varchar(64) DEFAULT NULL, + PRIMARY KEY (`point`) +); +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `t1` WRITE; +/*!40000 ALTER TABLE `t1` DISABLE KEYS */; +INSERT INTO `t1` VALUES ('01f300','🌀','U+1F300 CYCLONE'); +/*!40000 ALTER TABLE `t1` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +DROP TABLE t1; +---- +Testing text format dump/restore +---- +CREATE TABLE t1 ( +point VARCHAR(10) PRIMARY KEY, +data VARCHAR(10), +comment VARCHAR(64) +) CHARACTER SET utf8mb4; +INSERT INTO t1 VALUES ('01f300', UNHEX('f09f8c80'), 'U+1F300 CYCLONE'); +DROP TABLE t1; +SELECT * FROM t1; +point data comment +01f300 🌀 U+1F300 CYCLONE +DROP TABLE t1; diff --git a/mysql-test/main/mysqldump-utf8mb4.test b/mysql-test/main/mysqldump-utf8mb4.test new file mode 100644 index 00000000000..f8512c9bd7b --- /dev/null +++ b/mysql-test/main/mysqldump-utf8mb4.test @@ -0,0 +1,49 @@ +--source include/have_utf8mb4.inc +--source include/not_embedded.inc + +SET NAMES utf8mb4; + +--echo # +--echo # MDEV-8765 mysqldump silently corrupts 4-byte UTF-8 data +--echo # + +CREATE TABLE t1 ( + point VARCHAR(10) PRIMARY KEY, + data VARCHAR(10), + comment VARCHAR(64) +) CHARACTER SET utf8mb4; +INSERT INTO t1 VALUES ('01f300', UNHEX('f09f8c80'), 'U+1F300 CYCLONE'); + +--echo ---- +--echo Testing XML format output +--echo ---- + +--exec $MYSQL_DUMP --skip-create-options --skip-comments -X test t1 + + +--echo ---- +--echo Testing text format output +--echo ---- + +--exec $MYSQL_DUMP --skip-create-options --skip-comments test t1 +DROP TABLE t1; + + +--echo ---- +--echo Testing text format dump/restore +--echo ---- + +--let $file = $MYSQLTEST_VARDIR/tmp/mysqldump-utf8mb4.sql + +CREATE TABLE t1 ( + point VARCHAR(10) PRIMARY KEY, + data VARCHAR(10), + comment VARCHAR(64) +) CHARACTER SET utf8mb4; +INSERT INTO t1 VALUES ('01f300', UNHEX('f09f8c80'), 'U+1F300 CYCLONE'); + +--exec $MYSQL_DUMP test t1 > $file +DROP TABLE t1; +--exec $MYSQL test < $file +SELECT * FROM t1; +DROP TABLE t1; diff --git a/mysql-test/main/mysqldump.result b/mysql-test/main/mysqldump.result index cc4d182552b..1a3b927f981 100644 --- a/mysql-test/main/mysqldump.result +++ b/mysql-test/main/mysqldump.result @@ -91,7 +91,7 @@ INSERT INTO `t1` VALUES (1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -202,7 +202,7 @@ INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5'), (NULL); /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -305,7 +305,7 @@ create table t1(a int); /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -364,7 +364,7 @@ set global sql_mode='ANSI_QUOTES'; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -429,7 +429,7 @@ insert into t1 values (1),(2),(3); /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='' */; @@ -461,7 +461,7 @@ drop table t1; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -487,7 +487,7 @@ create database mysqldump_test_db character set latin2 collate latin2_bin; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -521,7 +521,7 @@ INSERT INTO t1 VALUES (_latin1 'ÄÖÜß'); /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -639,7 +639,7 @@ INSERT INTO t2 VALUES (4),(5),(6); /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -680,7 +680,7 @@ INSERT INTO `t1` VALUES (0x602010000280100005E71A); /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -721,7 +721,7 @@ INSERT INTO t1 VALUES (4),(5),(6); /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -755,7 +755,7 @@ UNLOCK TABLES; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -1124,7 +1124,7 @@ insert into t1 (F_8d3bba7425e7c98c50f52ca1b52d3735) values (1); /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -1493,7 +1493,7 @@ INSERT INTO t1 VALUES (1),(2),(3); /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -1543,7 +1543,7 @@ INSERT INTO t2 VALUES (1), (2); /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -1578,7 +1578,7 @@ CREATE TABLE `t2` ( /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -1726,7 +1726,7 @@ insert into t2 (a, b) values (NULL, NULL),(10, NULL),(NULL, "twenty"),(30, "thir /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; @@ -1757,7 +1757,7 @@ UNLOCK TABLES; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -1874,7 +1874,7 @@ create table t3(a int); /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -1923,7 +1923,7 @@ mysqldump: Got error: 1064: "You have an error in your SQL syntax; check the man /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -1993,7 +1993,7 @@ UNLOCK TABLES; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -2047,7 +2047,7 @@ create view v2 as select * from t2 where a like 'a%' with check option; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -2143,7 +2143,7 @@ create view v1 as select * from t1; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -2215,7 +2215,7 @@ create view v2 as select * from t2 where a like 'a%' with check option; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -2282,7 +2282,7 @@ INSERT INTO t1 VALUES ('\''); /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -2328,7 +2328,7 @@ select v3.a from v3, v1 where v1.a=v3.a and v3.b=3 limit 1; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -2483,7 +2483,7 @@ update t1 set a = 4 where a=3; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -2612,7 +2612,7 @@ DELIMITER ; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -2759,7 +2759,7 @@ set sql_mode=''; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -2910,7 +2910,7 @@ set global time_zone='Europe/Moscow'; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -2949,7 +2949,7 @@ UNLOCK TABLES; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; @@ -3083,7 +3083,7 @@ a b c /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -3214,7 +3214,7 @@ SET SQL_MODE = @old_sql_mode; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -3277,7 +3277,7 @@ insert into t1 values ('',''); /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -3312,7 +3312,7 @@ UNLOCK TABLES; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -3485,7 +3485,7 @@ insert into t1 values (0815); /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -3769,7 +3769,7 @@ CREATE TABLE t1 (a INT) ENGINE=merge UNION=(t2, t3); /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -3961,7 +3961,7 @@ create view db42635.v2 (c) as select * from db42635.t1; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -4107,7 +4107,7 @@ INSERT INTO t1 VALUES (3,4), (4,5); /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -4370,7 +4370,7 @@ insert into t1 values (0815); /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -5636,7 +5636,7 @@ INSERT INTO t1 (a) VALUES (1),(2),(3); /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; diff --git a/mysql-test/main/mysqldump.test b/mysql-test/main/mysqldump.test index 1eed0f9cf3f..57462fcf2e2 100644 --- a/mysql-test/main/mysqldump.test +++ b/mysql-test/main/mysqldump.test @@ -1,3 +1,5 @@ +--source include/have_utf8mb4.inc + call mtr.add_suppression("@003f.frm' \\(errno: 22\\)"); #select * from mysql.user; #checksum table mysql.user; @@ -705,7 +707,7 @@ drop table t1; --echo # Bug#15328 Segmentation fault occurred if my.cnf is invalid for escape sequence --echo # ---exec $MYSQL_MY_PRINT_DEFAULTS --config-file=$MYSQL_TEST_DIR/std_data/bug15328.cnf mysqldump +--exec $MYSQL_MY_PRINT_DEFAULTS --defaults-file=$MYSQL_TEST_DIR/std_data/bug15328.cnf mysqldump --echo # --echo # Bug#19025 mysqldump doesn't correctly dump "auto_increment = [int]" diff --git a/mysql-test/main/mysqldump_restore.result b/mysql-test/main/mysqldump_restore.result index 4f9d55096ae..9eac8b253de 100644 --- a/mysql-test/main/mysqldump_restore.result +++ b/mysql-test/main/mysqldump_restore.result @@ -21,10 +21,6 @@ ALTER TABLE test.t1 RENAME to test.t1_orig; # Recreated table: test.t1 # Original table: test.t1_orig include/diff_tables.inc [test.t1, test.t1_orig] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead # Cleanup DROP TABLE test.t1, test.t1_orig; # @@ -50,10 +46,6 @@ ALTER TABLE test.t1 RENAME to test.t1_orig; # Recreated table: test.t1 # Original table: test.t1_orig include/diff_tables.inc [test.t1, test.t1_orig] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead # Cleanup DROP TABLE test.t1, test.t1_orig; # @@ -72,10 +64,6 @@ ALTER TABLE test.t1 RENAME to test.t1_orig; # Recreated table: test.t1 # Original table: test.t1_orig include/diff_tables.inc [test.t1, test.t1_orig] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead # Cleanup DROP TABLE test.t1, test.t1_orig; # @@ -95,10 +83,6 @@ ALTER TABLE test.t2 RENAME to test.t2_orig; # Recreated table: test.t2 # Original table: test.t2_orig include/diff_tables.inc [test.t2, test.t2_orig] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead # Cleanup DROP TABLE test.t2, test.t2_orig; DROP TABLE t1; @@ -117,10 +101,6 @@ ALTER TABLE test.t1 RENAME to test.t1_orig; # Recreated table: test.t1 # Original table: test.t1_orig include/diff_tables.inc [test.t1, test.t1_orig] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead # Cleanup DROP TABLE test.t1, test.t1_orig; # End tests diff --git a/mysql-test/main/no_password_column-mdev-11170.result b/mysql-test/main/no_password_column-mdev-11170.result index 6195100436d..94d49a4e762 100644 --- a/mysql-test/main/no_password_column-mdev-11170.result +++ b/mysql-test/main/no_password_column-mdev-11170.result @@ -87,7 +87,7 @@ 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 +foo % N mysql_native_password goo % N mysql_native_password *F3A2A51A9B0F2BE2468926B4132313728C250DBF ioo % N mysql_old_password 7a8f886d28473e85 # diff --git a/mysql-test/main/null.result b/mysql-test/main/null.result index 2fa89a2d001..6601c5e1ed4 100644 --- a/mysql-test/main/null.result +++ b/mysql-test/main/null.result @@ -515,9 +515,9 @@ NULLIF(TIMESTAMP'2001-01-01 00:00:00',1e0), NULLIF(TIMESTAMP'2001-01-01 00:00:00','2001-01-01'), NULLIF(TIMESTAMP'2001-01-01 00:00:00',TIME'00:00:00'); Warnings: -Warning 1292 Incorrect datetime value: '1' -Warning 1292 Incorrect datetime value: '1.0' -Warning 1292 Incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '1.0' +Warning 1292 Truncated incorrect datetime value: '1' SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -536,9 +536,9 @@ NULLIF(DATE'2001-01-01',1e0), NULLIF(DATE'2001-01-01','2001-01-01'), NULLIF(DATE'2001-01-01',TIME'00:00:00'); Warnings: -Warning 1292 Incorrect datetime value: '1' -Warning 1292 Incorrect datetime value: '1.0' -Warning 1292 Incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '1.0' +Warning 1292 Truncated incorrect datetime value: '1' SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -1640,8 +1640,8 @@ CASE WHEN TIMESTAMP'2001-01-01 00:00:00'=1 THEN NULL ELSE TIMESTAMP'2001-01-01 00:00:00' END AS b; Warnings: -Warning 1292 Incorrect datetime value: '1' -Warning 1292 Incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '1' DROP TABLE t1; # # MDEV-8785 Wrong results for EXPLAIN EXTENDED...WHERE NULLIF(latin1_col, _utf8'a' COLLATE utf8_bin) IS NOT NULL diff --git a/mysql-test/main/openssl_1.result b/mysql-test/main/openssl_1.result index ca8d71895e2..3f0483b1e64 100644 --- a/mysql-test/main/openssl_1.result +++ b/mysql-test/main/openssl_1.result @@ -106,7 +106,7 @@ INSERT INTO t1 VALUES (1), (2); /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -140,7 +140,7 @@ UNLOCK TABLES; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -174,7 +174,7 @@ UNLOCK TABLES; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; diff --git a/mysql-test/main/openssl_1.test b/mysql-test/main/openssl_1.test index a3db700f787..dce4f88b6bb 100644 --- a/mysql-test/main/openssl_1.test +++ b/mysql-test/main/openssl_1.test @@ -1,3 +1,6 @@ +# Needed for mysqldump +--source include/have_utf8mb4.inc + # Tests for SSL connections, only run if mysqld is compiled # with support for SSL. diff --git a/mysql-test/main/opt_tvc.result b/mysql-test/main/opt_tvc.result index 0ecae5bf157..d503dab4d99 100644 --- a/mysql-test/main/opt_tvc.result +++ b/mysql-test/main/opt_tvc.result @@ -51,7 +51,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2 100.00 3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0`) where `test`.`t1`.`a` = `tvc_0`.`1` +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0`) where `test`.`t1`.`a` = `tvc_0`.`_col_1` explain extended select * from t1 where a in ( @@ -98,7 +98,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 5 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used 3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0`) semi join ((values (1),(5)) `tvc_1`) where `test`.`t1`.`b` = `tvc_1`.`1` +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0`) semi join ((values (1),(5)) `tvc_1`) where `test`.`t1`.`b` = `tvc_1`.`_col_1` explain extended select * from t1 where a in ( @@ -154,7 +154,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 2 MATERIALIZED t2 ALL NULL NULL NULL NULL 6 100.00 Using where; Using join buffer (flat, BNL join) 4 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (3),(4)) `tvc_0` join `test`.`t2`) where `test`.`t2`.`b` = `tvc_0`.`3` +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (3),(4)) `tvc_0` join `test`.`t2`) where `test`.`t2`.`b` = `tvc_0`.`_col_1` explain extended select * from t1 where a in ( @@ -211,7 +211,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 3 MATERIALIZED <derived4> ALL NULL NULL NULL NULL 2 100.00 4 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0`) where `test`.`t1`.`a` = `tvc_0`.`1` +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0`) where `test`.`t1`.`a` = `tvc_0`.`_col_1` explain extended select * from ( select * @@ -270,7 +270,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 3 MATERIALIZED <derived4> ALL NULL NULL NULL NULL 2 100.00 4 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 with tvc_0 as (/* select#2 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0`) where `test`.`t1`.`a` in (1,2))/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0`) where `test`.`t1`.`a` = `tvc_0`.`1` +Note 1003 with tvc_0 as (/* select#2 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0`) where `test`.`t1`.`a` in (1,2))/* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0`) where `test`.`t1`.`a` = `tvc_0`.`_col_1` explain extended select * from ( select * @@ -321,7 +321,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 3 MATERIALIZED <derived4> ALL NULL NULL NULL NULL 2 100.00 4 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0`) where `test`.`t1`.`a` = `tvc_0`.`1` +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0`) where `test`.`t1`.`a` = `tvc_0`.`_col_1` explain extended select * from v2; id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY <subquery3> ALL distinct_key NULL NULL NULL 2 100.00 @@ -386,7 +386,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 2 MATERIALIZED t1 ALL NULL NULL NULL NULL 6 100.00 Using where; Using join buffer (flat, BNL join) 5 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0` join `test`.`t1`) where `test`.`t1`.`a` = 1 and `test`.`t1`.`a` = `tvc_0`.`1` +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1),(2)) `tvc_0` join `test`.`t1`) where `test`.`t1`.`a` = 1 and `test`.`t1`.`a` = `tvc_0`.`_col_1` explain extended select * from t1 where a in ( @@ -486,34 +486,32 @@ a b deallocate prepare stmt; # use inside out access from tvc rows set @@in_predicate_conversion_threshold= default; -select * from t3 where a in (1,4,10); +select * from t3 where a in (1,4); a b 1 abc 1 todd 1 sm 4 yq -10 abc -explain extended select * from t3 where a in (1,4,10); +explain extended select * from t3 where a in (1,4); id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t3 range idx idx 5 NULL 5 100.00 Using index condition +1 SIMPLE t3 range idx idx 5 NULL 4 100.00 Using index condition Warnings: -Note 1003 select `test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t3` where `test`.`t3`.`a` in (1,4,10) +Note 1003 select `test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t3` where `test`.`t3`.`a` in (1,4) set @@in_predicate_conversion_threshold= 2; -select * from t3 where a in (1,4,10); +select * from t3 where a in (1,4); a b 1 abc 1 todd 1 sm 4 yq -10 abc -explain extended select * from t3 where a in (1,4,10); +explain extended select * from t3 where a in (1,4); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2 100.00 -1 PRIMARY t3 ref idx idx 5 tvc_0.1 3 100.00 +1 PRIMARY t3 ref idx idx 5 tvc_0._col_1 3 100.00 2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2 100.00 3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t3` semi join ((values (1),(4),(10)) `tvc_0`) where `test`.`t3`.`a` = `tvc_0`.`1` +Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t3` semi join ((values (1),(4)) `tvc_0`) where `test`.`t3`.`a` = `tvc_0`.`_col_1` # use vectors in IN predeicate set @@in_predicate_conversion_threshold= 4; select * from t1 where (a,b) in ((1,2),(3,4)); @@ -526,7 +524,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2 100.00 3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1,2),(3,4)) `tvc_0`) where `test`.`t1`.`a` = `tvc_0`.`1` and `test`.`t1`.`b` = `tvc_0`.`2` +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` semi join ((values (1,2),(3,4)) `tvc_0`) where `test`.`t1`.`a` = `tvc_0`.`_col_1` and `test`.`t1`.`b` = `tvc_0`.`_col_2` set @@in_predicate_conversion_threshold= 2; # trasformation works for the one IN predicate and doesn't work for the other set @@in_predicate_conversion_threshold= 5; @@ -540,12 +538,12 @@ explain extended select * from t2 where (a,b) in ((1,2),(8,9)) and (a,c) in ((1,3),(8,0),(5,1)); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2 100.00 +1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 3 100.00 1 PRIMARY t2 ALL NULL NULL NULL NULL 6 100.00 Using where; Using join buffer (flat, BNL join) -2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2 100.00 +2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 3 100.00 3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 /* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` semi join ((values (1,3),(8,0),(5,1)) `tvc_0`) where `test`.`t2`.`a` = `tvc_0`.`1` and `test`.`t2`.`c` = `tvc_0`.`3` and (`tvc_0`.`1`,`test`.`t2`.`b`) in (<cache>((1,2)),<cache>((8,9))) +Note 1003 /* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` semi join ((values (1,3),(8,0),(5,1)) `tvc_0`) where `test`.`t2`.`a` = `tvc_0`.`_col_1` and `test`.`t2`.`c` = `tvc_0`.`_col_2` and (`tvc_0`.`_col_1`,`test`.`t2`.`b`) in (<cache>((1,2)),<cache>((8,9))) set @@in_predicate_conversion_threshold= 2; # # mdev-14281: conversion of NOT IN predicate into subquery predicate @@ -570,15 +568,15 @@ explain extended select * from t1 where (a,b) not in ((1,2),(8,9), (5,1)); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2 100.00 +2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 3 100.00 3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where !<expr_cache><`test`.`t1`.`a`,`test`.`t1`.`b`>(<in_optimizer>((`test`.`t1`.`a`,`test`.`t1`.`b`),(`test`.`t1`.`a`,`test`.`t1`.`b`) in ( <materialize> (/* select#2 */ select `tvc_0`.`1`,`tvc_0`.`2` from (values (1,2),(8,9),(5,1)) `tvc_0` ), <primary_index_lookup>(`test`.`t1`.`a` in <temporary table> on distinct_key where `test`.`t1`.`a` = `<subquery2>`.`1` and `test`.`t1`.`b` = `<subquery2>`.`2`)))) +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where !<expr_cache><`test`.`t1`.`a`,`test`.`t1`.`b`>(<in_optimizer>((`test`.`t1`.`a`,`test`.`t1`.`b`),(`test`.`t1`.`a`,`test`.`t1`.`b`) in ( <materialize> (/* select#2 */ select `tvc_0`.`_col_1`,`tvc_0`.`_col_2` from (values (1,2),(8,9),(5,1)) `tvc_0` ), <primary_index_lookup>(`test`.`t1`.`a` in <temporary table> on distinct_key where `test`.`t1`.`a` = `<subquery2>`.`_col_1` and `test`.`t1`.`b` = `<subquery2>`.`_col_2`)))) explain extended select * from t1 where (a,b) not in (select * from (values (1,2),(8,9), (5,1)) as tvc_0); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2 100.00 +2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 3 100.00 3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where !<expr_cache><`test`.`t1`.`a`,`test`.`t1`.`b`>(<in_optimizer>((`test`.`t1`.`a`,`test`.`t1`.`b`),(`test`.`t1`.`a`,`test`.`t1`.`b`) in ( <materialize> (/* select#2 */ select `tvc_0`.`1`,`tvc_0`.`2` from (values (1,2),(8,9),(5,1)) `tvc_0` ), <primary_index_lookup>(`test`.`t1`.`a` in <temporary table> on distinct_key where `test`.`t1`.`a` = `<subquery2>`.`1` and `test`.`t1`.`b` = `<subquery2>`.`2`)))) @@ -592,10 +590,10 @@ explain extended select * from t1 where b < 7 and (a,b) not in ((1,2),(8,9), (5,1)); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where -2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2 100.00 +2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 3 100.00 3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`b` < 7 and !<expr_cache><`test`.`t1`.`a`,`test`.`t1`.`b`>(<in_optimizer>((`test`.`t1`.`a`,`test`.`t1`.`b`),(`test`.`t1`.`a`,`test`.`t1`.`b`) in ( <materialize> (/* select#2 */ select `tvc_0`.`1`,`tvc_0`.`2` from (values (1,2),(8,9),(5,1)) `tvc_0` ), <primary_index_lookup>(`test`.`t1`.`a` in <temporary table> on distinct_key where `test`.`t1`.`a` = `<subquery2>`.`1` and `test`.`t1`.`b` = `<subquery2>`.`2`)))) +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`b` < 7 and !<expr_cache><`test`.`t1`.`a`,`test`.`t1`.`b`>(<in_optimizer>((`test`.`t1`.`a`,`test`.`t1`.`b`),(`test`.`t1`.`a`,`test`.`t1`.`b`) in ( <materialize> (/* select#2 */ select `tvc_0`.`_col_1`,`tvc_0`.`_col_2` from (values (1,2),(8,9),(5,1)) `tvc_0` ), <primary_index_lookup>(`test`.`t1`.`a` in <temporary table> on distinct_key where `test`.`t1`.`a` = `<subquery2>`.`_col_1` and `test`.`t1`.`b` = `<subquery2>`.`_col_2`)))) select * from t2 where (a,c) not in ((1,2),(8,9), (5,1)); a b c @@ -608,14 +606,14 @@ explain extended select * from t2 where (a,c) not in ((1,2),(8,9), (5,1)); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 6 100.00 Using where -2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2 100.00 +2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 3 100.00 3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 /* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where !<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`c`>(<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`c`),(`test`.`t2`.`a`,`test`.`t2`.`c`) in ( <materialize> (/* select#2 */ select `tvc_0`.`1`,`tvc_0`.`2` from (values (1,2),(8,9),(5,1)) `tvc_0` ), <primary_index_lookup>(`test`.`t2`.`a` in <temporary table> on distinct_key where `test`.`t2`.`a` = `<subquery2>`.`1` and `test`.`t2`.`c` = `<subquery2>`.`2`)))) +Note 1003 /* select#1 */ select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where !<expr_cache><`test`.`t2`.`a`,`test`.`t2`.`c`>(<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`c`),(`test`.`t2`.`a`,`test`.`t2`.`c`) in ( <materialize> (/* select#2 */ select `tvc_0`.`_col_1`,`tvc_0`.`_col_2` from (values (1,2),(8,9),(5,1)) `tvc_0` ), <primary_index_lookup>(`test`.`t2`.`a` in <temporary table> on distinct_key where `test`.`t2`.`a` = `<subquery2>`.`_col_1` and `test`.`t2`.`c` = `<subquery2>`.`_col_2`)))) drop table t1, t2, t3; set @@in_predicate_conversion_threshold= default; # -# MDEV-14947: conversion of TVC with only NULL values +# MDEV-14947: conversion to TVC with only NULL values # CREATE TABLE t1 (i INT); INSERT INTO t1 VALUES (3), (2), (7); @@ -632,14 +630,14 @@ i EXPLAIN EXTENDED SELECT * FROM t1 WHERE i IN (NULL, NULL, NULL, NULL, NULL); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 -1 PRIMARY <derived3> ALL NULL NULL NULL NULL 2 100.00 Using where; FirstMatch(t1); Using join buffer (flat, BNL join) +1 PRIMARY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using where; FirstMatch(t1); Using join buffer (flat, BNL join) 3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`i` AS `i` from `test`.`t1` semi join ((values (NULL),(NULL),(NULL),(NULL),(NULL)) `tvc_0`) where `test`.`t1`.`i` = `tvc_0`.`NULL` +Note 1003 /* select#1 */ select `test`.`t1`.`i` AS `i` from `test`.`t1` semi join ((values (NULL),(NULL),(NULL),(NULL),(NULL)) `tvc_0`) where `test`.`t1`.`i` = `tvc_0`.`_col_1` SET in_predicate_conversion_threshold= default; DROP TABLE t1; # -# MDEV-14835: conversion of TVC with BIGINT or YEAR values +# MDEV-14835: conversion to TVC with BIGINT or YEAR values # SET @@in_predicate_conversion_threshold= 2; CREATE TABLE t1 (a BIGINT); @@ -656,3 +654,36 @@ y 2011 DROP TABLE t1,t2; SET @@in_predicate_conversion_threshold= default; +# +# MDEV-17222: conversion to TVC with no names for constants +# conversion to TVC with the same constants in the first row +# +SET @@in_predicate_conversion_threshold= 2; +CREATE TABLE t1 (f BINARY(16)) ENGINE=MYISAM; +INSERT INTO t1 VALUES +(x'BAE56AF2B1C2397D99D58E2A06761DDB'), (x'9B9B698BCCB939EE8F1EA56C1A2E5DAA'), +(x'A0A1C4FE39A239BABD3E0D8985E6BEA5'); +SELECT COUNT(*) FROM t1 WHERE f IN +(x'9B9B698BCCB939EE8F1EA56C1A2E5DAA', x'E2362DBAB5EA30B5804917A0A7D881E2', +x'B78B2EEAD13635088D93EA3309E24802', x'BAE56AF2B1C2397D99D58E2A06761DDB'); +COUNT(*) +2 +CREATE TABLE t2 (f1 BINARY(16), f2 BINARY(16)) ENGINE=MYISAM; +INSERT INTO t2 VALUES +(x'55FB3B14D6B83D39859E42533906350D', x'00F3458C47FA39DDBEAD918A13F8342E'), +(x'86052C062AAF368D84247ED0F6346A70', x'BF5C35045C6037C79E11026ABB9A3A4E'); +SELECT COUNT(*) FROM t2 WHERE (f1,f2) IN +((x'9B9B698BCCB939EE8F1EA56C1A2E5DAA', x'E2362DBAB5EA30B5804917A0A7D881E2'), +(x'B78B2EEAD13635088D93EA3309E24802', x'BAE56AF2B1C2397D99D58E2A06761DDB'), +(x'55FB3B14D6B83D39859E42533906350D', x'00F3458C47FA39DDBEAD918A13F8342E'), +(x'1606014E7C4A312F83EDC9D91BBFCACA', x'33F6068E56FD3A1D8326517F0D81CB5A')); +COUNT(*) +1 +CREATE TABLE t3 (f1 int, f2 int) ENGINE=MYISAM; +INSERT INTO t3 VALUES (2,5), (2,3), (1,2), (7,8), (1,1); +SELECT * FROM t3 WHERE (f1,f2) IN ((2, 2), (1, 2), (3, 5), (1, 1)); +f1 f2 +1 2 +1 1 +DROP TABLE t1,t2,t3; +SET @@in_predicate_conversion_threshold= default; diff --git a/mysql-test/main/opt_tvc.test b/mysql-test/main/opt_tvc.test index d5c9a5cbd3d..733ee0792fe 100644 --- a/mysql-test/main/opt_tvc.test +++ b/mysql-test/main/opt_tvc.test @@ -255,7 +255,7 @@ deallocate prepare stmt; --echo # use inside out access from tvc rows -let $query= select * from t3 where a in (1,4,10); +let $query= select * from t3 where a in (1,4); set @@in_predicate_conversion_threshold= default; eval $query; eval explain extended $query; @@ -320,7 +320,7 @@ drop table t1, t2, t3; set @@in_predicate_conversion_threshold= default; --echo # ---echo # MDEV-14947: conversion of TVC with only NULL values +--echo # MDEV-14947: conversion to TVC with only NULL values --echo # CREATE TABLE t1 (i INT); @@ -342,7 +342,7 @@ SET in_predicate_conversion_threshold= default; DROP TABLE t1; --echo # ---echo # MDEV-14835: conversion of TVC with BIGINT or YEAR values +--echo # MDEV-14835: conversion to TVC with BIGINT or YEAR values --echo # SET @@in_predicate_conversion_threshold= 2; @@ -360,3 +360,39 @@ SELECT * FROM t2 WHERE y IN ('2009','2011'); DROP TABLE t1,t2; SET @@in_predicate_conversion_threshold= default; + +--echo # +--echo # MDEV-17222: conversion to TVC with no names for constants +--echo # conversion to TVC with the same constants in the first row +--echo # + +SET @@in_predicate_conversion_threshold= 2; + +CREATE TABLE t1 (f BINARY(16)) ENGINE=MYISAM; +INSERT INTO t1 VALUES +(x'BAE56AF2B1C2397D99D58E2A06761DDB'), (x'9B9B698BCCB939EE8F1EA56C1A2E5DAA'), +(x'A0A1C4FE39A239BABD3E0D8985E6BEA5'); + +SELECT COUNT(*) FROM t1 WHERE f IN +(x'9B9B698BCCB939EE8F1EA56C1A2E5DAA', x'E2362DBAB5EA30B5804917A0A7D881E2', + x'B78B2EEAD13635088D93EA3309E24802', x'BAE56AF2B1C2397D99D58E2A06761DDB'); + +CREATE TABLE t2 (f1 BINARY(16), f2 BINARY(16)) ENGINE=MYISAM; +INSERT INTO t2 VALUES +(x'55FB3B14D6B83D39859E42533906350D', x'00F3458C47FA39DDBEAD918A13F8342E'), +(x'86052C062AAF368D84247ED0F6346A70', x'BF5C35045C6037C79E11026ABB9A3A4E'); + +SELECT COUNT(*) FROM t2 WHERE (f1,f2) IN +((x'9B9B698BCCB939EE8F1EA56C1A2E5DAA', x'E2362DBAB5EA30B5804917A0A7D881E2'), + (x'B78B2EEAD13635088D93EA3309E24802', x'BAE56AF2B1C2397D99D58E2A06761DDB'), + (x'55FB3B14D6B83D39859E42533906350D', x'00F3458C47FA39DDBEAD918A13F8342E'), + (x'1606014E7C4A312F83EDC9D91BBFCACA', x'33F6068E56FD3A1D8326517F0D81CB5A')); + +CREATE TABLE t3 (f1 int, f2 int) ENGINE=MYISAM; +INSERT INTO t3 VALUES (2,5), (2,3), (1,2), (7,8), (1,1); + +SELECT * FROM t3 WHERE (f1,f2) IN ((2, 2), (1, 2), (3, 5), (1, 1)); + +DROP TABLE t1,t2,t3; + +SET @@in_predicate_conversion_threshold= default; diff --git a/mysql-test/main/order_by_zerolength-4285.result b/mysql-test/main/order_by_zerolength-4285.result index e6902105f20..95b4224f5a2 100644 --- a/mysql-test/main/order_by_zerolength-4285.result +++ b/mysql-test/main/order_by_zerolength-4285.result @@ -25,3 +25,23 @@ Warning 1292 Truncated incorrect CHAR(0) value: '8' Warning 1292 Truncated incorrect CHAR(0) value: '9' Warning 1292 Truncated incorrect CHAR(0) value: '10' drop table t1; +# +# MDEV-17020: Assertion `length > 0' failed in ptr_compare upon ORDER BY with bad conversion +# +set @save_sql_mode= @@sql_mode; +SET @@sql_mode= ''; +CREATE TABLE t1 (pk INT PRIMARY KEY); +INSERT INTO t1 VALUES (1),(2); +explain +SELECT * FROM t1 ORDER BY 'foo', CONVERT(pk, CHAR(0)) LIMIT 2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL PRIMARY 4 NULL 2 Using index; Using filesort +SELECT * FROM t1 ORDER BY 'foo', Cast(pk as CHAR(0)) LIMIT 2; +pk +1 +2 +Warnings: +Warning 1292 Truncated incorrect CHAR(0) value: '1' +Warning 1292 Truncated incorrect CHAR(0) value: '2' +set @@sql_mode= @save_sql_mode; +drop table t1; diff --git a/mysql-test/main/order_by_zerolength-4285.test b/mysql-test/main/order_by_zerolength-4285.test index 079ce8da71e..52672aa4595 100644 --- a/mysql-test/main/order_by_zerolength-4285.test +++ b/mysql-test/main/order_by_zerolength-4285.test @@ -13,3 +13,17 @@ select * from t1 order by now(), cast(pk as char(0)); --enable_warnings show warnings; drop table t1; + +--echo # +--echo # MDEV-17020: Assertion `length > 0' failed in ptr_compare upon ORDER BY with bad conversion +--echo # + +set @save_sql_mode= @@sql_mode; +SET @@sql_mode= ''; +CREATE TABLE t1 (pk INT PRIMARY KEY); +INSERT INTO t1 VALUES (1),(2); +explain +SELECT * FROM t1 ORDER BY 'foo', CONVERT(pk, CHAR(0)) LIMIT 2; +SELECT * FROM t1 ORDER BY 'foo', Cast(pk as CHAR(0)) LIMIT 2; +set @@sql_mode= @save_sql_mode; +drop table t1; diff --git a/mysql-test/main/parser.result b/mysql-test/main/parser.result index 69207f7ca23..4a3a9ed2380 100644 --- a/mysql-test/main/parser.result +++ b/mysql-test/main/parser.result @@ -1684,3 +1684,24 @@ SELECT without VERSIONING FROM t1 SELECT without WITHOUT FROM t1 DROP PROCEDURE p2; DROP PROCEDURE p1; +# +# MDEV-16697: Fix difference between 32bit/windows and 64bit +# systems in allowed select nest level +# +SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT +(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT +(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT +(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT +(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT +(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT +(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT +(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT +1 +))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); +(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT +(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT +(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT +(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT +(SELECT +1 +End of 10.3 tests diff --git a/mysql-test/main/parser.test b/mysql-test/main/parser.test index 33316d42b95..1806816ca5d 100644 --- a/mysql-test/main/parser.test +++ b/mysql-test/main/parser.test @@ -1446,3 +1446,20 @@ CALL p2('without'); DROP PROCEDURE p2; DROP PROCEDURE p1; + + +--echo # +--echo # MDEV-16697: Fix difference between 32bit/windows and 64bit +--echo # systems in allowed select nest level +--echo # + SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT +(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT +(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT +(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT +(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT +(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT +(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT +(SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT (SELECT +1 +))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); +--echo End of 10.3 tests diff --git a/mysql-test/main/partition_error.result b/mysql-test/main/partition_error.result index 349e9771367..868eb3b0924 100644 --- a/mysql-test/main/partition_error.result +++ b/mysql-test/main/partition_error.result @@ -1866,3 +1866,12 @@ pUpTo10 p-10sp1 This is a long comment (2050 ascii characters) 50 pUpTo10 part pMax pMaxsp0 This is a long comment (2050 ascii characters) 50 pMax partition comment .80-! pMax pMaxsp1 This is a long comment (2050 ascii characters) 50 pMax partition comment .80-! DROP TABLE t1; +CREATE OR REPLACE TABLE t1 ( +pk INT PRIMARY KEY, +c CHAR(3) NOT NULL, +v CHAR(4) AS (c) VIRTUAL +) WITH SYSTEM VERSIONING PARTITION BY HASH(pk); +INSERT INTO t1 (pk,c) VALUES (1,'foo'),(2,'bar'); +UPDATE t1 SET v = 'qux' WHERE pk = 2; +ERROR HY000: The value specified for generated column 'v' in table 't1' ignored +DROP TABLE t1; diff --git a/mysql-test/main/partition_error.test b/mysql-test/main/partition_error.test index 3ee54605c36..8739c93fe92 100644 --- a/mysql-test/main/partition_error.test +++ b/mysql-test/main/partition_error.test @@ -2074,3 +2074,21 @@ SELECT PARTITION_NAME, SUBPARTITION_NAME, PARTITION_COMMENT FROM INFORMATION_SCH WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test'; DROP TABLE t1; + +# +# MDEV-16429 +# Assertion `!table || (!table->read_set +# || bitmap_is_set(table->read_set, field_index))' +# fails upon attempt to update virtual column on partitioned versioned table +# +CREATE OR REPLACE TABLE t1 ( + pk INT PRIMARY KEY, + c CHAR(3) NOT NULL, + v CHAR(4) AS (c) VIRTUAL +) WITH SYSTEM VERSIONING PARTITION BY HASH(pk); + +INSERT INTO t1 (pk,c) VALUES (1,'foo'),(2,'bar'); +-- error ER_WARNING_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN +UPDATE t1 SET v = 'qux' WHERE pk = 2; + +DROP TABLE t1; diff --git a/mysql-test/main/partition_explicit_prune.result b/mysql-test/main/partition_explicit_prune.result index c6b3dd35e08..8780c75eba4 100644 --- a/mysql-test/main/partition_explicit_prune.result +++ b/mysql-test/main/partition_explicit_prune.result @@ -1872,3 +1872,22 @@ CREATE TABLE t2 LIKE t1 PARTITION (p0, p2); 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 'PARTITION (p0, p2)' at line 1 DROP TABLE t1; SET @@default_storage_engine = @old_default_storage_engine; +# +# MDEV-14815 - Server crash or AddressSanitizer errors or valgrind warnings in thr_lock / has_old_lock upon FLUSH TABLES +# +CREATE TABLE t1 (i INT) ENGINE=MEMORY PARTITION BY RANGE (i) (PARTITION p0 VALUES LESS THAN (4), PARTITION pm VALUES LESS THAN MAXVALUE); +CREATE TABLE t2 (i INT) ENGINE=MEMORY; +LOCK TABLE t1 WRITE, t2 WRITE; +SELECT * FROM t1 PARTITION (p0); +i +FLUSH TABLES; +SELECT * FROM t1 PARTITION (p0); +i +ALTER TABLE t1 TRUNCATE PARTITION p0; +SELECT * FROM t1 PARTITION (p0); +i +ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2; +SELECT * FROM t1 PARTITION (p0); +i +UNLOCK TABLES; +DROP TABLE t1, t2; diff --git a/mysql-test/main/partition_explicit_prune.test b/mysql-test/main/partition_explicit_prune.test index 68b829fbcc3..b8b6e480ce9 100644 --- a/mysql-test/main/partition_explicit_prune.test +++ b/mysql-test/main/partition_explicit_prune.test @@ -858,3 +858,22 @@ CREATE TABLE t2 LIKE t1 PARTITION (p0, p2); DROP TABLE t1; SET @@default_storage_engine = @old_default_storage_engine; + + +--echo # +--echo # MDEV-14815 - Server crash or AddressSanitizer errors or valgrind warnings in thr_lock / has_old_lock upon FLUSH TABLES +--echo # +CREATE TABLE t1 (i INT) ENGINE=MEMORY PARTITION BY RANGE (i) (PARTITION p0 VALUES LESS THAN (4), PARTITION pm VALUES LESS THAN MAXVALUE); +CREATE TABLE t2 (i INT) ENGINE=MEMORY; +LOCK TABLE t1 WRITE, t2 WRITE; +SELECT * FROM t1 PARTITION (p0); +FLUSH TABLES; +SELECT * FROM t1 PARTITION (p0); +ALTER TABLE t1 TRUNCATE PARTITION p0; +SELECT * FROM t1 PARTITION (p0); +ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2; +SELECT * FROM t1 PARTITION (p0); +UNLOCK TABLES; + +# Cleanup +DROP TABLE t1, t2; diff --git a/mysql-test/main/partition_pruning.result b/mysql-test/main/partition_pruning.result index 422132dd1c3..00bd24101d6 100644 --- a/mysql-test/main/partition_pruning.result +++ b/mysql-test/main/partition_pruning.result @@ -3484,3 +3484,36 @@ select * from t1 where (a = 1 AND b < 'd' AND (c = 'b' OR (c = 'c' AND d = 1)) O a b c d 1 a b 1 drop table t1; +# +# MDEV-17493: Partition pruning doesn't work for nested outer joins +# +create table t0(a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1 (a int, b int, c int); +insert into t1 select a,a,a from t0; +create table t2 (a int, b int, c int); +insert into t2 select a,a,a from t0; +create table t3 ( +part_id int, +a int +) partition by list (part_id) ( +partition p0 values in (0), +partition p1 values in (1), +partition p2 values in (2), +partition p3 values in (3), +partition p4 values in (4) +); +insert into t3 select mod(a,5), a from t0; +explain partitions +select * from t1 left join t3 on (t1.a=t3.a and t3.part_id=3); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 +1 SIMPLE t3 p3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +# The following should have partitions="p3", NOT p0,p1,p2,p3,p4: +explain partitions +select * from t1 left join (t3 join t2) on (t1.a=t3.a and t3.a=t2.b and t3.part_id=3); +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 10 +1 SIMPLE t3 p3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join) +1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 10 Using where; Using join buffer (incremental, BNL join) +drop table t0,t1,t2,t3; diff --git a/mysql-test/main/partition_pruning.test b/mysql-test/main/partition_pruning.test index 9d72e9c0d01..2879b0eae6c 100644 --- a/mysql-test/main/partition_pruning.test +++ b/mysql-test/main/partition_pruning.test @@ -1535,4 +1535,35 @@ select * from t1 where (a = 1 AND b < 'd' AND (c = 'b' OR (c = 'c' AND d = 1)) O (a = 1 AND b >= 'a' AND (c = 'c' OR (c = 'd' AND d = 2)))); drop table t1; +--echo # +--echo # MDEV-17493: Partition pruning doesn't work for nested outer joins +--echo # + +create table t0(a int); +insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1 (a int, b int, c int); +insert into t1 select a,a,a from t0; +create table t2 (a int, b int, c int); +insert into t2 select a,a,a from t0; + +create table t3 ( + part_id int, + a int +) partition by list (part_id) ( + partition p0 values in (0), + partition p1 values in (1), + partition p2 values in (2), + partition p3 values in (3), + partition p4 values in (4) +); +insert into t3 select mod(a,5), a from t0; + +explain partitions +select * from t1 left join t3 on (t1.a=t3.a and t3.part_id=3); + +--echo # The following should have partitions="p3", NOT p0,p1,p2,p3,p4: +explain partitions +select * from t1 left join (t3 join t2) on (t1.a=t3.a and t3.a=t2.b and t3.part_id=3); + +drop table t0,t1,t2,t3; diff --git a/mysql-test/main/plugin.result b/mysql-test/main/plugin.result index 3a141a25b5c..38a03920039 100644 --- a/mysql-test/main/plugin.result +++ b/mysql-test/main/plugin.result @@ -331,3 +331,48 @@ UNINSTALL PLUGIN example; RENAME TABLE t1 TO t2; ERROR 42S02: Table 'test.t1' doesn't exist DROP TABLE t1; +# +# INSTALL IF NOT EXISTS PLUGIN name SONAME library / +# UNINSTALL IF EXISTS PLUGIN|SONAME name +# +select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%'; +PLUGIN_NAME PLUGIN_STATUS PLUGIN_TYPE +INSTALL PLUGIN IF NOT EXISTS example SONAME 'ha_example'; +select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%'; +PLUGIN_NAME PLUGIN_STATUS PLUGIN_TYPE +EXAMPLE ACTIVE STORAGE ENGINE +INSTALL PLUGIN example SONAME 'ha_example'; +ERROR HY000: Plugin 'example' already installed +INSTALL PLUGIN IF NOT EXISTS example SONAME 'ha_example'; +Warnings: +Note 1968 Plugin 'example' already installed +SHOW WARNINGS; +Level Code Message +Note 1968 Plugin 'example' already installed +UNINSTALL PLUGIN IF EXISTS example; +select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%'; +PLUGIN_NAME PLUGIN_STATUS PLUGIN_TYPE +UNINSTALL PLUGIN IF EXISTS example; +Warnings: +Note 1305 PLUGIN example does not exist +SHOW WARNINGS; +Level Code Message +Note 1305 PLUGIN example does not exist +UNINSTALL PLUGIN example; +ERROR 42000: PLUGIN example does not exist +INSTALL SONAME 'ha_example'; +select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%'; +PLUGIN_NAME PLUGIN_STATUS PLUGIN_TYPE +EXAMPLE ACTIVE STORAGE ENGINE +UNUSABLE ACTIVE DAEMON +UNINSTALL SONAME IF EXISTS 'ha_example'; +UNINSTALL SONAME IF EXISTS 'ha_example'; +Warnings: +Note 1305 SONAME ha_example.so does not exist +SHOW WARNINGS; +Level Code Message +Note 1305 SONAME ha_example.so does not exist +select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%'; +PLUGIN_NAME PLUGIN_STATUS PLUGIN_TYPE +UNINSTALL SONAME 'ha_example'; +ERROR 42000: SONAME ha_example.so does not exist diff --git a/mysql-test/main/plugin.test b/mysql-test/main/plugin.test index 68c4d5afd64..273e1e064a5 100644 --- a/mysql-test/main/plugin.test +++ b/mysql-test/main/plugin.test @@ -265,3 +265,43 @@ UNINSTALL PLUGIN example; --error ER_NO_SUCH_TABLE RENAME TABLE t1 TO t2; DROP TABLE t1; + +--echo # +--echo # INSTALL IF NOT EXISTS PLUGIN name SONAME library / +--echo # UNINSTALL IF EXISTS PLUGIN|SONAME name +--echo # + +select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%'; +INSTALL PLUGIN IF NOT EXISTS example SONAME 'ha_example'; +select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%'; + +--replace_regex /\.dll/.so/ +--error ER_PLUGIN_INSTALLED +INSTALL PLUGIN example SONAME 'ha_example'; + +INSTALL PLUGIN IF NOT EXISTS example SONAME 'ha_example'; +SHOW WARNINGS; + +UNINSTALL PLUGIN IF EXISTS example; +select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%'; + +UNINSTALL PLUGIN IF EXISTS example; +SHOW WARNINGS; + +--error 1305 +UNINSTALL PLUGIN example; + +INSTALL SONAME 'ha_example'; +select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%'; + +UNINSTALL SONAME IF EXISTS 'ha_example'; + +--replace_regex /\.dll/.so/ +UNINSTALL SONAME IF EXISTS 'ha_example'; +--replace_regex /\.dll/.so/ +SHOW WARNINGS; +select PLUGIN_NAME,PLUGIN_STATUS,PLUGIN_TYPE from information_schema.plugins where plugin_library like 'ha_example%'; + +--replace_regex /\.dll/.so/ +--error 1305 +UNINSTALL SONAME 'ha_example'; diff --git a/mysql-test/main/plugin_auth.result b/mysql-test/main/plugin_auth.result index e470cc010c0..899e0292142 100644 --- a/mysql-test/main/plugin_auth.result +++ b/mysql-test/main/plugin_auth.result @@ -30,7 +30,7 @@ proxies_priv CREATE TABLE `proxies_priv` ( `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`), KEY `Grantor` (`Grantor`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User proxy privileges' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='User proxy privileges' connect plug_con,localhost,plug,plug_dest; connection plug_con; select USER(),CURRENT_USER(); diff --git a/mysql-test/main/plugin_auth_qa.result b/mysql-test/main/plugin_auth_qa.result index 4f274c45971..2353bc80f84 100644 --- a/mysql-test/main/plugin_auth_qa.result +++ b/mysql-test/main/plugin_auth_qa.result @@ -106,7 +106,7 @@ CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string plug test_plugin_server plug_dest -plug_dest +plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER plug, plug_dest; CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; @@ -116,7 +116,7 @@ DROP USER plug; CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string -plug_dest +plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER plug_dest; GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; @@ -126,7 +126,7 @@ CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string plug test_plugin_server plug_dest -plug_dest +plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER plug, plug_dest; GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH test_plugin_server AS 'plug_dest'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; @@ -136,7 +136,7 @@ DROP USER plug; CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string -plug_dest +plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER plug_dest; CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; @@ -146,7 +146,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_pas SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string plug test_plugin_server plug_dest -plug_dest +plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER plug, plug_dest; CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; @@ -156,7 +156,7 @@ DROP USER plug; GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string -plug_dest +plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER plug_dest; CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; @@ -175,7 +175,7 @@ plug test_plugin_server plug_dest GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; user plugin authentication_string password -plug *939AEE68989794C0F408277411C26055CDF41119 +plug mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER plug; GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH test_plugin_server AS 'plug_dest'; CREATE USER plug IDENTIFIED BY 'plug_dest_passwd'; @@ -209,7 +209,7 @@ DROP USER plüg; CREATE USER plüg_dest IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string -plüg_dest +plüg_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER plüg_dest; SET NAMES ascii; CREATE USER 'plüg' IDENTIFIED WITH 'test_plugin_server' AS 'plüg_dest'; @@ -220,7 +220,7 @@ DROP USER 'plüg'; CREATE USER 'plüg_dest' IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string -pl??g_dest +pl??g_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER 'plüg_dest'; SET NAMES latin1; ========== test 1.1.1.5 ==================================== @@ -234,7 +234,7 @@ DROP USER 'plug'; CREATE USER 'plüg_dest' IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string -plüg_dest +plüg_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER 'plüg_dest'; SET NAMES utf8; CREATE USER plüg IDENTIFIED WITH 'test_plügin_server' AS 'plüg_dest'; @@ -247,7 +247,7 @@ DROP USER 'plüg'; CREATE USER 'plüg_dest' IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string -plüg_dest +plüg_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER 'plüg_dest'; CREATE USER plüg IDENTIFIED WITH test_plugin_server AS 'plüg_dest'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; @@ -257,7 +257,7 @@ DROP USER plüg; CREATE USER plüg_dest IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string -plüg_dest +plüg_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER plüg_dest; ========== test 1.1.1.2/1.1.2.2============================= SET @auth_name= 'test_plugin_server'; @@ -277,7 +277,7 @@ DROP USER plug; CREATE USER 'hh''s_plug_dest' IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string -hh's_plug_dest +hh's_plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER 'hh''s_plug_dest'; ========== test 1.1.1.4 ==================================== CREATE USER plug IDENTIFIED WITH hh''s_test_plugin_server AS 'plug_dest'; @@ -293,7 +293,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string grant_user test_plugin_server plug_dest -plug_dest +plug_dest mysql_native_password DROP USER grant_user,plug_dest; set @save_sql_mode= @@sql_mode; SET @@sql_mode=no_auto_create_user; @@ -314,13 +314,13 @@ CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; user plugin authentication_string password grant_user test_plugin_server plug_dest -plug_dest *939AEE68989794C0F408277411C26055CDF41119 +plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER plug_dest; GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_user_passwd'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; user plugin authentication_string password grant_user test_plugin_server plug_dest -plug_dest *560881EB651416CEF77314D07D55EDCD5FC1BD6D +plug_dest mysql_native_password *560881EB651416CEF77314D07D55EDCD5FC1BD6D DROP USER grant_user,plug_dest; set @@sql_mode= @save_sql_mode; DROP DATABASE test_user_db; diff --git a/mysql-test/main/plugin_auth_qa_1.result b/mysql-test/main/plugin_auth_qa_1.result index 42a7b1491c0..b04483722b8 100644 --- a/mysql-test/main/plugin_auth_qa_1.result +++ b/mysql-test/main/plugin_auth_qa_1.result @@ -20,7 +20,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_pas GRANT PROXY ON plug_dest TO plug_user; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string -plug_dest +plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_user test_plugin_server plug_dest 1) current_user() @@ -71,7 +71,7 @@ GRANT PROXY ON new_dest TO plug_user; ERROR 1045 (28000): Access denied for user 'plug_user'@'localhost' (using password: YES) SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string -new_dest +new_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_user test_plugin_server plug_dest DROP USER plug_user,new_dest; CREATE USER plug_user @@ -89,7 +89,7 @@ GRANT PROXY ON new_dest TO plug_user; ERROR 1045 (28000): Access denied for user 'plug_user'@'localhost' (using password: YES) SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string -new_dest +new_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_user test_plugin_server plug_dest DROP USER plug_user,new_dest; CREATE USER plug_user @@ -111,13 +111,13 @@ connection default; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string new_user test_plugin_server plug_dest -plug_dest +plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 disconnect plug_user; UPDATE mysql.user SET user='plug_user' WHERE user='new_user'; FLUSH PRIVILEGES; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string -plug_dest +plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_user test_plugin_server plug_dest DROP USER plug_dest,plug_user; ========== test 1.3 ======================================== @@ -133,34 +133,36 @@ connection default; disconnect plug_user; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string -plug_dest +plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_user test_plugin_server plug_dest UPDATE mysql.user SET user='new_user' WHERE user='plug_user'; FLUSH PRIVILEGES; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string new_user test_plugin_server plug_dest -plug_dest +plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 UPDATE mysql.user SET authentication_string='new_dest' WHERE user='new_user'; FLUSH PRIVILEGES; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string new_user test_plugin_server new_dest -plug_dest +plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 UPDATE mysql.user SET plugin='new_plugin_server' WHERE user='new_user'; FLUSH PRIVILEGES; +Warnings: +Warning 1524 Plugin 'new_plugin_server' is not loaded SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string new_user new_plugin_server new_dest -plug_dest -ERROR HY000: Plugin 'new_plugin_server' is not loaded +plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 +ERROR 28000: Access denied for user 'new_user'@'localhost' (using password: YES) UPDATE mysql.user SET plugin='test_plugin_server' WHERE user='new_user'; UPDATE mysql.user SET USER='new_dest' WHERE user='plug_dest'; FLUSH PRIVILEGES; GRANT PROXY ON new_dest TO new_user; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string -new_dest +new_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 new_user test_plugin_server new_dest connect plug_user,localhost,new_user,new_dest; select USER(),CURRENT_USER(); @@ -173,9 +175,9 @@ FLUSH PRIVILEGES; CREATE USER new_dest IDENTIFIED BY 'new_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string -new_dest +new_dest mysql_native_password *01422E86A6FFF84618914AF149F9AEF64B84170A new_user test_plugin_server new_dest -plug_dest +plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 GRANT ALL PRIVILEGES ON test.* TO new_user; connect plug_user,localhost,new_dest,new_dest_passwd; select USER(),CURRENT_USER(); @@ -190,7 +192,7 @@ CREATE USER proxied_user IDENTIFIED BY 'proxied_user_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string test_plugin_server proxied_user -proxied_user +proxied_user mysql_native_password *D7A51428CD38DB3C5293B9321DA1228BFB1611DD connect proxy_con,localhost,proxied_user,proxied_user_passwd; SELECT USER(),CURRENT_USER(); USER() CURRENT_USER() @@ -226,7 +228,7 @@ CREATE USER proxied_user IDENTIFIED BY 'proxied_user_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string test_plugin_server proxied_user -proxied_user +proxied_user mysql_native_password *D7A51428CD38DB3C5293B9321DA1228BFB1611DD connect proxy_con,localhost,proxied_user,proxied_user_passwd; SELECT USER(),CURRENT_USER(); USER() CURRENT_USER() @@ -268,11 +270,11 @@ GRANT PROXY ON proxied_user_5 TO ''@'%%'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string test_plugin_server proxied_user -proxied_user_1 -proxied_user_2 -proxied_user_3 -proxied_user_4 -proxied_user_5 +proxied_user_1 mysql_native_password *551D5A5177FCC3340F7D2FB0F4D8D1EEA7F7EF71 +proxied_user_2 mysql_native_password *3D948F77C6A988AFDCA9755AB2A6724362557220 +proxied_user_3 mysql_native_password *41A18925D237DEE738C76581153990B037F462E3 +proxied_user_4 mysql_native_password *F990073A9B96FF535C2D0721406042B8751E593F +proxied_user_5 mysql_native_password *5AA915C5D0B5B1336336FD2BF7768BC09FD1F5B2 connect proxy_con_1,localhost,proxied_user_1,'proxied_user_1_pwd'; connect proxy_con_2,localhost,proxied_user_2,proxied_user_2_pwd; connect proxy_con_3,localhost,proxied_user_3,proxied_user_3_pwd; diff --git a/mysql-test/main/plugin_auth_qa_1.test b/mysql-test/main/plugin_auth_qa_1.test index b0b8ffb3544..4f45a8aced6 100644 --- a/mysql-test/main/plugin_auth_qa_1.test +++ b/mysql-test/main/plugin_auth_qa_1.test @@ -141,7 +141,7 @@ FLUSH PRIVILEGES; --sorted_result SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; --disable_query_log ---error ER_PLUGIN_IS_NOT_LOADED +--error ER_ACCESS_DENIED_ERROR connect(plug_user,localhost,new_user,new_dest); --enable_query_log UPDATE mysql.user SET plugin='test_plugin_server' WHERE user='new_user'; diff --git a/mysql-test/main/plugin_auth_qa_2.result b/mysql-test/main/plugin_auth_qa_2.result index fa88530be6a..ec62840ac4a 100644 --- a/mysql-test/main/plugin_auth_qa_2.result +++ b/mysql-test/main/plugin_auth_qa_2.result @@ -7,7 +7,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_1_dest identified by 'dest_pas GRANT PROXY ON qa_test_1_dest TO qa_test_1_user; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string -qa_test_1_dest +qa_test_1_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_1_user qa_auth_interface qa_test_1_dest SELECT @@proxy_user; @@proxy_user @@ -20,7 +20,7 @@ current_user() user() @@local.proxy_user @@local.external_user qa_test_1_user@% qa_test_1_user@localhost NULL NULL SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string -qa_test_1_dest +qa_test_1_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_1_user qa_auth_interface qa_test_1_dest DROP USER qa_test_1_user; DROP USER qa_test_1_dest; @@ -33,8 +33,8 @@ GRANT PROXY ON qa_test_2_dest TO qa_test_2_user; GRANT PROXY ON authenticated_as TO qa_test_2_user; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string -authenticated_as -qa_test_2_dest +authenticated_as mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 +qa_test_2_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_2_user qa_auth_interface qa_test_2_dest SELECT @@proxy_user; @@proxy_user @@ -47,8 +47,8 @@ current_user() user() @@local.proxy_user @@local.external_user authenticated_as@% user_name@localhost 'qa_test_2_user'@'%' externaluser SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string -authenticated_as -qa_test_2_dest +authenticated_as mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 +qa_test_2_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_2_user qa_auth_interface qa_test_2_dest DROP USER qa_test_2_user; DROP USER qa_test_2_dest; @@ -83,8 +83,8 @@ GRANT PROXY ON qa_test_5_dest TO qa_test_5_user; GRANT PROXY ON qa_test_5_dest TO ''@'localhost'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; user plugin authentication_string password - *DFCACE76914AD7BD801FC1A1ECF6562272621A22 -qa_test_5_dest *DFCACE76914AD7BD801FC1A1ECF6562272621A22 + mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 +qa_test_5_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_5_user qa_auth_interface qa_test_5_dest exec MYSQL -h localhost -P MASTER_MYPORT --user=qa_test_5_user --password=qa_test_5_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1 ERROR 1045 (28000): Access denied for user 'qa_test_5_user'@'localhost' (using password: YES) @@ -98,21 +98,21 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_6_dest identified by 'dest_pas GRANT PROXY ON qa_test_6_dest TO qa_test_6_user; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; user plugin authentication_string password -qa_test_6_dest *DFCACE76914AD7BD801FC1A1ECF6562272621A22 +qa_test_6_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_6_user qa_auth_interface qa_test_6_dest exec MYSQL -h localhost -P MASTER_MYPORT --user=qa_test_6_user --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1 ERROR 1045 (28000): Access denied for user 'qa_test_6_user'@'localhost' (using password: YES) GRANT PROXY ON qa_test_6_dest TO root IDENTIFIED WITH qa_auth_interface AS 'qa_test_6_dest'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; user plugin authentication_string password -qa_test_6_dest *DFCACE76914AD7BD801FC1A1ECF6562272621A22 +qa_test_6_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_6_user qa_auth_interface qa_test_6_dest exec MYSQL -h localhost -P MASTER_MYPORT --user=root --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) REVOKE PROXY ON qa_test_6_dest FROM root; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; user plugin authentication_string -qa_test_6_dest +qa_test_6_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_6_user qa_auth_interface qa_test_6_dest exec MYSQL -h localhost -P MASTER_MYPORT --user=root --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) diff --git a/mysql-test/main/plugin_innodb.result b/mysql-test/main/plugin_innodb.result index 48510ad8745..d8cc777d9cb 100644 --- a/mysql-test/main/plugin_innodb.result +++ b/mysql-test/main/plugin_innodb.result @@ -7,5 +7,5 @@ create table t1(a int) engine=example; select * from t1; a drop table t1; -alter table mysql.plugin engine=myisam; +alter table mysql.plugin engine=aria; uninstall plugin example; diff --git a/mysql-test/main/plugin_innodb.test b/mysql-test/main/plugin_innodb.test index fb5dd84b997..5700486b218 100644 --- a/mysql-test/main/plugin_innodb.test +++ b/mysql-test/main/plugin_innodb.test @@ -22,6 +22,6 @@ create table t1(a int) engine=example; select * from t1; drop table t1; -alter table mysql.plugin engine=myisam; +alter table mysql.plugin engine=aria; uninstall plugin example; diff --git a/mysql-test/main/ps.result b/mysql-test/main/ps.result index 10a617ea6c9..d619b213508 100644 --- a/mysql-test/main/ps.result +++ b/mysql-test/main/ps.result @@ -2134,12 +2134,9 @@ Database Table In_use Name_locked mysql general_log 0 0 select Host, User from mysql.user limit 0; Host User -select Host, Db from mysql.host limit 0; -Host Db show open tables from mysql; Database Table In_use Name_locked mysql general_log 0 0 -mysql host 0 0 mysql user 0 0 call proc_1(); show open tables from mysql; @@ -2147,12 +2144,9 @@ Database Table In_use Name_locked mysql general_log 0 0 select Host, User from mysql.user limit 0; Host User -select Host, Db from mysql.host limit 0; -Host Db show open tables from mysql; Database Table In_use Name_locked mysql general_log 0 0 -mysql host 0 0 mysql user 0 0 call proc_1(); show open tables from mysql; @@ -2160,12 +2154,9 @@ Database Table In_use Name_locked mysql general_log 0 0 select Host, User from mysql.user limit 0; Host User -select Host, Db from mysql.host limit 0; -Host Db show open tables from mysql; Database Table In_use Name_locked mysql general_log 0 0 -mysql host 0 0 mysql user 0 0 call proc_1(); show open tables from mysql; @@ -2173,12 +2164,9 @@ Database Table In_use Name_locked mysql general_log 0 0 select Host, User from mysql.user limit 0; Host User -select Host, Db from mysql.host limit 0; -Host Db show open tables from mysql; Database Table In_use Name_locked mysql general_log 0 0 -mysql host 0 0 mysql user 0 0 flush tables; create function func_1() returns int begin flush tables; return 1; end| @@ -2191,12 +2179,9 @@ drop procedure proc_1; flush tables; select Host, User from mysql.user limit 0; Host User -select Host, Db from mysql.host limit 0; -Host Db show open tables from mysql; Database Table In_use Name_locked mysql general_log 0 0 -mysql host 0 0 mysql user 0 0 prepare abc from "flush tables"; execute abc; @@ -2205,12 +2190,9 @@ Database Table In_use Name_locked mysql general_log 0 0 select Host, User from mysql.user limit 0; Host User -select Host, Db from mysql.host limit 0; -Host Db show open tables from mysql; Database Table In_use Name_locked mysql general_log 0 0 -mysql host 0 0 mysql user 0 0 execute abc; show open tables from mysql; @@ -2218,12 +2200,9 @@ Database Table In_use Name_locked mysql general_log 0 0 select Host, User from mysql.user limit 0; Host User -select Host, Db from mysql.host limit 0; -Host Db show open tables from mysql; Database Table In_use Name_locked mysql general_log 0 0 -mysql host 0 0 mysql user 0 0 execute abc; show open tables from mysql; @@ -2231,12 +2210,9 @@ Database Table In_use Name_locked mysql general_log 0 0 select Host, User from mysql.user limit 0; Host User -select Host, Db from mysql.host limit 0; -Host Db show open tables from mysql; Database Table In_use Name_locked mysql general_log 0 0 -mysql host 0 0 mysql user 0 0 flush tables; deallocate prepare abc; @@ -5323,5 +5299,48 @@ DROP PROCEDURE p2; DROP PROCEDURE p1; DROP ROLE testrole; # +# MDEV-16992: prepare of CREATE TABLE, CREATE VIEW, DO, SET, CALL +# statements with CTE containing materialized derived +# (the bug is reproducible on 10.4) +# +prepare stmt from +"CREATE TABLE t1 AS + WITH cte(a) AS (SELECT * FROM (SELECT 1) AS t) SELECT * FROM cte;"; +execute stmt; +select * from t1; +a +1 +prepare stmt from +"CREATE VIEW v1 AS + WITH cte(a) AS (SELECT * FROM (SELECT 1) AS t) SELECT * FROM cte;"; +execute stmt; +select * from v1; +a +1 +prepare stmt from +"DO (SELECT 1 + FROM (WITH cte AS (SELECT * FROM (SELECT 1) AS t) + SELECT * FROM cte) AS tt);"; +execute stmt; +prepare stmt from +"SET @a = (SELECT 1 + FROM (WITH cte AS (SELECT * FROM (SELECT 1) AS t) + SELECT * FROM cte) AS t);"; +execute stmt; +create procedure p (i int) insert into t1 values(i); +prepare stmt from +"CALL p + ((SELECT 1 + FROM (WITH cte AS (SELECT * FROM (SELECT 1) AS t) + SELECT * FROM cte) AS tt));"; +execute stmt; +select * from t1; +a +1 +1 +drop procedure p; +drop view v1; +drop table t1; +# # End of 10.2 tests # diff --git a/mysql-test/main/ps.test b/mysql-test/main/ps.test index 79c08d62290..86ae11ccb61 100644 --- a/mysql-test/main/ps.test +++ b/mysql-test/main/ps.test @@ -2228,28 +2228,24 @@ flush tables; --sorted_result show open tables from mysql; select Host, User from mysql.user limit 0; -select Host, Db from mysql.host limit 0; --sorted_result show open tables from mysql; call proc_1(); --sorted_result show open tables from mysql; select Host, User from mysql.user limit 0; -select Host, Db from mysql.host limit 0; --sorted_result show open tables from mysql; call proc_1(); --sorted_result show open tables from mysql; select Host, User from mysql.user limit 0; -select Host, Db from mysql.host limit 0; --sorted_result show open tables from mysql; call proc_1(); --sorted_result show open tables from mysql; select Host, User from mysql.user limit 0; -select Host, Db from mysql.host limit 0; --sorted_result show open tables from mysql; flush tables; @@ -2269,7 +2265,6 @@ drop procedure proc_1; --disable_ps_protocol flush tables; select Host, User from mysql.user limit 0; -select Host, Db from mysql.host limit 0; --sorted_result show open tables from mysql; --enable_ps_protocol @@ -2279,21 +2274,18 @@ execute abc; --sorted_result show open tables from mysql; select Host, User from mysql.user limit 0; -select Host, Db from mysql.host limit 0; --sorted_result show open tables from mysql; execute abc; --sorted_result show open tables from mysql; select Host, User from mysql.user limit 0; -select Host, Db from mysql.host limit 0; --sorted_result show open tables from mysql; execute abc; --sorted_result show open tables from mysql; select Host, User from mysql.user limit 0; -select Host, Db from mysql.host limit 0; --sorted_result show open tables from mysql; flush tables; @@ -4785,5 +4777,51 @@ DROP PROCEDURE p1; DROP ROLE testrole; --echo # +--echo # MDEV-16992: prepare of CREATE TABLE, CREATE VIEW, DO, SET, CALL +--echo # statements with CTE containing materialized derived +--echo # (the bug is reproducible on 10.4) +--echo # + +--enable_result_log + +prepare stmt from +"CREATE TABLE t1 AS + WITH cte(a) AS (SELECT * FROM (SELECT 1) AS t) SELECT * FROM cte;"; +execute stmt; +select * from t1; + +prepare stmt from +"CREATE VIEW v1 AS + WITH cte(a) AS (SELECT * FROM (SELECT 1) AS t) SELECT * FROM cte;"; +execute stmt; +select * from v1; + +prepare stmt from +"DO (SELECT 1 + FROM (WITH cte AS (SELECT * FROM (SELECT 1) AS t) + SELECT * FROM cte) AS tt);"; +execute stmt; + +prepare stmt from +"SET @a = (SELECT 1 + FROM (WITH cte AS (SELECT * FROM (SELECT 1) AS t) + SELECT * FROM cte) AS t);"; +execute stmt; + +create procedure p (i int) insert into t1 values(i); + +prepare stmt from +"CALL p + ((SELECT 1 + FROM (WITH cte AS (SELECT * FROM (SELECT 1) AS t) + SELECT * FROM cte) AS tt));"; +execute stmt; +select * from t1; + +drop procedure p; +drop view v1; +drop table t1; + +--echo # --echo # End of 10.2 tests --echo # diff --git a/mysql-test/main/query_cache.result b/mysql-test/main/query_cache.result index e1123b1cb8b..f5d8b5eb461 100644 --- a/mysql-test/main/query_cache.result +++ b/mysql-test/main/query_cache.result @@ -967,19 +967,19 @@ INSERT INTO t1 VALUES ('20050326'); INSERT INTO t1 VALUES ('20050325'); SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 invalid'; COUNT(*) -0 +1 Warnings: -Warning 1292 Incorrect datetime value: '20050327 invalid' +Warning 1292 Truncated incorrect date value: '20050327 invalid' SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050328 invalid'; COUNT(*) -0 +1 Warnings: -Warning 1292 Incorrect datetime value: '20050328 invalid' +Warning 1292 Truncated incorrect date value: '20050328 invalid' SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 invalid'; COUNT(*) -0 +1 Warnings: -Warning 1292 Incorrect datetime value: '20050327 invalid' +Warning 1292 Truncated incorrect date value: '20050327 invalid' show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 0 diff --git a/mysql-test/main/query_cache_innodb.result b/mysql-test/main/query_cache_innodb.result index 643a065612f..146a6fbc289 100644 --- a/mysql-test/main/query_cache_innodb.result +++ b/mysql-test/main/query_cache_innodb.result @@ -84,7 +84,7 @@ t2id id use test; drop database `#mysql50#-`; SET NAMES default; -FOUND 12 /\[ERROR\] Invalid \(old\?\) table or database name/ in mysqld.1.err +FOUND 8 /\[ERROR\] Invalid \(old\?\) table or database name/ in mysqld.1.err set global query_cache_type=DEFAULT; set global query_cache_size=DEFAULT; End of 10.2 tests diff --git a/mysql-test/main/range.result b/mysql-test/main/range.result index e2996b963bc..50de308045b 100644 --- a/mysql-test/main/range.result +++ b/mysql-test/main/range.result @@ -1048,30 +1048,6 @@ select a, hex(filler) from t1 where a not between 'b' and 'b'; a hex(filler) a 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 drop table t1,t2,t3; -create table t1 (a int); -insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); -create table t2 (a int, key(a)); -insert into t2 select 2*(A.a + 10*(B.a + 10*C.a)) from t1 A, t1 B, t1 C; -set @a="select * from t2 force index (a) where a NOT IN(0"; -select count(*) from (select @a:=concat(@a, ',', a) from t2 ) Z; -count(*) -1000 -set @a=concat(@a, ')'); -insert into t2 values (11),(13),(15); -set @b= concat("explain ", @a); -prepare stmt1 from @b; -execute stmt1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 index NULL a 5 NULL 1003 Using where; Using index -2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2 -3 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used -prepare stmt1 from @a; -execute stmt1; -a -11 -13 -15 -drop table t1, t2; CREATE TABLE t1 ( id int NOT NULL DEFAULT '0', b int NOT NULL DEFAULT '0', @@ -1125,7 +1101,7 @@ id select_type table type possible_keys key key_len ref rows Extra SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-01 24:00:00'; item started price Warnings: -Warning 1292 Incorrect datetime value: '2005-12-01 24:00:00' +Warning 1292 Truncated incorrect datetime value: '2005-12-01 24:00:00' SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-02 00:00:00'; item started price A1 2005-11-01 08:00:00 1000.000 @@ -1137,7 +1113,7 @@ id select_type table type possible_keys key key_len ref rows Extra SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-01 24:00:00'; item started price Warnings: -Warning 1292 Incorrect datetime value: '2005-12-01 24:00:00' +Warning 1292 Truncated incorrect datetime value: '2005-12-01 24:00:00' SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-02 00:00:00'; item started price A1 2005-11-01 08:00:00 1000.000 @@ -1587,7 +1563,7 @@ str_to_date('2007-10-00', '%Y-%m-%d') >= '' AND str_to_date('2007-10-00', '%Y-%m-%d') <= '2007/10/20' 1 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' SELECT str_to_date('2007-20-00', '%Y-%m-%d') >= '2007/10/20' AND str_to_date('2007-20-00', '%Y-%m-%d') <= ''; str_to_date('2007-20-00', '%Y-%m-%d') >= '2007/10/20' AND @@ -1602,7 +1578,7 @@ SELECT str_to_date('2007-10-00', '%Y-%m-%d') BETWEEN '' AND '2007/10/20'; str_to_date('2007-10-00', '%Y-%m-%d') BETWEEN '' AND '2007/10/20' 1 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' SELECT str_to_date('2007-20-00', '%Y-%m-%d') BETWEEN '2007/10/20' AND ''; str_to_date('2007-20-00', '%Y-%m-%d') BETWEEN '2007/10/20' AND '' NULL @@ -3005,5 +2981,46 @@ deallocate prepare stmt; set optimizer_switch=@save_optimizer_switch; drop table t1,t2,t3; # +# MDEV-16934: using system variable eq_range_index_dive_limit +# to reduce the number of index dives +# +create table t1 (a int, b varchar(31), index idx(a)); +insert into t1 values +(7,'xxxx'), (1,'yy'), (3,'aaa'), (1,'bbb'), (2,'zz'), +(4,'vvvvv'), (7,'ddd'), (9,'zzzzz'), (1,'cc'), (5,'ffff'); +insert into t1 select a+10, concat(b,'zz') from t1; +insert into t1 select a+15, concat(b,'yy') from t1; +insert into t1 select a+100, concat(b,'xx') from t1; +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +select cast(count(a)/count(distinct a) as unsigned) as rec_per_key from t1; +rec_per_key +2 +set eq_range_index_dive_limit=0; +explain select * from t1 where a in (8, 15, 31, 1, 9); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx idx 5 NULL 7 Using index condition +select * from t1 where a in (8, 15, 31, 1, 9); +a b +1 yy +1 bbb +1 cc +9 zzzzz +15 ffffzz +set eq_range_index_dive_limit=2; +explain select * from t1 where a in (8, 15, 31, 1, 9); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx idx 5 NULL 10 Using index condition +select * from t1 where a in (8, 15, 31, 1, 9); +a b +1 yy +1 bbb +1 cc +9 zzzzz +15 ffffzz +set eq_range_index_dive_limit=default; +drop table t1; +# # End of 10.2 tests # diff --git a/mysql-test/main/range.test b/mysql-test/main/range.test index 36e0e32b28b..bd2299bac5f 100644 --- a/mysql-test/main/range.test +++ b/mysql-test/main/range.test @@ -863,30 +863,6 @@ select a, hex(filler) from t1 where a not between 'b' and 'b'; drop table t1,t2,t3; # -# BUG#21282 -# -create table t1 (a int); -insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); -create table t2 (a int, key(a)); -insert into t2 select 2*(A.a + 10*(B.a + 10*C.a)) from t1 A, t1 B, t1 C; - -set @a="select * from t2 force index (a) where a NOT IN(0"; -select count(*) from (select @a:=concat(@a, ',', a) from t2 ) Z; -set @a=concat(@a, ')'); - -insert into t2 values (11),(13),(15); - -set @b= concat("explain ", @a); - -prepare stmt1 from @b; -execute stmt1; - -prepare stmt1 from @a; -execute stmt1; - -drop table t1, t2; - -# # Bug #18165: range access for BETWEEN with a constant for the first argument # @@ -2042,5 +2018,38 @@ set optimizer_switch=@save_optimizer_switch; drop table t1,t2,t3; --echo # +--echo # MDEV-16934: using system variable eq_range_index_dive_limit +--echo # to reduce the number of index dives +--echo # + +create table t1 (a int, b varchar(31), index idx(a)); + +insert into t1 values + (7,'xxxx'), (1,'yy'), (3,'aaa'), (1,'bbb'), (2,'zz'), + (4,'vvvvv'), (7,'ddd'), (9,'zzzzz'), (1,'cc'), (5,'ffff'); +insert into t1 select a+10, concat(b,'zz') from t1; +insert into t1 select a+15, concat(b,'yy') from t1; +insert into t1 select a+100, concat(b,'xx') from t1; + +analyze table t1; + +select cast(count(a)/count(distinct a) as unsigned) as rec_per_key from t1; + +let $q= +select * from t1 where a in (8, 15, 31, 1, 9); + +set eq_range_index_dive_limit=0; +eval explain $q; +eval $q; + +set eq_range_index_dive_limit=2; +eval explain $q; +eval $q; + +set eq_range_index_dive_limit=default; + +drop table t1; + +--echo # --echo # End of 10.2 tests --echo # diff --git a/mysql-test/main/range_debug.result b/mysql-test/main/range_debug.result new file mode 100644 index 00000000000..5597671071e --- /dev/null +++ b/mysql-test/main/range_debug.result @@ -0,0 +1,24 @@ +create table t1 (a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t2 (a int, key(a)); +insert into t2 select 2*(A.a + 10*(B.a + 10*C.a)) from t1 A, t1 B, t1 C; +set in_predicate_conversion_threshold= 2000; +set @a="select * from t2 force index (a) where a NOT IN(0"; +select count(*) from (select @a:=concat(@a, ',', a) from t2 ) Z; +count(*) +1000 +set @a=concat(@a, ')'); +insert into t2 values (11),(13),(15); +set @b= concat("explain ", @a); +prepare stmt1 from @b; +execute stmt1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 index a a 5 NULL 1003 Using where; Using index +prepare stmt1 from @a; +execute stmt1; +a +11 +13 +15 +set in_predicate_conversion_threshold= default; +drop table t1, t2; diff --git a/mysql-test/main/range_debug.test b/mysql-test/main/range_debug.test new file mode 100644 index 00000000000..ef331cdc84f --- /dev/null +++ b/mysql-test/main/range_debug.test @@ -0,0 +1,30 @@ +source include/have_debug.inc; +# +# BUG#21282 +# +create table t1 (a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t2 (a int, key(a)); +insert into t2 select 2*(A.a + 10*(B.a + 10*C.a)) from t1 A, t1 B, t1 C; + +set in_predicate_conversion_threshold= 2000; + +set @a="select * from t2 force index (a) where a NOT IN(0"; +select count(*) from (select @a:=concat(@a, ',', a) from t2 ) Z; +set @a=concat(@a, ')'); + +insert into t2 values (11),(13),(15); + +set @b= concat("explain ", @a); + +prepare stmt1 from @b; +execute stmt1; + +prepare stmt1 from @a; +execute stmt1; + +set in_predicate_conversion_threshold= default; + +drop table t1, t2; + + diff --git a/mysql-test/main/range_mrr_icp.result b/mysql-test/main/range_mrr_icp.result index 629d183bee7..a6c57378f9c 100644 --- a/mysql-test/main/range_mrr_icp.result +++ b/mysql-test/main/range_mrr_icp.result @@ -1050,30 +1050,6 @@ select a, hex(filler) from t1 where a not between 'b' and 'b'; a hex(filler) a 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 drop table t1,t2,t3; -create table t1 (a int); -insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); -create table t2 (a int, key(a)); -insert into t2 select 2*(A.a + 10*(B.a + 10*C.a)) from t1 A, t1 B, t1 C; -set @a="select * from t2 force index (a) where a NOT IN(0"; -select count(*) from (select @a:=concat(@a, ',', a) from t2 ) Z; -count(*) -1000 -set @a=concat(@a, ')'); -insert into t2 values (11),(13),(15); -set @b= concat("explain ", @a); -prepare stmt1 from @b; -execute stmt1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 index NULL a 5 NULL 1003 Using where; Using index -2 MATERIALIZED <derived3> ALL NULL NULL NULL NULL 2 -3 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used -prepare stmt1 from @a; -execute stmt1; -a -11 -13 -15 -drop table t1, t2; CREATE TABLE t1 ( id int NOT NULL DEFAULT '0', b int NOT NULL DEFAULT '0', @@ -1127,7 +1103,7 @@ id select_type table type possible_keys key key_len ref rows Extra SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-01 24:00:00'; item started price Warnings: -Warning 1292 Incorrect datetime value: '2005-12-01 24:00:00' +Warning 1292 Truncated incorrect datetime value: '2005-12-01 24:00:00' SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-02 00:00:00'; item started price A1 2005-11-01 08:00:00 1000.000 @@ -1139,7 +1115,7 @@ id select_type table type possible_keys key key_len ref rows Extra SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-01 24:00:00'; item started price Warnings: -Warning 1292 Incorrect datetime value: '2005-12-01 24:00:00' +Warning 1292 Truncated incorrect datetime value: '2005-12-01 24:00:00' SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-02 00:00:00'; item started price A1 2005-11-01 08:00:00 1000.000 @@ -1589,7 +1565,7 @@ str_to_date('2007-10-00', '%Y-%m-%d') >= '' AND str_to_date('2007-10-00', '%Y-%m-%d') <= '2007/10/20' 1 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' SELECT str_to_date('2007-20-00', '%Y-%m-%d') >= '2007/10/20' AND str_to_date('2007-20-00', '%Y-%m-%d') <= ''; str_to_date('2007-20-00', '%Y-%m-%d') >= '2007/10/20' AND @@ -1604,7 +1580,7 @@ SELECT str_to_date('2007-10-00', '%Y-%m-%d') BETWEEN '' AND '2007/10/20'; str_to_date('2007-10-00', '%Y-%m-%d') BETWEEN '' AND '2007/10/20' 1 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' SELECT str_to_date('2007-20-00', '%Y-%m-%d') BETWEEN '2007/10/20' AND ''; str_to_date('2007-20-00', '%Y-%m-%d') BETWEEN '2007/10/20' AND '' NULL @@ -3017,6 +2993,47 @@ deallocate prepare stmt; set optimizer_switch=@save_optimizer_switch; drop table t1,t2,t3; # +# MDEV-16934: using system variable eq_range_index_dive_limit +# to reduce the number of index dives +# +create table t1 (a int, b varchar(31), index idx(a)); +insert into t1 values +(7,'xxxx'), (1,'yy'), (3,'aaa'), (1,'bbb'), (2,'zz'), +(4,'vvvvv'), (7,'ddd'), (9,'zzzzz'), (1,'cc'), (5,'ffff'); +insert into t1 select a+10, concat(b,'zz') from t1; +insert into t1 select a+15, concat(b,'yy') from t1; +insert into t1 select a+100, concat(b,'xx') from t1; +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +select cast(count(a)/count(distinct a) as unsigned) as rec_per_key from t1; +rec_per_key +2 +set eq_range_index_dive_limit=0; +explain select * from t1 where a in (8, 15, 31, 1, 9); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx idx 5 NULL 7 Using index condition; Rowid-ordered scan +select * from t1 where a in (8, 15, 31, 1, 9); +a b +1 yy +1 bbb +9 zzzzz +1 cc +15 ffffzz +set eq_range_index_dive_limit=2; +explain select * from t1 where a in (8, 15, 31, 1, 9); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range idx idx 5 NULL 10 Using index condition; Rowid-ordered scan +select * from t1 where a in (8, 15, 31, 1, 9); +a b +1 yy +1 bbb +9 zzzzz +1 cc +15 ffffzz +set eq_range_index_dive_limit=default; +drop table t1; +# # End of 10.2 tests # set optimizer_switch=@mrr_icp_extra_tmp; diff --git a/mysql-test/main/rename.result b/mysql-test/main/rename.result index 3ee9dd593d4..da9e4b62ecd 100644 --- a/mysql-test/main/rename.result +++ b/mysql-test/main/rename.result @@ -144,3 +144,7 @@ select * from t2; a 1 drop table tmp,t2; +create table t1 (a int) engine=memory; +rename table t1 to non_existent.t2; +ERROR 42000: Unknown database 'non_existent' +drop table t1; diff --git a/mysql-test/main/rename.test b/mysql-test/main/rename.test index 67732d5b5b9..215ecbcbb18 100644 --- a/mysql-test/main/rename.test +++ b/mysql-test/main/rename.test @@ -141,3 +141,10 @@ select * from tmp; select * from t2; drop table tmp,t2; +# +# MDEV-11741 handler::ha_reset(): Assertion `bitmap_is_set_all(&table->s->all_set)' failed or server crash in mi_reset or buffer overrun or unexpected ER_CANT_REMOVE_ALL_FIELDS +# +create table t1 (a int) engine=memory; +--error ER_BAD_DB_ERROR +rename table t1 to non_existent.t2; +drop table t1; diff --git a/mysql-test/main/repair.result b/mysql-test/main/repair.result index 75d7525ee71..18a7cf509c4 100644 --- a/mysql-test/main/repair.result +++ b/mysql-test/main/repair.result @@ -78,7 +78,7 @@ INSERT INTO t1 VALUES ('0'),('0'),('0'),('0'),('0'),('0'),('0'); Warnings: Error 1034 myisam_sort_buffer_size is too small. X -Error 1034 Number of rows changed from 0 to 157 +Warning 1034 Number of rows changed from 0 to 157 SET myisam_repair_threads=2; REPAIR TABLE t1; Table Op Msg_type Msg_text diff --git a/mysql-test/main/select.result b/mysql-test/main/select.result index 9b6a570717b..94a92315acc 100644 --- a/mysql-test/main/select.result +++ b/mysql-test/main/select.result @@ -2118,8 +2118,8 @@ INSERT INTO t2 VALUES (1,3,10,'2002-06-01 08:00:00',35),(1,3,1010,'2002-06-01 12 SELECT a.gvid, (SUM(CASE b.sampletid WHEN 140 THEN b.samplevalue ELSE 0 END)) as the_success,(SUM(CASE b.sampletid WHEN 141 THEN b.samplevalue ELSE 0 END)) as the_fail,(SUM(CASE b.sampletid WHEN 142 THEN b.samplevalue ELSE 0 END)) as the_size,(SUM(CASE b.sampletid WHEN 143 THEN b.samplevalue ELSE 0 END)) as the_time FROM t1 a, t2 b WHERE a.hmid = b.hmid AND a.volid = b.volid AND b.sampletime >= 'wrong-date-value' AND b.sampletime < 'wrong-date-value' AND b.sampletid IN (140, 141, 142, 143) GROUP BY a.gvid; gvid the_success the_fail the_size the_time Warnings: -Warning 1292 Incorrect datetime value: 'wrong-date-value' -Warning 1292 Incorrect datetime value: 'wrong-date-value' +Warning 1292 Truncated incorrect datetime value: 'wrong-date-value' +Warning 1292 Truncated incorrect datetime value: 'wrong-date-value' SELECT a.gvid, (SUM(CASE b.sampletid WHEN 140 THEN b.samplevalue ELSE 0 END)) as the_success,(SUM(CASE b.sampletid WHEN 141 THEN b.samplevalue ELSE 0 END)) as the_fail,(SUM(CASE b.sampletid WHEN 142 THEN b.samplevalue ELSE 0 END)) as the_size,(SUM(CASE b.sampletid WHEN 143 THEN b.samplevalue ELSE 0 END)) as the_time FROM t1 a, t2 b WHERE a.hmid = b.hmid AND a.volid = b.volid AND b.sampletime >= NULL AND b.sampletime < NULL AND b.sampletid IN (140, 141, 142, 143) GROUP BY a.gvid; gvid the_success the_fail the_size the_time DROP TABLE t1,t2; @@ -4111,7 +4111,7 @@ select str_to_date('2007-10-09','%Y-%m-%d') <= '2007/10/2000:00:00 GMT-6'; str_to_date('2007-10-09','%Y-%m-%d') <= '2007/10/2000:00:00 GMT-6' 0 Warnings: -Warning 1292 Incorrect datetime value: '2007/10/2000:00:00 GMT-6' +Warning 1292 Truncated incorrect datetime value: '2007/10/2000:00:00 GMT-6' select str_to_date('2007-10-01','%Y-%m-%d') = '2007-10-1 00:00:00 GMT-6'; str_to_date('2007-10-01','%Y-%m-%d') = '2007-10-1 00:00:00 GMT-6' 1 @@ -4198,7 +4198,7 @@ select str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20'; str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20' 1 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' select str_to_date('','%Y-%m-%d') between '2007/10/01' and '2007/10/20'; str_to_date('','%Y-%m-%d') between '2007/10/01' and '2007/10/20' 0 @@ -4212,22 +4212,22 @@ select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = ''; str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '' 0 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' select str_to_date('1','%Y-%m-%d') = '1'; str_to_date('1','%Y-%m-%d') = '1' 0 Warnings: -Warning 1292 Incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '1' select str_to_date('1','%Y-%m-%d') = '1'; str_to_date('1','%Y-%m-%d') = '1' 0 Warnings: -Warning 1292 Incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '1' select str_to_date('','%Y-%m-%d') = ''; str_to_date('','%Y-%m-%d') = '' 1 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' select str_to_date('2000-01-01','%Y-%m-%d') between '1000-01-01' and '2001-01-01'; str_to_date('2000-01-01','%Y-%m-%d') between '1000-01-01' and '2001-01-01' 1 @@ -5282,30 +5282,30 @@ SELECT * FROM t1 HAVING f1 = 'zz'; f1 0000-00-00 Warnings: -Warning 1292 Incorrect datetime value: 'zz' +Warning 1292 Truncated incorrect datetime value: 'zz' SELECT * FROM t1 HAVING f1 <= 'aa' ; f1 0000-00-00 Warnings: -Warning 1292 Incorrect datetime value: 'aa' +Warning 1292 Truncated incorrect datetime value: 'aa' SELECT * FROM t1 HAVING f1 = 'zz' AND f1 <= 'aa' ; f1 0000-00-00 Warnings: -Warning 1292 Incorrect datetime value: 'zz' -Warning 1292 Incorrect datetime value: 'aa' +Warning 1292 Truncated incorrect datetime value: 'zz' +Warning 1292 Truncated incorrect datetime value: 'aa' SELECT * FROM t1 WHERE f1 = 'zz' AND f1 <= 'aa' ; f1 0000-00-00 Warnings: -Warning 1292 Incorrect datetime value: 'zz' -Warning 1292 Incorrect datetime value: 'aa' +Warning 1292 Truncated incorrect datetime value: 'zz' +Warning 1292 Truncated incorrect datetime value: 'aa' SELECT * FROM v1 HAVING f1 = 'zz' AND f1 <= 'aa' ; f1 0000-00-00 Warnings: -Warning 1292 Incorrect datetime value: 'zz' -Warning 1292 Incorrect datetime value: 'aa' +Warning 1292 Truncated incorrect datetime value: 'zz' +Warning 1292 Truncated incorrect datetime value: 'aa' DROP TABLE t1; DROP VIEW v1; # diff --git a/mysql-test/main/select_jcl6.result b/mysql-test/main/select_jcl6.result index d78fad15da1..b45fb8c4c10 100644 --- a/mysql-test/main/select_jcl6.result +++ b/mysql-test/main/select_jcl6.result @@ -2129,8 +2129,8 @@ INSERT INTO t2 VALUES (1,3,10,'2002-06-01 08:00:00',35),(1,3,1010,'2002-06-01 12 SELECT a.gvid, (SUM(CASE b.sampletid WHEN 140 THEN b.samplevalue ELSE 0 END)) as the_success,(SUM(CASE b.sampletid WHEN 141 THEN b.samplevalue ELSE 0 END)) as the_fail,(SUM(CASE b.sampletid WHEN 142 THEN b.samplevalue ELSE 0 END)) as the_size,(SUM(CASE b.sampletid WHEN 143 THEN b.samplevalue ELSE 0 END)) as the_time FROM t1 a, t2 b WHERE a.hmid = b.hmid AND a.volid = b.volid AND b.sampletime >= 'wrong-date-value' AND b.sampletime < 'wrong-date-value' AND b.sampletid IN (140, 141, 142, 143) GROUP BY a.gvid; gvid the_success the_fail the_size the_time Warnings: -Warning 1292 Incorrect datetime value: 'wrong-date-value' -Warning 1292 Incorrect datetime value: 'wrong-date-value' +Warning 1292 Truncated incorrect datetime value: 'wrong-date-value' +Warning 1292 Truncated incorrect datetime value: 'wrong-date-value' SELECT a.gvid, (SUM(CASE b.sampletid WHEN 140 THEN b.samplevalue ELSE 0 END)) as the_success,(SUM(CASE b.sampletid WHEN 141 THEN b.samplevalue ELSE 0 END)) as the_fail,(SUM(CASE b.sampletid WHEN 142 THEN b.samplevalue ELSE 0 END)) as the_size,(SUM(CASE b.sampletid WHEN 143 THEN b.samplevalue ELSE 0 END)) as the_time FROM t1 a, t2 b WHERE a.hmid = b.hmid AND a.volid = b.volid AND b.sampletime >= NULL AND b.sampletime < NULL AND b.sampletid IN (140, 141, 142, 143) GROUP BY a.gvid; gvid the_success the_fail the_size the_time DROP TABLE t1,t2; @@ -4122,7 +4122,7 @@ select str_to_date('2007-10-09','%Y-%m-%d') <= '2007/10/2000:00:00 GMT-6'; str_to_date('2007-10-09','%Y-%m-%d') <= '2007/10/2000:00:00 GMT-6' 0 Warnings: -Warning 1292 Incorrect datetime value: '2007/10/2000:00:00 GMT-6' +Warning 1292 Truncated incorrect datetime value: '2007/10/2000:00:00 GMT-6' select str_to_date('2007-10-01','%Y-%m-%d') = '2007-10-1 00:00:00 GMT-6'; str_to_date('2007-10-01','%Y-%m-%d') = '2007-10-1 00:00:00 GMT-6' 1 @@ -4209,7 +4209,7 @@ select str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20'; str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20' 1 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' select str_to_date('','%Y-%m-%d') between '2007/10/01' and '2007/10/20'; str_to_date('','%Y-%m-%d') between '2007/10/01' and '2007/10/20' 0 @@ -4223,22 +4223,22 @@ select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = ''; str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '' 0 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' select str_to_date('1','%Y-%m-%d') = '1'; str_to_date('1','%Y-%m-%d') = '1' 0 Warnings: -Warning 1292 Incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '1' select str_to_date('1','%Y-%m-%d') = '1'; str_to_date('1','%Y-%m-%d') = '1' 0 Warnings: -Warning 1292 Incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '1' select str_to_date('','%Y-%m-%d') = ''; str_to_date('','%Y-%m-%d') = '' 1 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' select str_to_date('2000-01-01','%Y-%m-%d') between '1000-01-01' and '2001-01-01'; str_to_date('2000-01-01','%Y-%m-%d') between '1000-01-01' and '2001-01-01' 1 @@ -5293,30 +5293,30 @@ SELECT * FROM t1 HAVING f1 = 'zz'; f1 0000-00-00 Warnings: -Warning 1292 Incorrect datetime value: 'zz' +Warning 1292 Truncated incorrect datetime value: 'zz' SELECT * FROM t1 HAVING f1 <= 'aa' ; f1 0000-00-00 Warnings: -Warning 1292 Incorrect datetime value: 'aa' +Warning 1292 Truncated incorrect datetime value: 'aa' SELECT * FROM t1 HAVING f1 = 'zz' AND f1 <= 'aa' ; f1 0000-00-00 Warnings: -Warning 1292 Incorrect datetime value: 'zz' -Warning 1292 Incorrect datetime value: 'aa' +Warning 1292 Truncated incorrect datetime value: 'zz' +Warning 1292 Truncated incorrect datetime value: 'aa' SELECT * FROM t1 WHERE f1 = 'zz' AND f1 <= 'aa' ; f1 0000-00-00 Warnings: -Warning 1292 Incorrect datetime value: 'zz' -Warning 1292 Incorrect datetime value: 'aa' +Warning 1292 Truncated incorrect datetime value: 'zz' +Warning 1292 Truncated incorrect datetime value: 'aa' SELECT * FROM v1 HAVING f1 = 'zz' AND f1 <= 'aa' ; f1 0000-00-00 Warnings: -Warning 1292 Incorrect datetime value: 'zz' -Warning 1292 Incorrect datetime value: 'aa' +Warning 1292 Truncated incorrect datetime value: 'zz' +Warning 1292 Truncated incorrect datetime value: 'aa' DROP TABLE t1; DROP VIEW v1; # diff --git a/mysql-test/main/select_pkeycache.result b/mysql-test/main/select_pkeycache.result index 9b6a570717b..94a92315acc 100644 --- a/mysql-test/main/select_pkeycache.result +++ b/mysql-test/main/select_pkeycache.result @@ -2118,8 +2118,8 @@ INSERT INTO t2 VALUES (1,3,10,'2002-06-01 08:00:00',35),(1,3,1010,'2002-06-01 12 SELECT a.gvid, (SUM(CASE b.sampletid WHEN 140 THEN b.samplevalue ELSE 0 END)) as the_success,(SUM(CASE b.sampletid WHEN 141 THEN b.samplevalue ELSE 0 END)) as the_fail,(SUM(CASE b.sampletid WHEN 142 THEN b.samplevalue ELSE 0 END)) as the_size,(SUM(CASE b.sampletid WHEN 143 THEN b.samplevalue ELSE 0 END)) as the_time FROM t1 a, t2 b WHERE a.hmid = b.hmid AND a.volid = b.volid AND b.sampletime >= 'wrong-date-value' AND b.sampletime < 'wrong-date-value' AND b.sampletid IN (140, 141, 142, 143) GROUP BY a.gvid; gvid the_success the_fail the_size the_time Warnings: -Warning 1292 Incorrect datetime value: 'wrong-date-value' -Warning 1292 Incorrect datetime value: 'wrong-date-value' +Warning 1292 Truncated incorrect datetime value: 'wrong-date-value' +Warning 1292 Truncated incorrect datetime value: 'wrong-date-value' SELECT a.gvid, (SUM(CASE b.sampletid WHEN 140 THEN b.samplevalue ELSE 0 END)) as the_success,(SUM(CASE b.sampletid WHEN 141 THEN b.samplevalue ELSE 0 END)) as the_fail,(SUM(CASE b.sampletid WHEN 142 THEN b.samplevalue ELSE 0 END)) as the_size,(SUM(CASE b.sampletid WHEN 143 THEN b.samplevalue ELSE 0 END)) as the_time FROM t1 a, t2 b WHERE a.hmid = b.hmid AND a.volid = b.volid AND b.sampletime >= NULL AND b.sampletime < NULL AND b.sampletid IN (140, 141, 142, 143) GROUP BY a.gvid; gvid the_success the_fail the_size the_time DROP TABLE t1,t2; @@ -4111,7 +4111,7 @@ select str_to_date('2007-10-09','%Y-%m-%d') <= '2007/10/2000:00:00 GMT-6'; str_to_date('2007-10-09','%Y-%m-%d') <= '2007/10/2000:00:00 GMT-6' 0 Warnings: -Warning 1292 Incorrect datetime value: '2007/10/2000:00:00 GMT-6' +Warning 1292 Truncated incorrect datetime value: '2007/10/2000:00:00 GMT-6' select str_to_date('2007-10-01','%Y-%m-%d') = '2007-10-1 00:00:00 GMT-6'; str_to_date('2007-10-01','%Y-%m-%d') = '2007-10-1 00:00:00 GMT-6' 1 @@ -4198,7 +4198,7 @@ select str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20'; str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20' 1 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' select str_to_date('','%Y-%m-%d') between '2007/10/01' and '2007/10/20'; str_to_date('','%Y-%m-%d') between '2007/10/01' and '2007/10/20' 0 @@ -4212,22 +4212,22 @@ select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = ''; str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '' 0 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' select str_to_date('1','%Y-%m-%d') = '1'; str_to_date('1','%Y-%m-%d') = '1' 0 Warnings: -Warning 1292 Incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '1' select str_to_date('1','%Y-%m-%d') = '1'; str_to_date('1','%Y-%m-%d') = '1' 0 Warnings: -Warning 1292 Incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '1' select str_to_date('','%Y-%m-%d') = ''; str_to_date('','%Y-%m-%d') = '' 1 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' select str_to_date('2000-01-01','%Y-%m-%d') between '1000-01-01' and '2001-01-01'; str_to_date('2000-01-01','%Y-%m-%d') between '1000-01-01' and '2001-01-01' 1 @@ -5282,30 +5282,30 @@ SELECT * FROM t1 HAVING f1 = 'zz'; f1 0000-00-00 Warnings: -Warning 1292 Incorrect datetime value: 'zz' +Warning 1292 Truncated incorrect datetime value: 'zz' SELECT * FROM t1 HAVING f1 <= 'aa' ; f1 0000-00-00 Warnings: -Warning 1292 Incorrect datetime value: 'aa' +Warning 1292 Truncated incorrect datetime value: 'aa' SELECT * FROM t1 HAVING f1 = 'zz' AND f1 <= 'aa' ; f1 0000-00-00 Warnings: -Warning 1292 Incorrect datetime value: 'zz' -Warning 1292 Incorrect datetime value: 'aa' +Warning 1292 Truncated incorrect datetime value: 'zz' +Warning 1292 Truncated incorrect datetime value: 'aa' SELECT * FROM t1 WHERE f1 = 'zz' AND f1 <= 'aa' ; f1 0000-00-00 Warnings: -Warning 1292 Incorrect datetime value: 'zz' -Warning 1292 Incorrect datetime value: 'aa' +Warning 1292 Truncated incorrect datetime value: 'zz' +Warning 1292 Truncated incorrect datetime value: 'aa' SELECT * FROM v1 HAVING f1 = 'zz' AND f1 <= 'aa' ; f1 0000-00-00 Warnings: -Warning 1292 Incorrect datetime value: 'zz' -Warning 1292 Incorrect datetime value: 'aa' +Warning 1292 Truncated incorrect datetime value: 'zz' +Warning 1292 Truncated incorrect datetime value: 'aa' DROP TABLE t1; DROP VIEW v1; # diff --git a/mysql-test/main/selectivity.result b/mysql-test/main/selectivity.result index aff14b23ccb..00907235ecc 100644 --- a/mysql-test/main/selectivity.result +++ b/mysql-test/main/selectivity.result @@ -782,9 +782,9 @@ set optimizer_use_condition_selectivity=3; explain extended select * from t1 where a < 1 and a > 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 Impossible WHERE noticed after reading const tables +1 SIMPLE t1 ALL NULL NULL NULL NULL 8 100.00 Using where Warnings: -Note 1003 select 7 AS `a` from `test`.`t1` where 0 +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 1 and `test`.`t1`.`a` > 7 select * from t1 where a < 1 and a > 7; a drop table t1; @@ -1506,9 +1506,9 @@ col1 explain extended select * from t2 where col1 < 'b' and col1 > 'd'; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +1 SIMPLE t2 ALL NULL NULL NULL NULL 8 100.00 Using where Warnings: -Note 1003 select 'd' AS `col1` from `test`.`t2` where 0 +Note 1003 select `test`.`t2`.`col1` AS `col1` from `test`.`t2` where `test`.`t2`.`col1` < 'b' and `test`.`t2`.`col1` > 'd' drop table t1,t2; set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; set use_stat_tables=@save_use_stat_tables; @@ -1595,3 +1595,43 @@ drop table t1,t0; set histogram_size=@save_histogram_size; set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; set use_stat_tables=@save_use_stat_tables; +# +# MDEV-15306: Wrong/Unexpected result with the value +# optimizer_use_condition_selectivity set to 4 +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); +CREATE FUNCTION f1() RETURNS INT DETERMINISTIC +BEGIN +SET @cnt := @cnt + 1; +RETURN 1; +END;| +set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity; +set @save_use_stat_tables= @@use_stat_tables; +set @@use_stat_tables='complementary'; +set @@optimizer_use_condition_selectivity=4; +SET @cnt= 0; +SELECT * FROM t1 WHERE a = f1(); +a +1 +SELECT @cnt; +@cnt +1 +set @@use_stat_tables='preferably'; +analyze table t1 persistent for all; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SET @cnt := 0; +set @@optimizer_use_condition_selectivity=4; +SELECT * FROM t1 WHERE a = f1(); +a +1 +SELECT @cnt; +@cnt +2 +alter table t1 force; +set @@use_stat_tables= @save_use_stat_tables; +set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +drop table t1; +drop function f1; diff --git a/mysql-test/main/selectivity.test b/mysql-test/main/selectivity.test index cf12bdaea21..3df49456332 100644 --- a/mysql-test/main/selectivity.test +++ b/mysql-test/main/selectivity.test @@ -1066,3 +1066,39 @@ drop table t1,t0; set histogram_size=@save_histogram_size; set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; set use_stat_tables=@save_use_stat_tables; + +--echo # +--echo # MDEV-15306: Wrong/Unexpected result with the value +--echo # optimizer_use_condition_selectivity set to 4 +--echo # + +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); + +delimiter |; +CREATE FUNCTION f1() RETURNS INT DETERMINISTIC +BEGIN + SET @cnt := @cnt + 1; + RETURN 1; +END;| +delimiter ;| +set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity; +set @save_use_stat_tables= @@use_stat_tables; +set @@use_stat_tables='complementary'; +set @@optimizer_use_condition_selectivity=4; +SET @cnt= 0; +SELECT * FROM t1 WHERE a = f1(); +SELECT @cnt; + +set @@use_stat_tables='preferably'; +analyze table t1 persistent for all; +SET @cnt := 0; +set @@optimizer_use_condition_selectivity=4; +SELECT * FROM t1 WHERE a = f1(); +SELECT @cnt; +alter table t1 force; +set @@use_stat_tables= @save_use_stat_tables; +set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +drop table t1; +drop function f1; + diff --git a/mysql-test/main/selectivity_innodb.result b/mysql-test/main/selectivity_innodb.result index ab698760c55..921bd20fc69 100644 --- a/mysql-test/main/selectivity_innodb.result +++ b/mysql-test/main/selectivity_innodb.result @@ -789,9 +789,9 @@ set optimizer_use_condition_selectivity=3; explain extended select * from t1 where a < 1 and a > 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 Impossible WHERE noticed after reading const tables +1 SIMPLE t1 ALL NULL NULL NULL NULL 8 100.00 Using where Warnings: -Note 1003 select 7 AS `a` from `test`.`t1` where 0 +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 1 and `test`.`t1`.`a` > 7 select * from t1 where a < 1 and a > 7; a drop table t1; @@ -1517,9 +1517,9 @@ col1 explain extended select * from t2 where col1 < 'b' and col1 > 'd'; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +1 SIMPLE t2 ALL NULL NULL NULL NULL 8 100.00 Using where Warnings: -Note 1003 select 'd' AS `col1` from `test`.`t2` where 0 +Note 1003 select `test`.`t2`.`col1` AS `col1` from `test`.`t2` where `test`.`t2`.`col1` < 'b' and `test`.`t2`.`col1` > 'd' drop table t1,t2; set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; set use_stat_tables=@save_use_stat_tables; @@ -1606,6 +1606,46 @@ drop table t1,t0; set histogram_size=@save_histogram_size; set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; set use_stat_tables=@save_use_stat_tables; +# +# MDEV-15306: Wrong/Unexpected result with the value +# optimizer_use_condition_selectivity set to 4 +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); +CREATE FUNCTION f1() RETURNS INT DETERMINISTIC +BEGIN +SET @cnt := @cnt + 1; +RETURN 1; +END;| +set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity; +set @save_use_stat_tables= @@use_stat_tables; +set @@use_stat_tables='complementary'; +set @@optimizer_use_condition_selectivity=4; +SET @cnt= 0; +SELECT * FROM t1 WHERE a = f1(); +a +1 +SELECT @cnt; +@cnt +1 +set @@use_stat_tables='preferably'; +analyze table t1 persistent for all; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SET @cnt := 0; +set @@optimizer_use_condition_selectivity=4; +SELECT * FROM t1 WHERE a = f1(); +a +1 +SELECT @cnt; +@cnt +2 +alter table t1 force; +set @@use_stat_tables= @save_use_stat_tables; +set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +drop table t1; +drop function f1; set optimizer_switch=@save_optimizer_switch_for_selectivity_test; set @tmp_ust= @@use_stat_tables; set @tmp_oucs= @@optimizer_use_condition_selectivity; diff --git a/mysql-test/main/session_tracker_last_gtid.result b/mysql-test/main/session_tracker_last_gtid.result index 795d0aaa2a2..deffeca1333 100644 --- a/mysql-test/main/session_tracker_last_gtid.result +++ b/mysql-test/main/session_tracker_last_gtid.result @@ -2,7 +2,13 @@ # MDEV-15477: SESSION_SYSVARS_TRACKER does not track last_gtid # SET gtid_seq_no=1000; +-- Tracker : SESSION_TRACK_SCHEMA +-- test + SET @@session.session_track_system_variables='last_gtid'; +-- Tracker : SESSION_TRACK_SCHEMA +-- test + create table t1 (a int) engine=innodb; -- Tracker : SESSION_TRACK_SYSTEM_VARIABLES -- last_gtid diff --git a/mysql-test/main/set_password.result b/mysql-test/main/set_password.result index 315d0bef9fb..82154c6ae8c 100644 --- a/mysql-test/main/set_password.result +++ b/mysql-test/main/set_password.result @@ -9,11 +9,11 @@ create user oldpassold@localhost identified with 'mysql_old_password'; set password for oldpassold@localhost = '378b243e220ca493'; select user, host, password, plugin, authentication_string from mysql.user where user != 'root'; user host password plugin authentication_string -natauth localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 -newpass localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 +natauth localhost mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 +newpass localhost mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 newpassnat localhost mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 -oldauth localhost 378b243e220ca493 -oldpass localhost 378b243e220ca493 +oldauth localhost mysql_old_password 378b243e220ca493 +oldpass localhost mysql_old_password 378b243e220ca493 oldpassold localhost mysql_old_password 378b243e220ca493 connect con,localhost,natauth,test,; select current_user(); diff --git a/mysql-test/main/shm-master.opt b/mysql-test/main/shm-master.opt deleted file mode 100644 index d71395213b1..00000000000 --- a/mysql-test/main/shm-master.opt +++ /dev/null @@ -1 +0,0 @@ ---skip-grant-tables --loose-shared-memory-base-name=HeyMrBaseNameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX$MTR_BUILD_THREAD --loose-shared-memory=1 diff --git a/mysql-test/main/shm.result b/mysql-test/main/shm.result deleted file mode 100644 index 65187b6b19b..00000000000 --- a/mysql-test/main/shm.result +++ /dev/null @@ -1,2170 +0,0 @@ -connect shm_con,localhost,root,,,,$shm_name,SHM; -drop table if exists t1,t2,t3,t4; -CREATE TABLE t1 ( -Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, -Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL -); -INSERT INTO t1 VALUES (9410,9412); -select period from t1; -period -9410 -select * from t1; -Period Varor_period -9410 9412 -select t1.* from t1; -Period Varor_period -9410 9412 -CREATE TABLE t2 ( -auto int not null auto_increment, -fld1 int(6) unsigned zerofill DEFAULT '000000' NOT NULL, -companynr tinyint(2) unsigned zerofill DEFAULT '00' NOT NULL, -fld3 char(30) DEFAULT '' NOT NULL, -fld4 char(35) DEFAULT '' NOT NULL, -fld5 char(35) DEFAULT '' NOT NULL, -fld6 char(4) DEFAULT '' NOT NULL, -UNIQUE fld1 (fld1), -KEY fld3 (fld3), -PRIMARY KEY (auto) -); -select t2.fld3 from t2 where companynr = 58 and fld3 like "%imaginable%"; -fld3 -imaginable -select fld3 from t2 where fld3 like "%cultivation" ; -fld3 -cultivation -select t2.fld3,companynr from t2 where companynr = 57+1 order by fld3; -fld3 companynr -concoct 58 -druggists 58 -engrossing 58 -Eurydice 58 -exclaimers 58 -ferociousness 58 -hopelessness 58 -Huey 58 -imaginable 58 -judges 58 -merging 58 -ostrich 58 -peering 58 -Phelps 58 -presumes 58 -Ruth 58 -sentences 58 -Shylock 58 -straggled 58 -synergy 58 -thanking 58 -tying 58 -unlocks 58 -select fld3,companynr from t2 where companynr = 58 order by fld3; -fld3 companynr -concoct 58 -druggists 58 -engrossing 58 -Eurydice 58 -exclaimers 58 -ferociousness 58 -hopelessness 58 -Huey 58 -imaginable 58 -judges 58 -merging 58 -ostrich 58 -peering 58 -Phelps 58 -presumes 58 -Ruth 58 -sentences 58 -Shylock 58 -straggled 58 -synergy 58 -thanking 58 -tying 58 -unlocks 58 -select fld3 from t2 order by fld3 desc limit 10; -fld3 -youthfulness -yelped -Wotan -workers -Witt -witchcraft -Winsett -Willy -willed -wildcats -select fld3 from t2 order by fld3 desc limit 5; -fld3 -youthfulness -yelped -Wotan -workers -Witt -select fld3 from t2 order by fld3 desc limit 5,5; -fld3 -witchcraft -Winsett -Willy -willed -wildcats -select t2.fld3 from t2 where fld3 = 'honeysuckle'; -fld3 -honeysuckle -select t2.fld3 from t2 where fld3 LIKE 'honeysuckl_'; -fld3 -honeysuckle -select t2.fld3 from t2 where fld3 LIKE 'hon_ysuckl_'; -fld3 -honeysuckle -select t2.fld3 from t2 where fld3 LIKE 'honeysuckle%'; -fld3 -honeysuckle -select t2.fld3 from t2 where fld3 LIKE 'h%le'; -fld3 -honeysuckle -select t2.fld3 from t2 where fld3 LIKE 'honeysuckle_'; -fld3 -select t2.fld3 from t2 where fld3 LIKE 'don_t_find_me_please%'; -fld3 -explain select t2.fld3 from t2 where fld3 = 'honeysuckle'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index -explain select fld3 from t2 ignore index (fld3) where fld3 = 'honeysuckle'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -explain select fld3 from t2 use index (fld1) where fld3 = 'honeysuckle'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -explain select fld3 from t2 use index (fld3) where fld3 = 'honeysuckle'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index -explain select fld3 from t2 use index (fld1,fld3) where fld3 = 'honeysuckle'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index -explain select fld3 from t2 ignore index (fld3,not_used); -ERROR 42000: Key 'not_used' doesn't exist in table 't2' -explain select fld3 from t2 use index (not_used); -ERROR 42000: Key 'not_used' doesn't exist in table 't2' -select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3; -fld3 -honeysuckle -honoring -explain select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 range fld3 fld3 30 NULL 2 Using where; Using index -select fld1,fld3 from t2 where fld3="Colombo" or fld3 = "nondecreasing" order by fld3; -fld1 fld3 -148504 Colombo -068305 Colombo -000000 nondecreasing -select fld1,fld3 from t2 where companynr = 37 and fld3 = 'appendixes'; -fld1 fld3 -232605 appendixes -1232605 appendixes -1232606 appendixes -1232607 appendixes -1232608 appendixes -1232609 appendixes -select fld1 from t2 where fld1=250501 or fld1="250502"; -fld1 -250501 -250502 -explain select fld1 from t2 where fld1=250501 or fld1="250502"; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 range fld1 fld1 4 NULL 2 Using where; Using index -select fld1 from t2 where fld1=250501 or fld1=250502 or fld1 >= 250505 and fld1 <= 250601 or fld1 between 250501 and 250502; -fld1 -250501 -250502 -250505 -250601 -explain select fld1 from t2 where fld1=250501 or fld1=250502 or fld1 >= 250505 and fld1 <= 250601 or fld1 between 250501 and 250502; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 range fld1 fld1 4 NULL 4 Using where; Using index -select fld1,fld3 from t2 where companynr = 37 and fld3 like 'f%'; -fld1 fld3 -012001 flanking -013602 foldout -013606 fingerings -018007 fanatic -018017 featherweight -018054 fetters -018103 flint -018104 flopping -036002 funereal -038017 fetched -038205 firearm -058004 Fenton -088303 feminine -186002 freakish -188007 flurried -188505 fitting -198006 furthermore -202301 Fitzpatrick -208101 fiftieth -208113 freest -218008 finishers -218022 feed -218401 faithful -226205 foothill -226209 furnishings -228306 forthcoming -228311 fated -231315 freezes -232102 forgivably -238007 filial -238008 fixedly -select fld3 from t2 where fld3 like "L%" and fld3 = "ok"; -fld3 -select fld3 from t2 where (fld3 like "C%" and fld3 = "Chantilly"); -fld3 -Chantilly -select fld1,fld3 from t2 where fld1 like "25050%"; -fld1 fld3 -250501 poisoning -250502 Iraqis -250503 heaving -250504 population -250505 bomb -select fld1,fld3 from t2 where fld1 like "25050_"; -fld1 fld3 -250501 poisoning -250502 Iraqis -250503 heaving -250504 population -250505 bomb -select distinct companynr from t2; -companynr -00 -37 -36 -50 -58 -29 -40 -53 -65 -41 -34 -68 -select distinct companynr from t2 order by companynr; -companynr -00 -29 -34 -36 -37 -40 -41 -50 -53 -58 -65 -68 -select distinct companynr from t2 order by companynr desc; -companynr -68 -65 -58 -53 -50 -41 -40 -37 -36 -34 -29 -00 -select distinct t2.fld3,period from t2,t1 where companynr=37 and fld3 like "O%"; -fld3 period -obliterates 9410 -offload 9410 -opaquely 9410 -organizer 9410 -overestimating 9410 -overlay 9410 -select distinct fld3 from t2 where companynr = 34 order by fld3; -fld3 -absentee -accessed -ahead -alphabetic -Asiaticizations -attitude -aye -bankruptcies -belays -Blythe -bomb -boulevard -bulldozes -cannot -caressing -charcoal -checksumming -chess -clubroom -colorful -cosy -creator -crying -Darius -diffusing -duality -Eiffel -Epiphany -Ernestine -explorers -exterminated -famine -forked -Gershwins -heaving -Hodges -Iraqis -Italianization -Lagos -landslide -libretto -Majorca -mastering -narrowed -occurred -offerers -Palestine -Peruvianizes -pharmaceutic -poisoning -population -Pygmalion -rats -realest -recording -regimented -retransmitting -reviver -rouses -scars -sicker -sleepwalk -stopped -sugars -translatable -uncles -unexpected -uprisings -versatility -vest -select distinct fld3 from t2 limit 10; -fld3 -abates -abiding -Abraham -abrogating -absentee -abut -accessed -accruing -accumulating -accuracies -select distinct fld3 from t2 having fld3 like "A%" limit 10; -fld3 -abates -abiding -Abraham -abrogating -absentee -abut -accessed -accruing -accumulating -accuracies -select distinct substring(fld3,1,3) from t2 where fld3 like "A%"; -substring(fld3,1,3) -aba -abi -Abr -abs -abu -acc -acq -acu -Ade -adj -Adl -adm -Ado -ads -adv -aer -aff -afi -afl -afo -agi -ahe -aim -air -Ald -alg -ali -all -alp -alr -ama -ame -amm -ana -and -ane -Ang -ani -Ann -Ant -api -app -aqu -Ara -arc -Arm -arr -Art -Asi -ask -asp -ass -ast -att -aud -Aug -aut -ave -avo -awe -aye -Azt -select distinct substring(fld3,1,3) as a from t2 having a like "A%" order by a limit 10; -a -aba -abi -Abr -abs -abu -acc -acq -acu -Ade -adj -select distinct substring(fld3,1,3) from t2 where fld3 like "A%" limit 10; -substring(fld3,1,3) -aba -abi -Abr -abs -abu -acc -acq -acu -Ade -adj -select distinct substring(fld3,1,3) as a from t2 having a like "A%" limit 10; -a -aba -abi -Abr -abs -abu -acc -acq -acu -Ade -adj -create table t3 ( -period int not null, -name char(32) not null, -companynr int not null, -price double(11,0), -price2 double(11,0), -key (period), -key (name) -); -create temporary table tmp engine = myisam select * from t3; -insert into t3 select * from tmp; -insert into tmp select * from t3; -insert into t3 select * from tmp; -insert into tmp select * from t3; -insert into t3 select * from tmp; -insert into tmp select * from t3; -insert into t3 select * from tmp; -insert into tmp select * from t3; -insert into t3 select * from tmp; -insert into tmp select * from t3; -insert into t3 select * from tmp; -insert into tmp select * from t3; -insert into t3 select * from tmp; -insert into tmp select * from t3; -insert into t3 select * from tmp; -insert into tmp select * from t3; -insert into t3 select * from tmp; -alter table t3 add t2nr int not null auto_increment primary key first; -drop table tmp; -SET BIG_TABLES=1; -select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10; -namn -Abraham Abraham -abrogating abrogating -admonishing admonishing -Adolph Adolph -afield afield -aging aging -ammonium ammonium -analyzable analyzable -animals animals -animized animized -SET BIG_TABLES=0; -select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10; -concat(fld3," ",fld3) -Abraham Abraham -abrogating abrogating -admonishing admonishing -Adolph Adolph -afield afield -aging aging -ammonium ammonium -analyzable analyzable -animals animals -animized animized -select distinct fld5 from t2 limit 10; -fld5 -neat -Steinberg -jarring -tinily -balled -persist -attainments -fanatic -measures -rightfulness -select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10; -fld3 count(*) -affixed 1 -and 1 -annoyers 1 -Anthony 1 -assayed 1 -assurers 1 -attendants 1 -bedlam 1 -bedpost 1 -boasted 1 -SET BIG_TABLES=1; -select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10; -fld3 count(*) -affixed 1 -and 1 -annoyers 1 -Anthony 1 -assayed 1 -assurers 1 -attendants 1 -bedlam 1 -bedpost 1 -boasted 1 -SET BIG_TABLES=0; -select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10; -fld3 repeat("a",length(fld3)) count(*) -circus aaaaaa 1 -cited aaaaa 1 -Colombo aaaaaaa 1 -congresswoman aaaaaaaaaaaaa 1 -contrition aaaaaaaaaa 1 -corny aaaaa 1 -cultivation aaaaaaaaaaa 1 -definiteness aaaaaaaaaaaa 1 -demultiplex aaaaaaaaaaa 1 -disappointing aaaaaaaaaaaaa 1 -select distinct companynr,rtrim(space(512+companynr)) from t3 order by 1,2; -companynr rtrim(space(512+companynr)) -37 -78 -101 -154 -311 -447 -512 -select distinct fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr order by fld3; -fld3 -explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr order by t3.t2nr,fld3; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort -1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index -explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using filesort -1 SIMPLE t3 ref period period 4 test.t1.period 4181 -explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 index period period 4 NULL 1 -1 SIMPLE t1 ref period period 4 test.t3.period 4181 -explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index period period 4 NULL 1 -1 SIMPLE t3 ref period period 4 test.t1.period 4181 -select period from t1; -period -9410 -select period from t1 where period=1900; -period -select fld3,period from t1,t2 where fld1 = 011401 order by period; -fld3 period -breaking 9410 -select fld3,period from t2,t3 where t2.fld1 = 011401 and t2.fld1=t3.t2nr and t3.period=1001; -fld3 period -breaking 1001 -explain select fld3,period from t2,t3 where t2.fld1 = 011401 and t3.t2nr=t2.fld1 and 1001 = t3.period; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 const fld1 fld1 4 const 1 -1 SIMPLE t3 const PRIMARY,period PRIMARY 4 const 1 -select fld3,period from t2,t1 where companynr*10 = 37*10; -fld3 period -breaking 9410 -Romans 9410 -intercepted 9410 -bewilderingly 9410 -astound 9410 -admonishing 9410 -sumac 9410 -flanking 9410 -combed 9410 -subjective 9410 -scatterbrain 9410 -Eulerian 9410 -Kane 9410 -overlay 9410 -perturb 9410 -goblins 9410 -annihilates 9410 -Wotan 9410 -snatching 9410 -concludes 9410 -laterally 9410 -yelped 9410 -grazing 9410 -Baird 9410 -celery 9410 -misunderstander 9410 -handgun 9410 -foldout 9410 -mystic 9410 -succumbed 9410 -Nabisco 9410 -fingerings 9410 -aging 9410 -afield 9410 -ammonium 9410 -boat 9410 -intelligibility 9410 -Augustine 9410 -teethe 9410 -dreaded 9410 -scholastics 9410 -audiology 9410 -wallet 9410 -parters 9410 -eschew 9410 -quitter 9410 -neat 9410 -Steinberg 9410 -jarring 9410 -tinily 9410 -balled 9410 -persist 9410 -attainments 9410 -fanatic 9410 -measures 9410 -rightfulness 9410 -capably 9410 -impulsive 9410 -starlet 9410 -terminators 9410 -untying 9410 -announces 9410 -featherweight 9410 -pessimist 9410 -daughter 9410 -decliner 9410 -lawgiver 9410 -stated 9410 -readable 9410 -attrition 9410 -cascade 9410 -motors 9410 -interrogate 9410 -pests 9410 -stairway 9410 -dopers 9410 -testicle 9410 -Parsifal 9410 -leavings 9410 -postulation 9410 -squeaking 9410 -contrasted 9410 -leftover 9410 -whiteners 9410 -erases 9410 -Punjab 9410 -Merritt 9410 -Quixotism 9410 -sweetish 9410 -dogging 9410 -scornfully 9410 -bellow 9410 -bills 9410 -cupboard 9410 -sureties 9410 -puddings 9410 -fetters 9410 -bivalves 9410 -incurring 9410 -Adolph 9410 -pithed 9410 -Miles 9410 -trimmings 9410 -tragedies 9410 -skulking 9410 -flint 9410 -flopping 9410 -relaxing 9410 -offload 9410 -suites 9410 -lists 9410 -animized 9410 -multilayer 9410 -standardizes 9410 -Judas 9410 -vacuuming 9410 -dentally 9410 -humanness 9410 -inch 9410 -Weissmuller 9410 -irresponsibly 9410 -luckily 9410 -culled 9410 -medical 9410 -bloodbath 9410 -subschema 9410 -animals 9410 -Micronesia 9410 -repetitions 9410 -Antares 9410 -ventilate 9410 -pityingly 9410 -interdependent 9410 -Graves 9410 -neonatal 9410 -chafe 9410 -honoring 9410 -realtor 9410 -elite 9410 -funereal 9410 -abrogating 9410 -sorters 9410 -Conley 9410 -lectured 9410 -Abraham 9410 -Hawaii 9410 -cage 9410 -hushes 9410 -Simla 9410 -reporters 9410 -Dutchman 9410 -descendants 9410 -groupings 9410 -dissociate 9410 -coexist 9410 -Beebe 9410 -Taoism 9410 -Connally 9410 -fetched 9410 -checkpoints 9410 -rusting 9410 -galling 9410 -obliterates 9410 -traitor 9410 -resumes 9410 -analyzable 9410 -terminator 9410 -gritty 9410 -firearm 9410 -minima 9410 -Selfridge 9410 -disable 9410 -witchcraft 9410 -betroth 9410 -Manhattanize 9410 -imprint 9410 -peeked 9410 -swelling 9410 -interrelationships 9410 -riser 9410 -Gandhian 9410 -peacock 9410 -bee 9410 -kanji 9410 -dental 9410 -scarf 9410 -chasm 9410 -insolence 9410 -syndicate 9410 -alike 9410 -imperial 9410 -convulsion 9410 -railway 9410 -validate 9410 -normalizes 9410 -comprehensive 9410 -chewing 9410 -denizen 9410 -schemer 9410 -chronicle 9410 -Kline 9410 -Anatole 9410 -partridges 9410 -brunch 9410 -recruited 9410 -dimensions 9410 -Chicana 9410 -announced 9410 -praised 9410 -employing 9410 -linear 9410 -quagmire 9410 -western 9410 -relishing 9410 -serving 9410 -scheduling 9410 -lore 9410 -eventful 9410 -arteriole 9410 -disentangle 9410 -cured 9410 -Fenton 9410 -avoidable 9410 -drains 9410 -detectably 9410 -husky 9410 -impelling 9410 -undoes 9410 -evened 9410 -squeezes 9410 -destroyer 9410 -rudeness 9410 -beaner 9410 -boorish 9410 -Everhart 9410 -encompass 9410 -mushrooms 9410 -Alison 9410 -externally 9410 -pellagra 9410 -cult 9410 -creek 9410 -Huffman 9410 -Majorca 9410 -governing 9410 -gadfly 9410 -reassigned 9410 -intentness 9410 -craziness 9410 -psychic 9410 -squabbled 9410 -burlesque 9410 -capped 9410 -extracted 9410 -DiMaggio 9410 -exclamation 9410 -subdirectory 9410 -Gothicism 9410 -feminine 9410 -metaphysically 9410 -sanding 9410 -Miltonism 9410 -freakish 9410 -index 9410 -straight 9410 -flurried 9410 -denotative 9410 -coming 9410 -commencements 9410 -gentleman 9410 -gifted 9410 -Shanghais 9410 -sportswriting 9410 -sloping 9410 -navies 9410 -leaflet 9410 -shooter 9410 -Joplin 9410 -babies 9410 -assails 9410 -admiring 9410 -swaying 9410 -Goldstine 9410 -fitting 9410 -Norwalk 9410 -analogy 9410 -deludes 9410 -cokes 9410 -Clayton 9410 -exhausts 9410 -causality 9410 -sating 9410 -icon 9410 -throttles 9410 -communicants 9410 -dehydrate 9410 -priceless 9410 -publicly 9410 -incidentals 9410 -commonplace 9410 -mumbles 9410 -furthermore 9410 -cautioned 9410 -parametrized 9410 -registration 9410 -sadly 9410 -positioning 9410 -babysitting 9410 -eternal 9410 -hoarder 9410 -congregates 9410 -rains 9410 -workers 9410 -sags 9410 -unplug 9410 -garage 9410 -boulder 9410 -specifics 9410 -Teresa 9410 -Winsett 9410 -convenient 9410 -buckboards 9410 -amenities 9410 -resplendent 9410 -sews 9410 -participated 9410 -Simon 9410 -certificates 9410 -Fitzpatrick 9410 -Evanston 9410 -misted 9410 -textures 9410 -save 9410 -count 9410 -rightful 9410 -chaperone 9410 -Lizzy 9410 -clenched 9410 -effortlessly 9410 -accessed 9410 -beaters 9410 -Hornblower 9410 -vests 9410 -indulgences 9410 -infallibly 9410 -unwilling 9410 -excrete 9410 -spools 9410 -crunches 9410 -overestimating 9410 -ineffective 9410 -humiliation 9410 -sophomore 9410 -star 9410 -rifles 9410 -dialysis 9410 -arriving 9410 -indulge 9410 -clockers 9410 -languages 9410 -Antarctica 9410 -percentage 9410 -ceiling 9410 -specification 9410 -regimented 9410 -ciphers 9410 -pictures 9410 -serpents 9410 -allot 9410 -realized 9410 -mayoral 9410 -opaquely 9410 -hostess 9410 -fiftieth 9410 -incorrectly 9410 -decomposition 9410 -stranglings 9410 -mixture 9410 -electroencephalography 9410 -similarities 9410 -charges 9410 -freest 9410 -Greenberg 9410 -tinting 9410 -expelled 9410 -warm 9410 -smoothed 9410 -deductions 9410 -Romano 9410 -bitterroot 9410 -corset 9410 -securing 9410 -environing 9410 -cute 9410 -Crays 9410 -heiress 9410 -inform 9410 -avenge 9410 -universals 9410 -Kinsey 9410 -ravines 9410 -bestseller 9410 -equilibrium 9410 -extents 9410 -relatively 9410 -pressure 9410 -critiques 9410 -befouled 9410 -rightfully 9410 -mechanizing 9410 -Latinizes 9410 -timesharing 9410 -Aden 9410 -embassies 9410 -males 9410 -shapelessly 9410 -mastering 9410 -Newtonian 9410 -finishers 9410 -abates 9410 -teem 9410 -kiting 9410 -stodgy 9410 -feed 9410 -guitars 9410 -airships 9410 -store 9410 -denounces 9410 -Pyle 9410 -Saxony 9410 -serializations 9410 -Peruvian 9410 -taxonomically 9410 -kingdom 9410 -stint 9410 -Sault 9410 -faithful 9410 -Ganymede 9410 -tidiness 9410 -gainful 9410 -contrary 9410 -Tipperary 9410 -tropics 9410 -theorizers 9410 -renew 9410 -already 9410 -terminal 9410 -Hegelian 9410 -hypothesizer 9410 -warningly 9410 -journalizing 9410 -nested 9410 -Lars 9410 -saplings 9410 -foothill 9410 -labeled 9410 -imperiously 9410 -reporters 9410 -furnishings 9410 -precipitable 9410 -discounts 9410 -excises 9410 -Stalin 9410 -despot 9410 -ripeness 9410 -Arabia 9410 -unruly 9410 -mournfulness 9410 -boom 9410 -slaughter 9410 -Sabine 9410 -handy 9410 -rural 9410 -organizer 9410 -shipyard 9410 -civics 9410 -inaccuracy 9410 -rules 9410 -juveniles 9410 -comprised 9410 -investigations 9410 -stabilizes 9410 -seminaries 9410 -Hunter 9410 -sporty 9410 -test 9410 -weasels 9410 -CERN 9410 -tempering 9410 -afore 9410 -Galatean 9410 -techniques 9410 -error 9410 -veranda 9410 -severely 9410 -Cassites 9410 -forthcoming 9410 -guides 9410 -vanish 9410 -lied 9410 -sawtooth 9410 -fated 9410 -gradually 9410 -widens 9410 -preclude 9410 -evenhandedly 9410 -percentage 9410 -disobedience 9410 -humility 9410 -gleaning 9410 -petted 9410 -bloater 9410 -minion 9410 -marginal 9410 -apiary 9410 -measures 9410 -precaution 9410 -repelled 9410 -primary 9410 -coverings 9410 -Artemia 9410 -navigate 9410 -spatial 9410 -Gurkha 9410 -meanwhile 9410 -Melinda 9410 -Butterfield 9410 -Aldrich 9410 -previewing 9410 -glut 9410 -unaffected 9410 -inmate 9410 -mineral 9410 -impending 9410 -meditation 9410 -ideas 9410 -miniaturizes 9410 -lewdly 9410 -title 9410 -youthfulness 9410 -creak 9410 -Chippewa 9410 -clamored 9410 -freezes 9410 -forgivably 9410 -reduce 9410 -McGovern 9410 -Nazis 9410 -epistle 9410 -socializes 9410 -conceptions 9410 -Kevin 9410 -uncovering 9410 -chews 9410 -appendixes 9410 -appendixes 9410 -appendixes 9410 -appendixes 9410 -appendixes 9410 -appendixes 9410 -raining 9410 -infest 9410 -compartment 9410 -minting 9410 -ducks 9410 -roped 9410 -waltz 9410 -Lillian 9410 -repressions 9410 -chillingly 9410 -noncritical 9410 -lithograph 9410 -spongers 9410 -parenthood 9410 -posed 9410 -instruments 9410 -filial 9410 -fixedly 9410 -relives 9410 -Pandora 9410 -watering 9410 -ungrateful 9410 -secures 9410 -poison 9410 -dusted 9410 -encompasses 9410 -presentation 9410 -Kantian 9410 -select fld3,period,price,price2 from t2,t3 where t2.fld1=t3.t2nr and period >= 1001 and period <= 1002 and t2.companynr = 37 order by fld3,period, price; -fld3 period price price2 -admonishing 1002 28357832 8723648 -analyzable 1002 28357832 8723648 -annihilates 1001 5987435 234724 -Antares 1002 28357832 8723648 -astound 1001 5987435 234724 -audiology 1001 5987435 234724 -Augustine 1002 28357832 8723648 -Baird 1002 28357832 8723648 -bewilderingly 1001 5987435 234724 -breaking 1001 5987435 234724 -Conley 1001 5987435 234724 -dentally 1002 28357832 8723648 -dissociate 1002 28357832 8723648 -elite 1001 5987435 234724 -eschew 1001 5987435 234724 -Eulerian 1001 5987435 234724 -flanking 1001 5987435 234724 -foldout 1002 28357832 8723648 -funereal 1002 28357832 8723648 -galling 1002 28357832 8723648 -Graves 1001 5987435 234724 -grazing 1001 5987435 234724 -groupings 1001 5987435 234724 -handgun 1001 5987435 234724 -humility 1002 28357832 8723648 -impulsive 1002 28357832 8723648 -inch 1001 5987435 234724 -intelligibility 1001 5987435 234724 -jarring 1001 5987435 234724 -lawgiver 1001 5987435 234724 -lectured 1002 28357832 8723648 -Merritt 1002 28357832 8723648 -neonatal 1001 5987435 234724 -offload 1002 28357832 8723648 -parters 1002 28357832 8723648 -pityingly 1002 28357832 8723648 -puddings 1002 28357832 8723648 -Punjab 1001 5987435 234724 -quitter 1002 28357832 8723648 -realtor 1001 5987435 234724 -relaxing 1001 5987435 234724 -repetitions 1001 5987435 234724 -resumes 1001 5987435 234724 -Romans 1002 28357832 8723648 -rusting 1001 5987435 234724 -scholastics 1001 5987435 234724 -skulking 1002 28357832 8723648 -stated 1002 28357832 8723648 -suites 1002 28357832 8723648 -sureties 1001 5987435 234724 -testicle 1002 28357832 8723648 -tinily 1002 28357832 8723648 -tragedies 1001 5987435 234724 -trimmings 1001 5987435 234724 -vacuuming 1001 5987435 234724 -ventilate 1001 5987435 234724 -wallet 1001 5987435 234724 -Weissmuller 1002 28357832 8723648 -Wotan 1002 28357832 8723648 -select t2.fld1,fld3,period,price,price2 from t2,t3 where t2.fld1>= 18201 and t2.fld1 <= 18811 and t2.fld1=t3.t2nr and period = 1001 and t2.companynr = 37; -fld1 fld3 period price price2 -018201 relaxing 1001 5987435 234724 -018601 vacuuming 1001 5987435 234724 -018801 inch 1001 5987435 234724 -018811 repetitions 1001 5987435 234724 -create table t4 ( -companynr tinyint(2) unsigned zerofill NOT NULL default '00', -companyname char(30) NOT NULL default '', -PRIMARY KEY (companynr), -UNIQUE KEY companyname(companyname) -) ENGINE=MyISAM MAX_ROWS=50 PACK_KEYS=1 COMMENT='companynames'; -select STRAIGHT_JOIN t2.companynr,companyname from t4,t2 where t2.companynr=t4.companynr group by t2.companynr; -companynr companyname -00 Unknown -29 company 1 -34 company 2 -36 company 3 -37 company 4 -40 company 5 -41 company 6 -50 company 11 -53 company 7 -58 company 8 -65 company 9 -68 company 10 -select SQL_SMALL_RESULT t2.companynr,companyname from t4,t2 where t2.companynr=t4.companynr group by t2.companynr; -companynr companyname -00 Unknown -29 company 1 -34 company 2 -36 company 3 -37 company 4 -40 company 5 -41 company 6 -50 company 11 -53 company 7 -58 company 8 -65 company 9 -68 company 10 -select * from t1,t1 t12; -Period Varor_period Period Varor_period -9410 9412 9410 9412 -select t2.fld1,t22.fld1 from t2,t2 t22 where t2.fld1 >= 250501 and t2.fld1 <= 250505 and t22.fld1 >= 250501 and t22.fld1 <= 250505; -fld1 fld1 -250501 250501 -250502 250501 -250503 250501 -250504 250501 -250505 250501 -250501 250502 -250502 250502 -250503 250502 -250504 250502 -250505 250502 -250501 250503 -250502 250503 -250503 250503 -250504 250503 -250505 250503 -250501 250504 -250502 250504 -250503 250504 -250504 250504 -250505 250504 -250501 250505 -250502 250505 -250503 250505 -250504 250505 -250505 250505 -SET @save_optimizer_switch=@@optimizer_switch; -SET optimizer_switch='outer_join_with_cache=off'; -insert into t2 (fld1, companynr) values (999999,99); -select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null; -companynr companyname -99 NULL -select count(*) from t2 left join t4 using (companynr) where t4.companynr is not null; -count(*) -1199 -explain select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 -1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using where; Not exists -explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr is null; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 -1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where; Not exists -select companynr,companyname from t2 left join t4 using (companynr) where companynr is null; -companynr companyname -select count(*) from t2 left join t4 using (companynr) where companynr is not null; -count(*) -1200 -explain select companynr,companyname from t2 left join t4 using (companynr) where companynr 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 -explain select companynr,companyname from t4 left join t2 using (companynr) where companynr 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 -delete from t2 where fld1=999999; -explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 -explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 -explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 and t4.companynr > 0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 -explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 and companynr > 0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr is null; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0 or t4.companynr > 0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -explain select t2.companynr,companyname from t4 left join t2 using (companynr) where ifnull(t2.companynr,1)>0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr is null; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 ALL NULL NULL NULL NULL 12 Using where -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where -SET optimizer_switch=@save_optimizer_switch; -select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; -companynr companynr -37 36 -41 40 -explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t4 index NULL PRIMARY 1 NULL 12 Using index; Using temporary -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join) -select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008; -fld1 companynr fld3 period -038008 37 reporters 1008 -038208 37 Selfridge 1008 -select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t2.fld1 = 38208 or t2.fld1 = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; -fld1 companynr fld3 period -038008 37 reporters 1008 -038208 37 Selfridge 1008 -select t2.fld1,t2.companynr,fld3,period from t3,t2 where (t3.t2nr = 38208 or t3.t2nr = 38008) and t2.fld1=t3.t2nr and period>=1008 and period<=1009; -fld1 companynr fld3 period -038008 37 reporters 1008 -038208 37 Selfridge 1008 -select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909); -period -9410 -select period from t1 where ((period > 0 and period < 1) or (((period > 0 and period < 100) and (period > 10)) or (period > 10)) or (period > 0 and (period > 5 or period > 6))); -period -9410 -select a.fld1 from t2 as a,t2 b where ((a.fld1 = 250501 and a.fld1=b.fld1) or a.fld1=250502 or a.fld1=250503 or (a.fld1=250505 and a.fld1<=b.fld1 and b.fld1>=a.fld1)) and a.fld1=b.fld1; -fld1 -250501 -250502 -250503 -250505 -select fld1 from t2 where fld1 in (250502,98005,98006,250503,250605,250606) and fld1 >=250502 and fld1 not in (250605,250606); -fld1 -250502 -250503 -select fld1 from t2 where fld1 between 250502 and 250504; -fld1 -250502 -250503 -250504 -select fld3 from t2 where (((fld3 like "_%L%" ) or (fld3 like "%ok%")) and ( fld3 like "L%" or fld3 like "G%")) and fld3 like "L%" ; -fld3 -label -labeled -labeled -landslide -laterally -leaflet -lewdly -Lillian -luckily -select count(*) from t1; -count(*) -1 -select companynr,count(*),sum(fld1) from t2 group by companynr; -companynr count(*) sum(fld1) -00 82 10355753 -29 95 14473298 -34 70 17788966 -36 215 22786296 -37 588 83602098 -40 37 6618386 -41 52 12816335 -50 11 1595438 -53 4 793210 -58 23 2254293 -65 10 2284055 -68 12 3097288 -select companynr,count(*) from t2 group by companynr order by companynr desc limit 5; -companynr count(*) -68 12 -65 10 -58 23 -53 4 -50 11 -select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 where companynr = 34 and fld4<>""; -count(*) min(fld4) max(fld4) sum(fld1) avg(fld1) std(fld1) variance(fld1) -70 absentee vest 17788966 254128.0857 3272.5940 10709871.3069 -explain extended select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 where companynr = 34 and fld4<>""; -id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 100.00 Using where -Warnings: -Note 1003 select count(0) AS `count(*)`,min(`test`.`t2`.`fld4`) AS `min(fld4)`,max(`test`.`t2`.`fld4`) AS `max(fld4)`,sum(`test`.`t2`.`fld1`) AS `sum(fld1)`,avg(`test`.`t2`.`fld1`) AS `avg(fld1)`,std(`test`.`t2`.`fld1`) AS `std(fld1)`,variance(`test`.`t2`.`fld1`) AS `variance(fld1)` from `test`.`t2` where `test`.`t2`.`companynr` = 34 and `test`.`t2`.`fld4` <> '' -select companynr,count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 group by companynr limit 3; -companynr count(*) min(fld4) max(fld4) sum(fld1) avg(fld1) std(fld1) variance(fld1) -00 82 Anthony windmills 10355753 126289.6707 115550.9757 13352027981.7087 -29 95 abut wetness 14473298 152350.5053 8368.5480 70032594.9026 -34 70 absentee vest 17788966 254128.0857 3272.5940 10709871.3069 -select companynr,t2nr,count(price),sum(price),min(price),max(price),avg(price) from t3 where companynr = 37 group by companynr,t2nr limit 10; -companynr t2nr count(price) sum(price) min(price) max(price) avg(price) -37 1 1 5987435 5987435 5987435 5987435.0000 -37 2 1 28357832 28357832 28357832 28357832.0000 -37 3 1 39654943 39654943 39654943 39654943.0000 -37 11 1 5987435 5987435 5987435 5987435.0000 -37 12 1 28357832 28357832 28357832 28357832.0000 -37 13 1 39654943 39654943 39654943 39654943.0000 -37 21 1 5987435 5987435 5987435 5987435.0000 -37 22 1 28357832 28357832 28357832 28357832.0000 -37 23 1 39654943 39654943 39654943 39654943.0000 -37 31 1 5987435 5987435 5987435 5987435.0000 -select /*! SQL_SMALL_RESULT */ companynr,t2nr,count(price),sum(price),min(price),max(price),avg(price) from t3 where companynr = 37 group by companynr,t2nr limit 10; -companynr t2nr count(price) sum(price) min(price) max(price) avg(price) -37 1 1 5987435 5987435 5987435 5987435.0000 -37 2 1 28357832 28357832 28357832 28357832.0000 -37 3 1 39654943 39654943 39654943 39654943.0000 -37 11 1 5987435 5987435 5987435 5987435.0000 -37 12 1 28357832 28357832 28357832 28357832.0000 -37 13 1 39654943 39654943 39654943 39654943.0000 -37 21 1 5987435 5987435 5987435 5987435.0000 -37 22 1 28357832 28357832 28357832 28357832.0000 -37 23 1 39654943 39654943 39654943 39654943.0000 -37 31 1 5987435 5987435 5987435 5987435.0000 -select companynr,count(price),sum(price),min(price),max(price),avg(price) from t3 group by companynr ; -companynr count(price) sum(price) min(price) max(price) avg(price) -37 12543 309394878010 5987435 39654943 24666736.6667 -78 8362 414611089292 726498 98439034 49582766.0000 -101 4181 3489454238 834598 834598 834598.0000 -154 4181 4112197254950 983543950 983543950 983543950.0000 -311 4181 979599938 234298 234298 234298.0000 -447 4181 9929180954 2374834 2374834 2374834.0000 -512 4181 3288532102 786542 786542 786542.0000 -select distinct mod(companynr,10) from t4 group by companynr; -mod(companynr,10) -0 -9 -4 -6 -7 -1 -3 -8 -5 -select distinct 1 from t4 group by companynr; -1 -1 -select count(distinct fld1) from t2; -count(distinct fld1) -1199 -select companynr,count(distinct fld1) from t2 group by companynr; -companynr count(distinct fld1) -00 82 -29 95 -34 70 -36 215 -37 588 -40 37 -41 52 -50 11 -53 4 -58 23 -65 10 -68 12 -select companynr,count(*) from t2 group by companynr; -companynr count(*) -00 82 -29 95 -34 70 -36 215 -37 588 -40 37 -41 52 -50 11 -53 4 -58 23 -65 10 -68 12 -select companynr,count(distinct concat(fld1,repeat(65,1000))) from t2 group by companynr; -companynr count(distinct concat(fld1,repeat(65,1000))) -00 82 -29 95 -34 70 -36 215 -37 588 -40 37 -41 52 -50 11 -53 4 -58 23 -65 10 -68 12 -select companynr,count(distinct concat(fld1,repeat(65,200))) from t2 group by companynr; -companynr count(distinct concat(fld1,repeat(65,200))) -00 82 -29 95 -34 70 -36 215 -37 588 -40 37 -41 52 -50 11 -53 4 -58 23 -65 10 -68 12 -select companynr,count(distinct floor(fld1/100)) from t2 group by companynr; -companynr count(distinct floor(fld1/100)) -00 47 -29 35 -34 14 -36 69 -37 108 -40 16 -41 11 -50 9 -53 1 -58 1 -65 1 -68 1 -select companynr,count(distinct concat(repeat(65,1000),floor(fld1/100))) from t2 group by companynr; -companynr count(distinct concat(repeat(65,1000),floor(fld1/100))) -00 47 -29 35 -34 14 -36 69 -37 108 -40 16 -41 11 -50 9 -53 1 -58 1 -65 1 -68 1 -select sum(fld1),fld3 from t2 where fld3="Romans" group by fld1 limit 10; -sum(fld1) fld3 -11402 Romans -select name,count(*) from t3 where name='cloakroom' group by name; -name count(*) -cloakroom 4181 -select name,count(*) from t3 where name='cloakroom' and price>10 group by name; -name count(*) -cloakroom 4181 -select count(*) from t3 where name='cloakroom' and price2=823742; -count(*) -4181 -select name,count(*) from t3 where name='cloakroom' and price2=823742 group by name; -name count(*) -cloakroom 4181 -select name,count(*) from t3 where name >= "extramarital" and price <= 39654943 group by name; -name count(*) -extramarital 4181 -gazer 4181 -gems 4181 -Iranizes 4181 -spates 4181 -tucked 4181 -violinist 4181 -select t2.fld3,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name; -fld3 count(*) -spates 4181 -select companynr|0,companyname from t4 group by 1; -companynr|0 companyname -0 Unknown -29 company 1 -34 company 2 -36 company 3 -37 company 4 -40 company 5 -41 company 6 -50 company 11 -53 company 7 -58 company 8 -65 company 9 -68 company 10 -select t2.companynr,companyname,count(*) from t2,t4 where t2.companynr=t4.companynr group by t2.companynr order by companyname; -companynr companyname count(*) -29 company 1 95 -68 company 10 12 -50 company 11 11 -34 company 2 70 -36 company 3 215 -37 company 4 588 -40 company 5 37 -41 company 6 52 -53 company 7 4 -58 company 8 23 -65 company 9 10 -00 Unknown 82 -select t2.fld1,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by t3.name; -fld1 count(*) -158402 4181 -select sum(Period)/count(*) from t1; -sum(Period)/count(*) -9410.0000 -select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr; -companynr count sum diff func -37 12543 309394878010 0.0000 464091 -78 8362 414611089292 0.0000 652236 -101 4181 3489454238 0.0000 422281 -154 4181 4112197254950 0.0000 643874 -311 4181 979599938 0.0000 1300291 -447 4181 9929180954 0.0000 1868907 -512 4181 3288532102 0.0000 2140672 -select companynr,sum(price)/count(price) as avg from t3 group by companynr having avg > 70000000 order by avg; -companynr avg -154 983543950.0000 -select companynr,count(*) from t2 group by companynr order by 2 desc; -companynr count(*) -37 588 -36 215 -29 95 -00 82 -34 70 -41 52 -40 37 -58 23 -68 12 -50 11 -65 10 -53 4 -select companynr,count(*) from t2 where companynr > 40 group by companynr order by 2 desc; -companynr count(*) -41 52 -58 23 -68 12 -50 11 -65 10 -53 4 -select t2.fld4,t2.fld1,count(price),sum(price),min(price),max(price),avg(price) from t3,t2 where t3.companynr = 37 and t2.fld1 = t3.t2nr group by fld1,t2.fld4; -fld4 fld1 count(price) sum(price) min(price) max(price) avg(price) -teethe 000001 1 5987435 5987435 5987435 5987435.0000 -dreaded 011401 1 5987435 5987435 5987435 5987435.0000 -scholastics 011402 1 28357832 28357832 28357832 28357832.0000 -audiology 011403 1 39654943 39654943 39654943 39654943.0000 -wallet 011501 1 5987435 5987435 5987435 5987435.0000 -parters 011701 1 5987435 5987435 5987435 5987435.0000 -eschew 011702 1 28357832 28357832 28357832 28357832.0000 -quitter 011703 1 39654943 39654943 39654943 39654943.0000 -neat 012001 1 5987435 5987435 5987435 5987435.0000 -Steinberg 012003 1 39654943 39654943 39654943 39654943.0000 -balled 012301 1 5987435 5987435 5987435 5987435.0000 -persist 012302 1 28357832 28357832 28357832 28357832.0000 -attainments 012303 1 39654943 39654943 39654943 39654943.0000 -capably 012501 1 5987435 5987435 5987435 5987435.0000 -impulsive 012602 1 28357832 28357832 28357832 28357832.0000 -starlet 012603 1 39654943 39654943 39654943 39654943.0000 -featherweight 012701 1 5987435 5987435 5987435 5987435.0000 -pessimist 012702 1 28357832 28357832 28357832 28357832.0000 -daughter 012703 1 39654943 39654943 39654943 39654943.0000 -lawgiver 013601 1 5987435 5987435 5987435 5987435.0000 -stated 013602 1 28357832 28357832 28357832 28357832.0000 -readable 013603 1 39654943 39654943 39654943 39654943.0000 -testicle 013801 1 5987435 5987435 5987435 5987435.0000 -Parsifal 013802 1 28357832 28357832 28357832 28357832.0000 -leavings 013803 1 39654943 39654943 39654943 39654943.0000 -squeaking 013901 1 5987435 5987435 5987435 5987435.0000 -contrasted 016001 1 5987435 5987435 5987435 5987435.0000 -leftover 016201 1 5987435 5987435 5987435 5987435.0000 -whiteners 016202 1 28357832 28357832 28357832 28357832.0000 -erases 016301 1 5987435 5987435 5987435 5987435.0000 -Punjab 016302 1 28357832 28357832 28357832 28357832.0000 -Merritt 016303 1 39654943 39654943 39654943 39654943.0000 -sweetish 018001 1 5987435 5987435 5987435 5987435.0000 -dogging 018002 1 28357832 28357832 28357832 28357832.0000 -scornfully 018003 1 39654943 39654943 39654943 39654943.0000 -fetters 018012 1 28357832 28357832 28357832 28357832.0000 -bivalves 018013 1 39654943 39654943 39654943 39654943.0000 -skulking 018021 1 5987435 5987435 5987435 5987435.0000 -flint 018022 1 28357832 28357832 28357832 28357832.0000 -flopping 018023 1 39654943 39654943 39654943 39654943.0000 -Judas 018032 1 28357832 28357832 28357832 28357832.0000 -vacuuming 018033 1 39654943 39654943 39654943 39654943.0000 -medical 018041 1 5987435 5987435 5987435 5987435.0000 -bloodbath 018042 1 28357832 28357832 28357832 28357832.0000 -subschema 018043 1 39654943 39654943 39654943 39654943.0000 -interdependent 018051 1 5987435 5987435 5987435 5987435.0000 -Graves 018052 1 28357832 28357832 28357832 28357832.0000 -neonatal 018053 1 39654943 39654943 39654943 39654943.0000 -sorters 018061 1 5987435 5987435 5987435 5987435.0000 -epistle 018062 1 28357832 28357832 28357832 28357832.0000 -Conley 018101 1 5987435 5987435 5987435 5987435.0000 -lectured 018102 1 28357832 28357832 28357832 28357832.0000 -Abraham 018103 1 39654943 39654943 39654943 39654943.0000 -cage 018201 1 5987435 5987435 5987435 5987435.0000 -hushes 018202 1 28357832 28357832 28357832 28357832.0000 -Simla 018402 1 28357832 28357832 28357832 28357832.0000 -reporters 018403 1 39654943 39654943 39654943 39654943.0000 -coexist 018601 1 5987435 5987435 5987435 5987435.0000 -Beebe 018602 1 28357832 28357832 28357832 28357832.0000 -Taoism 018603 1 39654943 39654943 39654943 39654943.0000 -Connally 018801 1 5987435 5987435 5987435 5987435.0000 -fetched 018802 1 28357832 28357832 28357832 28357832.0000 -checkpoints 018803 1 39654943 39654943 39654943 39654943.0000 -gritty 018811 1 5987435 5987435 5987435 5987435.0000 -firearm 018812 1 28357832 28357832 28357832 28357832.0000 -minima 019101 1 5987435 5987435 5987435 5987435.0000 -Selfridge 019102 1 28357832 28357832 28357832 28357832.0000 -disable 019103 1 39654943 39654943 39654943 39654943.0000 -witchcraft 019201 1 5987435 5987435 5987435 5987435.0000 -betroth 030501 1 5987435 5987435 5987435 5987435.0000 -Manhattanize 030502 1 28357832 28357832 28357832 28357832.0000 -imprint 030503 1 39654943 39654943 39654943 39654943.0000 -swelling 031901 1 5987435 5987435 5987435 5987435.0000 -interrelationships 036001 1 5987435 5987435 5987435 5987435.0000 -riser 036002 1 28357832 28357832 28357832 28357832.0000 -bee 038001 1 5987435 5987435 5987435 5987435.0000 -kanji 038002 1 28357832 28357832 28357832 28357832.0000 -dental 038003 1 39654943 39654943 39654943 39654943.0000 -railway 038011 1 5987435 5987435 5987435 5987435.0000 -validate 038012 1 28357832 28357832 28357832 28357832.0000 -normalizes 038013 1 39654943 39654943 39654943 39654943.0000 -Kline 038101 1 5987435 5987435 5987435 5987435.0000 -Anatole 038102 1 28357832 28357832 28357832 28357832.0000 -partridges 038103 1 39654943 39654943 39654943 39654943.0000 -recruited 038201 1 5987435 5987435 5987435 5987435.0000 -dimensions 038202 1 28357832 28357832 28357832 28357832.0000 -Chicana 038203 1 39654943 39654943 39654943 39654943.0000 -select t3.companynr,fld3,sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 512 group by companynr,fld3; -companynr fld3 sum(price) -512 boat 786542 -512 capably 786542 -512 cupboard 786542 -512 decliner 786542 -512 descendants 786542 -512 dopers 786542 -512 erases 786542 -512 Micronesia 786542 -512 Miles 786542 -512 skies 786542 -select t2.companynr,count(*),min(fld3),max(fld3),sum(price),avg(price) from t2,t3 where t3.companynr >= 30 and t3.companynr <= 58 and t3.t2nr = t2.fld1 and 1+1=2 group by t2.companynr; -companynr count(*) min(fld3) max(fld3) sum(price) avg(price) -00 1 Omaha Omaha 5987435 5987435.0000 -36 1 dubbed dubbed 28357832 28357832.0000 -37 83 Abraham Wotan 1908978016 22999735.1325 -50 2 scribbled tapestry 68012775 34006387.5000 -select t3.companynr+0,t3.t2nr,fld3,sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 37 group by 1,t3.t2nr,fld3,fld3,fld3,fld3,fld3 order by fld1; -t3.companynr+0 t2nr fld3 sum(price) -37 1 Omaha 5987435 -37 11401 breaking 5987435 -37 11402 Romans 28357832 -37 11403 intercepted 39654943 -37 11501 bewilderingly 5987435 -37 11701 astound 5987435 -37 11702 admonishing 28357832 -37 11703 sumac 39654943 -37 12001 flanking 5987435 -37 12003 combed 39654943 -37 12301 Eulerian 5987435 -37 12302 dubbed 28357832 -37 12303 Kane 39654943 -37 12501 annihilates 5987435 -37 12602 Wotan 28357832 -37 12603 snatching 39654943 -37 12701 grazing 5987435 -37 12702 Baird 28357832 -37 12703 celery 39654943 -37 13601 handgun 5987435 -37 13602 foldout 28357832 -37 13603 mystic 39654943 -37 13801 intelligibility 5987435 -37 13802 Augustine 28357832 -37 13803 teethe 39654943 -37 13901 scholastics 5987435 -37 16001 audiology 5987435 -37 16201 wallet 5987435 -37 16202 parters 28357832 -37 16301 eschew 5987435 -37 16302 quitter 28357832 -37 16303 neat 39654943 -37 18001 jarring 5987435 -37 18002 tinily 28357832 -37 18003 balled 39654943 -37 18012 impulsive 28357832 -37 18013 starlet 39654943 -37 18021 lawgiver 5987435 -37 18022 stated 28357832 -37 18023 readable 39654943 -37 18032 testicle 28357832 -37 18033 Parsifal 39654943 -37 18041 Punjab 5987435 -37 18042 Merritt 28357832 -37 18043 Quixotism 39654943 -37 18051 sureties 5987435 -37 18052 puddings 28357832 -37 18053 tapestry 39654943 -37 18061 trimmings 5987435 -37 18062 humility 28357832 -37 18101 tragedies 5987435 -37 18102 skulking 28357832 -37 18103 flint 39654943 -37 18201 relaxing 5987435 -37 18202 offload 28357832 -37 18402 suites 28357832 -37 18403 lists 39654943 -37 18601 vacuuming 5987435 -37 18602 dentally 28357832 -37 18603 humanness 39654943 -37 18801 inch 5987435 -37 18802 Weissmuller 28357832 -37 18803 irresponsibly 39654943 -37 18811 repetitions 5987435 -37 18812 Antares 28357832 -37 19101 ventilate 5987435 -37 19102 pityingly 28357832 -37 19103 interdependent 39654943 -37 19201 Graves 5987435 -37 30501 neonatal 5987435 -37 30502 scribbled 28357832 -37 30503 chafe 39654943 -37 31901 realtor 5987435 -37 36001 elite 5987435 -37 36002 funereal 28357832 -37 38001 Conley 5987435 -37 38002 lectured 28357832 -37 38003 Abraham 39654943 -37 38011 groupings 5987435 -37 38012 dissociate 28357832 -37 38013 coexist 39654943 -37 38101 rusting 5987435 -37 38102 galling 28357832 -37 38103 obliterates 39654943 -37 38201 resumes 5987435 -37 38202 analyzable 28357832 -37 38203 terminator 39654943 -select sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 512 and t3.t2nr = 38008 and t2.fld1 = 38008 or t2.fld1= t3.t2nr and t3.t2nr = 38008 and t2.fld1 = 38008; -sum(price) -234298 -select t2.fld1,sum(price) from t3,t2 where t2.fld1 = t3.t2nr and t3.companynr = 512 and t3.t2nr = 38008 and t2.fld1 = 38008 or t2.fld1 = t3.t2nr and t3.t2nr = 38008 and t2.fld1 = 38008 or t3.t2nr = t2.fld1 and t2.fld1 = 38008 group by t2.fld1; -fld1 sum(price) -038008 234298 -explain select fld3 from t2 where 1>2 or 2>3; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE -explain select fld3 from t2 where fld1=fld1; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 -select companynr,fld1 from t2 HAVING fld1=250501 or fld1=250502; -companynr fld1 -34 250501 -34 250502 -select companynr,fld1 from t2 WHERE fld1>=250501 HAVING fld1<=250502; -companynr fld1 -34 250501 -34 250502 -select companynr,count(*) as count,sum(fld1) as sum from t2 group by companynr having count > 40 and sum/count >= 120000; -companynr count sum -00 82 10355753 -29 95 14473298 -34 70 17788966 -37 588 83602098 -41 52 12816335 -select companynr from t2 group by companynr having count(*) > 40 and sum(fld1)/count(*) >= 120000 ; -companynr -00 -29 -34 -37 -41 -select t2.companynr,companyname,count(*) from t2,t4 where t2.companynr=t4.companynr group by companyname having t2.companynr >= 40; -companynr companyname count(*) -68 company 10 12 -50 company 11 11 -40 company 5 37 -41 company 6 52 -53 company 7 4 -58 company 8 23 -65 company 9 10 -select count(*) from t2; -count(*) -1199 -select count(*) from t2 where fld1 < 098024; -count(*) -387 -select min(fld1) from t2 where fld1>= 098024; -min(fld1) -98024 -select max(fld1) from t2 where fld1>= 098024; -max(fld1) -1232609 -select count(*) from t3 where price2=76234234; -count(*) -4181 -select count(*) from t3 where companynr=512 and price2=76234234; -count(*) -4181 -explain select min(fld1),max(fld1),count(*) from t2; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away -select min(fld1),max(fld1),count(*) from t2; -min(fld1) max(fld1) count(*) -0 1232609 1199 -select min(t2nr),max(t2nr) from t3 where t2nr=2115 and price2=823742; -min(t2nr) max(t2nr) -2115 2115 -select count(*),min(t2nr),max(t2nr) from t3 where name='spates' and companynr=78; -count(*) min(t2nr) max(t2nr) -4181 4 41804 -select t2nr,count(*) from t3 where name='gems' group by t2nr limit 20; -t2nr count(*) -9 1 -19 1 -29 1 -39 1 -49 1 -59 1 -69 1 -79 1 -89 1 -99 1 -109 1 -119 1 -129 1 -139 1 -149 1 -159 1 -169 1 -179 1 -189 1 -199 1 -select max(t2nr) from t3 where price=983543950; -max(t2nr) -41807 -select t1.period from t3 = t1 limit 1; -period -1001 -select t1.period from t1 as t1 limit 1; -period -9410 -select t1.period as "Nuvarande period" from t1 as t1 limit 1; -Nuvarande period -9410 -select period as ok_period from t1 limit 1; -ok_period -9410 -select period as ok_period from t1 group by ok_period limit 1; -ok_period -9410 -select 1+1 as summa from t1 group by summa limit 1; -summa -2 -select period as "Nuvarande period" from t1 group by "Nuvarande period" limit 1; -Nuvarande period -9410 -show tables; -Tables_in_test -t1 -t2 -t3 -t4 -show tables from test like "s%"; -Tables_in_test (s%) -show tables from test like "t?"; -Tables_in_test (t?) -show full columns from t2; -Field Type Collation Null Key Default Extra Privileges Comment -auto int(11) NULL NO PRI NULL auto_increment # -fld1 int(6) unsigned zerofill NULL NO UNI 000000 # -companynr tinyint(2) unsigned zerofill NULL NO 00 # -fld3 char(30) latin1_swedish_ci NO MUL # -fld4 char(35) latin1_swedish_ci NO # -fld5 char(35) latin1_swedish_ci NO # -fld6 char(4) latin1_swedish_ci NO # -show full columns from t2 from test like 'f%'; -Field Type Collation Null Key Default Extra Privileges Comment -fld1 int(6) unsigned zerofill NULL NO UNI 000000 # -fld3 char(30) latin1_swedish_ci NO MUL # -fld4 char(35) latin1_swedish_ci NO # -fld5 char(35) latin1_swedish_ci NO # -fld6 char(4) latin1_swedish_ci NO # -show full columns from t2 from test like 's%'; -Field Type Collation Null Key Default Extra Privileges Comment -show keys from t2; -Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment -t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE -t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE -t2 1 fld3 1 fld3 A NULL NULL NULL BTREE -drop table t4, t3, t2, t1; -CREATE TABLE t1 ( -cont_nr int(11) NOT NULL auto_increment, -ver_nr int(11) NOT NULL default '0', -aufnr int(11) NOT NULL default '0', -username varchar(50) NOT NULL default '', -hdl_nr int(11) NOT NULL default '0', -eintrag date NOT NULL default '0000-00-00', -st_klasse varchar(40) NOT NULL default '', -st_wert varchar(40) NOT NULL default '', -st_zusatz varchar(40) NOT NULL default '', -st_bemerkung varchar(255) NOT NULL default '', -kunden_art varchar(40) NOT NULL default '', -mcbs_knr int(11) default NULL, -mcbs_aufnr int(11) NOT NULL default '0', -schufa_status char(1) default '?', -bemerkung text, -wirknetz text, -wf_igz int(11) NOT NULL default '0', -tarifcode varchar(80) default NULL, -recycle char(1) default NULL, -sim varchar(30) default NULL, -mcbs_tpl varchar(30) default NULL, -emp_nr int(11) NOT NULL default '0', -laufzeit int(11) default NULL, -hdl_name varchar(30) default NULL, -prov_hdl_nr int(11) NOT NULL default '0', -auto_wirknetz varchar(50) default NULL, -auto_billing varchar(50) default NULL, -touch timestamp NOT NULL, -kategorie varchar(50) default NULL, -kundentyp varchar(20) NOT NULL default '', -sammel_rech_msisdn varchar(30) NOT NULL default '', -p_nr varchar(9) NOT NULL default '', -suffix char(3) NOT NULL default '', -PRIMARY KEY (cont_nr), -KEY idx_aufnr(aufnr), -KEY idx_hdl_nr(hdl_nr), -KEY idx_st_klasse(st_klasse), -KEY ver_nr(ver_nr), -KEY eintrag_idx(eintrag), -KEY emp_nr_idx(emp_nr), -KEY wf_igz(wf_igz), -KEY touch(touch), -KEY hdl_tag(eintrag,hdl_nr), -KEY prov_hdl_nr(prov_hdl_nr), -KEY mcbs_aufnr(mcbs_aufnr), -KEY kundentyp(kundentyp), -KEY p_nr(p_nr,suffix) -) ENGINE=MyISAM; -INSERT INTO t1 VALUES (3359356,405,3359356,'Mustermann Musterfrau',52500,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1485525,2122316,'+','','N',1909160,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',3,24,'MobilCom Shop Koeln',52500,NULL,'auto',20010202105916,'Mobilfunk','PP','','',''); -INSERT INTO t1 VALUES (3359357,468,3359357,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1503580,2139699,'+','','P',1909171,'MobilComSuper9D1T10SFreisprech(Akquise)',NULL,NULL,'MS9NS1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','',''); -INSERT INTO t1 VALUES (3359358,407,3359358,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1501358,2137473,'N','','N',1909159,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',325,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','',''); -INSERT INTO t1 VALUES (3359359,468,3359359,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1507831,2143894,'+','','P',1909162,'MobilComSuper9D1T10SFreisprech(Akquise)',NULL,NULL,'MS9NS1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','',''); -INSERT INTO t1 VALUES (3359360,0,0,'Mustermann Musterfrau',29674907,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1900169997,2414578,'+',NULL,'N',1909148,'',NULL,NULL,'RV99066_2',20,NULL,'POS',29674907,NULL,NULL,20010202105916,'Mobilfunk','','','97317481','007'); -INSERT INTO t1 VALUES (3359361,406,3359361,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag storniert','','(7001-84):Storno, Kd. möchte nicht mehr','privat',NULL,0,'+','','P',1909150,'MobilComSuper92000D1(Akquise)',NULL,NULL,'MS9ND1',325,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','',''); -INSERT INTO t1 VALUES (3359362,406,3359362,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1509984,2145874,'+','','P',1909154,'MobilComSuper92000D1(Akquise)',NULL,NULL,'MS9ND1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','',''); -SELECT ELT(FIELD(kundentyp,'PP','PPA','PG','PGA','FK','FKA','FP','FPA','K','KA','V','VA',''), 'Privat (Private Nutzung)','Privat (Private Nutzung) Sitz im Ausland','Privat (geschaeftliche Nutzung)','Privat (geschaeftliche Nutzung) Sitz im Ausland','Firma (Kapitalgesellschaft)','Firma (Kapitalgesellschaft) Sitz im Ausland','Firma (Personengesellschaft)','Firma (Personengesellschaft) Sitz im Ausland','oeff. rechtl. Koerperschaft','oeff. rechtl. Koerperschaft Sitz im Ausland','Eingetragener Verein','Eingetragener Verein Sitz im Ausland','Typ unbekannt') AS Kundentyp ,kategorie FROM t1 WHERE hdl_nr < 2000000 AND kategorie IN ('Prepaid','Mobilfunk') AND st_klasse = 'Workflow' GROUP BY kundentyp ORDER BY kategorie; -Kundentyp kategorie -Privat (Private Nutzung) Mobilfunk -Warnings: -Warning 1052 Column 'kundentyp' in group statement is ambiguous -drop table t1; -connection default; -disconnect shm_con; -mysqld is alive -SET @max_allowed_packet= @@global.max_allowed_packet; -SET @net_buffer_length= @@global.net_buffer_length; -SET GLOBAL max_allowed_packet= 1024; -Warnings: -Warning 1708 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length' -SET GLOBAL net_buffer_length= 1024; -ERROR 1153 (08S01) at line 1: Got a packet bigger than 'max_allowed_packet' bytes -SET GLOBAL max_allowed_packet= @max_allowed_packet; -SET GLOBAL net_buffer_length= @net_buffer_length; -End of 5.0 tests. diff --git a/mysql-test/main/shm.test b/mysql-test/main/shm.test deleted file mode 100644 index 346ce49476e..00000000000 --- a/mysql-test/main/shm.test +++ /dev/null @@ -1,47 +0,0 @@ -# We currently only have shm support on windows, so in order -# to optimize things we skip this test on all other platforms ---source include/windows.inc - -# thread pool causes different results --- source include/not_threadpool.inc - -# Only run this test if shared memory is avaliable -let $shm= query_get_value("SHOW VARIABLES LIKE 'shared_memory'", Value, 1); -if ($shm != ON){ - skip No shm support; -} -let $shm_name= query_get_value("SHOW GLOBAL VARIABLES LIKE 'shared_memory_base_name'", Value, 1); - -# Connect using SHM for testing -connect(shm_con,localhost,root,,,,$shm_name,SHM); - -# Source select test case --- source include/common-tests.inc - -connection default; -disconnect shm_con; - -# -# Bug #24924: shared-memory-base-name that is too long causes buffer overflow -# ---exec $MYSQLADMIN --user=root --host=127.0.0.1 --port=$MASTER_MYPORT --shared-memory-base-name=HeyMrBaseNameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ping - -# -# Bug #33899: Deadlock in mysql_real_query with shared memory connections -# - -let $stmt= `SELECT REPEAT('a', 2048)`; - -SET @max_allowed_packet= @@global.max_allowed_packet; -SET @net_buffer_length= @@global.net_buffer_length; - -SET GLOBAL max_allowed_packet= 1024; -SET GLOBAL net_buffer_length= 1024; - ---error 1 ---exec echo SELECT '$stmt'| $MYSQL --protocol=memory --shared-memory-base-name=$shm_name 2>&1 - -SET GLOBAL max_allowed_packet= @max_allowed_packet; -SET GLOBAL net_buffer_length= @net_buffer_length; - ---echo End of 5.0 tests. diff --git a/mysql-test/main/show_create_user.result b/mysql-test/main/show_create_user.result index 63013eca074..1205b658b6e 100644 --- a/mysql-test/main/show_create_user.result +++ b/mysql-test/main/show_create_user.result @@ -10,10 +10,10 @@ create user foo2@test identified by 'password'; show create user foo2@test; CREATE USER for foo2@test CREATE USER 'foo2'@'test' IDENTIFIED BY PASSWORD '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19' -alter user foo2@test identified with 'someplugin' as 'somepassword'; +alter user foo2@test identified with 'mysql_old_password' as '0123456789ABCDEF'; show create user foo2@test; CREATE USER for foo2@test -CREATE USER 'foo2'@'test' IDENTIFIED VIA someplugin USING 'somepassword' +CREATE USER 'foo2'@'test' IDENTIFIED BY PASSWORD '0123456789ABCDEF' create user foo3@test require SSL; show create user foo3@test; CREATE USER for foo3@test diff --git a/mysql-test/main/show_create_user.test b/mysql-test/main/show_create_user.test index a10c8aeeda6..03852b5abbc 100644 --- a/mysql-test/main/show_create_user.test +++ b/mysql-test/main/show_create_user.test @@ -9,7 +9,7 @@ show create user foo@test; create user foo2@test identified by 'password'; show create user foo2@test; -alter user foo2@test identified with 'someplugin' as 'somepassword'; +alter user foo2@test identified with 'mysql_old_password' as '0123456789ABCDEF'; show create user foo2@test; create user foo3@test require SSL; diff --git a/mysql-test/main/show_grants_with_plugin-7985.result b/mysql-test/main/show_grants_with_plugin-7985.result index 0f8e1e39969..14d7b98bcf4 100644 --- a/mysql-test/main/show_grants_with_plugin-7985.result +++ b/mysql-test/main/show_grants_with_plugin-7985.result @@ -7,7 +7,7 @@ create user u1; GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password; select user, host, password, plugin, authentication_string from mysql.user where user = 'u1'; user host password plugin authentication_string -u1 % +u1 % mysql_native_password # # The user's grants should show no password at all. # @@ -43,7 +43,7 @@ GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password USING '*7AFEFD08B6B720E781FB000CAA418F54FA662626'; select user, host, password, plugin, authentication_string from mysql.user where user = 'u1'; user host password plugin authentication_string -u1 % *7AFEFD08B6B720E781FB000CAA418F54FA662626 +u1 % mysql_native_password *7AFEFD08B6B720E781FB000CAA418F54FA662626 # # Test to see if connecting with password is succesful. # diff --git a/mysql-test/main/sp-destruct.test b/mysql-test/main/sp-destruct.test index 8870df29299..12299fa230b 100644 --- a/mysql-test/main/sp-destruct.test +++ b/mysql-test/main/sp-destruct.test @@ -17,8 +17,8 @@ call mtr.add_suppression("Stored routine .test...bug14233_[123].: invalid value let $MYSQLD_DATADIR= `select @@datadir`; flush table mysql.proc; --copy_file $MYSQLD_DATADIR/mysql/proc.frm $MYSQLTEST_VARDIR/tmp/proc.frm ---copy_file $MYSQLD_DATADIR/mysql/proc.MYD $MYSQLTEST_VARDIR/tmp/proc.MYD ---copy_file $MYSQLD_DATADIR/mysql/proc.MYI $MYSQLTEST_VARDIR/tmp/proc.MYI +--copy_file $MYSQLD_DATADIR/mysql/proc.MAD $MYSQLTEST_VARDIR/tmp/proc.MAD +--copy_file $MYSQLD_DATADIR/mysql/proc.MAI $MYSQLTEST_VARDIR/tmp/proc.MAI use test; @@ -70,8 +70,8 @@ flush table mysql.proc; # Drop the mysql.proc table --remove_file $MYSQLD_DATADIR/mysql/proc.frm ---remove_file $MYSQLD_DATADIR/mysql/proc.MYD ---remove_file $MYSQLD_DATADIR/mysql/proc.MYI +--remove_file $MYSQLD_DATADIR/mysql/proc.MAD +--remove_file $MYSQLD_DATADIR/mysql/proc.MAI --error ER_NO_SUCH_TABLE call bug14233(); --error ER_NO_SUCH_TABLE @@ -81,11 +81,11 @@ insert into t1 values (0); # Restore mysql.proc --copy_file $MYSQLTEST_VARDIR/tmp/proc.frm $MYSQLD_DATADIR/mysql/proc.frm ---copy_file $MYSQLTEST_VARDIR/tmp/proc.MYD $MYSQLD_DATADIR/mysql/proc.MYD ---copy_file $MYSQLTEST_VARDIR/tmp/proc.MYI $MYSQLD_DATADIR/mysql/proc.MYI +--copy_file $MYSQLTEST_VARDIR/tmp/proc.MAD $MYSQLD_DATADIR/mysql/proc.MAD +--copy_file $MYSQLTEST_VARDIR/tmp/proc.MAI $MYSQLD_DATADIR/mysql/proc.MAI --remove_file $MYSQLTEST_VARDIR/tmp/proc.frm ---remove_file $MYSQLTEST_VARDIR/tmp/proc.MYD ---remove_file $MYSQLTEST_VARDIR/tmp/proc.MYI +--remove_file $MYSQLTEST_VARDIR/tmp/proc.MAD +--remove_file $MYSQLTEST_VARDIR/tmp/proc.MAI flush table mysql.proc; flush privileges; @@ -233,8 +233,8 @@ drop database if exists mysqltest; flush table mysql.proc; let $MYSQLD_DATADIR= `select @@datadir`; --copy_file $MYSQLD_DATADIR/mysql/proc.frm $MYSQLTEST_VARDIR/tmp/proc.frm ---copy_file $MYSQLD_DATADIR/mysql/proc.MYD $MYSQLTEST_VARDIR/tmp/proc.MYD ---copy_file $MYSQLD_DATADIR/mysql/proc.MYI $MYSQLTEST_VARDIR/tmp/proc.MYI +--copy_file $MYSQLD_DATADIR/mysql/proc.MAD $MYSQLTEST_VARDIR/tmp/proc.MAD +--copy_file $MYSQLD_DATADIR/mysql/proc.MAI $MYSQLTEST_VARDIR/tmp/proc.MAI create database mysqltest; --echo # Corrupt mysql.proc to make it unusable by current version of server. @@ -245,11 +245,11 @@ drop database mysqltest; --echo # Restore mysql.proc. drop table mysql.proc; --copy_file $MYSQLTEST_VARDIR/tmp/proc.frm $MYSQLD_DATADIR/mysql/proc.frm ---copy_file $MYSQLTEST_VARDIR/tmp/proc.MYD $MYSQLD_DATADIR/mysql/proc.MYD ---copy_file $MYSQLTEST_VARDIR/tmp/proc.MYI $MYSQLD_DATADIR/mysql/proc.MYI +--copy_file $MYSQLTEST_VARDIR/tmp/proc.MAD $MYSQLD_DATADIR/mysql/proc.MAD +--copy_file $MYSQLTEST_VARDIR/tmp/proc.MAI $MYSQLD_DATADIR/mysql/proc.MAI --remove_file $MYSQLTEST_VARDIR/tmp/proc.frm ---remove_file $MYSQLTEST_VARDIR/tmp/proc.MYD ---remove_file $MYSQLTEST_VARDIR/tmp/proc.MYI +--remove_file $MYSQLTEST_VARDIR/tmp/proc.MAD +--remove_file $MYSQLTEST_VARDIR/tmp/proc.MAI --echo # diff --git a/mysql-test/main/sp-security.result b/mysql-test/main/sp-security.result index 7813ab6a192..051fbf3a7e8 100644 --- a/mysql-test/main/sp-security.result +++ b/mysql-test/main/sp-security.result @@ -506,9 +506,9 @@ DROP DATABASE mysqltest; GRANT USAGE ON *.* TO user19857@localhost IDENTIFIED BY 'meow'; GRANT SELECT, INSERT, UPDATE, DELETE, CREATE ROUTINE, ALTER ROUTINE ON test.* TO user19857@localhost; -SELECT Host,User,Password FROM mysql.user WHERE User='user19857'; -Host User Password -localhost user19857 *82DC221D557298F6CE9961037DB1C90604792F5C +SELECT Host,User,Plugin,Authentication_string FROM mysql.user WHERE User='user19857'; +Host User Plugin Authentication_string +localhost user19857 mysql_native_password *82DC221D557298F6CE9961037DB1C90604792F5C connect mysqltest_2_con,localhost,user19857,meow,test; connection mysqltest_2_con; USE test; @@ -533,9 +533,9 @@ connection mysqltest_2_con; DROP PROCEDURE IF EXISTS test.sp19857; connection con1root; disconnect mysqltest_2_con; -SELECT Host,User,Password FROM mysql.user WHERE User='user19857'; -Host User Password -localhost user19857 *82DC221D557298F6CE9961037DB1C90604792F5C +SELECT Host,User,Plugin,Authentication_string FROM mysql.user WHERE User='user19857'; +Host User Plugin Authentication_string +localhost user19857 mysql_native_password *82DC221D557298F6CE9961037DB1C90604792F5C DROP USER user19857@localhost; disconnect con1root; connection default; @@ -710,6 +710,30 @@ connection default; disconnect con2; DROP USER user2@localhost; DROP DATABASE db1; +create user foo@local_ost; +create user foo@`local\_ost` identified via mysql_old_password using '0123456789ABCDEF'; +create database foodb; +grant create routine on foodb.* to foo@local_ost; +connect con1,localhost,foo; +select user(), current_user(); +user() current_user() +foo@localhost foo@local_ost +show grants; +Grants for foo@local_ost +GRANT USAGE ON *.* TO 'foo'@'local_ost' +GRANT CREATE ROUTINE ON `foodb`.* TO 'foo'@'local_ost' +create procedure fooproc() select 'i am fooproc'; +show grants; +Grants for foo@local_ost +GRANT USAGE ON *.* TO 'foo'@'local_ost' +GRANT CREATE ROUTINE ON `foodb`.* TO 'foo'@'local_ost' +GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `test`.`fooproc` TO 'foo'@'local_ost' +disconnect con1; +connection default; +drop user foo@local_ost; +drop user foo@`local\_ost`; +drop procedure fooproc; +drop database foodb; # # Test for bug#12602983 - User without privilege on routine can discover # its existence by executing "select non_existing_func();" or by diff --git a/mysql-test/main/sp-security.test b/mysql-test/main/sp-security.test index 73d0263dd69..dd917eed671 100644 --- a/mysql-test/main/sp-security.test +++ b/mysql-test/main/sp-security.test @@ -742,7 +742,7 @@ DROP DATABASE mysqltest; GRANT USAGE ON *.* TO user19857@localhost IDENTIFIED BY 'meow'; GRANT SELECT, INSERT, UPDATE, DELETE, CREATE ROUTINE, ALTER ROUTINE ON test.* TO user19857@localhost; -SELECT Host,User,Password FROM mysql.user WHERE User='user19857'; +SELECT Host,User,Plugin,Authentication_string FROM mysql.user WHERE User='user19857'; --connect (mysqltest_2_con,localhost,user19857,meow,test) --connection mysqltest_2_con @@ -770,7 +770,7 @@ DROP PROCEDURE IF EXISTS test.sp19857; --disconnect mysqltest_2_con -SELECT Host,User,Password FROM mysql.user WHERE User='user19857'; +SELECT Host,User,Plugin,Authentication_string FROM mysql.user WHERE User='user19857'; DROP USER user19857@localhost; @@ -973,6 +973,25 @@ disconnect con2; DROP USER user2@localhost; DROP DATABASE db1; +# +# Bug#27407480: AUTOMATIC_SP_PRIVILEGES REQUIRES NEED THE INSERT PRIVILEGES FOR MYSQL.USER TABLE +# +create user foo@local_ost; +create user foo@`local\_ost` identified via mysql_old_password using '0123456789ABCDEF'; +create database foodb; +grant create routine on foodb.* to foo@local_ost; +connect con1,localhost,foo; +select user(), current_user(); +show grants; +create procedure fooproc() select 'i am fooproc'; +show grants; +disconnect con1; +connection default; +drop user foo@local_ost; +drop user foo@`local\_ost`; +drop procedure fooproc; +drop database foodb; + --echo # --echo # Test for bug#12602983 - User without privilege on routine can discover --echo # its existence by executing "select non_existing_func();" or by diff --git a/mysql-test/main/sp.result b/mysql-test/main/sp.result index ac4840cb37b..16b0b1d60e5 100644 --- a/mysql-test/main/sp.result +++ b/mysql-test/main/sp.result @@ -7878,6 +7878,23 @@ SET S.CLOSE_YN = '' where 1=1; drop function if exists f1; drop table t1,t2; +# +# MDEV-16957: Server crashes in Field_iterator_natural_join::next +# upon 2nd execution of SP +# +CREATE TABLE t1 (a INT, b VARCHAR(32)); +CREATE PROCEDURE sp() SELECT * FROM t1 AS t1x JOIN t1 AS t1y USING (c); +CALL sp; +ERROR 42S22: Unknown column 'c' in 'from clause' +CALL sp; +ERROR 42S22: Unknown column 'c' in 'from clause' +CALL sp; +ERROR 42S22: Unknown column 'c' in 'from clause' +alter table t1 add column c int; +CALL sp; +c a b a b +DROP PROCEDURE sp; +DROP TABLE t1; # End of 5.5 test # # MDEV-7040: Crash in field_conv, memcpy_field_possible, part#2 diff --git a/mysql-test/main/sp.test b/mysql-test/main/sp.test index 5f18f6585a7..4f520f321c5 100644 --- a/mysql-test/main/sp.test +++ b/mysql-test/main/sp.test @@ -9332,6 +9332,27 @@ where 1=1; drop function if exists f1; drop table t1,t2; +--echo # +--echo # MDEV-16957: Server crashes in Field_iterator_natural_join::next +--echo # upon 2nd execution of SP +--echo # + +CREATE TABLE t1 (a INT, b VARCHAR(32)); +CREATE PROCEDURE sp() SELECT * FROM t1 AS t1x JOIN t1 AS t1y USING (c); +--error ER_BAD_FIELD_ERROR +CALL sp; +--error ER_BAD_FIELD_ERROR +CALL sp; +--error ER_BAD_FIELD_ERROR +CALL sp; +alter table t1 add column c int; +CALL sp; + +# Cleanup +DROP PROCEDURE sp; +DROP TABLE t1; + + --echo # End of 5.5 test --echo # diff --git a/mysql-test/main/sp_notembedded.result b/mysql-test/main/sp_notembedded.result index 190f8f78d23..860f82ebd93 100644 --- a/mysql-test/main/sp_notembedded.result +++ b/mysql-test/main/sp_notembedded.result @@ -228,8 +228,6 @@ FLUSH PRIVILEGES; connect con1, localhost, mysqltest_1,,; connection con1; CREATE PROCEDURE p1(i INT) BEGIN END; -Warnings: -Warning 1404 Failed to grant EXECUTE and ALTER ROUTINE privileges disconnect con1; connection default; DROP PROCEDURE p1; @@ -326,7 +324,7 @@ DROP EVENT teste_bug11763507; # -- End of 5.1 tests # ------------------------------------------------------------------ grant create routine on test.* to foo1@localhost identified by 'foo'; -update mysql.user set password = replace(password, '*', '-') where user='foo1'; +update mysql.user set authentication_string = replace(authentication_string, '*', '-') where user='foo1'; connect foo,localhost,foo1,foo; show grants; Grants for foo1@localhost diff --git a/mysql-test/main/sp_notembedded.test b/mysql-test/main/sp_notembedded.test index 41bfd871c39..64f1daeaeb9 100644 --- a/mysql-test/main/sp_notembedded.test +++ b/mysql-test/main/sp_notembedded.test @@ -465,7 +465,7 @@ DROP EVENT teste_bug11763507; # (creating a new procedure changes the password) # grant create routine on test.* to foo1@localhost identified by 'foo'; -update mysql.user set password = replace(password, '*', '-') where user='foo1'; +update mysql.user set authentication_string = replace(authentication_string, '*', '-') where user='foo1'; --connect (foo,localhost,foo1,foo) show grants; --connection default diff --git a/mysql-test/main/sql_safe_updates.opt b/mysql-test/main/sql_safe_updates.opt new file mode 100644 index 00000000000..7ffaa462d01 --- /dev/null +++ b/mysql-test/main/sql_safe_updates.opt @@ -0,0 +1 @@ +--enable-sql-safe-updates diff --git a/mysql-test/main/sql_safe_updates.result b/mysql-test/main/sql_safe_updates.result new file mode 100644 index 00000000000..356cd36bad9 --- /dev/null +++ b/mysql-test/main/sql_safe_updates.result @@ -0,0 +1,3 @@ +select @@sql_safe_updates; +@@sql_safe_updates +1 diff --git a/mysql-test/main/sql_safe_updates.test b/mysql-test/main/sql_safe_updates.test new file mode 100644 index 00000000000..18decd0ff2c --- /dev/null +++ b/mysql-test/main/sql_safe_updates.test @@ -0,0 +1,4 @@ +# +# MDEV-14429 sql_safe_updates in my.cnf not work +# +select @@sql_safe_updates; diff --git a/mysql-test/main/stat_tables.result b/mysql-test/main/stat_tables.result index fcced761283..40290ca9879 100644 --- a/mysql-test/main/stat_tables.result +++ b/mysql-test/main/stat_tables.result @@ -516,4 +516,93 @@ use test; drop database db1; drop database db2; drop table t1; +# +# MDEV-16552: [10.0] ASAN global-buffer-overflow in is_stat_table / statistics_for_tables_is_needed +# +SET use_stat_tables = PREFERABLY; +SELECT CONVERT_TZ( '1991-09-20 10:11:02', '+00:00', 'GMT' ); +CONVERT_TZ( '1991-09-20 10:11:02', '+00:00', 'GMT' ) +NULL +set use_stat_tables=@save_use_stat_tables; +# +# MDEV-16757: manual addition of min/max statistics for BLOB +# +SET use_stat_tables= PREFERABLY; +CREATE TABLE t1 (pk INT PRIMARY KEY, t TEXT); +INSERT INTO t1 VALUES (1,'foo'),(2,'bar'); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze Warning Engine-independent statistics are not collected for column 't' +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 t1 pk 1 2 0.0000 4.0000 1.0000 0 NULL NULL +DELETE FROM mysql.column_stats +WHERE db_name='test' AND table_name='t1' AND column_name='t'; +INSERT INTO mysql.column_stats VALUES +('test','t1','t','bar','foo', 0.0, 3.0, 1.0, 0, NULL, NULL); +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 pk 1 2 0.0000 4.0000 1.0000 0 NULL NULL +test t1 t bar foo 0.0000 3.0000 1.0000 0 NULL NULL +SELECT pk FROM t1; +pk +1 +2 +DROP TABLE t1; +set use_stat_tables=@save_use_stat_tables; +# +# MDEV-16760: CREATE OR REPLACE TABLE after ANALYZE TABLE +# +SET use_stat_tables= PREFERABLY; +CREATE TABLE t1 (pk int PRIMARY KEY, c varchar(32)); +INSERT INTO t1 VALUES (1,'foo'),(2,'bar'); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SELECT * FROM t1; +pk c +1 foo +2 bar +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 pk 1 2 0.0000 4.0000 1.0000 0 NULL NULL +test t1 c bar foo 0.0000 3.0000 1.0000 0 NULL NULL +CREATE OR REPLACE TABLE t1 (pk int PRIMARY KEY, a char(7)); +SELECT * FROM t1; +pk a +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 +DROP TABLE t1; +set use_stat_tables=@save_use_stat_tables; +# +# MDEV-17023: Crash during read_histogram_for_table with optimizer_use_condition_selectivity set to 4 +# +set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity; +set @@optimizer_use_condition_selectivity=4; +set @@use_stat_tables= PREFERABLY; +explain +SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE PROFILING ALL NULL NULL NULL NULL NULL +1 SIMPLE user ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join) +set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +set use_stat_tables=@save_use_stat_tables; +# +# MDEV-16711:CREATE OR REPLACE TABLE introducing BLOB column +# +SET use_stat_tables= PREFERABLY; +CREATE TABLE t1 (pk INT PRIMARY KEY, t CHAR(60)); +INSERT INTO t1 VALUES (1,'foo'),(2,'bar'); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +CREATE OR REPLACE TABLE t1 (pk INT PRIMARY KEY, t TEXT); +SELECT MAX(pk) FROM t1; +MAX(pk) +NULL +DROP TABLE t1; set use_stat_tables=@save_use_stat_tables; diff --git a/mysql-test/main/stat_tables.test b/mysql-test/main/stat_tables.test index 4cbaa9e27c8..19bc0fa2f46 100644 --- a/mysql-test/main/stat_tables.test +++ b/mysql-test/main/stat_tables.test @@ -191,7 +191,7 @@ FLUSH TABLE t1; SET use_stat_tables='never'; EXPLAIN SELECT * FROM t1; ---move_file $MYSQLTEST_VARDIR/mysqld.1/data/mysql/table_stats.MYD $MYSQLTEST_VARDIR/mysqld.1/data/mysql/table_stats.MYD.save +--move_file $MYSQLTEST_VARDIR/mysqld.1/data/mysql/table_stats.MAD $MYSQLTEST_VARDIR/mysqld.1/data/mysql/table_stats.MAD.save FLUSH TABLES; SET use_stat_tables='preferably'; @@ -200,7 +200,7 @@ EXPLAIN SELECT * FROM t1; --enable_warnings # Cleanup ---move_file $MYSQLTEST_VARDIR/mysqld.1/data/mysql/table_stats.MYD.save $MYSQLTEST_VARDIR/mysqld.1/data/mysql/table_stats.MYD +--move_file $MYSQLTEST_VARDIR/mysqld.1/data/mysql/table_stats.MAD.save $MYSQLTEST_VARDIR/mysqld.1/data/mysql/table_stats.MAD DROP TABLE t1; set use_stat_tables=@save_use_stat_tables; @@ -305,4 +305,83 @@ drop database db1; drop database db2; drop table t1; +--echo # +--echo # MDEV-16552: [10.0] ASAN global-buffer-overflow in is_stat_table / statistics_for_tables_is_needed +--echo # + +SET use_stat_tables = PREFERABLY; +SELECT CONVERT_TZ( '1991-09-20 10:11:02', '+00:00', 'GMT' ); +set use_stat_tables=@save_use_stat_tables; + +--echo # +--echo # MDEV-16757: manual addition of min/max statistics for BLOB +--echo # + +SET use_stat_tables= PREFERABLY; + +CREATE TABLE t1 (pk INT PRIMARY KEY, t TEXT); +INSERT INTO t1 VALUES (1,'foo'),(2,'bar'); +ANALYZE TABLE t1; +--sorted_result +SELECT * FROM mysql.column_stats; +DELETE FROM mysql.column_stats + WHERE db_name='test' AND table_name='t1' AND column_name='t'; +INSERT INTO mysql.column_stats VALUES + ('test','t1','t','bar','foo', 0.0, 3.0, 1.0, 0, NULL, NULL); +--sorted_result +SELECT * FROM mysql.column_stats; + +SELECT pk FROM t1; + +DROP TABLE t1; + +set use_stat_tables=@save_use_stat_tables; + +--echo # +--echo # MDEV-16760: CREATE OR REPLACE TABLE after ANALYZE TABLE +--echo # + +SET use_stat_tables= PREFERABLY; + +CREATE TABLE t1 (pk int PRIMARY KEY, c varchar(32)); +INSERT INTO t1 VALUES (1,'foo'),(2,'bar'); +ANALYZE TABLE t1; +SELECT * FROM t1; +SELECT * FROM mysql.column_stats; + +CREATE OR REPLACE TABLE t1 (pk int PRIMARY KEY, a char(7)); +SELECT * FROM t1; +SELECT * FROM mysql.column_stats; + +DROP TABLE t1; + +set use_stat_tables=@save_use_stat_tables; + +--echo # +--echo # MDEV-17023: Crash during read_histogram_for_table with optimizer_use_condition_selectivity set to 4 +--echo # + +set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity; +set @@optimizer_use_condition_selectivity=4; +set @@use_stat_tables= PREFERABLY; +explain +SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user; +set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +set use_stat_tables=@save_use_stat_tables; + +--echo # +--echo # MDEV-16711:CREATE OR REPLACE TABLE introducing BLOB column +--echo # + +SET use_stat_tables= PREFERABLY; + +CREATE TABLE t1 (pk INT PRIMARY KEY, t CHAR(60)); +INSERT INTO t1 VALUES (1,'foo'),(2,'bar'); +ANALYZE TABLE t1; +CREATE OR REPLACE TABLE t1 (pk INT PRIMARY KEY, t TEXT); + +SELECT MAX(pk) FROM t1; + +DROP TABLE t1; + set use_stat_tables=@save_use_stat_tables; diff --git a/mysql-test/main/stat_tables_innodb.result b/mysql-test/main/stat_tables_innodb.result index 42443bfcb72..070d13d9bb1 100644 --- a/mysql-test/main/stat_tables_innodb.result +++ b/mysql-test/main/stat_tables_innodb.result @@ -543,6 +543,95 @@ use test; drop database db1; drop database db2; drop table t1; +# +# MDEV-16552: [10.0] ASAN global-buffer-overflow in is_stat_table / statistics_for_tables_is_needed +# +SET use_stat_tables = PREFERABLY; +SELECT CONVERT_TZ( '1991-09-20 10:11:02', '+00:00', 'GMT' ); +CONVERT_TZ( '1991-09-20 10:11:02', '+00:00', 'GMT' ) +NULL +set use_stat_tables=@save_use_stat_tables; +# +# MDEV-16757: manual addition of min/max statistics for BLOB +# +SET use_stat_tables= PREFERABLY; +CREATE TABLE t1 (pk INT PRIMARY KEY, t TEXT); +INSERT INTO t1 VALUES (1,'foo'),(2,'bar'); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze Warning Engine-independent statistics are not collected for column 't' +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 t1 pk 1 2 0.0000 4.0000 1.0000 0 NULL NULL +DELETE FROM mysql.column_stats +WHERE db_name='test' AND table_name='t1' AND column_name='t'; +INSERT INTO mysql.column_stats VALUES +('test','t1','t','bar','foo', 0.0, 3.0, 1.0, 0, NULL, NULL); +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 pk 1 2 0.0000 4.0000 1.0000 0 NULL NULL +test t1 t bar foo 0.0000 3.0000 1.0000 0 NULL NULL +SELECT pk FROM t1; +pk +1 +2 +DROP TABLE t1; +set use_stat_tables=@save_use_stat_tables; +# +# MDEV-16760: CREATE OR REPLACE TABLE after ANALYZE TABLE +# +SET use_stat_tables= PREFERABLY; +CREATE TABLE t1 (pk int PRIMARY KEY, c varchar(32)); +INSERT INTO t1 VALUES (1,'foo'),(2,'bar'); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +SELECT * FROM t1; +pk c +1 foo +2 bar +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 pk 1 2 0.0000 4.0000 1.0000 0 NULL NULL +test t1 c bar foo 0.0000 3.0000 1.0000 0 NULL NULL +CREATE OR REPLACE TABLE t1 (pk int PRIMARY KEY, a char(7)); +SELECT * FROM t1; +pk a +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 +DROP TABLE t1; +set use_stat_tables=@save_use_stat_tables; +# +# MDEV-17023: Crash during read_histogram_for_table with optimizer_use_condition_selectivity set to 4 +# +set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity; +set @@optimizer_use_condition_selectivity=4; +set @@use_stat_tables= PREFERABLY; +explain +SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE PROFILING ALL NULL NULL NULL NULL NULL +1 SIMPLE user ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join) +set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +set use_stat_tables=@save_use_stat_tables; +# +# MDEV-16711:CREATE OR REPLACE TABLE introducing BLOB column +# +SET use_stat_tables= PREFERABLY; +CREATE TABLE t1 (pk INT PRIMARY KEY, t CHAR(60)); +INSERT INTO t1 VALUES (1,'foo'),(2,'bar'); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +CREATE OR REPLACE TABLE t1 (pk INT PRIMARY KEY, t TEXT); +SELECT MAX(pk) FROM t1; +MAX(pk) +NULL +DROP TABLE t1; set use_stat_tables=@save_use_stat_tables; set optimizer_switch=@save_optimizer_switch_for_stat_tables_test; SET SESSION STORAGE_ENGINE=DEFAULT; diff --git a/mysql-test/main/str_to_datetime_457.result b/mysql-test/main/str_to_datetime_457.result index 4fd0d00691c..a024b30944c 100644 --- a/mysql-test/main/str_to_datetime_457.result +++ b/mysql-test/main/str_to_datetime_457.result @@ -1,6 +1,6 @@ select cast('01:02:03 ' as time), cast('01:02:03 ' as time); cast('01:02:03 ' as time) cast('01:02:03 ' as time) -01:02:03 00:00:00 +01:02:03 01:02:03 select cast('2002-011-012' as date), cast('2002.11.12' as date), cast('2002.011.012' as date); cast('2002-011-012' as date) cast('2002.11.12' as date) cast('2002.011.012' as date) 2002-11-12 2002-11-12 2002-11-12 @@ -19,8 +19,8 @@ select extract(hour from '100000:02:03'), extract(hour from '100000:02:03 '); extract(hour from '100000:02:03') extract(hour from '100000:02:03 ') NULL NULL Warnings: -Warning 1292 Truncated incorrect time value: '100000:02:03' -Warning 1292 Truncated incorrect time value: '100000:02:03 ' +Warning 1292 Incorrect time value: '100000:02:03' +Warning 1292 Incorrect time value: '100000:02:03 ' # # backward compatibility craziness # diff --git a/mysql-test/main/subselect.result b/mysql-test/main/subselect.result index d5034bc49b0..404d878a9ec 100644 --- a/mysql-test/main/subselect.result +++ b/mysql-test/main/subselect.result @@ -7079,12 +7079,6 @@ call procedure2(); ControlRev NULL drop procedure procedure2; -SELECT -(SELECT user FROM mysql.user -WHERE h.host in (SELECT host FROM mysql.user) -) AS sq -FROM mysql.host h GROUP BY h.host; -sq # # MDEV-7846:Server crashes in Item_subselect::fix #_fields or fails with Thread stack overrun @@ -7237,6 +7231,22 @@ a 5 SET @@optimizer_switch= @optimiser_switch_save; DROP TABLE t1, t2, t3; +# +# MDEV-16820: impossible where with inexpensive subquery +# +create table t1 (a int) engine=myisam; +insert into t1 values (3), (1), (7); +create table t2 (b int, index idx(b)); +insert into t2 values (2), (5), (3), (2); +explain select * from t1 where (select max(b) from t2) = 10; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +explain select * from t1 where (select max(b) from t2) = 10 and t1.a > 3; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +drop table t1,t2; End of 5.5 tests # End of 10.0 tests # diff --git a/mysql-test/main/subselect.test b/mysql-test/main/subselect.test index 37d57e51f1b..d7c266cafb0 100644 --- a/mysql-test/main/subselect.test +++ b/mysql-test/main/subselect.test @@ -5927,13 +5927,6 @@ call procedure2(); drop procedure procedure2; -SELECT - (SELECT user FROM mysql.user - WHERE h.host in (SELECT host FROM mysql.user) - ) AS sq -FROM mysql.host h GROUP BY h.host; - - --echo # --echo # MDEV-7846:Server crashes in Item_subselect::fix --echo #_fields or fails with Thread stack overrun @@ -6098,6 +6091,21 @@ and t1.a in (select `test`.`t3`.`c` from `test`.`t3`); SET @@optimizer_switch= @optimiser_switch_save; DROP TABLE t1, t2, t3; +--echo # +--echo # MDEV-16820: impossible where with inexpensive subquery +--echo # + +create table t1 (a int) engine=myisam; +insert into t1 values (3), (1), (7); + +create table t2 (b int, index idx(b)); +insert into t2 values (2), (5), (3), (2); + +explain select * from t1 where (select max(b) from t2) = 10; +explain select * from t1 where (select max(b) from t2) = 10 and t1.a > 3; + +drop table t1,t2; + --echo End of 5.5 tests --echo # End of 10.0 tests diff --git a/mysql-test/main/subselect_extra_no_semijoin.result b/mysql-test/main/subselect_extra_no_semijoin.result index fc8d5759945..ec9ddb0452e 100644 --- a/mysql-test/main/subselect_extra_no_semijoin.result +++ b/mysql-test/main/subselect_extra_no_semijoin.result @@ -482,3 +482,25 @@ DROP TABLE t1,t2; set optimizer_switch= @tmp_subselect_extra_derived; set optimizer_switch= @subselect_extra_no_sj_tmp; set @optimizer_switch_for_subselect_extra_test=null; +# +# MDEV-6439: Server crashes in Explain_union::print_explain with explain in slow log, tis620 charset +# +connect con1,localhost,root,,; +SET NAMES tis620; +set @tmp= @@global.slow_query_log; +SET GLOBAL slow_query_log = 1; +SET long_query_time = 0.000001; +SET log_slow_verbosity = 'explain'; +CREATE TABLE t1 (a VARCHAR(3)) ENGINE=MyISAM; +SELECT * FROM t1 WHERE a >= ANY ( SELECT 'foo'); +a +SELECT * FROM t1 WHERE a >= ANY ( SELECT 'foo' UNION SELECT 'bar' ); +ERROR HY000: Illegal mix of collations (tis620_thai_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation '<=' +create table t2 (b int); +insert into t2 values (1),(2),(3); +SELECT * FROM t1 WHERE a >= ANY ( SELECT 'foo' FROM t2); +ERROR HY000: Illegal mix of collations (tis620_thai_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation '<=' +drop table t1,t2; +SET GLOBAL slow_query_log=@tmp; +disconnect con1; +connection default; diff --git a/mysql-test/main/subselect_extra_no_semijoin.test b/mysql-test/main/subselect_extra_no_semijoin.test index 4340f4165e7..681f92bd8c4 100644 --- a/mysql-test/main/subselect_extra_no_semijoin.test +++ b/mysql-test/main/subselect_extra_no_semijoin.test @@ -6,4 +6,33 @@ set @optimizer_switch_for_subselect_extra_test='semijoin=off,firstmatch=off,loo set optimizer_switch= @subselect_extra_no_sj_tmp; -set @optimizer_switch_for_subselect_extra_test=null;
\ No newline at end of file +set @optimizer_switch_for_subselect_extra_test=null; + +--echo # +--echo # MDEV-6439: Server crashes in Explain_union::print_explain with explain in slow log, tis620 charset +--echo # + +## Using a separate client connection is easier than restoring state +connect(con1,localhost,root,,); + +SET NAMES tis620; +set @tmp= @@global.slow_query_log; +SET GLOBAL slow_query_log = 1; +SET long_query_time = 0.000001; +SET log_slow_verbosity = 'explain'; + +CREATE TABLE t1 (a VARCHAR(3)) ENGINE=MyISAM; +SELECT * FROM t1 WHERE a >= ANY ( SELECT 'foo'); +--error ER_CANT_AGGREGATE_2COLLATIONS +SELECT * FROM t1 WHERE a >= ANY ( SELECT 'foo' UNION SELECT 'bar' ); + +create table t2 (b int); +insert into t2 values (1),(2),(3); + +--error ER_CANT_AGGREGATE_2COLLATIONS +SELECT * FROM t1 WHERE a >= ANY ( SELECT 'foo' FROM t2); + +drop table t1,t2; +SET GLOBAL slow_query_log=@tmp; +disconnect con1; +connection default; diff --git a/mysql-test/main/subselect_mat.result b/mysql-test/main/subselect_mat.result index 39c0d1dd22b..010ba03153b 100644 --- a/mysql-test/main/subselect_mat.result +++ b/mysql-test/main/subselect_mat.result @@ -499,7 +499,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where 2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),<exists>(/* select#2 */ select '1 - 01','2 - 01' having (<cache>(`test`.`t1`.`a1`) = '1 - 01' or '1 - 01' is null) and (<cache>(`test`.`t1`.`a2`) = '2 - 01' or '2 - 01' is null) and '1 - 01' is null and '2 - 01' is null))) +Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),<exists>(/* select#2 */ select '1 - 01','2 - 01' having (<cache>(`test`.`t1`.`a1`) = '1 - 01' or /*always not null*/ 1 is null) and (<cache>(`test`.`t1`.`a2`) = '2 - 01' or /*always not null*/ 1 is null) and '1 - 01' is null and '2 - 01' is null))) select * from t1 where (a1, a2) in (select '1 - 01', '2 - 01'); a1 a2 1 - 01 2 - 01 @@ -509,7 +509,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where 2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),<exists>(/* select#2 */ select '1 - 01','2 - 01' having (<cache>(`test`.`t1`.`a1`) = '1 - 01' or '1 - 01' is null) and (<cache>(`test`.`t1`.`a2`) = '2 - 01' or '2 - 01' is null) and '1 - 01' is null and '2 - 01' is null))) +Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),<exists>(/* select#2 */ select '1 - 01','2 - 01' having (<cache>(`test`.`t1`.`a1`) = '1 - 01' or /*always not null*/ 1 is null) and (<cache>(`test`.`t1`.`a2`) = '2 - 01' or /*always not null*/ 1 is null) and '1 - 01' is null and '2 - 01' is null))) select * from t1 where (a1, a2) in (select '1 - 01', '2 - 01' from dual); a1 a2 1 - 01 2 - 01 @@ -1925,7 +1925,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join) 2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 100.00 Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from <materialize> (/* select#2 */ select max(`test`.`t2`.`c`) from `test`.`t2` having `MAX(c)` is null or `MAX(c)` = 7) join `test`.`t1` where `test`.`t1`.`b` = 7 and `test`.`t1`.`a` = `<subquery2>`.`MAX(c)` and (<cache>(`<subquery2>`.`MAX(c)` is null) or `<subquery2>`.`MAX(c)` = 7) +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from <materialize> (/* select#2 */ select max(`test`.`t2`.`c`) from `test`.`t2` having `MAX(c)` is null or `MAX(c)` = 7) join `test`.`t1` where `test`.`t1`.`b` = 7 and `test`.`t1`.`a` = `<subquery2>`.`MAX(c)` and (<cache>(/*always not null*/ 1 is null) or `<subquery2>`.`MAX(c)` = 7) SELECT * FROM t1 WHERE a IN (SELECT MAX(c) FROM t2) AND b=7 AND (a IS NULL OR a=b); a b @@ -2391,6 +2391,99 @@ ec70316637232000158bbfc8bcbe5d60 ebb4620037332000158bbfc8bcbe5d89 DROP TABLE t1,t2,t3; set optimizer_switch=@save_optimizer_switch; +# +# MDEV-16751: Server crashes in st_join_table::cleanup or +# TABLE_LIST::is_with_table_recursive_reference with join_cache_level>2 +# +set @save_join_cache_level= @@join_cache_level; +set join_cache_level=4; +CREATE TABLE t1 ( id int NOT NULL); +INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19); +CREATE TABLE t2 (i1 int NOT NULL, i2 int NOT NULL) ; +INSERT INTO t2 VALUES (11,11),(12,12),(13,13); +explain +SELECT 1 FROM t1 where t1.id IN (SELECT t2.i1 FROM t2 WHERE t2.i1 = t2.i2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 3 +1 PRIMARY t1 hash_ALL NULL #hash#$hj 4 test.t2.i1 9 Using where; Using join buffer (flat, BNLH join) +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 Using where +SELECT 1 FROM t1 where t1.id IN (SELECT t2.i1 FROM t2 WHERE t2.i1 = t2.i2); +1 +1 +1 +1 +set @@join_cache_level= @save_join_cache_level; +alter table t1 add key(id); +explain +SELECT 1 FROM t1 where t1.id IN (SELECT t2.i1 FROM t2 WHERE t2.i1 = t2.i2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 3 +1 PRIMARY t1 ref id id 4 test.t2.i1 2 Using index +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 Using where +SELECT 1 FROM t1 where t1.id IN (SELECT t2.i1 FROM t2 WHERE t2.i1 = t2.i2); +1 +1 +1 +1 +drop table t1,t2; +# +# MDEV-15454: Nested SELECT IN returns wrong results +# +CREATE TABLE t1 ( a int NOT NULL PRIMARY KEY); +CREATE TABLE t2 ( a int, b int ); +INSERT INTO t2 VALUES (7878, 96),(3465, 96),(1403, 96),(4189, 96),(8732, 96), (5,96); +CREATE TABLE t3 (c int unsigned NOT NULL, b int unsigned NOT NULL, PRIMARY KEY (c,b)); +INSERT INTO t3 (c, b) VALUES (27, 96); +CREATE PROCEDURE prepare_data() +BEGIN +DECLARE i INT DEFAULT 1; +WHILE i < 1000 DO +INSERT INTO t1 (a) VALUES (i); +INSERT INTO t2 (a,b) VALUES (i,56); +INSERT INTO t3 (c,b) VALUES (i,i); +SET i = i + 1; +END WHILE; +END$$ +CALL prepare_data(); +SELECT t2.a FROM t2 WHERE t2.b IN (SELECT t3.b FROM t3 WHERE t3.c= 27); +a +7878 +3465 +1403 +4189 +8732 +5 +set @save_optimizer_switch= @@optimizer_switch; +SET optimizer_switch='materialization=off'; +SELECT t1.a FROM t1 +WHERE t1.a IN (SELECT t2.a FROM t2 WHERE t2.b IN (SELECT t3.b FROM t3 WHERE t3.c= 27)) LIMIT 5; +a +5 +SET optimizer_switch='materialization=on'; +SELECT t1.a FROM t1 +WHERE t1.a IN (SELECT t2.a FROM t2 WHERE t2.b IN (SELECT t3.b FROM t3 WHERE t3.c= 27)) LIMIT 5; +a +5 +drop procedure prepare_data; +set @@optimizer_switch= @save_optimizer_switch; +drop table t1,t2,t3; +CREATE TABLE t1 ( id int NOT NULL, key(id)); +INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19); +CREATE TABLE t2 (i1 int NOT NULL, i2 int NOT NULL); +INSERT INTO t2 VALUES (11,11),(12,12),(13,13); +CREATE VIEW v1 AS SELECT t2.i1 FROM t2 where t2.i1 = t2.i2; +explain SELECT 1 FROM t1 where t1.id IN (SELECT v1.i1 from v1); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 3 +1 PRIMARY t1 ref id id 4 test.t2.i1 2 Using index +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 Using where +SELECT 1 FROM t1 where t1.id IN (SELECT v1.i1 from v1); +1 +1 +1 +1 +drop table t1,t2; +drop view v1; # End of 5.5 tests # # MDEV-7220: Materialization strategy is not used for REPLACE ... SELECT diff --git a/mysql-test/main/subselect_mat_cost_bugs.result b/mysql-test/main/subselect_mat_cost_bugs.result index 658722112d2..6377ae556d2 100644 --- a/mysql-test/main/subselect_mat_cost_bugs.result +++ b/mysql-test/main/subselect_mat_cost_bugs.result @@ -442,7 +442,7 @@ SELECT i2 FROM t2 RIGHT JOIN t3 ON (c3 = c2) WHERE pk3 = i1 id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 system NULL NULL NULL NULL 1 2 DEPENDENT SUBQUERY t3 const PRIMARY PRIMARY 4 const 1 -2 DEPENDENT SUBQUERY t2 index NULL i2 11 NULL 2 Using where; Using index +2 DEPENDENT SUBQUERY t2 index i2 i2 11 NULL 2 Using where; Using index DROP TABLE t1,t2,t3; # # MDEV-7599: in-to-exists chosen after min/max optimization diff --git a/mysql-test/main/subselect_no_exists_to_in.result b/mysql-test/main/subselect_no_exists_to_in.result index afbd82fb359..6463aa4e4e2 100644 --- a/mysql-test/main/subselect_no_exists_to_in.result +++ b/mysql-test/main/subselect_no_exists_to_in.result @@ -7079,12 +7079,6 @@ call procedure2(); ControlRev NULL drop procedure procedure2; -SELECT -(SELECT user FROM mysql.user -WHERE h.host in (SELECT host FROM mysql.user) -) AS sq -FROM mysql.host h GROUP BY h.host; -sq # # MDEV-7846:Server crashes in Item_subselect::fix #_fields or fails with Thread stack overrun @@ -7237,6 +7231,22 @@ a 5 SET @@optimizer_switch= @optimiser_switch_save; DROP TABLE t1, t2, t3; +# +# MDEV-16820: impossible where with inexpensive subquery +# +create table t1 (a int) engine=myisam; +insert into t1 values (3), (1), (7); +create table t2 (b int, index idx(b)); +insert into t2 values (2), (5), (3), (2); +explain select * from t1 where (select max(b) from t2) = 10; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +explain select * from t1 where (select max(b) from t2) = 10 and t1.a > 3; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +drop table t1,t2; End of 5.5 tests # End of 10.0 tests # diff --git a/mysql-test/main/subselect_no_mat.result b/mysql-test/main/subselect_no_mat.result index 2e9caf22ca0..0fa338ef222 100644 --- a/mysql-test/main/subselect_no_mat.result +++ b/mysql-test/main/subselect_no_mat.result @@ -7072,12 +7072,6 @@ call procedure2(); ControlRev NULL drop procedure procedure2; -SELECT -(SELECT user FROM mysql.user -WHERE h.host in (SELECT host FROM mysql.user) -) AS sq -FROM mysql.host h GROUP BY h.host; -sq # # MDEV-7846:Server crashes in Item_subselect::fix #_fields or fails with Thread stack overrun @@ -7230,6 +7224,22 @@ a 5 SET @@optimizer_switch= @optimiser_switch_save; DROP TABLE t1, t2, t3; +# +# MDEV-16820: impossible where with inexpensive subquery +# +create table t1 (a int) engine=myisam; +insert into t1 values (3), (1), (7); +create table t2 (b int, index idx(b)); +insert into t2 values (2), (5), (3), (2); +explain select * from t1 where (select max(b) from t2) = 10; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +explain select * from t1 where (select max(b) from t2) = 10 and t1.a > 3; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +drop table t1,t2; End of 5.5 tests # End of 10.0 tests # diff --git a/mysql-test/main/subselect_no_opts.result b/mysql-test/main/subselect_no_opts.result index 2e82f98e01e..7704667a2dc 100644 --- a/mysql-test/main/subselect_no_opts.result +++ b/mysql-test/main/subselect_no_opts.result @@ -7070,12 +7070,6 @@ call procedure2(); ControlRev NULL drop procedure procedure2; -SELECT -(SELECT user FROM mysql.user -WHERE h.host in (SELECT host FROM mysql.user) -) AS sq -FROM mysql.host h GROUP BY h.host; -sq # # MDEV-7846:Server crashes in Item_subselect::fix #_fields or fails with Thread stack overrun @@ -7228,6 +7222,22 @@ a 5 SET @@optimizer_switch= @optimiser_switch_save; DROP TABLE t1, t2, t3; +# +# MDEV-16820: impossible where with inexpensive subquery +# +create table t1 (a int) engine=myisam; +insert into t1 values (3), (1), (7); +create table t2 (b int, index idx(b)); +insert into t2 values (2), (5), (3), (2); +explain select * from t1 where (select max(b) from t2) = 10; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +explain select * from t1 where (select max(b) from t2) = 10 and t1.a > 3; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +drop table t1,t2; End of 5.5 tests # End of 10.0 tests # diff --git a/mysql-test/main/subselect_no_scache.result b/mysql-test/main/subselect_no_scache.result index 0dc83d85a74..af1157321e2 100644 --- a/mysql-test/main/subselect_no_scache.result +++ b/mysql-test/main/subselect_no_scache.result @@ -7085,12 +7085,6 @@ call procedure2(); ControlRev NULL drop procedure procedure2; -SELECT -(SELECT user FROM mysql.user -WHERE h.host in (SELECT host FROM mysql.user) -) AS sq -FROM mysql.host h GROUP BY h.host; -sq # # MDEV-7846:Server crashes in Item_subselect::fix #_fields or fails with Thread stack overrun @@ -7243,6 +7237,22 @@ a 5 SET @@optimizer_switch= @optimiser_switch_save; DROP TABLE t1, t2, t3; +# +# MDEV-16820: impossible where with inexpensive subquery +# +create table t1 (a int) engine=myisam; +insert into t1 values (3), (1), (7); +create table t2 (b int, index idx(b)); +insert into t2 values (2), (5), (3), (2); +explain select * from t1 where (select max(b) from t2) = 10; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +explain select * from t1 where (select max(b) from t2) = 10 and t1.a > 3; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +drop table t1,t2; End of 5.5 tests # End of 10.0 tests # diff --git a/mysql-test/main/subselect_no_semijoin.result b/mysql-test/main/subselect_no_semijoin.result index 18333df11cb..13f4cb8b2b5 100644 --- a/mysql-test/main/subselect_no_semijoin.result +++ b/mysql-test/main/subselect_no_semijoin.result @@ -7070,12 +7070,6 @@ call procedure2(); ControlRev NULL drop procedure procedure2; -SELECT -(SELECT user FROM mysql.user -WHERE h.host in (SELECT host FROM mysql.user) -) AS sq -FROM mysql.host h GROUP BY h.host; -sq # # MDEV-7846:Server crashes in Item_subselect::fix #_fields or fails with Thread stack overrun @@ -7228,6 +7222,22 @@ a 5 SET @@optimizer_switch= @optimiser_switch_save; DROP TABLE t1, t2, t3; +# +# MDEV-16820: impossible where with inexpensive subquery +# +create table t1 (a int) engine=myisam; +insert into t1 values (3), (1), (7); +create table t2 (b int, index idx(b)); +insert into t2 values (2), (5), (3), (2); +explain select * from t1 where (select max(b) from t2) = 10; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +explain select * from t1 where (select max(b) from t2) = 10 and t1.a > 3; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +drop table t1,t2; End of 5.5 tests # End of 10.0 tests # diff --git a/mysql-test/main/subselect_sj2_mat.result b/mysql-test/main/subselect_sj2_mat.result index 62248536e34..884451d7dff 100644 --- a/mysql-test/main/subselect_sj2_mat.result +++ b/mysql-test/main/subselect_sj2_mat.result @@ -1728,6 +1728,57 @@ id 13 drop table t1; # +# MDEV-15982: Incorrect results when subquery is materialized +# +CREATE TABLE `t1` (`id` int(32) NOT NULL primary key); +INSERT INTO `t1` VALUES +(45), (46), (47), (48), (49), (50), (51), (52), (53), (54), (55), (56), (57), (58), (59), (60), (61), (62), +(63), (64), (65), (66), (67), (68), (69), (70), (71), (72), (73), (74), (75), (76), (77), (78), (79), (80), +(81), (82), (83), (84), (85), (86), (87), (88), (89), (90), (91), (92),(93),(94),(95),(96), (97), (98), +(99), (100), (101), (102), (103), (104), (105), (106), (107), (108), (109), (110), (111), (112), (113), +(114), (115), (116), (117), (118), (119), (120), (121), (122), (123), (124), (125), (126), (127), (128), +(129), (130), (131), (132), (133), (134), (135), (136), (137), (138), (139), (140), (141), (142), (143), (144), (145), (146), +(147), (148), (149), (150), (151), (152), (153), (154), (155), (156), (157), (158), (159), (160), (161), +(162), (163), (164), (165), (166), (167), (168), (169), (170), (171), (172), (173), +(174), (175), (176), (177), (178), (179), (180), (181), (182), (183), (2), (3), (4), (5), (6), (19), (35), +(7), (20), (8), (36), (219), (22), (10), (23), (37), (11), (24); +CREATE TABLE `t2` (`type` int , `id` int(32) NOT NULL primary key); +INSERT INTO `t2` VALUES +(2,2),(2,3),(1,4),(2,5),(1,6),(1,19),(5,7),(1,20),(1,8),(1,21),(1,9), +(1,22),(2,10),(1,23),(2,11),(1,24),(1,12),(1,25),(2,13),(2,26),(2,14), +(2,27),(1,15),(1,28),(3,16),(1,29),(2,17),(1,30),(5,18),(2,1); +CREATE TABLE `t3` (`ref_id` int(32) unsigned ,`type` varchar(80),`id` int(32) NOT NULL ); +INSERT INTO `t3` VALUES +(1,'incident',31),(2,'faux pas',32), +(5,'oopsies',33),(3,'deniable',34), +(11,'wasntme',35),(10,'wasntme',36), +(17,'faux pas',37),(13,'unlikely',38), +(13,'improbable',39),(14,'incident',40), +(26,'problem',41),(14,'problem',42), +(26,'incident',43),(27,'incident',44); +explain +SELECT t2.id FROM t2,t1 +WHERE t2.id IN (SELECT t3.ref_id FROM t3,t1 where t3.id = t1.id) and t2.id = t1.id; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 30 Using index +1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 Using where +1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.id 1 Using index +2 MATERIALIZED t3 ALL NULL NULL NULL NULL 14 +2 MATERIALIZED t1 eq_ref PRIMARY PRIMARY 4 test.t3.id 1 Using index +SELECT t2.id FROM t2,t1 +WHERE t2.id IN (SELECT t3.ref_id FROM t3,t1 where t3.id = t1.id) and t2.id = t1.id; +id +10 +11 +set optimizer_switch='materialization=off'; +SELECT t2.id FROM t2,t1 +WHERE t2.id IN (SELECT t3.ref_id FROM t3,t1 where t3.id = t1.id) and t2.id = t1.id; +id +11 +10 +set optimizer_switch='materialization=on'; +DROP TABLE t1,t2,t3; +# # MDEV-15247: Crash when SET NAMES 'utf8' is set # CREATE TABLE t1 ( diff --git a/mysql-test/main/subselect_sj2_mat.test b/mysql-test/main/subselect_sj2_mat.test index bba436078e3..6ae687aa99a 100644 --- a/mysql-test/main/subselect_sj2_mat.test +++ b/mysql-test/main/subselect_sj2_mat.test @@ -347,6 +347,55 @@ WHERE ( drop table t1; --echo # +--echo # MDEV-15982: Incorrect results when subquery is materialized +--echo # + +CREATE TABLE `t1` (`id` int(32) NOT NULL primary key); +INSERT INTO `t1` VALUES +(45), (46), (47), (48), (49), (50), (51), (52), (53), (54), (55), (56), (57), (58), (59), (60), (61), (62), +(63), (64), (65), (66), (67), (68), (69), (70), (71), (72), (73), (74), (75), (76), (77), (78), (79), (80), +(81), (82), (83), (84), (85), (86), (87), (88), (89), (90), (91), (92),(93),(94),(95),(96), (97), (98), +(99), (100), (101), (102), (103), (104), (105), (106), (107), (108), (109), (110), (111), (112), (113), +(114), (115), (116), (117), (118), (119), (120), (121), (122), (123), (124), (125), (126), (127), (128), +(129), (130), (131), (132), (133), (134), (135), (136), (137), (138), (139), (140), (141), (142), (143), (144), (145), (146), +(147), (148), (149), (150), (151), (152), (153), (154), (155), (156), (157), (158), (159), (160), (161), +(162), (163), (164), (165), (166), (167), (168), (169), (170), (171), (172), (173), +(174), (175), (176), (177), (178), (179), (180), (181), (182), (183), (2), (3), (4), (5), (6), (19), (35), +(7), (20), (8), (36), (219), (22), (10), (23), (37), (11), (24); + +CREATE TABLE `t2` (`type` int , `id` int(32) NOT NULL primary key); +INSERT INTO `t2` VALUES +(2,2),(2,3),(1,4),(2,5),(1,6),(1,19),(5,7),(1,20),(1,8),(1,21),(1,9), +(1,22),(2,10),(1,23),(2,11),(1,24),(1,12),(1,25),(2,13),(2,26),(2,14), +(2,27),(1,15),(1,28),(3,16),(1,29),(2,17),(1,30),(5,18),(2,1); + +CREATE TABLE `t3` (`ref_id` int(32) unsigned ,`type` varchar(80),`id` int(32) NOT NULL ); +INSERT INTO `t3` VALUES +(1,'incident',31),(2,'faux pas',32), +(5,'oopsies',33),(3,'deniable',34), +(11,'wasntme',35),(10,'wasntme',36), +(17,'faux pas',37),(13,'unlikely',38), +(13,'improbable',39),(14,'incident',40), +(26,'problem',41),(14,'problem',42), +(26,'incident',43),(27,'incident',44); + +explain +SELECT t2.id FROM t2,t1 + WHERE t2.id IN (SELECT t3.ref_id FROM t3,t1 where t3.id = t1.id) and t2.id = t1.id; + +SELECT t2.id FROM t2,t1 + WHERE t2.id IN (SELECT t3.ref_id FROM t3,t1 where t3.id = t1.id) and t2.id = t1.id; + +set optimizer_switch='materialization=off'; + +SELECT t2.id FROM t2,t1 + WHERE t2.id IN (SELECT t3.ref_id FROM t3,t1 where t3.id = t1.id) and t2.id = t1.id; +set optimizer_switch='materialization=on'; + +DROP TABLE t1,t2,t3; + + +--echo # --echo # MDEV-15247: Crash when SET NAMES 'utf8' is set --echo # diff --git a/mysql-test/main/subselect_sj_mat.result b/mysql-test/main/subselect_sj_mat.result index b241be77df7..983c6c31c65 100644 --- a/mysql-test/main/subselect_sj_mat.result +++ b/mysql-test/main/subselect_sj_mat.result @@ -520,7 +520,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where 2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),<exists>(/* select#2 */ select '1 - 01','2 - 01' having (<cache>(`test`.`t1`.`a1`) = '1 - 01' or '1 - 01' is null) and (<cache>(`test`.`t1`.`a2`) = '2 - 01' or '2 - 01' is null) and '1 - 01' is null and '2 - 01' is null))) +Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),<exists>(/* select#2 */ select '1 - 01','2 - 01' having (<cache>(`test`.`t1`.`a1`) = '1 - 01' or /*always not null*/ 1 is null) and (<cache>(`test`.`t1`.`a2`) = '2 - 01' or /*always not null*/ 1 is null) and '1 - 01' is null and '2 - 01' is null))) select * from t1 where (a1, a2) in (select '1 - 01', '2 - 01'); a1 a2 1 - 01 2 - 01 @@ -530,7 +530,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where 2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),<exists>(/* select#2 */ select '1 - 01','2 - 01' having (<cache>(`test`.`t1`.`a1`) = '1 - 01' or '1 - 01' is null) and (<cache>(`test`.`t1`.`a2`) = '2 - 01' or '2 - 01' is null) and '1 - 01' is null and '2 - 01' is null))) +Note 1003 /* select#1 */ select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2` from `test`.`t1` where <expr_cache><`test`.`t1`.`a1`,`test`.`t1`.`a2`>(<in_optimizer>((`test`.`t1`.`a1`,`test`.`t1`.`a2`),<exists>(/* select#2 */ select '1 - 01','2 - 01' having (<cache>(`test`.`t1`.`a1`) = '1 - 01' or /*always not null*/ 1 is null) and (<cache>(`test`.`t1`.`a2`) = '2 - 01' or /*always not null*/ 1 is null) and '1 - 01' is null and '2 - 01' is null))) select * from t1 where (a1, a2) in (select '1 - 01', '2 - 01' from dual); a1 a2 1 - 01 2 - 01 @@ -1963,7 +1963,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join) 2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 100.00 Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from <materialize> (/* select#2 */ select max(`test`.`t2`.`c`) from `test`.`t2` having `MAX(c)` is null or `MAX(c)` = 7) join `test`.`t1` where `test`.`t1`.`b` = 7 and `test`.`t1`.`a` = `<subquery2>`.`MAX(c)` and (<cache>(`<subquery2>`.`MAX(c)` is null) or `<subquery2>`.`MAX(c)` = 7) +Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from <materialize> (/* select#2 */ select max(`test`.`t2`.`c`) from `test`.`t2` having `MAX(c)` is null or `MAX(c)` = 7) join `test`.`t1` where `test`.`t1`.`b` = 7 and `test`.`t1`.`a` = `<subquery2>`.`MAX(c)` and (<cache>(/*always not null*/ 1 is null) or `<subquery2>`.`MAX(c)` = 7) SELECT * FROM t1 WHERE a IN (SELECT MAX(c) FROM t2) AND b=7 AND (a IS NULL OR a=b); a b @@ -2431,6 +2431,99 @@ ec70316637232000158bbfc8bcbe5d60 ebb4620037332000158bbfc8bcbe5d89 DROP TABLE t1,t2,t3; set optimizer_switch=@save_optimizer_switch; +# +# MDEV-16751: Server crashes in st_join_table::cleanup or +# TABLE_LIST::is_with_table_recursive_reference with join_cache_level>2 +# +set @save_join_cache_level= @@join_cache_level; +set join_cache_level=4; +CREATE TABLE t1 ( id int NOT NULL); +INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19); +CREATE TABLE t2 (i1 int NOT NULL, i2 int NOT NULL) ; +INSERT INTO t2 VALUES (11,11),(12,12),(13,13); +explain +SELECT 1 FROM t1 where t1.id IN (SELECT t2.i1 FROM t2 WHERE t2.i1 = t2.i2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 3 +1 PRIMARY t1 hash_ALL NULL #hash#$hj 4 test.t2.i1 9 Using where; Using join buffer (flat, BNLH join) +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 Using where +SELECT 1 FROM t1 where t1.id IN (SELECT t2.i1 FROM t2 WHERE t2.i1 = t2.i2); +1 +1 +1 +1 +set @@join_cache_level= @save_join_cache_level; +alter table t1 add key(id); +explain +SELECT 1 FROM t1 where t1.id IN (SELECT t2.i1 FROM t2 WHERE t2.i1 = t2.i2); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 3 +1 PRIMARY t1 ref id id 4 test.t2.i1 2 Using index +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 Using where +SELECT 1 FROM t1 where t1.id IN (SELECT t2.i1 FROM t2 WHERE t2.i1 = t2.i2); +1 +1 +1 +1 +drop table t1,t2; +# +# MDEV-15454: Nested SELECT IN returns wrong results +# +CREATE TABLE t1 ( a int NOT NULL PRIMARY KEY); +CREATE TABLE t2 ( a int, b int ); +INSERT INTO t2 VALUES (7878, 96),(3465, 96),(1403, 96),(4189, 96),(8732, 96), (5,96); +CREATE TABLE t3 (c int unsigned NOT NULL, b int unsigned NOT NULL, PRIMARY KEY (c,b)); +INSERT INTO t3 (c, b) VALUES (27, 96); +CREATE PROCEDURE prepare_data() +BEGIN +DECLARE i INT DEFAULT 1; +WHILE i < 1000 DO +INSERT INTO t1 (a) VALUES (i); +INSERT INTO t2 (a,b) VALUES (i,56); +INSERT INTO t3 (c,b) VALUES (i,i); +SET i = i + 1; +END WHILE; +END$$ +CALL prepare_data(); +SELECT t2.a FROM t2 WHERE t2.b IN (SELECT t3.b FROM t3 WHERE t3.c= 27); +a +7878 +3465 +1403 +4189 +8732 +5 +set @save_optimizer_switch= @@optimizer_switch; +SET optimizer_switch='materialization=off'; +SELECT t1.a FROM t1 +WHERE t1.a IN (SELECT t2.a FROM t2 WHERE t2.b IN (SELECT t3.b FROM t3 WHERE t3.c= 27)) LIMIT 5; +a +5 +SET optimizer_switch='materialization=on'; +SELECT t1.a FROM t1 +WHERE t1.a IN (SELECT t2.a FROM t2 WHERE t2.b IN (SELECT t3.b FROM t3 WHERE t3.c= 27)) LIMIT 5; +a +5 +drop procedure prepare_data; +set @@optimizer_switch= @save_optimizer_switch; +drop table t1,t2,t3; +CREATE TABLE t1 ( id int NOT NULL, key(id)); +INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19); +CREATE TABLE t2 (i1 int NOT NULL, i2 int NOT NULL); +INSERT INTO t2 VALUES (11,11),(12,12),(13,13); +CREATE VIEW v1 AS SELECT t2.i1 FROM t2 where t2.i1 = t2.i2; +explain SELECT 1 FROM t1 where t1.id IN (SELECT v1.i1 from v1); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 3 +1 PRIMARY t1 ref id id 4 test.t2.i1 2 Using index +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 Using where +SELECT 1 FROM t1 where t1.id IN (SELECT v1.i1 from v1); +1 +1 +1 +1 +drop table t1,t2; +drop view v1; # End of 5.5 tests # # MDEV-7220: Materialization strategy is not used for REPLACE ... SELECT diff --git a/mysql-test/main/subselect_sj_mat.test b/mysql-test/main/subselect_sj_mat.test index 66c11b61435..7b8179bba38 100644 --- a/mysql-test/main/subselect_sj_mat.test +++ b/mysql-test/main/subselect_sj_mat.test @@ -2157,6 +2157,85 @@ eval $q; DROP TABLE t1,t2,t3; set optimizer_switch=@save_optimizer_switch; +--echo # +--echo # MDEV-16751: Server crashes in st_join_table::cleanup or +--echo # TABLE_LIST::is_with_table_recursive_reference with join_cache_level>2 +--echo # + +set @save_join_cache_level= @@join_cache_level; +set join_cache_level=4; +CREATE TABLE t1 ( id int NOT NULL); +INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19); + +CREATE TABLE t2 (i1 int NOT NULL, i2 int NOT NULL) ; +INSERT INTO t2 VALUES (11,11),(12,12),(13,13); + +explain +SELECT 1 FROM t1 where t1.id IN (SELECT t2.i1 FROM t2 WHERE t2.i1 = t2.i2); +SELECT 1 FROM t1 where t1.id IN (SELECT t2.i1 FROM t2 WHERE t2.i1 = t2.i2); + +set @@join_cache_level= @save_join_cache_level; +alter table t1 add key(id); + +explain +SELECT 1 FROM t1 where t1.id IN (SELECT t2.i1 FROM t2 WHERE t2.i1 = t2.i2); +SELECT 1 FROM t1 where t1.id IN (SELECT t2.i1 FROM t2 WHERE t2.i1 = t2.i2); + +drop table t1,t2; + +--echo # +--echo # MDEV-15454: Nested SELECT IN returns wrong results +--echo # + +CREATE TABLE t1 ( a int NOT NULL PRIMARY KEY); + +CREATE TABLE t2 ( a int, b int ); +INSERT INTO t2 VALUES (7878, 96),(3465, 96),(1403, 96),(4189, 96),(8732, 96), (5,96); + +CREATE TABLE t3 (c int unsigned NOT NULL, b int unsigned NOT NULL, PRIMARY KEY (c,b)); +INSERT INTO t3 (c, b) VALUES (27, 96); + +DELIMITER $$; +CREATE PROCEDURE prepare_data() +BEGIN + DECLARE i INT DEFAULT 1; + WHILE i < 1000 DO + INSERT INTO t1 (a) VALUES (i); + INSERT INTO t2 (a,b) VALUES (i,56); + INSERT INTO t3 (c,b) VALUES (i,i); + SET i = i + 1; + END WHILE; +END$$ +DELIMITER ;$$ + +CALL prepare_data(); + +SELECT t2.a FROM t2 WHERE t2.b IN (SELECT t3.b FROM t3 WHERE t3.c= 27); + +set @save_optimizer_switch= @@optimizer_switch; +SET optimizer_switch='materialization=off'; + +SELECT t1.a FROM t1 +WHERE t1.a IN (SELECT t2.a FROM t2 WHERE t2.b IN (SELECT t3.b FROM t3 WHERE t3.c= 27)) LIMIT 5; + +SET optimizer_switch='materialization=on'; + +SELECT t1.a FROM t1 +WHERE t1.a IN (SELECT t2.a FROM t2 WHERE t2.b IN (SELECT t3.b FROM t3 WHERE t3.c= 27)) LIMIT 5; + +drop procedure prepare_data; +set @@optimizer_switch= @save_optimizer_switch; +drop table t1,t2,t3; + +CREATE TABLE t1 ( id int NOT NULL, key(id)); +INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19); +CREATE TABLE t2 (i1 int NOT NULL, i2 int NOT NULL); +INSERT INTO t2 VALUES (11,11),(12,12),(13,13); +CREATE VIEW v1 AS SELECT t2.i1 FROM t2 where t2.i1 = t2.i2; +explain SELECT 1 FROM t1 where t1.id IN (SELECT v1.i1 from v1); +SELECT 1 FROM t1 where t1.id IN (SELECT v1.i1 from v1); +drop table t1,t2; +drop view v1; --echo # End of 5.5 tests --echo # --echo # MDEV-7220: Materialization strategy is not used for REPLACE ... SELECT diff --git a/mysql-test/main/system_mysql_db.result b/mysql-test/main/system_mysql_db.result index 2abcfb92ffa..a4c414888ca 100644 --- a/mysql-test/main/system_mysql_db.result +++ b/mysql-test/main/system_mysql_db.result @@ -11,7 +11,6 @@ help_category help_keyword help_relation help_topic -host index_stats innodb_index_stats innodb_table_stats @@ -59,32 +58,7 @@ db CREATE TABLE `db` ( `Delete_history_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', PRIMARY KEY (`Host`,`Db`,`User`), KEY `User` (`User`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges' -show create table host; -Table Create Table -host CREATE TABLE `host` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - PRIMARY KEY (`Host`,`Db`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Database privileges' show create table user; Table Create Table user CREATE TABLE `user` ( @@ -136,7 +110,7 @@ user CREATE TABLE `user` ( `default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `max_statement_time` decimal(12,6) NOT NULL DEFAULT 0.000000, PRIMARY KEY (`Host`,`User`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Users and global privileges' show create table func; Table Create Table func CREATE TABLE `func` ( @@ -145,7 +119,7 @@ func CREATE TABLE `func` ( `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL, PRIMARY KEY (`name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='User defined functions' show create table tables_priv; Table Create Table tables_priv CREATE TABLE `tables_priv` ( @@ -159,7 +133,7 @@ tables_priv CREATE TABLE `tables_priv` ( `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), KEY `Grantor` (`Grantor`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Table privileges' show create table columns_priv; Table Create Table columns_priv CREATE TABLE `columns_priv` ( @@ -171,7 +145,7 @@ columns_priv CREATE TABLE `columns_priv` ( `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Column privileges' show create table procs_priv; Table Create Table procs_priv CREATE TABLE `procs_priv` ( @@ -185,7 +159,7 @@ procs_priv CREATE TABLE `procs_priv` ( `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), KEY `Grantor` (`Grantor`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Procedure privileges' show create table servers; Table Create Table servers CREATE TABLE `servers` ( @@ -199,7 +173,7 @@ servers CREATE TABLE `servers` ( `Wrapper` char(64) NOT NULL DEFAULT '', `Owner` char(64) NOT NULL DEFAULT '', PRIMARY KEY (`Server_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table' +) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='MySQL Foreign Servers table' show create table proc; Table Create Table proc CREATE TABLE `proc` ( @@ -225,7 +199,7 @@ proc CREATE TABLE `proc` ( `body_utf8` longblob DEFAULT NULL, `aggregate` enum('NONE','GROUP') NOT NULL DEFAULT 'NONE', PRIMARY KEY (`db`,`name`,`type`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures' +) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Stored Procedures' show create table event; Table Create Table event CREATE TABLE `event` ( @@ -252,7 +226,7 @@ event CREATE TABLE `event` ( `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `body_utf8` longblob DEFAULT NULL, PRIMARY KEY (`db`,`name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events' +) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Events' show create table general_log; Table Create Table general_log CREATE TABLE `general_log` ( @@ -287,7 +261,7 @@ table_stats CREATE TABLE `table_stats` ( `table_name` varchar(64) COLLATE utf8_bin NOT NULL, `cardinality` bigint(21) unsigned DEFAULT NULL, PRIMARY KEY (`db_name`,`table_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Tables' show create table column_stats; Table Create Table column_stats CREATE TABLE `column_stats` ( @@ -303,7 +277,7 @@ column_stats CREATE TABLE `column_stats` ( `hist_type` enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') COLLATE utf8_bin DEFAULT NULL, `histogram` varbinary(255) DEFAULT NULL, PRIMARY KEY (`db_name`,`table_name`,`column_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Columns' show create table index_stats; Table Create Table index_stats CREATE TABLE `index_stats` ( @@ -313,6 +287,6 @@ index_stats CREATE TABLE `index_stats` ( `prefix_arity` int(11) unsigned NOT NULL, `avg_frequency` decimal(12,4) DEFAULT NULL, PRIMARY KEY (`db_name`,`table_name`,`index_name`,`prefix_arity`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Indexes' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Indexes' show tables; Tables_in_test diff --git a/mysql-test/main/system_mysql_db_fix40123.result b/mysql-test/main/system_mysql_db_fix40123.result index 2abcfb92ffa..d76a2ef923e 100644 --- a/mysql-test/main/system_mysql_db_fix40123.result +++ b/mysql-test/main/system_mysql_db_fix40123.result @@ -59,32 +59,7 @@ db CREATE TABLE `db` ( `Delete_history_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', PRIMARY KEY (`Host`,`Db`,`User`), KEY `User` (`User`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges' -show create table host; -Table Create Table -host CREATE TABLE `host` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - PRIMARY KEY (`Host`,`Db`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Database privileges' show create table user; Table Create Table user CREATE TABLE `user` ( @@ -136,7 +111,7 @@ user CREATE TABLE `user` ( `default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `max_statement_time` decimal(12,6) NOT NULL DEFAULT 0.000000, PRIMARY KEY (`Host`,`User`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Users and global privileges' show create table func; Table Create Table func CREATE TABLE `func` ( @@ -145,7 +120,7 @@ func CREATE TABLE `func` ( `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL, PRIMARY KEY (`name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='User defined functions' show create table tables_priv; Table Create Table tables_priv CREATE TABLE `tables_priv` ( @@ -159,7 +134,7 @@ tables_priv CREATE TABLE `tables_priv` ( `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), KEY `Grantor` (`Grantor`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Table privileges' show create table columns_priv; Table Create Table columns_priv CREATE TABLE `columns_priv` ( @@ -171,7 +146,7 @@ columns_priv CREATE TABLE `columns_priv` ( `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Column privileges' show create table procs_priv; Table Create Table procs_priv CREATE TABLE `procs_priv` ( @@ -185,7 +160,7 @@ procs_priv CREATE TABLE `procs_priv` ( `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), KEY `Grantor` (`Grantor`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Procedure privileges' show create table servers; Table Create Table servers CREATE TABLE `servers` ( @@ -199,7 +174,7 @@ servers CREATE TABLE `servers` ( `Wrapper` char(64) NOT NULL DEFAULT '', `Owner` char(64) NOT NULL DEFAULT '', PRIMARY KEY (`Server_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table' +) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='MySQL Foreign Servers table' show create table proc; Table Create Table proc CREATE TABLE `proc` ( @@ -225,7 +200,7 @@ proc CREATE TABLE `proc` ( `body_utf8` longblob DEFAULT NULL, `aggregate` enum('NONE','GROUP') NOT NULL DEFAULT 'NONE', PRIMARY KEY (`db`,`name`,`type`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures' +) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Stored Procedures' show create table event; Table Create Table event CREATE TABLE `event` ( @@ -252,7 +227,7 @@ event CREATE TABLE `event` ( `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `body_utf8` longblob DEFAULT NULL, PRIMARY KEY (`db`,`name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events' +) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Events' show create table general_log; Table Create Table general_log CREATE TABLE `general_log` ( @@ -287,7 +262,7 @@ table_stats CREATE TABLE `table_stats` ( `table_name` varchar(64) COLLATE utf8_bin NOT NULL, `cardinality` bigint(21) unsigned DEFAULT NULL, PRIMARY KEY (`db_name`,`table_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Tables' show create table column_stats; Table Create Table column_stats CREATE TABLE `column_stats` ( @@ -303,7 +278,7 @@ column_stats CREATE TABLE `column_stats` ( `hist_type` enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') COLLATE utf8_bin DEFAULT NULL, `histogram` varbinary(255) DEFAULT NULL, PRIMARY KEY (`db_name`,`table_name`,`column_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Columns' show create table index_stats; Table Create Table index_stats CREATE TABLE `index_stats` ( @@ -313,6 +288,6 @@ index_stats CREATE TABLE `index_stats` ( `prefix_arity` int(11) unsigned NOT NULL, `avg_frequency` decimal(12,4) DEFAULT NULL, PRIMARY KEY (`db_name`,`table_name`,`index_name`,`prefix_arity`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Indexes' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Indexes' show tables; Tables_in_test diff --git a/mysql-test/main/system_mysql_db_fix50030.result b/mysql-test/main/system_mysql_db_fix50030.result index 81b6da4c16d..fdc708db313 100644 --- a/mysql-test/main/system_mysql_db_fix50030.result +++ b/mysql-test/main/system_mysql_db_fix50030.result @@ -59,32 +59,7 @@ db CREATE TABLE `db` ( `Delete_history_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', PRIMARY KEY (`Host`,`Db`,`User`), KEY `User` (`User`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges' -show create table host; -Table Create Table -host CREATE TABLE `host` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - PRIMARY KEY (`Host`,`Db`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Database privileges' show create table user; Table Create Table user CREATE TABLE `user` ( @@ -136,7 +111,7 @@ user CREATE TABLE `user` ( `default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `max_statement_time` decimal(12,6) NOT NULL DEFAULT 0.000000, PRIMARY KEY (`Host`,`User`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Users and global privileges' show create table func; Table Create Table func CREATE TABLE `func` ( @@ -145,7 +120,7 @@ func CREATE TABLE `func` ( `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL, PRIMARY KEY (`name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='User defined functions' show create table tables_priv; Table Create Table tables_priv CREATE TABLE `tables_priv` ( @@ -159,7 +134,7 @@ tables_priv CREATE TABLE `tables_priv` ( `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), KEY `Grantor` (`Grantor`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Table privileges' show create table columns_priv; Table Create Table columns_priv CREATE TABLE `columns_priv` ( @@ -171,7 +146,7 @@ columns_priv CREATE TABLE `columns_priv` ( `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Column privileges' show create table procs_priv; Table Create Table procs_priv CREATE TABLE `procs_priv` ( @@ -185,7 +160,7 @@ procs_priv CREATE TABLE `procs_priv` ( `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), KEY `Grantor` (`Grantor`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Procedure privileges' show create table servers; Table Create Table servers CREATE TABLE `servers` ( @@ -199,7 +174,7 @@ servers CREATE TABLE `servers` ( `Wrapper` char(64) NOT NULL DEFAULT '', `Owner` char(64) NOT NULL DEFAULT '', PRIMARY KEY (`Server_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table' +) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='MySQL Foreign Servers table' show create table proc; Table Create Table proc CREATE TABLE `proc` ( @@ -225,7 +200,7 @@ proc CREATE TABLE `proc` ( `body_utf8` longblob DEFAULT NULL, `aggregate` enum('NONE','GROUP') NOT NULL DEFAULT 'NONE', PRIMARY KEY (`db`,`name`,`type`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures' +) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Stored Procedures' show create table event; Table Create Table event CREATE TABLE `event` ( @@ -252,7 +227,7 @@ event CREATE TABLE `event` ( `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `body_utf8` longblob DEFAULT NULL, PRIMARY KEY (`db`,`name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events' +) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Events' show create table general_log; Table Create Table general_log CREATE TABLE `general_log` ( @@ -287,7 +262,7 @@ table_stats CREATE TABLE `table_stats` ( `table_name` varchar(64) COLLATE utf8_bin NOT NULL, `cardinality` bigint(21) unsigned DEFAULT NULL, PRIMARY KEY (`db_name`,`table_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Tables' show create table column_stats; Table Create Table column_stats CREATE TABLE `column_stats` ( @@ -303,7 +278,7 @@ column_stats CREATE TABLE `column_stats` ( `hist_type` enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') COLLATE utf8_bin DEFAULT NULL, `histogram` varbinary(255) DEFAULT NULL, PRIMARY KEY (`db_name`,`table_name`,`column_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Columns' show create table index_stats; Table Create Table index_stats CREATE TABLE `index_stats` ( @@ -313,6 +288,6 @@ index_stats CREATE TABLE `index_stats` ( `prefix_arity` int(11) unsigned NOT NULL, `avg_frequency` decimal(12,4) DEFAULT NULL, PRIMARY KEY (`db_name`,`table_name`,`index_name`,`prefix_arity`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Indexes' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Indexes' show tables; Tables_in_test diff --git a/mysql-test/main/system_mysql_db_fix50117.result b/mysql-test/main/system_mysql_db_fix50117.result index 2abcfb92ffa..d76a2ef923e 100644 --- a/mysql-test/main/system_mysql_db_fix50117.result +++ b/mysql-test/main/system_mysql_db_fix50117.result @@ -59,32 +59,7 @@ db CREATE TABLE `db` ( `Delete_history_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', PRIMARY KEY (`Host`,`Db`,`User`), KEY `User` (`User`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges' -show create table host; -Table Create Table -host CREATE TABLE `host` ( - `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', - `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '', - `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N', - PRIMARY KEY (`Host`,`Db`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Database privileges' show create table user; Table Create Table user CREATE TABLE `user` ( @@ -136,7 +111,7 @@ user CREATE TABLE `user` ( `default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '', `max_statement_time` decimal(12,6) NOT NULL DEFAULT 0.000000, PRIMARY KEY (`Host`,`User`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Users and global privileges' show create table func; Table Create Table func CREATE TABLE `func` ( @@ -145,7 +120,7 @@ func CREATE TABLE `func` ( `dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '', `type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL, PRIMARY KEY (`name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='User defined functions' show create table tables_priv; Table Create Table tables_priv CREATE TABLE `tables_priv` ( @@ -159,7 +134,7 @@ tables_priv CREATE TABLE `tables_priv` ( `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`), KEY `Grantor` (`Grantor`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Table privileges' show create table columns_priv; Table Create Table columns_priv CREATE TABLE `columns_priv` ( @@ -171,7 +146,7 @@ columns_priv CREATE TABLE `columns_priv` ( `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '', PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Column privileges' show create table procs_priv; Table Create Table procs_priv CREATE TABLE `procs_priv` ( @@ -185,7 +160,7 @@ procs_priv CREATE TABLE `procs_priv` ( `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`), KEY `Grantor` (`Grantor`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Procedure privileges' show create table servers; Table Create Table servers CREATE TABLE `servers` ( @@ -199,7 +174,7 @@ servers CREATE TABLE `servers` ( `Wrapper` char(64) NOT NULL DEFAULT '', `Owner` char(64) NOT NULL DEFAULT '', PRIMARY KEY (`Server_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table' +) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='MySQL Foreign Servers table' show create table proc; Table Create Table proc CREATE TABLE `proc` ( @@ -225,7 +200,7 @@ proc CREATE TABLE `proc` ( `body_utf8` longblob DEFAULT NULL, `aggregate` enum('NONE','GROUP') NOT NULL DEFAULT 'NONE', PRIMARY KEY (`db`,`name`,`type`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures' +) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Stored Procedures' show create table event; Table Create Table event CREATE TABLE `event` ( @@ -252,7 +227,7 @@ event CREATE TABLE `event` ( `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `body_utf8` longblob DEFAULT NULL, PRIMARY KEY (`db`,`name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events' +) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Events' show create table general_log; Table Create Table general_log CREATE TABLE `general_log` ( @@ -287,7 +262,7 @@ table_stats CREATE TABLE `table_stats` ( `table_name` varchar(64) COLLATE utf8_bin NOT NULL, `cardinality` bigint(21) unsigned DEFAULT NULL, PRIMARY KEY (`db_name`,`table_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Tables' show create table column_stats; Table Create Table column_stats CREATE TABLE `column_stats` ( @@ -303,7 +278,7 @@ column_stats CREATE TABLE `column_stats` ( `hist_type` enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') COLLATE utf8_bin DEFAULT NULL, `histogram` varbinary(255) DEFAULT NULL, PRIMARY KEY (`db_name`,`table_name`,`column_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Columns' show create table index_stats; Table Create Table index_stats CREATE TABLE `index_stats` ( @@ -313,6 +288,6 @@ index_stats CREATE TABLE `index_stats` ( `prefix_arity` int(11) unsigned NOT NULL, `avg_frequency` decimal(12,4) DEFAULT NULL, PRIMARY KEY (`db_name`,`table_name`,`index_name`,`prefix_arity`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Indexes' +) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Indexes' show tables; Tables_in_test diff --git a/mysql-test/main/system_mysql_db_refs.result b/mysql-test/main/system_mysql_db_refs.result index 96ecd2f27c0..870a550bb95 100644 --- a/mysql-test/main/system_mysql_db_refs.result +++ b/mysql-test/main/system_mysql_db_refs.result @@ -2,9 +2,6 @@ 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; 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 ignore into test_host (Host,Db) values (@name,@name); create table test_user select * from mysql.user; delete from test_user; insert ignore into test_user (Host,User) values (@name,@name); @@ -19,28 +16,24 @@ delete from test_columns_priv; 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, if(isnull(test_user.Host),'WRONG!!!','ok') as test_user_Host, if(isnull(test_tables_priv.Host),'WRONG!!!','ok') as test_tables_priv_Host, if(isnull(test_columns_priv.Host),'WRONG!!!','ok') as test_columns_priv_Host from test_db -left join test_host on test_db.Host=test_host.Host left join test_user on test_db.Host=test_user.Host left join test_tables_priv on test_db.Host=test_tables_priv.Host left join test_columns_priv on test_db.Host=test_columns_priv.Host; -test_db_Host test_host_Host test_user_Host test_tables_priv_Host test_columns_priv_Host -ok ok ok ok ok +test_db_Host test_user_Host test_tables_priv_Host test_columns_priv_Host +ok ok ok ok select if(isnull(test_db.Db),'WRONG!!!','ok') as test_db_Db, -if(isnull(test_host.Db),'WRONG!!!','ok') as test_host_Db, if(isnull(test_tables_priv.Db),'WRONG!!!','ok') as test_tables_priv_Db, if(isnull(test_columns_priv.Db),'WRONG!!!','ok') as est_columns_priv_Db from test_db -left join test_host on test_db.Db=test_host.Db left join test_tables_priv on test_db.Db=test_tables_priv.Db left join test_columns_priv on test_db.Db=test_columns_priv.Db; -test_db_Db test_host_Db test_tables_priv_Db est_columns_priv_Db -ok ok ok ok +test_db_Db test_tables_priv_Db est_columns_priv_Db +ok ok ok select if(isnull(test_db.User),'WRONG!!!','ok') as test_db_User, if(isnull(test_user.User),'WRONG!!!','ok') as test_user_User, @@ -62,6 +55,5 @@ ok ok drop table test_columns_priv; drop table test_tables_priv; drop table test_func; -drop table test_host; drop table test_user; drop table test_db; diff --git a/mysql-test/main/system_mysql_db_refs.test b/mysql-test/main/system_mysql_db_refs.test index 63f30e7db63..084d5bbf868 100644 --- a/mysql-test/main/system_mysql_db_refs.test +++ b/mysql-test/main/system_mysql_db_refs.test @@ -14,12 +14,6 @@ delete from test_db; 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 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 @@ -48,13 +42,11 @@ insert ignore into test_columns_priv (Host,Db,User,Table_name,Column_name) value select if(isnull(test_db.Host),'WRONG!!!','ok') as test_db_Host, - if(isnull(test_host.Host),'WRONG!!!','ok') as test_host_Host, if(isnull(test_user.Host),'WRONG!!!','ok') as test_user_Host, if(isnull(test_tables_priv.Host),'WRONG!!!','ok') as test_tables_priv_Host, if(isnull(test_columns_priv.Host),'WRONG!!!','ok') as test_columns_priv_Host from test_db -left join test_host on test_db.Host=test_host.Host left join test_user on test_db.Host=test_user.Host left join test_tables_priv on test_db.Host=test_tables_priv.Host left join test_columns_priv on test_db.Host=test_columns_priv.Host; @@ -63,12 +55,10 @@ left join test_columns_priv on test_db.Host=test_columns_priv.Host; select if(isnull(test_db.Db),'WRONG!!!','ok') as test_db_Db, - if(isnull(test_host.Db),'WRONG!!!','ok') as test_host_Db, if(isnull(test_tables_priv.Db),'WRONG!!!','ok') as test_tables_priv_Db, if(isnull(test_columns_priv.Db),'WRONG!!!','ok') as est_columns_priv_Db from test_db -left join test_host on test_db.Db=test_host.Db left join test_tables_priv on test_db.Db=test_tables_priv.Db left join test_columns_priv on test_db.Db=test_columns_priv.Db; @@ -96,7 +86,6 @@ left join test_columns_priv on test_tables_priv.Table_name=test_columns_priv.Tab drop table test_columns_priv; drop table test_tables_priv; drop table test_func; -drop table test_host; drop table test_user; drop table test_db; diff --git a/mysql-test/main/table_value_constr.result b/mysql-test/main/table_value_constr.result index 9129fd0a23b..454356bb5fb 100644 --- a/mysql-test/main/table_value_constr.result +++ b/mysql-test/main/table_value_constr.result @@ -2096,3 +2096,95 @@ v # with t as (values (),()) select 1 from t; ERROR HY000: Row with no elements is not allowed in table value constructor in this context +# +# MDEV-17017: TVC in derived table +# +create table t1 (a int); +insert into t1 values (9), (3), (2); +select * from (values (7), (5), (8), (1), (3), (8), (1)) t; +7 +7 +5 +8 +1 +3 +8 +1 +explain select * from (values (7), (5), (8), (1), (3), (8), (1)) t; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 7 +2 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used +select * from (values (1,11), (7,77), (3,31), (4,42)) t; +1 11 +1 11 +7 77 +3 31 +4 42 +explain select * from (values (1,11), (7,77), (3,31), (4,42)) t; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 4 +2 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used +select * from (values (7), (5), (8), (1) union values (3), (8), (1)) t; +7 +7 +5 +8 +1 +3 +explain select * from (values (7), (5), (8), (1) union values (3), (8), (1)) t; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 7 +2 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used +3 UNION NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL +select * from (values (7), (5), (8), (1) union select * from t1) t; +7 +7 +5 +8 +1 +9 +3 +2 +explain select * from (values (7), (5), (8), (1) union select * from t1) t; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 7 +2 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used +3 UNION t1 ALL NULL NULL NULL NULL 3 +NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL +drop table t1; +# +# MDEV-16930: expression in the first row of TVC specifying derived table +# +SELECT 1 + 1, 2, "abc"; +1 + 1 2 abc +2 2 abc +SELECT * FROM (SELECT 1 + 1, 2, "abc") t; +1 + 1 2 abc +2 2 abc +WITH cte AS (SELECT 1 + 1, 2, "abc") SELECT * FROM cte; +1 + 1 2 abc +2 2 abc +SELECT 1 + 1, 2, "abc" UNION SELECT 3+4, 3, "abc"; +1 + 1 2 abc +2 2 abc +7 3 abc +CREATE VIEW v1 AS SELECT 1 + 1, 2, "abc"; +SELECT * FROM v1; +1 + 1 2 abc +2 2 abc +DROP VIEW v1; +VALUES(1 + 1,2,"abc"); +1 + 1 2 abc +2 2 abc +SELECT * FROM (VALUES(1 + 1,2,"abc")) t; +1 + 1 2 abc +2 2 abc +PREPARE stmt FROM "SELECT * FROM (VALUES(1 + 1,2,'abc')) t"; +EXECUTE stmt; +1 + 1 2 abc +2 2 abc +EXECUTE stmt; +1 + 1 2 abc +2 2 abc +DEALLOCATE PREPARE stmt; diff --git a/mysql-test/main/table_value_constr.test b/mysql-test/main/table_value_constr.test index eb5ea59f829..0dd0a7a04b0 100644 --- a/mysql-test/main/table_value_constr.test +++ b/mysql-test/main/table_value_constr.test @@ -1075,3 +1075,51 @@ DELIMITER ;| --error ER_EMPTY_ROW_IN_TVC with t as (values (),()) select 1 from t; + +--echo # +--echo # MDEV-17017: TVC in derived table +--echo # + +create table t1 (a int); +insert into t1 values (9), (3), (2); + +let $q1= +select * from (values (7), (5), (8), (1), (3), (8), (1)) t; +eval $q1; +eval explain $q1; + +let $q2= +select * from (values (1,11), (7,77), (3,31), (4,42)) t; +eval $q2; +eval explain $q2; + +let $q3= +select * from (values (7), (5), (8), (1) union values (3), (8), (1)) t; +eval $q3; +eval explain $q3; + +let $q4= +select * from (values (7), (5), (8), (1) union select * from t1) t; +eval $q4; +eval explain $q4; + +drop table t1; + +--echo # +--echo # MDEV-16930: expression in the first row of TVC specifying derived table +--echo # + +SELECT 1 + 1, 2, "abc"; +SELECT * FROM (SELECT 1 + 1, 2, "abc") t; +WITH cte AS (SELECT 1 + 1, 2, "abc") SELECT * FROM cte; +SELECT 1 + 1, 2, "abc" UNION SELECT 3+4, 3, "abc"; +CREATE VIEW v1 AS SELECT 1 + 1, 2, "abc"; +SELECT * FROM v1; +DROP VIEW v1; + +VALUES(1 + 1,2,"abc"); +SELECT * FROM (VALUES(1 + 1,2,"abc")) t; +PREPARE stmt FROM "SELECT * FROM (VALUES(1 + 1,2,'abc')) t"; +EXECUTE stmt; +EXECUTE stmt; +DEALLOCATE PREPARE stmt; diff --git a/mysql-test/main/temp_table.result b/mysql-test/main/temp_table.result index d1bec4a2af5..5de86e47fb1 100644 --- a/mysql-test/main/temp_table.result +++ b/mysql-test/main/temp_table.result @@ -548,3 +548,27 @@ DROP TABLE nonexisting_table, t1; ERROR 42S02: Unknown table 'temp_db.nonexisting_table' # Cleanup DROP DATABASE temp_db; +USE test; +# +# MDEV-17167 - InnoDB: Failing assertion: table->get_ref_count() == 0 +# upon truncating a temporary table +# +CREATE TEMPORARY TABLE t1(a INT) ENGINE=InnoDB; +SELECT * FROM t1 AS t1a1, t1 AS t2a2; +a a +TRUNCATE TABLE t1; +LOCK TABLES t1 WRITE; +TRUNCATE TABLE t1; +SELECT * FROM t1; +a +UNLOCK TABLES; +LOCK TABLES t1 AS t1a1 WRITE, t1 AS t1a2 WRITE; +TRUNCATE TABLE t1; +SELECT * FROM t1 AS t1a1, t1 AS t1a2; +a a +UNLOCK TABLES; +CREATE TABLE t2(a INT) ENGINE=InnoDB; +LOCK TABLES t2 WRITE; +TRUNCATE TABLE t1; +UNLOCK TABLES; +DROP TABLE t1, t2; diff --git a/mysql-test/main/temp_table.test b/mysql-test/main/temp_table.test index fb44362b537..a528e27b890 100644 --- a/mysql-test/main/temp_table.test +++ b/mysql-test/main/temp_table.test @@ -594,4 +594,30 @@ DROP TABLE nonexisting_table, t1; --echo # Cleanup DROP DATABASE temp_db; +USE test; + +--echo # +--echo # MDEV-17167 - InnoDB: Failing assertion: table->get_ref_count() == 0 +--echo # upon truncating a temporary table +--echo # +CREATE TEMPORARY TABLE t1(a INT) ENGINE=InnoDB; +SELECT * FROM t1 AS t1a1, t1 AS t2a2; +TRUNCATE TABLE t1; + +LOCK TABLES t1 WRITE; +TRUNCATE TABLE t1; +SELECT * FROM t1; +UNLOCK TABLES; + +LOCK TABLES t1 AS t1a1 WRITE, t1 AS t1a2 WRITE; +TRUNCATE TABLE t1; +SELECT * FROM t1 AS t1a1, t1 AS t1a2; +UNLOCK TABLES; + +CREATE TABLE t2(a INT) ENGINE=InnoDB; +LOCK TABLES t2 WRITE; +TRUNCATE TABLE t1; +UNLOCK TABLES; + +DROP TABLE t1, t2; diff --git a/mysql-test/main/timezone2.result b/mysql-test/main/timezone2.result index 096e996bffb..6de62d7ea30 100644 --- a/mysql-test/main/timezone2.result +++ b/mysql-test/main/timezone2.result @@ -332,3 +332,26 @@ NULL # # End of 5.3 tests # +# +# Start of 10.4 tests +# +# +# MDEV-17203 Move fractional second truncation from Item_xxx_typecast::get_date() to Time and Datetime constructors +# (an addition for the test for MDEV-4653) +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); +SET old_mode=ZERO_DATE_TIME_CAST; +SELECT CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5'); +CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5') +NULL +Warnings: +Warning 1292 Truncated incorrect datetime value: '00:00:00' +SELECT CONVERT_TZ(TIME('2010-01-01 00:00:00'),'+00:00','+7:5'); +CONVERT_TZ(TIME('2010-01-01 00:00:00'),'+00:00','+7:5') +NULL +Warnings: +Warning 1292 Truncated incorrect datetime value: '00:00:00' +SET old_mode=DEFAULT; +SET timestamp=DEFAULT; +# +# End of 10.4 tests +# diff --git a/mysql-test/main/timezone2.test b/mysql-test/main/timezone2.test index 7a38610ad95..773b40ec86c 100644 --- a/mysql-test/main/timezone2.test +++ b/mysql-test/main/timezone2.test @@ -308,3 +308,22 @@ SELECT CONVERT_TZ('2001-10-08 00:00:00', MAKE_SET(0,'+01:00'), '+00:00' ); --echo # --echo # End of 5.3 tests --echo # + +--echo # +--echo # Start of 10.4 tests +--echo # + +--echo # +--echo # MDEV-17203 Move fractional second truncation from Item_xxx_typecast::get_date() to Time and Datetime constructors +--echo # (an addition for the test for MDEV-4653) + +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); +SET old_mode=ZERO_DATE_TIME_CAST; +SELECT CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5'); +SELECT CONVERT_TZ(TIME('2010-01-01 00:00:00'),'+00:00','+7:5'); +SET old_mode=DEFAULT; +SET timestamp=DEFAULT; + +--echo # +--echo # End of 10.4 tests +--echo # diff --git a/mysql-test/main/type_date.result b/mysql-test/main/type_date.result index 897f42a2ec4..2c268cfdd88 100644 --- a/mysql-test/main/type_date.result +++ b/mysql-test/main/type_date.result @@ -621,7 +621,7 @@ SELECT * FROM t1 WHERE LENGTH(a)=11+RAND() AND a=' garbage '; 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 Using where Warnings: -Warning 1292 Incorrect datetime value: ' garbage ' +Warning 1292 Truncated incorrect datetime value: ' garbage ' Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = DATE'0000-00-00' and <cache>(octet_length(DATE'0000-00-00')) = 11 + rand() DROP TABLE t1; CREATE TABLE t1 (a DATE); @@ -962,5 +962,41 @@ Warnings: Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(<cache>(DATE'2001-01-02'),`test`.`t1`.`a`) <=> coalesce(DATE'2001-01-01',`test`.`t1`.`a`) DROP TABLE t1; # +# MDEV-15406 NO_ZERO_IN_DATE erroneously affects how CAST(AS DATE) warns about fractional digit truncation +# +SET sql_mode=''; +CREATE TABLE t1 (a DATE); +SELECT CAST(20061108.01 AS DATE); +CAST(20061108.01 AS DATE) +2006-11-08 +Warnings: +Note 1292 Truncated incorrect date value: '20061108.01' +INSERT INTO t1 VALUES (20061108.01); +Warnings: +Note 1265 Data truncated for column 'a' at row 1 +DROP TABLE t1; +SET sql_mode=NO_ZERO_IN_DATE; +SELECT CAST(20061108.01 AS DATE); +CAST(20061108.01 AS DATE) +2006-11-08 +Warnings: +Note 1292 Truncated incorrect date value: '20061108.01' +CREATE TABLE t1 (a DATE); +INSERT INTO t1 VALUES (20061108.01); +Warnings: +Note 1265 Data truncated for column 'a' at row 1 +DROP TABLE t1; +SET sql_mode=DEFAULT; +# +# MDEV-17216 Assertion `!dt->fraction_remainder(decimals())' failed in Field_temporal_with_date::store_TIME_with_warning +# +SET sql_mode=''; +CREATE TABLE t1 (i1 date ); +CREATE TABLE t2 (i2 int unsigned ); +INSERT INTO t2 VALUES (0); +INSERT INTO t1 SELECT * FROM t2; +DROP TABLE t1,t2; +SET sql_mode=DEFAULT; +# # End of 10.4 tests # diff --git a/mysql-test/main/type_date.test b/mysql-test/main/type_date.test index cbd6cc846aa..75bbfb3b916 100644 --- a/mysql-test/main/type_date.test +++ b/mysql-test/main/type_date.test @@ -646,6 +646,37 @@ EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE COALESCE(?,a)<=>COALE DROP TABLE t1; + +--echo # +--echo # MDEV-15406 NO_ZERO_IN_DATE erroneously affects how CAST(AS DATE) warns about fractional digit truncation +--echo # + +SET sql_mode=''; +CREATE TABLE t1 (a DATE); +SELECT CAST(20061108.01 AS DATE); +INSERT INTO t1 VALUES (20061108.01); +DROP TABLE t1; + +SET sql_mode=NO_ZERO_IN_DATE; +SELECT CAST(20061108.01 AS DATE); +CREATE TABLE t1 (a DATE); +INSERT INTO t1 VALUES (20061108.01); +DROP TABLE t1; +SET sql_mode=DEFAULT; + + +--echo # +--echo # MDEV-17216 Assertion `!dt->fraction_remainder(decimals())' failed in Field_temporal_with_date::store_TIME_with_warning +--echo # +SET sql_mode=''; +CREATE TABLE t1 (i1 date ); +CREATE TABLE t2 (i2 int unsigned ); +INSERT INTO t2 VALUES (0); +INSERT INTO t1 SELECT * FROM t2; +DROP TABLE t1,t2; +SET sql_mode=DEFAULT; + + --echo # --echo # End of 10.4 tests --echo # diff --git a/mysql-test/main/type_datetime.result b/mysql-test/main/type_datetime.result index 86dddc93a70..7a213842e03 100644 --- a/mysql-test/main/type_datetime.result +++ b/mysql-test/main/type_datetime.result @@ -361,7 +361,7 @@ greatest(cast('01-01-01' as date), '01-01-02') + 0 20010102 select least(cast('01-01-01' as datetime), '01-01-02') + 0; least(cast('01-01-01' as datetime), '01-01-02') + 0 -20010101000000.000000 +20010101000000 select cast(least(cast('01-01-01' as datetime), '01-01-02') as signed); cast(least(cast('01-01-01' as datetime), '01-01-02') as signed) 20010101000000 @@ -399,7 +399,7 @@ if(@bug28261 = f1, '', @bug28261:= f1) 2001-01-01 2002-02-02 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' select if(@bug28261 = f1, '', @bug28261:= f1) from t1; if(@bug28261 = f1, '', @bug28261:= f1) 2001-01-01 @@ -423,11 +423,11 @@ f1 2001-01-01 00:00:00 2002-02-02 00:00:00 Warnings: -Warning 1292 Incorrect datetime value: '2002010' +Warning 1292 Truncated incorrect datetime value: '2002010' select * from t1 where f1 between 20020101 and 2007010100000; f1 Warnings: -Warning 1292 Incorrect datetime value: '2007010100000' +Warning 1292 Truncated incorrect datetime value: '2007010100000' drop table t1; # # Bug#27216: functions with parameters of different date types may @@ -498,7 +498,7 @@ f1 45:44:44 15:44:44 Warnings: -Warning 1292 Incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '1' drop table t1; create table t1 (a tinyint); insert into t1 values (), (), (); @@ -575,18 +575,18 @@ CAST('NULL' AS DATE) < CAST('NULL' AS DATE) n9; n1 n2 n3 n4 n5 n6 n7 n8 n9 0 0 1 1 1 0 1 0 0 Warnings: -Warning 1292 Incorrect datetime value: 'NULL' -Warning 1292 Incorrect datetime value: 'NULL' -Warning 1292 Incorrect datetime value: 'NULL' -Warning 1292 Incorrect datetime value: 'NULL' -Warning 1292 Incorrect datetime value: 'NULL' -Warning 1292 Incorrect datetime value: 'NULL' -Warning 1292 Incorrect datetime value: 'NULL' -Warning 1292 Incorrect datetime value: 'NULL' -Warning 1292 Incorrect datetime value: 'NULL' -Warning 1292 Incorrect datetime value: 'NULL' -Warning 1292 Incorrect datetime value: 'NULL' -Warning 1292 Incorrect datetime value: 'NULL' +Warning 1292 Truncated incorrect datetime value: 'NULL' +Warning 1292 Truncated incorrect datetime value: 'NULL' +Warning 1292 Truncated incorrect datetime value: 'NULL' +Warning 1292 Truncated incorrect datetime value: 'NULL' +Warning 1292 Truncated incorrect datetime value: 'NULL' +Warning 1292 Truncated incorrect datetime value: 'NULL' +Warning 1292 Truncated incorrect datetime value: 'NULL' +Warning 1292 Truncated incorrect datetime value: 'NULL' +Warning 1292 Truncated incorrect datetime value: 'NULL' +Warning 1292 Truncated incorrect datetime value: 'NULL' +Warning 1292 Truncated incorrect datetime value: 'NULL' +Warning 1292 Truncated incorrect datetime value: 'NULL' End of 5.0 tests set @org_mode=@@sql_mode; create table t1 (da date default '1962-03-03 23:33:34', dt datetime default '1962-03-03'); @@ -917,7 +917,7 @@ CREATE TABLE t1 (a DATETIME); INSERT INTO t1 VALUES ('0000-00-00 10:20:30'); SELECT a, LEAST(a,'2001-01-01 10:20:30') FROM t1; a LEAST(a,'2001-01-01 10:20:30') -0000-00-00 10:20:30 0000-00-00 10:20:30.000000 +0000-00-00 10:20:30 0000-00-00 10:20:30 DROP TABLE t1; CREATE TABLE t1 (a DATETIME(6)); INSERT INTO t1 VALUES ('0000-00-00 00:00:00.000001'); @@ -1012,7 +1012,7 @@ SELECT * FROM t1 WHERE LENGTH(a)=30+RAND() AND a=' garbage '; 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 Using where Warnings: -Warning 1292 Incorrect datetime value: ' garbage ' +Warning 1292 Truncated incorrect datetime value: ' garbage ' Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = TIMESTAMP'0000-00-00 00:00:00' and <cache>(octet_length(TIMESTAMP'0000-00-00 00:00:00')) = 30 + rand() DROP TABLE t1; CREATE TABLE t1 (a DATETIME);; @@ -1131,11 +1131,11 @@ INSERT INTO t1 VALUES ('00:00:00'),('00:01:00'); SELECT 1 FROM t1 WHERE 2016 > SOME (SELECT CAST(a AS DATETIME) FROM t1); 1 Warnings: -Warning 1292 Incorrect datetime value: '2016' +Warning 1292 Truncated incorrect datetime value: '2016' SELECT * FROM t1 WHERE 2016 > CAST(a AS DATETIME); a Warnings: -Warning 1292 Incorrect datetime value: '2016' +Warning 1292 Truncated incorrect datetime value: '2016' SELECT 1 FROM t1 WHERE 20160101 > SOME (SELECT CAST(a AS DATETIME) FROM t1); 1 1 @@ -1400,5 +1400,39 @@ Warnings: Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where octet_length(coalesce(TIME'00:00:00.0',`test`.`t1`.`a`)) <=> octet_length(coalesce(<cache>(TIMESTAMP'2001-01-01 00:00:00.00'),`test`.`t1`.`a`)) DROP TABLE t1; # +# MDEV-17216 Assertion `!dt->fraction_remainder(decimals())' failed in Field_temporal_with_date::store_TIME_with_warning +# +CREATE TABLE t1 (b BIT(20)); +CREATE TABLE t2 (t DATETIME); +INSERT IGNORE INTO t1 VALUES (b'000001001100000'); +INSERT INTO t2 SELECT * FROM t1; +DROP TABLE t1, t2; +CREATE TABLE t1 (a DATETIME); +INSERT INTO t1 SELECT CAST(20010101 AS UNSIGNED); +DROP TABLE t1; +# +# MDEV-17563 Different results using table or view when comparing values of time type +# +CREATE TABLE t1 (pk int, x1 datetime, x2 varchar(1)); +INSERT INTO t1 VALUES (17,'2001-01-01 09:16:37',''); +INSERT INTO t1 VALUES (18,'2001-01-01 09:16:37','k'); +CREATE VIEW v1 AS SELECT * FROM t1; +SELECT pk FROM t1 WHERE x1 >x2; +pk +17 +18 +Warnings: +Warning 1292 Truncated incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: 'k' +SELECT pk FROM v1 WHERE x1 >x2; +pk +17 +18 +Warnings: +Warning 1292 Truncated incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: 'k' +DROP VIEW v1; +DROP TABLE t1; +# # End of 10.4 tests # diff --git a/mysql-test/main/type_datetime.test b/mysql-test/main/type_datetime.test index 3c8287f8793..7bd7883f469 100644 --- a/mysql-test/main/type_datetime.test +++ b/mysql-test/main/type_datetime.test @@ -175,12 +175,12 @@ set @@sql_mode= @org_mode; ## ( Bug#29290 type_datetime.test failure in 5.1 ) ## Therefore we sleep a bit if we are too close to midnight. ## The complete test itself needs around 1 second. -## Therefore a time_distance to midnight of 5 seconds should be sufficient. -if (`SELECT CURTIME() > SEC_TO_TIME(24 * 3600 - 5)`) +## Therefore a time_distance to midnight of 10 seconds should be sufficient. +if (`SELECT CURTIME() > SEC_TO_TIME(24 * 3600 - 10)`) { - # We are here when CURTIME() is between '23:59:56' and '23:59:59'. - # So a sleep time of 5 seconds brings us between '00:00:01' and '00:00:04'. - --real_sleep 5 + # We are here when CURTIME() is between '23:59:51' and '23:59:59'. + # So a sleep time of 10 seconds brings us between '00:00:01' and '00:00:09'. + --real_sleep 10 } create table t1 (f1 date, f2 datetime, f3 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP); insert into t1(f1) values(curdate()); @@ -899,5 +899,34 @@ DROP TABLE t1; --echo # +--echo # MDEV-17216 Assertion `!dt->fraction_remainder(decimals())' failed in Field_temporal_with_date::store_TIME_with_warning +--echo # + +CREATE TABLE t1 (b BIT(20)); +CREATE TABLE t2 (t DATETIME); +INSERT IGNORE INTO t1 VALUES (b'000001001100000'); +INSERT INTO t2 SELECT * FROM t1; +DROP TABLE t1, t2; + +CREATE TABLE t1 (a DATETIME); +INSERT INTO t1 SELECT CAST(20010101 AS UNSIGNED); +DROP TABLE t1; + + +--echo # +--echo # MDEV-17563 Different results using table or view when comparing values of time type +--echo # + +CREATE TABLE t1 (pk int, x1 datetime, x2 varchar(1)); +INSERT INTO t1 VALUES (17,'2001-01-01 09:16:37',''); +INSERT INTO t1 VALUES (18,'2001-01-01 09:16:37','k'); +CREATE VIEW v1 AS SELECT * FROM t1; +SELECT pk FROM t1 WHERE x1 >x2; +SELECT pk FROM v1 WHERE x1 >x2; +DROP VIEW v1; +DROP TABLE t1; + + +--echo # --echo # End of 10.4 tests --echo # diff --git a/mysql-test/main/type_decimal.result b/mysql-test/main/type_decimal.result index aed56164a39..dadaa5a4b77 100644 --- a/mysql-test/main/type_decimal.result +++ b/mysql-test/main/type_decimal.result @@ -1204,5 +1204,19 @@ Warnings: Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where <cache>(octet_length(10.0)) + `test`.`t1`.`a` <=> <cache>(octet_length(10.00)) + `test`.`t1`.`a` DROP TABLE t1; # +# MDEV-16984 Assertion `dec' failed in Dec_ptr::cmp +# +SET sql_mode=''; +CREATE TABLE t1 (dc decimal(10)); +INSERT INTO t1 VALUES (0000000),(NULL); +SELECT 1 FROM t1 GROUP BY 'm' <=> dc; +1 +1 +1 +Warnings: +Warning 1292 Truncated incorrect DECIMAL value: 'm' +DROP TABLE t1; +SET sql_mode=DEFAULT; +# # End of 10.4 tests # diff --git a/mysql-test/main/type_decimal.test b/mysql-test/main/type_decimal.test index 3921e86a940..53ad2698f50 100644 --- a/mysql-test/main/type_decimal.test +++ b/mysql-test/main/type_decimal.test @@ -745,5 +745,16 @@ DROP TABLE t1; --echo # +--echo # MDEV-16984 Assertion `dec' failed in Dec_ptr::cmp +--echo # +SET sql_mode=''; +CREATE TABLE t1 (dc decimal(10)); +INSERT INTO t1 VALUES (0000000),(NULL); +SELECT 1 FROM t1 GROUP BY 'm' <=> dc; +DROP TABLE t1; +SET sql_mode=DEFAULT; + + +--echo # --echo # End of 10.4 tests --echo # diff --git a/mysql-test/main/type_float.result b/mysql-test/main/type_float.result index 0ac018379d1..bd1a722f80b 100644 --- a/mysql-test/main/type_float.result +++ b/mysql-test/main/type_float.result @@ -448,6 +448,46 @@ select format(truncate('1.7976931348623157E+308',-12),1,'fr_BE') as foo; foo 0 # +# MDEV-17249 MAKETIME(-1e50,0,0) returns a wrong result +# +SELECT LEFT('a',EXP(50)); +LEFT('a',EXP(50)) +a +SELECT LEFT('a', COALESCE(1e30)); +LEFT('a', COALESCE(1e30)) +a +CREATE TABLE t1 (a FLOAT); +INSERT INTO t1 VALUES (1e30); +SELECT LEFT('a',a), LEFT('a',1e30) FROM t1; +LEFT('a',a) LEFT('a',1e30) +a a +DROP TABLE t1; +PREPARE stmt FROM 'SELECT LEFT(111,?)'; +SET @a=1e30; +EXECUTE stmt USING @a; +LEFT(111,?) +111 +DEALLOCATE PREPARE stmt; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3); +SELECT LEFT('a',(SELECT 1e30 FROM t1 LIMIT 1)); +LEFT('a',(SELECT 1e30 FROM t1 LIMIT 1)) +a +DROP TABLE t1; +CREATE TABLE t1 (a DOUBLE); +INSERT INTO t1 VALUES (1e30),(0); +SELECT LEFT('a', SUM(a)) FROM t1; +LEFT('a', SUM(a)) +a +Warnings: +Warning 1916 Got overflow when converting '1e30' to INT. Value truncated +SELECT LEFT('a', AVG(a)) FROM t1; +LEFT('a', AVG(a)) +a +Warnings: +Warning 1916 Got overflow when converting '5e29' to INT. Value truncated +DROP TABLE t1; +# # Bug #13500371 63704: CONVERSION OF '1.' TO A NUMBER GIVES ERROR 1265 # (WARN_DATA_TRUNCATED) # diff --git a/mysql-test/main/type_float.test b/mysql-test/main/type_float.test index 3d0131b3bb0..f42d3445e2a 100644 --- a/mysql-test/main/type_float.test +++ b/mysql-test/main/type_float.test @@ -332,6 +332,36 @@ eval select concat((truncate((-1.7976931348623157E+307),(0x1e))), select format(truncate('1.7976931348623157E+308',-12),1,'fr_BE') as foo; + +--echo # +--echo # MDEV-17249 MAKETIME(-1e50,0,0) returns a wrong result +--echo # + +SELECT LEFT('a',EXP(50)); +SELECT LEFT('a', COALESCE(1e30)); + +CREATE TABLE t1 (a FLOAT); +INSERT INTO t1 VALUES (1e30); +SELECT LEFT('a',a), LEFT('a',1e30) FROM t1; +DROP TABLE t1; + +PREPARE stmt FROM 'SELECT LEFT(111,?)'; +SET @a=1e30; +EXECUTE stmt USING @a; +DEALLOCATE PREPARE stmt; + +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3); +SELECT LEFT('a',(SELECT 1e30 FROM t1 LIMIT 1)); +DROP TABLE t1; + +CREATE TABLE t1 (a DOUBLE); +INSERT INTO t1 VALUES (1e30),(0); +SELECT LEFT('a', SUM(a)) FROM t1; +SELECT LEFT('a', AVG(a)) FROM t1; +DROP TABLE t1; + + --echo # --echo # Bug #13500371 63704: CONVERSION OF '1.' TO A NUMBER GIVES ERROR 1265 --echo # (WARN_DATA_TRUNCATED) diff --git a/mysql-test/main/type_newdecimal.result b/mysql-test/main/type_newdecimal.result index ba84ff50504..140f36b1261 100644 --- a/mysql-test/main/type_newdecimal.result +++ b/mysql-test/main/type_newdecimal.result @@ -1995,8 +1995,50 @@ select 0.0000000001 mod 1; select 0.01 mod 1; 0.01 mod 1 0.01 +CREATE TABLE t1 ( +`FLD1` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, +`FLD2` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, +`FLD3` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, +`FLD4` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, +`FLD5` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, +`FLD6` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, +`FLD7` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, +`FLD8` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, +`FLD9` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, +`FLD10` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, +`FLD11` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, +`FLD12` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, +`FLD13` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, +`FLD14` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, +`FLD15` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, +`FLD16` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, +`FLD17` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, +`FLD18` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, +`FLD19` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, +`FLD20` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, +`FLD21` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, +`FLD22` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, +`FLD23` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000 +); +INSERT INTO t1 VALUES (001.0760,000.9500,001.0000,001.0000,001.0000, +001.0000,001.0000,001.0000,001.0000,001.0000,001.0000,000.5949,001.0194, +001.0000,001.0000,001.0000,001.0000,001.0000,001.0000,000.9220,001.1890,001.2130,327.2690); +select FLD1*FLD2*FLD3*FLD4*FLD5*FLD6*FLD7*FLD8*FLD9*FLD10*FLD11*FLD12*FLD13*FLD14*FLD15*FLD16*FLD17*FLD18*FLD19*FLD20*FLD21*FLD22*FLD23 as calc1 from t1; +calc1 +269.77575757644053032218703200000000000000 +select FLD23*FLD2*FLD1*FLD4*FLD5*FLD11*FLD12*FLD13*FLD3*FLD15*FLD16*FLD17*FLD18*FLD19*FLD20*FLD21*FLD22*FLD14*FLD6*FLD7*FLD8*FLD9*FLD10 as calc2 from t1; +calc2 +269.77575757644053032218703200000000000000 +DROP TABLE t1; +CREATE TABLE t1 AS SELECT 1.0 * 2.000; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `1.0 * 2.000` decimal(6,4) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; # -# Start of 10.0 tests +# End of 5.5 tests # # # MDEV-6950 Bad results with joins comparing DATE and INT/ENUM/VARCHAR columns diff --git a/mysql-test/main/type_newdecimal.test b/mysql-test/main/type_newdecimal.test index dd5311e4be3..d2d64b0baee 100644 --- a/mysql-test/main/type_newdecimal.test +++ b/mysql-test/main/type_newdecimal.test @@ -1583,8 +1583,51 @@ select 0.000000000000000000000000000000000000000000000000001 mod 1; select 0.0000000001 mod 1; select 0.01 mod 1; +# +# MDEV-17256 Decimal field multiplication bug +# + +CREATE TABLE t1 ( + `FLD1` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, + `FLD2` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, + `FLD3` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, + `FLD4` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, + `FLD5` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, + `FLD6` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, + `FLD7` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, + `FLD8` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, + `FLD9` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, + `FLD10` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, + `FLD11` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, + `FLD12` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, + `FLD13` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, + `FLD14` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, + `FLD15` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, + `FLD16` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, + `FLD17` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, + `FLD18` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, + `FLD19` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, + `FLD20` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, + `FLD21` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, + `FLD22` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000, + `FLD23` decimal(7,4) unsigned zerofill NOT NULL DEFAULT 001.0000 +); + +INSERT INTO t1 VALUES (001.0760,000.9500,001.0000,001.0000,001.0000, + 001.0000,001.0000,001.0000,001.0000,001.0000,001.0000,000.5949,001.0194, + 001.0000,001.0000,001.0000,001.0000,001.0000,001.0000,000.9220,001.1890,001.2130,327.2690); + +select FLD1*FLD2*FLD3*FLD4*FLD5*FLD6*FLD7*FLD8*FLD9*FLD10*FLD11*FLD12*FLD13*FLD14*FLD15*FLD16*FLD17*FLD18*FLD19*FLD20*FLD21*FLD22*FLD23 as calc1 from t1; +select FLD23*FLD2*FLD1*FLD4*FLD5*FLD11*FLD12*FLD13*FLD3*FLD15*FLD16*FLD17*FLD18*FLD19*FLD20*FLD21*FLD22*FLD14*FLD6*FLD7*FLD8*FLD9*FLD10 as calc2 from t1; + +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT 1.0 * 2.000; +SHOW CREATE TABLE t1; +DROP TABLE t1; + --echo # ---echo # Start of 10.0 tests +--echo # End of 5.5 tests --echo # --echo # diff --git a/mysql-test/main/type_temporal_innodb.result b/mysql-test/main/type_temporal_innodb.result index b869822722d..f8d8bc018bd 100644 --- a/mysql-test/main/type_temporal_innodb.result +++ b/mysql-test/main/type_temporal_innodb.result @@ -56,7 +56,7 @@ SELECT DATE'0000-00-00'=''; DATE'0000-00-00'='' 1 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' CREATE TABLE t1 (a ENUM('a'), b DATE, c INT, KEY(b)) ENGINE=InnoDB; INSERT IGNORE INTO t1 VALUES ('','0000-00-00',0); Warnings: @@ -65,49 +65,49 @@ SELECT * FROM t1 WHERE b=''; a b c 0000-00-00 0 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' SELECT * FROM t1 IGNORE KEY (b) WHERE b=''; a b c 0000-00-00 0 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' SELECT * FROM t1 WHERE a=b; a b c 0000-00-00 0 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' SELECT 1 FROM t1 WHERE (SELECT a FROM t1 group by c) = b; 1 1 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' ALTER TABLE t1 ENGINE=MyISAM; SELECT * FROM t1 WHERE b=''; a b c 0000-00-00 0 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' SELECT * FROM t1 IGNORE KEY (b) WHERE b=''; a b c 0000-00-00 0 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' SELECT * FROM t1 WHERE a=b; a b c 0000-00-00 0 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' SELECT 1 FROM t1 WHERE (SELECT a FROM t1 group by c) = b; 1 1 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' DROP TABLE t1; SELECT TIMESTAMP'0000-00-00 00:00:00'=''; TIMESTAMP'0000-00-00 00:00:00'='' 1 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' CREATE TABLE t1 (a ENUM('a'), b DATETIME, c INT, KEY(b)) ENGINE=InnoDB; INSERT IGNORE INTO t1 VALUES ('','0000-00-00 00:00:00',0); Warnings: @@ -116,43 +116,43 @@ SELECT * FROM t1 WHERE b=''; a b c 0000-00-00 00:00:00 0 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' SELECT * FROM t1 IGNORE KEY (b) WHERE b=''; a b c 0000-00-00 00:00:00 0 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' SELECT * FROM t1 WHERE a=b; a b c 0000-00-00 00:00:00 0 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' SELECT 1 FROM t1 WHERE (SELECT a FROM t1 group by c) = b; 1 1 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' ALTER TABLE t1 ENGINE=MyISAM; SELECT * FROM t1 WHERE b=''; a b c 0000-00-00 00:00:00 0 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' SELECT * FROM t1 IGNORE KEY (b) WHERE b=''; a b c 0000-00-00 00:00:00 0 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' SELECT * FROM t1 WHERE a=b; a b c 0000-00-00 00:00:00 0 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' SELECT 1 FROM t1 WHERE (SELECT a FROM t1 group by c) = b; 1 1 Warnings: -Warning 1292 Incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' DROP TABLE t1; CREATE TABLE t1 (d DATE) ENGINE=InnoDB; INSERT INTO t1 VALUES ('2012-12-21'); diff --git a/mysql-test/main/type_time.result b/mysql-test/main/type_time.result index 8f50d49d4b9..0a66a94db69 100644 --- a/mysql-test/main/type_time.result +++ b/mysql-test/main/type_time.result @@ -1463,9 +1463,9 @@ GREATEST('2010-01-01 10:10:10',TIME('-20:20:20')) AS gt_minus20_implicit, GREATEST(CAST('2010-01-01 10:10:10' AS TIME(6)),TIME('-20:20:20')) AS gt_minis20_explicit, GREATEST('2010-01-01 10:10:10',TIME('20:20:20')) AS gt_plus20_implicit, GREATEST(CAST('2010-01-01 10:10:10' AS TIME(6)),TIME('20:20:20')) AS gt_plus20_explicit; -gt_minus20_implicit 10:10:10.000000 +gt_minus20_implicit 10:10:10 gt_minis20_explicit 10:10:10.000000 -gt_plus20_implicit 20:20:20.000000 +gt_plus20_implicit 20:20:20 gt_plus20_explicit 20:20:20.000000 SELECT HOUR(GREATEST('2010-01-01 10:10:10',TIME('-20:20:20'))) AS gt_minus20_implicit, @@ -1481,9 +1481,9 @@ LEAST('2010-01-01 10:10:10',TIME('-20:20:20')) AS lt_minus20_implicit, LEAST(CAST('2010-01-01 10:10:10' AS TIME(6)),TIME('-20:20:20')) AS lt_minus20_explicit, LEAST('2010-01-01 10:10:10',TIME('20:20:20')) AS lt_plus20_implicit, LEAST(CAST('2010-01-01 10:10:10' AS TIME(6)),TIME('20:20:20')) AS lt_plus20_explicit; -lt_minus20_implicit -20:20:20.000000 +lt_minus20_implicit -20:20:20 lt_minus20_explicit -20:20:20.000000 -lt_plus20_implicit 10:10:10.000000 +lt_plus20_implicit 10:10:10 lt_plus20_explicit 10:10:10.000000 SELECT HOUR(LEAST('2010-01-01 10:10:10',TIME('-20:20:20'))) AS lt_minus20_implicit, @@ -1499,9 +1499,9 @@ GREATEST('2010-01-01 10:10:10',TIME('-200:20:20')) AS gt_minus200_implicit, GREATEST(CAST('2010-01-01 10:10:10' AS TIME(6)),TIME('-200:20:20')) AS gt_minus200_explictit, GREATEST('2010-01-01 10:10:10',TIME('200:20:20')) AS gt_plus200_implicit, GREATEST(CAST('2010-01-01 10:10:10' AS TIME(6)),TIME('200:20:20')) AS gt_plus200_explicit; -gt_minus200_implicit 10:10:10.000000 +gt_minus200_implicit 10:10:10 gt_minus200_explictit 10:10:10.000000 -gt_plus200_implicit 200:20:20.000000 +gt_plus200_implicit 200:20:20 gt_plus200_explicit 200:20:20.000000 SELECT HOUR(GREATEST('2010-01-01 10:10:10',TIME('-200:20:20'))) AS gt_minus200_implicit, @@ -1517,9 +1517,9 @@ LEAST('2010-01-01 10:10:10',TIME('-200:20:20')) AS lt_minus200_implicit, LEAST(CAST('2010-01-01 10:10:10' AS TIME(6)),TIME('-200:20:20')) AS lt_minus200_explictit, LEAST('2010-01-01 10:10:10',TIME('200:20:20')) AS lt_plus200_implicit, LEAST(CAST('2010-01-01 10:10:10' AS TIME(6)),TIME('200:20:20')) AS lt_plus200_explicit; -lt_minus200_implicit -200:20:20.000000 +lt_minus200_implicit -200:20:20 lt_minus200_explictit -200:20:20.000000 -lt_plus200_implicit 10:10:10.000000 +lt_plus200_implicit 10:10:10 lt_plus200_explicit 10:10:10.000000 SELECT HOUR(LEAST('2010-01-01 10:10:10',TIME('-200:20:20'))) AS lt_minus200_implicit, @@ -2064,5 +2064,109 @@ Warnings: Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where octet_length(coalesce(TIME'00:00:00.0',`test`.`t1`.`a`)) <=> octet_length(coalesce(<cache>(TIME'00:00:00.00'),`test`.`t1`.`a`)) DROP TABLE t1; # +# MDEV-16971 Assertion `is_valid_value_slow()' failed in Time::adjust_time_range_or_invalidate +# +SET sql_mode=''; +CREATE TABLE t1 (d1 date, t1 time, KEY t1 (t1)); +INSERT INTO t1 VALUES ('1982-12-19','08:16:31'),('1981-04-19','21:52:59'),('1971-06-09','07:15:44'),('2007-08-15','03:55:02'),('1993-06-05','04:17:51'),('2034-07-01','17:31:12'),('1998-08-24','08:09:27'),('1991-01-15','01:14:07'),('2001-02-25','10:41:28'),('1974-06-24','10:21:58'),('1977-04-21','16:38:05'),('1981-12-03','01:24:42'),('1972-06-15','20:19:16'),('1989-08-10','08:53:47'),('2018-05-19','15:06:49'),('1984-01-12','15:56:11'),('2013-01-23','04:16:16'),('2000-06-10','02:06:44'),('1995-01-03','04:51:38'); +CREATE TABLE t2 (d1 date ); +INSERT INTO t2 VALUES ('2018-06-01'),('1979-10-25'),('1974-08-22'),('1980-06-17'); +SELECT * FROM (t1 JOIN t2 ON (t2.d1 = t1.t1)) WHERE (t1.d1 > 70 ); +d1 t1 d1 +UPDATE (t1 JOIN t2 ON (t2.d1 = t1.t1)) SET t1.d1 = '2018-07-07' WHERE (t1.d1 > 70 ); +DROP TABLE t1,t2; +# +# MDEV-17219 Assertion `!t->fraction_remainder(decimals())' failed in Field_time::store_TIME_with_warning +# +SET optimizer_use_condition_selectivity=3; +CREATE TABLE t1 (it TIME NOT NULL); +INSERT INTO t1 VALUES ('07:25:13'),('05:15:55'),('09:58:01'),('04:23:57'),('19:37:28'),('01:38:05'),('20:50:52'); +SELECT 1 FROM t1 WHERE it < -7487797330456870912; +1 +Warnings: +Warning 1292 Truncated incorrect time value: '-7487797330456870912' +DROP TABLE t1; +SET optimizer_use_condition_selectivity=DEFAULT; +# +# MDEV-17417 TIME(99991231235959) returns 838:59:59 instead of 23:59:58 +# +SELECT TIME(99991231235957), TIME(99991231235958), TIME(99991231235959); +TIME(99991231235957) TIME(99991231235958) TIME(99991231235959) +23:59:57 23:59:58 23:59:59 +# +# MDEV-17634 Regression: TIME(0)=TIME('z') returns NULL vs 1 +# +SELECT +TIMESTAMP(0)=TIMESTAMP('z') AS ts, +DATE(0)=DATE('z') AS d, +TIME(0)=TIME('z') AS t; +ts d t +1 1 1 +Warnings: +Warning 1292 Truncated incorrect datetime value: 'z' +Warning 1292 Truncated incorrect datetime value: 'z' +Warning 1292 Truncated incorrect time value: 'z' +SELECT +TIMESTAMP(0)=TIMESTAMP('') AS ts, +DATE(0)=DATE('') AS d, +TIME(0)=TIME('') AS t; +ts d t +1 1 1 +Warnings: +Warning 1292 Truncated incorrect datetime value: '' +Warning 1292 Truncated incorrect datetime value: '' +Warning 1292 Truncated incorrect time value: '' +# +# MDEV-17563 Different results using table or view when comparing values of time type +# +CREATE TABLE t1 (pk int, x1 time, x2 varchar(1)); +INSERT INTO t1 VALUES (17,'09:16:37','k'),(70,'19:44:22','k'); +CREATE VIEW v1 AS SELECT * FROM t1; +SELECT pk FROM t1 WHERE x1 >x2; +pk +17 +70 +Warnings: +Warning 1292 Truncated incorrect time value: 'k' +Warning 1292 Truncated incorrect time value: 'k' +SELECT pk FROM v1 WHERE x1 >x2; +pk +17 +70 +Warnings: +Warning 1292 Truncated incorrect time value: 'k' +Warning 1292 Truncated incorrect time value: 'k' +DROP VIEW v1; +DROP TABLE t1; +CREATE TABLE t1 (pk int, x1 time, x2 varchar(1)); +INSERT INTO t1 VALUES (17,'09:16:37',''),(70,'19:44:22','k'); +CREATE VIEW v1 AS SELECT * FROM t1; +SELECT pk FROM t1 WHERE x1 >x2; +pk +17 +70 +Warnings: +Warning 1292 Truncated incorrect time value: '' +Warning 1292 Truncated incorrect time value: 'k' +SELECT pk FROM v1 WHERE x1 >x2; +pk +17 +70 +Warnings: +Warning 1292 Truncated incorrect time value: '' +Warning 1292 Truncated incorrect time value: 'k' +DROP VIEW IF EXISTS v1; +DROP TABLE IF EXISTS t1; +# +# MDEV-17625 Different warnings when comparing a garbage to DATETIME vs TIME +# +SELECT TIMESTAMP(0)='z', DATE(0)='z', TIME(0)='z'; +TIMESTAMP(0)='z' DATE(0)='z' TIME(0)='z' +1 1 1 +Warnings: +Warning 1292 Truncated incorrect datetime value: 'z' +Warning 1292 Truncated incorrect datetime value: 'z' +Warning 1292 Truncated incorrect time value: 'z' +# # End of 10.4 tests # diff --git a/mysql-test/main/type_time.test b/mysql-test/main/type_time.test index f4a1a474046..5e4090f48a4 100644 --- a/mysql-test/main/type_time.test +++ b/mysql-test/main/type_time.test @@ -1340,5 +1340,75 @@ EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(COALESCE(TIME' DROP TABLE t1; --echo # +--echo # MDEV-16971 Assertion `is_valid_value_slow()' failed in Time::adjust_time_range_or_invalidate +--echo # +SET sql_mode=''; +CREATE TABLE t1 (d1 date, t1 time, KEY t1 (t1)); +INSERT INTO t1 VALUES ('1982-12-19','08:16:31'),('1981-04-19','21:52:59'),('1971-06-09','07:15:44'),('2007-08-15','03:55:02'),('1993-06-05','04:17:51'),('2034-07-01','17:31:12'),('1998-08-24','08:09:27'),('1991-01-15','01:14:07'),('2001-02-25','10:41:28'),('1974-06-24','10:21:58'),('1977-04-21','16:38:05'),('1981-12-03','01:24:42'),('1972-06-15','20:19:16'),('1989-08-10','08:53:47'),('2018-05-19','15:06:49'),('1984-01-12','15:56:11'),('2013-01-23','04:16:16'),('2000-06-10','02:06:44'),('1995-01-03','04:51:38'); +CREATE TABLE t2 (d1 date ); +INSERT INTO t2 VALUES ('2018-06-01'),('1979-10-25'),('1974-08-22'),('1980-06-17'); +SELECT * FROM (t1 JOIN t2 ON (t2.d1 = t1.t1)) WHERE (t1.d1 > 70 ); +UPDATE (t1 JOIN t2 ON (t2.d1 = t1.t1)) SET t1.d1 = '2018-07-07' WHERE (t1.d1 > 70 ); +DROP TABLE t1,t2; + +--echo # +--echo # MDEV-17219 Assertion `!t->fraction_remainder(decimals())' failed in Field_time::store_TIME_with_warning +--echo # +SET optimizer_use_condition_selectivity=3; +CREATE TABLE t1 (it TIME NOT NULL); +INSERT INTO t1 VALUES ('07:25:13'),('05:15:55'),('09:58:01'),('04:23:57'),('19:37:28'),('01:38:05'),('20:50:52'); +SELECT 1 FROM t1 WHERE it < -7487797330456870912; +DROP TABLE t1; +SET optimizer_use_condition_selectivity=DEFAULT; + +--echo # +--echo # MDEV-17417 TIME(99991231235959) returns 838:59:59 instead of 23:59:58 +--echo # +SELECT TIME(99991231235957), TIME(99991231235958), TIME(99991231235959); + +--echo # +--echo # MDEV-17634 Regression: TIME(0)=TIME('z') returns NULL vs 1 +--echo # +SELECT + TIMESTAMP(0)=TIMESTAMP('z') AS ts, + DATE(0)=DATE('z') AS d, + TIME(0)=TIME('z') AS t; + +SELECT + TIMESTAMP(0)=TIMESTAMP('') AS ts, + DATE(0)=DATE('') AS d, + TIME(0)=TIME('') AS t; + + +--echo # +--echo # MDEV-17563 Different results using table or view when comparing values of time type +--echo # + +CREATE TABLE t1 (pk int, x1 time, x2 varchar(1)); +INSERT INTO t1 VALUES (17,'09:16:37','k'),(70,'19:44:22','k'); +CREATE VIEW v1 AS SELECT * FROM t1; +SELECT pk FROM t1 WHERE x1 >x2; +SELECT pk FROM v1 WHERE x1 >x2; +DROP VIEW v1; +DROP TABLE t1; + + +CREATE TABLE t1 (pk int, x1 time, x2 varchar(1)); +INSERT INTO t1 VALUES (17,'09:16:37',''),(70,'19:44:22','k'); +CREATE VIEW v1 AS SELECT * FROM t1; +SELECT pk FROM t1 WHERE x1 >x2; +SELECT pk FROM v1 WHERE x1 >x2; +DROP VIEW IF EXISTS v1; +DROP TABLE IF EXISTS t1; + + +--echo # +--echo # MDEV-17625 Different warnings when comparing a garbage to DATETIME vs TIME +--echo # + +SELECT TIMESTAMP(0)='z', DATE(0)='z', TIME(0)='z'; + + +--echo # --echo # End of 10.4 tests --echo # diff --git a/mysql-test/main/type_timestamp.result b/mysql-test/main/type_timestamp.result index 6fcc802b91a..a708ef5ec34 100644 --- a/mysql-test/main/type_timestamp.result +++ b/mysql-test/main/type_timestamp.result @@ -872,7 +872,7 @@ SELECT * FROM t1 WHERE LENGTH(a)=30+RAND() AND a=' garbage '; 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 Using where Warnings: -Warning 1292 Incorrect datetime value: ' garbage ' +Warning 1292 Truncated incorrect datetime value: ' garbage ' Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = TIMESTAMP'0000-00-00 00:00:00' and <cache>(octet_length(TIMESTAMP'0000-00-00 00:00:00')) = 30 + rand() DROP TABLE t1; CREATE TABLE t1 (a TIMESTAMP);; @@ -1018,3 +1018,20 @@ DROP TABLE t1; # # End of 10.3 tests # +# +# Start of 10.4 tests +# +# +# MDEV-17216 Assertion `!dt->fraction_remainder(decimals())' failed in Field_temporal_with_date::store_TIME_with_warning +# +CREATE TABLE t1 (b BIT(20)); +CREATE TABLE t2 (t TIMESTAMP); +INSERT IGNORE INTO t1 VALUES (b'000001001100000'); +INSERT INTO t2 SELECT * FROM t1; +DROP TABLE t1, t2; +CREATE TABLE t1 (a TIMESTAMP); +INSERT INTO t1 SELECT CAST(20010101 AS UNSIGNED); +DROP TABLE t1; +# +# End of 10.4 tests +# diff --git a/mysql-test/main/type_timestamp.test b/mysql-test/main/type_timestamp.test index 6d81a86331a..eeb6e2f8213 100644 --- a/mysql-test/main/type_timestamp.test +++ b/mysql-test/main/type_timestamp.test @@ -606,3 +606,25 @@ DROP TABLE t1; --echo # --echo # End of 10.3 tests --echo # + +--echo # +--echo # Start of 10.4 tests +--echo # + +--echo # +--echo # MDEV-17216 Assertion `!dt->fraction_remainder(decimals())' failed in Field_temporal_with_date::store_TIME_with_warning +--echo # + +CREATE TABLE t1 (b BIT(20)); +CREATE TABLE t2 (t TIMESTAMP); +INSERT IGNORE INTO t1 VALUES (b'000001001100000'); +INSERT INTO t2 SELECT * FROM t1; +DROP TABLE t1, t2; + +CREATE TABLE t1 (a TIMESTAMP); +INSERT INTO t1 SELECT CAST(20010101 AS UNSIGNED); +DROP TABLE t1; + +--echo # +--echo # End of 10.4 tests +--echo # diff --git a/mysql-test/main/type_year.result b/mysql-test/main/type_year.result index 3fdca099a94..3f589f38267 100644 --- a/mysql-test/main/type_year.result +++ b/mysql-test/main/type_year.result @@ -396,7 +396,14 @@ a drop table t1; drop function y2k; # -# Start of 10.1 tests +# MDEV-17257 Server crashes in Item::field_type_for_temporal_comparison or in get_datetime_value on SELECT with YEAR field and IN +# +CREATE TABLE t1 (y YEAR); +SELECT * FROM t1 WHERE y IN ( CAST( '1993-03-26 10:14:20' AS DATE ), NULL ); +y +DROP TABLE t1; +# +# End of 10.0 tests # # # MDEV-8741 Equal field propagation leaves some remainders after simplifying WHERE zerofill_column=2010 AND zerofill_column>=2010 @@ -554,5 +561,20 @@ MIN(a) MAX(a) 70 69 DROP TABLE t1; # +# MDEV-17015 Assertion `m_year <= 9999' failed in Year::Year upon bad argument to MAKEDATE +# +SELECT MAKEDATE(18446744073709551615, 1); +MAKEDATE(18446744073709551615, 1) +NULL +# +# MDEV-17607 DATE(COALESCE(year_column)) returns a wrong result +# +CREATE TABLE t1 (a YEAR); +INSERT INTO t1 VALUES (NULL); +SELECT COALESCE(a), DATE(COALESCE(a)) FROM t1; +COALESCE(a) DATE(COALESCE(a)) +NULL NULL +DROP TABLE t1; +# # End of 10.4 tests # diff --git a/mysql-test/main/type_year.test b/mysql-test/main/type_year.test index 657940a62a8..ea7514898cd 100644 --- a/mysql-test/main/type_year.test +++ b/mysql-test/main/type_year.test @@ -187,9 +187,16 @@ select a from t1 where a=b; # not a constant drop table t1; drop function y2k; +--echo # +--echo # MDEV-17257 Server crashes in Item::field_type_for_temporal_comparison or in get_datetime_value on SELECT with YEAR field and IN +--echo # + +CREATE TABLE t1 (y YEAR); +SELECT * FROM t1 WHERE y IN ( CAST( '1993-03-26 10:14:20' AS DATE ), NULL ); +DROP TABLE t1; --echo # ---echo # Start of 10.1 tests +--echo # End of 10.0 tests --echo # --echo # @@ -294,6 +301,19 @@ SELECT a, CAST(a AS DATE), CAST(COALESCE(a) AS DATE) FROM t1; SELECT MIN(a), MAX(a) FROM t1; DROP TABLE t1; +--echo # +--echo # MDEV-17015 Assertion `m_year <= 9999' failed in Year::Year upon bad argument to MAKEDATE +--echo # +SELECT MAKEDATE(18446744073709551615, 1); + +--echo # +--echo # MDEV-17607 DATE(COALESCE(year_column)) returns a wrong result +--echo # + +CREATE TABLE t1 (a YEAR); +INSERT INTO t1 VALUES (NULL); +SELECT COALESCE(a), DATE(COALESCE(a)) FROM t1; +DROP TABLE t1; --echo # --echo # End of 10.4 tests diff --git a/mysql-test/main/union.result b/mysql-test/main/union.result index fe80f67045c..0c6ddd3675a 100644 --- a/mysql-test/main/union.result +++ b/mysql-test/main/union.result @@ -2149,6 +2149,22 @@ DROP VIEW v1; UNION (SELECT 2, 2); ERROR 42S02: Table 'test.v1' doesn't exist +# +# Bug#27197235 USER VARIABLE + UINON + DECIMAL COLUMN RETURNS +# WRONG VALUES +# +SET NAMES utf8; +SET @advertAcctId = 1000003; +select @advertAcctId as a from dual union all select 1.0 from dual; +a +1000003.0 +1.0 +SET NAMES latin1; +SET @advertAcctId = 1000003; +select @advertAcctId as a from dual union all select 1.0 from dual; +a +1000003.0 +1.0 End of 5.5 tests # # WL#1763 Avoid creating temporary table in UNION ALL diff --git a/mysql-test/main/union.test b/mysql-test/main/union.test index d0a8e335d88..ca14731600e 100644 --- a/mysql-test/main/union.test +++ b/mysql-test/main/union.test @@ -1480,6 +1480,21 @@ DROP VIEW v1; UNION (SELECT 2, 2); +--echo # +--echo # Bug#27197235 USER VARIABLE + UINON + DECIMAL COLUMN RETURNS +--echo # WRONG VALUES +--echo # + +let $old_charset= `SELECT @@character_set_client`; + +SET NAMES utf8; +SET @advertAcctId = 1000003; +select @advertAcctId as a from dual union all select 1.0 from dual; + +eval SET NAMES $old_charset; +SET @advertAcctId = 1000003; +select @advertAcctId as a from dual union all select 1.0 from dual; + --echo End of 5.5 tests --echo # diff --git a/mysql-test/main/win.result b/mysql-test/main/win.result index fd0fbefdcc5..2f757756117 100644 --- a/mysql-test/main/win.result +++ b/mysql-test/main/win.result @@ -38,10 +38,10 @@ a row_number() over (partition by a order by b) select a, b, x, row_number() over (partition by a order by x) from t1; a b x row_number() over (partition by a order by x) 2 10 xx 1 -2 10 zz 3 2 20 yy 2 -3 10 xxx 2 +2 10 zz 3 3 20 vvv 1 +3 10 xxx 2 drop table t1; create table t1 (pk int primary key, a int, b int); insert into t1 values @@ -54,13 +54,14 @@ select pk, a, b, row_number() over (order by a), row_number() over (order by b) -from t1; +from t1 +order by b; pk a b row_number() over (order by a) row_number() over (order by b) -1 10 22 1 5 -2 11 21 2 4 -3 12 20 3 3 -4 13 19 4 2 5 14 18 5 1 +4 13 19 4 2 +3 12 20 3 3 +2 11 21 2 4 +1 10 22 1 5 drop table t1; # # Try RANK() function @@ -228,16 +229,16 @@ count(*) over (partition by c order by pk desc rows between 2 preceding and 2 following) as CNT from t1; pk c CNT -1 1 3 -2 1 4 -3 1 4 4 1 3 -5 2 3 -6 2 4 -7 2 5 -8 2 5 -9 2 4 +3 1 4 +2 1 4 +1 1 3 10 2 3 +9 2 4 +8 2 5 +7 2 5 +6 2 4 +5 2 3 drop table t0,t1; # # Resolution of window names @@ -535,42 +536,40 @@ insert into t3 values (5, 2), (6, 2); select -pk, val, count(val) over (order by val range between current row and current row) as CNT from t3; -pk val CNT -0 1 3 -1 1 3 -2 1 3 -3 2 4 -4 2 4 -5 2 4 -6 2 4 +val CNT +1 3 +1 3 +1 3 +2 4 +2 4 +2 4 +2 4 insert into t3 values (7, 3), (8, 3); select -pk, val, count(val) over (order by val range between current row and current row) as CNT from t3; -pk val CNT -0 1 3 -1 1 3 -2 1 3 -3 2 4 -4 2 4 -5 2 4 -6 2 4 -7 3 2 -8 3 2 +val CNT +1 3 +1 3 +1 3 +2 4 +2 4 +2 4 +2 4 +3 2 +3 2 drop table t3; # Now, check with PARTITION BY create table t4 ( @@ -599,7 +598,6 @@ insert into t4 values (5678, 208, 3); select part_id, -pk, val, count(val) over (partition by part_id order by val @@ -607,31 +605,30 @@ range between current row and current row) as CNT from t4; -part_id pk val CNT -1234 100 1 3 -1234 101 1 3 -1234 102 1 3 -1234 103 2 4 -1234 104 2 4 -1234 105 2 4 -1234 106 2 4 -1234 107 3 2 -1234 108 3 2 -5678 200 1 3 -5678 201 1 3 -5678 202 1 3 -5678 203 2 4 -5678 204 2 4 -5678 205 2 4 -5678 206 2 4 -5678 207 3 2 -5678 208 3 2 +part_id val CNT +1234 1 3 +1234 1 3 +1234 1 3 +1234 2 4 +1234 2 4 +1234 2 4 +1234 2 4 +1234 3 2 +1234 3 2 +5678 1 3 +5678 1 3 +5678 1 3 +5678 2 4 +5678 2 4 +5678 2 4 +5678 2 4 +5678 3 2 +5678 3 2 # # Try RANGE UNBOUNDED PRECEDING | FOLLOWING # select part_id, -pk, val, count(val) over (partition by part_id order by val @@ -639,28 +636,27 @@ range between unbounded preceding and current row) as CNT from t4; -part_id pk val CNT -1234 100 1 3 -1234 101 1 3 -1234 102 1 3 -1234 103 2 7 -1234 104 2 7 -1234 105 2 7 -1234 106 2 7 -1234 107 3 9 -1234 108 3 9 -5678 200 1 3 -5678 201 1 3 -5678 202 1 3 -5678 203 2 7 -5678 204 2 7 -5678 205 2 7 -5678 206 2 7 -5678 207 3 9 -5678 208 3 9 +part_id val CNT +1234 1 3 +1234 1 3 +1234 1 3 +1234 2 7 +1234 2 7 +1234 2 7 +1234 2 7 +1234 3 9 +1234 3 9 +5678 1 3 +5678 1 3 +5678 1 3 +5678 2 7 +5678 2 7 +5678 2 7 +5678 2 7 +5678 3 9 +5678 3 9 select part_id, -pk, val, count(val) over (partition by part_id order by val @@ -668,28 +664,27 @@ range between current row and unbounded following) as CNT from t4; -part_id pk val CNT -1234 100 1 9 -1234 101 1 9 -1234 102 1 9 -1234 103 2 6 -1234 104 2 6 -1234 105 2 6 -1234 106 2 6 -1234 107 3 2 -1234 108 3 2 -5678 200 1 9 -5678 201 1 9 -5678 202 1 9 -5678 203 2 6 -5678 204 2 6 -5678 205 2 6 -5678 206 2 6 -5678 207 3 2 -5678 208 3 2 +part_id val CNT +1234 1 9 +1234 1 9 +1234 1 9 +1234 2 6 +1234 2 6 +1234 2 6 +1234 2 6 +1234 3 2 +1234 3 2 +5678 1 9 +5678 1 9 +5678 1 9 +5678 2 6 +5678 2 6 +5678 2 6 +5678 2 6 +5678 3 2 +5678 3 2 select part_id, -pk, val, count(val) over (partition by part_id order by val @@ -697,25 +692,25 @@ range between unbounded preceding and unbounded following) as CNT from t4; -part_id pk val CNT -1234 100 1 9 -1234 101 1 9 -1234 102 1 9 -1234 103 2 9 -1234 104 2 9 -1234 105 2 9 -1234 106 2 9 -1234 107 3 9 -1234 108 3 9 -5678 200 1 9 -5678 201 1 9 -5678 202 1 9 -5678 203 2 9 -5678 204 2 9 -5678 205 2 9 -5678 206 2 9 -5678 207 3 9 -5678 208 3 9 +part_id val CNT +1234 1 9 +1234 1 9 +1234 1 9 +1234 2 9 +1234 2 9 +1234 2 9 +1234 2 9 +1234 3 9 +1234 3 9 +5678 1 9 +5678 1 9 +5678 1 9 +5678 2 9 +5678 2 9 +5678 2 9 +5678 2 9 +5678 3 9 +5678 3 9 drop table t4; # # MDEV-9695: Wrong window frame when using RANGE BETWEEN N FOLLOWING AND PRECEDING @@ -881,15 +876,15 @@ RANGE BETWEEN UNBOUNDED PRECEDING AND 10 FOLLOWING) as cnt from t1; pk a cnt -1 1 9 -2 2 9 -3 4 9 -4 8 9 -5 26 5 -6 27 5 -7 40 3 -8 71 2 9 72 2 +8 71 2 +7 40 3 +6 27 5 +5 26 5 +4 8 9 +3 4 9 +2 2 9 +1 1 9 select pk, a, count(a) over (ORDER BY a @@ -929,15 +924,15 @@ RANGE BETWEEN UNBOUNDED PRECEDING AND 10 PRECEDING) as cnt from t1; pk a cnt -1 1 5 -2 2 5 -3 4 5 -4 8 5 -5 26 3 -6 27 3 -7 40 2 -8 71 0 9 72 0 +8 71 0 +7 40 2 +6 27 3 +5 26 3 +4 8 5 +3 4 5 +2 2 5 +1 1 5 select pk, a, count(a) over (ORDER BY a @@ -977,15 +972,15 @@ RANGE BETWEEN 1 PRECEDING AND CURRENT ROW) as cnt from t1; pk a cnt -1 1 2 -2 2 1 -3 4 1 -4 8 1 -5 26 2 -6 27 1 -7 40 1 -8 71 2 9 72 1 +8 71 2 +7 40 1 +6 27 1 +5 26 2 +4 8 1 +3 4 1 +2 2 1 +1 1 2 select pk, a, count(a) over (ORDER BY a @@ -1026,15 +1021,15 @@ range between current row and 1 following) as cnt from t1; pk a cnt -1 1 1 -2 2 2 -3 4 1 -4 8 1 -5 26 1 -6 27 2 -7 40 1 -8 71 1 9 72 2 +8 71 1 +7 40 1 +6 27 2 +5 26 1 +4 8 1 +3 4 1 +2 2 2 +1 1 1 insert into t1 select 22, pk, a from t1; select part_id, pk, a, @@ -1137,7 +1132,8 @@ pk, a, count(b) over (order by a range between 2 preceding and 2 following) as CNT -from t1; +from t1 +order by a, pk; pk a CNT 1 NULL 3 2 NULL 3 @@ -1969,12 +1965,12 @@ ROW_NUMBER() OVER (order by s1), CUME_DIST() OVER (order by -s1) from t1; s1 s2 ROW_NUMBER() OVER (order by s1) CUME_DIST() OVER (order by -s1) +-1 2 1.0000000000 1 a 3 0.8333333333 -NULL NULL 1 0.1666666667 +2 b 4 0.6666666667 3 NULL 5 0.5000000000 4 a 6 0.3333333333 -2 b 4 0.6666666667 --1 2 1.0000000000 +NULL NULL 1 0.1666666667 drop table t1; # # MDEV-9925: Wrong result with aggregate function as a window function @@ -2012,8 +2008,8 @@ o_custkey avg(o_custkey) OVER (PARTITION BY abs(o_custkey) ORDER BY o_custkey RANGE BETWEEN 15 FOLLOWING AND 15 FOLLOWING) -242 NULL 238 NULL +242 NULL DROP table orders; # # MDEV-10842: window functions with the same order column @@ -2042,20 +2038,20 @@ row_number() over (order by pk desc) as r_desc, row_number() over (order by pk asc) as r_asc from t1; pk r_desc r_asc -1 11 1 -2 10 2 -3 9 3 -4 8 4 -5 7 5 -6 6 6 -7 5 7 -8 4 8 -9 3 9 -10 2 10 11 1 11 +10 2 10 +9 3 9 +8 4 8 +7 5 7 +6 6 6 +5 7 5 +4 8 4 +3 9 3 +2 10 2 +1 11 1 drop table t1; # -# MDEV-10874: two window functions with ccompatible sorting +# MDEV-10874: two window functions with compatible sorting # create table t1 ( pk int primary key, @@ -2130,17 +2126,17 @@ sum(d) over (order by a ROWS BETWEEN 1 preceding and 2 following) as sum_2 from t1; pk a d sum_1 sum_2 -1 0 0.100 0.300 1.400 -2 0 0.200 0.500 1.200 3 0 0.300 0.300 0.600 -4 1 0.400 0.900 2.600 -5 1 0.500 1.100 2.400 +2 0 0.200 0.500 1.200 +1 0 0.100 0.300 1.400 6 1 0.600 0.600 1.600 -7 2 0.500 0.500 0.500 -8 2 NULL 0.700 1.200 -9 2 0.700 1.500 2.000 -10 2 0.800 1.700 2.400 +5 1 0.500 1.100 2.400 +4 1 0.400 0.900 2.600 11 2 0.900 0.900 2.800 +10 2 0.800 1.700 2.400 +9 2 0.700 1.500 2.000 +8 2 NULL 0.700 1.200 +7 2 0.500 0.500 0.500 drop table t1; # # MDEV-9941: two window functions with compatible partitions @@ -2232,9 +2228,9 @@ SELECT sum(t.a) over (partition by t.b order by a), sqrt(ifnull((sum(t.a) over (partition by t.b order by a)), 0)) from t; sum(t.a) over (partition by t.b order by a) sqrt(ifnull((sum(t.a) over (partition by t.b order by a)), 0)) +0.0000000000 0 1.0000000000 1 3.0000000000 1.7320508075688772 -0.0000000000 0 drop table t; # # MDEV-10868: view definitions with window functions @@ -2391,9 +2387,9 @@ 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 +2 SELECT * FROM t1 WHERE i IN ( SELECT COUNT(*) OVER (PARTITION BY c) FROM t2 ); i 1 @@ -2511,14 +2507,14 @@ select id, rank() over (order by id) from t1; id rank() over (order by id) 1 1 2 2 -3 4 2 2 +3 4 select * from v1; id rnk 1 1 2 2 -3 4 2 2 +3 4 drop view v1; drop table t1; # @@ -2879,64 +2875,64 @@ CDEC min(TDEC.CDEC) over () NULL -1 -1 -1 0 -1 -1 -1 0 -1 +1 -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 +1 -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 +1 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 +1 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 +1 -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 +1 -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 +1 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 +1 10 10 10 # # These should be removed once support for them is added. @@ -3219,8 +3215,8 @@ DROP TABLE fv_test, fv_result; # CREATE TABLE t1 (a int); INSERT INTO t1 VALUES (0),(1),(2); -SELECT LEAD(a) OVER (PARTITION BY a) as lead, -a AND LEAD(a) OVER (PARTITION BY a) AS a_and_lead_part +SELECT LEAD(a) OVER (PARTITION BY a ORDER BY a) as lead, +a AND LEAD(a) OVER (PARTITION BY a ORDER BY a) AS a_and_lead_part FROM t1; lead a_and_lead_part NULL 0 @@ -3315,6 +3311,57 @@ COUNT(DISTINCT t2.a2) rank() OVER (ORDER BY t2.b1) 1 3 DROP TABLE t1,t2; # +# MDEV-16990: server crashes in base_list_iterator::next +# +CREATE TABLE t1(i int); +insert into t1 values (1),(2); +SELECT DISTINCT row_number() OVER (), MAX(1) FROM t1; +row_number() OVER () MAX(1) +1 1 +SELECT DISTINCT BIT_AND(0) OVER (), MAX(1) FROM t1; +BIT_AND(0) OVER () MAX(1) +0 1 +drop table t1; +# +# MDEV-17525: Window functions not working in ONLY_FULL_GROUP_BY mode +# +CREATE TABLE t1 (name CHAR(10), test CHAR(10), score TINYINT); +INSERT INTO t1 VALUES +('Chun', 'SQL', 75), ('Chun', 'Tuning', 73), +('Esben', 'SQL', 43), ('Esben', 'Tuning', 31), +('Kaolin', 'SQL', 56), ('Kaolin', 'Tuning', 88), +('Tatiana', 'SQL', 87), ('Tatiana', 'Tuning', 83); +SET @save_sql_mode= @@sql_mode; +SET sql_mode = 'ONLY_FULL_GROUP_BY'; +SELECT name, test, score, +AVG(score) OVER (PARTITION BY test) AS average_by_test +FROM t1 +ORDER BY test, name; +name test score average_by_test +Chun SQL 75 65.2500 +Esben SQL 43 65.2500 +Kaolin SQL 56 65.2500 +Tatiana SQL 87 65.2500 +Chun Tuning 73 68.7500 +Esben Tuning 31 68.7500 +Kaolin Tuning 88 68.7500 +Tatiana Tuning 83 68.7500 +set @@sql_mode= @save_sql_mode; +SELECT name, test, score, +AVG(score) OVER (PARTITION BY test) AS average_by_test +FROM t1 +ORDER BY test, name; +name test score average_by_test +Chun SQL 75 65.2500 +Esben SQL 43 65.2500 +Kaolin SQL 56 65.2500 +Tatiana SQL 87 65.2500 +Chun Tuning 73 68.7500 +Esben Tuning 31 68.7500 +Kaolin Tuning 88 68.7500 +Tatiana Tuning 83 68.7500 +drop table t1; +# # Start of 10.3 tests # # diff --git a/mysql-test/main/win.test b/mysql-test/main/win.test index cc16595fcd4..cd340a17a0d 100644 --- a/mysql-test/main/win.test +++ b/mysql-test/main/win.test @@ -58,7 +58,8 @@ select pk, a, b, row_number() over (order by a), row_number() over (order by b) -from t1; +from t1 +order by b; drop table t1; @@ -391,7 +392,6 @@ insert into t3 values (6, 2); select - pk, val, count(val) over (order by val range between current row and @@ -404,7 +404,6 @@ insert into t3 values (8, 3); select - pk, val, count(val) over (order by val range between current row and @@ -444,7 +443,6 @@ insert into t4 values select part_id, - pk, val, count(val) over (partition by part_id order by val @@ -458,7 +456,6 @@ from t4; --echo # select part_id, - pk, val, count(val) over (partition by part_id order by val @@ -469,7 +466,6 @@ from t4; select part_id, - pk, val, count(val) over (partition by part_id order by val @@ -480,7 +476,6 @@ from t4; select part_id, - pk, val, count(val) over (partition by part_id order by val @@ -723,7 +718,8 @@ select count(b) over (order by a range between 2 preceding and 2 following) as CNT -from t1; +from t1 +order by a, pk; drop table t1; --echo # @@ -1023,6 +1019,7 @@ insert into t1 values --echo # Check using counters flush status; +--sorted_result select rank() over (partition by c order by a), rank() over (partition by c order by b) @@ -1030,6 +1027,7 @@ from t1; show status like '%sort%'; flush status; +--sorted_result select rank() over (partition by c order by a), rank() over (partition by c order by a) @@ -1101,6 +1099,7 @@ insert into t1 values (2,2), (3,1); +--sorted_result select a, b, rank() over (order by a), rank() over (order by b), @@ -1192,6 +1191,7 @@ insert into t1 values (4,'a'); insert into t1 values (2,'b'); insert into t1 values (-1,''); +--sorted_result select *, ROW_NUMBER() OVER (order by s1), @@ -1267,7 +1267,7 @@ from t1; drop table t1; --echo # ---echo # MDEV-10874: two window functions with ccompatible sorting +--echo # MDEV-10874: two window functions with compatible sorting --echo # create table t1 ( @@ -2000,8 +2000,8 @@ DROP TABLE fv_test, fv_result; CREATE TABLE t1 (a int); INSERT INTO t1 VALUES (0),(1),(2); -SELECT LEAD(a) OVER (PARTITION BY a) as lead, - a AND LEAD(a) OVER (PARTITION BY a) AS a_and_lead_part +SELECT LEAD(a) OVER (PARTITION BY a ORDER BY a) as lead, + a AND LEAD(a) OVER (PARTITION BY a ORDER BY a) AS a_and_lead_part FROM t1; SELECT a OR LEAD(a) OVER (ORDER BY a) AS a_or_lead_order @@ -2084,6 +2084,43 @@ FROM t2 ,t1 GROUP BY t2.b1 ORDER BY t1.a1; DROP TABLE t1,t2; --echo # +--echo # MDEV-16990: server crashes in base_list_iterator::next +--echo # + +CREATE TABLE t1(i int); +insert into t1 values (1),(2); +SELECT DISTINCT row_number() OVER (), MAX(1) FROM t1; +SELECT DISTINCT BIT_AND(0) OVER (), MAX(1) FROM t1; +drop table t1; + +--echo # +--echo # MDEV-17525: Window functions not working in ONLY_FULL_GROUP_BY mode +--echo # + +CREATE TABLE t1 (name CHAR(10), test CHAR(10), score TINYINT); + +INSERT INTO t1 VALUES +('Chun', 'SQL', 75), ('Chun', 'Tuning', 73), +('Esben', 'SQL', 43), ('Esben', 'Tuning', 31), +('Kaolin', 'SQL', 56), ('Kaolin', 'Tuning', 88), +('Tatiana', 'SQL', 87), ('Tatiana', 'Tuning', 83); + +SET @save_sql_mode= @@sql_mode; +SET sql_mode = 'ONLY_FULL_GROUP_BY'; + +SELECT name, test, score, + AVG(score) OVER (PARTITION BY test) AS average_by_test +FROM t1 +ORDER BY test, name; + +set @@sql_mode= @save_sql_mode; +SELECT name, test, score, + AVG(score) OVER (PARTITION BY test) AS average_by_test +FROM t1 +ORDER BY test, name; +drop table t1; + +--echo # --echo # Start of 10.3 tests --echo # diff --git a/mysql-test/main/win_big.result b/mysql-test/main/win_big.result index 225ecae3224..c8b27b9a1aa 100644 --- a/mysql-test/main/win_big.result +++ b/mysql-test/main/win_big.result @@ -38,10 +38,6 @@ 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 include/diff_tables.inc [t21, t22] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead drop table t21, t22; ################################################################# # Try many cursors @@ -76,10 +72,6 @@ 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 include/diff_tables.inc [t21, t22] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead drop table t21, t22; ################################################################# # Try having cursors pointing at different IO_CACHE pages @@ -113,10 +105,6 @@ 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 include/diff_tables.inc [t21, t22] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead drop table t21, t22; ################################################################# drop table t10; diff --git a/mysql-test/main/win_first_last_value.result b/mysql-test/main/win_first_last_value.result index 9de394ef9e0..4c3aa6a7161 100644 --- a/mysql-test/main/win_first_last_value.result +++ b/mysql-test/main/win_first_last_value.result @@ -68,17 +68,17 @@ first_value(pk) over (order by pk desc), last_value(pk) over (order by pk desc) from t1; pk first_value(pk) over (order by pk desc) last_value(pk) over (order by pk desc) -1 11 1 -2 11 2 -3 11 3 -4 11 4 -5 11 5 -6 11 6 -7 11 7 -8 11 8 -9 11 9 -10 11 10 11 11 11 +10 11 10 +9 11 9 +8 11 8 +7 11 7 +6 11 6 +5 11 5 +4 11 4 +3 11 3 +2 11 2 +1 11 1 select pk, a, b, c, d, e, first_value(b) over (partition by a order by pk) as fst_b, last_value(b) over (partition by a order by pk) as lst_b, diff --git a/mysql-test/main/win_lead_lag.result b/mysql-test/main/win_lead_lag.result index 5ead58fa11a..f3c0b8f7ef2 100644 --- a/mysql-test/main/win_lead_lag.result +++ b/mysql-test/main/win_lead_lag.result @@ -226,4 +226,15 @@ pk a b a+b lag(a + b) over (partition by a order by pk) + pk 9 2 2 4 12 10 2 0 2 14 11 2 10 12 13 +# +# MDEV-15204 - LAG function doesn't require ORDER BY in OVER clause +# +select pk, +lag(pk, 1) over () +from t1; +ERROR HY000: No order list in window specification for 'lag' +select pk, +lead(pk, 1) over () +from t1; +ERROR HY000: No order list in window specification for 'lead' drop table t1; diff --git a/mysql-test/main/win_lead_lag.test b/mysql-test/main/win_lead_lag.test index 2824f83789c..d154244ecd0 100644 --- a/mysql-test/main/win_lead_lag.test +++ b/mysql-test/main/win_lead_lag.test @@ -107,4 +107,17 @@ select pk, a, b, a+b, from t1 order by pk asc; +--echo # +--echo # MDEV-15204 - LAG function doesn't require ORDER BY in OVER clause +--echo # +--error ER_NO_ORDER_LIST_IN_WINDOW_SPEC +select pk, + lag(pk, 1) over () +from t1; + +--error ER_NO_ORDER_LIST_IN_WINDOW_SPEC +select pk, + lead(pk, 1) over () +from t1; + drop table t1; diff --git a/mysql-test/main/win_percent_cume.result b/mysql-test/main/win_percent_cume.result index d38c95c9ea7..bc2a4182e30 100644 --- a/mysql-test/main/win_percent_cume.result +++ b/mysql-test/main/win_percent_cume.result @@ -14,49 +14,49 @@ insert into t1 values ( 7 , 2, 20), ( 9 , 4, 20), (10 , 4, 20); -select pk, a, b, +select a, percent_rank() over (order by a), cume_dist() over (order by a) from t1; -pk a b percent_rank() over (order by a) cume_dist() over (order by a) -1 0 10 0.0000000000 0.2000000000 -2 0 10 0.0000000000 0.2000000000 -3 1 10 0.2222222222 0.4000000000 -4 1 10 0.2222222222 0.4000000000 -8 2 10 0.4444444444 0.8000000000 -5 2 20 0.4444444444 0.8000000000 -6 2 20 0.4444444444 0.8000000000 -7 2 20 0.4444444444 0.8000000000 -9 4 20 0.8888888889 1.0000000000 -10 4 20 0.8888888889 1.0000000000 -select pk, a, b, +a percent_rank() over (order by a) cume_dist() over (order by a) +0 0.0000000000 0.2000000000 +0 0.0000000000 0.2000000000 +1 0.2222222222 0.4000000000 +1 0.2222222222 0.4000000000 +2 0.4444444444 0.8000000000 +2 0.4444444444 0.8000000000 +2 0.4444444444 0.8000000000 +2 0.4444444444 0.8000000000 +4 0.8888888889 1.0000000000 +4 0.8888888889 1.0000000000 +select pk, percent_rank() over (order by pk), cume_dist() over (order by pk) from t1 order by pk; -pk a b percent_rank() over (order by pk) cume_dist() over (order by pk) -1 0 10 0.0000000000 0.1000000000 -2 0 10 0.1111111111 0.2000000000 -3 1 10 0.2222222222 0.3000000000 -4 1 10 0.3333333333 0.4000000000 -5 2 20 0.4444444444 0.5000000000 -6 2 20 0.5555555556 0.6000000000 -7 2 20 0.6666666667 0.7000000000 -8 2 10 0.7777777778 0.8000000000 -9 4 20 0.8888888889 0.9000000000 -10 4 20 1.0000000000 1.0000000000 -select pk, a, b, +pk percent_rank() over (order by pk) cume_dist() over (order by pk) +1 0.0000000000 0.1000000000 +2 0.1111111111 0.2000000000 +3 0.2222222222 0.3000000000 +4 0.3333333333 0.4000000000 +5 0.4444444444 0.5000000000 +6 0.5555555556 0.6000000000 +7 0.6666666667 0.7000000000 +8 0.7777777778 0.8000000000 +9 0.8888888889 0.9000000000 +10 1.0000000000 1.0000000000 +select a, percent_rank() over (partition by a order by a), cume_dist() over (partition by a order by a) from t1; -pk a b percent_rank() over (partition by a order by a) cume_dist() over (partition by a order by a) -1 0 10 0.0000000000 1.0000000000 -2 0 10 0.0000000000 1.0000000000 -3 1 10 0.0000000000 1.0000000000 -4 1 10 0.0000000000 1.0000000000 -8 2 10 0.0000000000 1.0000000000 -5 2 20 0.0000000000 1.0000000000 -6 2 20 0.0000000000 1.0000000000 -7 2 20 0.0000000000 1.0000000000 -9 4 20 0.0000000000 1.0000000000 -10 4 20 0.0000000000 1.0000000000 +a percent_rank() over (partition by a order by a) cume_dist() over (partition by a order by a) +0 0.0000000000 1.0000000000 +0 0.0000000000 1.0000000000 +1 0.0000000000 1.0000000000 +1 0.0000000000 1.0000000000 +2 0.0000000000 1.0000000000 +2 0.0000000000 1.0000000000 +2 0.0000000000 1.0000000000 +2 0.0000000000 1.0000000000 +4 0.0000000000 1.0000000000 +4 0.0000000000 1.0000000000 drop table t1; diff --git a/mysql-test/main/win_percent_cume.test b/mysql-test/main/win_percent_cume.test index b851185cb32..05ace95d571 100644 --- a/mysql-test/main/win_percent_cume.test +++ b/mysql-test/main/win_percent_cume.test @@ -17,17 +17,17 @@ insert into t1 values ( 9 , 4, 20), (10 , 4, 20); -select pk, a, b, +select a, percent_rank() over (order by a), cume_dist() over (order by a) from t1; -select pk, a, b, +select pk, percent_rank() over (order by pk), cume_dist() over (order by pk) from t1 order by pk; -select pk, a, b, +select a, percent_rank() over (partition by a order by a), cume_dist() over (partition by a order by a) from t1; diff --git a/mysql-test/main/win_percentile.result b/mysql-test/main/win_percentile.result index f46fad80d16..4a918bad17f 100644 --- a/mysql-test/main/win_percentile.result +++ b/mysql-test/main/win_percentile.result @@ -32,8 +32,8 @@ Chun 5.0000000000 Kaolin 4.0000000000 Kaolin 4.0000000000 Kaolin 4.0000000000 -Tatiana 4.0000000000 Tata 4.0000000000 +Tatiana 4.0000000000 select name, percentile_disc(0.5) within group(order by score) over (partition by name) as c from t1; name c Chun 3.0000000000 @@ -41,8 +41,8 @@ Chun 3.0000000000 Kaolin 4.0000000000 Kaolin 4.0000000000 Kaolin 4.0000000000 -Tatiana 4.0000000000 Tata 4.0000000000 +Tatiana 4.0000000000 # no partition clause select name, percentile_disc(0.5) within group(order by score) over () from t1; name percentile_disc(0.5) within group(order by score) over () @@ -51,8 +51,8 @@ Chun 4.0000000000 Kaolin 4.0000000000 Kaolin 4.0000000000 Kaolin 4.0000000000 -Tatiana 4.0000000000 Tata 4.0000000000 +Tatiana 4.0000000000 select name, percentile_cont(0.5) within group(order by score) over () from t1; name percentile_cont(0.5) within group(order by score) over () Chun 4.0000000000 @@ -60,8 +60,8 @@ Chun 4.0000000000 Kaolin 4.0000000000 Kaolin 4.0000000000 Kaolin 4.0000000000 -Tatiana 4.0000000000 Tata 4.0000000000 +Tatiana 4.0000000000 # argument set to null select name, percentile_cont(null) within group(order by score) over (partition by name) from t1; ERROR HY000: percentile_cont function only accepts arguments that can be converted to numerical types @@ -75,8 +75,8 @@ Chun 5.0000000000 Kaolin 4.0000000000 Kaolin 4.0000000000 Kaolin 4.0000000000 -Tatiana 4.0000000000 Tata 4.0000000000 +Tatiana 4.0000000000 select * from ( select name , percentile_disc(0.5) within group ( order by score) over (partition by name ) from t1 ) as t; name percentile_disc(0.5) within group ( order by score) over (partition by name ) Chun 3.0000000000 @@ -84,8 +84,8 @@ Chun 3.0000000000 Kaolin 4.0000000000 Kaolin 4.0000000000 Kaolin 4.0000000000 -Tatiana 4.0000000000 Tata 4.0000000000 +Tatiana 4.0000000000 select name from t1 a where (select percentile_disc(0.5) within group (order by score) over (partition by name) from t1 b limit 1) >= 0.5; name Chun @@ -93,8 +93,8 @@ Chun Kaolin Kaolin Kaolin -Tatiana Tata +Tatiana #disallowed fields in order by select score, percentile_cont(0.5) within group(order by name) over (partition by score) from t1; ERROR HY000: Numeric datatype is required for percentile_cont function @@ -121,10 +121,10 @@ name cume_dist() over (partition by name order by score) c Chun 0.5000000000 3.0000000000 Chun 1.0000000000 3.0000000000 Kaolin 0.3333333333 4.0000000000 -Kaolin 1.0000000000 4.0000000000 Kaolin 0.6666666667 4.0000000000 -Tatiana 1.0000000000 4.0000000000 +Kaolin 1.0000000000 4.0000000000 Tata 1.0000000000 4.0000000000 +Tatiana 1.0000000000 4.0000000000 select name, percentile_cont(0.5) within group(order by score) over (partition by name) as c from t1; name c Chun 5.0000000000 @@ -132,98 +132,98 @@ Chun 5.0000000000 Kaolin 4.0000000000 Kaolin 4.0000000000 Kaolin 4.0000000000 -Tatiana 4.0000000000 Tata 4.0000000000 +Tatiana 4.0000000000 select name,cume_dist() over (partition by name order by score) as b, percentile_disc(0.1) within group(order by score) over (partition by name) as c from t1; name b c Chun 0.5000000000 3.0000000000 Chun 1.0000000000 3.0000000000 Kaolin 0.3333333333 3.0000000000 -Kaolin 1.0000000000 3.0000000000 Kaolin 0.6666666667 3.0000000000 -Tatiana 1.0000000000 4.0000000000 +Kaolin 1.0000000000 3.0000000000 Tata 1.0000000000 4.0000000000 +Tatiana 1.0000000000 4.0000000000 select name,cume_dist() over (partition by name order by score) as b, percentile_disc(0.2) within group(order by score) over (partition by name) as c from t1; name b c Chun 0.5000000000 3.0000000000 Chun 1.0000000000 3.0000000000 Kaolin 0.3333333333 3.0000000000 -Kaolin 1.0000000000 3.0000000000 Kaolin 0.6666666667 3.0000000000 -Tatiana 1.0000000000 4.0000000000 +Kaolin 1.0000000000 3.0000000000 Tata 1.0000000000 4.0000000000 +Tatiana 1.0000000000 4.0000000000 select name,cume_dist() over (partition by name order by score) as b, percentile_disc(0.3) within group(order by score) over (partition by name) as c from t1; name b c Chun 0.5000000000 3.0000000000 Chun 1.0000000000 3.0000000000 Kaolin 0.3333333333 3.0000000000 -Kaolin 1.0000000000 3.0000000000 Kaolin 0.6666666667 3.0000000000 -Tatiana 1.0000000000 4.0000000000 +Kaolin 1.0000000000 3.0000000000 Tata 1.0000000000 4.0000000000 +Tatiana 1.0000000000 4.0000000000 select name,cume_dist() over (partition by name order by score) as b, percentile_disc(0.4) within group(order by score) over (partition by name) as c from t1; name b c Chun 0.5000000000 3.0000000000 Chun 1.0000000000 3.0000000000 Kaolin 0.3333333333 4.0000000000 -Kaolin 1.0000000000 4.0000000000 Kaolin 0.6666666667 4.0000000000 -Tatiana 1.0000000000 4.0000000000 +Kaolin 1.0000000000 4.0000000000 Tata 1.0000000000 4.0000000000 +Tatiana 1.0000000000 4.0000000000 select name,cume_dist() over (partition by name order by score) as b, percentile_disc(0.5) within group(order by score) over (partition by name) as c from t1; name b c Chun 0.5000000000 3.0000000000 Chun 1.0000000000 3.0000000000 Kaolin 0.3333333333 4.0000000000 -Kaolin 1.0000000000 4.0000000000 Kaolin 0.6666666667 4.0000000000 -Tatiana 1.0000000000 4.0000000000 +Kaolin 1.0000000000 4.0000000000 Tata 1.0000000000 4.0000000000 +Tatiana 1.0000000000 4.0000000000 select name,cume_dist() over (partition by name order by score) as b, percentile_disc(0.6) within group(order by score) over (partition by name) as c from t1; name b c Chun 0.5000000000 7.0000000000 Chun 1.0000000000 7.0000000000 Kaolin 0.3333333333 4.0000000000 -Kaolin 1.0000000000 4.0000000000 Kaolin 0.6666666667 4.0000000000 -Tatiana 1.0000000000 4.0000000000 +Kaolin 1.0000000000 4.0000000000 Tata 1.0000000000 4.0000000000 +Tatiana 1.0000000000 4.0000000000 select name,cume_dist() over (partition by name order by score) as b, percentile_disc(0.7) within group(order by score) over (partition by name) as c from t1; name b c Chun 0.5000000000 7.0000000000 Chun 1.0000000000 7.0000000000 Kaolin 0.3333333333 7.0000000000 -Kaolin 1.0000000000 7.0000000000 Kaolin 0.6666666667 7.0000000000 -Tatiana 1.0000000000 4.0000000000 +Kaolin 1.0000000000 7.0000000000 Tata 1.0000000000 4.0000000000 +Tatiana 1.0000000000 4.0000000000 select name,cume_dist() over (partition by name order by score) as b, percentile_disc(0.8) within group(order by score) over (partition by name) as c from t1; name b c Chun 0.5000000000 7.0000000000 Chun 1.0000000000 7.0000000000 Kaolin 0.3333333333 7.0000000000 -Kaolin 1.0000000000 7.0000000000 Kaolin 0.6666666667 7.0000000000 -Tatiana 1.0000000000 4.0000000000 +Kaolin 1.0000000000 7.0000000000 Tata 1.0000000000 4.0000000000 +Tatiana 1.0000000000 4.0000000000 select name,cume_dist() over (partition by name order by score) as b, percentile_disc(0.9) within group(order by score) over (partition by name) as c from t1; name b c Chun 0.5000000000 7.0000000000 Chun 1.0000000000 7.0000000000 Kaolin 0.3333333333 7.0000000000 -Kaolin 1.0000000000 7.0000000000 Kaolin 0.6666666667 7.0000000000 -Tatiana 1.0000000000 4.0000000000 +Kaolin 1.0000000000 7.0000000000 Tata 1.0000000000 4.0000000000 +Tatiana 1.0000000000 4.0000000000 select name,cume_dist() over (partition by name order by score) as b, percentile_disc(1) within group(order by score) over (partition by name) as c from t1; name b c Chun 0.5000000000 7.0000000000 Chun 1.0000000000 7.0000000000 Kaolin 0.3333333333 7.0000000000 -Kaolin 1.0000000000 7.0000000000 Kaolin 0.6666666667 7.0000000000 -Tatiana 1.0000000000 4.0000000000 +Kaolin 1.0000000000 7.0000000000 Tata 1.0000000000 4.0000000000 +Tatiana 1.0000000000 4.0000000000 select median(score) over (partition by name), percentile_cont(0) within group(order by score) over (partition by name) as c from t1; median(score) over (partition by name) c 5.0000000000 3.0000000000 @@ -348,3 +348,21 @@ MEDIAN(`a2`) OVER (PARTITION BY `pk`) FROM t1; MEDIAN(`a1`) OVER () MEDIAN(`a2`) OVER (PARTITION BY `pk`) DROP TABLE t1; +# +# MDEV-17137: Syntax errors with VIEW using MEDIAN +# +CREATE TABLE t1(val int); +INSERT INTO t1 VALUES (1), (2), (3); +CREATE VIEW v1 AS SELECT MEDIAN(val) OVER() FROM t1; +select * from v1; +MEDIAN(val) OVER() +2.0000000000 +2.0000000000 +2.0000000000 +select median(val) OVER () FROM t1; +median(val) OVER () +2.0000000000 +2.0000000000 +2.0000000000 +drop table t1; +drop view v1; diff --git a/mysql-test/main/win_percentile.test b/mysql-test/main/win_percentile.test index e39af8cfd39..d36b365dd9b 100644 --- a/mysql-test/main/win_percentile.test +++ b/mysql-test/main/win_percentile.test @@ -33,11 +33,15 @@ select percentile_cont() within group() over (partition by name) from t1; --echo # Test simple syntax --echo # +--sorted_result select name, percentile_cont(0.5) within group(order by score) over (partition by name) as c from t1; +--sorted_result select name, percentile_disc(0.5) within group(order by score) over (partition by name) as c from t1; --echo # no partition clause +--sorted_result select name, percentile_disc(0.5) within group(order by score) over () from t1; +--sorted_result select name, percentile_cont(0.5) within group(order by score) over () from t1; --echo # argument set to null @@ -47,8 +51,11 @@ select name, percentile_cont(null) within group(order by score) over (partition select name, percentile_disc(null) within group(order by score) over (partition by name) from t1; --echo #subqueries having percentile functions +--sorted_result select * from ( select name , percentile_cont(0.5) within group ( order by score) over (partition by name ) from t1 ) as t; +--sorted_result select * from ( select name , percentile_disc(0.5) within group ( order by score) over (partition by name ) from t1 ) as t; +--sorted_result select name from t1 a where (select percentile_disc(0.5) within group (order by score) over (partition by name) from t1 b limit 1) >= 0.5; --echo #disallowed fields in order by @@ -127,3 +134,15 @@ SELECT MEDIAN(`a1`) OVER (), MEDIAN(`a2`) OVER (PARTITION BY `pk`) FROM t1; DROP TABLE t1; + +--echo # +--echo # MDEV-17137: Syntax errors with VIEW using MEDIAN +--echo # + +CREATE TABLE t1(val int); +INSERT INTO t1 VALUES (1), (2), (3); +CREATE VIEW v1 AS SELECT MEDIAN(val) OVER() FROM t1; +select * from v1; +select median(val) OVER () FROM t1; +drop table t1; +drop view v1; diff --git a/mysql-test/main/win_rank.result b/mysql-test/main/win_rank.result index 725683d3869..e74c2edd662 100644 --- a/mysql-test/main/win_rank.result +++ b/mysql-test/main/win_rank.result @@ -17,34 +17,34 @@ insert into t1 values ( 7 , 2, 20), ( 9 , 4, 20), (10 , 4, 20); -select pk, a, b, rank() over (order by a) as rank, +select a, rank() over (order by a) as rank, dense_rank() over (order by a) as dense_rank from t1; -pk a b rank dense_rank -1 0 10 1 1 -2 0 10 1 1 -3 1 10 3 2 -4 1 10 3 2 -8 2 10 5 3 -5 2 20 5 3 -6 2 20 5 3 -7 2 20 5 3 -9 4 20 9 4 -10 4 20 9 4 -select pk, a, b, rank() over (partition by b order by a) as rank, +a rank dense_rank +0 1 1 +0 1 1 +1 3 2 +1 3 2 +2 5 3 +2 5 3 +2 5 3 +2 5 3 +4 9 4 +4 9 4 +select a, b, rank() over (partition by b order by a) as rank, dense_rank() over (partition by b order by a) as dense_rank from t1; -pk a b rank dense_rank -1 0 10 1 1 -2 0 10 1 1 -3 1 10 3 2 -4 1 10 3 2 -8 2 10 5 3 -5 2 20 1 1 -6 2 20 1 1 -7 2 20 1 1 -9 4 20 4 2 -10 4 20 4 2 +a b rank dense_rank +0 10 1 1 +0 10 1 1 +1 10 3 2 +1 10 3 2 +2 10 5 3 +2 20 1 1 +2 20 1 1 +2 20 1 1 +4 20 4 2 +4 20 4 2 drop table t1; # # Test with null values in the table. @@ -59,46 +59,49 @@ insert into t2 values (2,'b'); insert into t2 values (-1,''); select *, rank() over (order by s1) as rank, dense_rank() over (order by s1) as dense_rank -from t2; +from t2 +order by s1, s2; s1 s2 rank dense_rank -1 a 5 3 NULL NULL 1 1 -1 NULL 5 3 NULL a 1 1 NULL c 1 1 -2 b 7 4 -1 4 2 +1 NULL 5 3 +1 a 5 3 +2 b 7 4 select *, rank() over (partition by s2 order by s1) as rank, dense_rank() over (partition by s2 order by s1) as dense_rank -from t2; +from t2 +order by s1, s2; s1 s2 rank dense_rank -1 a 2 2 NULL NULL 1 1 -1 NULL 2 2 NULL a 1 1 NULL c 1 1 -2 b 1 1 -1 1 1 +1 NULL 2 2 +1 a 2 2 +2 b 1 1 select *, rank() over (order by s2) as rank, dense_rank() over (order by s2) as dense_rank -from t2; +from t2 +order by s2, s1; s1 s2 rank dense_rank -1 a 4 3 NULL NULL 1 1 1 NULL 1 1 +-1 3 2 NULL a 4 3 -NULL c 7 5 +1 a 4 3 2 b 6 4 --1 3 2 +NULL c 7 5 select *, rank() over (partition by s1 order by s2) as rank, dense_rank() over (partition by s1 order by s2) as dense_rank from t2; s1 s2 rank dense_rank -1 a 2 2 NULL NULL 1 1 -1 NULL 1 1 NULL a 2 2 NULL c 3 3 -2 b 1 1 -1 1 1 +1 NULL 1 1 +1 a 2 2 +2 b 1 1 drop table t2; diff --git a/mysql-test/main/win_rank.test b/mysql-test/main/win_rank.test index eda1f458205..c58ff054117 100644 --- a/mysql-test/main/win_rank.test +++ b/mysql-test/main/win_rank.test @@ -20,11 +20,11 @@ insert into t1 values ( 9 , 4, 20), (10 , 4, 20); -select pk, a, b, rank() over (order by a) as rank, - dense_rank() over (order by a) as dense_rank +select a, rank() over (order by a) as rank, + dense_rank() over (order by a) as dense_rank from t1; -select pk, a, b, rank() over (partition by b order by a) as rank, - dense_rank() over (partition by b order by a) as dense_rank +select a, b, rank() over (partition by b order by a) as rank, + dense_rank() over (partition by b order by a) as dense_rank from t1; drop table t1; @@ -44,13 +44,16 @@ insert into t2 values (-1,''); select *, rank() over (order by s1) as rank, dense_rank() over (order by s1) as dense_rank -from t2; +from t2 +order by s1, s2; select *, rank() over (partition by s2 order by s1) as rank, dense_rank() over (partition by s2 order by s1) as dense_rank -from t2; +from t2 +order by s1, s2; select *, rank() over (order by s2) as rank, dense_rank() over (order by s2) as dense_rank -from t2; +from t2 +order by s2, s1; select *, rank() over (partition by s1 order by s2) as rank, dense_rank() over (partition by s1 order by s2) as dense_rank from t2; diff --git a/mysql-test/main/win_std.test b/mysql-test/main/win_std.test index 5ed999431c0..c1964ecac98 100644 --- a/mysql-test/main/win_std.test +++ b/mysql-test/main/win_std.test @@ -80,9 +80,11 @@ select std(b) over (order by a rows between current row and 0 following) from t2; --echo # Only peers frame. +--sorted_result select a, b, std(b) over (order by a range between 0 preceding and 0 preceding) from t2; +--sorted_result select a, b, std(b) over (order by a range between 0 preceding and current row) from t2; @@ -90,9 +92,11 @@ from t2; select a, b, std(b) over (order by a range between current row and 0 preceding) from t2; +--sorted_result select a, b, std(b) over (order by a range between current row and 0 following) from t2; +--sorted_result select a, b, std(b) over (order by a range between 0 following and 0 following) from t2; diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 02a35e85d4b..361724e5c57 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -25,7 +25,7 @@ # Tool used for executing a suite of .test files # # See the "MySQL Test framework manual" for more information -# http://dev.mysql.com/doc/mysqltest/en/index.html +# https://mariadb.com/kb/en/library/mysqltest/ # # ############################################################################## @@ -1456,7 +1456,7 @@ sub command_line_setup { foreach my $fs (@tmpfs_locations) { - if ( -d $fs && ! -l $fs ) + if ( -d $fs && ! -l $fs && -w $fs ) { my $template= "var_${opt_build_thread}_XXXX"; $opt_mem= tempdir( $template, DIR => $fs, CLEANUP => 0); @@ -3240,8 +3240,8 @@ sub mysql_install_db { $bootstrap_sql_file); # mysql.gtid_slave_pos was created in InnoDB, but many tests - # run without InnoDB. Alter it to MyISAM now - mtr_tofile($bootstrap_sql_file, "ALTER TABLE gtid_slave_pos ENGINE=MyISAM;\n"); + # run without InnoDB. Alter it to Aria now + mtr_tofile($bootstrap_sql_file, "ALTER TABLE gtid_slave_pos ENGINE=Aria transactional=0;\n"); } else { @@ -4006,14 +4006,14 @@ sub run_testcase ($$) { } my $test= $tinfo->{suite}->start_test($tinfo); - # Set only when we have to keep waiting after expectedly died server - my $keep_waiting_proc = 0; + # Set to a list of processes we have to keep waiting (expectedly died servers) + my %keep_waiting_proc = (); my $print_timeout= start_timer($print_freq * 60); while (1) { my $proc; - if ($keep_waiting_proc) + if (%keep_waiting_proc) { # Any other process exited? $proc = My::SafeProcess->check_any(); @@ -4023,48 +4023,34 @@ sub run_testcase ($$) { } else { - $proc = $keep_waiting_proc; # Also check if timer has expired, if so cancel waiting if ( has_expired($test_timeout) ) { - $keep_waiting_proc = 0; + %keep_waiting_proc = (); } } } - if (! $keep_waiting_proc) + if (!%keep_waiting_proc && !$proc) { - if($test_timeout > $print_timeout) + if ($test_timeout > $print_timeout) { - $proc= My::SafeProcess->wait_any_timeout($print_timeout); - if ( $proc->{timeout} ) - { - #print out that the test is still on - mtr_print("Test still running: $tinfo->{name}"); - #reset the timer - $print_timeout= start_timer($print_freq * 60); - next; - } + $proc= My::SafeProcess->wait_any_timeout($print_timeout); + if ($proc->{timeout}) + { + #print out that the test is still on + mtr_print("Test still running: $tinfo->{name}"); + #reset the timer + $print_timeout= start_timer($print_freq * 60); + next; + } } else { - $proc= My::SafeProcess->wait_any_timeout($test_timeout); + $proc= My::SafeProcess->wait_any_timeout($test_timeout); } } - # Will be restored if we need to keep waiting - $keep_waiting_proc = 0; - - unless ( defined $proc ) - { - mtr_error("wait_any failed"); - } - mtr_verbose("Got $proc"); - - mark_time_used('test'); - # ---------------------------------------------------- - # Was it the test program that exited - # ---------------------------------------------------- - if ($proc eq $test) + if ($proc and $proc eq $test) # mysqltest itself exited { my $res= $test->exit_status(); @@ -4079,12 +4065,12 @@ sub run_testcase ($$) { if ( $res == 0 ) { - my $check_res; - if ( $opt_check_testcases and - $check_res= check_testcase($tinfo, "after")) - { - if ($check_res == 1) { - # Test case had sideeffects, not fatal error, just continue + my $check_res; + if ( $opt_check_testcases and + $check_res= check_testcase($tinfo, "after")) + { + if ($check_res == 1) { + # Test case had sideeffects, not fatal error, just continue if ($opt_warnings) { # Checking error logs for warnings, so need to stop server # gracefully so that memory leaks etc. can be properly detected. @@ -4095,93 +4081,110 @@ sub run_testcase ($$) { # test. } else { # Not checking warnings, so can do a hard shutdown. - stop_all_servers($opt_shutdown_timeout); + stop_all_servers($opt_shutdown_timeout); } - mtr_report("Resuming tests...\n"); - resfile_output($tinfo->{'check'}) if $opt_resfile; - } - else { - # Test case check failed fatally, probably a server crashed - report_failure_and_restart($tinfo); - return 1; - } - } - mtr_report_test_passed($tinfo); + mtr_report("Resuming tests...\n"); + resfile_output($tinfo->{'check'}) if $opt_resfile; + } + else { + # Test case check failed fatally, probably a server crashed + report_failure_and_restart($tinfo); + return 1; + } + } + mtr_report_test_passed($tinfo); } elsif ( $res == 62 ) { - # Testcase itself tell us to skip this one - $tinfo->{skip_detected_by_test}= 1; - # Try to get reason from test log file - find_testcase_skipped_reason($tinfo); - mtr_report_test_skipped($tinfo); - # Restart if skipped due to missing perl, it may have had side effects - if ( $tinfo->{'comment'} =~ /^perl not found/ ) - { - stop_all_servers($opt_shutdown_timeout); - } + # Testcase itself tell us to skip this one + $tinfo->{skip_detected_by_test}= 1; + # Try to get reason from test log file + find_testcase_skipped_reason($tinfo); + mtr_report_test_skipped($tinfo); + # Restart if skipped due to missing perl, it may have had side effects + if ( $tinfo->{'comment'} =~ /^perl not found/ ) + { + stop_all_servers($opt_shutdown_timeout); + } } elsif ( $res == 65 ) { - # Testprogram killed by signal - $tinfo->{comment}= - "testprogram crashed(returned code $res)"; - report_failure_and_restart($tinfo); + # Testprogram killed by signal + $tinfo->{comment}= + "testprogram crashed(returned code $res)"; + report_failure_and_restart($tinfo); } elsif ( $res == 1 ) { - # Check if the test tool requests that - # an analyze script should be run - my $analyze= find_analyze_request(); - if ($analyze){ - run_on_all($tinfo, "analyze-$analyze"); - } + # Check if the test tool requests that + # an analyze script should be run + my $analyze= find_analyze_request(); + if ($analyze){ + run_on_all($tinfo, "analyze-$analyze"); + } - # Wait a bit and see if a server died, if so report that instead - mtr_milli_sleep(100); - my $srvproc= My::SafeProcess::check_any(); - if ($srvproc && grep($srvproc eq $_, started(all_servers()))) { - $proc= $srvproc; - goto SRVDIED; - } + # Wait a bit and see if a server died, if so report that instead + mtr_milli_sleep(100); + my $srvproc= My::SafeProcess::check_any(); + if ($srvproc && grep($srvproc eq $_, started(all_servers()))) { + $proc= $srvproc; + goto SRVDIED; + } - # Test case failure reported by mysqltest - report_failure_and_restart($tinfo); + # Test case failure reported by mysqltest + report_failure_and_restart($tinfo); } else { - # mysqltest failed, probably crashed - $tinfo->{comment}= - "mysqltest failed with unexpected return code $res\n"; - report_failure_and_restart($tinfo); + # mysqltest failed, probably crashed + $tinfo->{comment}= + "mysqltest failed with unexpected return code $res\n"; + report_failure_and_restart($tinfo); } # Save info from this testcase run to mysqltest.log if( -f $path_current_testlog) { - if ($opt_resfile && $res && $res != 62) { - resfile_output_file($path_current_testlog); - } - mtr_appendfile_to_file($path_current_testlog, $path_testlog); - unlink($path_current_testlog); + if ($opt_resfile && $res && $res != 62) { + resfile_output_file($path_current_testlog); + } + mtr_appendfile_to_file($path_current_testlog, $path_testlog); + unlink($path_current_testlog); } return ($res == 62) ? 0 : $res; - } - # ---------------------------------------------------- - # Check if it was an expected crash - # ---------------------------------------------------- - my $check_crash = check_expected_crash_and_restart($proc); - if ($check_crash) + if ($proc) { - # Keep waiting if it returned 2, if 1 don't wait or stop waiting. - $keep_waiting_proc = 0 if $check_crash == 1; - $keep_waiting_proc = $proc if $check_crash == 2; - next; + # It was not mysqltest that exited, add to a wait-to-be-started-again list. + $keep_waiting_proc{$proc} = 1; + } + + mtr_verbose("Got " . join(",", keys(%keep_waiting_proc))); + + mark_time_used('test'); + foreach my $wait_for_proc (keys(%keep_waiting_proc)) { + # ---------------------------------------------------- + # Check if it was an expected crash + # ---------------------------------------------------- + my $check_crash = check_expected_crash_and_restart($wait_for_proc); + if ($check_crash == 0) # unexpected exit/crash of $wait_for_proc + { + goto SRVDIED; + } + elsif ($check_crash == 1) # $wait_for_proc was started again by check_expected_crash_and_restart() + { + delete $keep_waiting_proc{$wait_for_proc}; + } + elsif ($check_crash == 2) # we must keep waiting + { + # do nothing + } } + next; + SRVDIED: # ---------------------------------------------------- # Stop the test case timer @@ -4478,6 +4481,7 @@ sub extract_warning_lines ($$) { qr|Access denied for user|, qr|Aborted connection|, qr|table.*is full|, + qr|\[ERROR\] mysqld: \Z|, # Warning from Aria recovery qr|Linux Native AIO|, # warning that aio does not work on /dev/shm qr|InnoDB: io_setup\(\) attempt|, qr|InnoDB: io_setup\(\) failed with EAGAIN|, @@ -5691,7 +5695,7 @@ EOF mtr_tofile($gdb_init_file, join("\n", "set args @$$args $input", - split /;/, $opt_gdb + split /;/, $opt_gdb || "" )); } diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm index d0a4b618aaa..23c07958841 100644 --- a/mysql-test/suite.pm +++ b/mysql-test/suite.pm @@ -19,6 +19,9 @@ sub skip_combinations { # don't run tests for the wrong platform $skip{'include/platform.combinations'} = [ (IS_WINDOWS) ? 'unix' : 'win' ]; + $skip{'include/maybe_debug.combinations'} = + [ defined $::mysqld_variables{'debug-dbug'} ? 'release' : 'debug' ]; + # and for the wrong word size # check for exact values, in case the default changes to be small everywhere my $longsysvar= $::mysqld_variables{'max-binlog-stmt-cache-size'}; @@ -29,9 +32,6 @@ sub skip_combinations { die "unknown value max-binlog-stmt-cache-size=$longsysvar" unless $val_map{$longsysvar}; $skip{'include/word_size.combinations'} = [ $val_map{$longsysvar} ]; - $skip{'include/maybe_debug.combinations'} = - [ defined $::mysqld_variables{'debug-dbug'} ? 'release' : 'debug' ]; - # as a special case, disable certain include files as a whole $skip{'include/not_embedded.inc'} = 'Not run for embedded server' if $::opt_embedded_server; diff --git a/mysql-test/suite/binlog/include/binlog.test b/mysql-test/suite/binlog/include/binlog.test index 92fcb3a792b..40befc9d3d1 100644 --- a/mysql-test/suite/binlog/include/binlog.test +++ b/mysql-test/suite/binlog/include/binlog.test @@ -5,7 +5,6 @@ -- source include/have_log_bin.inc -- source include/not_embedded.inc -- source include/have_innodb.inc --- source include/have_debug.inc --disable_warnings drop table if exists t1, t2; diff --git a/mysql-test/suite/binlog/include/check_binlog_size.inc b/mysql-test/suite/binlog/include/check_binlog_size.inc new file mode 100644 index 00000000000..9df161ec843 --- /dev/null +++ b/mysql-test/suite/binlog/include/check_binlog_size.inc @@ -0,0 +1,31 @@ +# This file runs the query and checks +# whether the size of binlog is increased or not +# If size is changed it issue die command +# Parameters +# $sql_query = query to run + +#Only last row of show binlog events matter +--let $tmp= 0 +--let $counter= 1 +while ($tmp != "No such row") +{ + --let $initial_binlog_size= $tmp + --let $tmp= query_get_value(show binary logs, File_size, $counter) + --inc $counter +} + +--eval $sql_query + +--let $tmp= 0 +--let $counter= 1 +while ($tmp != "No such row") +{ + --let $current_binlog_size= $tmp + --let $tmp= query_get_value(show binary logs, File_size, $counter) + --inc $counter +} + +if ($initial_binlog_size != $current_binlog_size) +{ + die "Binlog size changed"; +} diff --git a/mysql-test/suite/binlog/r/binlog_flush_binlogs_delete_domain.result b/mysql-test/suite/binlog/r/binlog_flush_binlogs_delete_domain.result index 99f2a57835f..fdcfb4bfa01 100644 --- a/mysql-test/suite/binlog/r/binlog_flush_binlogs_delete_domain.result +++ b/mysql-test/suite/binlog/r/binlog_flush_binlogs_delete_domain.result @@ -17,6 +17,12 @@ master-bin.000002 # SET @@SESSION.gtid_domain_id=1; SET @@SESSION.server_id=1; CREATE TABLE t (a int); +SELECT @@GLOBAL.gtid_binlog_state, @@GLOBAL.gtid_binlog_pos; +@@GLOBAL.gtid_binlog_state @@GLOBAL.gtid_binlog_pos +1-1-1 1-1-1 +include/show_binlog_events.inc +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Rotate # # master-bin.000002;pos=POS FLUSH BINARY LOGS DELETE_DOMAIN_ID = (1); ERROR HY000: Could not delete gtid domain. Reason: binlog files may contain gtids from the domain ('1') being deleted. Make sure to first purge those files. FLUSH BINARY LOGS; @@ -74,5 +80,11 @@ the following command succeeds with warnings FLUSH BINARY LOGS DELETE_DOMAIN_ID = (1); Warnings: Warning 1076 The current gtid binlog state is incompatible with a former one having a gtid '11-11-1' which is less than the '11-11-11' of the gtid list describing an earlier state. The state may have been affected by manually injecting a lower sequence number gtid or via replication. +RESET MASTER; +FLUSH BINARY LOGS DELETE_DOMAIN_ID = (4294967296); +ERROR HY000: The value of gtid domain being deleted ('4294967296') exceeds its maximum size of 32 bit unsigned integer +FLUSH BINARY LOGS DELETE_DOMAIN_ID = (4294967295); +Warnings: +Warning 1076 The gtid domain being deleted ('4294967295') is not in the current binlog state DROP TABLE t; RESET MASTER; diff --git a/mysql-test/suite/binlog/r/binlog_tmp_table_row.result b/mysql-test/suite/binlog/r/binlog_tmp_table_row.result new file mode 100644 index 00000000000..71bd75d89cb --- /dev/null +++ b/mysql-test/suite/binlog/r/binlog_tmp_table_row.result @@ -0,0 +1,7 @@ +RESET MASTER; +#Create table test +create temporary table t1(a int, b int); +#Add index test +create index index_a on t1(a); +#drop index test +drop index index_a on t1; diff --git a/mysql-test/suite/binlog/t/binlog_flush_binlogs_delete_domain.test b/mysql-test/suite/binlog/t/binlog_flush_binlogs_delete_domain.test index 0faafa35a1b..8311f4bd800 100644 --- a/mysql-test/suite/binlog/t/binlog_flush_binlogs_delete_domain.test +++ b/mysql-test/suite/binlog/t/binlog_flush_binlogs_delete_domain.test @@ -28,6 +28,9 @@ FLUSH BINARY LOGS DELETE_DOMAIN_ID = (99); SET @@SESSION.gtid_domain_id=1; SET @@SESSION.server_id=1; CREATE TABLE t (a int); +SELECT @@GLOBAL.gtid_binlog_state, @@GLOBAL.gtid_binlog_pos; +--let $binlog_start= +--source include/show_binlog_events.inc --error ER_BINLOG_CANT_DELETE_GTID_DOMAIN FLUSH BINARY LOGS DELETE_DOMAIN_ID = (1); @@ -129,6 +132,22 @@ SELECT @gtid_binlog_state_saved "as original state", @@GLOBAL.gtid_binlog_state --echo the following command succeeds with warnings --eval FLUSH BINARY LOGS DELETE_DOMAIN_ID = ($del_d_id) +# cleanup: forget the out-of-order +RESET MASTER; + +# +# MDEV-14431 +# Check rejection to delete a domain with value exceeding its range's maximum +# +--let $d_max_plus_1=`SELECT 1 << 32` +--error ER_BINLOG_CANT_DELETE_GTID_DOMAIN +--eval FLUSH BINARY LOGS DELETE_DOMAIN_ID = ($d_max_plus_1) + +# accepted maximum: +--let $d_max=`SELECT (1 << 32) - 1` +--error 0 +--eval FLUSH BINARY LOGS DELETE_DOMAIN_ID = ($d_max) + # # Cleanup # diff --git a/mysql-test/suite/binlog/t/binlog_tmp_table_row.test b/mysql-test/suite/binlog/t/binlog_tmp_table_row.test new file mode 100644 index 00000000000..ce11c880679 --- /dev/null +++ b/mysql-test/suite/binlog/t/binlog_tmp_table_row.test @@ -0,0 +1,30 @@ +# ==== Purpose ==== +# +# Test if statements used temporary tables are not binlogged in the case of +# binlog_format=row +# +# ==== Method ==== +# +# We will see if binlog file size is increased or not, It should be constant for the +# entire period of test. +# +# ==== Related bugs ==== +# +# Mdev-9266 +# +source include/have_log_bin.inc; +source include/have_binlog_format_row.inc; + +RESET MASTER; + +--echo #Create table test +--let $sql_query= create temporary table t1(a int, b int) +--source suite/binlog/include/check_binlog_size.inc + +--echo #Add index test +--let $sql_query= create index index_a on t1(a) +--source suite/binlog/include/check_binlog_size.inc + +--echo #drop index test +--let $sql_query= drop index index_a on t1 +--source suite/binlog/include/check_binlog_size.inc diff --git a/mysql-test/suite/binlog_encryption/rpl_corruption.result b/mysql-test/suite/binlog_encryption/rpl_corruption.result index 161559af81f..14a67b3a3a5 100644 --- a/mysql-test/suite/binlog_encryption/rpl_corruption.result +++ b/mysql-test/suite/binlog_encryption/rpl_corruption.result @@ -53,10 +53,6 @@ include/start_slave.inc connection master; connection slave; include/diff_tables.inc [master:test.t1, slave:test.t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead # 8. Clean up connection master; SET GLOBAL debug_dbug= ""; diff --git a/mysql-test/suite/binlog_encryption/rpl_loadfile.result b/mysql-test/suite/binlog_encryption/rpl_loadfile.result index f7ed4018b66..19a11e99250 100644 --- a/mysql-test/suite/binlog_encryption/rpl_loadfile.result +++ b/mysql-test/suite/binlog_encryption/rpl_loadfile.result @@ -244,10 +244,6 @@ include/start_slave.inc connection master; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; DROP PROCEDURE p; diff --git a/mysql-test/suite/binlog_encryption/rpl_mixed_binlog_max_cache_size.result b/mysql-test/suite/binlog_encryption/rpl_mixed_binlog_max_cache_size.result index ffee1a01158..388c8e67b68 100644 --- a/mysql-test/suite/binlog_encryption/rpl_mixed_binlog_max_cache_size.result +++ b/mysql-test/suite/binlog_encryption/rpl_mixed_binlog_max_cache_size.result @@ -23,10 +23,6 @@ include/wait_for_slave_sql_error_and_skip.inc [errno=1590] Got one of the listed errors include/wait_for_slave_sql_error_and_skip.inc [errno=1590] include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ######################################################################################## # 2 - BEGIN - IMPLICIT COMMIT by DDL ######################################################################################## @@ -59,10 +55,6 @@ INSERT INTO t1 (a, data) VALUES (29, 's');; CREATE TABLE t5 (a int); connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ######################################################################################## # 3 - BEGIN - COMMIT ######################################################################################## @@ -77,10 +69,6 @@ Got one of the listed errors COMMIT; connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ######################################################################################## # 4 - BEGIN - ROLLBACK ######################################################################################## @@ -97,10 +85,6 @@ Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ######################################################################################## # 5 - PROCEDURE ######################################################################################## @@ -127,10 +111,6 @@ Got one of the listed errors ROLLBACK; connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ######################################################################################## # 6 - XID ######################################################################################## @@ -151,10 +131,6 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back COMMIT; connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ######################################################################################## # 7 - NON-TRANS TABLE ######################################################################################## @@ -176,10 +152,6 @@ Got one of the listed errors COMMIT; connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ######################################################################## # 8 - Bug#55375(Regression Bug) Transaction bigger than # max_binlog_cache_size crashes slave diff --git a/mysql-test/suite/binlog_encryption/rpl_special_charset.result b/mysql-test/suite/binlog_encryption/rpl_special_charset.result index 728f4114aa7..b947cf3484d 100644 --- a/mysql-test/suite/binlog_encryption/rpl_special_charset.result +++ b/mysql-test/suite/binlog_encryption/rpl_special_charset.result @@ -5,10 +5,6 @@ CREATE TABLE t1(i VARCHAR(20)); INSERT INTO t1 VALUES (0xFFFF); connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; include/rpl_end.inc diff --git a/mysql-test/suite/binlog_encryption/rpl_stm_relay_ign_space.result b/mysql-test/suite/binlog_encryption/rpl_stm_relay_ign_space.result index 1dde93df372..3113eec9e10 100644 --- a/mysql-test/suite/binlog_encryption/rpl_stm_relay_ign_space.result +++ b/mysql-test/suite/binlog_encryption/rpl_stm_relay_ign_space.result @@ -2,9 +2,5 @@ include/master-slave.inc [connection master] include/assert.inc [Assert that relay log space is close to the limit] include/diff_tables.inc [master:test.t1,slave:test.t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection slave; include/rpl_end.inc 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 2f7f1b07cb4..936f604be2e 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 @@ -140,7 +140,7 @@ create table t4 select * from t1 where 3 in (select 1 union select 2 union selec 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' +Warning 1292 Truncated incorrect datetime value: '3' 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 diff --git a/mysql-test/suite/binlog_encryption/rpl_sync.result b/mysql-test/suite/binlog_encryption/rpl_sync.result index 90c90f269c6..1240c446164 100644 --- a/mysql-test/suite/binlog_encryption/rpl_sync.result +++ b/mysql-test/suite/binlog_encryption/rpl_sync.result @@ -29,10 +29,6 @@ include/start_slave.inc connection master; connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead =====Corrupting the master.info=======; connection slave; include/stop_slave.inc @@ -51,10 +47,6 @@ include/start_slave.inc connection master; connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead =====Clean up=======; connection master; drop table t1; diff --git a/mysql-test/suite/binlog_encryption/rpl_typeconv.result b/mysql-test/suite/binlog_encryption/rpl_typeconv.result index cb50c69aa55..1ba259edf8e 100644 --- a/mysql-test/suite/binlog_encryption/rpl_typeconv.result +++ b/mysql-test/suite/binlog_encryption/rpl_typeconv.result @@ -47,6 +47,10 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS=''; # MDEV-15833 Row format replication between LONGBLOB and MEDIUMBLOB does not work for long values # # End of MDEV-15833 +# +# MDEV-17098 DATE <-> DATETIME +# +# End of MDEV-17098 include/rpl_reset.inc connection slave; SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_NON_LOSSY'; @@ -59,6 +63,10 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_NON_LOSSY'; # MDEV-15833 Row format replication between LONGBLOB and MEDIUMBLOB does not work for long values # # End of MDEV-15833 +# +# MDEV-17098 DATE <-> DATETIME +# +# End of MDEV-17098 include/rpl_reset.inc connection slave; SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_LOSSY'; @@ -71,6 +79,10 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_LOSSY'; # MDEV-15833 Row format replication between LONGBLOB and MEDIUMBLOB does not work for long values # # End of MDEV-15833 +# +# MDEV-17098 DATE <-> DATETIME +# +# End of MDEV-17098 include/rpl_reset.inc connection slave; SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_LOSSY,ALL_NON_LOSSY'; @@ -83,6 +95,10 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_LOSSY,ALL_NON_LOSSY'; # MDEV-15833 Row format replication between LONGBLOB and MEDIUMBLOB does not work for long values # # End of MDEV-15833 +# +# MDEV-17098 DATE <-> DATETIME +# +# End of MDEV-17098 include/rpl_reset.inc connection slave; **** Result of conversions **** @@ -244,6 +260,13 @@ LONGBLOB TINYBLOB <Correct error> LONGBLOB BLOB <Correct error> LONGBLOB MEDIUMBLOB <Correct error> LONGBLOB VARBINARY(65500 <Correct error> +DATE DATETIME(6) <Correct error> +DATE DATETIME(6) <Correct error> +DATE DATETIME(6) <Correct error> +DATE DATETIME(0) <Correct error> +DATETIME(6) DATE <Correct error> +DATETIME(6) DATE <Correct error> +DATETIME(0) DATE <Correct error> TINYBLOB TINYBLOB ALL_NON_LOSSY <Correct value> TINYBLOB BLOB ALL_NON_LOSSY <Correct value> TINYBLOB MEDIUMBLOB ALL_NON_LOSSY <Correct value> @@ -401,6 +424,13 @@ LONGBLOB TINYBLOB ALL_NON_LOSSY <Correct error> LONGBLOB BLOB ALL_NON_LOSSY <Correct error> LONGBLOB MEDIUMBLOB ALL_NON_LOSSY <Correct error> LONGBLOB VARBINARY(65500 ALL_NON_LOSSY <Correct error> +DATE DATETIME(6) ALL_NON_LOSSY <Correct value> +DATE DATETIME(6) ALL_NON_LOSSY <Correct value> +DATE DATETIME(6) ALL_NON_LOSSY <Correct value> +DATE DATETIME(0) ALL_NON_LOSSY <Correct value> +DATETIME(6) DATE ALL_NON_LOSSY <Correct error> +DATETIME(6) DATE ALL_NON_LOSSY <Correct error> +DATETIME(0) DATE ALL_NON_LOSSY <Correct error> TINYBLOB TINYBLOB ALL_LOSSY <Correct value> TINYBLOB BLOB ALL_LOSSY <Correct error> TINYBLOB MEDIUMBLOB ALL_LOSSY <Correct error> @@ -558,6 +588,13 @@ LONGBLOB TINYBLOB ALL_LOSSY <Correct value> LONGBLOB BLOB ALL_LOSSY <Correct value> LONGBLOB MEDIUMBLOB ALL_LOSSY <Correct value> LONGBLOB VARBINARY(65500 ALL_LOSSY <Correct value> +DATE DATETIME(6) ALL_LOSSY <Correct error> +DATE DATETIME(6) ALL_LOSSY <Correct error> +DATE DATETIME(6) ALL_LOSSY <Correct error> +DATE DATETIME(0) ALL_LOSSY <Correct error> +DATETIME(6) DATE ALL_LOSSY <Correct value> +DATETIME(6) DATE ALL_LOSSY <Correct value> +DATETIME(0) DATE ALL_LOSSY <Correct value> TINYBLOB TINYBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> TINYBLOB BLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> TINYBLOB MEDIUMBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> @@ -715,6 +752,13 @@ LONGBLOB TINYBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> LONGBLOB BLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> LONGBLOB MEDIUMBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> LONGBLOB VARBINARY(65500 ALL_LOSSY,ALL_NON_LOSSY <Correct value> +DATE DATETIME(6) ALL_LOSSY,ALL_NON_LOSSY <Correct value> +DATE DATETIME(6) ALL_LOSSY,ALL_NON_LOSSY <Correct value> +DATE DATETIME(6) ALL_LOSSY,ALL_NON_LOSSY <Correct value> +DATE DATETIME(0) ALL_LOSSY,ALL_NON_LOSSY <Correct value> +DATETIME(6) DATE ALL_LOSSY,ALL_NON_LOSSY <Correct value> +DATETIME(6) DATE ALL_LOSSY,ALL_NON_LOSSY <Correct value> +DATETIME(0) DATE ALL_LOSSY,ALL_NON_LOSSY <Correct value> DROP TABLE type_conversions; call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t1. cannot be converted from type.* error.* 1677"); connection master; diff --git a/mysql-test/suite/compat/oracle/r/events.result b/mysql-test/suite/compat/oracle/r/events.result new file mode 100644 index 00000000000..7b4ad5679eb --- /dev/null +++ b/mysql-test/suite/compat/oracle/r/events.result @@ -0,0 +1,16 @@ +set sql_mode='ORACLE'; +# +# MDEV-16891 EVENTs created with SQL_MODE=ORACLE fail to execute +# +SET GLOBAL event_scheduler=off; +SET sql_mode='ORACLE'; +CREATE TABLE t1 (a TIMESTAMP); +CREATE EVENT e1 +ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 MICROSECOND +DO INSERT INTO t1 VALUES(NOW()); +SET GLOBAL event_scheduler=on; +SELECT COUNT(*) FROM t1; +COUNT(*) +1 +DROP TABLE t1; +SET GLOBAL event_scheduler=off; diff --git a/mysql-test/suite/compat/oracle/r/func_concat.result b/mysql-test/suite/compat/oracle/r/func_concat.result index b598f97006e..392d579707a 100644 --- a/mysql-test/suite/compat/oracle/r/func_concat.result +++ b/mysql-test/suite/compat/oracle/r/func_concat.result @@ -322,3 +322,72 @@ 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 concat_operator_oracle(-1,0 ^ 1) AS "a" +# +# MDEV-17359 Concatenation operator || in like expression failed in sql_mode=ORACLE +# +SELECT 'abc' LIKE 'a'||'%'; +'abc' LIKE 'a'||'%' +1 +EXPLAIN EXTENDED SELECT 'abc' LIKE 'a'||'%'; +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 'abc' like concat_operator_oracle('a','%') AS "'abc' LIKE 'a'||'%'" +SELECT 'x' FROM DUAL WHERE 11 LIKE 1||1; +x +x +SELECT 'x' FROM DUAL WHERE 1||1 LIKE 11; +x +x +SELECT 'x' FROM DUAL WHERE 1||1 LIKE 1||1; +x +x +CREATE TABLE t1 (c1 VARCHAR(10),c2 VARCHAR(10), ord INTEGER); +INSERT INTO t1 VALUES ('a', 'ab' ,1); +INSERT INTO t1 VALUES ('ab', 'ab', 2); +INSERT INTO t1 VALUES ('abc', 'ab', 3); +SELECT c1 FROM t1 WHERE c1 LIKE '%'||'b' ORDER BY ord; +c1 +ab +EXPLAIN EXTENDED SELECT c1 FROM t1 WHERE c1 LIKE '%'||'b' ORDER BY ord; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using filesort +Warnings: +Note 1003 select "test"."t1"."c1" AS "c1" from "test"."t1" where "test"."t1"."c1" like <cache>(concat_operator_oracle('%','b')) order by "test"."t1"."ord" +SELECT c1 FROM t1 WHERE c1 LIKE c2||'%'||'c' ORDER BY ord; +c1 +abc +EXPLAIN EXTENDED SELECT c1 FROM t1 WHERE c1 LIKE c2||'%'||'c' ORDER BY ord; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using filesort +Warnings: +Note 1003 select "test"."t1"."c1" AS "c1" from "test"."t1" where "test"."t1"."c1" like concat_operator_oracle(concat_operator_oracle("test"."t1"."c2",'%'),'c') order by "test"."t1"."ord" +SELECT 'x' FROM t1 WHERE c1||c2 LIKE 'aa%'; +x +x +EXPLAIN EXTENDED SELECT 'x' FROM t1 WHERE c1||c2 LIKE 'aa%'; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +Warnings: +Note 1003 select 'x' AS "x" from "test"."t1" where concat_operator_oracle("test"."t1"."c1","test"."t1"."c2") like 'aa%' +SELECT 'x' FROM t1 WHERE c1||c2 LIKE c2||c1; +x +x +EXPLAIN EXTENDED SELECT 'x' FROM t1 WHERE c1||c2 LIKE c2||c1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where +Warnings: +Note 1003 select 'x' AS "x" from "test"."t1" where concat_operator_oracle("test"."t1"."c1","test"."t1"."c2") like concat_operator_oracle("test"."t1"."c2","test"."t1"."c1") +CREATE VIEW v1 AS SELECT c1, c2, c1 LIKE c2||'_' FROM t1 ORDER BY ord; +SELECT * FROM v1; +c1 c2 c1 LIKE c2||'_' +a ab 0 +ab ab 0 +abc ab 1 +EXPLAIN EXTENDED SELECT * FROM v1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using filesort +Warnings: +Note 1003 select "test"."t1"."c1" AS "c1","test"."t1"."c2" AS "c2","test"."t1"."c1" like concat_operator_oracle("test"."t1"."c2",'_') AS "c1 LIKE c2||'_'" from "test"."t1" order by "test"."t1"."ord" +DROP VIEW v1; +DROP TABLE t1; diff --git a/mysql-test/suite/compat/oracle/r/sp-package-mysqldump.result b/mysql-test/suite/compat/oracle/r/sp-package-mysqldump.result index 1a8e01a992f..21bead42b0a 100644 --- a/mysql-test/suite/compat/oracle/r/sp-package-mysqldump.result +++ b/mysql-test/suite/compat/oracle/r/sp-package-mysqldump.result @@ -38,7 +38,7 @@ $$ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +/*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; diff --git a/mysql-test/suite/compat/oracle/r/table_value_constr.result b/mysql-test/suite/compat/oracle/r/table_value_constr.result index 31dcecfdb18..18fce086f6e 100644 --- a/mysql-test/suite/compat/oracle/r/table_value_constr.result +++ b/mysql-test/suite/compat/oracle/r/table_value_constr.result @@ -2099,3 +2099,87 @@ v # with t as (values (),()) select 1 from t; ERROR HY000: Row with no elements is not allowed in table value constructor in this context +# +# MDEV-17017: TVC in derived table +# +create table t1 (a int); +insert into t1 values (9), (3), (2); +select * from (values (7), (5), (8), (1), (3), (8), (1)) t; +7 +7 +5 +8 +1 +3 +8 +1 +explain select * from (values (7), (5), (8), (1), (3), (8), (1)) t; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 7 +2 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used +select * from (values (1,11), (7,77), (3,31), (4,42)) t; +1 11 +1 11 +7 77 +3 31 +4 42 +explain select * from (values (1,11), (7,77), (3,31), (4,42)) t; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 4 +2 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used +select * from (values (7), (5), (8), (1) union values (3), (8), (1)) t; +7 +7 +5 +8 +1 +3 +explain select * from (values (7), (5), (8), (1) union values (3), (8), (1)) t; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 7 +2 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used +3 UNION NULL NULL NULL NULL NULL NULL NULL No tables used +NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL +select * from (values (7), (5), (8), (1) union select * from t1) t; +7 +7 +5 +8 +1 +9 +3 +2 +explain select * from (values (7), (5), (8), (1) union select * from t1) t; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 7 +2 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used +3 UNION t1 ALL NULL NULL NULL NULL 3 +NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL +drop table t1; +# +# MDEV-16930: expression in the first row of TVC specifying derived table +# +SELECT 1 + 1, 2, 'abc'; +1 + 1 2 abc +2 2 abc +SELECT * FROM (SELECT 1 + 1, 2, 'abc') t; +1 + 1 2 abc +2 2 abc +WITH cte AS (SELECT 1 + 1, 2, 'abc') SELECT * FROM cte; +1 + 1 2 abc +2 2 abc +SELECT 1 + 1, 2, 'abc' UNION SELECT 3+4, 3, 'abc'; +1 + 1 2 abc +2 2 abc +7 3 abc +CREATE VIEW v1 AS SELECT 1 + 1, 2, 'abc'; +SELECT * FROM v1; +1 + 1 2 abc +2 2 abc +DROP VIEW v1; +VALUES(1 + 1,2,'abc'); +1 + 1 2 abc +2 2 abc +SELECT * FROM (VALUES(1 + 1,2,'abc')) t; +1 + 1 2 abc +2 2 abc diff --git a/mysql-test/suite/compat/oracle/t/events.test b/mysql-test/suite/compat/oracle/t/events.test new file mode 100644 index 00000000000..e898528636a --- /dev/null +++ b/mysql-test/suite/compat/oracle/t/events.test @@ -0,0 +1,29 @@ +-- source include/not_embedded.inc + +set sql_mode='ORACLE'; + +--echo # +--echo # MDEV-16891 EVENTs created with SQL_MODE=ORACLE fail to execute +--echo # + +SET GLOBAL event_scheduler=off; + +SET sql_mode='ORACLE'; +CREATE TABLE t1 (a TIMESTAMP); +CREATE EVENT e1 + ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 MICROSECOND + DO INSERT INTO t1 VALUES(NOW()); +SET GLOBAL event_scheduler=on; + +let $wait_timeout = 10; +let $wait_condition = + SELECT COUNT(*) = 0 + FROM INFORMATION_SCHEMA.EVENTS + WHERE event_schema = 'test' AND event_name = 'e1'; +--source include/wait_condition.inc + +SELECT COUNT(*) FROM t1; +DROP TABLE t1; + + +SET GLOBAL event_scheduler=off; diff --git a/mysql-test/suite/compat/oracle/t/func_concat.test b/mysql-test/suite/compat/oracle/t/func_concat.test index 7f9fec4f2fe..5a613242e87 100644 --- a/mysql-test/suite/compat/oracle/t/func_concat.test +++ b/mysql-test/suite/compat/oracle/t/func_concat.test @@ -146,3 +146,39 @@ SELECT -1||0^1 AS a FROM DUAL; EXPLAIN EXTENDED SELECT -1^1||1 AS a FROM DUAL; EXPLAIN EXTENDED SELECT -1||0^1 AS a FROM DUAL; + + +--echo # +--echo # MDEV-17359 Concatenation operator || in like expression failed in sql_mode=ORACLE +--echo # + +SELECT 'abc' LIKE 'a'||'%'; +EXPLAIN EXTENDED SELECT 'abc' LIKE 'a'||'%'; + +SELECT 'x' FROM DUAL WHERE 11 LIKE 1||1; +SELECT 'x' FROM DUAL WHERE 1||1 LIKE 11; +SELECT 'x' FROM DUAL WHERE 1||1 LIKE 1||1; + +CREATE TABLE t1 (c1 VARCHAR(10),c2 VARCHAR(10), ord INTEGER); +INSERT INTO t1 VALUES ('a', 'ab' ,1); +INSERT INTO t1 VALUES ('ab', 'ab', 2); +INSERT INTO t1 VALUES ('abc', 'ab', 3); + +SELECT c1 FROM t1 WHERE c1 LIKE '%'||'b' ORDER BY ord; +EXPLAIN EXTENDED SELECT c1 FROM t1 WHERE c1 LIKE '%'||'b' ORDER BY ord; + +SELECT c1 FROM t1 WHERE c1 LIKE c2||'%'||'c' ORDER BY ord; +EXPLAIN EXTENDED SELECT c1 FROM t1 WHERE c1 LIKE c2||'%'||'c' ORDER BY ord; + +SELECT 'x' FROM t1 WHERE c1||c2 LIKE 'aa%'; +EXPLAIN EXTENDED SELECT 'x' FROM t1 WHERE c1||c2 LIKE 'aa%'; + +SELECT 'x' FROM t1 WHERE c1||c2 LIKE c2||c1; +EXPLAIN EXTENDED SELECT 'x' FROM t1 WHERE c1||c2 LIKE c2||c1; + +CREATE VIEW v1 AS SELECT c1, c2, c1 LIKE c2||'_' FROM t1 ORDER BY ord; +SELECT * FROM v1; +EXPLAIN EXTENDED SELECT * FROM v1; + +DROP VIEW v1; +DROP TABLE t1; diff --git a/mysql-test/suite/compat/oracle/t/sp-package-mysqldump.test b/mysql-test/suite/compat/oracle/t/sp-package-mysqldump.test index 8f50c1fc4b0..6f3d7964521 100644 --- a/mysql-test/suite/compat/oracle/t/sp-package-mysqldump.test +++ b/mysql-test/suite/compat/oracle/t/sp-package-mysqldump.test @@ -1,3 +1,4 @@ +--source include/have_utf8mb4.inc --source include/not_embedded.inc SET sql_mode=ORACLE; diff --git a/mysql-test/suite/compat/oracle/t/table_value_constr.test b/mysql-test/suite/compat/oracle/t/table_value_constr.test index 66519e93a36..37d25218664 100644 --- a/mysql-test/suite/compat/oracle/t/table_value_constr.test +++ b/mysql-test/suite/compat/oracle/t/table_value_constr.test @@ -1081,3 +1081,47 @@ DELIMITER ;| --error ER_EMPTY_ROW_IN_TVC with t as (values (),()) select 1 from t; + +--echo # +--echo # MDEV-17017: TVC in derived table +--echo # + +create table t1 (a int); +insert into t1 values (9), (3), (2); + +let $q1= +select * from (values (7), (5), (8), (1), (3), (8), (1)) t; +eval $q1; +eval explain $q1; + +let $q2= +select * from (values (1,11), (7,77), (3,31), (4,42)) t; +eval $q2; +eval explain $q2; + +let $q3= +select * from (values (7), (5), (8), (1) union values (3), (8), (1)) t; +eval $q3; +eval explain $q3; + +let $q4= +select * from (values (7), (5), (8), (1) union select * from t1) t; +eval $q4; +eval explain $q4; + +drop table t1; + +--echo # +--echo # MDEV-16930: expression in the first row of TVC specifying derived table +--echo # + +SELECT 1 + 1, 2, 'abc'; +SELECT * FROM (SELECT 1 + 1, 2, 'abc') t; +WITH cte AS (SELECT 1 + 1, 2, 'abc') SELECT * FROM cte; +SELECT 1 + 1, 2, 'abc' UNION SELECT 3+4, 3, 'abc'; +CREATE VIEW v1 AS SELECT 1 + 1, 2, 'abc'; +SELECT * FROM v1; +DROP VIEW v1; + +VALUES(1 + 1,2,'abc'); +SELECT * FROM (VALUES(1 + 1,2,'abc')) t; diff --git a/mysql-test/suite/encryption/r/debug_key_management.result b/mysql-test/suite/encryption/r/debug_key_management.result index 02e05b4d221..91ca77f09b2 100644 --- a/mysql-test/suite/encryption/r/debug_key_management.result +++ b/mysql-test/suite/encryption/r/debug_key_management.result @@ -1,3 +1,4 @@ +create table t1(a serial) engine=innoDB; set global innodb_encrypt_tables=ON; show variables like 'innodb_encrypt%'; Variable_name Value @@ -13,5 +14,13 @@ set global debug_key_management_version=10; select count(*) from information_schema.innodb_tablespaces_encryption where current_key_version <> 10; count(*) 0 +SET GLOBAL debug_dbug = '+d,ib_log'; +SET GLOBAL innodb_log_checkpoint_now = 1; +SET GLOBAL innodb_flush_log_at_trx_commit = 1; +INSERT INTO t1 VALUES(NULL); set global innodb_encrypt_tables=OFF; set global debug_key_management_version=1; +select * from t1; +a +1 +drop table t1; diff --git a/mysql-test/suite/encryption/r/innodb-encryption-alter.result b/mysql-test/suite/encryption/r/innodb-encryption-alter.result index fcc87493976..1d5b88bc750 100644 --- a/mysql-test/suite/encryption/r/innodb-encryption-alter.result +++ b/mysql-test/suite/encryption/r/innodb-encryption-alter.result @@ -48,3 +48,40 @@ Warning 140 InnoDB: ENCRYPTION_KEY_ID 99 not available Error 1478 Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID' set innodb_default_encryption_key_id = 1; drop table t1,t2; +SET GLOBAL innodb_encrypt_tables=OFF; +CREATE TABLE t1 (a int not null primary key) engine=innodb; +ALTER TABLE t1 ENCRYPTION_KEY_ID=4; +ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID' +SHOW WARNINGS; +Level Code Message +Warning 140 InnoDB: innodb_encrypt_tables=OFF only allows ENCRYPTION_KEY_ID=1 +Error 1478 Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID' +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t2 (a int not null primary key) engine=innodb; +ALTER TABLE t2 ENCRYPTION_KEY_ID=4, ALGORITHM=COPY; +ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options") +SHOW WARNINGS; +Level Code Message +Warning 140 InnoDB: innodb_encrypt_tables=OFF only allows ENCRYPTION_KEY_ID=1 +Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` int(11) NOT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP TABLE t2; +CREATE TABLE t3 (a int not null primary key) engine=innodb ENCRYPTION_KEY_ID=4; +ERROR HY000: Can't create table `test`.`t3` (errno: 140 "Wrong create options") +SHOW WARNINGS; +Level Code Message +Warning 140 InnoDB: innodb_encrypt_tables=OFF only allows ENCRYPTION_KEY_ID=1 +Error 1005 Can't create table `test`.`t3` (errno: 140 "Wrong create options") +Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB diff --git a/mysql-test/suite/encryption/r/innodb_encrypt_log_corruption.result b/mysql-test/suite/encryption/r/innodb_encrypt_log_corruption.result index 8b58ff593de..59b28969559 100644 --- a/mysql-test/suite/encryption/r/innodb_encrypt_log_corruption.result +++ b/mysql-test/suite/encryption/r/innodb_encrypt_log_corruption.result @@ -125,13 +125,13 @@ WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); COUNT(*) 1 -FOUND 2 /InnoDB: Upgrading redo log:/ in mysqld.1.err +FOUND 3 /InnoDB: Upgrading redo log:/ 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 2 /InnoDB: Encrypting redo log/ in mysqld.1.err +FOUND 1 /InnoDB: Encrypting redo log/ in mysqld.1.err ib_buffer_pool ib_logfile0 ib_logfile1 diff --git a/mysql-test/suite/encryption/t/debug_key_management.test b/mysql-test/suite/encryption/t/debug_key_management.test index 22b213c6135..c370ecf5bd8 100644 --- a/mysql-test/suite/encryption/t/debug_key_management.test +++ b/mysql-test/suite/encryption/t/debug_key_management.test @@ -1,10 +1,15 @@ -- source include/have_innodb.inc +-- source include/have_debug.inc +-- source include/not_embedded.inc + if (`select count(*) = 0 from information_schema.plugins where plugin_name = 'debug_key_management' and plugin_status='active'`) { --skip Needs debug_key_management } +create table t1(a serial) engine=innoDB; + set global innodb_encrypt_tables=ON; show variables like 'innodb_encrypt%'; @@ -17,10 +22,21 @@ set global debug_key_management_version=10; let $wait_condition= select count(*) = $tables_count from information_schema.innodb_tablespaces_encryption where current_key_version=10; --source include/wait_condition.inc - select count(*) from information_schema.innodb_tablespaces_encryption where current_key_version <> 10; + +# Test redo log key rotation and crash recovery. +SET GLOBAL debug_dbug = '+d,ib_log'; +SET GLOBAL innodb_log_checkpoint_now = 1; +SET GLOBAL innodb_flush_log_at_trx_commit = 1; +INSERT INTO t1 VALUES(NULL); +let $shutdown_timeout = 0; +-- source include/restart_mysqld.inc + # Note that we expect that key_version is increasing so disable encryption before reset set global innodb_encrypt_tables=OFF; set global debug_key_management_version=1; +select * from t1; + +drop table t1; diff --git a/mysql-test/suite/encryption/t/innodb-encryption-alter.test b/mysql-test/suite/encryption/t/innodb-encryption-alter.test index af1c749d8a9..e8391d97d6c 100644 --- a/mysql-test/suite/encryption/t/innodb-encryption-alter.test +++ b/mysql-test/suite/encryption/t/innodb-encryption-alter.test @@ -81,6 +81,30 @@ connection default; drop table t1,t2; +# +# MDEV-17230: encryption_key_id from alter is ignored by encryption threads +# +SET GLOBAL innodb_encrypt_tables=OFF; +CREATE TABLE t1 (a int not null primary key) engine=innodb; +--error ER_ILLEGAL_HA_CREATE_OPTION +ALTER TABLE t1 ENCRYPTION_KEY_ID=4; +SHOW WARNINGS; +SHOW CREATE TABLE t1; +DROP TABLE t1; + +CREATE TABLE t2 (a int not null primary key) engine=innodb; +--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t2 ENCRYPTION_KEY_ID=4, ALGORITHM=COPY; +--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/ +SHOW WARNINGS; +SHOW CREATE TABLE t2; +DROP TABLE t2; + +--error ER_CANT_CREATE_TABLE +CREATE TABLE t3 (a int not null primary key) engine=innodb ENCRYPTION_KEY_ID=4; +SHOW WARNINGS; + # reset system --disable_query_log EVAL SET GLOBAL innodb_encrypt_tables = $encrypt_tables; diff --git a/mysql-test/suite/funcs_1/r/innodb_func_view.result b/mysql-test/suite/funcs_1/r/innodb_func_view.result index 481787e4eaa..45c04e32de8 100644 --- a/mysql-test/suite/funcs_1/r/innodb_func_view.result +++ b/mysql-test/suite/funcs_1/r/innodb_func_view.result @@ -3778,14 +3778,14 @@ WHERE select_id = 51 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id NULL NULL 1 NULL 2 -00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 --00:00:00 ---äÖüß@µ*$-- 4 +NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 +NULL ---äÖüß@µ*$-- 4 -00:00:01 -1 5 41:58:00 1 17:58 23 Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' +Warning 1292 Incorrect time value: '' +Warning 1292 Incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as time) AS `CAST(my_varbinary_1000 AS TIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3795,14 +3795,14 @@ WHERE select_id = 51 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id NULL NULL 1 NULL 2 -00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 --00:00:00 ---äÖüß@µ*$-- 4 +NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 +NULL ---äÖüß@µ*$-- 4 -00:00:01 -1 5 41:58:00 1 17:58 23 Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' +Warning 1292 Incorrect time value: '' +Warning 1292 Incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' DROP VIEW v1; @@ -3813,15 +3813,15 @@ my_binary_30, id FROM t1_values WHERE select_id = 50 OR select_id IS NULL order by id; CAST(my_binary_30 AS TIME) my_binary_30 id NULL NULL 1 -00:00:00 2 -00:00:00 <--------30 characters-------> 3 --00:00:00 ---äÖüß@µ*$-- 4 +NULL 2 +NULL <--------30 characters-------> 3 +NULL ---äÖüß@µ*$-- 4 -00:00:01 -1 5 41:58:00 1 17:58 22 Warnings: -Warning 1292 Truncated incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1292 Truncated incorrect time value: '<--------30 characters------->' -Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' +Warning 1292 Incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' +Warning 1292 Incorrect time value: '<--------30 characters------->' +Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect time value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect time value: '1 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' SHOW CREATE VIEW v1; @@ -3832,15 +3832,15 @@ WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 50 OR select_id IS NULL) order by id; CAST(my_binary_30 AS TIME) my_binary_30 id NULL NULL 1 -00:00:00 -00:00:00 <--------30 characters-------> 3 --00:00:00 ---äÖüß@µ*$-- +NULL +NULL <--------30 characters-------> 3 +NULL ---äÖüß@µ*$-- -00:00:01 -1 41:58:00 1 17:58 Warnings: -Warning 1292 Truncated incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1292 Truncated incorrect time value: '<--------30 characters------->' -Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' +Warning 1292 Incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' +Warning 1292 Incorrect time value: '<--------30 characters------->' +Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect time value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect time value: '1 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' DROP VIEW v1; @@ -3854,14 +3854,14 @@ WHERE select_id = 49 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS TIME) my_varchar_1000 id NULL NULL 1 NULL 2 -00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 --00:00:00 ---äÖüß@µ*$-- 4 +NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 +NULL ---äÖüß@µ*$-- 4 -00:00:01 -1 5 41:58:00 1 17:58 21 Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' +Warning 1292 Incorrect time value: '' +Warning 1292 Incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as time) AS `CAST(my_varchar_1000 AS TIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3871,14 +3871,14 @@ WHERE select_id = 49 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS TIME) my_varchar_1000 id NULL NULL 1 NULL 2 -00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 --00:00:00 ---äÖüß@µ*$-- 4 +NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 +NULL ---äÖüß@µ*$-- 4 -00:00:01 -1 5 41:58:00 1 17:58 21 Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' +Warning 1292 Incorrect time value: '' +Warning 1292 Incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' DROP VIEW v1; @@ -3890,14 +3890,14 @@ WHERE select_id = 48 OR select_id IS NULL order by id; CAST(my_char_30 AS TIME) my_char_30 id NULL NULL 1 NULL 2 -00:00:00 <--------30 characters-------> 3 --00:00:00 ---äÖüß@µ*$-- 4 +NULL <--------30 characters-------> 3 +NULL ---äÖüß@µ*$-- 4 -00:00:01 -1 5 41:58:00 1 17:58 20 Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<--------30 characters------->' -Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--' +Warning 1292 Incorrect time value: '' +Warning 1292 Incorrect time value: '<--------30 characters------->' +Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as time) AS `CAST(my_char_30 AS TIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3907,14 +3907,14 @@ WHERE select_id = 48 OR select_id IS NULL) order by id; CAST(my_char_30 AS TIME) my_char_30 id NULL NULL 1 NULL 2 -00:00:00 <--------30 characters-------> 3 --00:00:00 ---äÖüß@µ*$-- 4 +NULL <--------30 characters-------> 3 +NULL ---äÖüß@µ*$-- 4 -00:00:01 -1 5 41:58:00 1 17:58 20 Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<--------30 characters------->' -Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--' +Warning 1292 Incorrect time value: '' +Warning 1292 Incorrect time value: '<--------30 characters------->' +Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--' DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/r/is_check_constraints.result b/mysql-test/suite/funcs_1/r/is_check_constraints.result new file mode 100644 index 00000000000..678cfb8db2f --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_check_constraints.result @@ -0,0 +1,144 @@ +# +# MDEV-14474: Create INFORMATION_SCHEMA.CHECK_CONSTRAINTS +# +set check_constraint_checks=1; +use test; +create table t0 +( +t int, check (t>32) # table constraint +) ENGINE=myisam; +SELECT * from information_schema.check_constraints order by check_clause; +CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA test +CONSTRAINT_NAME CONSTRAINT_1 +TABLE_NAME t0 +CHECK_CLAUSE `t` > 32 +ALTER TABLE t0 +ADD CONSTRAINT CHK_t0_t CHECK(t<100); +SELECT * from information_schema.check_constraints order by check_clause; +CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA test +CONSTRAINT_NAME CHK_t0_t +TABLE_NAME t0 +CHECK_CLAUSE `t` < 100 +CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA test +CONSTRAINT_NAME CONSTRAINT_1 +TABLE_NAME t0 +CHECK_CLAUSE `t` > 32 +ALTER TABLE t0 +DROP CONSTRAINT CHK_t0_t; +SELECT * from information_schema.check_constraints order by check_clause; +CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA test +CONSTRAINT_NAME CONSTRAINT_1 +TABLE_NAME t0 +CHECK_CLAUSE `t` > 32 +CREATE TABLE t1 +( t int CHECK(t>2), # field constraint +tt int, CONSTRAINT CHK_tt CHECK(tt<100) # table constraint +) ENGINE=InnoDB; +SELECT * from information_schema.check_constraints order by check_clause; +CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA test +CONSTRAINT_NAME CHK_tt +TABLE_NAME t1 +CHECK_CLAUSE `tt` < 100 +CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA test +CONSTRAINT_NAME t +TABLE_NAME t1 +CHECK_CLAUSE `t` > 2 +CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA test +CONSTRAINT_NAME CONSTRAINT_1 +TABLE_NAME t0 +CHECK_CLAUSE `t` > 32 +ALTER TABLE t1 +DROP CONSTRAINT CHK_tt; +SELECT * from information_schema.check_constraints order by check_clause; +CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA test +CONSTRAINT_NAME t +TABLE_NAME t1 +CHECK_CLAUSE `t` > 2 +CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA test +CONSTRAINT_NAME CONSTRAINT_1 +TABLE_NAME t0 +CHECK_CLAUSE `t` > 32 +create table t2 +( +name VARCHAR(30) CHECK(CHAR_LENGTH(name)>2), #field constraint +start_date DATE, +end_date DATE, +CONSTRAINT CHK_dates CHECK(start_date IS NULL) #table constraint +)ENGINE=Innodb; +SELECT * from information_schema.check_constraints order by check_clause; +CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA test +CONSTRAINT_NAME name +TABLE_NAME t2 +CHECK_CLAUSE char_length(`name`) > 2 +CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA test +CONSTRAINT_NAME CHK_dates +TABLE_NAME t2 +CHECK_CLAUSE `start_date` is null +CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA test +CONSTRAINT_NAME t +TABLE_NAME t1 +CHECK_CLAUSE `t` > 2 +CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA test +CONSTRAINT_NAME CONSTRAINT_1 +TABLE_NAME t0 +CHECK_CLAUSE `t` > 32 +ALTER TABLE t1 +ADD CONSTRAINT CHK_new_ CHECK(t>tt); +SELECT * from information_schema.check_constraints order by check_clause; +CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA test +CONSTRAINT_NAME name +TABLE_NAME t2 +CHECK_CLAUSE char_length(`name`) > 2 +CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA test +CONSTRAINT_NAME CHK_dates +TABLE_NAME t2 +CHECK_CLAUSE `start_date` is null +CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA test +CONSTRAINT_NAME t +TABLE_NAME t1 +CHECK_CLAUSE `t` > 2 +CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA test +CONSTRAINT_NAME CONSTRAINT_1 +TABLE_NAME t0 +CHECK_CLAUSE `t` > 32 +CONSTRAINT_CATALOG def +CONSTRAINT_SCHEMA test +CONSTRAINT_NAME CHK_new_ +TABLE_NAME t1 +CHECK_CLAUSE `t` > `tt` +create table t3 +( +a int, +b int check (b>0), # field constraint named 'b' +CONSTRAINT b check (b>10) # table constraint +) ENGINE=InnoDB; +select * from information_schema.check_constraints order by check_clause; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE +def test name t2 char_length(`name`) > 2 +def test b t3 `b` > 0 +def test b t3 `b` > 10 +def test CHK_dates t2 `start_date` is null +def test t t1 `t` > 2 +def test CONSTRAINT_1 t0 `t` > 32 +def test CHK_new_ t1 `t` > `tt` +drop table t0; +drop table t1; +drop table t2; +drop table t3; diff --git a/mysql-test/suite/funcs_1/r/is_columns_is.result b/mysql-test/suite/funcs_1/r/is_columns_is.result index d76efef3e08..dfaa5d75137 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_is.result +++ b/mysql-test/suite/funcs_1/r/is_columns_is.result @@ -24,6 +24,11 @@ def information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 '' NO varchar 32 96 N def information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select NEVER NULL def information_schema CHARACTER_SETS DESCRIPTION 3 '' NO varchar 60 180 NULL NULL NULL utf8 utf8_general_ci varchar(60) select NEVER NULL def information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(3) select NEVER NULL +def information_schema CHECK_CONSTRAINTS CHECK_CLAUSE 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema CHECK_CONSTRAINTS CONSTRAINT_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL +def information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema CHECK_CONSTRAINTS TABLE_NAME 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema CLIENT_STATISTICS ACCESS_DENIED 22 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL def information_schema CLIENT_STATISTICS BINLOG_BYTES_WRITTEN 9 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL def information_schema CLIENT_STATISTICS BUSY_TIME 5 0 NO double NULL NULL 21 NULL NULL NULL NULL double select NEVER NULL @@ -557,6 +562,11 @@ COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH C 3.0000 information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME varchar 32 96 utf8 utf8_general_ci varchar(32) 3.0000 information_schema CHARACTER_SETS DESCRIPTION varchar 60 180 utf8 utf8_general_ci varchar(60) NULL information_schema CHARACTER_SETS MAXLEN bigint NULL NULL NULL NULL bigint(3) +3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema CHECK_CONSTRAINTS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema CHECK_CONSTRAINTS CHECK_CLAUSE varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema CLIENT_STATISTICS CLIENT varchar 64 192 utf8 utf8_general_ci varchar(64) NULL information_schema CLIENT_STATISTICS TOTAL_CONNECTIONS bigint NULL NULL NULL NULL bigint(21) NULL information_schema CLIENT_STATISTICS CONCURRENT_CONNECTIONS bigint NULL NULL NULL NULL bigint(21) diff --git a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result index b0d3c177580..96fb1e286c0 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result @@ -24,6 +24,11 @@ def information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 '' NO varchar 32 96 N def information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 '' NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) NEVER NULL def information_schema CHARACTER_SETS DESCRIPTION 3 '' NO varchar 60 180 NULL NULL NULL utf8 utf8_general_ci varchar(60) NEVER NULL def information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(3) NEVER NULL +def information_schema CHECK_CONSTRAINTS CHECK_CLAUSE 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema CHECK_CONSTRAINTS CONSTRAINT_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL +def information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema CHECK_CONSTRAINTS TABLE_NAME 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema CLIENT_STATISTICS ACCESS_DENIED 22 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL def information_schema CLIENT_STATISTICS BINLOG_BYTES_WRITTEN 9 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL def information_schema CLIENT_STATISTICS BUSY_TIME 5 0 NO double NULL NULL 21 NULL NULL NULL NULL double NEVER NULL @@ -557,6 +562,11 @@ COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH C 3.0000 information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME varchar 32 96 utf8 utf8_general_ci varchar(32) 3.0000 information_schema CHARACTER_SETS DESCRIPTION varchar 60 180 utf8 utf8_general_ci varchar(60) NULL information_schema CHARACTER_SETS MAXLEN bigint NULL NULL NULL NULL bigint(3) +3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema CHECK_CONSTRAINTS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema CHECK_CONSTRAINTS CHECK_CLAUSE varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema CLIENT_STATISTICS CLIENT varchar 64 192 utf8 utf8_general_ci varchar(64) NULL information_schema CLIENT_STATISTICS TOTAL_CONNECTIONS bigint NULL NULL NULL NULL bigint(21) NULL information_schema CLIENT_STATISTICS CONCURRENT_CONNECTIONS bigint NULL NULL NULL NULL bigint(21) diff --git a/mysql-test/suite/funcs_1/r/is_columns_mysql.result b/mysql-test/suite/funcs_1/r/is_columns_mysql.result index 5d4e8fdf19d..5a7fdbd63c9 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_mysql.result +++ b/mysql-test/suite/funcs_1/r/is_columns_mysql.result @@ -93,26 +93,6 @@ def mysql help_topic help_category_id 3 NULL NO smallint NULL NULL 5 0 NULL NULL def mysql help_topic help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references NEVER NULL def mysql help_topic name 2 NULL NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references NEVER NULL def mysql help_topic url 6 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_general_ci text select,insert,update,references NEVER NULL -def mysql host Alter_priv 12 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql host Alter_routine_priv 18 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql host Create_priv 7 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql host Create_routine_priv 17 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql host Create_tmp_table_priv 13 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql host Create_view_priv 15 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql host Db 2 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NEVER NULL -def mysql host Delete_priv 6 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql host Drop_priv 8 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql host Execute_priv 19 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql host Grant_priv 9 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql host Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references NEVER NULL -def mysql host Index_priv 11 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql host Insert_priv 4 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql host Lock_tables_priv 14 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql host References_priv 10 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql host Select_priv 3 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql host Show_view_priv 16 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql host Trigger_priv 20 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL -def mysql host Update_priv 5 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NEVER NULL def mysql index_stats avg_frequency 5 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) select,insert,update,references NEVER NULL def mysql index_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references NEVER NULL def mysql index_stats index_name 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references NEVER NULL @@ -125,13 +105,13 @@ def mysql innodb_index_stats sample_size 7 NULL YES bigint NULL NULL 20 0 NULL N def mysql innodb_index_stats stat_description 8 NULL NO varchar 1024 3072 NULL NULL NULL utf8 utf8_bin varchar(1024) select,insert,update,references NEVER NULL def mysql innodb_index_stats stat_name 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references NEVER NULL def mysql innodb_index_stats stat_value 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL -def mysql innodb_index_stats table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references NEVER NULL +def mysql innodb_index_stats table_name 2 NULL NO varchar 199 597 NULL NULL NULL utf8 utf8_bin varchar(199) PRI select,insert,update,references NEVER NULL def mysql innodb_table_stats clustered_index_size 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def mysql innodb_table_stats database_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references NEVER NULL def mysql innodb_table_stats last_update 3 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references NEVER NULL def mysql innodb_table_stats n_rows 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL def mysql innodb_table_stats sum_of_other_index_sizes 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL -def mysql innodb_table_stats table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references NEVER NULL +def mysql innodb_table_stats table_name 2 NULL NO varchar 199 597 NULL NULL NULL utf8 utf8_bin varchar(199) PRI select,insert,update,references NEVER NULL def mysql plugin dl 2 '' NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL def mysql plugin name 1 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) PRI select,insert,update,references NEVER NULL def mysql proc aggregate 21 'NONE' NO enum 5 15 NULL NULL NULL utf8 utf8_general_ci enum('NONE','GROUP') select,insert,update,references NEVER NULL @@ -436,33 +416,13 @@ NULL mysql help_topic help_category_id smallint NULL NULL NULL NULL smallint(5) 1.0000 mysql help_topic description text 65535 65535 utf8 utf8_general_ci text 1.0000 mysql help_topic example text 65535 65535 utf8 utf8_general_ci text 1.0000 mysql help_topic url text 65535 65535 utf8 utf8_general_ci text -3.0000 mysql host Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql host Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql host Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Trigger_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 3.0000 mysql index_stats db_name varchar 64 192 utf8 utf8_bin varchar(64) 3.0000 mysql index_stats table_name varchar 64 192 utf8 utf8_bin varchar(64) 3.0000 mysql index_stats index_name varchar 64 192 utf8 utf8_bin varchar(64) NULL mysql index_stats prefix_arity int NULL NULL NULL NULL int(11) unsigned NULL mysql index_stats avg_frequency decimal NULL NULL NULL NULL decimal(12,4) 3.0000 mysql innodb_index_stats database_name varchar 64 192 utf8 utf8_bin varchar(64) -3.0000 mysql innodb_index_stats table_name varchar 64 192 utf8 utf8_bin varchar(64) +3.0000 mysql innodb_index_stats table_name varchar 199 597 utf8 utf8_bin varchar(199) 3.0000 mysql innodb_index_stats index_name varchar 64 192 utf8 utf8_bin varchar(64) NULL mysql innodb_index_stats last_update timestamp NULL NULL NULL NULL timestamp 3.0000 mysql innodb_index_stats stat_name varchar 64 192 utf8 utf8_bin varchar(64) @@ -470,7 +430,7 @@ NULL mysql innodb_index_stats stat_value bigint NULL NULL NULL NULL bigint(20) u NULL mysql innodb_index_stats sample_size bigint NULL NULL NULL NULL bigint(20) unsigned 3.0000 mysql innodb_index_stats stat_description varchar 1024 3072 utf8 utf8_bin varchar(1024) 3.0000 mysql innodb_table_stats database_name varchar 64 192 utf8 utf8_bin varchar(64) -3.0000 mysql innodb_table_stats table_name varchar 64 192 utf8 utf8_bin varchar(64) +3.0000 mysql innodb_table_stats table_name varchar 199 597 utf8 utf8_bin varchar(199) NULL mysql innodb_table_stats last_update timestamp NULL NULL NULL NULL timestamp NULL mysql innodb_table_stats n_rows bigint NULL NULL NULL NULL bigint(20) unsigned NULL mysql innodb_table_stats clustered_index_size bigint NULL NULL NULL NULL bigint(20) unsigned diff --git a/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result index 9f17724b356..440478b892d 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result @@ -93,26 +93,6 @@ def mysql help_topic help_category_id 3 NULL NO smallint NULL NULL 5 0 NULL NULL def mysql help_topic help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI NEVER NULL def mysql help_topic name 2 NULL NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) UNI NEVER NULL def mysql help_topic url 6 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_general_ci text NEVER NULL -def mysql host Alter_priv 12 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql host Alter_routine_priv 18 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql host Create_priv 7 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql host Create_routine_priv 17 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql host Create_tmp_table_priv 13 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql host Create_view_priv 15 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql host Db 2 '' NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI NEVER NULL -def mysql host Delete_priv 6 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql host Drop_priv 8 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql host Execute_priv 19 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql host Grant_priv 9 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql host Host 1 '' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI NEVER NULL -def mysql host Index_priv 11 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql host Insert_priv 4 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql host Lock_tables_priv 14 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql host References_priv 10 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql host Select_priv 3 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql host Show_view_priv 16 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql host Trigger_priv 20 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL -def mysql host Update_priv 5 'N' NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') NEVER NULL def mysql index_stats avg_frequency 5 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) NEVER NULL def mysql index_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI NEVER NULL def mysql index_stats index_name 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI NEVER NULL @@ -433,26 +413,6 @@ NULL mysql help_topic help_category_id smallint NULL NULL NULL NULL smallint(5) 1.0000 mysql help_topic description text 65535 65535 utf8 utf8_general_ci text 1.0000 mysql help_topic example text 65535 65535 utf8 utf8_general_ci text 1.0000 mysql help_topic url text 65535 65535 utf8 utf8_general_ci text -3.0000 mysql host Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql host Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql host Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Trigger_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 3.0000 mysql index_stats db_name varchar 64 192 utf8 utf8_bin varchar(64) 3.0000 mysql index_stats table_name varchar 64 192 utf8 utf8_bin varchar(64) 3.0000 mysql index_stats index_name varchar 64 192 utf8 utf8_bin varchar(64) diff --git a/mysql-test/suite/funcs_1/r/is_key_column_usage.result b/mysql-test/suite/funcs_1/r/is_key_column_usage.result index 5c126a48419..326ea3f4acc 100644 --- a/mysql-test/suite/funcs_1/r/is_key_column_usage.result +++ b/mysql-test/suite/funcs_1/r/is_key_column_usage.result @@ -100,8 +100,6 @@ def mysql PRIMARY def mysql help_relation help_keyword_id def mysql PRIMARY def mysql help_relation help_topic_id def mysql PRIMARY def mysql help_topic help_topic_id def mysql name def mysql help_topic name -def mysql PRIMARY def mysql host Db -def mysql PRIMARY def mysql host Host def mysql PRIMARY def mysql index_stats db_name def mysql PRIMARY def mysql index_stats index_name def mysql PRIMARY def mysql index_stats prefix_arity diff --git a/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result b/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result index d41f7395483..a547b1ddf61 100644 --- a/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_key_column_usage_embedded.result @@ -100,8 +100,6 @@ def mysql PRIMARY def mysql help_relation help_keyword_id def mysql PRIMARY def mysql help_relation help_topic_id def mysql PRIMARY def mysql help_topic help_topic_id def mysql name def mysql help_topic name -def mysql PRIMARY def mysql host Db -def mysql PRIMARY def mysql host Host def mysql PRIMARY def mysql index_stats db_name def mysql PRIMARY def mysql index_stats index_name def mysql PRIMARY def mysql index_stats prefix_arity diff --git a/mysql-test/suite/funcs_1/r/is_routines_embedded.result b/mysql-test/suite/funcs_1/r/is_routines_embedded.result index a2acd83af49..cb736417a17 100644 --- a/mysql-test/suite/funcs_1/r/is_routines_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_routines_embedded.result @@ -197,8 +197,8 @@ sp_6_408002_2 def db_datadict_2 sp_6_408002_2 PROCEDURE NULL NULL NULL NULL NUL SELECT * FROM db_datadict_2.res_6_408002_2; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci -check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.host, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci -check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci +check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci +check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci connect testuser2, localhost, testuser2, , db_datadict; SELECT * FROM information_schema.routines; SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION @@ -209,8 +209,8 @@ sp_6_408002_2 def db_datadict_2 sp_6_408002_2 PROCEDURE NULL NULL NULL NULL NUL SELECT * FROM db_datadict_2.res_6_408002_2; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci -check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.host, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci -check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci +check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci +check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci connect testuser3, localhost, testuser3, , test; SELECT * FROM information_schema.routines; SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION @@ -221,8 +221,8 @@ sp_6_408002_2 def db_datadict_2 sp_6_408002_2 PROCEDURE NULL NULL NULL NULL NUL SELECT * FROM db_datadict_2.res_6_408002_2; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN INSERT INTO test_suppressions (pattern) VALUES (pattern); FLUSH NO_WRITE_TO_BINLOG TABLE test_suppressions; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci -check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.host, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci -check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci +check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.user; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci +check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci connection default; disconnect testuser1; disconnect testuser2; diff --git a/mysql-test/suite/funcs_1/r/is_statistics.result b/mysql-test/suite/funcs_1/r/is_statistics.result index 419eb0b4b4c..2cb94b657cc 100644 --- a/mysql-test/suite/funcs_1/r/is_statistics.result +++ b/mysql-test/suite/funcs_1/r/is_statistics.result @@ -111,8 +111,6 @@ def mysql help_relation mysql PRIMARY def mysql help_relation mysql PRIMARY def mysql help_topic mysql name def mysql help_topic mysql PRIMARY -def mysql host mysql PRIMARY -def mysql host mysql PRIMARY def mysql index_stats mysql PRIMARY def mysql index_stats mysql PRIMARY def mysql index_stats mysql PRIMARY diff --git a/mysql-test/suite/funcs_1/r/is_statistics_mysql.result b/mysql-test/suite/funcs_1/r/is_statistics_mysql.result index 31fb460f9aa..96d85a0425f 100644 --- a/mysql-test/suite/funcs_1/r/is_statistics_mysql.result +++ b/mysql-test/suite/funcs_1/r/is_statistics_mysql.result @@ -32,8 +32,6 @@ def mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A #CARD# NULL NULL BT def mysql help_relation 0 mysql PRIMARY 2 help_topic_id A #CARD# NULL NULL BTREE def mysql help_topic 0 mysql name 1 name A #CARD# NULL NULL BTREE def mysql help_topic 0 mysql PRIMARY 1 help_topic_id A #CARD# NULL NULL BTREE -def mysql host 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE -def mysql host 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE def mysql index_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE def mysql index_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE def mysql index_stats 0 mysql PRIMARY 3 index_name A #CARD# NULL NULL BTREE diff --git a/mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result index c81052321f8..69a502e53dd 100644 --- a/mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result @@ -32,8 +32,6 @@ def mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A #CARD# NULL NULL BT def mysql help_relation 0 mysql PRIMARY 2 help_topic_id A #CARD# NULL NULL BTREE def mysql help_topic 0 mysql name 1 name A #CARD# NULL NULL BTREE def mysql help_topic 0 mysql PRIMARY 1 help_topic_id A #CARD# NULL NULL BTREE -def mysql host 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE -def mysql host 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE def mysql index_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE def mysql index_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE def mysql index_stats 0 mysql PRIMARY 3 index_name A #CARD# NULL NULL BTREE @@ -114,8 +112,6 @@ def mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A #CARD# NULL NULL BT def mysql help_relation 0 mysql PRIMARY 2 help_topic_id A #CARD# NULL NULL BTREE def mysql help_topic 0 mysql name 1 name A #CARD# NULL NULL BTREE def mysql help_topic 0 mysql PRIMARY 1 help_topic_id A #CARD# NULL NULL BTREE -def mysql host 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE -def mysql host 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE def mysql index_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE def mysql index_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE def mysql index_stats 0 mysql PRIMARY 3 index_name A #CARD# NULL NULL BTREE diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints.result b/mysql-test/suite/funcs_1/r/is_table_constraints.result index d968d3b65de..cb7aa1f8fc0 100644 --- a/mysql-test/suite/funcs_1/r/is_table_constraints.result +++ b/mysql-test/suite/funcs_1/r/is_table_constraints.result @@ -71,7 +71,6 @@ def mysql PRIMARY mysql help_keyword def mysql PRIMARY mysql help_relation def mysql name mysql help_topic def mysql PRIMARY mysql help_topic -def mysql PRIMARY mysql host def mysql PRIMARY mysql index_stats def mysql PRIMARY mysql innodb_index_stats def mysql PRIMARY mysql innodb_table_stats diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result index b56c5115f16..fc9ba660467 100644 --- a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result +++ b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result @@ -20,7 +20,6 @@ def mysql PRIMARY mysql help_keyword PRIMARY KEY def mysql PRIMARY mysql help_relation PRIMARY KEY def mysql name mysql help_topic UNIQUE def mysql PRIMARY mysql help_topic PRIMARY KEY -def mysql PRIMARY mysql host PRIMARY KEY def mysql PRIMARY mysql index_stats PRIMARY KEY def mysql PRIMARY mysql innodb_index_stats PRIMARY KEY def mysql PRIMARY mysql innodb_table_stats PRIMARY KEY diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result index b40bc0ea0c7..54e27e22140 100644 --- a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result @@ -20,7 +20,6 @@ def mysql PRIMARY mysql help_keyword PRIMARY KEY def mysql PRIMARY mysql help_relation PRIMARY KEY def mysql name mysql help_topic UNIQUE def mysql PRIMARY mysql help_topic PRIMARY KEY -def mysql PRIMARY mysql host PRIMARY KEY def mysql PRIMARY mysql index_stats PRIMARY KEY def mysql PRIMARY mysql innodb_index_stats PRIMARY KEY def mysql PRIMARY mysql innodb_table_stats PRIMARY KEY @@ -58,7 +57,6 @@ def mysql PRIMARY mysql help_keyword PRIMARY KEY def mysql PRIMARY mysql help_relation PRIMARY KEY def mysql name mysql help_topic UNIQUE def mysql PRIMARY mysql help_topic PRIMARY KEY -def mysql PRIMARY mysql host PRIMARY KEY def mysql PRIMARY mysql index_stats PRIMARY KEY def mysql PRIMARY mysql innodb_index_stats PRIMARY KEY def mysql PRIMARY mysql innodb_table_stats PRIMARY KEY diff --git a/mysql-test/suite/funcs_1/r/is_tables_is.result b/mysql-test/suite/funcs_1/r/is_tables_is.result index e0e5a82a265..5fee1e0050a 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_is.result +++ b/mysql-test/suite/funcs_1/r/is_tables_is.result @@ -89,6 +89,31 @@ user_comment Separator ----------------------------------------------------- TABLE_CATALOG def TABLE_SCHEMA information_schema +TABLE_NAME CHECK_CONSTRAINTS +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 11 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +MAX_INDEX_LENGTH #MIL# +TEMPORARY Y +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG def +TABLE_SCHEMA information_schema TABLE_NAME CLIENT_STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY @@ -1105,6 +1130,31 @@ user_comment Separator ----------------------------------------------------- TABLE_CATALOG def TABLE_SCHEMA information_schema +TABLE_NAME CHECK_CONSTRAINTS +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 11 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +MAX_INDEX_LENGTH #MIL# +TEMPORARY Y +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG def +TABLE_SCHEMA information_schema TABLE_NAME CLIENT_STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY diff --git a/mysql-test/suite/funcs_1/r/is_tables_is_embedded.result b/mysql-test/suite/funcs_1/r/is_tables_is_embedded.result index e0e5a82a265..5fee1e0050a 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_is_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_tables_is_embedded.result @@ -89,6 +89,31 @@ user_comment Separator ----------------------------------------------------- TABLE_CATALOG def TABLE_SCHEMA information_schema +TABLE_NAME CHECK_CONSTRAINTS +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 11 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +MAX_INDEX_LENGTH #MIL# +TEMPORARY Y +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG def +TABLE_SCHEMA information_schema TABLE_NAME CLIENT_STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY @@ -1105,6 +1130,31 @@ user_comment Separator ----------------------------------------------------- TABLE_CATALOG def TABLE_SCHEMA information_schema +TABLE_NAME CHECK_CONSTRAINTS +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 11 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +MAX_INDEX_LENGTH #MIL# +TEMPORARY Y +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG def +TABLE_SCHEMA information_schema TABLE_NAME CLIENT_STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY diff --git a/mysql-test/suite/funcs_1/r/is_tables_mysql.result b/mysql-test/suite/funcs_1/r/is_tables_mysql.result index 2ceed585699..9d1539bc778 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_mysql.result +++ b/mysql-test/suite/funcs_1/r/is_tables_mysql.result @@ -16,7 +16,7 @@ TABLE_NAME columns_priv TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -66,7 +66,7 @@ TABLE_NAME db TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -116,7 +116,7 @@ TABLE_NAME func TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -166,7 +166,7 @@ TABLE_NAME gtid_slave_pos TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -216,7 +216,7 @@ TABLE_NAME help_keyword TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -241,7 +241,7 @@ TABLE_NAME help_relation TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -287,31 +287,6 @@ user_comment help topics Separator ----------------------------------------------------- TABLE_CATALOG def TABLE_SCHEMA mysql -TABLE_NAME host -TABLE_TYPE BASE TABLE -ENGINE MYISAM_OR_MARIA -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -MAX_INDEX_LENGTH #MIL# -TEMPORARY N -user_comment Host privileges; Merged with database privileges -Separator ----------------------------------------------------- -TABLE_CATALOG def -TABLE_SCHEMA mysql TABLE_NAME index_stats TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA @@ -441,7 +416,7 @@ TABLE_NAME procs_priv TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -466,7 +441,7 @@ TABLE_NAME proxies_priv TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -491,7 +466,7 @@ TABLE_NAME roles_mapping TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -516,7 +491,7 @@ TABLE_NAME servers TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -566,7 +541,7 @@ TABLE_NAME tables_priv TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -616,7 +591,7 @@ TABLE_NAME time_zone TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -641,7 +616,7 @@ TABLE_NAME time_zone_leap_second TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -666,7 +641,7 @@ TABLE_NAME time_zone_name TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -691,7 +666,7 @@ TABLE_NAME time_zone_transition TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -716,7 +691,7 @@ TABLE_NAME time_zone_transition_type TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# diff --git a/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result index 77fa6ddae1e..c28b4b45ede 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result @@ -16,7 +16,7 @@ TABLE_NAME columns_priv TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -66,7 +66,7 @@ TABLE_NAME db TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -116,7 +116,7 @@ TABLE_NAME func TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -166,7 +166,7 @@ TABLE_NAME gtid_slave_pos TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -216,7 +216,7 @@ TABLE_NAME help_keyword TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -241,7 +241,7 @@ TABLE_NAME help_relation TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -287,31 +287,6 @@ user_comment help topics Separator ----------------------------------------------------- TABLE_CATALOG def TABLE_SCHEMA mysql -TABLE_NAME host -TABLE_TYPE BASE TABLE -ENGINE MYISAM_OR_MARIA -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -MAX_INDEX_LENGTH #MIL# -TEMPORARY N -user_comment Host privileges; Merged with database privileges -Separator ----------------------------------------------------- -TABLE_CATALOG def -TABLE_SCHEMA mysql TABLE_NAME index_stats TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA @@ -441,7 +416,7 @@ TABLE_NAME procs_priv TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -466,7 +441,7 @@ TABLE_NAME proxies_priv TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -491,7 +466,7 @@ TABLE_NAME roles_mapping TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -516,7 +491,7 @@ TABLE_NAME servers TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -566,7 +541,7 @@ TABLE_NAME tables_priv TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -616,7 +591,7 @@ TABLE_NAME time_zone TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -641,7 +616,7 @@ TABLE_NAME time_zone_leap_second TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -666,7 +641,7 @@ TABLE_NAME time_zone_name TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -691,7 +666,7 @@ TABLE_NAME time_zone_transition TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -716,7 +691,7 @@ TABLE_NAME time_zone_transition_type TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -805,7 +780,7 @@ TABLE_NAME columns_priv TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -855,7 +830,7 @@ TABLE_NAME db TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -905,7 +880,7 @@ TABLE_NAME func TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -955,7 +930,7 @@ TABLE_NAME gtid_slave_pos TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -1005,7 +980,7 @@ TABLE_NAME help_keyword TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -1030,7 +1005,7 @@ TABLE_NAME help_relation TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -1076,31 +1051,6 @@ user_comment help topics Separator ----------------------------------------------------- TABLE_CATALOG def TABLE_SCHEMA mysql -TABLE_NAME host -TABLE_TYPE BASE TABLE -ENGINE MYISAM_OR_MARIA -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -MAX_INDEX_LENGTH #MIL# -TEMPORARY N -user_comment Host privileges; Merged with database privileges -Separator ----------------------------------------------------- -TABLE_CATALOG def -TABLE_SCHEMA mysql TABLE_NAME index_stats TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA @@ -1230,7 +1180,7 @@ TABLE_NAME procs_priv TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -1255,7 +1205,7 @@ TABLE_NAME proxies_priv TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -1280,7 +1230,7 @@ TABLE_NAME roles_mapping TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -1305,7 +1255,7 @@ TABLE_NAME servers TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -1355,7 +1305,7 @@ TABLE_NAME tables_priv TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -1405,7 +1355,7 @@ TABLE_NAME time_zone TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -1430,7 +1380,7 @@ TABLE_NAME time_zone_leap_second TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -1455,7 +1405,7 @@ TABLE_NAME time_zone_name TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -1480,7 +1430,7 @@ TABLE_NAME time_zone_transition TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -1505,7 +1455,7 @@ TABLE_NAME time_zone_transition_type TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# diff --git a/mysql-test/suite/funcs_1/r/is_user_privileges.result b/mysql-test/suite/funcs_1/r/is_user_privileges.result index cb619831baa..fa1284c355e 100644 --- a/mysql-test/suite/funcs_1/r/is_user_privileges.result +++ b/mysql-test/suite/funcs_1/r/is_user_privileges.result @@ -128,7 +128,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -175,7 +175,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -222,7 +222,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -293,7 +293,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -340,7 +340,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -387,7 +387,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -444,7 +444,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -491,7 +491,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -538,7 +538,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -617,7 +617,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -664,7 +664,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -711,7 +711,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -782,7 +782,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -829,7 +829,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -876,7 +876,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -933,7 +933,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -980,7 +980,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -1027,7 +1027,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -1136,7 +1136,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -1183,7 +1183,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -1230,7 +1230,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -1334,7 +1334,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -1381,7 +1381,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -1428,7 +1428,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -1485,7 +1485,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -1532,7 +1532,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -1579,7 +1579,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -1643,7 +1643,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -1690,7 +1690,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -1737,7 +1737,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -1816,7 +1816,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -1863,7 +1863,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N @@ -1910,7 +1910,7 @@ max_questions 0 max_updates 0 max_connections 0 max_user_connections 0 -plugin +plugin mysql_native_password authentication_string password_expired N is_role N diff --git a/mysql-test/suite/funcs_1/r/memory_func_view.result b/mysql-test/suite/funcs_1/r/memory_func_view.result index 3a75e4abac5..62c9a245010 100644 --- a/mysql-test/suite/funcs_1/r/memory_func_view.result +++ b/mysql-test/suite/funcs_1/r/memory_func_view.result @@ -3779,14 +3779,14 @@ WHERE select_id = 51 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id NULL NULL 1 NULL 2 -00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 --00:00:00 ---äÖüß@µ*$-- 4 +NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 +NULL ---äÖüß@µ*$-- 4 -00:00:01 -1 5 41:58:00 1 17:58 23 Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' +Warning 1292 Incorrect time value: '' +Warning 1292 Incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as time) AS `CAST(my_varbinary_1000 AS TIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3796,14 +3796,14 @@ WHERE select_id = 51 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id NULL NULL 1 NULL 2 -00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 --00:00:00 ---äÖüß@µ*$-- 4 +NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 +NULL ---äÖüß@µ*$-- 4 -00:00:01 -1 5 41:58:00 1 17:58 23 Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' +Warning 1292 Incorrect time value: '' +Warning 1292 Incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' DROP VIEW v1; @@ -3814,15 +3814,15 @@ my_binary_30, id FROM t1_values WHERE select_id = 50 OR select_id IS NULL order by id; CAST(my_binary_30 AS TIME) my_binary_30 id NULL NULL 1 -00:00:00 2 -00:00:00 <--------30 characters-------> 3 --00:00:00 ---äÖüß@µ*$-- 4 +NULL 2 +NULL <--------30 characters-------> 3 +NULL ---äÖüß@µ*$-- 4 -00:00:01 -1 5 41:58:00 1 17:58 22 Warnings: -Warning 1292 Truncated incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1292 Truncated incorrect time value: '<--------30 characters------->' -Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' +Warning 1292 Incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' +Warning 1292 Incorrect time value: '<--------30 characters------->' +Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect time value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect time value: '1 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' SHOW CREATE VIEW v1; @@ -3833,15 +3833,15 @@ WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 50 OR select_id IS NULL) order by id; CAST(my_binary_30 AS TIME) my_binary_30 id NULL NULL 1 -00:00:00 -00:00:00 <--------30 characters-------> 3 --00:00:00 ---äÖüß@µ*$-- +NULL +NULL <--------30 characters-------> 3 +NULL ---äÖüß@µ*$-- -00:00:01 -1 41:58:00 1 17:58 Warnings: -Warning 1292 Truncated incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1292 Truncated incorrect time value: '<--------30 characters------->' -Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' +Warning 1292 Incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' +Warning 1292 Incorrect time value: '<--------30 characters------->' +Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect time value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect time value: '1 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' DROP VIEW v1; @@ -3855,14 +3855,14 @@ WHERE select_id = 49 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS TIME) my_varchar_1000 id NULL NULL 1 NULL 2 -00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 --00:00:00 ---äÖüß@µ*$-- 4 +NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 +NULL ---äÖüß@µ*$-- 4 -00:00:01 -1 5 41:58:00 1 17:58 21 Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' +Warning 1292 Incorrect time value: '' +Warning 1292 Incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as time) AS `CAST(my_varchar_1000 AS TIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3872,14 +3872,14 @@ WHERE select_id = 49 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS TIME) my_varchar_1000 id NULL NULL 1 NULL 2 -00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 --00:00:00 ---äÖüß@µ*$-- 4 +NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 +NULL ---äÖüß@µ*$-- 4 -00:00:01 -1 5 41:58:00 1 17:58 21 Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' +Warning 1292 Incorrect time value: '' +Warning 1292 Incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' DROP VIEW v1; @@ -3891,14 +3891,14 @@ WHERE select_id = 48 OR select_id IS NULL order by id; CAST(my_char_30 AS TIME) my_char_30 id NULL NULL 1 NULL 2 -00:00:00 <--------30 characters-------> 3 --00:00:00 ---äÖüß@µ*$-- 4 +NULL <--------30 characters-------> 3 +NULL ---äÖüß@µ*$-- 4 -00:00:01 -1 5 41:58:00 1 17:58 20 Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<--------30 characters------->' -Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--' +Warning 1292 Incorrect time value: '' +Warning 1292 Incorrect time value: '<--------30 characters------->' +Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as time) AS `CAST(my_char_30 AS TIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3908,14 +3908,14 @@ WHERE select_id = 48 OR select_id IS NULL) order by id; CAST(my_char_30 AS TIME) my_char_30 id NULL NULL 1 NULL 2 -00:00:00 <--------30 characters-------> 3 --00:00:00 ---äÖüß@µ*$-- 4 +NULL <--------30 characters-------> 3 +NULL ---äÖüß@µ*$-- 4 -00:00:01 -1 5 41:58:00 1 17:58 20 Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<--------30 characters------->' -Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--' +Warning 1292 Incorrect time value: '' +Warning 1292 Incorrect time value: '<--------30 characters------->' +Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--' DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/r/myisam_func_view.result b/mysql-test/suite/funcs_1/r/myisam_func_view.result index 3a75e4abac5..62c9a245010 100644 --- a/mysql-test/suite/funcs_1/r/myisam_func_view.result +++ b/mysql-test/suite/funcs_1/r/myisam_func_view.result @@ -3779,14 +3779,14 @@ WHERE select_id = 51 OR select_id IS NULL order by id; CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id NULL NULL 1 NULL 2 -00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 --00:00:00 ---äÖüß@µ*$-- 4 +NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 +NULL ---äÖüß@µ*$-- 4 -00:00:01 -1 5 41:58:00 1 17:58 23 Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' +Warning 1292 Incorrect time value: '' +Warning 1292 Incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as time) AS `CAST(my_varbinary_1000 AS TIME)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3796,14 +3796,14 @@ WHERE select_id = 51 OR select_id IS NULL) order by id; CAST(my_varbinary_1000 AS TIME) my_varbinary_1000 id NULL NULL 1 NULL 2 -00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 --00:00:00 ---äÖüß@µ*$-- 4 +NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 +NULL ---äÖüß@µ*$-- 4 -00:00:01 -1 5 41:58:00 1 17:58 23 Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' +Warning 1292 Incorrect time value: '' +Warning 1292 Incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' DROP VIEW v1; @@ -3814,15 +3814,15 @@ my_binary_30, id FROM t1_values WHERE select_id = 50 OR select_id IS NULL order by id; CAST(my_binary_30 AS TIME) my_binary_30 id NULL NULL 1 -00:00:00 2 -00:00:00 <--------30 characters-------> 3 --00:00:00 ---äÖüß@µ*$-- 4 +NULL 2 +NULL <--------30 characters-------> 3 +NULL ---äÖüß@µ*$-- 4 -00:00:01 -1 5 41:58:00 1 17:58 22 Warnings: -Warning 1292 Truncated incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1292 Truncated incorrect time value: '<--------30 characters------->' -Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' +Warning 1292 Incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' +Warning 1292 Incorrect time value: '<--------30 characters------->' +Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect time value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect time value: '1 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' SHOW CREATE VIEW v1; @@ -3833,15 +3833,15 @@ WHERE v1.id IN (SELECT id FROM t1_values WHERE select_id = 50 OR select_id IS NULL) order by id; CAST(my_binary_30 AS TIME) my_binary_30 id NULL NULL 1 -00:00:00 -00:00:00 <--------30 characters-------> 3 --00:00:00 ---äÖüß@µ*$-- +NULL +NULL <--------30 characters-------> 3 +NULL ---äÖüß@µ*$-- -00:00:01 -1 41:58:00 1 17:58 Warnings: -Warning 1292 Truncated incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' -Warning 1292 Truncated incorrect time value: '<--------30 characters------->' -Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' +Warning 1292 Incorrect time value: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' +Warning 1292 Incorrect time value: '<--------30 characters------->' +Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect time value: '-1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' Warning 1292 Truncated incorrect time value: '1 17:58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' DROP VIEW v1; @@ -3855,14 +3855,14 @@ WHERE select_id = 49 OR select_id IS NULL order by id; CAST(my_varchar_1000 AS TIME) my_varchar_1000 id NULL NULL 1 NULL 2 -00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 --00:00:00 ---äÖüß@µ*$-- 4 +NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 +NULL ---äÖüß@µ*$-- 4 -00:00:01 -1 5 41:58:00 1 17:58 21 Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' +Warning 1292 Incorrect time value: '' +Warning 1292 Incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as time) AS `CAST(my_varchar_1000 AS TIME)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3872,14 +3872,14 @@ WHERE select_id = 49 OR select_id IS NULL) order by id; CAST(my_varchar_1000 AS TIME) my_varchar_1000 id NULL NULL 1 NULL 2 -00:00:00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 --00:00:00 ---äÖüß@µ*$-- 4 +NULL <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3 +NULL ---äÖüß@µ*$-- 4 -00:00:01 -1 5 41:58:00 1 17:58 21 Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' -Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' +Warning 1292 Incorrect time value: '' +Warning 1292 Incorrect time value: '<---------1000 characters-------------------------------------------------------------------------------------------------------' +Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$-- ' DROP VIEW v1; @@ -3891,14 +3891,14 @@ WHERE select_id = 48 OR select_id IS NULL order by id; CAST(my_char_30 AS TIME) my_char_30 id NULL NULL 1 NULL 2 -00:00:00 <--------30 characters-------> 3 --00:00:00 ---äÖüß@µ*$-- 4 +NULL <--------30 characters-------> 3 +NULL ---äÖüß@µ*$-- 4 -00:00:01 -1 5 41:58:00 1 17:58 20 Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<--------30 characters------->' -Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--' +Warning 1292 Incorrect time value: '' +Warning 1292 Incorrect time value: '<--------30 characters------->' +Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--' SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as time) AS `CAST(my_char_30 AS TIME)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci @@ -3908,14 +3908,14 @@ WHERE select_id = 48 OR select_id IS NULL) order by id; CAST(my_char_30 AS TIME) my_char_30 id NULL NULL 1 NULL 2 -00:00:00 <--------30 characters-------> 3 --00:00:00 ---äÖüß@µ*$-- 4 +NULL <--------30 characters-------> 3 +NULL ---äÖüß@µ*$-- 4 -00:00:01 -1 5 41:58:00 1 17:58 20 Warnings: -Warning 1292 Truncated incorrect time value: '' -Warning 1292 Truncated incorrect time value: '<--------30 characters------->' -Warning 1292 Truncated incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--' +Warning 1292 Incorrect time value: '' +Warning 1292 Incorrect time value: '<--------30 characters------->' +Warning 1292 Incorrect time value: ' ---\xC3\xA4\xC3\x96\xC3\xBC\xC3\x9F@\xC2\xB5*$--' DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/t/is_check_constraints.test b/mysql-test/suite/funcs_1/t/is_check_constraints.test new file mode 100644 index 00000000000..b39abdc1b24 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_check_constraints.test @@ -0,0 +1,69 @@ +--source include/have_innodb.inc +--echo # +--echo # MDEV-14474: Create INFORMATION_SCHEMA.CHECK_CONSTRAINTS +--echo # + +set check_constraint_checks=1; + +use test; +create table t0 +( + t int, check (t>32) # table constraint +) ENGINE=myisam; + +--vertical_results +SELECT * from information_schema.check_constraints order by check_clause; + +ALTER TABLE t0 +ADD CONSTRAINT CHK_t0_t CHECK(t<100); + +SELECT * from information_schema.check_constraints order by check_clause; + +ALTER TABLE t0 +DROP CONSTRAINT CHK_t0_t; + +SELECT * from information_schema.check_constraints order by check_clause; + +CREATE TABLE t1 +( t int CHECK(t>2), # field constraint + tt int, CONSTRAINT CHK_tt CHECK(tt<100) # table constraint +) ENGINE=InnoDB; + +SELECT * from information_schema.check_constraints order by check_clause; + +ALTER TABLE t1 +DROP CONSTRAINT CHK_tt; + +SELECT * from information_schema.check_constraints order by check_clause; + +create table t2 +( +name VARCHAR(30) CHECK(CHAR_LENGTH(name)>2), #field constraint +start_date DATE, +end_date DATE, +CONSTRAINT CHK_dates CHECK(start_date IS NULL) #table constraint +)ENGINE=Innodb; + +SELECT * from information_schema.check_constraints order by check_clause; + +ALTER TABLE t1 +ADD CONSTRAINT CHK_new_ CHECK(t>tt); + +SELECT * from information_schema.check_constraints order by check_clause; + + +# Create table with same field and table check constraint name +create table t3 +( +a int, +b int check (b>0), # field constraint named 'b' +CONSTRAINT b check (b>10) # table constraint +) ENGINE=InnoDB; + +--horizontal_results +select * from information_schema.check_constraints order by check_clause; + +drop table t0; +drop table t1; +drop table t2; +drop table t3; diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index 322eff3506f..e84832458a3 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -24,15 +24,28 @@ galera_gcache_recover : MDEV-13549 Galera test failures galera_gcache_recover_full_gcache : MDEV-13549 Galera test failures galera_gcache_recover_manytrx : MDEV-13549 Galera test failures galera_ssl_upgrade : MDEV-13549 Galera test failures -galera.MW-329 : wsrep_local_replays not stable -galera.MW-328A : have_deadlocks test not stable -query_cache : MDEV-15805 Test failure on galera.query_cache +MW-329 : wsrep_local_replays not stable MW-416 : MDEV-13549 Galera test failures -galera_wan : MDEV-13549 Galera test failures MW-388 : MDEV-13549 Galera test failures -galera.MW-44 : MDEV-15809 Test failure on galera.MW-44 -galera.galera_pc_ignore_sb : MDEV-15811 Test failure on galera_pc_ignore_sb +MW-44 : MDEV-15809 Test failure on galera.MW-44 +galera_pc_ignore_sb : MDEV-15811 Test failure on galera_pc_ignore_sb galera_kill_applier : race condition at the start of the test galera_ist_progress: MDEV-15236 galera_ist_progress fails when trying to read transfer status -galera_concurrent_ctas : MDEV-15845 Test failure on galera.galera_concurrent_ctas pxc-421: Lock timeout exceeded +galera_sst_mysqldump_with_key : MDEV-16890 Galera test failure +galera_sst_xtrabackup-v2-options : Failed to read uuid:seqno and wsrep_gtid_domain_id from joiner script +MW-328C : Timeouts +galera_gcs_fc_limit : Timeouts +pool_of_threads: WSREP has not yet prepared node for application use +galera_var_innodb_disallow_writes : Timeout +MW-336 : nondeterministic wsrep_thread_count +galera_binlog_stmt_autoinc : MDEV-17106 Test failure on galera.galera_binlog_stmt_autoinc +galera_kill_ddl : MDEV-17108 Test failure on galera.galera_kill_ddl +galera_var_node_address : MDEV-17151 Galera test failure on galera.galera_var_node_address +galera_binlog_stmt_autoinc: MDEV-17106 Test failure on galera.galera_binlog_stmt_autoinc +galera_gc_fc_limit : MDEV-17061 Test failure on galera.galera_gc_fc_limit +partition : MDEV-13881 galera.partition failed in buildbot with wrong result +galera_as_slave_replication_budle : MDEV-15785 Test case galera_as_slave_replication_bundle caused debug assertion +galera_wan : MDEV-17259: Test failure on galera.galera_wan +galera_pc_ignore_sb : MDEV-17357 Test failure on galera.galera_pc_ignore_sb +galera_drop_database : test diff --git a/mysql-test/suite/galera/include/reset_query_cache.inc b/mysql-test/suite/galera/include/reset_query_cache.inc new file mode 100644 index 00000000000..6e33b886f08 --- /dev/null +++ b/mysql-test/suite/galera/include/reset_query_cache.inc @@ -0,0 +1,11 @@ +--disable_query_log +--disable_result_log +--connection node_1 +flush query cache; +reset query cache; + +--connection node_2 +flush query cache; +reset query cache; +--enable_result_log +--enable_query_log diff --git a/mysql-test/suite/galera/r/MW-286.result b/mysql-test/suite/galera/r/MW-286.result index adc996c1cbe..f3bef6f7516 100644 --- a/mysql-test/suite/galera/r/MW-286.result +++ b/mysql-test/suite/galera/r/MW-286.result @@ -1,13 +1,15 @@ -CREATE TABLE ten (f1 INTEGER); +connection node_1; +CREATE TABLE ten (f1 INTEGER) Engine=InnoDB; INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; INSERT INTO t1 (f1) SELECT 000000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; INSERT INTO t1 (f1) SELECT 100000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;; +connection node_2; SET GLOBAL wsrep_desync = TRUE; SET wsrep_on = FALSE; ALTER TABLE t1 ADD PRIMARY KEY (f1); -ERROR 70100: Query execution was interrupted SET wsrep_on = TRUE; SET GLOBAL wsrep_desync = FALSE; +connection node_1; DROP TABLE t1; DROP TABLE ten; diff --git a/mysql-test/suite/galera/r/MW-336.result b/mysql-test/suite/galera/r/MW-336.result index 0bf8d9d3909..e35044d872b 100644 --- a/mysql-test/suite/galera/r/MW-336.result +++ b/mysql-test/suite/galera/r/MW-336.result @@ -1,40 +1,133 @@ CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; +INSERT INTO t1 values(0); connection node_1; SET GLOBAL wsrep_slave_threads = 10; SET GLOBAL wsrep_slave_threads = 1; +<<<<<<< HEAD +SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%'); +COUNT(*) +11 +SHOW STATUS LIKE 'wsrep_thread_count'; +Variable_name Value +wsrep_thread_count 11 connection node_2; INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +======= +# Wait 10 slave threads to start 1 +connection node_2; +# Generate 12 replication events +>>>>>>> 10.2 connection node_1; +SELECT COUNT(*) FROM t1; +COUNT(*) +13 +# Wait 9 slave threads to exit 1 SET GLOBAL wsrep_slave_threads = 10; +# Wait 10 slave threads to start 2 SET GLOBAL wsrep_slave_threads = 20; +# Wait 20 slave threads to start 3 SET GLOBAL wsrep_slave_threads = 1; connection node_2; +<<<<<<< HEAD +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1); -INSERT INTO t1 VALUES (2); -INSERT INTO t1 VALUES (3); -INSERT INTO t1 VALUES (4); -INSERT INTO t1 VALUES (5); -INSERT INTO t1 VALUES (6); -INSERT INTO t1 VALUES (7); -INSERT INTO t1 VALUES (8); -INSERT INTO t1 VALUES (9); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +======= +# Generate 40 replication events connection node_1; +SELECT COUNT(*) FROM t1; +COUNT(*) +53 +# Wait 10 slave threads to exit 3 +>>>>>>> 10.2 SET GLOBAL wsrep_slave_threads = 10; SET GLOBAL wsrep_slave_threads = 0; Warnings: Warning 1292 Truncated incorrect wsrep_slave_threads value: '0' +# Wait 10 slave threads to start 3 connection node_2; -INSERT INTO t1 VALUES (10); -INSERT INTO t1 VALUES (11); -INSERT INTO t1 VALUES (12); -INSERT INTO t1 VALUES (13); -INSERT INTO t1 VALUES (14); -INSERT INTO t1 VALUES (15); -INSERT INTO t1 VALUES (16); -INSERT INTO t1 VALUES (17); -INSERT INTO t1 VALUES (18); -INSERT INTO t1 VALUES (19); -INSERT INTO t1 VALUES (20); +<<<<<<< HEAD +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); connection node_1; SET GLOBAL wsrep_slave_threads = 1; +connection node_2; +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +INSERT INTO t1 VALUES (1); +connection node_1; +======= +# Generate 12 replication events +connection node_1; +SELECT COUNT(*) FROM t1; +COUNT(*) +65 +# Wait 10 slave threads to exit 4 +connection node_1; +>>>>>>> 10.2 DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/MW-44.result b/mysql-test/suite/galera/r/MW-44.result index 459a61030a4..a07719daca1 100644 --- a/mysql-test/suite/galera/r/MW-44.result +++ b/mysql-test/suite/galera/r/MW-44.result @@ -1,31 +1,19 @@ -SET GLOBAL general_log='OFF'; TRUNCATE TABLE mysql.general_log; -SELECT COUNT(*) from mysql.general_log; -COUNT(*) -0 -SELECT * FROM mysql.general_log; -event_time user_host thread_id server_id command_type argument -SET GLOBAL general_log='OFF'; TRUNCATE TABLE mysql.general_log; -SELECT COUNT(*) from mysql.general_log; -COUNT(*) -0 -SELECT * FROM mysql.general_log; -event_time user_host thread_id server_id command_type argument +SELECT Argument FROM mysql.general_log; +Argument SET GLOBAL general_log='ON'; -SELECT COUNT(*) from mysql.general_log; -COUNT(*) -1 SET SESSION wsrep_osu_method=TOI; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; SET SESSION wsrep_osu_method=RSU; ALTER TABLE t1 ADD COLUMN f2 INTEGER; SET SESSION wsrep_osu_method=TOI; -SELECT COUNT(*) = 2 FROM mysql.general_log WHERE argument LIKE 'CREATE%' OR argument LIKE 'ALTER%'; -COUNT(*) = 2 -1 -SET GLOBAL general_log='ON'; -SELECT COUNT(*) = 0 FROM mysql.general_log WHERE argument NOT LIKE 'SELECT%'; -COUNT(*) = 0 -1 +SELECT argument FROM mysql.general_log WHERE argument LIKE 'CREATE%' OR argument LIKE 'ALTER%'; +argument +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB +ALTER TABLE t1 ADD COLUMN f2 INTEGER +SELECT Argument FROM mysql.general_log; +Argument DROP TABLE t1; +SET GLOBAL general_log='OFF'; +SET GLOBAL general_log='OFF'; diff --git a/mysql-test/suite/galera/r/galera#505.result b/mysql-test/suite/galera/r/galera#505.result new file mode 100644 index 00000000000..8d3e3ec072a --- /dev/null +++ b/mysql-test/suite/galera/r/galera#505.result @@ -0,0 +1,8 @@ +connection node_1; +SET SESSION wsrep_sync_wait=0; +SET SESSION wsrep_sync_wait=DEFAULT; +SET GLOBAL wsrep_provider_options = 'pc.weight=3'; +SHOW GLOBAL VARIABLES LIKE 'wsrep_provider_options'; +Variable_name Value +wsrep_provider_options pc.weight = 3 +SET GLOBAL wsrep_provider_options = 'pc.weight=1'; diff --git a/mysql-test/suite/galera/r/galera_bf_background_statistics.result b/mysql-test/suite/galera/r/galera_bf_background_statistics.result new file mode 100644 index 00000000000..c2c3fce2b14 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_bf_background_statistics.result @@ -0,0 +1,33 @@ +SELECT @@innodb_stats_persistent; +@@innodb_stats_persistent +1 +CREATE TABLE t1 (f1 INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, f2 INTEGER DEFAULT 1) ENGINE=InnoDB; +INSERT INTO t1(f1) values (NULL); +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +SELECT count(1) from t1; +count(1) +16384 +connection node_2; +SET AUTOCOMMIT=OFF; +INSERT INTO t1 VALUES (9999999,NULL); +SELECT SLEEP(1000);; +connection node_1; +ALTER TABLE t1 CHANGE f2 f2 INTEGER NOT NULL DEFAULT 1; +connection node_2; +ERROR 40001: Deadlock: wsrep aborted transaction +wsrep_local_aborts_increment +1 +DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_binlog_stmt_autoinc.result b/mysql-test/suite/galera/r/galera_binlog_stmt_autoinc.result new file mode 100644 index 00000000000..8e8b79b168f --- /dev/null +++ b/mysql-test/suite/galera/r/galera_binlog_stmt_autoinc.result @@ -0,0 +1,147 @@ +SET GLOBAL wsrep_forced_binlog_format='STATEMENT'; +SET GLOBAL wsrep_forced_binlog_format='STATEMENT'; +CREATE TABLE t1 ( +i int(11) NOT NULL AUTO_INCREMENT, +c char(32) DEFAULT 'dummy_text', +PRIMARY KEY (i) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +insert into t1(i) values(null); +select * from t1; +i c +3 dummy_text +insert into t1(i) values(null), (null), (null); +select * from t1; +i c +3 dummy_text +5 dummy_text +7 dummy_text +9 dummy_text +select * from t1; +i c +3 dummy_text +5 dummy_text +7 dummy_text +9 dummy_text +SET GLOBAL wsrep_forced_binlog_format='none'; +SET GLOBAL wsrep_forced_binlog_format='none'; +drop table t1; +SET SESSION binlog_format='STATEMENT'; +show variables like 'binlog_format'; +Variable_name Value +binlog_format STATEMENT +SET GLOBAL wsrep_auto_increment_control='OFF'; +SET SESSION auto_increment_increment = 3; +SET SESSION auto_increment_offset = 1; +CREATE TABLE t1 ( +i int(11) NOT NULL AUTO_INCREMENT, +c char(32) DEFAULT 'dummy_text', +PRIMARY KEY (i) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +insert into t1(i) values(null); +select * from t1; +i c +4 dummy_text +insert into t1(i) values(null), (null), (null); +select * from t1; +i c +4 dummy_text +7 dummy_text +10 dummy_text +13 dummy_text +select * from t1; +i c +4 dummy_text +7 dummy_text +10 dummy_text +13 dummy_text +SET GLOBAL wsrep_auto_increment_control='ON'; +SET SESSION binlog_format='ROW'; +show variables like 'binlog_format'; +Variable_name Value +binlog_format ROW +show variables like '%auto_increment%'; +Variable_name Value +auto_increment_increment 2 +auto_increment_offset 1 +wsrep_auto_increment_control ON +SET GLOBAL wsrep_auto_increment_control='OFF'; +show variables like '%auto_increment%'; +Variable_name Value +auto_increment_increment 2 +auto_increment_offset 1 +wsrep_auto_increment_control OFF +SET GLOBAL wsrep_auto_increment_control='ON'; +drop table t1; +SET GLOBAL wsrep_forced_binlog_format='ROW'; +SET GLOBAL wsrep_forced_binlog_format='ROW'; +CREATE TABLE t1 ( +i int(11) NOT NULL AUTO_INCREMENT, +c char(32) DEFAULT 'dummy_text', +PRIMARY KEY (i) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +insert into t1(i) values(null); +select * from t1; +i c +3 dummy_text +insert into t1(i) values(null), (null), (null); +select * from t1; +i c +3 dummy_text +5 dummy_text +7 dummy_text +9 dummy_text +select * from t1; +i c +3 dummy_text +5 dummy_text +7 dummy_text +9 dummy_text +SET GLOBAL wsrep_forced_binlog_format='none'; +SET GLOBAL wsrep_forced_binlog_format='none'; +drop table t1; +SET SESSION binlog_format='ROW'; +show variables like 'binlog_format'; +Variable_name Value +binlog_format ROW +SET GLOBAL wsrep_auto_increment_control='OFF'; +SET SESSION auto_increment_increment = 3; +SET SESSION auto_increment_offset = 1; +CREATE TABLE t1 ( +i int(11) NOT NULL AUTO_INCREMENT, +c char(32) DEFAULT 'dummy_text', +PRIMARY KEY (i) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +insert into t1(i) values(null); +select * from t1; +i c +4 dummy_text +insert into t1(i) values(null), (null), (null); +select * from t1; +i c +4 dummy_text +7 dummy_text +10 dummy_text +13 dummy_text +select * from t1; +i c +4 dummy_text +7 dummy_text +10 dummy_text +13 dummy_text +SET GLOBAL wsrep_auto_increment_control='ON'; +show variables like 'binlog_format'; +Variable_name Value +binlog_format ROW +show variables like '%auto_increment%'; +Variable_name Value +auto_increment_increment 2 +auto_increment_offset 1 +wsrep_auto_increment_control ON +SET GLOBAL wsrep_auto_increment_control='OFF'; +show variables like '%auto_increment%'; +Variable_name Value +auto_increment_increment 2 +auto_increment_offset 1 +wsrep_auto_increment_control OFF +SET GLOBAL wsrep_auto_increment_control='ON'; +drop table t1; diff --git a/mysql-test/suite/galera/r/galera_defaults.result b/mysql-test/suite/galera/r/galera_defaults.result index 5c5fdabf432..8083784bb01 100644 --- a/mysql-test/suite/galera/r/galera_defaults.result +++ b/mysql-test/suite/galera/r/galera_defaults.result @@ -53,71 +53,3 @@ WSREP_SST_DONOR_REJECTS_QUERIES OFF WSREP_SST_METHOD rsync WSREP_SYNC_WAIT 15 <BASE_DIR>; <BASE_HOST>; <BASE_PORT>; cert.log_conflicts = no; debug = no; evs.auto_evict = 0; evs.causal_keepalive_period = PT1S; evs.debug_log_mask = 0x1; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT30S; evs.info_log_mask = 0; evs.install_timeout = PT15S; evs.join_retrans_period = PT1S; evs.keepalive_period = PT1S; evs.max_install_timeouts = 3; evs.send_window = 4; evs.stats_report_period = PT1M; evs.suspect_timeout = PT10S; evs.use_aggregate = true; evs.user_send_window = 2; evs.version = 0; evs.view_forget_timeout = P1D; <GCACHE_DIR>; gcache.keep_pages_size = 0; gcache.mem_size = 0; <GCACHE_NAME>; gcache.page_size = 128M; gcache.recover = no; gcache.size = 10M; gcomm.thread_prio = ; gcs.fc_debug = 0; gcs.fc_factor = 1.0; gcs.fc_limit = 16; gcs.fc_master_slave = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; <GCS_RECV_Q_HARD_LIMIT>; gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; <GMCAST_LISTEN_ADDR>; gmcast.mcast_addr = ; gmcast.mcast_ttl = 1; gmcast.peer_timeout = PT3S; gmcast.segment = 0; gmcast.time_wait = PT5S; gmcast.version = 0; <IST_RECV_ADDR>; pc.announce_timeout = PT3S; pc.checksum = false; pc.ignore_quorum = false; pc.ignore_sb = false; pc.linger = PT20S; pc.npvo = false; pc.recovery = true; pc.version = 0; pc.wait_prim = true; pc.wait_prim_timeout = PT30S; pc.weight = 1; protonet.backend = asio; protonet.version = 0; repl.causal_read_timeout = PT90S; repl.commit_order = 3; repl.key_format = FLAT8; repl.max_ws_size = 2147483647; <REPL_PROTO_MAX>;socket.checksum = 2; socket.recv_buf_size = 212992; -SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_STATUS -WHERE VARIABLE_NAME LIKE 'wsrep_%' -AND VARIABLE_NAME != 'wsrep_debug_sync_waiters'; -COUNT(*) -58 -SELECT VARIABLE_NAME FROM INFORMATION_SCHEMA.GLOBAL_STATUS -WHERE VARIABLE_NAME LIKE 'wsrep_%' -AND VARIABLE_NAME != 'wsrep_debug_sync_waiters' -ORDER BY VARIABLE_NAME; -VARIABLE_NAME -WSREP_APPLY_OOOE -WSREP_APPLY_OOOL -WSREP_APPLY_WINDOW -WSREP_CAUSAL_READS -WSREP_CERT_DEPS_DISTANCE -WSREP_CERT_INDEX_SIZE -WSREP_CERT_INTERVAL -WSREP_CLUSTER_CONF_ID -WSREP_CLUSTER_SIZE -WSREP_CLUSTER_STATE_UUID -WSREP_CLUSTER_STATUS -WSREP_COMMIT_OOOE -WSREP_COMMIT_OOOL -WSREP_COMMIT_WINDOW -WSREP_CONNECTED -WSREP_DESYNC_COUNT -WSREP_EVS_DELAYED -WSREP_EVS_EVICT_LIST -WSREP_EVS_REPL_LATENCY -WSREP_EVS_STATE -WSREP_FLOW_CONTROL_PAUSED -WSREP_FLOW_CONTROL_PAUSED_NS -WSREP_FLOW_CONTROL_RECV -WSREP_FLOW_CONTROL_SENT -WSREP_GCOMM_UUID -WSREP_INCOMING_ADDRESSES -WSREP_LAST_COMMITTED -WSREP_LOCAL_BF_ABORTS -WSREP_LOCAL_CACHED_DOWNTO -WSREP_LOCAL_CERT_FAILURES -WSREP_LOCAL_COMMITS -WSREP_LOCAL_INDEX -WSREP_LOCAL_RECV_QUEUE -WSREP_LOCAL_RECV_QUEUE_AVG -WSREP_LOCAL_RECV_QUEUE_MAX -WSREP_LOCAL_RECV_QUEUE_MIN -WSREP_LOCAL_REPLAYS -WSREP_LOCAL_SEND_QUEUE -WSREP_LOCAL_SEND_QUEUE_AVG -WSREP_LOCAL_SEND_QUEUE_MAX -WSREP_LOCAL_SEND_QUEUE_MIN -WSREP_LOCAL_STATE -WSREP_LOCAL_STATE_COMMENT -WSREP_LOCAL_STATE_UUID -WSREP_PROTOCOL_VERSION -WSREP_PROVIDER_NAME -WSREP_PROVIDER_VENDOR -WSREP_PROVIDER_VERSION -WSREP_READY -WSREP_RECEIVED -WSREP_RECEIVED_BYTES -WSREP_REPLICATED -WSREP_REPLICATED_BYTES -WSREP_REPL_DATA_BYTES -WSREP_REPL_KEYS -WSREP_REPL_KEYS_BYTES -WSREP_REPL_OTHER_BYTES -WSREP_THREAD_COUNT diff --git a/mysql-test/suite/galera/r/galera_drop_database.result b/mysql-test/suite/galera/r/galera_drop_database.result new file mode 100644 index 00000000000..79789da5a11 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_drop_database.result @@ -0,0 +1,17 @@ +CREATE DATABASE fts; +USE fts; +CREATE TABLE fts_t1 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(100), FULLTEXT (f2)) ENGINE=InnoDB; +CREATE TABLE fts_t2 (f2 VARCHAR(100), FULLTEXT (f2)) ENGINE=InnoDB; +CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +INSERT INTO fts_t1 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3; +INSERT INTO fts_t2 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3; +DROP TABLE ten; +UPDATE fts_t1 SET f2 = 'abcd'; +UPDATE fts_t2 SET f2 = 'efjh'; +USE fts; +DROP TABLE fts_t1; +DROP TABLE fts_t2; +SHOW TABLES; +Tables_in_fts +DROP DATABASE fts; diff --git a/mysql-test/suite/galera/r/galera_enum.result b/mysql-test/suite/galera/r/galera_enum.result index dcf31aa5948..a2a6317e2a0 100644 --- a/mysql-test/suite/galera/r/galera_enum.result +++ b/mysql-test/suite/galera/r/galera_enum.result @@ -6,25 +6,25 @@ INSERT IGNORE INTO t1 VALUES (0), (1), (2); Warnings: Warning 1265 Data truncated for column 'f1' at row 1 connection node_2; -SELECT COUNT(*) = 6 FROM t1; -COUNT(*) = 6 -1 -SELECT COUNT(*) = 2 FROM t1 where f1 = ''; -COUNT(*) = 2 -1 -SELECT COUNT(*) = 2 FROM t1 where f1 = 'one'; -COUNT(*) = 2 -1 +SELECT COUNT(*) FROM t1; +COUNT(*) +6 +SELECT COUNT(*) FROM t1 where f1 = ''; +COUNT(*) +2 +SELECT COUNT(*) FROM t1 where f1 = 'one'; +COUNT(*) +2 DROP TABLE t1; connection node_1; CREATE TABLE t1 (f1 ENUM('', 'one', 'two', 'three', 'four') PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (''), ('one'), ('two'); connection node_2; -SELECT COUNT(*) = 3 FROM t1; -COUNT(*) = 3 -1 -SELECT COUNT(*) = 1 FROM t1 WHERE f1 = ''; -COUNT(*) = 1 +SELECT COUNT(*) FROM t1; +COUNT(*) +3 +SELECT COUNT(*) FROM t1 WHERE f1 = ''; +COUNT(*) 1 connection node_1; SET AUTOCOMMIT=OFF; @@ -40,7 +40,12 @@ connection node_2; COMMIT; ERROR 40001: Deadlock: wsrep aborted transaction connection node_1; -SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 'three'; -COUNT(*) = 1 +SELECT COUNT(*) FROM t1 WHERE f1 = 'three'; +COUNT(*) 1 +SELECT * FROM t1; +f1 +one +two +three DROP TABLE t1; diff --git a/mysql-test/suite/galera/r/galera_ist_innodb_flush_logs,debug.rdiff b/mysql-test/suite/galera/r/galera_ist_innodb_flush_logs,debug.rdiff new file mode 100644 index 00000000000..fa1b67e7ef3 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_ist_innodb_flush_logs,debug.rdiff @@ -0,0 +1,103 @@ +--- r/galera_ist_innodb_flush_logs.result 2018-09-05 10:34:36.192439933 +0300 ++++ r/galera_ist_innodb_flush_logs.reject 2018-09-17 10:20:06.039150838 +0300 +@@ -86,3 +86,100 @@ + DROP TABLE t1; + COMMIT; + SET AUTOCOMMIT=ON; ++Performing State Transfer on a server that has been killed and restarted ++while a DDL was in progress on it ++CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++START TRANSACTION; ++INSERT INTO t1 VALUES ('node2_committed_before'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++COMMIT; ++SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; ++ALTER TABLE t1 ADD COLUMN f2 INTEGER; ++SET wsrep_sync_wait = 0; ++Killing server ... ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++COMMIT; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++Performing --wsrep-recover ... ++Starting server ... ++Using --wsrep-start-position when starting mysqld ... ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++COMMIT; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++COMMIT; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++COMMIT; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++ROLLBACK; ++SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++COUNT(*) = 2 ++1 ++SELECT COUNT(*) = 35 FROM t1; ++COUNT(*) = 35 ++1 ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++COMMIT; ++SET AUTOCOMMIT=ON; ++SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++COUNT(*) = 2 ++1 ++SELECT COUNT(*) = 35 FROM t1; ++COUNT(*) = 35 ++1 ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++DROP TABLE t1; ++COMMIT; ++SET AUTOCOMMIT=ON; ++SET GLOBAL debug_dbug = $debug_orig; diff --git a/mysql-test/suite/galera/r/galera_ist_innodb_flush_logs.result b/mysql-test/suite/galera/r/galera_ist_innodb_flush_logs.result index 5421b234ee1..e3bf407ddaa 100644 --- a/mysql-test/suite/galera/r/galera_ist_innodb_flush_logs.result +++ b/mysql-test/suite/galera/r/galera_ist_innodb_flush_logs.result @@ -86,99 +86,3 @@ COUNT(*) = 0 DROP TABLE t1; COMMIT; SET AUTOCOMMIT=ON; -Performing State Transfer on a server that has been killed and restarted -while a DDL was in progress on it -CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 VALUES ('node1_committed_before'); -INSERT INTO t1 VALUES ('node1_committed_before'); -INSERT INTO t1 VALUES ('node1_committed_before'); -INSERT INTO t1 VALUES ('node1_committed_before'); -INSERT INTO t1 VALUES ('node1_committed_before'); -START TRANSACTION; -INSERT INTO t1 VALUES ('node2_committed_before'); -INSERT INTO t1 VALUES ('node2_committed_before'); -INSERT INTO t1 VALUES ('node2_committed_before'); -INSERT INTO t1 VALUES ('node2_committed_before'); -INSERT INTO t1 VALUES ('node2_committed_before'); -COMMIT; -SET GLOBAL debug = 'd,sync.alter_opened_table'; -ALTER TABLE t1 ADD COLUMN f2 INTEGER; -SET wsrep_sync_wait = 0; -Killing server ... -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -COMMIT; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -Performing --wsrep-recover ... -Starting server ... -Using --wsrep-start-position when starting mysqld ... -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -COMMIT; -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -COMMIT; -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -COMMIT; -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -ROLLBACK; -SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; -COUNT(*) = 2 -1 -SELECT COUNT(*) = 35 FROM t1; -COUNT(*) = 35 -1 -SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; -COUNT(*) = 0 -1 -COMMIT; -SET AUTOCOMMIT=ON; -SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; -COUNT(*) = 2 -1 -SELECT COUNT(*) = 35 FROM t1; -COUNT(*) = 35 -1 -SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; -COUNT(*) = 0 -1 -DROP TABLE t1; -COMMIT; -SET AUTOCOMMIT=ON; diff --git a/mysql-test/suite/galera/r/galera_ist_mysqldump,debug.rdiff b/mysql-test/suite/galera/r/galera_ist_mysqldump,debug.rdiff new file mode 100644 index 00000000000..74e6abd713f --- /dev/null +++ b/mysql-test/suite/galera/r/galera_ist_mysqldump,debug.rdiff @@ -0,0 +1,106 @@ +--- r/galera_ist_mysqldump.result 2018-09-11 12:38:42.027479411 +0300 ++++ r/galera_ist_mysqldump.reject 2018-09-17 10:28:44.483441364 +0300 +@@ -180,6 +180,103 @@ + DROP TABLE t1; + COMMIT; + SET AUTOCOMMIT=ON; ++Performing State Transfer on a server that has been killed and restarted ++while a DDL was in progress on it ++CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++START TRANSACTION; ++INSERT INTO t1 VALUES ('node2_committed_before'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++COMMIT; ++SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; ++ALTER TABLE t1 ADD COLUMN f2 INTEGER; ++SET wsrep_sync_wait = 0; ++Killing server ... ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++COMMIT; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++Performing --wsrep-recover ... ++Starting server ... ++Using --wsrep-start-position when starting mysqld ... ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++COMMIT; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++COMMIT; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++COMMIT; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++ROLLBACK; ++SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++COUNT(*) = 2 ++1 ++SELECT COUNT(*) = 35 FROM t1; ++COUNT(*) = 35 ++1 ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++COMMIT; ++SET AUTOCOMMIT=ON; ++SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++COUNT(*) = 2 ++1 ++SELECT COUNT(*) = 35 FROM t1; ++COUNT(*) = 35 ++1 ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++DROP TABLE t1; ++COMMIT; ++SET AUTOCOMMIT=ON; ++SET GLOBAL debug_dbug = $debug_orig; + CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query"); + DROP USER sst; + CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query"); diff --git a/mysql-test/suite/galera/r/galera_ist_mysqldump.result b/mysql-test/suite/galera/r/galera_ist_mysqldump.result index 58a3ca297f8..296ecc2adc7 100644 --- a/mysql-test/suite/galera/r/galera_ist_mysqldump.result +++ b/mysql-test/suite/galera/r/galera_ist_mysqldump.result @@ -7,6 +7,7 @@ GRANT ALL PRIVILEGES ON *.* TO 'sst'; SET GLOBAL wsrep_sst_auth = 'sst:'; connection node_2; SET GLOBAL wsrep_sst_method = 'mysqldump'; +call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to .*"); connection node_1; connection node_2; Performing State Transfer on a server that has been shut down cleanly and restarted @@ -199,114 +200,6 @@ COUNT(*) = 0 DROP TABLE t1; COMMIT; SET AUTOCOMMIT=ON; -Performing State Transfer on a server that has been killed and restarted -while a DDL was in progress on it -connection node_1; -CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 VALUES ('node1_committed_before'); -INSERT INTO t1 VALUES ('node1_committed_before'); -INSERT INTO t1 VALUES ('node1_committed_before'); -INSERT INTO t1 VALUES ('node1_committed_before'); -INSERT INTO t1 VALUES ('node1_committed_before'); -connection node_2; -START TRANSACTION; -INSERT INTO t1 VALUES ('node2_committed_before'); -INSERT INTO t1 VALUES ('node2_committed_before'); -INSERT INTO t1 VALUES ('node2_committed_before'); -INSERT INTO t1 VALUES ('node2_committed_before'); -INSERT INTO t1 VALUES ('node2_committed_before'); -COMMIT; -SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; -connection node_1; -ALTER TABLE t1 ADD COLUMN f2 INTEGER; -connection node_2; -SET wsrep_sync_wait = 0; -Killing server ... -connection node_1; -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -COMMIT; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1; -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -connection node_2; -Performing --wsrep-recover ... -connection node_2; -Starting server ... -Using --wsrep-start-position when starting mysqld ... -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -COMMIT; -connection node_1; -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -COMMIT; -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -COMMIT; -connection node_1a_galera_st_kill_slave_ddl; -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -ROLLBACK; -SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; -COUNT(*) = 2 -1 -SELECT COUNT(*) = 35 FROM t1; -COUNT(*) = 35 -1 -SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; -COUNT(*) = 0 -1 -COMMIT; -SET AUTOCOMMIT=ON; -connection node_1; -SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; -COUNT(*) = 2 -1 -SELECT COUNT(*) = 35 FROM t1; -COUNT(*) = 35 -1 -SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; -COUNT(*) = 0 -1 -DROP TABLE t1; -COMMIT; -SET AUTOCOMMIT=ON; -SET GLOBAL debug_dbug = $debug_orig; connection node_1; CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query"); DROP USER sst; diff --git a/mysql-test/suite/galera/r/galera_ist_rsync,debug.rdiff b/mysql-test/suite/galera/r/galera_ist_rsync,debug.rdiff new file mode 100644 index 00000000000..260f8a8cab8 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_ist_rsync,debug.rdiff @@ -0,0 +1,114 @@ +--- r/galera_ist_rsync.result 2018-09-11 12:38:42.027479411 +0300 ++++ r/galera_ist_rsync.reject 2018-09-17 10:50:16.527307668 +0300 +@@ -259,3 +259,111 @@ + DROP TABLE t1; + COMMIT; + SET AUTOCOMMIT=ON; ++Performing State Transfer on a server that has been killed and restarted ++while a DDL was in progress on it ++connection node_1; ++CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++connection node_2; ++START TRANSACTION; ++INSERT INTO t1 VALUES ('node2_committed_before'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++COMMIT; ++SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; ++connection node_1; ++ALTER TABLE t1 ADD COLUMN f2 INTEGER; ++connection node_2; ++SET wsrep_sync_wait = 0; ++Killing server ... ++connection node_1; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++COMMIT; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++connection node_2; ++Performing --wsrep-recover ... ++connection node_2; ++Starting server ... ++Using --wsrep-start-position when starting mysqld ... ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++COMMIT; ++connection node_1; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++COMMIT; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++COMMIT; ++connection node_1a_galera_st_kill_slave_ddl; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++ROLLBACK; ++SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++COUNT(*) = 2 ++1 ++SELECT COUNT(*) = 35 FROM t1; ++COUNT(*) = 35 ++1 ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++COMMIT; ++SET AUTOCOMMIT=ON; ++connection node_1; ++SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++COUNT(*) = 2 ++1 ++SELECT COUNT(*) = 35 FROM t1; ++COUNT(*) = 35 ++1 ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++DROP TABLE t1; ++COMMIT; ++SET AUTOCOMMIT=ON; ++SET GLOBAL debug_dbug = $debug_orig; diff --git a/mysql-test/suite/galera/r/galera_ist_rsync.result b/mysql-test/suite/galera/r/galera_ist_rsync.result index 9c0d78d96e9..8a7c02ab1b6 100644 --- a/mysql-test/suite/galera/r/galera_ist_rsync.result +++ b/mysql-test/suite/galera/r/galera_ist_rsync.result @@ -285,111 +285,3 @@ COUNT(*) = 0 DROP TABLE t1; COMMIT; SET AUTOCOMMIT=ON; -Performing State Transfer on a server that has been killed and restarted -while a DDL was in progress on it -connection node_1; -CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 VALUES ('node1_committed_before'); -INSERT INTO t1 VALUES ('node1_committed_before'); -INSERT INTO t1 VALUES ('node1_committed_before'); -INSERT INTO t1 VALUES ('node1_committed_before'); -INSERT INTO t1 VALUES ('node1_committed_before'); -connection node_2; -START TRANSACTION; -INSERT INTO t1 VALUES ('node2_committed_before'); -INSERT INTO t1 VALUES ('node2_committed_before'); -INSERT INTO t1 VALUES ('node2_committed_before'); -INSERT INTO t1 VALUES ('node2_committed_before'); -INSERT INTO t1 VALUES ('node2_committed_before'); -COMMIT; -SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; -connection node_1; -ALTER TABLE t1 ADD COLUMN f2 INTEGER; -connection node_2; -SET wsrep_sync_wait = 0; -Killing server ... -connection node_1; -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -COMMIT; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1; -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -connection node_2; -Performing --wsrep-recover ... -connection node_2; -Starting server ... -Using --wsrep-start-position when starting mysqld ... -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -COMMIT; -connection node_1; -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -COMMIT; -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -COMMIT; -connection node_1a_galera_st_kill_slave_ddl; -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -ROLLBACK; -SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; -COUNT(*) = 2 -1 -SELECT COUNT(*) = 35 FROM t1; -COUNT(*) = 35 -1 -SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; -COUNT(*) = 0 -1 -COMMIT; -SET AUTOCOMMIT=ON; -connection node_1; -SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; -COUNT(*) = 2 -1 -SELECT COUNT(*) = 35 FROM t1; -COUNT(*) = 35 -1 -SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; -COUNT(*) = 0 -1 -DROP TABLE t1; -COMMIT; -SET AUTOCOMMIT=ON; -SET GLOBAL debug_dbug = $debug_orig; diff --git a/mysql-test/suite/galera/r/galera_ist_xtrabackup-v2,debug.rdiff b/mysql-test/suite/galera/r/galera_ist_xtrabackup-v2,debug.rdiff new file mode 100644 index 00000000000..95310b3ffeb --- /dev/null +++ b/mysql-test/suite/galera/r/galera_ist_xtrabackup-v2,debug.rdiff @@ -0,0 +1,103 @@ +--- r/galera_ist_xtrabackup-v2.result 2018-09-05 10:34:36.192439933 +0300 ++++ r/galera_ist_xtrabackup-v2.reject 2018-09-17 11:13:33.395264800 +0300 +@@ -259,3 +259,100 @@ + DROP TABLE t1; + COMMIT; + SET AUTOCOMMIT=ON; ++Performing State Transfer on a server that has been killed and restarted ++while a DDL was in progress on it ++CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++START TRANSACTION; ++INSERT INTO t1 VALUES ('node2_committed_before'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++COMMIT; ++SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; ++ALTER TABLE t1 ADD COLUMN f2 INTEGER; ++SET wsrep_sync_wait = 0; ++Killing server ... ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++COMMIT; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++Performing --wsrep-recover ... ++Starting server ... ++Using --wsrep-start-position when starting mysqld ... ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++COMMIT; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++COMMIT; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++COMMIT; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++ROLLBACK; ++SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++COUNT(*) = 2 ++1 ++SELECT COUNT(*) = 35 FROM t1; ++COUNT(*) = 35 ++1 ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++COMMIT; ++SET AUTOCOMMIT=ON; ++SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++COUNT(*) = 2 ++1 ++SELECT COUNT(*) = 35 FROM t1; ++COUNT(*) = 35 ++1 ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++DROP TABLE t1; ++COMMIT; ++SET AUTOCOMMIT=ON; ++SET GLOBAL debug_dbug = $debug_orig; diff --git a/mysql-test/suite/galera/r/galera_ist_xtrabackup-v2.result b/mysql-test/suite/galera/r/galera_ist_xtrabackup-v2.result index 175e7443a4d..099d944d491 100644 --- a/mysql-test/suite/galera/r/galera_ist_xtrabackup-v2.result +++ b/mysql-test/suite/galera/r/galera_ist_xtrabackup-v2.result @@ -259,99 +259,3 @@ COUNT(*) = 0 DROP TABLE t1; COMMIT; SET AUTOCOMMIT=ON; -Performing State Transfer on a server that has been killed and restarted -while a DDL was in progress on it -CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 VALUES ('node1_committed_before'); -INSERT INTO t1 VALUES ('node1_committed_before'); -INSERT INTO t1 VALUES ('node1_committed_before'); -INSERT INTO t1 VALUES ('node1_committed_before'); -INSERT INTO t1 VALUES ('node1_committed_before'); -START TRANSACTION; -INSERT INTO t1 VALUES ('node2_committed_before'); -INSERT INTO t1 VALUES ('node2_committed_before'); -INSERT INTO t1 VALUES ('node2_committed_before'); -INSERT INTO t1 VALUES ('node2_committed_before'); -INSERT INTO t1 VALUES ('node2_committed_before'); -COMMIT; -SET GLOBAL debug = 'd,sync.alter_opened_table'; -ALTER TABLE t1 ADD COLUMN f2 INTEGER; -SET wsrep_sync_wait = 0; -Killing server ... -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -INSERT INTO t1 (f1) VALUES ('node1_committed_during'); -COMMIT; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -Performing --wsrep-recover ... -Starting server ... -Using --wsrep-start-position when starting mysqld ... -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -INSERT INTO t1 (f1) VALUES ('node2_committed_after'); -COMMIT; -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); -COMMIT; -SET AUTOCOMMIT=OFF; -START TRANSACTION; -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -INSERT INTO t1 (f1) VALUES ('node1_committed_after'); -COMMIT; -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); -ROLLBACK; -SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; -COUNT(*) = 2 -1 -SELECT COUNT(*) = 35 FROM t1; -COUNT(*) = 35 -1 -SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; -COUNT(*) = 0 -1 -COMMIT; -SET AUTOCOMMIT=ON; -SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; -COUNT(*) = 2 -1 -SELECT COUNT(*) = 35 FROM t1; -COUNT(*) = 35 -1 -SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; -COUNT(*) = 0 -1 -DROP TABLE t1; -COMMIT; -SET AUTOCOMMIT=ON; diff --git a/mysql-test/suite/galera/r/galera_kill_ddl.result b/mysql-test/suite/galera/r/galera_kill_ddl.result index aac316dffe3..b11353fcbcc 100644 --- a/mysql-test/suite/galera/r/galera_kill_ddl.result +++ b/mysql-test/suite/galera/r/galera_kill_ddl.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*"); connection node_1; SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true'; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; diff --git a/mysql-test/suite/galera/r/galera_kill_largechanges.result b/mysql-test/suite/galera/r/galera_kill_largechanges.result index d04bd548949..f4de101fef8 100644 --- a/mysql-test/suite/galera/r/galera_kill_largechanges.result +++ b/mysql-test/suite/galera/r/galera_kill_largechanges.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*"); connection node_1; SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true'; CREATE TABLE ten (f1 INTEGER); diff --git a/mysql-test/suite/galera/r/galera_kill_smallchanges.result b/mysql-test/suite/galera/r/galera_kill_smallchanges.result index bcd7d6fd15d..2ee291004b0 100644 --- a/mysql-test/suite/galera/r/galera_kill_smallchanges.result +++ b/mysql-test/suite/galera/r/galera_kill_smallchanges.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*"); connection node_1; SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true'; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; diff --git a/mysql-test/suite/galera/r/galera_pc_ignore_sb.result b/mysql-test/suite/galera/r/galera_pc_ignore_sb.result index ee79d3c1f00..96ca12a9479 100644 --- a/mysql-test/suite/galera/r/galera_pc_ignore_sb.result +++ b/mysql-test/suite/galera/r/galera_pc_ignore_sb.result @@ -1,7 +1,9 @@ connection node_1; connection node_2; connection node_1; -SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true'; +SET @wsrep_cluster_address_orig = @@GLOBAL.wsrep_cluster_address; +SET @wsrep_provider_options_orig = @@GLOBAL.wsrep_provider_options; +SET GLOBAL wsrep_provider_options ='pc.ignore_sb=true'; connection node_2; Killing server ... connection node_1; @@ -15,6 +17,9 @@ SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABL VARIABLE_VALUE = 'ON' 1 SET GLOBAL wsrep_cluster_address = ''; +SET GLOBAL wsrep_cluster_address = @wsrep_cluster_address_orig; connection node_2; +connection node_1; +SET GLOBAL wsrep_provider_options = @wsrep_provider_options_orig; disconnect node_2; disconnect node_1; diff --git a/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result b/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result index 93ab4a3f3d4..02dde169911 100644 --- a/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result +++ b/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result @@ -14,7 +14,7 @@ CREATE USER sslsst; GRANT ALL PRIVILEGES ON *.* TO sslsst; GRANT USAGE ON *.* TO sslsst REQUIRE SSL; SET GLOBAL wsrep_sst_auth = 'sslsst:'; -Performing State Transfer on a server that has been temporarily disconnected +Performing State Transfer on a server that has been shut down cleanly and restarted connection node_1; CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; SET AUTOCOMMIT=OFF; @@ -34,8 +34,7 @@ INSERT INTO t1 VALUES ('node2_committed_before'); INSERT INTO t1 VALUES ('node2_committed_before'); INSERT INTO t1 VALUES ('node2_committed_before'); COMMIT; -Unloading wsrep provider ... -SET GLOBAL wsrep_provider = 'none'; +Shutting down server ... connection node_1; SET AUTOCOMMIT=OFF; START TRANSACTION; @@ -51,7 +50,7 @@ INSERT INTO t1 VALUES ('node1_to_be_committed_after'); INSERT INTO t1 VALUES ('node1_to_be_committed_after'); INSERT INTO t1 VALUES ('node1_to_be_committed_after'); INSERT INTO t1 VALUES ('node1_to_be_committed_after'); -connect node_1a_galera_st_disconnect_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; SET AUTOCOMMIT=OFF; START TRANSACTION; INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); @@ -60,7 +59,7 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); connection node_2; -Loading wsrep provider ... +Starting server ... SET AUTOCOMMIT=OFF; START TRANSACTION; INSERT INTO t1 VALUES ('node2_committed_after'); @@ -84,7 +83,7 @@ INSERT INTO t1 VALUES ('node1_committed_after'); INSERT INTO t1 VALUES ('node1_committed_after'); INSERT INTO t1 VALUES ('node1_committed_after'); COMMIT; -connection node_1a_galera_st_disconnect_slave; +connection node_1a_galera_st_shutdown_slave; INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); @@ -109,6 +108,210 @@ COUNT(*) = 0 DROP TABLE t1; COMMIT; SET AUTOCOMMIT=ON; +Performing State Transfer on a server that has been killed and restarted +connection node_1; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +COMMIT; +Killing server ... +connection node_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +connection node_2; +Performing --wsrep-recover ... +Starting server ... +Using --wsrep-start-position when starting mysqld ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +COMMIT; +connection node_1a_galera_st_kill_slave; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +SET AUTOCOMMIT=ON; +connection node_1; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +SET AUTOCOMMIT=ON; +Performing State Transfer on a server that has been killed and restarted +while a DDL was in progress on it +connection node_1; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +connection node_2; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +COMMIT; +SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; +connection node_1; +ALTER TABLE t1 ADD COLUMN f2 INTEGER; +connection node_2; +SET wsrep_sync_wait = 0; +Killing server ... +connection node_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 (f1) VALUES ('node1_committed_during'); +INSERT INTO t1 (f1) VALUES ('node1_committed_during'); +INSERT INTO t1 (f1) VALUES ('node1_committed_during'); +INSERT INTO t1 (f1) VALUES ('node1_committed_during'); +INSERT INTO t1 (f1) VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +connection node_2; +Performing --wsrep-recover ... +connection node_2; +Starting server ... +Using --wsrep-start-position when starting mysqld ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 (f1) VALUES ('node2_committed_after'); +INSERT INTO t1 (f1) VALUES ('node2_committed_after'); +INSERT INTO t1 (f1) VALUES ('node2_committed_after'); +INSERT INTO t1 (f1) VALUES ('node2_committed_after'); +INSERT INTO t1 (f1) VALUES ('node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 (f1) VALUES ('node1_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_committed_after'); +INSERT INTO t1 (f1) VALUES ('node1_committed_after'); +COMMIT; +connection node_1a_galera_st_kill_slave_ddl; +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; +SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; +COUNT(*) = 2 +1 +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +SET AUTOCOMMIT=ON; +connection node_1; +SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; +COUNT(*) = 2 +1 +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +SET AUTOCOMMIT=ON; +SET GLOBAL debug_dbug = $debug_orig; connection node_1; CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query"); DROP USER sst; diff --git a/mysql-test/suite/galera/r/galera_sst_rsync2,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_rsync2,debug.rdiff new file mode 100644 index 00000000000..525156d88da --- /dev/null +++ b/mysql-test/suite/galera/r/galera_sst_rsync2,debug.rdiff @@ -0,0 +1,114 @@ +--- suite/galera/r/galera_sst_rsync2.result 2018-09-12 13:09:35.352229478 +0200 ++++ suite/galera/r/galera_sst_rsync2,debug.reject 2018-09-12 17:00:51.601974979 +0200 +@@ -286,3 +286,111 @@ + DROP TABLE t1; + COMMIT; + SET AUTOCOMMIT=ON; ++Performing State Transfer on a server that has been killed and restarted ++while a DDL was in progress on it ++connection node_1; ++CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++connection node_2; ++START TRANSACTION; ++INSERT INTO t1 VALUES ('node2_committed_before'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++COMMIT; ++SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; ++connection node_1; ++ALTER TABLE t1 ADD COLUMN f2 INTEGER; ++connection node_2; ++SET wsrep_sync_wait = 0; ++Killing server ... ++connection node_1; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++COMMIT; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++connection node_2; ++Performing --wsrep-recover ... ++connection node_2; ++Starting server ... ++Using --wsrep-start-position when starting mysqld ... ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++COMMIT; ++connection node_1; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++COMMIT; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++COMMIT; ++connection node_1a_galera_st_kill_slave_ddl; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++ROLLBACK; ++SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++COUNT(*) = 2 ++1 ++SELECT COUNT(*) = 35 FROM t1; ++COUNT(*) = 35 ++1 ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++COMMIT; ++SET AUTOCOMMIT=ON; ++connection node_1; ++SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++COUNT(*) = 2 ++1 ++SELECT COUNT(*) = 35 FROM t1; ++COUNT(*) = 35 ++1 ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++DROP TABLE t1; ++COMMIT; ++SET AUTOCOMMIT=ON; ++SET GLOBAL debug_dbug = $debug_orig; diff --git a/mysql-test/suite/galera/r/galera_sst_rsync2.result b/mysql-test/suite/galera/r/galera_sst_rsync2.result new file mode 100644 index 00000000000..ff85a7d6c0f --- /dev/null +++ b/mysql-test/suite/galera/r/galera_sst_rsync2.result @@ -0,0 +1,288 @@ +connection node_1; +connection node_2; +Performing State Transfer on a server that has been shut down cleanly and restarted +connection node_1; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +COMMIT; +Shutting down server ... +connection node_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +connection node_2; +Starting server ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +COMMIT; +connection node_1a_galera_st_shutdown_slave; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +SET AUTOCOMMIT=ON; +connection node_1; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +SET AUTOCOMMIT=ON; +Performing State Transfer on a server that starts from a clean var directory +This is accomplished by shutting down node #2 and removing its var directory before restarting it +connection node_1; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +COMMIT; +Shutting down server ... +connection node_1; +Cleaning var directory ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +connection node_2; +Starting server ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +COMMIT; +connection node_1a_galera_st_clean_slave; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +SET AUTOCOMMIT=ON; +connection node_1; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +SET AUTOCOMMIT=ON; +Performing State Transfer on a server that has been killed and restarted +connection node_1; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +COMMIT; +Killing server ... +connection node_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +connection node_2; +Performing --wsrep-recover ... +Starting server ... +Using --wsrep-start-position when starting mysqld ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +COMMIT; +connection node_1a_galera_st_kill_slave; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +SET AUTOCOMMIT=ON; +connection node_1; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +SET AUTOCOMMIT=ON; diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_data_dir,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_rsync_data_dir,debug.rdiff new file mode 100644 index 00000000000..e307a2ff0f9 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_sst_rsync_data_dir,debug.rdiff @@ -0,0 +1,114 @@ +--- suite/galera/r/galera_sst_rsync_data_dir.result 2018-09-13 14:52:50.848220719 +0200 ++++ suite/galera/r/galera_sst_rsync_data_dir.reject 2018-09-13 15:03:32.339135247 +0200 +@@ -286,3 +286,111 @@ + DROP TABLE t1; + COMMIT; + SET AUTOCOMMIT=ON; ++Performing State Transfer on a server that has been killed and restarted ++while a DDL was in progress on it ++connection node_1; ++CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++INSERT INTO t1 VALUES ('node1_committed_before'); ++connection node_2; ++START TRANSACTION; ++INSERT INTO t1 VALUES ('node2_committed_before'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++INSERT INTO t1 VALUES ('node2_committed_before'); ++COMMIT; ++SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; ++connection node_1; ++ALTER TABLE t1 ADD COLUMN f2 INTEGER; ++connection node_2; ++SET wsrep_sync_wait = 0; ++Killing server ... ++connection node_1; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_during'); ++COMMIT; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++connection node_2; ++Performing --wsrep-recover ... ++connection node_2; ++Starting server ... ++Using --wsrep-start-position when starting mysqld ... ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node2_committed_after'); ++COMMIT; ++connection node_1; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after'); ++COMMIT; ++SET AUTOCOMMIT=OFF; ++START TRANSACTION; ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++INSERT INTO t1 (f1) VALUES ('node1_committed_after'); ++COMMIT; ++connection node_1a_galera_st_kill_slave_ddl; ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ++ROLLBACK; ++SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++COUNT(*) = 2 ++1 ++SELECT COUNT(*) = 35 FROM t1; ++COUNT(*) = 35 ++1 ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++COMMIT; ++SET AUTOCOMMIT=ON; ++connection node_1; ++SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; ++COUNT(*) = 2 ++1 ++SELECT COUNT(*) = 35 FROM t1; ++COUNT(*) = 35 ++1 ++SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; ++COUNT(*) = 0 ++1 ++DROP TABLE t1; ++COMMIT; ++SET AUTOCOMMIT=ON; ++SET GLOBAL debug_dbug = $debug_orig; diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_data_dir.result b/mysql-test/suite/galera/r/galera_sst_rsync_data_dir.result new file mode 100644 index 00000000000..ff85a7d6c0f --- /dev/null +++ b/mysql-test/suite/galera/r/galera_sst_rsync_data_dir.result @@ -0,0 +1,288 @@ +connection node_1; +connection node_2; +Performing State Transfer on a server that has been shut down cleanly and restarted +connection node_1; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +COMMIT; +Shutting down server ... +connection node_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +connection node_2; +Starting server ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +COMMIT; +connection node_1a_galera_st_shutdown_slave; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +SET AUTOCOMMIT=ON; +connection node_1; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +SET AUTOCOMMIT=ON; +Performing State Transfer on a server that starts from a clean var directory +This is accomplished by shutting down node #2 and removing its var directory before restarting it +connection node_1; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +COMMIT; +Shutting down server ... +connection node_1; +Cleaning var directory ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +connection node_2; +Starting server ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +COMMIT; +connection node_1a_galera_st_clean_slave; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +SET AUTOCOMMIT=ON; +connection node_1; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +SET AUTOCOMMIT=ON; +Performing State Transfer on a server that has been killed and restarted +connection node_1; +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +COMMIT; +connection node_2; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +COMMIT; +Killing server ... +connection node_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +connection node_2; +Performing --wsrep-recover ... +Starting server ... +Using --wsrep-start-position when starting mysqld ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +COMMIT; +connection node_1; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +COMMIT; +connection node_1a_galera_st_kill_slave; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +SET AUTOCOMMIT=ON; +connection node_1; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +SET AUTOCOMMIT=ON; diff --git a/mysql-test/suite/galera/r/galera_sst_xtrabackup-v2_data_dir.result b/mysql-test/suite/galera/r/galera_sst_xtrabackup-v2_data_dir.result new file mode 100644 index 00000000000..cec0f21ee22 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_sst_xtrabackup-v2_data_dir.result @@ -0,0 +1,262 @@ +Performing State Transfer on a server that has been shut down cleanly and restarted +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +COMMIT; +Shutting down server ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +Starting server ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +COMMIT; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +COMMIT; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +SET AUTOCOMMIT=ON; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +SET AUTOCOMMIT=ON; +Performing State Transfer on a server that starts from a clean var directory +This is accomplished by shutting down node #2 and removing its var directory before restarting it +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +COMMIT; +Shutting down server ... +Cleaning var directory ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +Starting server ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +COMMIT; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +COMMIT; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +SET AUTOCOMMIT=ON; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +SET AUTOCOMMIT=ON; +Performing State Transfer on a server that has been killed and restarted +CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +INSERT INTO t1 VALUES ('node1_committed_before'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +INSERT INTO t1 VALUES ('node2_committed_before'); +COMMIT; +Killing server ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +INSERT INTO t1 VALUES ('node1_committed_during'); +COMMIT; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +Performing --wsrep-recover ... +Starting server ... +Using --wsrep-start-position when starting mysqld ... +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +INSERT INTO t1 VALUES ('node2_committed_after'); +COMMIT; +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +INSERT INTO t1 VALUES ('node1_to_be_committed_after'); +COMMIT; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +INSERT INTO t1 VALUES ('node1_committed_after'); +COMMIT; +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); +ROLLBACK; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +COMMIT; +SET AUTOCOMMIT=ON; +SELECT COUNT(*) = 35 FROM t1; +COUNT(*) = 35 +1 +SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; +COUNT(*) = 0 +1 +DROP TABLE t1; +COMMIT; +SET AUTOCOMMIT=ON; diff --git a/mysql-test/suite/galera/r/galera_suspend_slave.result b/mysql-test/suite/galera/r/galera_suspend_slave.result index 3b950e82e33..07433399081 100644 --- a/mysql-test/suite/galera/r/galera_suspend_slave.result +++ b/mysql-test/suite/galera/r/galera_suspend_slave.result @@ -7,9 +7,11 @@ disconnect node_2; connection node_1; Suspending node_2 ... SET SESSION wsrep_sync_wait = 0; +SET SESSION wsrep_sync_wait = 15; INSERT INTO t1 VALUES (1); Got one of the listed errors Resuming node_2 ... +SET SESSION wsrep_sync_wait = 0; INSERT INTO t1 VALUES (1); connection node_2a; SET SESSION wsrep_sync_wait = 0; diff --git a/mysql-test/suite/galera/r/galera_toi_truncate.result b/mysql-test/suite/galera/r/galera_toi_truncate.result index 933379cade5..73285d723c1 100644 --- a/mysql-test/suite/galera/r/galera_toi_truncate.result +++ b/mysql-test/suite/galera/r/galera_toi_truncate.result @@ -4,6 +4,8 @@ INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; connection node_2; SET SESSION wsrep_retry_autocommit = 0; +INSERT INTO t1(f1) SELECT 1 FROM ten as a1, ten AS a2; +set debug_sync='ha_commit_trans_after_prepare WAIT_FOR go'; INSERT INTO t1 (f1) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6;; connection node_1; TRUNCATE TABLE t1;; diff --git a/mysql-test/suite/galera/r/galera_unicode_identifiers.result b/mysql-test/suite/galera/r/galera_unicode_identifiers.result index 5eb13a83df9..77848bc751f 100644 --- a/mysql-test/suite/galera/r/galera_unicode_identifiers.result +++ b/mysql-test/suite/galera/r/galera_unicode_identifiers.result @@ -8,7 +8,7 @@ CREATE TABLE `table with space` ( `column with space` INTEGER AUTO_INCREMENT PRIMARY KEY, `second column with space` INTEGER, UNIQUE `index name with space` (`second column with space`) -); +) engine=innodb; INSERT INTO `table with space` VALUES (1, 1); CREATE DATABASE `база`; USE `база`; @@ -16,7 +16,7 @@ CREATE TABLE `таблица` ( `първа_колона` INTEGER PRIMARY KEY, `втора_колона` INTEGER, UNIQUE `индекÑ` (`втора_колона`) -); +) engine=innodb; INSERT INTO `таблица` VALUES (1, 1); CREATE DATABASE `втора база`; USE `втора база`; @@ -24,7 +24,7 @@ CREATE TABLE `втора таблица` ( `първа колона` INTEGER, `втора колона` INTEGER, KEY `първи индекÑ` (`първа колона`) -); +) engine=innodb; INSERT INTO `втора таблица` VALUES (1, 1); connection node_2; USE `database with space`; diff --git a/mysql-test/suite/galera/r/galera_var_desync_on.result b/mysql-test/suite/galera/r/galera_var_desync_on.result index a26acbd4d6b..26798e51926 100644 --- a/mysql-test/suite/galera/r/galera_var_desync_on.result +++ b/mysql-test/suite/galera/r/galera_var_desync_on.result @@ -2,7 +2,6 @@ CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); connection node_2; SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1'; -SET GLOBAL wsrep_desync = TRUE; FLUSH TABLES WITH READ LOCK; connection node_1; INSERT INTO t1 VALUES (2); @@ -19,7 +18,6 @@ SET SESSION wsrep_sync_wait = 0; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 -SET GLOBAL wsrep_desync = FALSE; UNLOCK TABLES; SET SESSION wsrep_sync_wait = 1; SELECT COUNT(*) = 10 FROM t1; diff --git a/mysql-test/suite/galera/r/galera_var_node_address.result b/mysql-test/suite/galera/r/galera_var_node_address.result index b8076958532..7696d1e3f4f 100644 --- a/mysql-test/suite/galera/r/galera_var_node_address.result +++ b/mysql-test/suite/galera/r/galera_var_node_address.result @@ -5,7 +5,7 @@ SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N VARIABLE_VALUE = 4 1 connection node_1; -CREATE TABLE t1 (f1 INTEGER); +CREATE TABLE t1 (f1 INTEGER) ENGINE=INNODB; connection node_2; INSERT INTO t1 VALUES (1); connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; 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 3f0a63ab9d7..c28cc091ae9 100644 --- a/mysql-test/suite/galera/r/galera_var_slave_threads.result +++ b/mysql-test/suite/galera/r/galera_var_slave_threads.result @@ -20,72 +20,11 @@ SET GLOBAL wsrep_slave_threads = 64; connection node_1; INSERT INTO t1 VALUES (1); connection node_2; +SELECT COUNT(*) = 1 FROM t1; +COUNT(*) = 1 +1 SET GLOBAL wsrep_slave_threads = 1; connection node_1; -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); -INSERT INTO t2 VALUES (DEFAULT); connection node_2; SELECT COUNT(*) FROM t2; COUNT(*) diff --git a/mysql-test/suite/galera/r/galera_wan.result b/mysql-test/suite/galera/r/galera_wan.result index 73100636a0d..41b915fa5bf 100644 --- a/mysql-test/suite/galera/r/galera_wan.result +++ b/mysql-test/suite/galera/r/galera_wan.result @@ -1,3 +1,7 @@ +CALL mtr.add_suppression("WSREP: Stray state UUID msg:.*"); +CALL mtr.add_suppression("WSREP: Sending JOIN failed:.*"); +CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside"); +call mtr.add_suppression("WSREP: Sending JOIN failed:.*"); SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 4 1 @@ -6,7 +10,6 @@ CREATE TABLE t1 (f1 INTEGER); connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; connection node_3; INSERT INTO t1 VALUES (1); -CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside"); connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4; connection node_4; SELECT VARIABLE_VALUE LIKE '%gmcast.segment = 3%' FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'wsrep_provider_options'; @@ -16,4 +19,3 @@ SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 DROP TABLE t1; -CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside"); diff --git a/mysql-test/suite/galera/r/mysql-wsrep#332.result b/mysql-test/suite/galera/r/mysql-wsrep#332.result new file mode 100644 index 00000000000..8667f5e9c41 --- /dev/null +++ b/mysql-test/suite/galera/r/mysql-wsrep#332.result @@ -0,0 +1,111 @@ +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER) ENGINE=INNODB; +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); +INSERT INTO c VALUES (1, 1); +INSERT INTO c VALUES (2, 2); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE p SET f1 = f1 + 100; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +ALTER TABLE c ADD FOREIGN KEY (p_id) REFERENCES p(f1); +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p; +f1 f2 +1 0 +2 0 +SELECT * FROM c; +f1 p_id +1 1 +2 2 +DROP TABLE c; +DROP TABLE p; +CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id1 INTEGER, p_id2 INTEGER) ENGINE=INNODB; +INSERT INTO p1 VALUES (1, 0), (2, 0); +INSERT INTO p2 VALUES (1, 0), (2, 0); +INSERT INTO c VALUES (1, 1, 1); +INSERT INTO c VALUES (2, 2, 2); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE p1 SET f1 = f1 + 100; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +ALTER TABLE c ADD FOREIGN KEY (p_id1) REFERENCES p1(f1), ADD FOREIGN KEY (p_id2) REFERENCES p2(f1); +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p1; +f1 f2 +1 0 +2 0 +SELECT * FROM p2; +f1 f2 +1 0 +2 0 +SELECT * FROM c; +f1 p_id1 p_id2 +1 1 1 +2 2 2 +DROP TABLE c; +DROP TABLE p1; +DROP TABLE p2; +CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id1 INTEGER, p_id2 INTEGER) ENGINE=INNODB; +INSERT INTO p1 VALUES (1, 0), (2, 0); +INSERT INTO p2 VALUES (1, 0), (2, 0); +INSERT INTO c VALUES (1, 1, 1); +INSERT INTO c VALUES (2, 2, 2); +SET AUTOCOMMIT=ON; +START TRANSACTION; +UPDATE p2 SET f1 = f1 + 100; +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +ALTER TABLE c ADD FOREIGN KEY (p_id1) REFERENCES p1(f1), ADD FOREIGN KEY (p_id2) REFERENCES p2(f1); +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'dbug='; +SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync'; +COMMIT; +SET SESSION wsrep_on = 0; +SET SESSION wsrep_on = 1; +SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; +SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; +SET GLOBAL wsrep_provider_options = 'dbug='; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SELECT * FROM p1; +f1 f2 +1 0 +2 0 +SELECT * FROM p2; +f1 f2 +1 0 +2 0 +SELECT * FROM c; +f1 p_id1 p_id2 +1 1 1 +2 2 2 +DROP TABLE c; +DROP TABLE p1; +DROP TABLE p2; diff --git a/mysql-test/suite/galera/r/query_cache.result b/mysql-test/suite/galera/r/query_cache.result index d497fc87544..8592a68141c 100644 --- a/mysql-test/suite/galera/r/query_cache.result +++ b/mysql-test/suite/galera/r/query_cache.result @@ -421,24 +421,6 @@ Qcache_queries_in_cache 1 set query_cache_type=on; # On node-1 connection node_1; -reset query cache; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 4 -# On node-2 -connection node_2; -reset query cache; -show status like "Qcache_queries_in_cache"; -Variable_name Value -Qcache_queries_in_cache 0 -show status like "Qcache_hits"; -Variable_name Value -Qcache_hits 3 -# On node-1 -connection node_1; select sql_no_cache * from t1; a 1 @@ -1318,9 +1300,6 @@ Qcache_queries_in_cache 0 show status like "Qcache_hits"; Variable_name Value Qcache_hits 12 -select count(*) from t1; -count(*) -70 # On node-2 connection node_2; select count(*) from t1; @@ -1328,7 +1307,7 @@ count(*) 70 show status like "Qcache_queries_in_cache"; Variable_name Value -Qcache_queries_in_cache 1 +Qcache_queries_in_cache 2 show status like "Qcache_hits"; Variable_name Value Qcache_hits 11 @@ -1357,9 +1336,13 @@ show status like "Qcache_hits"; Variable_name Value Qcache_hits 12 select * from t1 into outfile "query_cache.out.file"; +Warnings: +Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead select * from t1 into outfile "query_cache.out.file"; ERROR HY000: File 'query_cache.out.file' already exists select * from t1 limit 1 into dumpfile "query_cache.dump.file"; +Warnings: +Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 0 @@ -1515,7 +1498,7 @@ Variable_name Value Qcache_hits 11 show status like "Qcache_inserts"; Variable_name Value -Qcache_inserts 34 +Qcache_inserts 35 unlock table; drop view v1; set query_cache_wlock_invalidate=default; @@ -1626,7 +1609,7 @@ Variable_name Value Qcache_hits 11 show status like "Qcache_inserts"; Variable_name Value -Qcache_inserts 36 +Qcache_inserts 37 set character_set_client=cp1251; SELECT a,'Â','â'='Â' FROM t1; a ?? '??'='?‚' @@ -1640,7 +1623,7 @@ Variable_name Value Qcache_hits 11 show status like "Qcache_inserts"; Variable_name Value -Qcache_inserts 37 +Qcache_inserts 38 set character_set_results=cp1251; SELECT a,'Â','â'='Â' FROM t1; a Ã? 'â'='Â' @@ -1654,7 +1637,7 @@ Variable_name Value Qcache_hits 11 show status like "Qcache_inserts"; Variable_name Value -Qcache_inserts 38 +Qcache_inserts 39 drop table t1; # # Comments before command @@ -1665,9 +1648,6 @@ create table t1 (a int) engine=innodb; show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 0 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 46 show status like "Qcache_hits"; Variable_name Value Qcache_hits 12 @@ -1678,9 +1658,6 @@ a show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 47 show status like "Qcache_hits"; Variable_name Value Qcache_hits 13 @@ -1689,9 +1666,6 @@ connection node_2; show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 0 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 38 show status like "Qcache_hits"; Variable_name Value Qcache_hits 11 @@ -1702,9 +1676,6 @@ a show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 1 -show status like "Qcache_inserts"; -Variable_name Value -Qcache_inserts 39 show status like "Qcache_hits"; Variable_name Value Qcache_hits 12 diff --git a/mysql-test/suite/galera/r/versioning_trx_id.result b/mysql-test/suite/galera/r/versioning_trx_id.result new file mode 100644 index 00000000000..f15916e51a5 --- /dev/null +++ b/mysql-test/suite/galera/r/versioning_trx_id.result @@ -0,0 +1,52 @@ +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; +connection node_1; +create table t1 (a int, s bigint unsigned as row start, e bigint unsigned as row end, period for system_time(s,e)) engine=InnoDB with system versioning; +insert into t1 (a) values (1),(2); +connection node_2; +insert into t1 (a) values (3),(4); +select a from t1; +a +1 +2 +3 +4 +select count(*) from mysql.transaction_registry where begin_timestamp='0-0-0'; +count(*) +0 +select count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp; +count(*) +0 +connection node_3; +insert into t1 (a) values (5),(6); +select a from t1; +a +1 +2 +3 +4 +5 +6 +select count(*) from mysql.transaction_registry where begin_timestamp='0-0-0'; +count(*) +0 +select count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp; +count(*) +0 +connection node_1; +select a from t1; +a +1 +2 +3 +4 +5 +6 +select count(*) from mysql.transaction_registry where begin_timestamp='0-0-0'; +count(*) +0 +select count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp; +count(*) +0 +drop table t1; +disconnect node_2; +disconnect node_1; diff --git a/mysql-test/suite/galera/suite.pm b/mysql-test/suite/galera/suite.pm index 4e6927b3213..233aa020a94 100644 --- a/mysql-test/suite/galera/suite.pm +++ b/mysql-test/suite/galera/suite.pm @@ -81,6 +81,8 @@ push @::global_suppressions, qr|WSREP: .*core_handle_uuid_msg.*|, qr(WSREP: --wsrep-causal-reads=ON takes precedence over --wsrep-sync-wait=0. WSREP_SYNC_WAIT_BEFORE_READ is on), qr|WSREP: JOIN message from member .* in non-primary configuration. Ignored.|, + qr(WSREP: Failed to remove page file .*), + qr(WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to .*), ); $ENV{PATH}="$epath:$ENV{PATH}"; diff --git a/mysql-test/suite/galera/t/MW-286.test b/mysql-test/suite/galera/t/MW-286.test index 1b2e322f078..426b4493bb7 100644 --- a/mysql-test/suite/galera/t/MW-286.test +++ b/mysql-test/suite/galera/t/MW-286.test @@ -7,7 +7,7 @@ --source include/big_test.inc --connection node_1 -CREATE TABLE ten (f1 INTEGER); +CREATE TABLE ten (f1 INTEGER) Engine=InnoDB; INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; @@ -22,11 +22,13 @@ INSERT INTO t1 (f1) SELECT 000000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3 SET GLOBAL wsrep_desync = TRUE; SET wsrep_on = FALSE; ---error ER_QUERY_INTERRUPTED +--error 0,ER_QUERY_INTERRUPTED ALTER TABLE t1 ADD PRIMARY KEY (f1); SET wsrep_on = TRUE; SET GLOBAL wsrep_desync = FALSE; +--connection node_1 +reap; DROP TABLE t1; DROP TABLE ten; diff --git a/mysql-test/suite/galera/t/MW-328A.test b/mysql-test/suite/galera/t/MW-328A.test index 4d6e1ea3625..09aad1bcf60 100644 --- a/mysql-test/suite/galera/t/MW-328A.test +++ b/mysql-test/suite/galera/t/MW-328A.test @@ -7,6 +7,7 @@ # a success was reported. # +--source include/big_test.inc --source include/galera_cluster.inc --source include/have_innodb.inc --source suite/galera/t/MW-328-header.inc diff --git a/mysql-test/suite/galera/t/MW-328B.test b/mysql-test/suite/galera/t/MW-328B.test index a7b4053ab0c..000b0d8a9ab 100644 --- a/mysql-test/suite/galera/t/MW-328B.test +++ b/mysql-test/suite/galera/t/MW-328B.test @@ -7,6 +7,7 @@ # gets the deadlock error # +--source include/big_test.inc --source include/galera_cluster.inc --source include/have_innodb.inc --source suite/galera/t/MW-328-header.inc diff --git a/mysql-test/suite/galera/t/MW-328C.test b/mysql-test/suite/galera/t/MW-328C.test index b681e743ab3..72a8480923c 100644 --- a/mysql-test/suite/galera/t/MW-328C.test +++ b/mysql-test/suite/galera/t/MW-328C.test @@ -7,6 +7,7 @@ # masks all deadlock errors # +--source include/big_test.inc --source include/galera_cluster.inc --source include/have_innodb.inc --source suite/galera/t/MW-328-header.inc diff --git a/mysql-test/suite/galera/t/MW-336.test b/mysql-test/suite/galera/t/MW-336.test index 8cd363aa019..4bdbfb2ecff 100644 --- a/mysql-test/suite/galera/t/MW-336.test +++ b/mysql-test/suite/galera/t/MW-336.test @@ -8,15 +8,28 @@ CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; --connection node_1 + SET GLOBAL wsrep_slave_threads = 10; SET GLOBAL wsrep_slave_threads = 1; + +--let $wait_timeout=600 --let $wait_condition = SELECT COUNT(*) = 11 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%'); --source include/wait_condition.inc +SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%'); +SHOW STATUS LIKE 'wsrep_thread_count'; + --connection node_2 -INSERT INTO t1 VALUES (1); +# Generate 11 replication events +--let $count = 11 +while ($count) +{ + INSERT INTO t1 VALUES (1); + --dec $count +} --connection node_1 + SET GLOBAL wsrep_slave_threads = 10; --let $wait_condition = SELECT COUNT(*) = 11 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%'); --source include/wait_condition.inc @@ -28,40 +41,40 @@ SET GLOBAL wsrep_slave_threads = 20; SET GLOBAL wsrep_slave_threads = 1; --connection node_2 -INSERT INTO t1 VALUES (1); -INSERT INTO t1 VALUES (2); -INSERT INTO t1 VALUES (3); -INSERT INTO t1 VALUES (4); -INSERT INTO t1 VALUES (5); -INSERT INTO t1 VALUES (6); -INSERT INTO t1 VALUES (7); -INSERT INTO t1 VALUES (8); -INSERT INTO t1 VALUES (9); - - ---connection node_1 ---let $wait_condition = SELECT COUNT(*) = 12 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%'); ---source include/wait_condition.inc +# Generate 21 replication events +--let $count = 21 +while ($count) +{ + INSERT INTO t1 VALUES (1); + --dec $count +} SET GLOBAL wsrep_slave_threads = 10; SET GLOBAL wsrep_slave_threads = 0; --connection node_2 -INSERT INTO t1 VALUES (10); -INSERT INTO t1 VALUES (11); -INSERT INTO t1 VALUES (12); -INSERT INTO t1 VALUES (13); -INSERT INTO t1 VALUES (14); -INSERT INTO t1 VALUES (15); -INSERT INTO t1 VALUES (16); -INSERT INTO t1 VALUES (17); -INSERT INTO t1 VALUES (18); -INSERT INTO t1 VALUES (19); -INSERT INTO t1 VALUES (20); +# Generate 21 replication events +--let $count = 21 +while ($count) +{ + INSERT INTO t1 VALUES (1); + --dec $count +} --connection node_1 --let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%'); --source include/wait_condition.inc SET GLOBAL wsrep_slave_threads = 1; + +--connection node_2 +# Generate 21 replication events +--let $count = 21 +while ($count) +{ + INSERT INTO t1 VALUES (1); + --dec $count +} + +--connection node_1 DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/MW-44-master.opt b/mysql-test/suite/galera/t/MW-44-master.opt index a15aa0a99d9..9b086195e8a 100644 --- a/mysql-test/suite/galera/t/MW-44-master.opt +++ b/mysql-test/suite/galera/t/MW-44-master.opt @@ -1 +1,2 @@ --log-output=TABLE +--general-log=OFF diff --git a/mysql-test/suite/galera/t/MW-44.test b/mysql-test/suite/galera/t/MW-44.test index 7c988a29548..8730631edc6 100644 --- a/mysql-test/suite/galera/t/MW-44.test +++ b/mysql-test/suite/galera/t/MW-44.test @@ -6,32 +6,37 @@ --source include/have_innodb.inc --connection node_1 -SET GLOBAL general_log='OFF'; TRUNCATE TABLE mysql.general_log; -SELECT COUNT(*) from mysql.general_log; -SELECT * FROM mysql.general_log; --sleep 1 --connection node_2 -SET GLOBAL general_log='OFF'; +--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.general_log; +--source include/wait_condition.inc TRUNCATE TABLE mysql.general_log; -SELECT COUNT(*) from mysql.general_log; -SELECT * FROM mysql.general_log; --sleep 1 --connection node_1 +--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.general_log; +--source include/wait_condition.inc +SELECT Argument FROM mysql.general_log; + SET GLOBAL general_log='ON'; -SELECT COUNT(*) from mysql.general_log; SET SESSION wsrep_osu_method=TOI; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; SET SESSION wsrep_osu_method=RSU; ALTER TABLE t1 ADD COLUMN f2 INTEGER; SET SESSION wsrep_osu_method=TOI; -SELECT COUNT(*) = 2 FROM mysql.general_log WHERE argument LIKE 'CREATE%' OR argument LIKE 'ALTER%'; +--let $wait_condition = SELECT COUNT(argument) = 2 FROM mysql.general_log WHERE argument LIKE 'CREATE%' OR argument LIKE 'ALTER%'; +--source include/wait_condition.inc + +SELECT argument FROM mysql.general_log WHERE argument LIKE 'CREATE%' OR argument LIKE 'ALTER%'; --connection node_2 -SET GLOBAL general_log='ON'; -SELECT COUNT(*) = 0 FROM mysql.general_log WHERE argument NOT LIKE 'SELECT%'; +SELECT Argument FROM mysql.general_log; DROP TABLE t1; +SET GLOBAL general_log='OFF'; + +--connection node_1 +SET GLOBAL general_log='OFF'; diff --git a/mysql-test/suite/galera/t/galera#505.test b/mysql-test/suite/galera/t/galera#505.test new file mode 100644 index 00000000000..785b1411596 --- /dev/null +++ b/mysql-test/suite/galera/t/galera#505.test @@ -0,0 +1,26 @@ +# galera#505 - Change of pc.weight wsrep param will be correctly stored in wsrep_provider_options variable + +--source include/galera_cluster.inc + +--connection node_1 + +SET SESSION wsrep_sync_wait=0; +--disable_result_log +--disable_query_log +--let $galera_version=25.3.24 +source ../../wsrep/include/check_galera_version.inc; +--enable_result_log +--enable_query_log +SET SESSION wsrep_sync_wait=DEFAULT; + +# Convert "... pc.weight = N; ..." to "N; ..." +--let $s1 = `SELECT SUBSTR(@@wsrep_provider_options, LOCATE('pc.weight =', @@wsrep_provider_options) + LENGTH('pc.weight = '))` +# Convert "N; ..." to "N" +--let $pc_weight_value = `SELECT SUBSTR('$s1', 1, LOCATE(';', '$s1') - 1)` + +SET GLOBAL wsrep_provider_options = 'pc.weight=3'; + +-- replace_regex /.*(pc\.weight = [0-9]+);.*/\1/ +SHOW GLOBAL VARIABLES LIKE 'wsrep_provider_options'; + +--eval SET GLOBAL wsrep_provider_options = 'pc.weight=$pc_weight_value' diff --git a/mysql-test/suite/galera/t/galera_bf_background_statistics.opt b/mysql-test/suite/galera/t/galera_bf_background_statistics.opt new file mode 100644 index 00000000000..f9b1414a974 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_bf_background_statistics.opt @@ -0,0 +1 @@ +--innodb_stats_persistent=ON diff --git a/mysql-test/suite/galera/t/galera_bf_background_statistics.test b/mysql-test/suite/galera/t/galera_bf_background_statistics.test new file mode 100644 index 00000000000..a9a98b1b567 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_bf_background_statistics.test @@ -0,0 +1,49 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc + +# +# Test a local transaction being aborted by a slave one while it is running a SLEEP() +# + +SELECT @@innodb_stats_persistent; + +CREATE TABLE t1 (f1 INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, f2 INTEGER DEFAULT 1) ENGINE=InnoDB; +INSERT INTO t1(f1) values (NULL); +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +INSERT INTO t1(f1) select NULL from t1; +SELECT count(1) from t1; + +--connection node_2 +SET AUTOCOMMIT=OFF; +--let $wsrep_local_bf_aborts_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'` +INSERT INTO t1 VALUES (9999999,NULL); +--send SELECT SLEEP(1000); + +--connection node_1 +ALTER TABLE t1 CHANGE f2 f2 INTEGER NOT NULL DEFAULT 1; + +--connection node_2 +--error ER_LOCK_DEADLOCK +--reap + +--let $wsrep_local_bf_aborts_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'` + +# Check that wsrep_local_bf_aborts has been incremented by exactly 1 +--disable_query_log +--eval SELECT $wsrep_local_bf_aborts_after - $wsrep_local_bf_aborts_before = 1 AS wsrep_local_aborts_increment; +--enable_query_log + +DROP TABLE t1; + diff --git a/mysql-test/suite/galera/t/galera_binlog_stmt_autoinc.test b/mysql-test/suite/galera/t/galera_binlog_stmt_autoinc.test new file mode 100644 index 00000000000..d3889a89016 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_binlog_stmt_autoinc.test @@ -0,0 +1,230 @@ +## +## Tests the auto-increment with binlog in STATEMENT mode. +## + +--source include/galera_cluster.inc +--source include/have_innodb.inc + +--let $node_1=node_1 +--let $node_2=node_2 +--source include/auto_increment_offset_save.inc + +## +## Verify the correct operation of the auto-increment when the binlog +## format artificially set to the 'STATEMENT' (although this mode is +## not recommended in the current version): +## + +--connection node_2 +SET GLOBAL wsrep_forced_binlog_format='STATEMENT'; + +--connection node_1 +SET GLOBAL wsrep_forced_binlog_format='STATEMENT'; + +CREATE TABLE t1 ( + i int(11) NOT NULL AUTO_INCREMENT, + c char(32) DEFAULT 'dummy_text', + PRIMARY KEY (i) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +insert into t1(i) values(null); + +select * from t1; + +insert into t1(i) values(null), (null), (null); + +select * from t1; + +--connection node_2 +--let $wait_condition = SELECT COUNT(*) = 4 FROM t1; +--source include/wait_condition.inc +select * from t1; + +SET GLOBAL wsrep_forced_binlog_format='none'; + +--connection node_1 + +SET GLOBAL wsrep_forced_binlog_format='none'; + +drop table t1; + +## +## Check the operation when the automatic control over the auto-increment +## settings is switched off, that is, when we use the increment step and +## the offset specified by the user. In the current session, the binlog +## format is set to 'STATEMENT'. It is important that the values of the +## auto-increment options does not changed on other node - it allows us +## to check the correct transmission of the auto-increment options to +## other nodes: +## + +--disable_warnings +SET SESSION binlog_format='STATEMENT'; +--enable_warnings + +show variables like 'binlog_format'; + +SET GLOBAL wsrep_auto_increment_control='OFF'; + +SET SESSION auto_increment_increment = 3; +SET SESSION auto_increment_offset = 1; + +CREATE TABLE t1 ( + i int(11) NOT NULL AUTO_INCREMENT, + c char(32) DEFAULT 'dummy_text', + PRIMARY KEY (i) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +insert into t1(i) values(null); + +select * from t1; + +insert into t1(i) values(null), (null), (null); + +select * from t1; + +--connection node_2 +--let $wait_condition = SELECT COUNT(*) = 4 FROM t1; +--source include/wait_condition.inc + +select * from t1; + +--connection node_1 + +## +## Verify the return to automatic calculation of the step +## and offset of the auto-increment: +## + +SET GLOBAL wsrep_auto_increment_control='ON'; + +SET SESSION binlog_format='ROW'; + +show variables like 'binlog_format'; +show variables like '%auto_increment%'; + +## +## Verify the recovery of original user-defined values after +## stopping the automatic control over auto-increment: +## + +SET GLOBAL wsrep_auto_increment_control='OFF'; + +show variables like '%auto_increment%'; + +## +## Restore original options and drop test table: +## + +SET GLOBAL wsrep_auto_increment_control='ON'; + +drop table t1; + +## +## Verify the correct operation of the auto-increment when the binlog +## format set to the 'ROW': +## + +--connection node_2 +SET GLOBAL wsrep_forced_binlog_format='ROW'; + +--connection node_1 +SET GLOBAL wsrep_forced_binlog_format='ROW'; + +CREATE TABLE t1 ( + i int(11) NOT NULL AUTO_INCREMENT, + c char(32) DEFAULT 'dummy_text', + PRIMARY KEY (i) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +insert into t1(i) values(null); + +select * from t1; + +insert into t1(i) values(null), (null), (null); + +select * from t1; + +--connection node_2 +--let $wait_condition = SELECT COUNT(*) = 4 FROM t1; +--source include/wait_condition.inc + +select * from t1; + +SET GLOBAL wsrep_forced_binlog_format='none'; + +--connection node_1 + +SET GLOBAL wsrep_forced_binlog_format='none'; + +drop table t1; + +## +## Check the operation when the automatic control over the auto-increment +## settings is switched off, that is, when we use the increment step and +## the offset specified by the user. In the current session, the binlog +## format is set to 'ROW'. It is important that the values of the +## auto-increment options does not changed on other node - it allows us +## to check the correct transmission of the auto-increment options to +## other nodes: +## + +SET SESSION binlog_format='ROW'; + +show variables like 'binlog_format'; + +SET GLOBAL wsrep_auto_increment_control='OFF'; + +SET SESSION auto_increment_increment = 3; +SET SESSION auto_increment_offset = 1; + +CREATE TABLE t1 ( + i int(11) NOT NULL AUTO_INCREMENT, + c char(32) DEFAULT 'dummy_text', + PRIMARY KEY (i) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +insert into t1(i) values(null); + +select * from t1; + +insert into t1(i) values(null), (null), (null); + +select * from t1; + +--connection node_2 +--let $wait_condition = SELECT COUNT(*) = 4 FROM t1; +--source include/wait_condition.inc + +select * from t1; + +--connection node_1 + +## +## Verify the return to automatic calculation of the step +## and offset of the auto-increment: +## + +SET GLOBAL wsrep_auto_increment_control='ON'; + +show variables like 'binlog_format'; +show variables like '%auto_increment%'; + +## +## Verify the recovery of original user-defined values after +## stopping the automatic control over auto-increment: +## + +SET GLOBAL wsrep_auto_increment_control='OFF'; + +show variables like '%auto_increment%'; + +## +## Restore original options and drop test table: +## + +SET GLOBAL wsrep_auto_increment_control='ON'; + +drop table t1; + +--source include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera/t/galera_defaults.test b/mysql-test/suite/galera/t/galera_defaults.test index facc5180f2f..0ad97916302 100644 --- a/mysql-test/suite/galera/t/galera_defaults.test +++ b/mysql-test/suite/galera/t/galera_defaults.test @@ -13,7 +13,7 @@ # Make sure that the test is operating on the right version of galera library. --disable_query_log ---let $galera_version=3.20 +--let $galera_version=25.3.20 source ../wsrep/include/check_galera_version.inc; --enable_query_log @@ -59,14 +59,3 @@ ORDER BY VARIABLE_NAME; $wsrep_provider_options =~ s/repl.proto_max = .*?;\s*/<REPL_PROTO_MAX>;/sgio; print $wsrep_provider_options."\n"; EOF - -# Global Status - -SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_STATUS -WHERE VARIABLE_NAME LIKE 'wsrep_%' -AND VARIABLE_NAME != 'wsrep_debug_sync_waiters'; - -SELECT VARIABLE_NAME FROM INFORMATION_SCHEMA.GLOBAL_STATUS -WHERE VARIABLE_NAME LIKE 'wsrep_%' -AND VARIABLE_NAME != 'wsrep_debug_sync_waiters' -ORDER BY VARIABLE_NAME; diff --git a/mysql-test/suite/galera/t/galera_drop_database.test b/mysql-test/suite/galera/t/galera_drop_database.test new file mode 100644 index 00000000000..47fe8315198 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_drop_database.test @@ -0,0 +1,65 @@ +# +# This test tests a DROP empty database +# +--source include/galera_cluster.inc +--source include/have_innodb.inc + +# Save original auto_increment_offset values. +--let $node_1=node_1 +--let $node_2=node_2 +--source include/auto_increment_offset_save.inc + +CREATE DATABASE fts; +USE fts; +CREATE TABLE fts_t1 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(100), FULLTEXT (f2)) ENGINE=InnoDB; +CREATE TABLE fts_t2 (f2 VARCHAR(100), FULLTEXT (f2)) ENGINE=InnoDB; + +# Insert 1K rows +CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); +INSERT INTO fts_t1 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3; +INSERT INTO fts_t2 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3; +DROP TABLE ten; +UPDATE fts_t1 SET f2 = 'abcd'; +UPDATE fts_t2 SET f2 = 'efjh'; + +--connection node_2 +let $wsrep_cluster_address = `SELECT @@global.wsrep_node_incoming_address`; +--source include/restart_mysqld.inc + +--connection node_1 +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + +--let $galera_connection_name = node_2a +--let $galera_server_number = 2 +--source include/galera_connect.inc +--connection node_2a +--source include/wait_until_ready.inc + +--connection node_1 +--let $restart_parameters = --wsrep-cluster-address=gcomm://$wsrep_cluster_address +--source include/restart_mysqld.inc + +--connection node_2a +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + +--let $galera_connection_name = node_1a +--let $galera_server_number = 1 +--source include/galera_connect.inc +--connection node_1a +--source include/wait_until_ready.inc + +USE fts; +DROP TABLE fts_t1; +DROP TABLE fts_t2; +SHOW TABLES; +DROP DATABASE fts; + +# Restore original auto_increment_offset values. +--let $node_1=node_1a +--let $node_2=node_2a +--source include/auto_increment_offset_restore.inc + +--source include/galera_end.inc diff --git a/mysql-test/suite/galera/t/galera_enum.test b/mysql-test/suite/galera/t/galera_enum.test index 2497f717ef2..ecca615b2b2 100644 --- a/mysql-test/suite/galera/t/galera_enum.test +++ b/mysql-test/suite/galera/t/galera_enum.test @@ -17,9 +17,12 @@ INSERT INTO t1 VALUES ('one'), ('two'); INSERT IGNORE INTO t1 VALUES (0), (1), (2); --connection node_2 -SELECT COUNT(*) = 6 FROM t1; -SELECT COUNT(*) = 2 FROM t1 where f1 = ''; -SELECT COUNT(*) = 2 FROM t1 where f1 = 'one'; +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1'; +--source include/wait_condition.inc + +SELECT COUNT(*) FROM t1; +SELECT COUNT(*) FROM t1 where f1 = ''; +SELECT COUNT(*) FROM t1 where f1 = 'one'; DROP TABLE t1; @@ -33,8 +36,10 @@ CREATE TABLE t1 (f1 ENUM('', 'one', 'two', 'three', 'four') PRIMARY KEY) ENGINE= INSERT INTO t1 VALUES (''), ('one'), ('two'); --connection node_2 -SELECT COUNT(*) = 3 FROM t1; -SELECT COUNT(*) = 1 FROM t1 WHERE f1 = ''; +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1'; +--source include/wait_condition.inc +SELECT COUNT(*) FROM t1; +SELECT COUNT(*) FROM t1 WHERE f1 = ''; # Conflict @@ -57,6 +62,7 @@ COMMIT; --connection node_1 -SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 'three'; +SELECT COUNT(*) FROM t1 WHERE f1 = 'three'; +SELECT * FROM t1; DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/galera_ist_mysqldump.test b/mysql-test/suite/galera/t/galera_ist_mysqldump.test index f60d5549eda..7bfca0334fa 100644 --- a/mysql-test/suite/galera/t/galera_ist_mysqldump.test +++ b/mysql-test/suite/galera/t/galera_ist_mysqldump.test @@ -4,6 +4,8 @@ --source suite/galera/include/galera_sst_set_mysqldump.inc +call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to .*"); + --let $node_1=node_1 --let $node_2=node_2 --source include/auto_increment_offset_save.inc diff --git a/mysql-test/suite/galera/t/galera_ist_xtrabackup-v2.test b/mysql-test/suite/galera/t/galera_ist_xtrabackup-v2.test index c44b0642342..34961765008 100644 --- a/mysql-test/suite/galera/t/galera_ist_xtrabackup-v2.test +++ b/mysql-test/suite/galera/t/galera_ist_xtrabackup-v2.test @@ -3,8 +3,13 @@ --source include/have_innodb.inc --source include/have_xtrabackup.inc +--let $node_1=node_1 +--let $node_2=node_2 +--source include/auto_increment_offset_save.inc + --source suite/galera/include/galera_st_disconnect_slave.inc --source suite/galera/include/galera_st_shutdown_slave.inc --source suite/galera/include/galera_st_kill_slave.inc --source suite/galera/include/galera_st_kill_slave_ddl.inc +--source include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera/t/galera_kill_ddl.test b/mysql-test/suite/galera/t/galera_kill_ddl.test index 90f3f30cc76..ca59264ced4 100644 --- a/mysql-test/suite/galera/t/galera_kill_ddl.test +++ b/mysql-test/suite/galera/t/galera_kill_ddl.test @@ -5,6 +5,8 @@ --source include/galera_cluster.inc --source include/have_innodb.inc +call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*"); + --connection node_1 # Enable the master to continue running during the split-brain situation that diff --git a/mysql-test/suite/galera/t/galera_kill_largechanges.test b/mysql-test/suite/galera/t/galera_kill_largechanges.test index e9a32ce813b..2803a43d85a 100644 --- a/mysql-test/suite/galera/t/galera_kill_largechanges.test +++ b/mysql-test/suite/galera/t/galera_kill_largechanges.test @@ -6,6 +6,8 @@ --source include/galera_cluster.inc --source include/have_innodb.inc +call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*"); + --connection node_1 # Enable the master to continue running during the split-brain situation that # occurs when the slave is killed diff --git a/mysql-test/suite/galera/t/galera_kill_smallchanges.test b/mysql-test/suite/galera/t/galera_kill_smallchanges.test index d998032cbc3..148c3dbc132 100644 --- a/mysql-test/suite/galera/t/galera_kill_smallchanges.test +++ b/mysql-test/suite/galera/t/galera_kill_smallchanges.test @@ -5,6 +5,8 @@ --source include/galera_cluster.inc --source include/have_innodb.inc +call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*"); + --connection node_1 # Enable the master to continue running during the split-brain situation that diff --git a/mysql-test/suite/galera/t/galera_pc_ignore_sb.test b/mysql-test/suite/galera/t/galera_pc_ignore_sb.test index f24ca5cd25b..c48ddc66bdf 100644 --- a/mysql-test/suite/galera/t/galera_pc_ignore_sb.test +++ b/mysql-test/suite/galera/t/galera_pc_ignore_sb.test @@ -11,10 +11,13 @@ --source include/auto_increment_offset_save.inc --connection node_1 ---let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address` ---let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options` +SET @wsrep_cluster_address_orig = @@GLOBAL.wsrep_cluster_address; +SET @wsrep_provider_options_orig = @@GLOBAL.wsrep_provider_options; -SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true'; +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' +--source include/wait_condition.inc + +SET GLOBAL wsrep_provider_options ='pc.ignore_sb=true'; --connection node_2 --source include/kill_galera.inc @@ -33,14 +36,18 @@ SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABL # Reset the master and restart the slave so that post-test checks can run SET GLOBAL wsrep_cluster_address = ''; ---disable_query_log ---eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig'; ---eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_orig'; ---enable_query_log +SET GLOBAL wsrep_cluster_address = @wsrep_cluster_address_orig; --connection node_2 --source include/start_mysqld.inc + +--connection node_1 +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' +--source include/wait_condition.inc + +SET GLOBAL wsrep_provider_options = @wsrep_provider_options_orig; + # Restore original auto_increment_offset values. --source include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.test b/mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.test index 0dbc63b531c..57244cb50c7 100644 --- a/mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.test +++ b/mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.test @@ -19,7 +19,12 @@ GRANT USAGE ON *.* TO sslsst REQUIRE SSL; SET GLOBAL wsrep_sst_auth = 'sslsst:'; ---source suite/galera/include/galera_st_disconnect_slave.inc +# We set the required mysqldump SST options here so that they are used every time the server is restarted during the test +--let $start_mysqld_params = --wsrep_sst_auth=sst:'sslsst:' --wsrep_sst_method=mysqldump --wsrep-sst-receive-address=127.0.0.1:$NODE_MYPORT_2 --skip-grant-tables + +--source suite/galera/include/galera_st_shutdown_slave.inc +--source suite/galera/include/galera_st_kill_slave.inc +--source suite/galera/include/galera_st_kill_slave_ddl.inc --source include/auto_increment_offset_restore.inc --source suite/galera/include/galera_sst_restore.inc diff --git a/mysql-test/suite/galera/t/galera_sst_rsync2.cnf b/mysql-test/suite/galera/t/galera_sst_rsync2.cnf new file mode 100644 index 00000000000..34e67c66403 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_sst_rsync2.cnf @@ -0,0 +1,15 @@ +!include ../galera_2nodes.cnf + +[mysqld] +wsrep_sst_method=rsync + +[mysqld.1] +wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true' +log_bin=@ENV.MYSQLTEST_VARDIR/server1_binlog +log_bin_index=@ENV.MYSQLTEST_VARDIR/tmp/server1_binlog_index.index + +[mysqld.2] +wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true' +log_bin=@ENV.MYSQLTEST_VARDIR/server2_binlog +log_bin_index=@ENV.MYSQLTEST_VARDIR/tmp/server2_binlog_index.index + diff --git a/mysql-test/suite/galera/t/galera_sst_rsync2.test b/mysql-test/suite/galera/t/galera_sst_rsync2.test new file mode 100644 index 00000000000..f796356cac7 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_sst_rsync2.test @@ -0,0 +1,12 @@ +--source include/galera_cluster.inc + +--let $node_1=node_1 +--let $node_2=node_2 +--source include/auto_increment_offset_save.inc + +--source suite/galera/include/galera_st_shutdown_slave.inc +--source suite/galera/include/galera_st_clean_slave.inc + +--source suite/galera/include/galera_st_kill_slave.inc +--source suite/galera/include/galera_st_kill_slave_ddl.inc +--source include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera/t/galera_sst_rsync_data_dir.cnf b/mysql-test/suite/galera/t/galera_sst_rsync_data_dir.cnf new file mode 100644 index 00000000000..afe9796a11a --- /dev/null +++ b/mysql-test/suite/galera/t/galera_sst_rsync_data_dir.cnf @@ -0,0 +1,11 @@ +!include ../galera_2nodes.cnf + +[mysqld] +wsrep_sst_method=rsync + +[mysqld.1] +wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true' + +[mysqld.2] +innodb_data_home_dir=@ENV.MYSQL_TMP_DIR/rsync_test_2 +wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true' diff --git a/mysql-test/suite/galera/t/galera_sst_rsync_data_dir.test b/mysql-test/suite/galera/t/galera_sst_rsync_data_dir.test new file mode 100644 index 00000000000..68aa1068f75 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_sst_rsync_data_dir.test @@ -0,0 +1,16 @@ +--source include/big_test.inc +--source include/galera_cluster.inc + +--let $node_1=node_1 +--let $node_2=node_2 +--source include/auto_increment_offset_save.inc + +--source suite/galera/include/galera_st_shutdown_slave.inc +--source suite/galera/include/galera_st_clean_slave.inc + +--source suite/galera/include/galera_st_kill_slave.inc +--source suite/galera/include/galera_st_kill_slave_ddl.inc +--source include/auto_increment_offset_restore.inc + +# cleanup temporary database files: +--remove_files_wildcard $MYSQL_TMP_DIR/rsync_test_2 * diff --git a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_data_dir.cnf b/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_data_dir.cnf new file mode 100644 index 00000000000..89f23d24d87 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_data_dir.cnf @@ -0,0 +1,16 @@ +!include ../galera_2nodes.cnf + +[mysqld] +wsrep_sst_method=xtrabackup-v2 +wsrep_sst_auth="root:" +wsrep_debug=ON + +[mysqld.1] +wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true' + +[mysqld.2] +innodb_data_home_dir=@ENV.MYSQL_TMP_DIR/rsync_test_2 +wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true' + +[sst] +transferfmt=@ENV.MTR_GALERA_TFMT diff --git a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_data_dir.test b/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_data_dir.test new file mode 100644 index 00000000000..135bc2a39f7 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2_data_dir.test @@ -0,0 +1,23 @@ +--source include/big_test.inc +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_xtrabackup.inc + +# Save original auto_increment_offset values. +--let $node_1=node_1 +--let $node_2=node_2 +--source include/auto_increment_offset_save.inc + +--source suite/galera/include/galera_st_shutdown_slave.inc +--source suite/galera/include/galera_st_clean_slave.inc + +--source suite/galera/include/galera_st_kill_slave.inc +--source suite/galera/include/galera_st_kill_slave_ddl.inc + +# Restore original auto_increment_offset values. +--source include/auto_increment_offset_restore.inc + +--source include/galera_end.inc + +# cleanup temporary database files: +--remove_files_wildcard $MYSQL_TMP_DIR/rsync_test_2 * diff --git a/mysql-test/suite/galera/t/galera_suspend_slave.test b/mysql-test/suite/galera/t/galera_suspend_slave.test index 6f0f8014397..0f95bcd4531 100644 --- a/mysql-test/suite/galera/t/galera_suspend_slave.test +++ b/mysql-test/suite/galera/t/galera_suspend_slave.test @@ -34,6 +34,8 @@ SET SESSION wsrep_sync_wait = 0; --let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; --source include/wait_condition.inc +SET SESSION wsrep_sync_wait = 15; + --error ER_UNKNOWN_COM_ERROR,ER_LOCK_WAIT_TIMEOUT,ER_LOCK_DEADLOCK,ER_ERROR_DURING_COMMIT INSERT INTO t1 VALUES (1); @@ -46,6 +48,7 @@ INSERT INTO t1 VALUES (1); exit(0); EOF +SET SESSION wsrep_sync_wait = 0; --source include/wait_until_ready.inc INSERT INTO t1 VALUES (1); diff --git a/mysql-test/suite/galera/t/galera_toi_truncate.test b/mysql-test/suite/galera/t/galera_toi_truncate.test index 59ef5c2028f..0c1d0e45e41 100644 --- a/mysql-test/suite/galera/t/galera_toi_truncate.test +++ b/mysql-test/suite/galera/t/galera_toi_truncate.test @@ -5,6 +5,8 @@ --source include/galera_cluster.inc --source include/have_innodb.inc +--source include/have_debug_sync.inc +--source include/not_embedded.inc # # INSERT and TRUNCATE on different nodes @@ -16,14 +18,23 @@ INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; -# Insert 100K rows +# Insert 1m rows --connection node_2 +--let $wait_condition = SELECT COUNT(*) = 10 FROM ten; +--source include/wait_condition.inc + # Prevent autocommit retring from masking the deadlock error we expect to get SET SESSION wsrep_retry_autocommit = 0; +INSERT INTO t1(f1) SELECT 1 FROM ten as a1, ten AS a2; + +set debug_sync='ha_commit_trans_after_prepare WAIT_FOR go'; --send INSERT INTO t1 (f1) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6; --connection node_1 ---sleep 1 +# Wait for a above insert to start +--let $wait_condition = SELECT COUNT(*) >= 100 from t1; +--source include/wait_condition.inc + --send TRUNCATE TABLE t1; --connection node_1 @@ -38,6 +49,5 @@ SELECT COUNT(*) = 0 FROM t1; --connection node_1 SELECT COUNT(*) = 0 FROM t1; - DROP TABLE t1; DROP TABLE ten; diff --git a/mysql-test/suite/galera/t/galera_unicode_identifiers.test b/mysql-test/suite/galera/t/galera_unicode_identifiers.test index f3df60a6415..c0c95768650 100644 --- a/mysql-test/suite/galera/t/galera_unicode_identifiers.test +++ b/mysql-test/suite/galera/t/galera_unicode_identifiers.test @@ -13,6 +13,8 @@ SET GLOBAL wsrep_sync_wait = 15; --connection node_1 +--let $innodb_num_tables_orig = `SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES` + # Spaces in identifiers CREATE DATABASE `database with space`; @@ -21,7 +23,7 @@ CREATE TABLE `table with space` ( `column with space` INTEGER AUTO_INCREMENT PRIMARY KEY, `second column with space` INTEGER, UNIQUE `index name with space` (`second column with space`) -); +) engine=innodb; INSERT INTO `table with space` VALUES (1, 1); # Unicode identifiers @@ -32,7 +34,7 @@ CREATE TABLE `таблица` ( `първа_колона` INTEGER PRIMARY KEY, `втора_колона` INTEGER, UNIQUE `индекÑ` (`втора_колона`) -); +) engine=innodb; INSERT INTO `таблица` VALUES (1, 1); @@ -44,11 +46,15 @@ CREATE TABLE `втора таблица` ( `първа колона` INTEGER, `втора колона` INTEGER, KEY `първи индекÑ` (`първа колона`) -); +) engine=innodb; INSERT INTO `втора таблица` VALUES (1, 1); --connection node_2 +# Wait until 3 above tables with databases are created also to this node +--let $wait_condition = SELECT COUNT(*) = $innodb_num_tables_orig + 3 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES; +--source include/wait_condition.inc + USE `database with space`; SELECT `second column with space` FROM `table with space`; diff --git a/mysql-test/suite/galera/t/galera_var_desync_on.test b/mysql-test/suite/galera/t/galera_var_desync_on.test index 06c5d30a769..fbf660d3ab5 100644 --- a/mysql-test/suite/galera/t/galera_var_desync_on.test +++ b/mysql-test/suite/galera/t/galera_var_desync_on.test @@ -1,5 +1,7 @@ # -# Test wsrep_desync = ON . Node should temporarily not participate in flow control +# Desync will be done once the global read lock is acquired and resync will be done when +# it is released. +# Node should temporarily not participate in flow control # so even if fc_limit has been reached, the master should be able to continue to # commit transactions. # @@ -13,7 +15,6 @@ INSERT INTO t1 VALUES (1); --connection node_2 --let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options` SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1'; -SET GLOBAL wsrep_desync = TRUE; # Block the slave applier thread FLUSH TABLES WITH READ LOCK; @@ -37,8 +38,6 @@ SET SESSION wsrep_sync_wait = 0; # No updates have arrived after the FLUSH TABLES SELECT COUNT(*) = 1 FROM t1; -# Resync the slave -SET GLOBAL wsrep_desync = FALSE; --disable_query_log --eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_orig'; --enable_query_log diff --git a/mysql-test/suite/galera/t/galera_var_node_address.test b/mysql-test/suite/galera/t/galera_var_node_address.test index 22e98e3aa82..b50265be5ae 100644 --- a/mysql-test/suite/galera/t/galera_var_node_address.test +++ b/mysql-test/suite/galera/t/galera_var_node_address.test @@ -13,13 +13,19 @@ call mtr.add_suppression("WSREP: Sending JOIN failed: -[0-9]+ (Transport endpoi SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; --connection node_1 -CREATE TABLE t1 (f1 INTEGER); +CREATE TABLE t1 (f1 INTEGER) ENGINE=INNODB; --connection node_2 +let $wait_condition= SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1'; +--source include/wait_condition.inc INSERT INTO t1 VALUES (1); --connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 --connection node_3 +let $wait_condition= SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1'; +--source include/wait_condition.inc +let $wait_condition= SELECT COUNT(*) = 1 FROM t1; +--source include/wait_condition.inc SELECT COUNT(*) = 1 FROM t1; --connection node_1 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 e5986f7ee12..80edcb2aff9 100644 --- a/mysql-test/suite/galera/t/galera_var_slave_threads.test +++ b/mysql-test/suite/galera/t/galera_var_slave_threads.test @@ -33,6 +33,12 @@ SET GLOBAL wsrep_slave_threads = 64; INSERT INTO t1 VALUES (1); --connection node_2 +--let $wait_timeout=600 +--let $wait_condition = SELECT COUNT(*) = 1 FROM t1; +--source include/wait_condition.inc + +SELECT COUNT(*) = 1 FROM t1; + --let $wait_condition = SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%'); --source include/wait_condition.inc @@ -44,6 +50,8 @@ SET GLOBAL wsrep_slave_threads = 1; --connection node_1 +--disable_result_log +--disable_query_log # Generate 64 replication events --let $count = 64 while ($count) @@ -51,6 +59,8 @@ while ($count) INSERT INTO t2 VALUES (DEFAULT); --dec $count } +--enable_query_log +--enable_result_log --connection node_2 SELECT COUNT(*) FROM t2; diff --git a/mysql-test/suite/galera/t/galera_wan.test b/mysql-test/suite/galera/t/galera_wan.test index a8fd351b168..ca86a3000a6 100644 --- a/mysql-test/suite/galera/t/galera_wan.test +++ b/mysql-test/suite/galera/t/galera_wan.test @@ -9,6 +9,12 @@ --source include/galera_cluster.inc --source include/have_innodb.inc +CALL mtr.add_suppression("WSREP: Stray state UUID msg:.*"); +CALL mtr.add_suppression("WSREP: Sending JOIN failed:.*"); +CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside"); +call mtr.add_suppression("WSREP: Sending JOIN failed:.*"); + + SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; --connection node_1 @@ -16,15 +22,19 @@ CREATE TABLE t1 (f1 INTEGER); --connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 --connection node_3 +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1'; +--source include/wait_condition.inc INSERT INTO t1 VALUES (1); -CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside"); --connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4 --connection node_4 +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1'; +--source include/wait_condition.inc +--let $wait_condition = SELECT COUNT(*) = 1 FROM t1; +--source include/wait_condition.inc SELECT VARIABLE_VALUE LIKE '%gmcast.segment = 3%' FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'wsrep_provider_options'; SELECT COUNT(*) = 1 FROM t1; DROP TABLE t1; -CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside"); diff --git a/mysql-test/suite/galera/t/mysql-wsrep#332.test b/mysql-test/suite/galera/t/mysql-wsrep#332.test new file mode 100644 index 00000000000..2da01ba900e --- /dev/null +++ b/mysql-test/suite/galera/t/mysql-wsrep#332.test @@ -0,0 +1,113 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc +--source include/have_debug_sync.inc +--source suite/galera/include/galera_have_debug_sync.inc + +# Open connection node_1a here, MW-369.inc will use it later +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 + +# +# Test the scenario where a foreign key is added to an existing child table, and +# concurrently UPDATE the parent table so that it violates the constraint. +# +# We expect that ALTER TABLE ADD FOREIGN KEY adds a table level key on both +# parent and child table. And therefore we also expect the UPDATE to fail +# certification. +# +--connection node_1 +CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER) ENGINE=INNODB; + +INSERT INTO p VALUES (1, 0); +INSERT INTO p VALUES (2, 0); + +INSERT INTO c VALUES (1, 1); +INSERT INTO c VALUES (2, 2); + +--let $mw_369_parent_query = UPDATE p SET f1 = f1 + 100 +--let $mw_369_child_query = ALTER TABLE c ADD FOREIGN KEY (p_id) REFERENCES p(f1) + +--source MW-369.inc + +# Expect certification failure +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + +--connection node_2 +SELECT * FROM p; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p; + + +# +# Same as above, except that two foreign keys pointing to different parent +# tables are added, p1 and p2. Concurrently UPDATE p1. +# +# Expect certification error on UPDATE. +# +--connection node_1 +CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id1 INTEGER, p_id2 INTEGER) ENGINE=INNODB; + +INSERT INTO p1 VALUES (1, 0), (2, 0); +INSERT INTO p2 VALUES (1, 0), (2, 0); + +INSERT INTO c VALUES (1, 1, 1); +INSERT INTO c VALUES (2, 2, 2); + +--let $mw_369_parent_query = UPDATE p1 SET f1 = f1 + 100 +--let $mw_369_child_query = ALTER TABLE c ADD FOREIGN KEY (p_id1) REFERENCES p1(f1), ADD FOREIGN KEY (p_id2) REFERENCES p2(f1) + +--source MW-369.inc + +# Expect certification failure +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + +--connection node_2 +SELECT * FROM p1; +SELECT * FROM p2; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p1; +DROP TABLE p2; + + +# +# Same as above, except that UPDATE is on p2. +# +--connection node_1 +CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; +CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id1 INTEGER, p_id2 INTEGER) ENGINE=INNODB; + +INSERT INTO p1 VALUES (1, 0), (2, 0); +INSERT INTO p2 VALUES (1, 0), (2, 0); + +INSERT INTO c VALUES (1, 1, 1); +INSERT INTO c VALUES (2, 2, 2); + +--let $mw_369_parent_query = UPDATE p2 SET f1 = f1 + 100 +--let $mw_369_child_query = ALTER TABLE c ADD FOREIGN KEY (p_id1) REFERENCES p1(f1), ADD FOREIGN KEY (p_id2) REFERENCES p2(f1) + +--source MW-369.inc + +# Expect certification failure +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + +--connection node_2 +SELECT * FROM p1; +SELECT * FROM p2; +SELECT * FROM c; + +DROP TABLE c; +DROP TABLE p1; +DROP TABLE p2; diff --git a/mysql-test/suite/galera/t/query_cache.test b/mysql-test/suite/galera/t/query_cache.test index 13b21eca6e7..aeec67fb576 100644 --- a/mysql-test/suite/galera/t/query_cache.test +++ b/mysql-test/suite/galera/t/query_cache.test @@ -114,6 +114,11 @@ show status like "Qcache_queries_in_cache"; show status like "Qcache_hits"; # +# RESET QUERY CACHE +# +--source include/reset_query_cache.inc + +# # MERGE TABLES with INSERT/UPDATE and DELETE # --echo @@ -181,6 +186,11 @@ show status like "Qcache_hits"; drop table t1, t2, t3; # +# RESET QUERY CACHE +# +--source include/reset_query_cache.inc + +# # SELECT SQL_CACHE ... # --echo # On node-1 @@ -214,16 +224,7 @@ set query_cache_type=on; # # RESET QUERY CACHE # ---echo # On node-1 ---connection node_1 -reset query cache; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_hits"; ---echo # On node-2 ---connection node_2 -reset query cache; -show status like "Qcache_queries_in_cache"; -show status like "Qcache_hits"; +--source include/reset_query_cache.inc # # SELECT SQL_NO_CACHE @@ -241,6 +242,11 @@ show status like "Qcache_hits"; drop table t1; # +# RESET QUERY CACHE +# +--source include/reset_query_cache.inc + +# # Check that queries that uses NOW(), LAST_INSERT_ID()... are not cached. # --echo # On node-1 @@ -283,6 +289,11 @@ show status like "Qcache_hits"; drop table t1; # +# RESET QUERY CACHE +# +--source include/reset_query_cache.inc + +# # Non-cachable ODBC work around (and prepare cache for drop database) # --echo # On node-1 @@ -317,6 +328,11 @@ show status like "Qcache_hits"; drop table t1; # +# RESET QUERY CACHE +# +--source include/reset_query_cache.inc + +# # Charset conversion (cp1251_koi8 always present) # Note: Queries using different default character sets are cached separately. # @@ -344,6 +360,11 @@ show status like "Qcache_hits"; drop table t1; # +# RESET QUERY CACHE +# +--source include/reset_query_cache.inc + +# # Same tables in different dbs # --echo # On node-1 @@ -377,6 +398,11 @@ drop database mysqltest; drop table t1; # +# RESET QUERY CACHE +# +--source include/reset_query_cache.inc + +# # FOUND_ROWS() # --echo # On node-1 @@ -429,6 +455,11 @@ show status like "Qcache_queries_in_cache"; drop table t1; # +# RESET QUERY CACHE +# +--source include/reset_query_cache.inc + +# # Test insert delayed (MYISAM) # @@ -532,6 +563,11 @@ set GLOBAL query_cache_min_res_unit=default; show global variables like "query_cache_min_res_unit"; # +# RESET QUERY CACHE +# +--source include/reset_query_cache.inc + +# # Case sensitive test # --echo # On node-1 @@ -554,6 +590,11 @@ show status like "Qcache_inserts"; drop table t1; # +# RESET QUERY CACHE +# +--source include/reset_query_cache.inc + +# # Test of query cache resizing # --echo # On node-1 @@ -620,6 +661,11 @@ select * from t1; drop table t1; # +# RESET QUERY CACHE +# +--source include/reset_query_cache.inc + +# # Temporary tables (ignored by Galera) # --echo # On node-1 @@ -653,6 +699,11 @@ show status like "Qcache_hits"; drop table t1, t2; # +# RESET QUERY CACHE +# +--source include/reset_query_cache.inc + +# # System databse test (no need to perform it on node_2) # Note: Queries on system tables are not cached. # @@ -705,6 +756,11 @@ show status like "Qcache_hits"; drop table t2; # +# RESET QUERY CACHE +# +--source include/reset_query_cache.inc + +# # Load data invalidation test # --echo # On node-1 @@ -717,13 +773,13 @@ show status like "Qcache_hits"; eval load data infile '$MYSQLTEST_VARDIR/std_data/words.dat' into table t1; show status like "Qcache_queries_in_cache"; show status like "Qcache_hits"; -select count(*) from t1; - -# Wait for "load data" to replicate. ---sleep 5 +--let $wait_condition = SELECT COUNT(*) = 70 FROM t1; +--source include/wait_condition.inc --echo # On node-2 --connection node_2 +--let $wait_condition = SELECT COUNT(*) = 70 FROM t1; +--source include/wait_condition.inc select count(*) from t1; show status like "Qcache_queries_in_cache"; show status like "Qcache_hits"; @@ -735,6 +791,11 @@ select count(*) from t1; drop table t1; +# +# RESET QUERY CACHE +# +--source include/reset_query_cache.inc + --echo # --echo # INTO OUTFILE/DUMPFILE test --echo # @@ -756,6 +817,11 @@ let $datadir=`select @@datadir`; --remove_file $datadir/test/query_cache.dump.file --remove_file $datadir/test/query_cache.out.file +# +# RESET QUERY CACHE +# +--source include/reset_query_cache.inc + --echo # --echo # Test of SQL_SELECT_LIMIT --echo # @@ -786,6 +852,11 @@ SET SQL_SELECT_LIMIT=DEFAULT; drop table t1; +# +# RESET QUERY CACHE +# +--source include/reset_query_cache.inc + --echo # --echo # WRITE LOCK & QC --echo # @@ -857,6 +928,11 @@ drop table t1; drop table t1; # +# RESET QUERY CACHE +# +--source include/reset_query_cache.inc + +# # Test character set related variables: # character_set_result # character_set_client @@ -944,6 +1020,11 @@ show status like "Qcache_inserts"; drop table t1; +# +# RESET QUERY CACHE +# +--source include/reset_query_cache.inc + --echo # --echo # Comments before command --echo # @@ -952,27 +1033,28 @@ drop table t1; --connection node_1 create table t1 (a int) engine=innodb; show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; show status like "Qcache_hits"; /**/ select * from t1; /**/ select * from t1; show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; show status like "Qcache_hits"; --echo # On node-2 --connection node_2 show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; show status like "Qcache_hits"; /**/ select * from t1; /**/ select * from t1; show status like "Qcache_queries_in_cache"; -show status like "Qcache_inserts"; show status like "Qcache_hits"; drop table t1; +# +# RESET QUERY CACHE +# +--source include/reset_query_cache.inc + --echo # --echo # Information schema & query cache test --echo # @@ -1011,6 +1093,11 @@ show status like 'qcache_queries_in_cache'; show status like "Qcache_hits"; drop table t1; +# +# RESET QUERY CACHE +# +--source include/reset_query_cache.inc + --echo # Restore original settings. --echo # On node-1 --connection node_1 diff --git a/mysql-test/suite/galera/t/versioning_trx_id.cnf b/mysql-test/suite/galera/t/versioning_trx_id.cnf new file mode 100644 index 00000000000..f7aecd36bf8 --- /dev/null +++ b/mysql-test/suite/galera/t/versioning_trx_id.cnf @@ -0,0 +1 @@ +!include ../galera_4nodes.cnf diff --git a/mysql-test/suite/galera/t/versioning_trx_id.test b/mysql-test/suite/galera/t/versioning_trx_id.test new file mode 100644 index 00000000000..175ead265a5 --- /dev/null +++ b/mysql-test/suite/galera/t/versioning_trx_id.test @@ -0,0 +1,28 @@ +--source include/galera_cluster.inc + +--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 + +--connection node_1 +create table t1 (a int, s bigint unsigned as row start, e bigint unsigned as row end, period for system_time(s,e)) engine=InnoDB with system versioning; +insert into t1 (a) values (1),(2); + +--connection node_2 +insert into t1 (a) values (3),(4); +select a from t1; +select count(*) from mysql.transaction_registry where begin_timestamp='0-0-0'; +select count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp; + +--connection node_3 +insert into t1 (a) values (5),(6); +select a from t1; +select count(*) from mysql.transaction_registry where begin_timestamp='0-0-0'; +select count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp; + +--connection node_1 +select a from t1; +select count(*) from mysql.transaction_registry where begin_timestamp='0-0-0'; +select count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp; + +drop table t1; + +--source include/galera_end.inc diff --git a/mysql-test/suite/galera_3nodes/r/galera_certification_double_failure.result b/mysql-test/suite/galera_3nodes/r/galera_certification_double_failure.result index c2fdfc38dd5..e1528c6f74f 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_certification_double_failure.result +++ b/mysql-test/suite/galera_3nodes/r/galera_certification_double_failure.result @@ -11,6 +11,6 @@ connection node_3; INSERT INTO t2 VALUES (1); connection node_1; COMMIT; -ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +ERROR 40001: Deadlock: wsrep aborted transaction DROP TABLE t1; DROP TABLE t2; diff --git a/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result b/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result index 6fb931638ef..9f845ffe776 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result +++ b/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result @@ -1,11 +1,17 @@ +SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight'; +VARIABLE_VALUE = 3 SET GLOBAL wsrep_provider_options = 'pc.weight=3'; -Suspending node ... +SELECT VARIABLE_VALUE = 5 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight'; +VARIABLE_VALUE = 5 +SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1'; SET SESSION wsrep_sync_wait=0; SET SESSION wsrep_on=OFF; SET SESSION wsrep_on=ON; SHOW STATUS LIKE 'wsrep_cluster_size'; Variable_name Value wsrep_cluster_size 2 +SHOW STATUS LIKE 'wsrep_cluster_weight'; +Variable_name Value SHOW STATUS LIKE 'wsrep_cluster_status'; Variable_name Value wsrep_cluster_status non-Primary @@ -22,9 +28,13 @@ SHOW STATUS LIKE 'wsrep_local_state_comment'; Variable_name Value wsrep_local_state_comment Initialized SET SESSION wsrep_sync_wait=0; +SET SESSION wsrep_on=OFF; +SET SESSION wsrep_on=ON; SHOW STATUS LIKE 'wsrep_cluster_size'; Variable_name Value wsrep_cluster_size 2 +SHOW STATUS LIKE 'wsrep_cluster_weight'; +Variable_name Value SHOW STATUS LIKE 'wsrep_cluster_status'; Variable_name Value wsrep_cluster_status non-Primary @@ -40,7 +50,8 @@ wsrep_local_state 0 SHOW STATUS LIKE 'wsrep_local_state_comment'; Variable_name Value wsrep_local_state_comment Initialized -Resuming node ... +SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight'; +VARIABLE_VALUE = 3 SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; VARIABLE_VALUE = 'Primary' 1 @@ -57,11 +68,14 @@ SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VAR VARIABLE_VALUE = 'Synced' 1 SET GLOBAL wsrep_provider_options = 'pc.weight=1'; -SET SESSION wsrep_sync_wait=0; -SET SESSION wsrep_sync_wait=0; +SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight'; +VARIABLE_VALUE = 1 +SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0'; SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 3 1 +SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight'; +VARIABLE_VALUE = 3 SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; VARIABLE_VALUE = 'Primary' 1 @@ -80,6 +94,8 @@ VARIABLE_VALUE = 'Synced' SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 3 1 +SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight'; +VARIABLE_VALUE = 3 SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; VARIABLE_VALUE = 'Primary' 1 @@ -98,6 +114,8 @@ VARIABLE_VALUE = 'Synced' SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 3 1 +SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight'; +VARIABLE_VALUE = 3 SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; VARIABLE_VALUE = 'Primary' 1 @@ -116,6 +134,9 @@ VARIABLE_VALUE = 'Synced' SET GLOBAL wsrep_provider_options = 'pc.weight=1'; CALL mtr.add_suppression('WSREP: gcs_caused\\(\\) returned -1'); CALL mtr.add_suppression('overriding reported weight for'); +CALL mtr.add_suppression('SYNC message from member'); +CALL mtr.add_suppression('user message in state LEAVING'); +CALL mtr.add_suppression('sending install message failed: (Transport endpoint is not connected|Socket is not connected)'); CALL mtr.add_suppression('WSREP: user message in state LEAVING'); -CALL mtr.add_suppression('sending install message failed: Transport endpoint is not connected'); +CALL mtr.add_suppression('sending install message failed: (Transport endpoint is not connected|Socket is not connected)'); CALL mtr.add_suppression('overriding reported weight for'); diff --git a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test index d69881aa5eb..0a94e7cd85d 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test +++ b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test @@ -8,9 +8,12 @@ --source include/have_innodb.inc --connection node_1 +SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight'; SET GLOBAL wsrep_provider_options = 'pc.weight=3'; ---source include/galera_suspend.inc ---sleep 10 +SELECT VARIABLE_VALUE = 5 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight'; + +# Isolate node_1 from the cluster. +SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1'; --connection node_2 # Do not wait for causality as we are no longer in the primary component @@ -22,8 +25,9 @@ SET SESSION wsrep_on=ON; # We can not use SELECT queries here, as only SHOW is allowed to run. # For nodes #2 and #3, we expect a non-primary component of size 2 - +# and cluster weight 0 SHOW STATUS LIKE 'wsrep_cluster_size'; +SHOW STATUS LIKE 'wsrep_cluster_weight'; SHOW STATUS LIKE 'wsrep_cluster_status'; SHOW STATUS LIKE 'wsrep_connected'; SHOW STATUS LIKE 'wsrep_ready'; @@ -35,8 +39,13 @@ SHOW STATUS LIKE 'wsrep_local_state_comment'; --source include/galera_connect.inc --connection node_3 SET SESSION wsrep_sync_wait=0; +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; SHOW STATUS LIKE 'wsrep_cluster_size'; +SHOW STATUS LIKE 'wsrep_cluster_weight'; SHOW STATUS LIKE 'wsrep_cluster_status'; SHOW STATUS LIKE 'wsrep_connected'; SHOW STATUS LIKE 'wsrep_ready'; @@ -44,15 +53,13 @@ SHOW STATUS LIKE 'wsrep_local_state'; SHOW STATUS LIKE 'wsrep_local_state_comment'; --connection node_1 ---source include/galera_resume.inc ---sleep 10 ---source include/wait_until_connected_again.inc # For Node #1, we expect a primary component of size 1 --let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' --source include/wait_condition.inc +SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight'; SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected'; SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'; @@ -60,30 +67,27 @@ SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; SET GLOBAL wsrep_provider_options = 'pc.weight=1'; +SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight'; -# Restore the cluster by resetting wsrep_cluster_address on nodes #1 and #2 +# Resume cluster connectivity on node_1 +--connection node_1 +SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0'; ---connection node_2 ---disable_query_log ---eval SET GLOBAL wsrep_cluster_address = @@wsrep_cluster_address; ---enable_query_log +--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' +--source include/wait_condition.inc -SET SESSION wsrep_sync_wait=0; ---source include/wait_until_connected_again.inc +--connection node_2 +--source include/wait_condition.inc --connection node_3 ---disable_query_log ---eval SET GLOBAL wsrep_cluster_address = @@wsrep_cluster_address; ---enable_query_log - -SET SESSION wsrep_sync_wait=0; ---source include/wait_until_connected_again.inc - -# On all nodes, we now expect a Primary component of size 3, Synced and ready +--source include/wait_condition.inc --connection node_1 ---source include/wait_until_connected_again.inc +--source include/wait_condition.inc + +# On all nodes, we now expect a Primary component of size 3, weight 3, Synced and ready SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight'; SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected'; SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'; @@ -92,6 +96,7 @@ SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VAR --connection node_2 SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight'; SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected'; SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'; @@ -100,6 +105,7 @@ SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VAR --connection node_3 SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight'; SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_connected'; SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'; @@ -116,8 +122,11 @@ CALL mtr.add_suppression('WSREP: gcs_caused\\(\\) returned -1'); --connection node_2 CALL mtr.add_suppression('overriding reported weight for'); +CALL mtr.add_suppression('SYNC message from member'); +CALL mtr.add_suppression('user message in state LEAVING'); +CALL mtr.add_suppression('sending install message failed: (Transport endpoint is not connected|Socket is not connected)'); --connection node_3 CALL mtr.add_suppression('WSREP: user message in state LEAVING'); -CALL mtr.add_suppression('sending install message failed: Transport endpoint is not connected'); +CALL mtr.add_suppression('sending install message failed: (Transport endpoint is not connected|Socket is not connected)'); CALL mtr.add_suppression('overriding reported weight for'); diff --git a/mysql-test/suite/gcol/r/gcol_bug20746926.result b/mysql-test/suite/gcol/r/gcol_bug20746926.result index 74fe76b3f1a..590caf02503 100644 --- a/mysql-test/suite/gcol/r/gcol_bug20746926.result +++ b/mysql-test/suite/gcol/r/gcol_bug20746926.result @@ -11,22 +11,22 @@ c timestamp generated always as ((a not in (b,b))) stored insert t1(a) values(7777777777); Warnings: Warning 1265 Data truncated for column 'a' at row 1 -Warning 1292 Incorrect datetime value: '0' +Warning 1292 Truncated incorrect datetime value: '0' show warnings; Level Code Message Warning 1265 Data truncated for column 'a' at row 1 -Warning 1292 Incorrect datetime value: '0' +Warning 1292 Truncated incorrect datetime value: '0' disconnect con1; connect con2,localhost,root,,; set sql_mode=''; insert t1(a) values(6666666666); Warnings: Warning 1265 Data truncated for column 'a' at row 1 -Warning 1292 Incorrect datetime value: '0' +Warning 1292 Truncated incorrect datetime value: '0' show warnings; Level Code Message Warning 1265 Data truncated for column 'a' at row 1 -Warning 1292 Incorrect datetime value: '0' +Warning 1292 Truncated incorrect datetime value: '0' drop table t1; disconnect con2; connection default; diff --git a/mysql-test/suite/gcol/r/gcol_partition_innodb.result b/mysql-test/suite/gcol/r/gcol_partition_innodb.result index 9a0e676e76f..7600c9792f1 100644 --- a/mysql-test/suite/gcol/r/gcol_partition_innodb.result +++ b/mysql-test/suite/gcol/r/gcol_partition_innodb.result @@ -1,4 +1,6 @@ SET @@session.default_storage_engine = 'InnoDB'; +SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency; +SET GLOBAL innodb_purge_rseg_truncate_frequency = 1; drop table if exists t1; # Case 1. Partitioning by RANGE based on a non-stored generated column. CREATE TABLE t1 ( @@ -86,6 +88,20 @@ CHECK TABLE t EXTENDED; Table Op Msg_type Msg_text test.t check status OK DROP TABLE t; +# +# MDEV-16980 Wrongly set tablename len while opening the +# table for purge thread +# +CREATE TABLE t1(pk SERIAL, d DATE, vd DATE AS (d) VIRTUAL, +PRIMARY KEY(pk), KEY (vd))ENGINE=InnoDB +PARTITION BY HASH(pk) PARTITIONS 2; +INSERT IGNORE INTO t1 (d) VALUES ('2015-04-14'); +SET sql_mode= ''; +REPLACE INTO t1 SELECT * FROM t1; +Warnings: +Warning 1906 The value specified for generated column 'vd' in table 't1' ignored +DROP TABLE t1; +InnoDB 0 transactions not purged DROP VIEW IF EXISTS v1,v2; DROP TABLE IF EXISTS t1,t2,t3; DROP PROCEDURE IF EXISTS p1; @@ -93,3 +109,4 @@ DROP FUNCTION IF EXISTS f1; DROP TRIGGER IF EXISTS trg1; DROP TRIGGER IF EXISTS trg2; set sql_warnings = 0; +SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency; diff --git a/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result b/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result index fa15be0352f..552805110b1 100644 --- a/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result +++ b/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result @@ -191,22 +191,18 @@ connection default; COMMIT; connect truncate,localhost,root,,; REPLACE INTO t1(pk, y) SELECT pk,y FROM t1; -SET DEBUG_SYNC='row_trunc_before_dict_lock SIGNAL commit WAIT_FOR release'; TRUNCATE TABLE t1; connection prevent_purge; -SET DEBUG_SYNC='now WAIT_FOR commit'; COMMIT; SET DEBUG_SYNC='now SIGNAL purge_start'; disconnect prevent_purge; connection default; SET DEBUG_SYNC='now WAIT_FOR purge_start'; -InnoDB 2 transactions not purged -SET DEBUG_SYNC='now SIGNAL release'; +InnoDB 0 transactions not purged SET GLOBAL debug_dbug=@old_dbug; connection truncate; disconnect truncate; connection default; -InnoDB 0 transactions not purged DROP TABLE t1, t2; set debug_sync=reset; SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency; diff --git a/mysql-test/suite/gcol/r/innodb_virtual_index.result b/mysql-test/suite/gcol/r/innodb_virtual_index.result index 48efd4edeb1..8d4762e1b90 100644 --- a/mysql-test/suite/gcol/r/innodb_virtual_index.result +++ b/mysql-test/suite/gcol/r/innodb_virtual_index.result @@ -207,3 +207,35 @@ t1 CREATE TABLE `t1` ( KEY `n` (`col2`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DROP TABLE t1; +# +# Bug #27968952 INNODB CRASH/CORRUPTION WITH TEXT PREFIX INDEXES +# +CREATE TABLE t1( +a INT NOT NULL UNIQUE, +b INT NOT NULL, +c TEXT GENERATED ALWAYS AS (a <> b) VIRTUAL, +d TEXT NOT NULL, +UNIQUE KEY (c(1)), KEY(d(1)) +) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +SET @t = REPEAT('t',@@innodb_page_size); +INSERT INTO t1 (a,b,d) VALUES (1,0,@t), (0,0,@t); +UPDATE t1 SET b = a; +ERROR 23000: Duplicate entry '0' for key 'c' +REPLACE INTO t1 SET a = 0, b = 1, d = 'd'; +SELECT * FROM t1; +a b c d +0 1 1 d +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; +CREATE TABLE t1( +a VARCHAR(1000) GENERATED ALWAYS AS ('1') VIRTUAL, +b VARCHAR(1000) NOT NULL, +c VARCHAR(1000) GENERATED ALWAYS AS (b) STORED, +KEY (b(1)), +KEY (a(1)) +) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; +INSERT INTO t1(b) VALUES(REPEAT('b',1000)); +DELETE FROM t1; +DROP TABLE t1; diff --git a/mysql-test/suite/gcol/r/innodb_virtual_rebuild.result b/mysql-test/suite/gcol/r/innodb_virtual_rebuild.result index 2e35698e47e..35f37034721 100644 --- a/mysql-test/suite/gcol/r/innodb_virtual_rebuild.result +++ b/mysql-test/suite/gcol/r/innodb_virtual_rebuild.result @@ -7,31 +7,31 @@ ROW_FORMAT=REDUNDANT; INSERT INTO t4 SET i=1; ALTER TABLE t4 ADD INDEX(v), LOCK=NONE; ALTER TABLE t4 ADD COLUMN k INT, LOCK=NONE; -ALTER TABLE t4 DROP k, LOCK=NONE; ERROR 0A000: LOCK=NONE is not supported. Reason: online rebuild with indexed virtual columns. Try LOCK=SHARED -ALTER TABLE t4 DROP INDEX v, LOCK=NONE; ALTER TABLE t4 DROP k, LOCK=NONE; +ERROR 42000: Can't DROP COLUMN `k`; check that it exists +ALTER TABLE t4 DROP INDEX v, LOCK=NONE; INSERT INTO t3 SET i=1; ALTER TABLE t3 ADD INDEX(v), LOCK=NONE; ALTER TABLE t3 ADD COLUMN k INT, LOCK=NONE; -ALTER TABLE t3 DROP k, LOCK=NONE; ERROR 0A000: LOCK=NONE is not supported. Reason: online rebuild with indexed virtual columns. Try LOCK=SHARED -ALTER TABLE t3 DROP INDEX v, LOCK=NONE; ALTER TABLE t3 DROP k, LOCK=NONE; +ERROR 42000: Can't DROP COLUMN `k`; check that it exists +ALTER TABLE t3 DROP INDEX v, LOCK=NONE; INSERT INTO t2 SET i=1; ALTER TABLE t2 ADD INDEX(v), LOCK=NONE; ALTER TABLE t2 ADD COLUMN k INT, LOCK=NONE; -ALTER TABLE t2 DROP k, LOCK=NONE; ERROR 0A000: LOCK=NONE is not supported. Reason: online rebuild with indexed virtual columns. Try LOCK=SHARED -ALTER TABLE t2 DROP INDEX v, LOCK=NONE; ALTER TABLE t2 DROP k, LOCK=NONE; +ERROR 42000: Can't DROP COLUMN `k`; check that it exists +ALTER TABLE t2 DROP INDEX v, LOCK=NONE; INSERT INTO t1 SET i=1; ALTER TABLE t1 ADD INDEX(v), LOCK=NONE; ALTER TABLE t1 ADD COLUMN k INT, LOCK=NONE; -ALTER TABLE t1 DROP k, LOCK=NONE; ERROR 0A000: LOCK=NONE is not supported. Reason: online rebuild with indexed virtual columns. Try LOCK=SHARED -ALTER TABLE t1 DROP INDEX v, LOCK=NONE; ALTER TABLE t1 DROP k, LOCK=NONE; +ERROR 42000: Can't DROP COLUMN `k`; check that it exists +ALTER TABLE t1 DROP INDEX v, LOCK=NONE; connect ddl,localhost,root,,test; connection default; connection ddl; diff --git a/mysql-test/suite/gcol/t/gcol_partition_innodb.test b/mysql-test/suite/gcol/t/gcol_partition_innodb.test index 06e6ccc1ba4..75e2f80af20 100644 --- a/mysql-test/suite/gcol/t/gcol_partition_innodb.test +++ b/mysql-test/suite/gcol/t/gcol_partition_innodb.test @@ -30,6 +30,8 @@ # Set the session storage engine --source include/have_innodb.inc eval SET @@session.default_storage_engine = 'InnoDB'; +SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency; +SET GLOBAL innodb_purge_rseg_truncate_frequency = 1; ##### Workarounds for known open engine specific bugs # none @@ -41,6 +43,24 @@ eval SET @@session.default_storage_engine = 'InnoDB'; #------------------------------------------------------------------------------# # Execute storage engine specific tests +--echo # +--echo # MDEV-16980 Wrongly set tablename len while opening the +--echo # table for purge thread +--echo # + +CREATE TABLE t1(pk SERIAL, d DATE, vd DATE AS (d) VIRTUAL, + PRIMARY KEY(pk), KEY (vd))ENGINE=InnoDB + PARTITION BY HASH(pk) PARTITIONS 2; + +INSERT IGNORE INTO t1 (d) VALUES ('2015-04-14'); +SET sql_mode= ''; +REPLACE INTO t1 SELECT * FROM t1; + +# Cleanup +DROP TABLE t1; + +--source suite/innodb/include/wait_all_purged.inc #------------------------------------------------------------------------------# # Cleanup --source suite/gcol/inc/gcol_cleanup.inc +SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency; diff --git a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test index 1f67c8c8491..8568c66eccc 100644 --- a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test +++ b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test @@ -240,21 +240,16 @@ COMMIT; connect(truncate,localhost,root,,); REPLACE INTO t1(pk, y) SELECT pk,y FROM t1; -SET DEBUG_SYNC='row_trunc_before_dict_lock SIGNAL commit WAIT_FOR release'; send TRUNCATE TABLE t1; connection prevent_purge; -SET DEBUG_SYNC='now WAIT_FOR commit'; COMMIT; SET DEBUG_SYNC='now SIGNAL purge_start'; disconnect prevent_purge; connection default; SET DEBUG_SYNC='now WAIT_FOR purge_start'; -let $wait_all_purged=2; --source ../../innodb/include/wait_all_purged.inc -let $wait_all_purged=0; -SET DEBUG_SYNC='now SIGNAL release'; SET GLOBAL debug_dbug=@old_dbug; connection truncate; @@ -262,7 +257,6 @@ reap; disconnect truncate; connection default; ---source ../../innodb/include/wait_all_purged.inc DROP TABLE t1, t2; --source include/wait_until_count_sessions.inc diff --git a/mysql-test/suite/gcol/t/innodb_virtual_index.test b/mysql-test/suite/gcol/t/innodb_virtual_index.test index 6604a6d94f4..8f4e09fdf31 100644 --- a/mysql-test/suite/gcol/t/innodb_virtual_index.test +++ b/mysql-test/suite/gcol/t/innodb_virtual_index.test @@ -232,3 +232,34 @@ CREATE TABLE t1 (col1 int(10)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; ALTER TABLE t1 ADD col2 char(21) AS (col1 * col1), ADD INDEX n (col2); SHOW CREATE TABLE t1; DROP TABLE t1; + +--echo # +--echo # Bug #27968952 INNODB CRASH/CORRUPTION WITH TEXT PREFIX INDEXES +--echo # + +CREATE TABLE t1( + a INT NOT NULL UNIQUE, + b INT NOT NULL, + c TEXT GENERATED ALWAYS AS (a <> b) VIRTUAL, + d TEXT NOT NULL, + UNIQUE KEY (c(1)), KEY(d(1)) +) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +SET @t = REPEAT('t',@@innodb_page_size); +INSERT INTO t1 (a,b,d) VALUES (1,0,@t), (0,0,@t); +--error ER_DUP_ENTRY +UPDATE t1 SET b = a; +REPLACE INTO t1 SET a = 0, b = 1, d = 'd'; +SELECT * FROM t1; +CHECK TABLE t1; +DROP TABLE t1; + +CREATE TABLE t1( + a VARCHAR(1000) GENERATED ALWAYS AS ('1') VIRTUAL, + b VARCHAR(1000) NOT NULL, + c VARCHAR(1000) GENERATED ALWAYS AS (b) STORED, + KEY (b(1)), + KEY (a(1)) +) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; +INSERT INTO t1(b) VALUES(REPEAT('b',1000)); +DELETE FROM t1; +DROP TABLE t1; diff --git a/mysql-test/suite/gcol/t/innodb_virtual_rebuild.test b/mysql-test/suite/gcol/t/innodb_virtual_rebuild.test index 37ab82c46db..fe4f5e307b3 100644 --- a/mysql-test/suite/gcol/t/innodb_virtual_rebuild.test +++ b/mysql-test/suite/gcol/t/innodb_virtual_rebuild.test @@ -14,11 +14,12 @@ while ($n) { eval INSERT INTO t$n SET i=1; eval ALTER TABLE t$n ADD INDEX(v), LOCK=NONE; -eval ALTER TABLE t$n ADD COLUMN k INT, LOCK=NONE; +# MDEV-17468 FIXME: Fix this, and remove the 2 --error below. --error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON +eval ALTER TABLE t$n ADD COLUMN k INT, LOCK=NONE; +--error ER_CANT_DROP_FIELD_OR_KEY eval ALTER TABLE t$n DROP k, LOCK=NONE; eval ALTER TABLE t$n DROP INDEX v, LOCK=NONE; -eval ALTER TABLE t$n DROP k, LOCK=NONE; dec $n; } diff --git a/mysql-test/suite/heap/heap_btree.result b/mysql-test/suite/heap/heap_btree.result index 12a011778c6..83d1bcb6c92 100644 --- a/mysql-test/suite/heap/heap_btree.result +++ b/mysql-test/suite/heap/heap_btree.result @@ -379,3 +379,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range uniq_id uniq_id 8 NULL 4 Using where drop table t1; End of 5.3 tests +create table t1 (id int, a varchar(300) not null, key using btree(a)) engine=heap; +insert t1 values (1, repeat('a', 300)); +drop table t1; +End of 5.5 tests diff --git a/mysql-test/suite/heap/heap_btree.test b/mysql-test/suite/heap/heap_btree.test index 02c09f52263..aca41c430b3 100644 --- a/mysql-test/suite/heap/heap_btree.test +++ b/mysql-test/suite/heap/heap_btree.test @@ -279,3 +279,12 @@ explain select 0+a from t1 where a in (869751,736494,226312,802616); drop table t1; --echo End of 5.3 tests + +# +# Bug#27799513: POTENTIAL DOUBLE FREE OR CORRUPTION OF HEAP INFO (HP_INFO) +# +create table t1 (id int, a varchar(300) not null, key using btree(a)) engine=heap; +insert t1 values (1, repeat('a', 300)); +drop table t1; + +--echo End of 5.5 tests diff --git a/mysql-test/suite/innodb/include/alter_nocopy.inc b/mysql-test/suite/innodb/include/alter_nocopy.inc deleted file mode 100644 index 6b19d244bd9..00000000000 --- a/mysql-test/suite/innodb/include/alter_nocopy.inc +++ /dev/null @@ -1,33 +0,0 @@ -CREATE TABLE t1(f1 INT PRIMARY KEY, f2 INT NOT NULL, - f3 INT AS (f2 * f2) VIRTUAL, - f4 INT NOT NULL UNIQUE, - f5 INT NOT NULL, - INDEX`idx`(f2))ENGINE=INNODB; - -CREATE TABLE t2(f1 INT NOT NULL, f2 INT NOT NULL, - INDEX(f1), - FOREIGN KEY `fidx` (f1) REFERENCES t1(f1))ENGINE=INNODB; - -INSERT INTO t1(f1, f2, f4, f5) VALUES(1, 2, 3, 4); - -SELECT @@alter_algorithm; - ---enable_info ---error $error_code ---eval ALTER TABLE t1 ADD INDEX idx1(f4) - ---error $error_code ---eval ALTER TABLE t1 DROP INDEX idx - ---error $error_code ---eval ALTER TABLE t1 ADD UNIQUE INDEX u1(f2) - ---error $error_code ---eval ALTER TABLE t1 DROP INDEX f4 - -SET foreign_key_checks = 0; ---error $error_code ---eval ALTER TABLE t1 ADD FOREIGN KEY(f5) REFERENCES t2(f1) - -DROP TABLE t2, t1; ---disable_info diff --git a/mysql-test/suite/innodb/include/alter_nocopy_fail.inc b/mysql-test/suite/innodb/include/alter_nocopy_fail.inc deleted file mode 100644 index a075cf96e3c..00000000000 --- a/mysql-test/suite/innodb/include/alter_nocopy_fail.inc +++ /dev/null @@ -1,51 +0,0 @@ -CREATE TABLE t1(f1 INT NOT NULL, - f2 INT NOT NULL, - f3 INT NULL, - f4 INT as (f2) STORED, - f5 INT as (f3) STORED, - PRIMARY KEY(f1))ROW_FORMAT=COMPRESSED, ENGINE=INNODB; -INSERT INTO t1(f1, f2, f3) VALUES(1, 1, 1); - -SELECT @@alter_algorithm; - ---enable_info ---echo # All the following cases needs table rebuild - ---echo # Add and Drop primary key ---error $error_code ---eval ALTER TABLE t1 ADD COLUMN col1 INT NOT NULL,DROP PRIMARY KEY,ADD PRIMARY KEY(col1) - ---echo # Make existing column NULLABLE ---error $error_code ---eval ALTER TABLE t1 MODIFY f2 INT - ---echo # Make existing column NON-NULLABLE ---error $error_code ---eval ALTER TABLE t1 MODIFY f3 INT NOT NULL - ---echo # Drop Stored Column ---error $error_code ---eval ALTER TABLE t1 DROP COLUMN f5 - ---echo # Add base non-generated column as a last column in the compressed table ---error $error_code ---eval ALTER TABLE t1 ADD COLUMN f6 INT NOT NULL - ---echo # Add base non-generated column but not in the last position ---error $error_code ---eval ALTER TABLE t1 ADD COLUMN f7 INT NOT NULL after f3 - ---echo # Force the table to rebuild ---error $error_code ---eval ALTER TABLE t1 FORCE - ---echo # Row format changes ---error $error_code ---eval ALTER TABLE t1 ROW_FORMAT=COMPRESSED - ---echo # Engine table ---error $error_code ---eval ALTER TABLE t1 ENGINE=INNODB - -DROP TABLE t1; ---disable_info diff --git a/mysql-test/suite/innodb/include/alter_not_null.inc b/mysql-test/suite/innodb/include/alter_not_null.inc deleted file mode 100644 index 109fad38d16..00000000000 --- a/mysql-test/suite/innodb/include/alter_not_null.inc +++ /dev/null @@ -1,94 +0,0 @@ ---source include/have_innodb.inc - -CREATE TABLE t1(f1 INT)ENGINE=INNODB; -INSERT INTO t1 VALUES(NULL); -SELECT * FROM t1; ---enable_info ---error $error_code -ALTER TABLE t1 CHANGE f1 f1 INT NOT NULL; ---disable_info -SELECT * FROM t1; -DROP TABLE t1; - -CREATE TABLE t1(f1 CHAR(10))ENGINE=INNODB; -INSERT INTO t1 VALUES(NULL); -SELECT * FROM t1; ---enable_info ---error $error_code -ALTER TABLE t1 CHANGE f1 f1 CHAR(10) NOT NULL; ---disable_info -SELECT * FROM t1; -DROP TABLE t1; - -CREATE TABLE t1(f1 VARCHAR(10))ENGINE=INNODB; -INSERT INTO t1 VALUES(NULL); -SELECT * FROM t1; ---enable_info ---error $error_code -ALTER TABLE t1 CHANGE f1 f1 VARCHAR(20) NOT NULL; ---disable_info -SELECT * FROM t1; -DROP TABLE t1; - -CREATE TABLE t1(f1 TEXT)ENGINE=INNODB; -INSERT INTO t1 VALUES(NULL); -SELECT * FROM t1; ---enable_info ---error $error_code -ALTER TABLE t1 CHANGE f1 f1 TEXT NOT NULL DEFAULT 'abc'; ---disable_info -SELECT * FROM t1; -DROP TABLE t1; - -CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL, f3 INT)ENGINE=INNODB; -INSERT INTO t1 VALUES(2, 2, NULL); -SELECT * FROM t1; ---enable_info ---error $error_code -ALTER TABLE t1 CHANGE f3 f3 INT NOT NULL DEFAULT (f1 + f2); ---disable_info -SELECT * FROM t1; -DROP TABLE t1; - -CREATE TABLE t1(f1 INT NOT NULL DEFAULT 0, b TINYINT)ENGINE=InnoDB; -INSERT INTO t1 VALUES(10, NULL); -SELECT * FROM t1; ---enable_info ---error $error_code -ALTER TABLE t1 CHANGE b b TINYINT NOT NULL DEFAULT if(unix_timestamp()>1,1000,0); ---disable_info -SELECT * FROM t1; -DROP TABLE t1; - -CREATE TABLE t1(a INT, v INT AS (a), c INT, d INT NOT NULL, e INT) ENGINE=InnoDB; ---enable_info -ALTER TABLE t1 DROP COLUMN c, CHANGE COLUMN e e INT NOT NULL; ---disable_info -DROP TABLE t1; - -CREATE TABLE t1 (a INT, v INT AS (a), d INT NOT NULL, e INT) ENGINE=InnoDB; ---enable_info -ALTER TABLE t1 FORCE; ---disable_info -DROP TABLE t1; - -# Alter ignore should work irrespective of sql mode - -CREATE TABLE t1(c1 INT NOT NULL, c2 INT, PRIMARY KEY(c1))ENGINE=INNODB; -INSERT INTO t1 VALUES(1, NULL); ---enable_info -ALTER IGNORE TABLE t1 CHANGE c2 c2 INT NOT NULL DEFAULT 2; ---disable_info -SELECT * FROM t1; -DROP TABLE t1; - ---echo # ---echo # MDEV-16126 Crash or ASAN heap-buffer-overflow in ---echo # mach_read_from_n_little_endian upon ALTER TABLE with blob ---echo # - -CREATE TABLE t1(a INT, v INT AS (a), b INT, c BLOB) ENGINE=InnoDB; ---enable_info -ALTER TABLE t1 ADD PRIMARY KEY(b); ---disable_info -DROP TABLE t1; diff --git a/mysql-test/suite/innodb_undo/include/have_undo_tablespaces.combinations b/mysql-test/suite/innodb/include/have_undo_tablespaces.combinations index dbfe4e6c63a..dbfe4e6c63a 100644 --- a/mysql-test/suite/innodb_undo/include/have_undo_tablespaces.combinations +++ b/mysql-test/suite/innodb/include/have_undo_tablespaces.combinations diff --git a/mysql-test/suite/innodb_undo/include/have_undo_tablespaces.inc b/mysql-test/suite/innodb/include/have_undo_tablespaces.inc index 87830a4a5f0..87830a4a5f0 100644 --- a/mysql-test/suite/innodb_undo/include/have_undo_tablespaces.inc +++ b/mysql-test/suite/innodb/include/have_undo_tablespaces.inc diff --git a/mysql-test/suite/innodb/include/innodb_binlog.combinations b/mysql-test/suite/innodb/include/innodb_binlog.combinations new file mode 100644 index 00000000000..46d31e733b1 --- /dev/null +++ b/mysql-test/suite/innodb/include/innodb_binlog.combinations @@ -0,0 +1,3 @@ +[log-bin] +log-bin +[skip-log-bin] diff --git a/mysql-test/suite/innodb/include/innodb_binlog.inc b/mysql-test/suite/innodb/include/innodb_binlog.inc new file mode 100644 index 00000000000..3f6ece2422e --- /dev/null +++ b/mysql-test/suite/innodb/include/innodb_binlog.inc @@ -0,0 +1,3 @@ +# See innodb_binlog.combinations +# --log-bin is ignored in the embedded server +--source include/not_embedded.inc diff --git a/mysql-test/suite/innodb/include/innodb_wl6501_crash.inc b/mysql-test/suite/innodb/include/innodb_wl6501_crash.inc deleted file mode 100644 index 93eca7ec060..00000000000 --- a/mysql-test/suite/innodb/include/innodb_wl6501_crash.inc +++ /dev/null @@ -1,416 +0,0 @@ -# -# WL#6501: make truncate table atomic -# - ---source include/have_innodb.inc ---source include/have_debug.inc ---source include/big_test.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 while writing redo log. -# 2. Hit crash point on completion of redo log write. -# 3. Hit crash point while dropping indexes. -# 4. Hit crash point on completing drop of all indexes before creation of index -# is commenced. -# 5. Hit crash point while creating indexes. -# 6. Hit crash point after data is updated to system-table and in-memory dict. -# 7. Hit crash point before/after log checkpoint is done. -# -################################################################################ - -#----------------------------------------------------------------------------- -# -# create test-bed -# -let $per_table = `select @@innodb_file_per_table`; - -eval set global innodb_file_per_table = on; -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 while writing redo log. -# ---echo "1. Hit crash point while writing redo log." -use test; -eval set global innodb_file_per_table = $wl6501_file_per_table; -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_while_writing_redo_log"; ---source include/expect_crash.inc ---error 2013 -truncate table t; -# ---source include/start_mysqld.inc -check table t; -select * from t; -select * from t where f < 2.5; -drop table t; - -#----------------------------------------------------------------------------- -# -# 2. Hit crash point on completion of redo log write. -# ---echo "2. Hit crash point on completion of redo log write." -use test; -eval set global innodb_file_per_table = $wl6501_file_per_table; -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'); -select * from t; -select * from t where f < 2.5; -drop table t; - -#----------------------------------------------------------------------------- -# -# 3. Hit crash point while dropping indexes. -# ---echo "3. Hit crash point while dropping indexes." -use test; -eval set global innodb_file_per_table = $wl6501_file_per_table; -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_drop_of_clust_index"; ---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; -# -# -use test; -eval set global innodb_file_per_table = $wl6501_file_per_table; -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)) - 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_drop_of_uniq_index"; ---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; -# -# -use test; -eval set global innodb_file_per_table = $wl6501_file_per_table; -SET innodb_strict_mode=OFF; ---disable_warnings -eval create $wl6501_temp table t ( - i int, f float, c char, - primary key pk(i), 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_drop_of_sec_index"; ---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; - -#----------------------------------------------------------------------------- -# -# 4. Hit crash point on completing drop of all indexes before creation of index -# is commenced. -# ---echo "4. Hit crash point on completing drop of all indexes before creation" ---echo " of index is commenced." -use test; -eval set global innodb_file_per_table = $wl6501_file_per_table; -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; - -#----------------------------------------------------------------------------- -# -# 5. Hit crash point while creating indexes. -# ---echo "5. Hit crash point while creating indexes." -use test; -eval set global innodb_file_per_table = $wl6501_file_per_table; -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_create_of_clust_index"; ---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; -# -# -use test; -eval set global innodb_file_per_table = $wl6501_file_per_table; -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)) - 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_create_of_uniq_index"; ---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; -# -# -use test; -eval set global innodb_file_per_table = $wl6501_file_per_table; -SET innodb_strict_mode=OFF; ---disable_warnings -eval create $wl6501_temp table t ( - i int, f float, c char, - primary key pk(i), 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_create_of_sec_index"; ---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; - -#----------------------------------------------------------------------------- -# -# 6. Hit crash point after data is updated to system-table and in-memory dict. -# ---echo "6. Hit crash point after data is updated to system-table and" ---echo " in-memory dict." -use test; -eval set global innodb_file_per_table = $wl6501_file_per_table; -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; - -#----------------------------------------------------------------------------- -# -# 7. Hit crash point before/after log checkpoint is done. -# ---echo "7. Hit crash point before/after log checkpoint is done." -use test; -eval set global innodb_file_per_table = $wl6501_file_per_table; -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_before_log_removal"; ---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 where f < 2.5; -drop table t; -# -# -use test; -eval set global innodb_file_per_table = $wl6501_file_per_table; -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_truncate_done"; ---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; - - -#----------------------------------------------------------------------------- -# -# remove test-bed -# -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 deleted file mode 100644 index edec93b875c..00000000000 --- a/mysql-test/suite/innodb/include/innodb_wl6501_crash_temp.inc +++ /dev/null @@ -1,98 +0,0 @@ -# -# WL#6501: make truncate table atomic -# - ---source include/have_innodb.inc ---source include/have_debug.inc ---source include/big_test.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("does not exist in the InnoDB internal"); - -################################################################################ -# -# 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. -# -################################################################################ - -#----------------------------------------------------------------------------- -# -# create test-bed -# -let $per_table = `select @@innodb_file_per_table`; - -eval set global innodb_file_per_table = on; -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; -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; - -#----------------------------------------------------------------------------- -# -# 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; -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; - -#----------------------------------------------------------------------------- -# -# remove test-bed -# -eval set global innodb_file_per_table = $per_table; diff --git a/mysql-test/suite/innodb/r/alter_algorithm,COPY.rdiff b/mysql-test/suite/innodb/r/alter_algorithm,COPY.rdiff deleted file mode 100644 index be71e125e22..00000000000 --- a/mysql-test/suite/innodb/r/alter_algorithm,COPY.rdiff +++ /dev/null @@ -1,92 +0,0 @@ ---- alter_algorithm.result 2018-05-06 23:42:08.022302601 +0530 -+++ alter_algorithm.reject 2018-05-06 23:42:16.382634082 +0530 -@@ -7,35 +7,44 @@ - INSERT INTO t1(f1, f2, f3) VALUES(1, 1, 1); - SELECT @@alter_algorithm; - @@alter_algorithm --NOCOPY -+COPY - # All the following cases needs table rebuild - # Add and Drop primary key - ALTER TABLE t1 ADD COLUMN col1 INT NOT NULL,DROP PRIMARY KEY,ADD PRIMARY KEY(col1); --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE -+affected rows: 1 -+info: Records: 1 Duplicates: 0 Warnings: 0 - # Make existing column NULLABLE - ALTER TABLE t1 MODIFY f2 INT; --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE -+affected rows: 1 -+info: Records: 1 Duplicates: 0 Warnings: 0 - # Make existing column NON-NULLABLE - ALTER TABLE t1 MODIFY f3 INT NOT NULL; --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE -+affected rows: 1 -+info: Records: 1 Duplicates: 0 Warnings: 0 - # Drop Stored Column - ALTER TABLE t1 DROP COLUMN f5; --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE -+affected rows: 1 -+info: Records: 1 Duplicates: 0 Warnings: 0 - # Add base non-generated column as a last column in the compressed table - ALTER TABLE t1 ADD COLUMN f6 INT NOT NULL; --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE -+affected rows: 1 -+info: Records: 1 Duplicates: 0 Warnings: 0 - # Add base non-generated column but not in the last position - ALTER TABLE t1 ADD COLUMN f7 INT NOT NULL after f3; --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE -+affected rows: 1 -+info: Records: 1 Duplicates: 0 Warnings: 0 - # Force the table to rebuild - ALTER TABLE t1 FORCE; --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE -+affected rows: 1 -+info: Records: 1 Duplicates: 0 Warnings: 0 - # Row format changes - ALTER TABLE t1 ROW_FORMAT=COMPRESSED; --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE -+affected rows: 1 -+info: Records: 1 Duplicates: 0 Warnings: 0 - # Engine table - ALTER TABLE t1 ENGINE=INNODB; --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE -+affected rows: 1 -+info: Records: 1 Duplicates: 0 Warnings: 0 - DROP TABLE t1; - affected rows: 0 - CREATE TABLE t1(f1 INT PRIMARY KEY, f2 INT NOT NULL, -@@ -49,23 +58,23 @@ - INSERT INTO t1(f1, f2, f4, f5) VALUES(1, 2, 3, 4); - SELECT @@alter_algorithm; - @@alter_algorithm --NOCOPY -+COPY - ALTER TABLE t1 ADD INDEX idx1(f4); --affected rows: 0 --info: Records: 0 Duplicates: 0 Warnings: 0 -+affected rows: 1 -+info: Records: 1 Duplicates: 0 Warnings: 0 - ALTER TABLE t1 DROP INDEX idx; --affected rows: 0 --info: Records: 0 Duplicates: 0 Warnings: 0 -+affected rows: 1 -+info: Records: 1 Duplicates: 0 Warnings: 0 - ALTER TABLE t1 ADD UNIQUE INDEX u1(f2); --affected rows: 0 --info: Records: 0 Duplicates: 0 Warnings: 0 -+affected rows: 1 -+info: Records: 1 Duplicates: 0 Warnings: 0 - ALTER TABLE t1 DROP INDEX f4; --affected rows: 0 --info: Records: 0 Duplicates: 0 Warnings: 0 -+affected rows: 1 -+info: Records: 1 Duplicates: 0 Warnings: 0 - SET foreign_key_checks = 0; - affected rows: 0 - ALTER TABLE t1 ADD FOREIGN KEY(f5) REFERENCES t2(f1); --affected rows: 0 --info: Records: 0 Duplicates: 0 Warnings: 0 -+affected rows: 1 -+info: Records: 1 Duplicates: 0 Warnings: 0 - DROP TABLE t2, t1; - affected rows: 0 diff --git a/mysql-test/suite/innodb/r/alter_algorithm,INPLACE.rdiff b/mysql-test/suite/innodb/r/alter_algorithm,INPLACE.rdiff index 71891bbf473..a1fa20c2ba1 100644 --- a/mysql-test/suite/innodb/r/alter_algorithm,INPLACE.rdiff +++ b/mysql-test/suite/innodb/r/alter_algorithm,INPLACE.rdiff @@ -1,66 +1,154 @@ ---- alter_algorithm.result 2018-05-06 23:42:08.022302601 +0530 -+++ alter_algorithm.reject 2018-05-06 23:45:23.813346814 +0530 -@@ -7,35 +7,44 @@ +--- alter_algorithm.result ++++ alter_algorithm.reject +@@ -7,44 +7,44 @@ INSERT INTO t1(f1, f2, f3) VALUES(1, 1, 1); SELECT @@alter_algorithm; @@alter_algorithm --NOCOPY +-COPY +INPLACE # All the following cases needs table rebuild # Add and Drop primary key ALTER TABLE t1 ADD COLUMN col1 INT NOT NULL,DROP PRIMARY KEY,ADD PRIMARY KEY(col1); --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 # Make existing column NULLABLE ALTER TABLE t1 MODIFY f2 INT; --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 # Make existing column NON-NULLABLE ALTER TABLE t1 MODIFY f3 INT NOT NULL; --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 # Drop Stored Column ALTER TABLE t1 DROP COLUMN f5; --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 # Add base non-generated column as a last column in the compressed table ALTER TABLE t1 ADD COLUMN f6 INT NOT NULL; --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 # Add base non-generated column but not in the last position ALTER TABLE t1 ADD COLUMN f7 INT NOT NULL after f3; --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 # Force the table to rebuild ALTER TABLE t1 FORCE; --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 # Row format changes ALTER TABLE t1 ROW_FORMAT=COMPRESSED; --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 # Engine table ALTER TABLE t1 ENGINE=INNODB; --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 DROP TABLE t1; affected rows: 0 CREATE TABLE t1(f1 INT PRIMARY KEY, f2 INT NOT NULL, -@@ -49,7 +58,7 @@ +@@ -57,22 +57,22 @@ + FOREIGN KEY fidx(f1) REFERENCES t1(f1))ENGINE=INNODB; INSERT INTO t1(f1, f2, f4, f5) VALUES(1, 2, 3, 4); - SELECT @@alter_algorithm; - @@alter_algorithm --NOCOPY -+INPLACE - ALTER TABLE t1 ADD INDEX idx1(f4); + ALTER TABLE t1 ADD INDEX idx1(f4), page_compressed=1; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + ALTER TABLE t1 DROP INDEX idx, page_compression_level=5; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + ALTER TABLE t1 ADD UNIQUE INDEX u1(f2); +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + ALTER TABLE t1 DROP INDEX f4, page_compression_level=9; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + SET foreign_key_checks = 0; + affected rows: 0 + ALTER TABLE t1 ADD FOREIGN KEY(f5) REFERENCES t2(f1); +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + DROP TABLE t2, t1; + affected rows: 0 + CREATE TABLE t1(f1 INT NOT NULL, +@@ -85,27 +85,27 @@ + INSERT INTO t1(f1, f2) VALUES(1, 1); + # Add column at the end of the table + ALTER TABLE t1 ADD COLUMN f4 char(100) default 'BIG WALL'; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + # Change virtual column expression + ALTER TABLE t1 CHANGE f3 f3 INT AS (f2 * f2) VIRTUAL; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + # Add virtual column + ALTER TABLE t1 ADD COLUMN f5 INT AS (f2) VIRTUAL; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + # Rename Column + ALTER TABLE t1 CHANGE f3 vcol INT AS (f2) VIRTUAL; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + # Rename table + ALTER TABLE t1 RENAME t3; + affected rows: 0 + # Drop Virtual Column + ALTER TABLE t3 DROP COLUMN vcol; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + # Column length varies + ALTER TABLE t2 CHANGE f3 f3 VARCHAR(20); + affected rows: 0 +@@ -113,12 +113,12 @@ + SET foreign_key_checks = 0; + affected rows: 0 + ALTER TABLE t3 ADD FOREIGN KEY fidx(f2) REFERENCES t2(f1); +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + SET foreign_key_checks = 1; + affected rows: 0 + ALTER TABLE t3 DROP FOREIGN KEY fidx; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + DROP TABLE t3, t2; affected rows: 0 - info: Records: 0 Duplicates: 0 Warnings: 0 diff --git a/mysql-test/suite/innodb/r/alter_algorithm,INSTANT.rdiff b/mysql-test/suite/innodb/r/alter_algorithm,INSTANT.rdiff index 6e12b78fb9d..879bba43932 100644 --- a/mysql-test/suite/innodb/r/alter_algorithm,INSTANT.rdiff +++ b/mysql-test/suite/innodb/r/alter_algorithm,INSTANT.rdiff @@ -1,78 +1,140 @@ ---- alter_algorithm.result 2018-05-06 23:42:08.022302601 +0530 -+++ alter_algorithm.reject 2018-05-06 23:46:08.482772800 +0530 -@@ -7,35 +7,35 @@ +--- alter_algorithm.result ++++ alter_algorithm.reject +@@ -7,44 +7,35 @@ INSERT INTO t1(f1, f2, f3) VALUES(1, 1, 1); SELECT @@alter_algorithm; @@alter_algorithm --NOCOPY +-COPY +INSTANT # All the following cases needs table rebuild # Add and Drop primary key ALTER TABLE t1 ADD COLUMN col1 INT NOT NULL,DROP PRIMARY KEY,ADD PRIMARY KEY(col1); --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 +Got one of the listed errors # Make existing column NULLABLE ALTER TABLE t1 MODIFY f2 INT; --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 +Got one of the listed errors # Make existing column NON-NULLABLE ALTER TABLE t1 MODIFY f3 INT NOT NULL; --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 +Got one of the listed errors # Drop Stored Column ALTER TABLE t1 DROP COLUMN f5; --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 +Got one of the listed errors # Add base non-generated column as a last column in the compressed table ALTER TABLE t1 ADD COLUMN f6 INT NOT NULL; --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 +Got one of the listed errors # Add base non-generated column but not in the last position ALTER TABLE t1 ADD COLUMN f7 INT NOT NULL after f3; --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 +Got one of the listed errors # Force the table to rebuild ALTER TABLE t1 FORCE; --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 +Got one of the listed errors # Row format changes ALTER TABLE t1 ROW_FORMAT=COMPRESSED; --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 +Got one of the listed errors # Engine table ALTER TABLE t1 ENGINE=INNODB; --ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 +Got one of the listed errors DROP TABLE t1; affected rows: 0 CREATE TABLE t1(f1 INT PRIMARY KEY, f2 INT NOT NULL, -@@ -49,23 +49,18 @@ +@@ -57,22 +48,17 @@ + FOREIGN KEY fidx(f1) REFERENCES t1(f1))ENGINE=INNODB; INSERT INTO t1(f1, f2, f4, f5) VALUES(1, 2, 3, 4); - SELECT @@alter_algorithm; - @@alter_algorithm --NOCOPY -+INSTANT - ALTER TABLE t1 ADD INDEX idx1(f4); --affected rows: 0 --info: Records: 0 Duplicates: 0 Warnings: 0 + ALTER TABLE t1 ADD INDEX idx1(f4), page_compressed=1; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 +ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: ADD INDEX. Try ALGORITHM=NOCOPY - ALTER TABLE t1 DROP INDEX idx; --affected rows: 0 --info: Records: 0 Duplicates: 0 Warnings: 0 + ALTER TABLE t1 DROP INDEX idx, page_compression_level=5; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 +ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: DROP INDEX. Try ALGORITHM=NOCOPY ALTER TABLE t1 ADD UNIQUE INDEX u1(f2); --affected rows: 0 --info: Records: 0 Duplicates: 0 Warnings: 0 +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 +ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: ADD INDEX. Try ALGORITHM=NOCOPY - ALTER TABLE t1 DROP INDEX f4; --affected rows: 0 --info: Records: 0 Duplicates: 0 Warnings: 0 + ALTER TABLE t1 DROP INDEX f4, page_compression_level=9; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 +ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: DROP INDEX. Try ALGORITHM=NOCOPY SET foreign_key_checks = 0; affected rows: 0 ALTER TABLE t1 ADD FOREIGN KEY(f5) REFERENCES t2(f1); --affected rows: 0 --info: Records: 0 Duplicates: 0 Warnings: 0 +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 +ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: ADD INDEX. Try ALGORITHM=NOCOPY DROP TABLE t2, t1; affected rows: 0 + CREATE TABLE t1(f1 INT NOT NULL, +@@ -85,27 +71,27 @@ + INSERT INTO t1(f1, f2) VALUES(1, 1); + # Add column at the end of the table + ALTER TABLE t1 ADD COLUMN f4 char(100) default 'BIG WALL'; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + # Change virtual column expression + ALTER TABLE t1 CHANGE f3 f3 INT AS (f2 * f2) VIRTUAL; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + # Add virtual column + ALTER TABLE t1 ADD COLUMN f5 INT AS (f2) VIRTUAL; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + # Rename Column + ALTER TABLE t1 CHANGE f3 vcol INT AS (f2) VIRTUAL; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + # Rename table + ALTER TABLE t1 RENAME t3; + affected rows: 0 + # Drop Virtual Column + ALTER TABLE t3 DROP COLUMN vcol; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + # Column length varies + ALTER TABLE t2 CHANGE f3 f3 VARCHAR(20); + affected rows: 0 +@@ -113,12 +99,12 @@ + SET foreign_key_checks = 0; + affected rows: 0 + ALTER TABLE t3 ADD FOREIGN KEY fidx(f2) REFERENCES t2(f1); +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + SET foreign_key_checks = 1; + affected rows: 0 + ALTER TABLE t3 DROP FOREIGN KEY fidx; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + DROP TABLE t3, t2; + affected rows: 0 diff --git a/mysql-test/suite/innodb/r/alter_algorithm,NOCOPY.rdiff b/mysql-test/suite/innodb/r/alter_algorithm,NOCOPY.rdiff new file mode 100644 index 00000000000..6db0f2af347 --- /dev/null +++ b/mysql-test/suite/innodb/r/alter_algorithm,NOCOPY.rdiff @@ -0,0 +1,145 @@ +--- alter_algorithm.result ++++ alter_algorithm.reject +@@ -7,44 +7,35 @@ + INSERT INTO t1(f1, f2, f3) VALUES(1, 1, 1); + SELECT @@alter_algorithm; + @@alter_algorithm +-COPY ++NOCOPY + # All the following cases needs table rebuild + # Add and Drop primary key + ALTER TABLE t1 ADD COLUMN col1 INT NOT NULL,DROP PRIMARY KEY,ADD PRIMARY KEY(col1); +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++Got one of the listed errors + # Make existing column NULLABLE + ALTER TABLE t1 MODIFY f2 INT; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++Got one of the listed errors + # Make existing column NON-NULLABLE + ALTER TABLE t1 MODIFY f3 INT NOT NULL; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++Got one of the listed errors + # Drop Stored Column + ALTER TABLE t1 DROP COLUMN f5; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++Got one of the listed errors + # Add base non-generated column as a last column in the compressed table + ALTER TABLE t1 ADD COLUMN f6 INT NOT NULL; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++Got one of the listed errors + # Add base non-generated column but not in the last position + ALTER TABLE t1 ADD COLUMN f7 INT NOT NULL after f3; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++Got one of the listed errors + # Force the table to rebuild + ALTER TABLE t1 FORCE; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++Got one of the listed errors + # Row format changes + ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++Got one of the listed errors + # Engine table + ALTER TABLE t1 ENGINE=INNODB; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++Got one of the listed errors + DROP TABLE t1; + affected rows: 0 + CREATE TABLE t1(f1 INT PRIMARY KEY, f2 INT NOT NULL, +@@ -57,22 +48,22 @@ + FOREIGN KEY fidx(f1) REFERENCES t1(f1))ENGINE=INNODB; + INSERT INTO t1(f1, f2, f4, f5) VALUES(1, 2, 3, 4); + ALTER TABLE t1 ADD INDEX idx1(f4), page_compressed=1; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + ALTER TABLE t1 DROP INDEX idx, page_compression_level=5; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + ALTER TABLE t1 ADD UNIQUE INDEX u1(f2); +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + ALTER TABLE t1 DROP INDEX f4, page_compression_level=9; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + SET foreign_key_checks = 0; + affected rows: 0 + ALTER TABLE t1 ADD FOREIGN KEY(f5) REFERENCES t2(f1); +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + DROP TABLE t2, t1; + affected rows: 0 + CREATE TABLE t1(f1 INT NOT NULL, +@@ -85,27 +76,27 @@ + INSERT INTO t1(f1, f2) VALUES(1, 1); + # Add column at the end of the table + ALTER TABLE t1 ADD COLUMN f4 char(100) default 'BIG WALL'; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + # Change virtual column expression + ALTER TABLE t1 CHANGE f3 f3 INT AS (f2 * f2) VIRTUAL; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + # Add virtual column + ALTER TABLE t1 ADD COLUMN f5 INT AS (f2) VIRTUAL; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + # Rename Column + ALTER TABLE t1 CHANGE f3 vcol INT AS (f2) VIRTUAL; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + # Rename table + ALTER TABLE t1 RENAME t3; + affected rows: 0 + # Drop Virtual Column + ALTER TABLE t3 DROP COLUMN vcol; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + # Column length varies + ALTER TABLE t2 CHANGE f3 f3 VARCHAR(20); + affected rows: 0 +@@ -113,12 +104,12 @@ + SET foreign_key_checks = 0; + affected rows: 0 + ALTER TABLE t3 ADD FOREIGN KEY fidx(f2) REFERENCES t2(f1); +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + SET foreign_key_checks = 1; + affected rows: 0 + ALTER TABLE t3 DROP FOREIGN KEY fidx; +-affected rows: 1 +-info: Records: 1 Duplicates: 0 Warnings: 0 ++affected rows: 0 ++info: Records: 0 Duplicates: 0 Warnings: 0 + DROP TABLE t3, t2; + affected rows: 0 diff --git a/mysql-test/suite/innodb/r/alter_algorithm.result b/mysql-test/suite/innodb/r/alter_algorithm.result index ee91159bf7a..3d3a7e85444 100644 --- a/mysql-test/suite/innodb/r/alter_algorithm.result +++ b/mysql-test/suite/innodb/r/alter_algorithm.result @@ -7,65 +7,118 @@ PRIMARY KEY(f1))ROW_FORMAT=COMPRESSED, ENGINE=INNODB; INSERT INTO t1(f1, f2, f3) VALUES(1, 1, 1); SELECT @@alter_algorithm; @@alter_algorithm -NOCOPY +COPY # All the following cases needs table rebuild # Add and Drop primary key ALTER TABLE t1 ADD COLUMN col1 INT NOT NULL,DROP PRIMARY KEY,ADD PRIMARY KEY(col1); -ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 # Make existing column NULLABLE ALTER TABLE t1 MODIFY f2 INT; -ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 # Make existing column NON-NULLABLE ALTER TABLE t1 MODIFY f3 INT NOT NULL; -ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 # Drop Stored Column ALTER TABLE t1 DROP COLUMN f5; -ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 # Add base non-generated column as a last column in the compressed table ALTER TABLE t1 ADD COLUMN f6 INT NOT NULL; -ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 # Add base non-generated column but not in the last position ALTER TABLE t1 ADD COLUMN f7 INT NOT NULL after f3; -ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 # Force the table to rebuild ALTER TABLE t1 FORCE; -ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 # Row format changes ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 # Engine table ALTER TABLE t1 ENGINE=INNODB; -ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 DROP TABLE t1; affected rows: 0 CREATE TABLE t1(f1 INT PRIMARY KEY, f2 INT NOT NULL, f3 INT AS (f2 * f2) VIRTUAL, f4 INT NOT NULL UNIQUE, f5 INT NOT NULL, -INDEX`idx`(f2))ENGINE=INNODB; +INDEX idx(f2))ENGINE=INNODB; CREATE TABLE t2(f1 INT NOT NULL, f2 INT NOT NULL, INDEX(f1), -FOREIGN KEY `fidx` (f1) REFERENCES t1(f1))ENGINE=INNODB; +FOREIGN KEY fidx(f1) REFERENCES t1(f1))ENGINE=INNODB; INSERT INTO t1(f1, f2, f4, f5) VALUES(1, 2, 3, 4); -SELECT @@alter_algorithm; -@@alter_algorithm -NOCOPY -ALTER TABLE t1 ADD INDEX idx1(f4); +ALTER TABLE t1 ADD INDEX idx1(f4), page_compressed=1; +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 DROP INDEX idx, page_compression_level=5; +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 ADD UNIQUE INDEX u1(f2); +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 +ALTER TABLE t1 DROP INDEX f4, page_compression_level=9; +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 +SET foreign_key_checks = 0; affected rows: 0 -info: Records: 0 Duplicates: 0 Warnings: 0 -ALTER TABLE t1 DROP INDEX idx; +ALTER TABLE t1 ADD FOREIGN KEY(f5) REFERENCES t2(f1); +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 +DROP TABLE t2, t1; affected rows: 0 -info: Records: 0 Duplicates: 0 Warnings: 0 -ALTER TABLE t1 ADD UNIQUE INDEX u1(f2); +CREATE TABLE t1(f1 INT NOT NULL, +f2 INT NOT NULL, +f3 INT AS (f2 * f2) VIRTUAL, +INDEX idx (f2))engine=innodb; +CREATE TABLE t2(f1 INT NOT NULL, f2 INT NOT NULL, +f3 VARCHAR(10), +INDEX(f1))ENGINE=INNODB; +INSERT INTO t1(f1, f2) VALUES(1, 1); +# Add column at the end of the table +ALTER TABLE t1 ADD COLUMN f4 char(100) default 'BIG WALL'; +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 +# Change virtual column expression +ALTER TABLE t1 CHANGE f3 f3 INT AS (f2 * f2) VIRTUAL; +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 +# Add virtual column +ALTER TABLE t1 ADD COLUMN f5 INT AS (f2) VIRTUAL; +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 +# Rename Column +ALTER TABLE t1 CHANGE f3 vcol INT AS (f2) VIRTUAL; +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 +# Rename table +ALTER TABLE t1 RENAME t3; affected rows: 0 -info: Records: 0 Duplicates: 0 Warnings: 0 -ALTER TABLE t1 DROP INDEX f4; +# Drop Virtual Column +ALTER TABLE t3 DROP COLUMN vcol; +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 +# Column length varies +ALTER TABLE t2 CHANGE f3 f3 VARCHAR(20); affected rows: 0 info: Records: 0 Duplicates: 0 Warnings: 0 SET foreign_key_checks = 0; affected rows: 0 -ALTER TABLE t1 ADD FOREIGN KEY(f5) REFERENCES t2(f1); +ALTER TABLE t3 ADD FOREIGN KEY fidx(f2) REFERENCES t2(f1); +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 +SET foreign_key_checks = 1; affected rows: 0 -info: Records: 0 Duplicates: 0 Warnings: 0 -DROP TABLE t2, t1; +ALTER TABLE t3 DROP FOREIGN KEY fidx; +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 +DROP TABLE t3, t2; affected rows: 0 diff --git a/mysql-test/suite/innodb/r/alter_inplace_perfschema.result b/mysql-test/suite/innodb/r/alter_inplace_perfschema.result new file mode 100644 index 00000000000..68e25664031 --- /dev/null +++ b/mysql-test/suite/innodb/r/alter_inplace_perfschema.result @@ -0,0 +1,20 @@ +connect ddl, localhost, root,,; +update performance_schema.setup_instruments set enabled='yes'; +update performance_schema.setup_consumers set enabled='yes'; +CREATE TABLE t1 (a serial, b varchar(255)) ENGINE=InnoDB; +BEGIN; +COMMIT; +SET DEBUG_SYNC = 'row_log_apply_before SIGNAL go WAIT_FOR gone'; +ALTER TABLE t1 ADD INDEX(b), ALGORITHM=INPLACE; +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR go'; +SELECT DISTINCT object_name FROM performance_schema.events_waits_history_long +WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%'; +object_name +tmp/Innodb Merge Temp File +SET DEBUG_SYNC = 'now SIGNAL gone'; +connection ddl; +disconnect ddl; +connection default; +SET DEBUG_SYNC = 'RESET'; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/r/alter_instant,COPY.rdiff b/mysql-test/suite/innodb/r/alter_instant,COPY.rdiff deleted file mode 100644 index cb4a72614b9..00000000000 --- a/mysql-test/suite/innodb/r/alter_instant,COPY.rdiff +++ /dev/null @@ -1,61 +0,0 @@ ---- alter_instant.result 2018-04-10 11:19:46.299868465 +0530 -+++ alter_instant.reject 2018-04-10 11:21:19.648918489 +0530 -@@ -8,30 +8,30 @@ - INSERT INTO t1(f1, f2) VALUES(1, 1); - select @@alter_algorithm; - @@alter_algorithm --NOCOPY -+COPY - # Add column at the end of the table - ALTER TABLE t1 ADD COLUMN f4 char(100) default "BIG WALL"; --affected rows: 0 --info: Records: 0 Duplicates: 0 Warnings: 0 -+affected rows: 1 -+info: Records: 1 Duplicates: 0 Warnings: 0 - # Change virtual column expression - ALTER TABLE t1 CHANGE f3 f3 INT AS (f2 * f2) VIRTUAL; --affected rows: 0 --info: Records: 0 Duplicates: 0 Warnings: 0 -+affected rows: 1 -+info: Records: 1 Duplicates: 0 Warnings: 0 - # Add virtual column - ALTER TABLE t1 ADD COLUMN f5 INT AS (f2) VIRTUAL; --affected rows: 0 --info: Records: 0 Duplicates: 0 Warnings: 0 -+affected rows: 1 -+info: Records: 1 Duplicates: 0 Warnings: 0 - # Rename Column - ALTER TABLE t1 CHANGE f3 vcol INT AS (f2) VIRTUAL; --affected rows: 0 --info: Records: 0 Duplicates: 0 Warnings: 0 -+affected rows: 1 -+info: Records: 1 Duplicates: 0 Warnings: 0 - # Rename table - ALTER TABLE t1 RENAME t3; - affected rows: 0 - # Drop Virtual Column - ALTER TABLE t3 DROP COLUMN vcol; --affected rows: 0 --info: Records: 0 Duplicates: 0 Warnings: 0 -+affected rows: 1 -+info: Records: 1 Duplicates: 0 Warnings: 0 - # Column length varies - ALTER TABLE t2 CHANGE f3 f3 VARCHAR(20); - affected rows: 0 -@@ -39,12 +39,12 @@ - SET foreign_key_checks = 0; - affected rows: 0 - ALTER TABLE t3 ADD FOREIGN KEY `fidx`(f2) REFERENCES t2(f1); --affected rows: 0 --info: Records: 0 Duplicates: 0 Warnings: 0 -+affected rows: 1 -+info: Records: 1 Duplicates: 0 Warnings: 0 - SET foreign_key_checks = 1; - affected rows: 0 - ALTER TABLE t3 DROP FOREIGN KEY `fidx`; --affected rows: 0 --info: Records: 0 Duplicates: 0 Warnings: 0 -+affected rows: 1 -+info: Records: 1 Duplicates: 0 Warnings: 0 - DROP TABLE t3, t2; - affected rows: 0 diff --git a/mysql-test/suite/innodb/r/alter_instant,INPLACE.rdiff b/mysql-test/suite/innodb/r/alter_instant,INPLACE.rdiff deleted file mode 100644 index ec80e1d8ef0..00000000000 --- a/mysql-test/suite/innodb/r/alter_instant,INPLACE.rdiff +++ /dev/null @@ -1,11 +0,0 @@ ---- alter_instant.result 2018-04-10 11:19:46.299868465 +0530 -+++ alter_instant.reject 2018-04-10 11:22:19.433617807 +0530 -@@ -8,7 +8,7 @@ - INSERT INTO t1(f1, f2) VALUES(1, 1); - select @@alter_algorithm; - @@alter_algorithm --NOCOPY -+INPLACE - # Add column at the end of the table - ALTER TABLE t1 ADD COLUMN f4 char(100) default "BIG WALL"; - affected rows: 0 diff --git a/mysql-test/suite/innodb/r/alter_instant,INSTANT.rdiff b/mysql-test/suite/innodb/r/alter_instant,INSTANT.rdiff deleted file mode 100644 index cf2f8a2d719..00000000000 --- a/mysql-test/suite/innodb/r/alter_instant,INSTANT.rdiff +++ /dev/null @@ -1,11 +0,0 @@ ---- alter_instant.result 2018-04-10 11:19:46.299868465 +0530 -+++ alter_instant.reject 2018-04-10 11:22:47.281949905 +0530 -@@ -8,7 +8,7 @@ - INSERT INTO t1(f1, f2) VALUES(1, 1); - select @@alter_algorithm; - @@alter_algorithm --NOCOPY -+INSTANT - # Add column at the end of the table - ALTER TABLE t1 ADD COLUMN f4 char(100) default "BIG WALL"; - affected rows: 0 diff --git a/mysql-test/suite/innodb/r/alter_instant.result b/mysql-test/suite/innodb/r/alter_instant.result deleted file mode 100644 index ec64e41cd01..00000000000 --- a/mysql-test/suite/innodb/r/alter_instant.result +++ /dev/null @@ -1,50 +0,0 @@ -CREATE TABLE t1(f1 INT NOT NULL, -f2 INT NOT NULL, -f3 INT AS (f2 * f2) VIRTUAL, -INDEX idx (f2))engine=innodb; -CREATE TABLE t2(f1 INT NOT NULL, f2 INT NOT NULL, -f3 VARCHAR(10), -INDEX(f1))ENGINE=INNODB; -INSERT INTO t1(f1, f2) VALUES(1, 1); -select @@alter_algorithm; -@@alter_algorithm -NOCOPY -# Add column at the end of the table -ALTER TABLE t1 ADD COLUMN f4 char(100) default "BIG WALL"; -affected rows: 0 -info: Records: 0 Duplicates: 0 Warnings: 0 -# Change virtual column expression -ALTER TABLE t1 CHANGE f3 f3 INT AS (f2 * f2) VIRTUAL; -affected rows: 0 -info: Records: 0 Duplicates: 0 Warnings: 0 -# Add virtual column -ALTER TABLE t1 ADD COLUMN f5 INT AS (f2) VIRTUAL; -affected rows: 0 -info: Records: 0 Duplicates: 0 Warnings: 0 -# Rename Column -ALTER TABLE t1 CHANGE f3 vcol INT AS (f2) VIRTUAL; -affected rows: 0 -info: Records: 0 Duplicates: 0 Warnings: 0 -# Rename table -ALTER TABLE t1 RENAME t3; -affected rows: 0 -# Drop Virtual Column -ALTER TABLE t3 DROP COLUMN vcol; -affected rows: 0 -info: Records: 0 Duplicates: 0 Warnings: 0 -# Column length varies -ALTER TABLE t2 CHANGE f3 f3 VARCHAR(20); -affected rows: 0 -info: Records: 0 Duplicates: 0 Warnings: 0 -SET foreign_key_checks = 0; -affected rows: 0 -ALTER TABLE t3 ADD FOREIGN KEY `fidx`(f2) REFERENCES t2(f1); -affected rows: 0 -info: Records: 0 Duplicates: 0 Warnings: 0 -SET foreign_key_checks = 1; -affected rows: 0 -ALTER TABLE t3 DROP FOREIGN KEY `fidx`; -affected rows: 0 -info: Records: 0 Duplicates: 0 Warnings: 0 -DROP TABLE t3, t2; -affected rows: 0 diff --git a/mysql-test/suite/innodb/r/alter_kill.result b/mysql-test/suite/innodb/r/alter_kill.result index 9b24fddf9ef..87c89834ec1 100644 --- a/mysql-test/suite/innodb/r/alter_kill.result +++ b/mysql-test/suite/innodb/r/alter_kill.result @@ -2,10 +2,12 @@ # Bug#16720368 INNODB CRASHES ON BROKEN #SQL*.IBD FILE AT STARTUP # SET GLOBAL innodb_file_per_table=1; +SET GLOBAL innodb_purge_rseg_truncate_frequency=1; CREATE TABLE bug16720368_1 (a INT PRIMARY KEY) ENGINE=InnoDB; connect con1,localhost,root; CREATE TABLE bug16720368 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; INSERT INTO bug16720368 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8); +InnoDB 0 transactions not purged connection default; # Cleanly shutdown mysqld disconnect con1; diff --git a/mysql-test/suite/innodb/r/alter_table.result b/mysql-test/suite/innodb/r/alter_table.result index 8a0717aa677..3a765a61dd2 100644 --- a/mysql-test/suite/innodb/r/alter_table.result +++ b/mysql-test/suite/innodb/r/alter_table.result @@ -22,3 +22,18 @@ alter table t1 change column id2 id4 varchar(100) not null; select * from t1 where id4 like 'a'; id1 id4 id3 drop table t1; +create table t1 (a int) transactional=1 engine=aria; +create table t2 (a int) transactional=1 engine=innodb; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1 +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 TRANSACTIONAL=1 +alter table t1 engine=innodb; +alter table t1 add column b int; +drop table t1,t2; diff --git a/mysql-test/suite/innodb/r/auto_increment_dup,skip-log-bin.rdiff b/mysql-test/suite/innodb/r/auto_increment_dup,skip-log-bin.rdiff new file mode 100644 index 00000000000..7b4ec54eed8 --- /dev/null +++ b/mysql-test/suite/innodb/r/auto_increment_dup,skip-log-bin.rdiff @@ -0,0 +1,51 @@ +--- auto_increment_dup.result ++++ auto_increment_dup,skip-log-bin.reject +@@ -89,13 +89,14 @@ + SET DEBUG_SYNC='execute_command_after_close_tables SIGNAL continue'; + affected rows: 0 + INSERT INTO t1(k) VALUES (2), (4), (5) ON DUPLICATE KEY UPDATE c='2'; +-ERROR HY000: Lock wait timeout exceeded; try restarting transaction ++affected rows: 3 ++info: Records: 3 Duplicates: 0 Warnings: 0 + connection con1; + # + # 2 duplicates + # +-affected rows: 3 +-info: Records: 3 Duplicates: 0 Warnings: 0 ++affected rows: 4 ++info: Records: 3 Duplicates: 1 Warnings: 0 + connection default; + # + # 3 rows +@@ -103,19 +104,21 @@ + SELECT * FROM t1 order by k; + id k c + 1 1 NULL +-2 2 NULL +-3 3 NULL +-affected rows: 3 ++4 2 1 ++2 3 NULL ++5 4 NULL ++6 5 NULL ++affected rows: 5 + INSERT INTO t1(k) VALUES (2), (4), (5) ON DUPLICATE KEY UPDATE c='2'; +-affected rows: 4 +-info: Records: 3 Duplicates: 1 Warnings: 0 ++affected rows: 6 ++info: Records: 3 Duplicates: 3 Warnings: 0 + SELECT * FROM t1 order by k; + id k c + 1 1 NULL +-2 2 2 +-3 3 NULL +-7 4 NULL +-8 5 NULL ++4 2 2 ++2 3 NULL ++5 4 2 ++6 5 2 + affected rows: 5 + disconnect con1; + disconnect con2; diff --git a/mysql-test/suite/innodb/r/auto_increment_dup.result b/mysql-test/suite/innodb/r/auto_increment_dup.result index fa0921b57a5..1467a459fc1 100644 --- a/mysql-test/suite/innodb/r/auto_increment_dup.result +++ b/mysql-test/suite/innodb/r/auto_increment_dup.result @@ -1,4 +1,3 @@ -drop table if exists t1; set global transaction isolation level repeatable read; CREATE TABLE t1( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, @@ -79,20 +78,13 @@ affected rows: 0 # # Parallel execution # -connect con1, localhost, root; connect con2, localhost, root; SET DEBUG_SYNC='now WAIT_FOR write_row_done'; -connection con1; -# -# Connection 1 -# +connect con1, localhost, root; SET DEBUG_SYNC='ha_write_row_end SIGNAL write_row_done WAIT_FOR continue'; affected rows: 0 INSERT INTO t1(k) VALUES (1), (2), (3) ON DUPLICATE KEY UPDATE c='1'; connection con2; -# -# Connection 2 -# affected rows: 0 SET DEBUG_SYNC='execute_command_after_close_tables SIGNAL continue'; affected rows: 0 @@ -140,18 +132,10 @@ k INT, c CHAR(1), UNIQUE KEY(k)) ENGINE=InnoDB; connect con1, localhost, root; -connect con2, localhost, root; -connection con1; -# -# Connection 1 -# SET DEBUG_SYNC='ha_write_row_end SIGNAL continue2 WAIT_FOR continue1'; affected rows: 0 INSERT INTO t1(k) VALUES (1), (2), (3) ON DUPLICATE KEY UPDATE c='1'; -connection con2; -# -# Connection 2 -# +connect con2, localhost, root; SET DEBUG_SYNC='ha_write_row_start WAIT_FOR continue2'; affected rows: 0 SET DEBUG_SYNC='after_mysql_insert SIGNAL continue1'; @@ -159,6 +143,7 @@ affected rows: 0 INSERT INTO t1(k) VALUES (2), (4), (5) ON DUPLICATE KEY UPDATE c='2'; affected rows: 3 info: Records: 3 Duplicates: 0 Warnings: 0 +disconnect con2; connection con1; affected rows: 4 info: Records: 3 Duplicates: 1 Warnings: 0 @@ -174,7 +159,6 @@ id k c 5 4 NULL 6 5 NULL disconnect con1; -disconnect con2; connection default; DROP TABLE t1; set global transaction isolation level repeatable read; diff --git a/mysql-test/suite/innodb/r/default_row_format_compatibility.result b/mysql-test/suite/innodb/r/default_row_format_compatibility.result index 765e25c776e..5070fa33a2e 100644 --- a/mysql-test/suite/innodb/r/default_row_format_compatibility.result +++ b/mysql-test/suite/innodb/r/default_row_format_compatibility.result @@ -25,7 +25,7 @@ SET GLOBAL innodb_default_row_format=Dynamic; CREATE TABLE tab(a INT) ENGINE=InnoDB; ALTER TABLE tab DISCARD TABLESPACE; ALTER TABLE tab IMPORT TABLESPACE; -ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x21 and the meta-data file has 0x1) +ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x21 and the meta-data file has 0x1; .cfg file uses ROW_FORMAT=COMPACT) DROP TABLE tab; SET GLOBAL innodb_default_row_format=Compact; SELECT @@innodb_default_row_format; diff --git a/mysql-test/suite/innodb/r/foreign-keys.result b/mysql-test/suite/innodb/r/foreign-keys.result index 0cb53f52a6c..4402c5ca2fe 100644 --- a/mysql-test/suite/innodb/r/foreign-keys.result +++ b/mysql-test/suite/innodb/r/foreign-keys.result @@ -51,3 +51,76 @@ c d 6 30 drop table t2, t1; drop user foo; +create table t1 (f1 int primary key) engine=innodb; +create table t2 (f2 int primary key) engine=innodb; +create table t3 (f3 int primary key, foreign key (f3) references t2(f2)) engine=innodb; +insert into t1 values (1),(2),(3),(4),(5); +insert into t2 values (1),(2),(3),(4),(5); +insert into t3 values (1),(2),(3),(4),(5); +connect con1,localhost,root; +set debug_sync='alter_table_before_rename_result_table signal g1 wait_for g2'; +alter table t2 add constraint foreign key (f2) references t1(f1) on delete cascade on update cascade; +connection default; +set debug_sync='before_execute_sql_command wait_for g1'; +update t1 set f1 = f1 + 100000 limit 2; +connect con2,localhost,root; +kill query UPDATE; +disconnect con2; +connection default; +ERROR 70100: Query execution was interrupted +set debug_sync='now signal g2'; +connection con1; +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `f2` int(11) NOT NULL, + PRIMARY KEY (`f2`), + CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`f2`) REFERENCES `t1` (`f1`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +disconnect con1; +connection default; +select * from t2 where f2 not in (select f1 from t1); +f2 +select * from t3 where f3 not in (select f2 from t2); +f3 +drop table t3; +drop table t2; +drop table t1; +set debug_sync='reset'; +create table t1 (a int primary key, b int) engine=innodb; +create table t2 (c int primary key, d int, +foreign key (d) references t1 (a) on update cascade) engine=innodb; +insert t1 values (1,1),(2,2),(3,3); +insert t2 values (4,1),(5,2),(6,3); +flush table t2 with read lock; +connect con1,localhost,root; +delete from t1 where a=2; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`d`) REFERENCES `t1` (`a`) ON UPDATE CASCADE) +update t1 set a=10 where a=1; +connection default; +unlock tables; +connection con1; +connection default; +lock table t2 write; +connection con1; +delete from t1 where a=2; +connection default; +unlock tables; +connection con1; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`d`) REFERENCES `t1` (`a`) ON UPDATE CASCADE) +connection default; +unlock tables; +disconnect con1; +create user foo; +grant select,update on test.t1 to foo; +connect foo,localhost,foo; +update t1 set a=30 where a=3; +disconnect foo; +connection default; +select * from t2; +c d +5 2 +4 10 +6 30 +drop table t2, t1; +drop user foo; diff --git a/mysql-test/suite/innodb/r/foreign_key.result b/mysql-test/suite/innodb/r/foreign_key.result index 5838c3a1fd5..7195f3e7c3f 100644 --- a/mysql-test/suite/innodb/r/foreign_key.result +++ b/mysql-test/suite/innodb/r/foreign_key.result @@ -171,6 +171,43 @@ UNLOCK TABLES; DROP TABLES staff, store; SET FOREIGN_KEY_CHECKS=1; # +# MDEV-17531 Crash in RENAME TABLE with FOREIGN KEY and FULLTEXT INDEX +# +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; +CREATE DATABASE best; +CREATE TABLE t3 (a INT PRIMARY KEY, +CONSTRAINT t2_ibfk_1 FOREIGN KEY (a) REFERENCES t1(a)) ENGINE=InnoDB; +CREATE TABLE best.t2 (a INT PRIMARY KEY, b TEXT, FULLTEXT INDEX(b), +FOREIGN KEY (a) REFERENCES test.t1(a)) ENGINE=InnoDB; +RENAME TABLE best.t2 TO test.t2; +ERROR 42S01: Table 't2' already exists +SHOW CREATE TABLE best.t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` int(11) NOT NULL, + `b` text DEFAULT NULL, + PRIMARY KEY (`a`), + FULLTEXT KEY `b` (`b`), + CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `test`.`t1` (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DROP DATABASE best; +# +# MDEV-17541 KILL QUERY during lock wait in FOREIGN KEY check hangs +# +connect fk, localhost, root,,; +INSERT INTO t1 SET a=1; +BEGIN; +DELETE FROM t1; +connection default; +INSERT INTO t3 SET a=1; +connection fk; +kill query @id; +connection default; +ERROR 70100: Query execution was interrupted +disconnect fk; +DROP TABLE t3,t1; +# Start of 10.2 tests +# # MDEV-13246 Stale rows despite ON DELETE CASCADE constraint # CREATE TABLE users ( @@ -252,7 +289,6 @@ DELETE FROM t1 WHERE id = 1; ERROR HY000: Lock wait timeout exceeded; try restarting transaction connection con1; COMMIT; -disconnect con1; connection default; SELECT * FROM t2; id ref_id f @@ -317,3 +353,41 @@ engine=innodb; insert into t1 values(1, 1); insert into t2(f1) values(1); drop table t2, t1; +SET FOREIGN_KEY_CHECKS=0; +CREATE TABLE staff ( +staff_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, +store_id TINYINT UNSIGNED NOT NULL, +PRIMARY KEY (staff_id), +KEY idx_fk_store_id (store_id), +CONSTRAINT fk_staff_store FOREIGN KEY (store_id) REFERENCES store (store_id) ON DELETE RESTRICT ON UPDATE CASCADE +) ENGINE=InnoDB; +CREATE TABLE store ( +store_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, +manager_staff_id TINYINT UNSIGNED NOT NULL, +PRIMARY KEY (store_id), +UNIQUE KEY idx_unique_manager (manager_staff_id), +CONSTRAINT fk_store_staff FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id) ON DELETE RESTRICT ON UPDATE CASCADE +) ENGINE=InnoDB; +LOCK TABLE staff WRITE; +UNLOCK TABLES; +DROP TABLES staff, store; +SET FOREIGN_KEY_CHECKS=1; +# +# MDEV-17541 KILL QUERY during lock wait in FOREIGN KEY check hangs +# +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE t2 (a INT PRIMARY KEY, FOREIGN KEY (a) REFERENCES t1(a)) +ENGINE=InnoDB; +connection con1; +INSERT INTO t1 SET a=1; +BEGIN; +DELETE FROM t1; +connection default; +INSERT INTO t2 SET a=1; +connection con1; +kill query @id; +connection default; +ERROR 70100: Query execution was interrupted +disconnect con1; +DROP TABLE t2,t1; +# End of 10.2 tests diff --git a/mysql-test/suite/innodb/r/innodb-alter-debug.result b/mysql-test/suite/innodb/r/innodb-alter-debug.result index d455e54be3d..73037247272 100644 --- a/mysql-test/suite/innodb/r/innodb-alter-debug.result +++ b/mysql-test/suite/innodb/r/innodb-alter-debug.result @@ -52,10 +52,26 @@ set DEBUG_SYNC = 'now WAIT_FOR s1'; update t1 set a=1 where id=2; ERROR 23000: Duplicate entry '1' for key 'uk' SET DEBUG_SYNC = 'now SIGNAL s2'; -disconnect con1; /* connection default */ connection default; /* reap */ alter table t1 force, add b int, ALGORITHM=inplace; ERROR 23000: Duplicate entry '1' for key 'uk' SET DEBUG_SYNC = 'RESET'; drop table t1; +# +# Bug #27753193 ASSERTION `PREBUILT->TRX->ERROR_KEY_NUM < +# HA_ALTER_INFO->KEY_COUNT' +CREATE TABLE t1 (a INT, UNIQUE KEY(a)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +SET DEBUG_SYNC = 'row_log_table_apply1_before signal S1 WAIT_FOR S2'; +ALTER TABLE t1 FORCE, ALGORITHM=INPLACE; +connection con1; +SET DEBUG_SYNC = 'now WAIT_FOR S1'; +INSERT INTO t1 VALUES (1); +ERROR 23000: Duplicate entry '1' for key 'a' +SET DEBUG_SYNC = 'now SIGNAL S2'; +disconnect con1; +connection default; +ERROR 23000: Duplicate entry '1' for key 'a' +SET DEBUG_SYNC='RESET'; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/r/innodb-alter.result b/mysql-test/suite/innodb/r/innodb-alter.result index afdeac1c22a..7b0a43297e0 100644 --- a/mysql-test/suite/innodb/r/innodb-alter.result +++ b/mysql-test/suite/innodb/r/innodb-alter.result @@ -449,6 +449,7 @@ FULLTEXT INDEX(t) ALTER TABLE tu ADD COLUMN c CHAR(1) NOT NULL FIRST, LOCK=NONE; ERROR 0A000: LOCK=NONE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try LOCK=SHARED ALTER TABLE tu ADD COLUMN c CHAR(1) NOT NULL, LOCK=NONE; +ERROR 0A000: LOCK=NONE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try LOCK=SHARED DROP TABLE tu; CREATE TABLE tv ( pk INT PRIMARY KEY, FTS_DOC_ID BIGINT UNSIGNED NOT NULL, t TEXT, @@ -458,6 +459,7 @@ FULLTEXT INDEX(t) ALTER TABLE tv ADD COLUMN c CHAR(1) NOT NULL FIRST, LOCK=NONE; ERROR 0A000: LOCK=NONE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try LOCK=SHARED ALTER TABLE tv ADD COLUMN c CHAR(1) NOT NULL, LOCK=NONE; +ERROR 0A000: LOCK=NONE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try LOCK=SHARED DROP TABLE tv; ALTER TABLE t1o CHANGE c1 dB_row_Id INT, ALGORITHM=COPY; ERROR 42000: Incorrect column name 'dB_row_Id' @@ -726,6 +728,7 @@ t2 CREATE TABLE `t2` ( CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`c2`) REFERENCES `t1` (`c1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ALTER TABLE t1 CHANGE COLUMN c1 C1 INT; +ALTER TABLE t2 CHANGE COLUMN c2 C2 INT; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -735,24 +738,149 @@ t1 CREATE TABLE `t1` ( SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c2` int(11) NOT NULL, - KEY `c2` (`c2`), + `C2` int(11) DEFAULT NULL, + KEY `c2` (`C2`), CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`c2`) REFERENCES `t1` (`c1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 +ALTER TABLE t1 CHANGE COLUMN C1 c5 INT; +ALTER TABLE t2 CHANGE COLUMN C2 c6 INT; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `C1` int(11) NOT NULL, - PRIMARY KEY (`C1`) + `c5` int(11) NOT NULL, + PRIMARY KEY (`c5`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c2` int(11) NOT NULL, - KEY `c2` (`c2`), - CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`c2`) REFERENCES `t1` (`c1`) + `c6` int(11) DEFAULT NULL, + KEY `c2` (`c6`), + CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`c6`) REFERENCES `t1` (`c5`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT C.NAME FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS C INNER JOIN +INFORMATION_SCHEMA.INNODB_SYS_TABLES T ON C.TABLE_ID=T.TABLE_ID +WHERE T.NAME='test/t1'; +NAME +c5 +SELECT F.NAME FROM INFORMATION_SCHEMA.INNODB_SYS_FIELDS F INNER JOIN +INFORMATION_SCHEMA.INNODB_SYS_INDEXES I ON F.INDEX_ID=I.INDEX_ID INNER JOIN +INFORMATION_SCHEMA.INNODB_SYS_TABLES T ON I.TABLE_ID=T.TABLE_ID +WHERE T.NAME='test/t1' AND I.NAME='PRIMARY'; +NAME +c5 +SELECT C.REF_COL_NAME, C.FOR_COL_NAME FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS C INNER JOIN +INFORMATION_SCHEMA.INNODB_SYS_FOREIGN F ON C.ID=F.ID +WHERE F.FOR_NAME='test/t2'; +REF_COL_NAME FOR_COL_NAME +c5 c6 DROP TABLE t2, t1; +# virtual columns case too +CREATE TABLE t1 (a INT, b INT GENERATED ALWAYS AS (a) VIRTUAL) ENGINE = InnoDB; +ALTER TABLE t1 CHANGE COLUMN a A INT; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `A` int(11) DEFAULT NULL, + `b` int(11) GENERATED ALWAYS AS (`A`) VIRTUAL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT C.NAME FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS C INNER JOIN +INFORMATION_SCHEMA.INNODB_SYS_TABLES T ON C.TABLE_ID=T.TABLE_ID +WHERE T.NAME='test/t1'; +NAME +a +b +DROP TABLE t1; +# different FOREIGN KEY cases +CREATE TABLE t1 ( +a INT UNIQUE KEY, +b INT UNIQUE KEY, +c INT UNIQUE KEY, +d INT UNIQUE KEY +) ENGINE=INNODB; +CREATE TABLE t2 ( +aa INT, +bb INT, +cc INT, +dd INT +) ENGINE=INNODB; +INSERT INTO t1 VALUES (1, 1, 1, 1); +INSERT INTO t2 VALUES (1, 1, 1, 1); +ALTER TABLE t1 CHANGE a A INT, ALGORITHM=INPLACE; +ALTER TABLE t1 CHANGE c C INT, ALGORITHM=INPLACE; +ALTER TABLE t2 CHANGE cc CC INT, ALGORITHM=INPLACE; +ALTER TABLE t2 CHANGE dd DD INT, ALGORITHM=INPLACE; +SET foreign_key_checks=0; +ALTER TABLE t2 +ADD FOREIGN KEY(aa) REFERENCES t1(a), +ADD FOREIGN KEY(bb) REFERENCES t1(b), +ADD FOREIGN KEY(cc) REFERENCES t1(c), +ADD FOREIGN KEY(dd) REFERENCES t1(d), +ALGORITHM=INPLACE; +ALTER TABLE t1 CHANGE b B INT, ALGORITHM=INPLACE; +ALTER TABLE t2 CHANGE aa AA INT, ALGORITHM=INPLACE; +ALTER TABLE t1 CHANGE d D INT, ALGORITHM=INPLACE; +ALTER TABLE t2 CHANGE bb BB INT, ALGORITHM=INPLACE; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `A` int(11) DEFAULT NULL, + `B` int(11) DEFAULT NULL, + `C` int(11) DEFAULT NULL, + `D` int(11) DEFAULT NULL, + UNIQUE KEY `a` (`A`), + UNIQUE KEY `b` (`B`), + UNIQUE KEY `c` (`C`), + UNIQUE KEY `d` (`D`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `AA` int(11) DEFAULT NULL, + `BB` int(11) DEFAULT NULL, + `CC` int(11) DEFAULT NULL, + `DD` int(11) DEFAULT NULL, + KEY `aa` (`AA`), + KEY `bb` (`BB`), + KEY `CC` (`CC`), + KEY `DD` (`DD`), + CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`aa`) REFERENCES `t1` (`a`), + CONSTRAINT `t2_ibfk_2` FOREIGN KEY (`bb`) REFERENCES `t1` (`b`), + CONSTRAINT `t2_ibfk_3` FOREIGN KEY (`cc`) REFERENCES `t1` (`c`), + CONSTRAINT `t2_ibfk_4` FOREIGN KEY (`dd`) REFERENCES `t1` (`d`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DELETE FROM t1 WHERE a=1; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`aa`) REFERENCES `t1` (`a`)) +DELETE FROM t1 WHERE A=1; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`aa`) REFERENCES `t1` (`a`)) +DELETE FROM t1 WHERE b=1; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`aa`) REFERENCES `t1` (`a`)) +DELETE FROM t1 WHERE B=1; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`aa`) REFERENCES `t1` (`a`)) +DELETE FROM t1 WHERE c=1; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`aa`) REFERENCES `t1` (`a`)) +DELETE FROM t1 WHERE C=1; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`aa`) REFERENCES `t1` (`a`)) +DELETE FROM t1 WHERE d=1; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`aa`) REFERENCES `t1` (`a`)) +DELETE FROM t1 WHERE D=1; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`aa`) REFERENCES `t1` (`a`)) +DROP TABLE t2, t1; +# virtual columns case too +CREATE TABLE t1 (a INT, b INT GENERATED ALWAYS AS (a) VIRTUAL) ENGINE = InnoDB; +ALTER TABLE t1 CHANGE COLUMN a A INT; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `A` int(11) DEFAULT NULL, + `b` int(11) GENERATED ALWAYS AS (`A`) VIRTUAL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SELECT C.NAME FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS C INNER JOIN +INFORMATION_SCHEMA.INNODB_SYS_TABLES T ON C.TABLE_ID=T.TABLE_ID +WHERE T.NAME='test/t1'; +NAME +a +b +DROP TABLE t1; # # BUG 20029625 - HANDLE_FATAL_SIGNAL (SIG=11) IN # DICT_MEM_TABLE_COL_RENAME_LOW diff --git a/mysql-test/suite/innodb/r/innodb-index,debug.rdiff b/mysql-test/suite/innodb/r/innodb-index,debug.rdiff new file mode 100644 index 00000000000..2740e440cd5 --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb-index,debug.rdiff @@ -0,0 +1,10 @@ +--- innodb-index.result ++++ innodb-index.reject +@@ -1851,6 +1851,7 @@ + # + # MDEV-15325 Incomplete validation of missing tablespace during recovery + # ++SET GLOBAL DEBUG_DBUG='+d,fil_names_write_bogus'; + CREATE TABLE t1(f1 INT PRIMARY KEY)ENGINE=InnoDB; + CREATE TABLE t2(f1 INT PRIMARY KEY)ENGINE=InnoDB; + # Kill the server diff --git a/mysql-test/suite/innodb/r/innodb-lock.result b/mysql-test/suite/innodb/r/innodb-lock.result index e63a7cd1505..1fe0d263fef 100644 --- a/mysql-test/suite/innodb/r/innodb-lock.result +++ b/mysql-test/suite/innodb/r/innodb-lock.result @@ -2,18 +2,15 @@ set global innodb_table_locks=1; select @@innodb_table_locks; @@innodb_table_locks 1 -connect con1,localhost,root,,; -connect con2,localhost,root,,; -drop table if exists t1; set @@innodb_table_locks=1; -connection con1; +connect con1,localhost,root,,; create table t1 (id integer, x integer) engine=INNODB; insert into t1 values(0, 0); set autocommit=0; SELECT * from t1 where id = 0 FOR UPDATE; id x 0 0 -connection con2; +connect con2,localhost,root,,; set autocommit=0; lock table t1 write; connection con1; @@ -116,13 +113,49 @@ Warnings: Warning 1062 Duplicate entry '3' for key 'PRIMARY' SELECT * FROM t1 FOR UPDATE; connection con2; +disconnect con2; connection default; COMMIT; connection con1; a b 3 1 COMMIT; -disconnect con1; -disconnect con2; connection default; DROP TABLE t1; +# +# MDEV-11080 InnoDB: Failing assertion: +# table->n_waiting_or_granted_auto_inc_locks > 0 +# +CREATE TABLE t1 (pk INTEGER AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t1 VALUES (NULL),(NULL); +CREATE TABLE t2 LIKE t1; +BEGIN; +connection con1; +BEGIN; +DELETE FROM t2; +connection default; +LOCK TABLE t2 READ;; +connection con1; +SET innodb_lock_wait_timeout= 1, lock_wait_timeout= 2; +INSERT INTO t2 SELECT * FROM t1; +COMMIT; +connection default; +UNLOCK TABLES; +DROP TABLE t1, t2; +# +# MDEV-16709 InnoDB: Error: trx already had an AUTO-INC lock +# +CREATE TABLE t1 (pk INT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB +PARTITION BY key (pk) PARTITIONS 2; +CREATE TABLE t2 (a INT) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1),(2),(3),(4),(5),(6); +CREATE TABLE t3 (b INT) ENGINE=InnoDB; +INSERT INTO t3 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9); +connection con1; +INSERT t1 SELECT NULL FROM t2; +connection default; +INSERT t1 SELECT NULL FROM t3; +connection con1; +disconnect con1; +connection default; +DROP TABLE t1, t2, t3; 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 61507ddbe5c..5411f5149d1 100644 --- a/mysql-test/suite/innodb/r/innodb-page_compression_bzip2.result +++ b/mysql-test/suite/innodb/r/innodb-page_compression_bzip2.result @@ -147,7 +147,8 @@ count(*) select count(*) from innodb_page_compressed9 where c1 < 500000; count(*) 5000 -alter table innodb_normal page_compressed=1 page_compression_level=8; +alter table innodb_normal page_compressed=1 page_compression_level=8, +algorithm=instant; show warnings; Level Code Message show create table innodb_normal; @@ -156,6 +157,10 @@ innodb_normal CREATE TABLE `innodb_normal` ( `c1` int(11) DEFAULT NULL, `b` char(20) 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, algorithm=instant; +ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Changing table options requires the table to be rebuilt. Try ALGORITHM=INPLACE +alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0, algorithm=nocopy; +ERROR 0A000: ALGORITHM=NOCOPY is not supported. Reason: Changing table options requires the table to be rebuilt. Try ALGORITHM=INPLACE alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0; show warnings; Level Code Message @@ -174,6 +179,7 @@ update innodb_page_compressed6 set c1 = c1 + 1; update innodb_page_compressed7 set c1 = c1 + 1; update innodb_page_compressed8 set c1 = c1 + 1; update innodb_page_compressed9 set c1 = c1 + 1; +commit; select count(*) from innodb_compressed; count(*) 5000 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 6cef1978ca0..aefb5c8a0be 100644 --- a/mysql-test/suite/innodb/r/innodb-page_compression_lz4.result +++ b/mysql-test/suite/innodb/r/innodb-page_compression_lz4.result @@ -147,7 +147,8 @@ count(*) select count(*) from innodb_page_compressed9 where c1 < 500000; count(*) 5000 -alter table innodb_normal page_compressed=1 page_compression_level=8; +alter table innodb_normal page_compressed=1 page_compression_level=8, +algorithm=instant; show warnings; Level Code Message show create table innodb_normal; @@ -156,6 +157,10 @@ innodb_normal CREATE TABLE `innodb_normal` ( `c1` int(11) DEFAULT NULL, `b` char(20) 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, algorithm=instant; +ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Changing table options requires the table to be rebuilt. Try ALGORITHM=INPLACE +alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0, algorithm=nocopy; +ERROR 0A000: ALGORITHM=NOCOPY is not supported. Reason: Changing table options requires the table to be rebuilt. Try ALGORITHM=INPLACE alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0; show warnings; Level Code Message 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 c7ab859e102..606de870d7c 100644 --- a/mysql-test/suite/innodb/r/innodb-page_compression_lzma.result +++ b/mysql-test/suite/innodb/r/innodb-page_compression_lzma.result @@ -147,7 +147,8 @@ count(*) select count(*) from innodb_page_compressed9 where c1 < 500000; count(*) 5000 -alter table innodb_normal page_compressed=1 page_compression_level=8; +alter table innodb_normal page_compressed=1 page_compression_level=8, +algorithm=instant; show warnings; Level Code Message show create table innodb_normal; @@ -156,6 +157,10 @@ innodb_normal CREATE TABLE `innodb_normal` ( `c1` int(11) DEFAULT NULL, `b` char(20) 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, algorithm=instant; +ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Changing table options requires the table to be rebuilt. Try ALGORITHM=INPLACE +alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0, algorithm=nocopy; +ERROR 0A000: ALGORITHM=NOCOPY is not supported. Reason: Changing table options requires the table to be rebuilt. Try ALGORITHM=INPLACE alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0; show warnings; Level Code Message @@ -174,6 +179,7 @@ update innodb_page_compressed6 set c1 = c1 + 1; update innodb_page_compressed7 set c1 = c1 + 1; update innodb_page_compressed8 set c1 = c1 + 1; update innodb_page_compressed9 set c1 = c1 + 1; +commit; select count(*) from innodb_compressed; count(*) 5000 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 379abcc9968..66783c35d6c 100644 --- a/mysql-test/suite/innodb/r/innodb-page_compression_lzo.result +++ b/mysql-test/suite/innodb/r/innodb-page_compression_lzo.result @@ -147,7 +147,8 @@ count(*) select count(*) from innodb_page_compressed9 where c1 < 500000; count(*) 5000 -alter table innodb_normal page_compressed=1 page_compression_level=8; +alter table innodb_normal page_compressed=1 page_compression_level=8, +algorithm=instant; show warnings; Level Code Message show create table innodb_normal; @@ -156,6 +157,10 @@ innodb_normal CREATE TABLE `innodb_normal` ( `c1` int(11) DEFAULT NULL, `b` char(20) 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, algorithm=instant; +ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Changing table options requires the table to be rebuilt. Try ALGORITHM=INPLACE +alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0, algorithm=nocopy; +ERROR 0A000: ALGORITHM=NOCOPY is not supported. Reason: Changing table options requires the table to be rebuilt. Try ALGORITHM=INPLACE alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0; show warnings; Level Code Message @@ -174,6 +179,7 @@ update innodb_page_compressed6 set c1 = c1 + 1; update innodb_page_compressed7 set c1 = c1 + 1; update innodb_page_compressed8 set c1 = c1 + 1; update innodb_page_compressed9 set c1 = c1 + 1; +commit; select count(*) from innodb_compressed; count(*) 5000 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 33b36428040..439f409ea59 100644 --- a/mysql-test/suite/innodb/r/innodb-page_compression_tables.result +++ b/mysql-test/suite/innodb/r/innodb-page_compression_tables.result @@ -88,8 +88,12 @@ select count(*) from innodb_dynamic where c1 < 1500000; count(*) 5000 set global innodb_compression_algorithm = 0; -alter table innodb_compact engine=innodb page_compressed=DEFAULT; -alter table innodb_dynamic engine=innodb page_compressed=DEFAULT; +alter table innodb_compact page_compressed=DEFAULT, algorithm=instant; +ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Changing table options requires the table to be rebuilt. Try ALGORITHM=INPLACE +alter table innodb_compact page_compressed=DEFAULT; +alter table innodb_dynamic page_compressed=DEFAULT, algorithm=instant; +ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Changing table options requires the table to be rebuilt. Try ALGORITHM=INPLACE +alter table innodb_dynamic page_compressed=DEFAULT; show create table innodb_compact; Table Create Table innodb_compact CREATE TABLE `innodb_compact` ( 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 bb9ceb29e17..9dcf676cb3d 100644 --- a/mysql-test/suite/innodb/r/innodb-page_compression_zip.result +++ b/mysql-test/suite/innodb/r/innodb-page_compression_zip.result @@ -147,7 +147,8 @@ count(*) select count(*) from innodb_page_compressed9 where c1 < 500000; count(*) 5000 -alter table innodb_normal page_compressed=1 page_compression_level=8; +alter table innodb_normal page_compressed=1 page_compression_level=8, +algorithm=instant; show warnings; Level Code Message show create table innodb_normal; @@ -156,6 +157,10 @@ innodb_normal CREATE TABLE `innodb_normal` ( `c1` int(11) DEFAULT NULL, `b` char(20) 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, algorithm=instant; +ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Changing table options requires the table to be rebuilt. Try ALGORITHM=INPLACE +alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0, algorithm=nocopy; +ERROR 0A000: ALGORITHM=NOCOPY is not supported. Reason: Changing table options requires the table to be rebuilt. Try ALGORITHM=INPLACE alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0; show warnings; Level Code Message diff --git a/mysql-test/suite/innodb/r/innodb-wl5522.result b/mysql-test/suite/innodb/r/innodb-wl5522.result index 1ed857af473..62f03292baa 100644 --- a/mysql-test/suite/innodb/r/innodb-wl5522.result +++ b/mysql-test/suite/innodb/r/innodb-wl5522.result @@ -115,7 +115,7 @@ ALTER TABLE t2 DISCARD TABLESPACE; db.opt t2.frm ALTER TABLE t2 IMPORT TABLESPACE; -ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x21 and the meta-data file has 0x1) +ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x21 and the meta-data file has 0x1; .cfg file uses ROW_FORMAT=COMPACT) ALTER TABLE t2 IMPORT TABLESPACE; ERROR HY000: Schema mismatch (Expected FSP_SPACE_FLAGS=0x*, .ibd file contains 0x*.) DROP TABLE t2; @@ -603,7 +603,7 @@ SELECT * FROM t1; ERROR HY000: Tablespace has been discarded for table `t1` restore: t1 .ibd and .cfg files ALTER TABLE t1 IMPORT TABLESPACE; -ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x1 and the meta-data file has 0x0) +ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x1 and the meta-data file has 0x0; .cfg file uses ROW_FORMAT=REDUNDANT) unlink: t1.ibd unlink: t1.cfg DROP TABLE t1; @@ -615,7 +615,19 @@ SELECT * FROM t1; ERROR HY000: Tablespace has been discarded for table `t1` restore: t1 .ibd and .cfg files ALTER TABLE t1 IMPORT TABLESPACE; -ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x21 and the meta-data file has 0x0) +ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x21 and the meta-data file has 0x0; .cfg file uses ROW_FORMAT=REDUNDANT) +unlink: t1.ibd +unlink: t1.cfg +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table `t1` +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x29 and the meta-data file has 0x0; .cfg file uses ROW_FORMAT=REDUNDANT) unlink: t1.ibd unlink: t1.cfg DROP TABLE t1; @@ -789,7 +801,7 @@ SELECT * FROM t1; ERROR HY000: Tablespace has been discarded for table `t1` restore: t1 .ibd and .cfg files ALTER TABLE t1 IMPORT TABLESPACE; -ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x0 and the meta-data file has 0x1) +ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x0 and the meta-data file has 0x1; .cfg file uses ROW_FORMAT=COMPACT) unlink: t1.ibd unlink: t1.cfg DROP TABLE t1; @@ -801,7 +813,19 @@ SELECT * FROM t1; ERROR HY000: Tablespace has been discarded for table `t1` restore: t1 .ibd and .cfg files ALTER TABLE t1 IMPORT TABLESPACE; -ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x21 and the meta-data file has 0x1) +ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x21 and the meta-data file has 0x1; .cfg file uses ROW_FORMAT=COMPACT) +unlink: t1.ibd +unlink: t1.cfg +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table `t1` +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x29 and the meta-data file has 0x1; .cfg file uses ROW_FORMAT=COMPACT) unlink: t1.ibd unlink: t1.cfg DROP TABLE t1; @@ -978,7 +1002,7 @@ SELECT * FROM t1; ERROR HY000: Tablespace has been discarded for table `t1` restore: t1 .ibd and .cfg files ALTER TABLE t1 IMPORT TABLESPACE; -ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x1 and the meta-data file has 0x21) +ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x1 and the meta-data file has 0x21; .cfg file uses ROW_FORMAT=DYNAMIC) unlink: t1.ibd unlink: t1.cfg DROP TABLE t1; @@ -990,7 +1014,19 @@ SELECT * FROM t1; ERROR HY000: Tablespace has been discarded for table `t1` restore: t1 .ibd and .cfg files ALTER TABLE t1 IMPORT TABLESPACE; -ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x0 and the meta-data file has 0x21) +ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x0 and the meta-data file has 0x21; .cfg file uses ROW_FORMAT=DYNAMIC) +unlink: t1.ibd +unlink: t1.cfg +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table `t1` +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x29 and the meta-data file has 0x21; .cfg file uses ROW_FORMAT=DYNAMIC) unlink: t1.ibd unlink: t1.cfg DROP TABLE t1; @@ -1049,6 +1085,220 @@ c1 c2 42 1 43 1 DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `idx` (`c2`) +) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED +SELECT * FROM t1; +c1 c2 +1 1 +2 1 +3 1 +4 1 +6 1 +7 1 +8 1 +9 1 +13 1 +14 1 +15 1 +16 1 +17 1 +18 1 +19 1 +20 1 +28 1 +29 1 +30 1 +31 1 +32 1 +33 1 +34 1 +35 1 +36 1 +37 1 +38 1 +39 1 +40 1 +41 1 +42 1 +43 1 +FLUSH TABLES t1 FOR EXPORT; +backup: t1 +UNLOCK TABLES; +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table `t1` +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +unlink: t1.cfg +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `idx` (`c2`) +) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED +SELECT * FROM t1; +c1 c2 +1 1 +2 1 +3 1 +4 1 +6 1 +7 1 +8 1 +9 1 +13 1 +14 1 +15 1 +16 1 +17 1 +18 1 +19 1 +20 1 +28 1 +29 1 +30 1 +31 1 +32 1 +33 1 +34 1 +35 1 +36 1 +37 1 +38 1 +39 1 +40 1 +41 1 +42 1 +43 1 +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table `t1` +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x0 and the meta-data file has 0x29; .cfg file uses ROW_FORMAT=COMPRESSED) +unlink: t1.ibd +unlink: t1.cfg +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPACT; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table `t1` +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x1 and the meta-data file has 0x29; .cfg file uses ROW_FORMAT=COMPRESSED) +unlink: t1.ibd +unlink: t1.cfg +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table `t1` +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x21 and the meta-data file has 0x29; .cfg file uses ROW_FORMAT=COMPRESSED) +unlink: t1.ibd +unlink: t1.cfg +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table `t1` +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x23 and the meta-data file has 0x29; .cfg file uses ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8) +unlink: t1.ibd +unlink: t1.cfg +DROP TABLE t1; +CREATE TABLE t1( +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; +ALTER TABLE t1 DISCARD TABLESPACE; +SELECT * FROM t1; +ERROR HY000: Tablespace has been discarded for table `t1` +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +unlink: t1.cfg +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `idx` (`c2`) +) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED +SELECT * FROM t1; +c1 c2 +1 1 +2 1 +3 1 +4 1 +6 1 +7 1 +8 1 +9 1 +13 1 +14 1 +15 1 +16 1 +17 1 +18 1 +19 1 +20 1 +28 1 +29 1 +30 1 +31 1 +32 1 +33 1 +34 1 +35 1 +36 1 +37 1 +38 1 +39 1 +40 1 +41 1 +42 1 +43 1 +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"); diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result index 3663c18ea44..b4e0f090e5d 100644 --- a/mysql-test/suite/innodb/r/innodb_mysql.result +++ b/mysql-test/suite/innodb/r/innodb_mysql.result @@ -3126,7 +3126,7 @@ INSERT INTO t1 VALUES (0); SET SQL_MODE='STRICT_ALL_TABLES'; CREATE TABLE t2 SELECT LEAST((SELECT '' FROM t1),NOW()) FROM `t1`; -ERROR 22007: Incorrect datetime value: '' +ERROR 22007: Truncated incorrect datetime value: '' DROP TABLE t1; SET SQL_MODE=DEFAULT; # diff --git a/mysql-test/suite/innodb/r/instant_alter.result b/mysql-test/suite/innodb/r/instant_alter.result index a70a3d077e0..5f89b31c142 100644 --- a/mysql-test/suite/innodb/r/instant_alter.result +++ b/mysql-test/suite/innodb/r/instant_alter.result @@ -182,8 +182,8 @@ affected rows: 0 info: Records: 0 Duplicates: 0 Warnings: 0 INSERT INTO t1 SET id=9; ALTER TABLE t1 DROP c3; -affected rows: 9 -info: Records: 9 Duplicates: 0 Warnings: 0 +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -446,6 +446,83 @@ ALTER TABLE t1 ADD COLUMN c INT; UPDATE t1 SET c = 1; UPDATE t1 SET c = 2; DROP TABLE t1; +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; +CREATE TABLE t2 (b INT PRIMARY KEY, FOREIGN KEY(b) REFERENCES t1(a)) +ENGINE=InnoDB ROW_FORMAT=REDUNDANT; +INSERT INTO t1 SET a=1; +INSERT INTO t2 SET b=1; +ALTER TABLE t2 ADD COLUMN a INT, DROP FOREIGN KEY t2_ibfk_1; +ALTER TABLE t2 ADD INDEX(a); +ALTER TABLE t1 ADD COLUMN b INT, ADD FOREIGN KEY(a) REFERENCES t2(a), +ALGORITHM=INSTANT; +ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Adding foreign keys needs foreign_key_checks=OFF. Try ALGORITHM=COPY +SET foreign_key_checks=0; +ALTER TABLE t1 ADD COLUMN b INT, ADD FOREIGN KEY(a) REFERENCES t2(a), +ALGORITHM=INSTANT; +ALTER TABLE t2 ADD CONSTRAINT fk FOREIGN KEY(b) REFERENCES t1(a), +ALGORITHM=INSTANT; +SET foreign_key_checks=1; +ALTER TABLE t2 COMMENT 'domestic keys only', DROP FOREIGN KEY fk; +ALTER TABLE t1 DROP FOREIGN KEY t1_ibfk_1; +ALTER TABLE t1 ADD COLUMN big BLOB NOT NULL +DEFAULT REPEAT('a', @@GLOBAL.innodb_page_size * .75); +CHECK TABLE t2, t1; +Table Op Msg_type Msg_text +test.t2 check status OK +test.t1 check status OK +DROP TABLE t2, t1; +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; +INSERT INTO t1 SET a = 1; +ALTER TABLE t1 ADD COLUMN b TEXT; +BEGIN; +UPDATE t1 SET b = REPEAT('1', 32768); +UPDATE t1 SET a = 2; +INSERT INTO t1 SET a = 1; +SELECT a,LENGTH(b) FROM t1; +a LENGTH(b) +1 NULL +2 32768 +DELETE FROM t1; +COMMIT; +InnoDB 0 transactions not purged +DROP TABLE t1; +CREATE TABLE t1 (a INT, b INT UNIQUE) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; +INSERT INTO t1 (a) VALUES (NULL), (NULL); +ALTER TABLE t1 DROP a, ADD COLUMN a INT; +DELETE FROM t1; +BEGIN; +INSERT INTO t1 SET a=NULL; +ROLLBACK; +DELETE FROM t1; +DROP TABLE t1; +CREATE TABLE t1 (a INT PRIMARY KEY, t VARCHAR(33101) NOT NULL) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; +INSERT INTO t1 VALUES(347,''); +ALTER TABLE t1 DROP COLUMN t, ALGORITHM=INSTANT; +SELECT * FROM t1; +a +347 +DROP TABLE t1; +CREATE TABLE t1 (a INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; +INSERT INTO t1() VALUES(); +ALTER TABLE t1 ADD COLUMN b INT FIRST, ADD COLUMN c INT AFTER b; +SELECT * FROM t1; +b c a +NULL NULL NULL +DROP TABLE t1; +CREATE TABLE t1 (t TEXT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; +SET @t=REPEAT('x',@@innodb_page_size / 2); +INSERT INTO t1 VALUES (@t),(@t),(@t),(@t),(@t),(@t),(NULL),(@t),(@t),(@t),(@t); +ALTER TABLE t1 ADD COLUMN a INT FIRST; +UPDATE t1 SET a = 0; +DROP TABLE t1; +CREATE TABLE t1 (t TEXT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; +INSERT INTO t1 SET t = @x; +ALTER TABLE t1 DROP COLUMN t, ADD COLUMN i INT NOT NULL DEFAULT 1; +ALTER TABLE t1 ADD COLUMN t TEXT; +SELECT * FROM t1; +i t +1 NULL +DROP TABLE t1; CREATE TABLE t1 (id INT PRIMARY KEY, c2 INT UNIQUE, c3 POINT NOT NULL DEFAULT ST_GeomFromText('POINT(3 4)'), @@ -574,8 +651,8 @@ affected rows: 0 info: Records: 0 Duplicates: 0 Warnings: 0 INSERT INTO t1 SET id=9; ALTER TABLE t1 DROP c3; -affected rows: 9 -info: Records: 9 Duplicates: 0 Warnings: 0 +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -838,6 +915,83 @@ ALTER TABLE t1 ADD COLUMN c INT; UPDATE t1 SET c = 1; UPDATE t1 SET c = 2; DROP TABLE t1; +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=COMPACT; +CREATE TABLE t2 (b INT PRIMARY KEY, FOREIGN KEY(b) REFERENCES t1(a)) +ENGINE=InnoDB ROW_FORMAT=COMPACT; +INSERT INTO t1 SET a=1; +INSERT INTO t2 SET b=1; +ALTER TABLE t2 ADD COLUMN a INT, DROP FOREIGN KEY t2_ibfk_1; +ALTER TABLE t2 ADD INDEX(a); +ALTER TABLE t1 ADD COLUMN b INT, ADD FOREIGN KEY(a) REFERENCES t2(a), +ALGORITHM=INSTANT; +ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Adding foreign keys needs foreign_key_checks=OFF. Try ALGORITHM=COPY +SET foreign_key_checks=0; +ALTER TABLE t1 ADD COLUMN b INT, ADD FOREIGN KEY(a) REFERENCES t2(a), +ALGORITHM=INSTANT; +ALTER TABLE t2 ADD CONSTRAINT fk FOREIGN KEY(b) REFERENCES t1(a), +ALGORITHM=INSTANT; +SET foreign_key_checks=1; +ALTER TABLE t2 COMMENT 'domestic keys only', DROP FOREIGN KEY fk; +ALTER TABLE t1 DROP FOREIGN KEY t1_ibfk_1; +ALTER TABLE t1 ADD COLUMN big BLOB NOT NULL +DEFAULT REPEAT('a', @@GLOBAL.innodb_page_size * .75); +CHECK TABLE t2, t1; +Table Op Msg_type Msg_text +test.t2 check status OK +test.t1 check status OK +DROP TABLE t2, t1; +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=COMPACT; +INSERT INTO t1 SET a = 1; +ALTER TABLE t1 ADD COLUMN b TEXT; +BEGIN; +UPDATE t1 SET b = REPEAT('1', 32768); +UPDATE t1 SET a = 2; +INSERT INTO t1 SET a = 1; +SELECT a,LENGTH(b) FROM t1; +a LENGTH(b) +1 NULL +2 32768 +DELETE FROM t1; +COMMIT; +InnoDB 0 transactions not purged +DROP TABLE t1; +CREATE TABLE t1 (a INT, b INT UNIQUE) ENGINE=InnoDB ROW_FORMAT=COMPACT; +INSERT INTO t1 (a) VALUES (NULL), (NULL); +ALTER TABLE t1 DROP a, ADD COLUMN a INT; +DELETE FROM t1; +BEGIN; +INSERT INTO t1 SET a=NULL; +ROLLBACK; +DELETE FROM t1; +DROP TABLE t1; +CREATE TABLE t1 (a INT PRIMARY KEY, t VARCHAR(33101) NOT NULL) ENGINE=InnoDB ROW_FORMAT=COMPACT; +INSERT INTO t1 VALUES(347,''); +ALTER TABLE t1 DROP COLUMN t, ALGORITHM=INSTANT; +SELECT * FROM t1; +a +347 +DROP TABLE t1; +CREATE TABLE t1 (a INT) ENGINE=InnoDB ROW_FORMAT=COMPACT; +INSERT INTO t1() VALUES(); +ALTER TABLE t1 ADD COLUMN b INT FIRST, ADD COLUMN c INT AFTER b; +SELECT * FROM t1; +b c a +NULL NULL NULL +DROP TABLE t1; +CREATE TABLE t1 (t TEXT) ENGINE=InnoDB ROW_FORMAT=COMPACT; +SET @t=REPEAT('x',@@innodb_page_size / 2); +INSERT INTO t1 VALUES (@t),(@t),(@t),(@t),(@t),(@t),(NULL),(@t),(@t),(@t),(@t); +ALTER TABLE t1 ADD COLUMN a INT FIRST; +UPDATE t1 SET a = 0; +DROP TABLE t1; +CREATE TABLE t1 (t TEXT) ENGINE=InnoDB ROW_FORMAT=COMPACT; +INSERT INTO t1 SET t = @x; +ALTER TABLE t1 DROP COLUMN t, ADD COLUMN i INT NOT NULL DEFAULT 1; +ALTER TABLE t1 ADD COLUMN t TEXT; +SELECT * FROM t1; +i t +1 NULL +DROP TABLE t1; CREATE TABLE t1 (id INT PRIMARY KEY, c2 INT UNIQUE, c3 POINT NOT NULL DEFAULT ST_GeomFromText('POINT(3 4)'), @@ -966,8 +1120,8 @@ affected rows: 0 info: Records: 0 Duplicates: 0 Warnings: 0 INSERT INTO t1 SET id=9; ALTER TABLE t1 DROP c3; -affected rows: 9 -info: Records: 9 Duplicates: 0 Warnings: 0 +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -1230,10 +1384,87 @@ ALTER TABLE t1 ADD COLUMN c INT; UPDATE t1 SET c = 1; UPDATE t1 SET c = 2; DROP TABLE t1; +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +CREATE TABLE t2 (b INT PRIMARY KEY, FOREIGN KEY(b) REFERENCES t1(a)) +ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +INSERT INTO t1 SET a=1; +INSERT INTO t2 SET b=1; +ALTER TABLE t2 ADD COLUMN a INT, DROP FOREIGN KEY t2_ibfk_1; +ALTER TABLE t2 ADD INDEX(a); +ALTER TABLE t1 ADD COLUMN b INT, ADD FOREIGN KEY(a) REFERENCES t2(a), +ALGORITHM=INSTANT; +ERROR 0A000: ALGORITHM=INSTANT is not supported. Reason: Adding foreign keys needs foreign_key_checks=OFF. Try ALGORITHM=COPY +SET foreign_key_checks=0; +ALTER TABLE t1 ADD COLUMN b INT, ADD FOREIGN KEY(a) REFERENCES t2(a), +ALGORITHM=INSTANT; +ALTER TABLE t2 ADD CONSTRAINT fk FOREIGN KEY(b) REFERENCES t1(a), +ALGORITHM=INSTANT; +SET foreign_key_checks=1; +ALTER TABLE t2 COMMENT 'domestic keys only', DROP FOREIGN KEY fk; +ALTER TABLE t1 DROP FOREIGN KEY t1_ibfk_1; +ALTER TABLE t1 ADD COLUMN big BLOB NOT NULL +DEFAULT REPEAT('a', @@GLOBAL.innodb_page_size * .75); +CHECK TABLE t2, t1; +Table Op Msg_type Msg_text +test.t2 check status OK +test.t1 check status OK +DROP TABLE t2, t1; +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +INSERT INTO t1 SET a = 1; +ALTER TABLE t1 ADD COLUMN b TEXT; +BEGIN; +UPDATE t1 SET b = REPEAT('1', 32768); +UPDATE t1 SET a = 2; +INSERT INTO t1 SET a = 1; +SELECT a,LENGTH(b) FROM t1; +a LENGTH(b) +1 NULL +2 32768 +DELETE FROM t1; +COMMIT; +InnoDB 0 transactions not purged +DROP TABLE t1; +CREATE TABLE t1 (a INT, b INT UNIQUE) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +INSERT INTO t1 (a) VALUES (NULL), (NULL); +ALTER TABLE t1 DROP a, ADD COLUMN a INT; +DELETE FROM t1; +BEGIN; +INSERT INTO t1 SET a=NULL; +ROLLBACK; +DELETE FROM t1; +DROP TABLE t1; +CREATE TABLE t1 (a INT PRIMARY KEY, t VARCHAR(33101) NOT NULL) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +INSERT INTO t1 VALUES(347,''); +ALTER TABLE t1 DROP COLUMN t, ALGORITHM=INSTANT; +SELECT * FROM t1; +a +347 +DROP TABLE t1; +CREATE TABLE t1 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +INSERT INTO t1() VALUES(); +ALTER TABLE t1 ADD COLUMN b INT FIRST, ADD COLUMN c INT AFTER b; +SELECT * FROM t1; +b c a +NULL NULL NULL +DROP TABLE t1; +CREATE TABLE t1 (t TEXT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +SET @t=REPEAT('x',@@innodb_page_size / 2); +INSERT INTO t1 VALUES (@t),(@t),(@t),(@t),(@t),(@t),(NULL),(@t),(@t),(@t),(@t); +ALTER TABLE t1 ADD COLUMN a INT FIRST; +UPDATE t1 SET a = 0; +DROP TABLE t1; +CREATE TABLE t1 (t TEXT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +INSERT INTO t1 SET t = @x; +ALTER TABLE t1 DROP COLUMN t, ADD COLUMN i INT NOT NULL DEFAULT 1; +ALTER TABLE t1 ADD COLUMN t TEXT; +SELECT * FROM t1; +i t +1 NULL +DROP TABLE t1; disconnect analyze; SELECT variable_value-@old_instant instants FROM information_schema.global_status WHERE variable_name = 'innodb_instant_alter_column'; instants -39 +78 SET GLOBAL innodb_purge_rseg_truncate_frequency= @saved_frequency; diff --git a/mysql-test/suite/innodb/r/instant_alter_crash.result b/mysql-test/suite/innodb/r/instant_alter_crash.result index d9e57b397f3..807a4091822 100644 --- a/mysql-test/suite/innodb/r/instant_alter_crash.result +++ b/mysql-test/suite/innodb/r/instant_alter_crash.result @@ -29,10 +29,11 @@ BEGIN; DELETE FROM t1; ROLLBACK; InnoDB 0 transactions not purged -INSERT INTO t2 VALUES (64,42,'De finibus bonorum'), (347,33101,' et malorum'); +INSERT INTO t2 VALUES +(16,1551,'Omnium enim rerum'),(128,1571,' principia parva sunt'); connect ddl, localhost, root; SET DEBUG_SYNC='innodb_alter_inplace_before_commit SIGNAL ddl WAIT_FOR ever'; -ALTER TABLE t2 ADD COLUMN (c4 TEXT NOT NULL DEFAULT ' et malorum'); +ALTER TABLE t2 DROP COLUMN c3, ADD COLUMN c5 TEXT DEFAULT 'naturam abhorrere'; connection default; SET DEBUG_SYNC='now WAIT_FOR ddl'; SET GLOBAL innodb_flush_log_at_trx_commit=1; @@ -46,8 +47,35 @@ id c2 SELECT * FROM t2; id c2 c3 2 1 De finibus bonorum -64 42 De finibus bonorum -347 33101 et malorum +16 1551 Omnium enim rerum +128 1571 principia parva sunt +BEGIN; +INSERT INTO t1 SET id=1; +DELETE FROM t2; +ROLLBACK; +InnoDB 0 transactions not purged +INSERT INTO t2 VALUES (64,42,'De finibus bonorum'), (347,33101,' et malorum'); +connect ddl, localhost, root; +ALTER TABLE t2 DROP COLUMN c3; +SET DEBUG_SYNC='innodb_alter_inplace_before_commit SIGNAL ddl WAIT_FOR ever'; +ALTER TABLE t2 ADD COLUMN (c4 TEXT NOT NULL DEFAULT ' et malorum'); +connection default; +SET DEBUG_SYNC='now WAIT_FOR ddl'; +SET GLOBAL innodb_flush_log_at_trx_commit=1; +DELETE FROM t1; +# Kill the server +disconnect ddl; +SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency; +SET GLOBAL innodb_purge_rseg_truncate_frequency=1; +SELECT * FROM t1; +id c2 +SELECT * FROM t2; +id c2 +2 1 +64 42 +16 1551 +128 1571 +347 33101 BEGIN; INSERT INTO t1 SET id=1; DELETE FROM t2; @@ -59,27 +87,38 @@ N_RECS=0; LEVEL=0 header=0x010000030074 (id=0x696e66696d756d00) header=0x010008030000 (id=0x73757072656d756d00) t2 clustered index root page(type 18): -N_RECS=4; LEVEL=0 -header=0x010000030088 (id=0x696e66696d756d00) -header=0x1000100b00b9 (id=0x80000000, +N_RECS=6; LEVEL=0 +header=0x01000003008f (id=0x0000000000000000) +header=0x3000100c00d4 (id=0x80000000, DB_TRX_ID=0x000000000000, DB_ROLL_PTR=0x80000000000000, + BLOB=0x000000260000000000000008, c2=NULL(4 bytes), c3=0x44652066696e6962757320626f6e6f72756d) -header=0x0000180900d8 (id=0x80000002, +header=0x0000180900f4 (id=0x80000002, DB_TRX_ID=0x000000000000, DB_ROLL_PTR=0x80000000000000, c2=0x80000001) -header=0x0000200900f8 (id=0x80000040, +header=0x0000200b0124 (id=0x80000010, + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, + c2=0x8000060f, + c3=0x4f6d6e69756d20656e696d20726572756d) +header=0x000028090144 (id=0x80000040, DB_TRX_ID=0x000000000000, DB_ROLL_PTR=0x80000000000000, c2=0x8000002a) -header=0x0000280b0074 (id=0x8000015b, +header=0x0000300b0179 (id=0x80000080, + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, + c2=0x80000623, + c3=0x207072696e63697069612070617276612073756e74) +header=0x0000380b0074 (id=0x8000015b, DB_TRX_ID=0x000000000000, DB_ROLL_PTR=0x80000000000000, c2=0x8000814d, c3=0x206574206d616c6f72756d) -header=0x050008030000 (id=0x73757072656d756d00) +header=0x070008030000 (id=0x000000000000000100) UNLOCK TABLES; DELETE FROM t2; InnoDB 0 transactions not purged @@ -96,7 +135,6 @@ Table Create Table t2 CREATE TABLE `t2` ( `id` int(11) NOT NULL, `c2` int(11) DEFAULT NULL, - `c3` text NOT NULL DEFAULT 'De finibus bonorum', PRIMARY KEY (`id`), UNIQUE KEY `c2` (`c2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT diff --git a/mysql-test/suite/innodb/r/instant_alter_debug.result b/mysql-test/suite/innodb/r/instant_alter_debug.result index 389a04007e2..c017a466516 100644 --- a/mysql-test/suite/innodb/r/instant_alter_debug.result +++ b/mysql-test/suite/innodb/r/instant_alter_debug.result @@ -175,10 +175,89 @@ SET DEBUG_SYNC='now WAIT_FOR copied'; BEGIN; INSERT INTO t1 SET b=1; ROLLBACK; -disconnect stop_purge; +connection stop_purge; +COMMIT; +connection default; InnoDB 2 transactions not purged SET DEBUG_SYNC='now SIGNAL logged'; -disconnect ddl; +connection ddl; +connection default; DROP TABLE t1; SET DEBUG_SYNC='RESET'; +# +# MDEV-16131 Assertion failed in dict_index_t::instant_field_value() +# +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t1 SET a=0; +ALTER TABLE t1 ADD COLUMN b INT NOT NULL DEFAULT 2, ADD COLUMN c INT; +connection stop_purge; +START TRANSACTION WITH CONSISTENT SNAPSHOT; +connection default; +DELETE FROM t1; +connection ddl; +SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL copied WAIT_FOR logged'; +ALTER TABLE t1 FORCE; +connection stop_purge; +COMMIT; +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR copied'; +InnoDB 1 transactions not purged +INSERT INTO t1 SET a=1; +INSERT INTO t1 SET a=2,b=3,c=4; +SET DEBUG_SYNC = 'now SIGNAL logged'; +connection ddl; +connection default; +SET DEBUG_SYNC = RESET; +SELECT * FROM t1; +a b c +1 2 NULL +2 3 4 +ALTER TABLE t1 DROP b, ALGORITHM=INSTANT; +connection stop_purge; +START TRANSACTION WITH CONSISTENT SNAPSHOT; +connection default; +DELETE FROM t1; +connection ddl; +SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL copied WAIT_FOR logged'; +ALTER TABLE t1 ADD COLUMN b INT NOT NULL DEFAULT 2 AFTER a, FORCE; +disconnect stop_purge; +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR copied'; +InnoDB 1 transactions not purged +INSERT INTO t1 SET a=1; +INSERT INTO t1 SET a=2,c=4; +SET DEBUG_SYNC = 'now SIGNAL logged'; +connection ddl; +UPDATE t1 SET b = b + 1 WHERE a = 2; +connection default; +SET DEBUG_SYNC = RESET; +SELECT * FROM t1; +a b c +1 2 NULL +2 3 4 +# +# MDEV-15872 Crash in online ALTER TABLE...ADD PRIMARY KEY +# after instant ADD COLUMN ... NULL +# +ALTER TABLE t1 ADD COLUMN d INT, ALGORITHM=INSTANT; +UPDATE t1 SET d=1; +connection ddl; +SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL copied WAIT_FOR logged'; +ALTER IGNORE TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY (a,d); +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR copied'; +BEGIN; +INSERT INTO t1 SET a=3; +ROLLBACK; +SET DEBUG_SYNC = 'now SIGNAL logged'; +connection ddl; +ERROR 22004: Invalid use of NULL value +disconnect ddl; +connection default; +SET DEBUG_SYNC = RESET; +SELECT * FROM t1; +a b c d +1 2 NULL 1 +2 3 4 1 +DROP TABLE t1; SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency; diff --git a/mysql-test/suite/innodb/r/instant_alter_limit.result b/mysql-test/suite/innodb/r/instant_alter_limit.result new file mode 100644 index 00000000000..e66579e4a94 --- /dev/null +++ b/mysql-test/suite/innodb/r/instant_alter_limit.result @@ -0,0 +1,35 @@ +SET @old_instant= +(SELECT variable_value FROM information_schema.global_status +WHERE variable_name = 'innodb_instant_alter_column'); +CREATE TABLE t(a INT PRIMARY KEY, b INT, c INT, d INT, e INT) +ENGINE=InnoDB; +INSERT INTO t VALUES(1,2,3,4,5); +SELECT * FROM t; +b d a c e +NULL NULL 1 NULL NULL +ALTER TABLE t DROP b, DROP c, DROP d, DROP e, +ADD COLUMN b INT, ALGORITHM=INSTANT; +ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=INPLACE +ALTER TABLE t CHANGE COLUMN b beta INT AFTER a, ALGORITHM=INSTANT; +ALTER TABLE t DROP e, DROP c, DROP d, ALGORITHM=INSTANT; +SELECT * FROM t; +a beta +1 NULL +ALTER TABLE t DROP COLUMN beta, ALGORITHM=INSTANT; +ALTER TABLE t ADD COLUMN b INT NOT NULL, ALGORITHM=INSTANT; +ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=INPLACE +SELECT variable_value-@old_instant instants +FROM information_schema.global_status +WHERE variable_name = 'innodb_instant_alter_column'; +instants +256 +ALTER TABLE t ADD COLUMN b INT NOT NULL; +SELECT variable_value-@old_instant instants +FROM information_schema.global_status +WHERE variable_name = 'innodb_instant_alter_column'; +instants +256 +SELECT * FROM t; +a b +1 0 +DROP TABLE t; diff --git a/mysql-test/suite/innodb/r/instant_alter_rollback.result b/mysql-test/suite/innodb/r/instant_alter_rollback.result index ce49cea2343..ecf63a20b4a 100644 --- a/mysql-test/suite/innodb/r/instant_alter_rollback.result +++ b/mysql-test/suite/innodb/r/instant_alter_rollback.result @@ -1,57 +1,46 @@ FLUSH TABLES; # # MDEV-11369: Instant ADD COLUMN for InnoDB +# MDEV-15562: Instant DROP COLUMN or changing the order of columns # connect to_be_killed, localhost, root; -CREATE TABLE empty_REDUNDANT -(id INT PRIMARY KEY, c2 INT UNIQUE) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; -CREATE TABLE once_REDUNDANT LIKE empty_REDUNDANT; -CREATE TABLE twice_REDUNDANT LIKE empty_REDUNDANT; -INSERT INTO once_REDUNDANT SET id=1,c2=1; -INSERT INTO twice_REDUNDANT SET id=1,c2=1; -ALTER TABLE empty_REDUNDANT ADD COLUMN (d1 INT DEFAULT 15); -ALTER TABLE once_REDUNDANT ADD COLUMN (d1 INT DEFAULT 20); -ALTER TABLE twice_REDUNDANT ADD COLUMN (d1 INT DEFAULT 20); -ALTER TABLE twice_REDUNDANT ADD COLUMN +SET @old_instant= +(SELECT variable_value FROM information_schema.global_status +WHERE variable_name = 'innodb_instant_alter_column'); +CREATE TABLE empty (id INT PRIMARY KEY, c2 INT UNIQUE) ENGINE=InnoDB; +CREATE TABLE once LIKE empty; +CREATE TABLE twice LIKE empty; +CREATE TABLE thrice LIKE empty; +INSERT INTO once SET id=1,c2=1; +INSERT INTO twice SET id=1,c2=1; +INSERT INTO thrice SET id=1,c2=1; +ALTER TABLE empty ADD COLUMN (d1 INT DEFAULT 15); +ALTER TABLE once ADD COLUMN (d1 INT DEFAULT 20); +ALTER TABLE twice ADD COLUMN (d1 INT DEFAULT 20); +ALTER TABLE thrice ADD COLUMN (d1 INT DEFAULT 20); +ALTER TABLE twice ADD COLUMN (d2 INT NOT NULL DEFAULT 10, d3 VARCHAR(15) NOT NULL DEFAULT 'var och en char'); -CREATE TABLE empty_COMPACT -(id INT PRIMARY KEY, c2 INT UNIQUE) ENGINE=InnoDB ROW_FORMAT=COMPACT; -CREATE TABLE once_COMPACT LIKE empty_COMPACT; -CREATE TABLE twice_COMPACT LIKE empty_COMPACT; -INSERT INTO once_COMPACT SET id=1,c2=1; -INSERT INTO twice_COMPACT SET id=1,c2=1; -ALTER TABLE empty_COMPACT ADD COLUMN (d1 INT DEFAULT 15); -ALTER TABLE once_COMPACT ADD COLUMN (d1 INT DEFAULT 20); -ALTER TABLE twice_COMPACT ADD COLUMN (d1 INT DEFAULT 20); -ALTER TABLE twice_COMPACT ADD COLUMN +ALTER TABLE thrice ADD COLUMN (d2 INT NOT NULL DEFAULT 10, -d3 VARCHAR(15) NOT NULL DEFAULT 'var och en char'); -CREATE TABLE empty_DYNAMIC -(id INT PRIMARY KEY, c2 INT UNIQUE) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; -CREATE TABLE once_DYNAMIC LIKE empty_DYNAMIC; -CREATE TABLE twice_DYNAMIC LIKE empty_DYNAMIC; -INSERT INTO once_DYNAMIC SET id=1,c2=1; -INSERT INTO twice_DYNAMIC SET id=1,c2=1; -ALTER TABLE empty_DYNAMIC ADD COLUMN (d1 INT DEFAULT 15); -ALTER TABLE once_DYNAMIC ADD COLUMN (d1 INT DEFAULT 20); -ALTER TABLE twice_DYNAMIC ADD COLUMN (d1 INT DEFAULT 20); -ALTER TABLE twice_DYNAMIC ADD COLUMN -(d2 INT NOT NULL DEFAULT 10, -d3 VARCHAR(15) NOT NULL DEFAULT 'var och en char'); +d3 TEXT NOT NULL DEFAULT 'con'); +ALTER TABLE thrice DROP c2, DROP d3, CHANGE d2 d3 INT NOT NULL FIRST; +SELECT variable_value-@old_instant instants +FROM information_schema.global_status +WHERE variable_name = 'innodb_instant_alter_column'; +instants +7 BEGIN; -INSERT INTO empty_REDUNDANT set id=0,c2=42; -UPDATE once_REDUNDANT set c2=c2+1; -UPDATE twice_REDUNDANT set c2=c2+1; -INSERT INTO twice_REDUNDANT SET id=2,c2=0,d3=''; -INSERT INTO empty_COMPACT set id=0,c2=42; -UPDATE once_COMPACT set c2=c2+1; -UPDATE twice_COMPACT set c2=c2+1; -INSERT INTO twice_COMPACT SET id=2,c2=0,d3=''; -INSERT INTO empty_DYNAMIC set id=0,c2=42; -UPDATE once_DYNAMIC set c2=c2+1; -UPDATE twice_DYNAMIC set c2=c2+1; -INSERT INTO twice_DYNAMIC SET id=2,c2=0,d3=''; +INSERT INTO empty set id=0,c2=42; +UPDATE once set c2=c2+1; +UPDATE twice set c2=c2+1; +UPDATE thrice set d3=d3+1; +INSERT INTO twice SET id=2,c2=0,d3=''; +INSERT INTO thrice SET id=2,d3=0; +DELETE FROM empty; +DELETE FROM once; +DELETE FROM twice; +DELETE FROM thrice; connection default; SET GLOBAL innodb_flush_log_at_trx_commit=1; CREATE TABLE foo(a INT PRIMARY KEY) ENGINE=InnoDB; @@ -62,30 +51,15 @@ SET GLOBAL innodb_purge_rseg_truncate_frequency=1; DROP TABLE foo; InnoDB 0 transactions not purged SET GLOBAL innodb_purge_rseg_truncate_frequency=@saved_frequency; -SELECT * FROM empty_REDUNDANT; -id c2 d1 -SELECT * FROM once_REDUNDANT; -id c2 d1 -1 1 20 -SELECT * FROM twice_REDUNDANT; -id c2 d1 d2 d3 -1 1 20 10 var och en char -DROP TABLE empty_REDUNDANT, once_REDUNDANT, twice_REDUNDANT; -SELECT * FROM empty_COMPACT; -id c2 d1 -SELECT * FROM once_COMPACT; -id c2 d1 -1 1 20 -SELECT * FROM twice_COMPACT; -id c2 d1 d2 d3 -1 1 20 10 var och en char -DROP TABLE empty_COMPACT, once_COMPACT, twice_COMPACT; -SELECT * FROM empty_DYNAMIC; +SELECT * FROM empty; id c2 d1 -SELECT * FROM once_DYNAMIC; +SELECT * FROM once; id c2 d1 1 1 20 -SELECT * FROM twice_DYNAMIC; +SELECT * FROM twice; id c2 d1 d2 d3 1 1 20 10 var och en char -DROP TABLE empty_DYNAMIC, once_DYNAMIC, twice_DYNAMIC; +SELECT * FROM thrice; +d3 id d1 +10 1 20 +DROP TABLE empty, once, twice, thrice; diff --git a/mysql-test/suite/innodb/r/instant_drop.result b/mysql-test/suite/innodb/r/instant_drop.result new file mode 100644 index 00000000000..3f029c3f7d0 --- /dev/null +++ b/mysql-test/suite/innodb/r/instant_drop.result @@ -0,0 +1,190 @@ +create table t1(f1 int not null, f2 int not null, f3 int not null)engine=innodb; +insert into t1 values(1, 2, 3),(4, 5, 6); +alter table t1 drop column f2, algorithm=instant; +select * from t1; +f1 f3 +1 3 +4 6 +insert into t1 values(1,2); +select * from t1; +f1 f3 +1 3 +4 6 +1 2 +alter table t1 add column f4 int not null default 5, algorithm=instant; +select * from t1; +f1 f3 f4 +1 3 5 +4 6 5 +1 2 5 +alter table t1 drop column f1, algorithm=instant; +select * from t1; +f3 f4 +3 5 +6 5 +2 5 +insert into t1 values(7, 9); +select * from t1; +f3 f4 +3 5 +6 5 +2 5 +7 9 +alter table t1 add column f5 blob default repeat('aaa', 950), drop column f4, algorithm=instant; +select * from t1; +f3 f5 +3 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +6 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +2 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +7 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +select f3 from t1; +f3 +3 +6 +2 +7 +update t1 set f3 = 10 where f3 > 2; +select * from t1; +f3 f5 +10 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +10 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +2 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +10 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +delete from t1 where f3 = 10; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f3` int(11) NOT NULL, + `f5` blob DEFAULT repeat('aaa',950) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +select f3 from t1; +f3 +2 +update t1 set f5 = 'world'; +select * from t1; +f3 f5 +2 world +drop table t1; +create table t1(f1 int, f2 int not null, index idx(f2))engine=innodb; +insert into t1 values(1, 2); +alter table t1 drop column f1, add column f3 varchar(100) default 'thiru', algorithm=instant; +select * from t1 force index (idx); +f2 f3 +2 thiru +alter table t1 drop column f3, algorithm=instant; +select * from t1; +f2 +2 +begin; +insert into t1 values(10); +select * from t1; +f2 +2 +10 +update t1 set f2 = 100; +select * from t1; +f2 +100 +100 +delete from t1 where f2 = 100; +select * from t1; +f2 +rollback; +select * from t1; +f2 +2 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f2` int(11) NOT NULL, + KEY `idx` (`f2`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +drop table t1; +create table t1(f1 int, f2 int not null)engine=innodb; +insert into t1 values(1, 2); +alter table t1 drop column f2, algorithm=instant; +insert into t1 values(NULL); +select * from t1; +f1 +1 +NULL +drop table t1; +create table t1(f1 int not null, f2 int not null)engine=innodb; +insert into t1 values(1, 2); +alter table t1 add column f5 int default 10, algorithm=instant; +alter table t1 add column f3 int not null default 100, algorithm=instant; +alter table t1 add column f4 int default 100, drop column f3, algorithm=instant; +insert into t1 values(2, 3, 20, 100); +select * from t1; +f1 f2 f5 f4 +1 2 10 100 +2 3 20 100 +drop table t1; +create table t1(f1 int not null, f2 int not null) engine=innodb; +insert into t1 values(1, 1); +alter table t1 drop column f2, add column f3 int default 3, algorithm=instant; +select * from t1; +f1 f3 +1 3 +update t1 set f3 = 19; +select * from t1; +f1 f3 +1 19 +alter table t1 drop column f1, add column f5 int default 10, algorithm=instant; +insert into t1 values(4, 10); +select * from t1; +f3 f5 +19 10 +4 10 +create table t2(f1 int, f2 int not null) engine=innodb; +insert into t2(f1, f2) values(1, 2); +alter table t2 drop column f2, add column f4 varchar(100) default repeat('a', 20), add column f5 int default 10, algorithm=instant; +select * from t2; +f1 f4 f5 +1 aaaaaaaaaaaaaaaaaaaa 10 +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `f1` int(11) DEFAULT NULL, + `f4` varchar(100) DEFAULT repeat('a',20), + `f5` int(11) DEFAULT 10 +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +alter table t2 add column f6 char(100) default repeat('a', 99), algorithm=instant; +create table t3(f1 int, f2 int not null)engine=innodb; +insert into t3 values(1, 2); +alter table t3 drop column f2, add column f3 int default 1, add column f4 int default 4, algorithm=instant; +select * from t1; +f3 f5 +19 10 +4 10 +alter table t1 add column f6 int default 9,drop column f5, algorithm = instant; +insert into t1 values(4, 9); +alter table t1 force, algorithm=inplace; +select * from t1; +f3 f6 +19 9 +4 9 +4 9 +select * from t2; +f1 f4 f5 f6 +1 aaaaaaaaaaaaaaaaaaaa 10 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +alter table t2 force, algorithm=inplace; +select * from t2; +f1 f4 f5 f6 +1 aaaaaaaaaaaaaaaaaaaa 10 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `f1` int(11) DEFAULT NULL, + `f4` varchar(100) DEFAULT repeat('a',20), + `f5` int(11) DEFAULT 10, + `f6` char(100) DEFAULT repeat('a',99) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +select * from t3; +f1 f3 f4 +1 1 4 +alter table t3 add column f5 char(100) default repeat('a', 99), algorithm=instant; +select * from t3; +f1 f3 f4 f5 +1 1 4 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +drop table t1,t2,t3; diff --git a/mysql-test/suite/innodb/r/log_corruption.result b/mysql-test/suite/innodb/r/log_corruption.result index 6bc10c970fc..b174546c111 100644 --- a/mysql-test/suite/innodb/r/log_corruption.result +++ b/mysql-test/suite/innodb/r/log_corruption.result @@ -125,7 +125,7 @@ WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); COUNT(*) 1 -FOUND 2 /InnoDB: Upgrading redo log:/ in mysqld.1.err +FOUND 3 /InnoDB: Upgrading redo log:/ in mysqld.1.err # Minimal MariaDB 10.1.21 encrypted redo log SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' diff --git a/mysql-test/suite/innodb/r/log_file_size.result b/mysql-test/suite/innodb/r/log_file_size.result index e049b34ad81..89d5c6ac4d6 100644 --- a/mysql-test/suite/innodb/r/log_file_size.result +++ b/mysql-test/suite/innodb/r/log_file_size.result @@ -3,7 +3,7 @@ SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS -FOUND 1 /InnoDB: Log file .*ib_logfile0 size 0 is too small/ in mysqld.1.err +FOUND 1 /InnoDB: Log file .*ib_logfile1 is of different size .* bytes than other log files 0 bytes!/ in mysqld.1.err CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK diff --git a/mysql-test/suite/innodb/r/row_format_redundant.result b/mysql-test/suite/innodb/r/row_format_redundant.result index 63172897927..8852bfd8e6a 100644 --- a/mysql-test/suite/innodb/r/row_format_redundant.result +++ b/mysql-test/suite/innodb/r/row_format_redundant.result @@ -72,7 +72,7 @@ DROP TABLE t1; Warnings: Warning 1932 Table 'test.t1' doesn't exist in engine DROP TABLE t2,t3; -FOUND 49 /\[ERROR\] InnoDB: Table `test`\.`t1` in InnoDB data dictionary contains invalid flags\. SYS_TABLES\.TYPE=1 SYS_TABLES\.MIX_LEN=511\b/ in mysqld.1.err +FOUND 50 /\[ERROR\] InnoDB: Table `test`\.`t1` in InnoDB data dictionary contains invalid flags\. SYS_TABLES\.TYPE=1 SYS_TABLES\.MIX_LEN=511\b/ in mysqld.1.err ib_buffer_pool ib_logfile0 ib_logfile1 diff --git a/mysql-test/suite/innodb/r/system_tables.result b/mysql-test/suite/innodb/r/system_tables.result index 79a24f7e455..8789b4f5aff 100644 --- a/mysql-test/suite/innodb/r/system_tables.result +++ b/mysql-test/suite/innodb/r/system_tables.result @@ -5,4 +5,4 @@ select convert_tz(starttime,'UTC','Europe/Moscow') starttime from envois3; starttime 2008-08-12 02:43:00 drop table envois3; -alter table mysql.time_zone_name engine=MyISAM; +alter table mysql.time_zone_name engine=Aria; diff --git a/mysql-test/suite/innodb/r/table_flags,32k,debug.rdiff b/mysql-test/suite/innodb/r/table_flags,32k,debug.rdiff new file mode 100644 index 00000000000..7e851cf5634 --- /dev/null +++ b/mysql-test/suite/innodb/r/table_flags,32k,debug.rdiff @@ -0,0 +1,132 @@ +--- suite/innodb/r/table_flags.result ++++ suite/innodb/r/table_flags,32k,debug.reject +@@ -5,96 +5,98 @@ + SET innodb_strict_mode=OFF; + CREATE TABLE tz(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=COMPRESSED + KEY_BLOCK_SIZE=1; ++Warnings: ++Warning 1478 InnoDB: Cannot create a COMPRESSED table when innodb_page_size > 16k. Assuming ROW_FORMAT=DYNAMIC. + SET innodb_strict_mode=ON; + CREATE TABLE tp(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=DYNAMIC + PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=9; + SYS_TABLES clustered index root page (8): + N_RECS=10; LEVEL=0; INDEX_ID=0x0000000000000001 +-header=0x01000003016e (NAME=0x696e66696d756d00) +-header=0x00002815008d (NAME='SYS_DATAFILES', ++header=0x0100000301bf (NAME=0x696e66696d756d00) ++header=0x0000301500de (NAME='SYS_DATAFILES', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x000000000000000e, ++ ID=0x000000000000000f, + N_COLS=0x00000002, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x0000101500d5 (NAME='SYS_FOREIGN', ++header=0x000018150126 (NAME='SYS_FOREIGN', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x000000000000000b, ++ ID=0x000000000000000c, + N_COLS=0x00000004, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x000018150122 (NAME='SYS_FOREIGN_COLS', ++header=0x000020150173 (NAME='SYS_FOREIGN_COLS', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x000000000000000c, ++ ID=0x000000000000000d, + N_COLS=0x00000004, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x0400201501b8 (NAME='SYS_TABLESPACES', ++header=0x040028150209 (NAME='SYS_TABLESPACES', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x000000000000000d, ++ ID=0x000000000000000e, + N_COLS=0x00000003, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x000030150244 (NAME='SYS_VIRTUAL', ++header=0x000038150251 (NAME='SYS_VIRTUAL', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x000000000000000f, ++ ID=0x0000000000000010, + N_COLS=0x00000003, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x000040150288 (NAME='test/tc', ++header=0x000040150295 (NAME='test/tc', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x0000000000000011, ++ ID=0x0000000000000012, + N_COLS=0x80000001, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000002) +-header=0x000048150310 (NAME='test/td', ++header=0x00004815031d (NAME='test/td', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x0000000000000012, ++ ID=0x0000000000000013, + N_COLS=0x80000001, + TYPE=0x00000021, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000003) +-header=0x000058150200 (NAME='test/tp', ++header=0x00005815008d (NAME='test/tp', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x0000000000000014, ++ ID=0x0000000000000015, + N_COLS=0x80000001, + TYPE=0x000009a1, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000005) +-header=0x0000381502cc (NAME='test/tr', ++header=0x0000101502d9 (NAME='test/tr', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x0000000000000010, ++ ID=0x0000000000000011, + N_COLS=0x00000001, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, +@@ -104,9 +106,9 @@ + header=0x000050150074 (NAME='test/tz', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x0000000000000013, ++ ID=0x0000000000000014, + N_COLS=0x80000001, +- TYPE=0x00000023, ++ TYPE=0x00000021, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), diff --git a/mysql-test/suite/innodb/r/table_flags,32k.rdiff b/mysql-test/suite/innodb/r/table_flags,32k,release.rdiff index ce1ff623d50..ce1ff623d50 100644 --- a/mysql-test/suite/innodb/r/table_flags,32k.rdiff +++ b/mysql-test/suite/innodb/r/table_flags,32k,release.rdiff diff --git a/mysql-test/suite/innodb/r/table_flags,64k,debug.rdiff b/mysql-test/suite/innodb/r/table_flags,64k,debug.rdiff new file mode 100644 index 00000000000..da52f17fa68 --- /dev/null +++ b/mysql-test/suite/innodb/r/table_flags,64k,debug.rdiff @@ -0,0 +1,132 @@ +--- suite/innodb/r/table_flags.result ++++ suite/innodb/r/table_flags,64k,debug.reject +@@ -5,96 +5,98 @@ + SET innodb_strict_mode=OFF; + CREATE TABLE tz(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=COMPRESSED + KEY_BLOCK_SIZE=1; ++Warnings: ++Warning 1478 InnoDB: Cannot create a COMPRESSED table when innodb_page_size > 16k. Assuming ROW_FORMAT=DYNAMIC. + SET innodb_strict_mode=ON; + CREATE TABLE tp(a INT PRIMARY KEY)ENGINE=InnoDB ROW_FORMAT=DYNAMIC + PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=9; + SYS_TABLES clustered index root page (8): + N_RECS=10; LEVEL=0; INDEX_ID=0x0000000000000001 +-header=0x01000003016e (NAME=0x696e66696d756d00) +-header=0x00002815008d (NAME='SYS_DATAFILES', ++header=0x0100000301bf (NAME=0x696e66696d756d00) ++header=0x0000301500de (NAME='SYS_DATAFILES', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x000000000000000e, ++ ID=0x000000000000000f, + N_COLS=0x00000002, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x0000101500d5 (NAME='SYS_FOREIGN', ++header=0x000018150126 (NAME='SYS_FOREIGN', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x000000000000000b, ++ ID=0x000000000000000c, + N_COLS=0x00000004, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x000018150122 (NAME='SYS_FOREIGN_COLS', ++header=0x000020150173 (NAME='SYS_FOREIGN_COLS', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x000000000000000c, ++ ID=0x000000000000000d, + N_COLS=0x00000004, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x0400201501b8 (NAME='SYS_TABLESPACES', ++header=0x040028150209 (NAME='SYS_TABLESPACES', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x000000000000000d, ++ ID=0x000000000000000e, + N_COLS=0x00000003, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x000030150244 (NAME='SYS_VIRTUAL', ++header=0x000038150251 (NAME='SYS_VIRTUAL', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x000000000000000f, ++ ID=0x0000000000000010, + N_COLS=0x00000003, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x000040150288 (NAME='test/tc', ++header=0x000040150295 (NAME='test/tc', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x0000000000000011, ++ ID=0x0000000000000012, + N_COLS=0x80000001, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000002) +-header=0x000048150310 (NAME='test/td', ++header=0x00004815031d (NAME='test/td', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x0000000000000012, ++ ID=0x0000000000000013, + N_COLS=0x80000001, + TYPE=0x00000021, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000003) +-header=0x000058150200 (NAME='test/tp', ++header=0x00005815008d (NAME='test/tp', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x0000000000000014, ++ ID=0x0000000000000015, + N_COLS=0x80000001, + TYPE=0x000009a1, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000005) +-header=0x0000381502cc (NAME='test/tr', ++header=0x0000101502d9 (NAME='test/tr', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x0000000000000010, ++ ID=0x0000000000000011, + N_COLS=0x00000001, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, +@@ -104,9 +106,9 @@ + header=0x000050150074 (NAME='test/tz', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x0000000000000013, ++ ID=0x0000000000000014, + N_COLS=0x80000001, +- TYPE=0x00000023, ++ TYPE=0x00000021, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), diff --git a/mysql-test/suite/innodb/r/table_flags,64k.rdiff b/mysql-test/suite/innodb/r/table_flags,64k,release.rdiff index f2ba1280be3..f2ba1280be3 100644 --- a/mysql-test/suite/innodb/r/table_flags,64k.rdiff +++ b/mysql-test/suite/innodb/r/table_flags,64k,release.rdiff diff --git a/mysql-test/suite/innodb/r/table_flags,debug.rdiff b/mysql-test/suite/innodb/r/table_flags,debug.rdiff new file mode 100644 index 00000000000..16f748468dd --- /dev/null +++ b/mysql-test/suite/innodb/r/table_flags,debug.rdiff @@ -0,0 +1,122 @@ +--- suite/innodb/r/table_flags.result ++++ suite/innodb/r/table_flags,debug.reject +@@ -10,91 +10,91 @@ + PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=9; + SYS_TABLES clustered index root page (8): + N_RECS=10; LEVEL=0; INDEX_ID=0x0000000000000001 +-header=0x01000003016e (NAME=0x696e66696d756d00) +-header=0x00002815008d (NAME='SYS_DATAFILES', ++header=0x0100000301bf (NAME=0x696e66696d756d00) ++header=0x0000301500de (NAME='SYS_DATAFILES', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x000000000000000e, ++ ID=0x000000000000000f, + N_COLS=0x00000002, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x0000101500d5 (NAME='SYS_FOREIGN', ++header=0x000018150126 (NAME='SYS_FOREIGN', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x000000000000000b, ++ ID=0x000000000000000c, + N_COLS=0x00000004, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x000018150122 (NAME='SYS_FOREIGN_COLS', ++header=0x000020150173 (NAME='SYS_FOREIGN_COLS', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x000000000000000c, ++ ID=0x000000000000000d, + N_COLS=0x00000004, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x0400201501b8 (NAME='SYS_TABLESPACES', ++header=0x040028150209 (NAME='SYS_TABLESPACES', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x000000000000000d, ++ ID=0x000000000000000e, + N_COLS=0x00000003, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x000030150244 (NAME='SYS_VIRTUAL', ++header=0x000038150251 (NAME='SYS_VIRTUAL', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x000000000000000f, ++ ID=0x0000000000000010, + N_COLS=0x00000003, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000040, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000000) +-header=0x000040150288 (NAME='test/tc', ++header=0x000040150295 (NAME='test/tc', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x0000000000000011, ++ ID=0x0000000000000012, + N_COLS=0x80000001, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000002) +-header=0x000048150310 (NAME='test/td', ++header=0x00004815031d (NAME='test/td', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x0000000000000012, ++ ID=0x0000000000000013, + N_COLS=0x80000001, + TYPE=0x00000021, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000003) +-header=0x000058150200 (NAME='test/tp', ++header=0x00005815008d (NAME='test/tp', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x0000000000000014, ++ ID=0x0000000000000015, + N_COLS=0x80000001, + TYPE=0x000009a1, + MIX_ID=0x0000000000000000, + MIX_LEN=0x00000050, + CLUSTER_NAME=NULL(0 bytes), + SPACE=0x00000005) +-header=0x0000381502cc (NAME='test/tr', ++header=0x0000101502d9 (NAME='test/tr', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x0000000000000010, ++ ID=0x0000000000000011, + N_COLS=0x00000001, + TYPE=0x00000001, + MIX_ID=0x0000000000000000, +@@ -104,7 +104,7 @@ + header=0x000050150074 (NAME='test/tz', + DB_TRX_ID=0x000000000000, + DB_ROLL_PTR=0x80000000000000, +- ID=0x0000000000000013, ++ ID=0x0000000000000014, + N_COLS=0x80000001, + TYPE=0x00000023, + MIX_ID=0x0000000000000000, diff --git a/mysql-test/suite/innodb/r/temporary_table.result b/mysql-test/suite/innodb/r/temporary_table.result index 533d32089c3..94c2cfc63b1 100644 --- a/mysql-test/suite/innodb/r/temporary_table.result +++ b/mysql-test/suite/innodb/r/temporary_table.result @@ -650,6 +650,19 @@ SELECT * FROM t1; f1 0 DROP TABLE t1; +create procedure t1_proc() +begin +DECLARE var INT UNSIGNED; +CREATE TEMPORARY TABLE t1(f1 INT UNSIGNED, f2 INT UNSIGNED, KEY( f1, f2 ) )engine=innodb; +SET TRANSACTION ISOLATION LEVEL READ COMMITTED; +START TRANSACTION; +INSERT INTO t1 SET f1 = 1, f2 = 1; +UPDATE t1 SET f2 = 2; +SET var = ( SELECT 1 FROM t1 ); +DROP TABLE t1; +END// +call t1_proc; +drop procedure t1_proc; # # MDEV-15874 CREATE TABLE creates extra transaction # diff --git a/mysql-test/suite/innodb/r/truncate.result b/mysql-test/suite/innodb/r/truncate.result new file mode 100644 index 00000000000..3ade1e7f8de --- /dev/null +++ b/mysql-test/suite/innodb/r/truncate.result @@ -0,0 +1,8 @@ +CREATE TABLE t (a SERIAL) ENGINE=InnoDB; +connect dml,localhost,root; +select * from t; +a +connection default; +TRUNCATE TABLE t; +disconnect dml; +DROP TABLE t; diff --git a/mysql-test/suite/innodb/r/truncate_crash.result b/mysql-test/suite/innodb/r/truncate_crash.result new file mode 100644 index 00000000000..10ce8e92ab6 --- /dev/null +++ b/mysql-test/suite/innodb/r/truncate_crash.result @@ -0,0 +1,14 @@ +FLUSH TABLES; +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1),(2); +connect wait,localhost,root,,test; +SET DEBUG_SYNC='before_trx_state_committed_in_memory SIGNAL c WAIT_FOR ever'; +TRUNCATE TABLE t1; +connection default; +SET DEBUG_SYNC='now WAIT_FOR c'; +disconnect wait; +SELECT COUNT(*) FROM t1; +COUNT(*) +0 +TRUNCATE TABLE t1; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/r/truncate_debug.result b/mysql-test/suite/innodb/r/truncate_debug.result deleted file mode 100644 index 27410b9417a..00000000000 --- a/mysql-test/suite/innodb/r/truncate_debug.result +++ /dev/null @@ -1,88 +0,0 @@ -# -# Bug #23070734 CONCURRENT TRUNCATE TABLES CAUSE STALLS -# -SET @ahi= @@global.innodb_adaptive_hash_index; -SET GLOBAL innodb_adaptive_hash_index=OFF; -SET GLOBAL innodb_adaptive_hash_index=ON; -Test_1 :- Check if DDL operations are possible on -table being truncated. Also check if -DDL operations on other tables succeed. -create table t1 (f1 int,f2 int,key(f2),f3 int) engine=innodb row_format=redundant; -create index idx1 on t1(f3); -create table t2 (f1 int,f2 int,key(f2),f3 int) engine=innodb row_format=redundant; -create table t3 (f1 int,f2 int,key(f2)) engine=innodb row_format=redundant; -insert into t1 values (10,20,30),(30,40,50),(50,60,70); -insert into t1 select * from t1; -insert into t1 select * from t1; -insert into t1 select * from t1; -insert into t2 values (10,20,30),(30,40,50),(50,60,70); -insert into t2 select * from t2; -insert into t2 select * from t2; -insert into t2 select * from t2; -insert into t3 values (10,20),(30,40),(50,50); -insert into t3 select * from t3; -insert into t3 select * from t3; -SET session lock_wait_timeout = 1; -connect con1,localhost,root,,; -SET DEBUG_SYNC= 'buffer_pool_scan SIGNAL started WAIT_FOR finish_scan'; -truncate table t1; -connection default; -SET DEBUG_SYNC= 'now WAIT_FOR started'; -Check Analyze table. Gives lock time out error. -analyze table t1; -Table Op Msg_type Msg_text -test.t1 analyze Error Lock wait timeout exceeded; try restarting transaction -test.t1 analyze status Operation failed -Check if we can turn off auto recalculation. -alter table t1 STATS_AUTO_RECALC=0; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -Check if we can turn off persistent stats on the table -alter table t1 STATS_PERSISTENT=0; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -Check if DML is possible on table being truncated -insert into t1 values (10,89,99); -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -Check if DDL is possible on table being truncated -alter table t1 add column f4 int; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -check if table can be created with the same name -create table t1 (bd int) engine=innodb; -Got one of the listed errors -check if index can be created on table being truncated -create index idx1 on t1(f1); -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -Check if DROP of table is possible during truncate -drop table t1; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -Check if select is possible during truncate -select * from t1; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -select * from t2 where t2.f1=t1.f1; -ERROR 42S22: Unknown column 't1.f1' in 'where clause' -Check concurrent truncate operation on table; -truncate table t1; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -Check concurrent selects and inserts on the other table -insert into t3 values (10,20),(30,40),(50,50); -select * from t3 where f1=40; -f1 f2 -Concurrent truncate on other tables -truncate table t2; -Concurrent alters on the other tables -alter table t2 add column f4 int; -check if index can be created on the other table -create index idx1 on t2(f3); -Check if we can turn off persistent stats off entire instance -SET GLOBAL innodb_stats_persistent=off; -connect con2,localhost,root,,; -set global innodb_adaptive_hash_index=off; -connection default; -SET DEBUG_SYNC= 'now SIGNAL finish_scan'; -connection con1; -disconnect con1; -connection con2; -disconnect con2; -connection default; -SET DEBUG_SYNC= 'RESET'; -SET GLOBAL innodb_adaptive_hash_index=@ahi; -drop table t1,t2,t3; diff --git a/mysql-test/suite/innodb/r/truncate_foreign.result b/mysql-test/suite/innodb/r/truncate_foreign.result new file mode 100644 index 00000000000..bcf5b16aa83 --- /dev/null +++ b/mysql-test/suite/innodb/r/truncate_foreign.result @@ -0,0 +1,58 @@ +CREATE TABLE parent (a INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO parent SET a=1; +CREATE TABLE child (a INT PRIMARY KEY, FOREIGN KEY (a) REFERENCES parent(a) +ON UPDATE CASCADE) +ENGINE=InnoDB; +INSERT INTO child SET a=1; +TRUNCATE TABLE parent; +ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`a`) REFERENCES `test`.`parent` (`a`)) +TRUNCATE TABLE child; +INSERT INTO child SET a=1; +UPDATE parent SET a=2; +SELECT * FROM child; +a +2 +connect dml,localhost,root; +SET DEBUG_SYNC='foreign_constraint_update_cascade SIGNAL fk WAIT_FOR go'; +UPDATE parent SET a=3; +connection default; +SET DEBUG_SYNC='now WAIT_FOR fk'; +SET lock_wait_timeout=1; +TRUNCATE TABLE child; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SET DEBUG_SYNC='now SIGNAL go'; +connection dml; +SELECT * FROM child; +a +3 +SET DEBUG_SYNC='foreign_constraint_check_for_update SIGNAL fk WAIT_FOR go'; +DELETE FROM parent; +connection default; +SET DEBUG_SYNC='now WAIT_FOR fk'; +TRUNCATE TABLE child; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SET DEBUG_SYNC='now SIGNAL go'; +connection dml; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`a`) REFERENCES `parent` (`a`) ON UPDATE CASCADE) +SELECT * FROM child; +a +3 +INSERT INTO parent SET a=5; +SET DEBUG_SYNC='foreign_constraint_check_for_ins SIGNAL fk WAIT_FOR go'; +INSERT INTO child SET a=5; +connection default; +SET DEBUG_SYNC='now WAIT_FOR fk'; +SET foreign_key_checks=0; +TRUNCATE TABLE parent; +SET DEBUG_SYNC='now SIGNAL go'; +connection dml; +ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`a`) REFERENCES `parent` (`a`) ON UPDATE CASCADE) +SELECT * FROM parent; +a +SELECT * FROM child; +a +3 +disconnect dml; +connection default; +SET DEBUG_SYNC = RESET; +DROP TABLE child, parent; diff --git a/mysql-test/suite/innodb/r/truncate_inject.result b/mysql-test/suite/innodb/r/truncate_inject.result deleted file mode 100644 index 5ec532a0f83..00000000000 --- a/mysql-test/suite/innodb/r/truncate_inject.result +++ /dev/null @@ -1,114 +0,0 @@ -SET @save_dbug = @@SESSION.debug_dbug; -call mtr.add_suppression("InnoDB: Flagged corruption of .* in table `test`\\.`t` in TRUNCATE TABLE"); -# 1. Error in assigning undo logs for truncate action -CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), INDEX ck(c)) -ENGINE = InnoDB; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -check table t; -Table Op Msg_type Msg_text -test.t check status OK -SET debug_dbug = '+d,ib_err_trunc_assigning_undo_log'; -truncate table t; -ERROR HY000: Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB -SET debug_dbug = @save_dbug; -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -# 2. Error while preparing for truncate -SET debug_dbug = '+d,ib_err_trunc_preparing_for_truncate'; -truncate table t; -ERROR HY000: Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB -SET debug_dbug = @save_dbug; -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -# 3. Error while dropping/creating indexes -SET debug_dbug = '+d,ib_err_trunc_drop_index'; -truncate table t; -ERROR HY000: Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB -SET debug_dbug = @save_dbug; -check table t; -Table Op Msg_type Msg_text -test.t check Warning InnoDB: Index PRIMARY is marked as corrupted -test.t check error Corrupt -select * from t; -Got one of the listed errors -drop table t; -CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), INDEX ck(c)) -ENGINE = InnoDB; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -check table t; -Table Op Msg_type Msg_text -test.t check status OK -SET debug_dbug = '+d,ib_err_trunc_create_index'; -truncate table t; -ERROR HY000: Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB -SET debug_dbug = @save_dbug; -check table t; -Table Op Msg_type Msg_text -test.t check Warning InnoDB: Index PRIMARY is marked as corrupted -test.t check error Corrupt -select * from t; -Got one of the listed errors -drop table t; -CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), INDEX ck(c)) -ENGINE = InnoDB; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -check table t; -Table Op Msg_type Msg_text -test.t check status OK -SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index'; -truncate table t; -SET debug_dbug = @save_dbug; -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -drop table t; -# 4. Error while completing truncate of table involving FTS -CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), -FULLTEXT INDEX(c)) ENGINE = InnoDB; -insert into t values (1, 1.1, 'mysql is now oracle company'), -(2, 2.2, 'innodb is part of mysql'), -(3, 3.3, 'innodb is default storage engine of mysql'); -check table t; -Table Op Msg_type Msg_text -test.t check status OK -SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index'; -truncate table t; -SET debug_dbug = @save_dbug; -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -drop table t; -# 5. Error while updating sys-tables -CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), -FULLTEXT INDEX(c)) ENGINE = InnoDB; -insert into t values (1, 1.1, 'mysql is now oracle company'), -(2, 2.2, 'innodb is part of mysql'), -(3, 3.3, 'innodb is default storage engine of mysql'); -check table t; -Table Op Msg_type Msg_text -test.t check status OK -SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index'; -truncate table t; -SET debug_dbug = @save_dbug; -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t order by i; -i f c -drop table t; diff --git a/mysql-test/suite/innodb/r/truncate_missing.result b/mysql-test/suite/innodb/r/truncate_missing.result new file mode 100644 index 00000000000..263880eccd2 --- /dev/null +++ b/mysql-test/suite/innodb/r/truncate_missing.result @@ -0,0 +1,17 @@ +call mtr.add_suppression("InnoDB: Operating system error number "); +call mtr.add_suppression("InnoDB: (The error means|If you are|Cannot open datafile) "); +call mtr.add_suppression("InnoDB: Ignoring tablespace for `test`\.`t`"); +call mtr.add_suppression("InnoDB: Table test/t .* does not exist"); +CREATE TABLE t (a SERIAL) ENGINE=InnoDB; +INSERT INTO t() VALUES(); +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `a` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + UNIQUE KEY `a` (`a`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 +SELECT * FROM t; +ERROR 42S02: Table 'test.t' doesn't exist in engine +TRUNCATE TABLE t; +ERROR 42S02: Table 'test.t' doesn't exist in engine +DROP TABLE t; diff --git a/mysql-test/suite/innodb/r/truncate_purge_debug.result b/mysql-test/suite/innodb/r/truncate_purge_debug.result deleted file mode 100644 index 164987083d5..00000000000 --- a/mysql-test/suite/innodb/r/truncate_purge_debug.result +++ /dev/null @@ -1,29 +0,0 @@ -# -# Bug #23070734 CONCURRENT TRUNCATE TABLES CAUSE STALLS -# -create table t1 (f1 int ,f2 int,key(f2)) engine=innodb; -begin; -insert into t1 values (10,45),(20,78),(30,88),(40,23),(50,78),(60,11),(70,56),(80,90); -delete from t1; -connect con2,localhost,root,,; -START TRANSACTION WITH CONSISTENT SNAPSHOT; -connection default; -SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency; -SET GLOBAL innodb_purge_rseg_truncate_frequency = 1; -commit; -connect con1,localhost,root,,; -SET DEBUG_SYNC= 'buffer_pool_scan SIGNAL started WAIT_FOR finish_scan'; -truncate table t1; -connection con2; -SET DEBUG_SYNC= 'now WAIT_FOR started'; -COMMIT; -disconnect con2; -connection default; -InnoDB 0 transactions not purged -SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency; -SET DEBUG_SYNC = 'now SIGNAL finish_scan'; -connection con1; -disconnect con1; -connection default; -SET DEBUG_SYNC = 'RESET'; -drop table t1; diff --git a/mysql-test/suite/innodb/r/truncate_restart.result b/mysql-test/suite/innodb/r/truncate_restart.result deleted file mode 100644 index b6d14124371..00000000000 --- a/mysql-test/suite/innodb/r/truncate_restart.result +++ /dev/null @@ -1,12 +0,0 @@ -SET GLOBAL innodb_stats_persistent= ON; -CREATE TABLE t1 (t TEXT) ENGINE=InnoDB STATS_PERSISTENT=1; -connect con1,localhost,root,,test; -SET DEBUG_SYNC='ib_trunc_table_trunc_completing SIGNAL committed WAIT_FOR ever'; -TRUNCATE TABLE t1; -connection default; -SET DEBUG_SYNC='now WAIT_FOR committed'; -disconnect con1; -SELECT COUNT(*) FROM t1; -COUNT(*) -0 -DROP TABLE t1; diff --git a/mysql-test/suite/innodb_undo/r/truncate_multi_client.result b/mysql-test/suite/innodb/r/undo_truncate.result index c1ce2845996..dce91a7461e 100644 --- a/mysql-test/suite/innodb_undo/r/truncate_multi_client.result +++ b/mysql-test/suite/innodb/r/undo_truncate.result @@ -1,4 +1,12 @@ -SET GLOBAL innodb_fast_shutdown=0; +SET @save_undo_logs = @@GLOBAL.innodb_undo_logs; +SET @save_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency; +SET @save_truncate = @@GLOBAL.innodb_undo_log_truncate; +SET GLOBAL innodb_undo_log_truncate = 0; +SET GLOBAL innodb_undo_logs = 4; +SET GLOBAL innodb_purge_rseg_truncate_frequency = 1; +SET @trunc_start= +(SELECT variable_value FROM information_schema.global_status +WHERE variable_name = 'innodb_undo_truncations'); create table t1(keyc int primary key, c char(100)) engine = innodb; create table t2(keyc int primary key, c char(100)) engine = innodb; CREATE PROCEDURE populate_t1() @@ -36,6 +44,7 @@ delete from t1; connection con2; delete from t2; connection con1; +SET GLOBAL innodb_undo_log_truncate = 1; commit; disconnect con1; connection con2; @@ -45,7 +54,7 @@ connection default; drop table t1, t2; drop PROCEDURE populate_t1; drop PROCEDURE populate_t2; -SET GLOBAL innodb_fast_shutdown=0; -SET GLOBAL innodb_undo_log_truncate=1; -SET GLOBAL innodb_purge_rseg_truncate_frequency=1; -FOUND 1 /Truncating UNDO tablespace 1/ in mysqld.1.err +InnoDB 0 transactions not purged +SET GLOBAL innodb_undo_logs = @save_undo_logs; +SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency; +SET GLOBAL innodb_undo_log_truncate = @save_truncate; diff --git a/mysql-test/suite/innodb/r/undo_truncate_recover.result b/mysql-test/suite/innodb/r/undo_truncate_recover.result new file mode 100644 index 00000000000..2619f384847 --- /dev/null +++ b/mysql-test/suite/innodb/r/undo_truncate_recover.result @@ -0,0 +1,15 @@ +SET GLOBAL innodb_undo_logs = 4; +SET GLOBAL innodb_undo_log_truncate = 1; +SET GLOBAL innodb_purge_rseg_truncate_frequency = 1; +create table t1(keyc int primary key, c char(100)) engine = innodb; +begin; +commit; +begin; +update t1 set c = 'MariaDB'; +update t1 set c = 'InnoDB'; +set global debug_dbug = '+d,ib_undo_trunc'; +commit; +call mtr.add_suppression("InnoDB: The redo log transaction size "); +SET GLOBAL innodb_fast_shutdown=0; +FOUND 1 /ib_undo_trunc/ in mysqld.1.err +drop table t1; diff --git a/mysql-test/suite/innodb/t/alter_algorithm.test b/mysql-test/suite/innodb/t/alter_algorithm.test index 5a720489281..7cb706e865a 100644 --- a/mysql-test/suite/innodb/t/alter_algorithm.test +++ b/mysql-test/suite/innodb/t/alter_algorithm.test @@ -3,14 +3,64 @@ let $algorithm = `SELECT @@ALTER_ALGORITHM`; let $error_code = 0; if ($algorithm == "NOCOPY") { - let $error_code = ER_ALTER_OPERATION_NOT_SUPPORTED; + let $error_code = ER_ALTER_OPERATION_NOT_SUPPORTED, ER_ALTER_OPERATION_NOT_SUPPORTED_REASON; } if ($algorithm == "INSTANT") { let $error_code = ER_ALTER_OPERATION_NOT_SUPPORTED, ER_ALTER_OPERATION_NOT_SUPPORTED_REASON; } ---source include/alter_nocopy_fail.inc +CREATE TABLE t1(f1 INT NOT NULL, + f2 INT NOT NULL, + f3 INT NULL, + f4 INT as (f2) STORED, + f5 INT as (f3) STORED, + PRIMARY KEY(f1))ROW_FORMAT=COMPRESSED, ENGINE=INNODB; +INSERT INTO t1(f1, f2, f3) VALUES(1, 1, 1); + +SELECT @@alter_algorithm; + +--enable_info +--echo # All the following cases needs table rebuild + +--echo # Add and Drop primary key +--error $error_code +ALTER TABLE t1 ADD COLUMN col1 INT NOT NULL,DROP PRIMARY KEY,ADD PRIMARY KEY(col1); + +--echo # Make existing column NULLABLE +--error $error_code +ALTER TABLE t1 MODIFY f2 INT; + +--echo # Make existing column NON-NULLABLE +--error $error_code +ALTER TABLE t1 MODIFY f3 INT NOT NULL; + +--echo # Drop Stored Column +--error $error_code +ALTER TABLE t1 DROP COLUMN f5; + +--echo # Add base non-generated column as a last column in the compressed table +--error $error_code +ALTER TABLE t1 ADD COLUMN f6 INT NOT NULL; + +--echo # Add base non-generated column but not in the last position +--error $error_code +ALTER TABLE t1 ADD COLUMN f7 INT NOT NULL after f3; + +--echo # Force the table to rebuild +--error $error_code +ALTER TABLE t1 FORCE; + +--echo # Row format changes +--error $error_code +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; + +--echo # Engine table +--error $error_code +ALTER TABLE t1 ENGINE=INNODB; + +DROP TABLE t1; +--disable_info if ($algorithm == "NOCOPY") { let $error_code = 0; @@ -19,4 +69,77 @@ if ($algorithm == "NOCOPY") { if ($algorithm == "INSTANT") { let $error_code = ER_ALTER_OPERATION_NOT_SUPPORTED_REASON; } ---source include/alter_nocopy.inc + +CREATE TABLE t1(f1 INT PRIMARY KEY, f2 INT NOT NULL, + f3 INT AS (f2 * f2) VIRTUAL, + f4 INT NOT NULL UNIQUE, + f5 INT NOT NULL, + INDEX idx(f2))ENGINE=INNODB; + +CREATE TABLE t2(f1 INT NOT NULL, f2 INT NOT NULL, + INDEX(f1), + FOREIGN KEY fidx(f1) REFERENCES t1(f1))ENGINE=INNODB; + +INSERT INTO t1(f1, f2, f4, f5) VALUES(1, 2, 3, 4); + +--enable_info +--error $error_code +ALTER TABLE t1 ADD INDEX idx1(f4), page_compressed=1; + +--error $error_code +ALTER TABLE t1 DROP INDEX idx, page_compression_level=5; + +--error $error_code +ALTER TABLE t1 ADD UNIQUE INDEX u1(f2); + +--error $error_code +ALTER TABLE t1 DROP INDEX f4, page_compression_level=9; + +SET foreign_key_checks = 0; +--error $error_code +ALTER TABLE t1 ADD FOREIGN KEY(f5) REFERENCES t2(f1); + +DROP TABLE t2, t1; +--disable_info + +CREATE TABLE t1(f1 INT NOT NULL, + f2 INT NOT NULL, + f3 INT AS (f2 * f2) VIRTUAL, + INDEX idx (f2))engine=innodb; + +CREATE TABLE t2(f1 INT NOT NULL, f2 INT NOT NULL, + f3 VARCHAR(10), + INDEX(f1))ENGINE=INNODB; + +INSERT INTO t1(f1, f2) VALUES(1, 1); + +--enable_info +--echo # Add column at the end of the table +ALTER TABLE t1 ADD COLUMN f4 char(100) default 'BIG WALL'; + +--echo # Change virtual column expression +ALTER TABLE t1 CHANGE f3 f3 INT AS (f2 * f2) VIRTUAL; + +--echo # Add virtual column +ALTER TABLE t1 ADD COLUMN f5 INT AS (f2) VIRTUAL; + +--echo # Rename Column +ALTER TABLE t1 CHANGE f3 vcol INT AS (f2) VIRTUAL; + +--echo # Rename table +ALTER TABLE t1 RENAME t3; + +--echo # Drop Virtual Column +ALTER TABLE t3 DROP COLUMN vcol; + +--echo # Column length varies +ALTER TABLE t2 CHANGE f3 f3 VARCHAR(20); + +SET foreign_key_checks = 0; +ALTER TABLE t3 ADD FOREIGN KEY fidx(f2) REFERENCES t2(f1); + +SET foreign_key_checks = 1; +ALTER TABLE t3 DROP FOREIGN KEY fidx; + +DROP TABLE t3, t2; +--disable_info diff --git a/mysql-test/suite/innodb/t/alter_inplace_perfschema.opt b/mysql-test/suite/innodb/t/alter_inplace_perfschema.opt new file mode 100644 index 00000000000..f56125521fc --- /dev/null +++ b/mysql-test/suite/innodb/t/alter_inplace_perfschema.opt @@ -0,0 +1,2 @@ +--innodb-sort-buffer-size=64k +--tmpdir=$MYSQLTEST_VARDIR/tmp diff --git a/mysql-test/suite/innodb/t/alter_inplace_perfschema.test b/mysql-test/suite/innodb/t/alter_inplace_perfschema.test new file mode 100644 index 00000000000..b832596647f --- /dev/null +++ b/mysql-test/suite/innodb/t/alter_inplace_perfschema.test @@ -0,0 +1,40 @@ +--source include/have_innodb.inc +--source include/have_perfschema.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc +--source include/not_embedded.inc + +connect (ddl, localhost, root,,); +update performance_schema.setup_instruments set enabled='yes'; +update performance_schema.setup_consumers set enabled='yes'; +CREATE TABLE t1 (a serial, b varchar(255)) ENGINE=InnoDB; + +BEGIN; +let $n=247; +--disable_query_log +while ($n) { +dec $n; +INSERT INTO t1 SELECT NULL, REPEAT('b',255); +} +--enable_query_log +COMMIT; + +SET DEBUG_SYNC = 'row_log_apply_before SIGNAL go WAIT_FOR gone'; +send ALTER TABLE t1 ADD INDEX(b), ALGORITHM=INPLACE; + +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR go'; +--replace_regex /.*[\\\/]tmp/tmp/ +SELECT DISTINCT object_name FROM performance_schema.events_waits_history_long +WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%'; + +#--exec lsof -p `pidof mysqld` +SET DEBUG_SYNC = 'now SIGNAL gone'; + +connection ddl; +reap; +disconnect ddl; + +connection default; +SET DEBUG_SYNC = 'RESET'; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/alter_instant.test b/mysql-test/suite/innodb/t/alter_instant.test deleted file mode 100644 index dddb7b8ce27..00000000000 --- a/mysql-test/suite/innodb/t/alter_instant.test +++ /dev/null @@ -1,45 +0,0 @@ ---source alter_algorithm.inc - -CREATE TABLE t1(f1 INT NOT NULL, - f2 INT NOT NULL, - f3 INT AS (f2 * f2) VIRTUAL, - INDEX idx (f2))engine=innodb; - -CREATE TABLE t2(f1 INT NOT NULL, f2 INT NOT NULL, - f3 VARCHAR(10), - INDEX(f1))ENGINE=INNODB; - -INSERT INTO t1(f1, f2) VALUES(1, 1); - -select @@alter_algorithm; - ---enable_info ---echo # Add column at the end of the table ---eval ALTER TABLE t1 ADD COLUMN f4 char(100) default "BIG WALL" - ---echo # Change virtual column expression ---eval ALTER TABLE t1 CHANGE f3 f3 INT AS (f2 * f2) VIRTUAL - ---echo # Add virtual column ---eval ALTER TABLE t1 ADD COLUMN f5 INT AS (f2) VIRTUAL - ---echo # Rename Column ---eval ALTER TABLE t1 CHANGE f3 vcol INT AS (f2) VIRTUAL - ---echo # Rename table ---eval ALTER TABLE t1 RENAME t3 - ---echo # Drop Virtual Column ---eval ALTER TABLE t3 DROP COLUMN vcol - ---echo # Column length varies ---eval ALTER TABLE t2 CHANGE f3 f3 VARCHAR(20) - -SET foreign_key_checks = 0; ---eval ALTER TABLE t3 ADD FOREIGN KEY `fidx`(f2) REFERENCES t2(f1) - -SET foreign_key_checks = 1; ---eval ALTER TABLE t3 DROP FOREIGN KEY `fidx` - -DROP TABLE t3, t2; ---disable_info diff --git a/mysql-test/suite/innodb/t/alter_kill.test b/mysql-test/suite/innodb/t/alter_kill.test index 922378d2919..8de9781c972 100644 --- a/mysql-test/suite/innodb/t/alter_kill.test +++ b/mysql-test/suite/innodb/t/alter_kill.test @@ -27,12 +27,14 @@ call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE faile -- echo # SET GLOBAL innodb_file_per_table=1; +SET GLOBAL innodb_purge_rseg_truncate_frequency=1; CREATE TABLE bug16720368_1 (a INT PRIMARY KEY) ENGINE=InnoDB; connect (con1,localhost,root); CREATE TABLE bug16720368 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; INSERT INTO bug16720368 (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8); +--source include/wait_all_purged.inc connection default; @@ -127,13 +129,14 @@ INSERT INTO t1 VALUES(42); CREATE TABLE bug16735660 (a INT PRIMARY KEY) ENGINE=InnoDB; XA START 'x'; +--source ../include/no_checkpoint_start.inc INSERT INTO bug16735660 VALUES(1),(2),(3); XA END 'x'; XA PREPARE 'x'; +--connection default +--let CLEANUP_IF_CHECKPOINT=XA ROLLBACK 'x';DROP TABLE bug16735660; +--source ../include/no_checkpoint_end.inc --- connection default - --- source include/kill_mysqld.inc -- disconnect con1 -- move_file $MYSQLD_DATADIR/test/bug16735660.ibd $MYSQLD_DATADIR/bug16735660.omg diff --git a/mysql-test/suite/innodb/t/alter_not_null.test b/mysql-test/suite/innodb/t/alter_not_null.test index 839d7f18a5e..646838593e2 100644 --- a/mysql-test/suite/innodb/t/alter_not_null.test +++ b/mysql-test/suite/innodb/t/alter_not_null.test @@ -1,3 +1,4 @@ +--source include/have_innodb.inc --source alter_sql_mode.inc let $sql_mode = `SELECT @@SQL_MODE`; @@ -7,4 +8,95 @@ if ($sql_mode == "STRICT_TRANS_TABLES") { let $error_code = WARN_DATA_TRUNCATED; } ---source include/alter_not_null.inc +CREATE TABLE t1(f1 INT)ENGINE=INNODB; +INSERT INTO t1 VALUES(NULL); +SELECT * FROM t1; +--enable_info +--error $error_code +ALTER TABLE t1 CHANGE f1 f1 INT NOT NULL; +--disable_info +SELECT * FROM t1; +DROP TABLE t1; + +CREATE TABLE t1(f1 CHAR(10))ENGINE=INNODB; +INSERT INTO t1 VALUES(NULL); +SELECT * FROM t1; +--enable_info +--error $error_code +ALTER TABLE t1 CHANGE f1 f1 CHAR(10) NOT NULL; +--disable_info +SELECT * FROM t1; +DROP TABLE t1; + +CREATE TABLE t1(f1 VARCHAR(10))ENGINE=INNODB; +INSERT INTO t1 VALUES(NULL); +SELECT * FROM t1; +--enable_info +--error $error_code +ALTER TABLE t1 CHANGE f1 f1 VARCHAR(20) NOT NULL; +--disable_info +SELECT * FROM t1; +DROP TABLE t1; + +CREATE TABLE t1(f1 TEXT)ENGINE=INNODB; +INSERT INTO t1 VALUES(NULL); +SELECT * FROM t1; +--enable_info +--error $error_code +ALTER TABLE t1 CHANGE f1 f1 TEXT NOT NULL DEFAULT 'abc'; +--disable_info +SELECT * FROM t1; +DROP TABLE t1; + +CREATE TABLE t1(f1 INT NOT NULL, f2 INT NOT NULL, f3 INT)ENGINE=INNODB; +INSERT INTO t1 VALUES(2, 2, NULL); +SELECT * FROM t1; +--enable_info +--error $error_code +ALTER TABLE t1 CHANGE f3 f3 INT NOT NULL DEFAULT (f1 + f2); +--disable_info +SELECT * FROM t1; +DROP TABLE t1; + +CREATE TABLE t1(f1 INT NOT NULL DEFAULT 0, b TINYINT)ENGINE=InnoDB; +INSERT INTO t1 VALUES(10, NULL); +SELECT * FROM t1; +--enable_info +--error $error_code +ALTER TABLE t1 CHANGE b b TINYINT NOT NULL DEFAULT if(unix_timestamp()>1,1000,0); +--disable_info +SELECT * FROM t1; +DROP TABLE t1; + +CREATE TABLE t1(a INT, v INT AS (a), c INT, d INT NOT NULL, e INT) ENGINE=InnoDB; +--enable_info +ALTER TABLE t1 DROP COLUMN c, CHANGE COLUMN e e INT NOT NULL; +--disable_info +DROP TABLE t1; + +CREATE TABLE t1 (a INT, v INT AS (a), d INT NOT NULL, e INT) ENGINE=InnoDB; +--enable_info +ALTER TABLE t1 FORCE; +--disable_info +DROP TABLE t1; + +# Alter ignore should work irrespective of sql mode + +CREATE TABLE t1(c1 INT NOT NULL, c2 INT, PRIMARY KEY(c1))ENGINE=INNODB; +INSERT INTO t1 VALUES(1, NULL); +--enable_info +ALTER IGNORE TABLE t1 CHANGE c2 c2 INT NOT NULL DEFAULT 2; +--disable_info +SELECT * FROM t1; +DROP TABLE t1; + +--echo # +--echo # MDEV-16126 Crash or ASAN heap-buffer-overflow in +--echo # mach_read_from_n_little_endian upon ALTER TABLE with blob +--echo # + +CREATE TABLE t1(a INT, v INT AS (a), b INT, c BLOB) ENGINE=InnoDB; +--enable_info +ALTER TABLE t1 ADD PRIMARY KEY(b); +--disable_info +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/alter_table.test b/mysql-test/suite/innodb/t/alter_table.test index 474035436e5..1a43016a38e 100644 --- a/mysql-test/suite/innodb/t/alter_table.test +++ b/mysql-test/suite/innodb/t/alter_table.test @@ -22,3 +22,15 @@ create table t1 ( alter table t1 change column id2 id4 varchar(100) not null; select * from t1 where id4 like 'a'; drop table t1; + +# +# Check that innodb supports transactional=1 +# + +create table t1 (a int) transactional=1 engine=aria; +create table t2 (a int) transactional=1 engine=innodb; +show create table t1; +show create table t2; +alter table t1 engine=innodb; +alter table t1 add column b int; +drop table t1,t2; diff --git a/mysql-test/suite/innodb/t/auto_increment_dup.test b/mysql-test/suite/innodb/t/auto_increment_dup.test index 45e4559a038..aa399e5966d 100644 --- a/mysql-test/suite/innodb/t/auto_increment_dup.test +++ b/mysql-test/suite/innodb/t/auto_increment_dup.test @@ -4,11 +4,11 @@ ########################################################################## --source include/have_innodb.inc +--source include/have_debug.inc --source include/have_debug_sync.inc +--source include/innodb_binlog.inc ---disable_warnings -drop table if exists t1; ---enable_warnings +let $stmt= `SELECT @@GLOBAL.log_bin`; set global transaction isolation level repeatable read; @@ -69,29 +69,28 @@ CREATE TABLE t1( k INT, c CHAR(1), UNIQUE KEY(k)) ENGINE=InnoDB; - + --echo # --echo # Parallel execution --echo # ---connect(con1, localhost, root) --connect(con2, localhost, root) - --send SET DEBUG_SYNC='now WAIT_FOR write_row_done' ---connection con1 ---echo # ---echo # Connection 1 ---echo # + +--connect(con1, localhost, root) SET DEBUG_SYNC='ha_write_row_end SIGNAL write_row_done WAIT_FOR continue'; --send INSERT INTO t1(k) VALUES (1), (2), (3) ON DUPLICATE KEY UPDATE c='1' --connection con2 ---echo # ---echo # Connection 2 ---echo # --reap + SET DEBUG_SYNC='execute_command_after_close_tables SIGNAL continue'; +if ($stmt) { --error ER_LOCK_WAIT_TIMEOUT INSERT INTO t1(k) VALUES (2), (4), (5) ON DUPLICATE KEY UPDATE c='2'; +} +if (!$stmt) { +INSERT INTO t1(k) VALUES (2), (4), (5) ON DUPLICATE KEY UPDATE c='2'; +} --connection con1 --echo # @@ -138,23 +137,14 @@ CREATE TABLE t1( --enable_info --connect(con1, localhost, root) ---connect(con2, localhost, root) - ---connection con1 - ---echo # ---echo # Connection 1 ---echo # SET DEBUG_SYNC='ha_write_row_end SIGNAL continue2 WAIT_FOR continue1'; --send INSERT INTO t1(k) VALUES (1), (2), (3) ON DUPLICATE KEY UPDATE c='1' ---connection con2 ---echo # ---echo # Connection 2 ---echo # +--connect(con2, localhost, root) SET DEBUG_SYNC='ha_write_row_start WAIT_FOR continue2'; SET DEBUG_SYNC='after_mysql_insert SIGNAL continue1'; INSERT INTO t1(k) VALUES (2), (4), (5) ON DUPLICATE KEY UPDATE c='2'; +--disconnect con2 --connection con1 --reap @@ -167,11 +157,9 @@ SET DEBUG_SYNC='RESET'; SELECT * FROM t1 ORDER BY k; --disconnect con1 ---disconnect con2 --connection default DROP TABLE t1; set global transaction isolation level repeatable read; - diff --git a/mysql-test/suite/innodb/t/foreign-keys.test b/mysql-test/suite/innodb/t/foreign-keys.test index e77e1e761c7..35da5a5d075 100644 --- a/mysql-test/suite/innodb/t/foreign-keys.test +++ b/mysql-test/suite/innodb/t/foreign-keys.test @@ -1,5 +1,8 @@ --source include/have_innodb.inc --source include/have_debug.inc +--source include/have_debug_sync.inc + +--enable_connect_log --echo # --echo # Bug #19471516 SERVER CRASHES WHEN EXECUTING ALTER TABLE @@ -70,3 +73,87 @@ connection default; select * from t2; drop table t2, t1; drop user foo; + +# +# MDEV-16465 Invalid (old?) table or database name or hang in ha_innobase::delete_table and log semaphore wait upon concurrent DDL with foreign keys +# +create table t1 (f1 int primary key) engine=innodb; +create table t2 (f2 int primary key) engine=innodb; +create table t3 (f3 int primary key, foreign key (f3) references t2(f2)) engine=innodb; +insert into t1 values (1),(2),(3),(4),(5); +insert into t2 values (1),(2),(3),(4),(5); +insert into t3 values (1),(2),(3),(4),(5); +connect con1,localhost,root; +set debug_sync='alter_table_before_rename_result_table signal g1 wait_for g2'; +send alter table t2 add constraint foreign key (f2) references t1(f1) on delete cascade on update cascade; +connection default; +let $conn=`select connection_id()`; +set debug_sync='before_execute_sql_command wait_for g1'; +send update t1 set f1 = f1 + 100000 limit 2; +connect con2,localhost,root; +let $wait_condition= select 1 from information_schema.processlist where state='Waiting for table metadata lock' and info like 'update t1 %'; +source include/wait_condition.inc; +--replace_result $conn UPDATE +eval kill query $conn; +disconnect con2; +connection default; +error ER_QUERY_INTERRUPTED; +reap; +set debug_sync='now signal g2'; +connection con1; +reap; +show create table t2; +disconnect con1; +connection default; +select * from t2 where f2 not in (select f1 from t1); +select * from t3 where f3 not in (select f2 from t2); +drop table t3; +drop table t2; +drop table t1; +set debug_sync='reset'; + +# +# FK and prelocking: +# child table accesses (reads and writes) wait for locks. +# +create table t1 (a int primary key, b int) engine=innodb; +create table t2 (c int primary key, d int, + foreign key (d) references t1 (a) on update cascade) engine=innodb; +insert t1 values (1,1),(2,2),(3,3); +insert t2 values (4,1),(5,2),(6,3); +flush table t2 with read lock; # this takes MDL_SHARED_NO_WRITE +connect (con1,localhost,root); +--error ER_ROW_IS_REFERENCED_2 +delete from t1 where a=2; +send update t1 set a=10 where a=1; +connection default; +let $wait_condition= select 1 from information_schema.processlist where state='Waiting for table metadata lock'; +source include/wait_condition.inc; +unlock tables; +connection con1; +reap; +connection default; +lock table t2 write; # this takes MDL_SHARED_NO_READ_WRITE +connection con1; +send delete from t1 where a=2; +connection default; +let $wait_condition= select 1 from information_schema.processlist where state='Waiting for table metadata lock'; +source include/wait_condition.inc; +unlock tables; +connection con1; +--error ER_ROW_IS_REFERENCED_2 +reap; +connection default; +unlock tables; +disconnect con1; + +# but privileges should not be checked +create user foo; +grant select,update on test.t1 to foo; +connect(foo,localhost,foo); +update t1 set a=30 where a=3; +disconnect foo; +connection default; +select * from t2; +drop table t2, t1; +drop user foo; diff --git a/mysql-test/suite/innodb/t/foreign_key.test b/mysql-test/suite/innodb/t/foreign_key.test index b586f3e9406..6e8658c4e3e 100644 --- a/mysql-test/suite/innodb/t/foreign_key.test +++ b/mysql-test/suite/innodb/t/foreign_key.test @@ -138,9 +138,62 @@ SET FOREIGN_KEY_CHECKS=DEFAULT; LOCK TABLE staff WRITE; UNLOCK TABLES; DROP TABLES staff, store; + SET FOREIGN_KEY_CHECKS=1; --echo # +--echo # MDEV-17531 Crash in RENAME TABLE with FOREIGN KEY and FULLTEXT INDEX +--echo # + +--disable_query_log +call mtr.add_suppression("InnoDB: Possible reasons:"); +call mtr.add_suppression("InnoDB: \\([12]\\) Table "); +call mtr.add_suppression("InnoDB: If table `test`\\.`t2` is a temporary table"); +--enable_query_log + +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; +CREATE DATABASE best; +CREATE TABLE t3 (a INT PRIMARY KEY, +CONSTRAINT t2_ibfk_1 FOREIGN KEY (a) REFERENCES t1(a)) ENGINE=InnoDB; +CREATE TABLE best.t2 (a INT PRIMARY KEY, b TEXT, FULLTEXT INDEX(b), +FOREIGN KEY (a) REFERENCES test.t1(a)) ENGINE=InnoDB; +--replace_regex /Table '.*t2'/Table 't2'/ +--error ER_TABLE_EXISTS_ERROR +RENAME TABLE best.t2 TO test.t2; +SHOW CREATE TABLE best.t2; +DROP DATABASE best; + +--echo # +--echo # MDEV-17541 KILL QUERY during lock wait in FOREIGN KEY check hangs +--echo # +connect (fk, localhost, root,,); +INSERT INTO t1 SET a=1; +BEGIN; +DELETE FROM t1; + +connection default; +let $ID= `SELECT @id := CONNECTION_ID()`; +send INSERT INTO t3 SET a=1; + +connection fk; +# Check that the above SELECT is blocked +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = 'update' and info = 'INSERT INTO t3 SET a=1'; +--source include/wait_condition.inc +let $ignore= `SELECT @id := $ID`; +kill query @id; + +connection default; +--error ER_QUERY_INTERRUPTED +reap; +disconnect fk; + +DROP TABLE t3,t1; + +--echo # Start of 10.2 tests + +--echo # --echo # MDEV-13246 Stale rows despite ON DELETE CASCADE constraint --echo # @@ -228,7 +281,6 @@ DELETE FROM t1 WHERE id = 1; --connection con1 COMMIT; ---disconnect con1 --connection default SELECT * FROM t2; @@ -288,4 +340,62 @@ insert into t1 values(1, 1); insert into t2(f1) values(1); drop table t2, t1; +# +# MDEV-12669 Circular foreign keys cause a loop and OOM upon LOCK TABLE +# +SET FOREIGN_KEY_CHECKS=0; +CREATE TABLE staff ( + staff_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, + store_id TINYINT UNSIGNED NOT NULL, + PRIMARY KEY (staff_id), + KEY idx_fk_store_id (store_id), + CONSTRAINT fk_staff_store FOREIGN KEY (store_id) REFERENCES store (store_id) ON DELETE RESTRICT ON UPDATE CASCADE +) ENGINE=InnoDB; +CREATE TABLE store ( + store_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, + manager_staff_id TINYINT UNSIGNED NOT NULL, + PRIMARY KEY (store_id), + UNIQUE KEY idx_unique_manager (manager_staff_id), + CONSTRAINT fk_store_staff FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id) ON DELETE RESTRICT ON UPDATE CASCADE +) ENGINE=InnoDB; + +LOCK TABLE staff WRITE; +UNLOCK TABLES; +DROP TABLES staff, store; +SET FOREIGN_KEY_CHECKS=1; + +--echo # +--echo # MDEV-17541 KILL QUERY during lock wait in FOREIGN KEY check hangs +--echo # + +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE t2 (a INT PRIMARY KEY, FOREIGN KEY (a) REFERENCES t1(a)) +ENGINE=InnoDB; + +connection con1; +INSERT INTO t1 SET a=1; +BEGIN; +DELETE FROM t1; + +connection default; +let $ID= `SELECT @id := CONNECTION_ID()`; +send INSERT INTO t2 SET a=1; + +connection con1; +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = 'update' and info = 'INSERT INTO t2 SET a=1'; +--source include/wait_condition.inc +let $ignore= `SELECT @id := $ID`; +kill query @id; + +connection default; +--error ER_QUERY_INTERRUPTED +reap; +disconnect con1; + +DROP TABLE t2,t1; + +--echo # End of 10.2 tests + --source include/wait_until_count_sessions.inc diff --git a/mysql-test/suite/innodb/t/innodb-alter-debug.test b/mysql-test/suite/innodb/t/innodb-alter-debug.test index a779aecb71f..5c8025265e5 100644 --- a/mysql-test/suite/innodb/t/innodb-alter-debug.test +++ b/mysql-test/suite/innodb/t/innodb-alter-debug.test @@ -64,7 +64,6 @@ set DEBUG_SYNC = 'now WAIT_FOR s1'; --error ER_DUP_ENTRY update t1 set a=1 where id=2; SET DEBUG_SYNC = 'now SIGNAL s2'; -disconnect con1; --echo /* connection default */ connection default; @@ -75,5 +74,29 @@ SET DEBUG_SYNC = 'RESET'; drop table t1; +--echo # +--echo # Bug #27753193 ASSERTION `PREBUILT->TRX->ERROR_KEY_NUM < +--echo # HA_ALTER_INFO->KEY_COUNT' + +CREATE TABLE t1 (a INT, UNIQUE KEY(a)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); + +SET DEBUG_SYNC = 'row_log_table_apply1_before signal S1 WAIT_FOR S2'; +send ALTER TABLE t1 FORCE, ALGORITHM=INPLACE; + +connection con1; +SET DEBUG_SYNC = 'now WAIT_FOR S1'; +--error ER_DUP_ENTRY +INSERT INTO t1 VALUES (1); +SET DEBUG_SYNC = 'now SIGNAL S2'; +disconnect con1; + +CONNECTION default; +--error ER_DUP_ENTRY +reap; +SET DEBUG_SYNC='RESET'; + +DROP TABLE t1; + # Wait till all disconnects are completed --source include/wait_until_count_sessions.inc diff --git a/mysql-test/suite/innodb/t/innodb-alter.test b/mysql-test/suite/innodb/t/innodb-alter.test index e8266c44a90..a7f1eb56dce 100644 --- a/mysql-test/suite/innodb/t/innodb-alter.test +++ b/mysql-test/suite/innodb/t/innodb-alter.test @@ -206,7 +206,7 @@ CREATE TABLE tu ( ) ENGINE=InnoDB; --error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON ALTER TABLE tu ADD COLUMN c CHAR(1) NOT NULL FIRST, LOCK=NONE; -# Instant ADD COLUMN (adding after the visible FTS_DOC_ID) +--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON ALTER TABLE tu ADD COLUMN c CHAR(1) NOT NULL, LOCK=NONE; DROP TABLE tu; @@ -217,7 +217,7 @@ CREATE TABLE tv ( ) ENGINE=InnoDB; --error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON ALTER TABLE tv ADD COLUMN c CHAR(1) NOT NULL FIRST, LOCK=NONE; -# Instant ADD COLUMN (adding after the visible FTS_DOC_ID) +--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON ALTER TABLE tv ADD COLUMN c CHAR(1) NOT NULL, LOCK=NONE; DROP TABLE tv; @@ -442,15 +442,110 @@ CREATE TABLE t2(c2 INT NOT NULL, FOREIGN KEY(c2) REFERENCES t1(c1))ENGINE=INNODB SHOW CREATE TABLE t1; SHOW CREATE TABLE t2; ALTER TABLE t1 CHANGE COLUMN c1 C1 INT; +ALTER TABLE t2 CHANGE COLUMN c2 C2 INT; +SHOW CREATE TABLE t1; +SHOW CREATE TABLE t2; +ALTER TABLE t1 CHANGE COLUMN C1 c5 INT; +ALTER TABLE t2 CHANGE COLUMN C2 c6 INT; SHOW CREATE TABLE t1; SHOW CREATE TABLE t2; -# FIXME: MDEV-13671 InnoDB should use case-insensitive column name comparisons -# like the rest of the server -#ALTER TABLE t1 CHANGE COLUMN C1 c5 INT; + +SELECT C.NAME FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS C INNER JOIN + INFORMATION_SCHEMA.INNODB_SYS_TABLES T ON C.TABLE_ID=T.TABLE_ID + WHERE T.NAME='test/t1'; + +SELECT F.NAME FROM INFORMATION_SCHEMA.INNODB_SYS_FIELDS F INNER JOIN + INFORMATION_SCHEMA.INNODB_SYS_INDEXES I ON F.INDEX_ID=I.INDEX_ID INNER JOIN + INFORMATION_SCHEMA.INNODB_SYS_TABLES T ON I.TABLE_ID=T.TABLE_ID + WHERE T.NAME='test/t1' AND I.NAME='PRIMARY'; + +SELECT C.REF_COL_NAME, C.FOR_COL_NAME FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS C INNER JOIN + INFORMATION_SCHEMA.INNODB_SYS_FOREIGN F ON C.ID=F.ID + WHERE F.FOR_NAME='test/t2'; + +DROP TABLE t2, t1; +--echo # virtual columns case too +CREATE TABLE t1 (a INT, b INT GENERATED ALWAYS AS (a) VIRTUAL) ENGINE = InnoDB; +ALTER TABLE t1 CHANGE COLUMN a A INT; +SHOW CREATE TABLE t1; +SELECT C.NAME FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS C INNER JOIN + INFORMATION_SCHEMA.INNODB_SYS_TABLES T ON C.TABLE_ID=T.TABLE_ID + WHERE T.NAME='test/t1'; +DROP TABLE t1; + + +--echo # different FOREIGN KEY cases +CREATE TABLE t1 ( + a INT UNIQUE KEY, + b INT UNIQUE KEY, + c INT UNIQUE KEY, + d INT UNIQUE KEY +) ENGINE=INNODB; +CREATE TABLE t2 ( + aa INT, + bb INT, + cc INT, + dd INT +) ENGINE=INNODB; + +INSERT INTO t1 VALUES (1, 1, 1, 1); +INSERT INTO t2 VALUES (1, 1, 1, 1); + +ALTER TABLE t1 CHANGE a A INT, ALGORITHM=INPLACE; +ALTER TABLE t1 CHANGE c C INT, ALGORITHM=INPLACE; +ALTER TABLE t2 CHANGE cc CC INT, ALGORITHM=INPLACE; +ALTER TABLE t2 CHANGE dd DD INT, ALGORITHM=INPLACE; + +SET foreign_key_checks=0; +ALTER TABLE t2 + ADD FOREIGN KEY(aa) REFERENCES t1(a), + ADD FOREIGN KEY(bb) REFERENCES t1(b), + ADD FOREIGN KEY(cc) REFERENCES t1(c), + ADD FOREIGN KEY(dd) REFERENCES t1(d), + ALGORITHM=INPLACE; + +ALTER TABLE t1 CHANGE b B INT, ALGORITHM=INPLACE; +ALTER TABLE t2 CHANGE aa AA INT, ALGORITHM=INPLACE; + +--source include/restart_mysqld.inc + +ALTER TABLE t1 CHANGE d D INT, ALGORITHM=INPLACE; +ALTER TABLE t2 CHANGE bb BB INT, ALGORITHM=INPLACE; SHOW CREATE TABLE t1; SHOW CREATE TABLE t2; + +--error ER_ROW_IS_REFERENCED_2 +DELETE FROM t1 WHERE a=1; +--error ER_ROW_IS_REFERENCED_2 +DELETE FROM t1 WHERE A=1; + +--error ER_ROW_IS_REFERENCED_2 +DELETE FROM t1 WHERE b=1; +--error ER_ROW_IS_REFERENCED_2 +DELETE FROM t1 WHERE B=1; + +--error ER_ROW_IS_REFERENCED_2 +DELETE FROM t1 WHERE c=1; +--error ER_ROW_IS_REFERENCED_2 +DELETE FROM t1 WHERE C=1; + +--error ER_ROW_IS_REFERENCED_2 +DELETE FROM t1 WHERE d=1; +--error ER_ROW_IS_REFERENCED_2 +DELETE FROM t1 WHERE D=1; + DROP TABLE t2, t1; +--echo # virtual columns case too +CREATE TABLE t1 (a INT, b INT GENERATED ALWAYS AS (a) VIRTUAL) ENGINE = InnoDB; +ALTER TABLE t1 CHANGE COLUMN a A INT; +SHOW CREATE TABLE t1; +SELECT C.NAME FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS C INNER JOIN + INFORMATION_SCHEMA.INNODB_SYS_TABLES T ON C.TABLE_ID=T.TABLE_ID + WHERE T.NAME='test/t1'; +DROP TABLE t1; + + --echo # --echo # BUG 20029625 - HANDLE_FATAL_SIGNAL (SIG=11) IN --echo # DICT_MEM_TABLE_COL_RENAME_LOW diff --git a/mysql-test/suite/innodb/t/innodb-index.test b/mysql-test/suite/innodb/t/innodb-index.test index b34133a92e9..97014d84ca7 100644 --- a/mysql-test/suite/innodb/t/innodb-index.test +++ b/mysql-test/suite/innodb/t/innodb-index.test @@ -1,6 +1,7 @@ -- source include/have_innodb.inc # Embedded server tests do not support restarting. -- source include/not_embedded.inc +-- source include/maybe_debug.inc let $MYSQLD_DATADIR= `select @@datadir`; @@ -1084,6 +1085,9 @@ drop table t1; --echo # --source include/no_checkpoint_start.inc +if ($have_debug) { +SET GLOBAL DEBUG_DBUG='+d,fil_names_write_bogus'; +} CREATE TABLE t1(f1 INT PRIMARY KEY)ENGINE=InnoDB; CREATE TABLE t2(f1 INT PRIMARY KEY)ENGINE=InnoDB; diff --git a/mysql-test/suite/innodb/t/innodb-lock.test b/mysql-test/suite/innodb/t/innodb-lock.test index 3e9b3dd7fe4..9e5505270be 100644 --- a/mysql-test/suite/innodb/t/innodb-lock.test +++ b/mysql-test/suite/innodb/t/innodb-lock.test @@ -1,4 +1,5 @@ --source include/have_innodb.inc +--source include/have_partition.inc # # Check and select innodb lock type @@ -12,26 +13,15 @@ select @@innodb_table_locks; # Testing of explicit table locks with enforced table locks # -connect (con1,localhost,root,,); -connect (con2,localhost,root,,); - ---disable_warnings -drop table if exists t1; ---enable_warnings - -# -# Testing of explicit table locks with enforced table locks -# - set @@innodb_table_locks=1; -connection con1; +connect (con1,localhost,root,,); create table t1 (id integer, x integer) engine=INNODB; insert into t1 values(0, 0); set autocommit=0; SELECT * from t1 where id = 0 FOR UPDATE; -connection con2; +connect (con2,localhost,root,,); set autocommit=0; # The following statement should hang because con1 is locking the page @@ -166,14 +156,66 @@ let $wait_condition= where state = 'Sending data' and info = 'SELECT * FROM t1 FOR UPDATE'; --source include/wait_condition.inc +disconnect con2; connection default; COMMIT; connection con1; reap; COMMIT; -disconnect con1; -disconnect con2; - connection default; DROP TABLE t1; + +--echo # +--echo # MDEV-11080 InnoDB: Failing assertion: +--echo # table->n_waiting_or_granted_auto_inc_locks > 0 +--echo # + +CREATE TABLE t1 (pk INTEGER AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t1 VALUES (NULL),(NULL); +CREATE TABLE t2 LIKE t1; + +BEGIN; + +connection con1; +BEGIN; +DELETE FROM t2; +connection default; +--send LOCK TABLE t2 READ; +connection con1; +SET innodb_lock_wait_timeout= 1, lock_wait_timeout= 2; +--error 0,ER_LOCK_WAIT_TIMEOUT +INSERT INTO t2 SELECT * FROM t1; +COMMIT; + +connection default; +reap; +UNLOCK TABLES; +DROP TABLE t1, t2; + +--echo # +--echo # MDEV-16709 InnoDB: Error: trx already had an AUTO-INC lock +--echo # + +CREATE TABLE t1 (pk INT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB +PARTITION BY key (pk) PARTITIONS 2; + +CREATE TABLE t2 (a INT) ENGINE=InnoDB; +INSERT INTO t2 VALUES (1),(2),(3),(4),(5),(6); + +CREATE TABLE t3 (b INT) ENGINE=InnoDB; +INSERT INTO t3 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9); + +connection con1; +send INSERT t1 SELECT NULL FROM t2; + +connection default; +--error 0,ER_DUP_ENTRY,ER_LOCK_DEADLOCK +INSERT t1 SELECT NULL FROM t3; + +connection con1; +--error 0,ER_DUP_ENTRY,ER_LOCK_DEADLOCK +reap; +disconnect con1; +connection default; +DROP TABLE t1, t2, t3; 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 69a632d6010..2b4a9ea22a9 100644 --- a/mysql-test/suite/innodb/t/innodb-page_compression_bzip2.test +++ b/mysql-test/suite/innodb/t/innodb-page_compression_bzip2.test @@ -2,8 +2,6 @@ -- source include/have_innodb_bzip2.inc -- source include/not_embedded.inc -let $innodb_compression_algorithm_orig=`select @@innodb_compression_algorithm`; - # bzip2 set global innodb_compression_algorithm = 5; @@ -79,9 +77,14 @@ select count(*) from innodb_page_compressed7 where c1 < 500000; select count(*) from innodb_page_compressed8 where c1 < 500000; select count(*) from innodb_page_compressed9 where c1 < 500000; -alter table innodb_normal page_compressed=1 page_compression_level=8; +alter table innodb_normal page_compressed=1 page_compression_level=8, +algorithm=instant; show warnings; show create table innodb_normal; +--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON +alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0, algorithm=instant; +--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON +alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0, algorithm=nocopy; alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0; show warnings; show create table innodb_compressed; @@ -95,6 +98,7 @@ update innodb_page_compressed6 set c1 = c1 + 1; update innodb_page_compressed7 set c1 = c1 + 1; update innodb_page_compressed8 set c1 = c1 + 1; update innodb_page_compressed9 set c1 = c1 + 1; +commit; select count(*) from innodb_compressed; select count(*) from innodb_page_compressed1; select count(*) from innodb_page_compressed1 where c1 < 500000; @@ -236,8 +240,3 @@ drop table innodb_page_compressed6; drop table innodb_page_compressed7; drop table innodb_page_compressed8; drop table innodb_page_compressed9; - -# reset system ---disable_query_log -EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig; ---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 1b1df674e3c..49255d3a1ac 100644 --- a/mysql-test/suite/innodb/t/innodb-page_compression_lz4.test +++ b/mysql-test/suite/innodb/t/innodb-page_compression_lz4.test @@ -2,8 +2,6 @@ -- source include/have_innodb_lz4.inc -- source include/not_embedded.inc -let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`; - # lz4 set global innodb_compression_algorithm = 2; @@ -79,9 +77,14 @@ select count(*) from innodb_page_compressed7 where c1 < 500000; select count(*) from innodb_page_compressed8 where c1 < 500000; select count(*) from innodb_page_compressed9 where c1 < 500000; -alter table innodb_normal page_compressed=1 page_compression_level=8; +alter table innodb_normal page_compressed=1 page_compression_level=8, +algorithm=instant; show warnings; show create table innodb_normal; +--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON +alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0, algorithm=instant; +--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON +alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0, algorithm=nocopy; alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0; show warnings; show create table innodb_compressed; @@ -237,8 +240,3 @@ drop table innodb_page_compressed6; drop table innodb_page_compressed7; drop table innodb_page_compressed8; drop table innodb_page_compressed9; - -# reset system ---disable_query_log -EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_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 9cec3e7a947..e05c08f7515 100644 --- a/mysql-test/suite/innodb/t/innodb-page_compression_lzma.test +++ b/mysql-test/suite/innodb/t/innodb-page_compression_lzma.test @@ -2,8 +2,6 @@ -- source include/have_innodb_lzma.inc -- source include/not_embedded.inc -let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`; - # lzma set global innodb_compression_algorithm = 4; @@ -79,9 +77,14 @@ select count(*) from innodb_page_compressed7 where c1 < 500000; select count(*) from innodb_page_compressed8 where c1 < 500000; select count(*) from innodb_page_compressed9 where c1 < 500000; -alter table innodb_normal page_compressed=1 page_compression_level=8; +alter table innodb_normal page_compressed=1 page_compression_level=8, +algorithm=instant; show warnings; show create table innodb_normal; +--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON +alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0, algorithm=instant; +--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON +alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0, algorithm=nocopy; alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0; show warnings; show create table innodb_compressed; @@ -95,6 +98,7 @@ update innodb_page_compressed6 set c1 = c1 + 1; update innodb_page_compressed7 set c1 = c1 + 1; update innodb_page_compressed8 set c1 = c1 + 1; update innodb_page_compressed9 set c1 = c1 + 1; +commit; select count(*) from innodb_compressed; select count(*) from innodb_page_compressed1; select count(*) from innodb_page_compressed1 where c1 < 500000; @@ -236,8 +240,3 @@ drop table innodb_page_compressed6; drop table innodb_page_compressed7; drop table innodb_page_compressed8; drop table innodb_page_compressed9; - -# reset system ---disable_query_log -EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_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 65c7e5dd3d9..af831bd2467 100644 --- a/mysql-test/suite/innodb/t/innodb-page_compression_lzo.test +++ b/mysql-test/suite/innodb/t/innodb-page_compression_lzo.test @@ -2,8 +2,6 @@ -- source include/have_innodb_lzo.inc -- source include/not_embedded.inc -let $innodb_compression_algorithm_orig=`select @@innodb_compression_algorithm`; - # lzo set global innodb_compression_algorithm = 3; @@ -79,9 +77,14 @@ select count(*) from innodb_page_compressed7 where c1 < 500000; select count(*) from innodb_page_compressed8 where c1 < 500000; select count(*) from innodb_page_compressed9 where c1 < 500000; -alter table innodb_normal page_compressed=1 page_compression_level=8; +alter table innodb_normal page_compressed=1 page_compression_level=8, +algorithm=instant; show warnings; show create table innodb_normal; +--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON +alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0, algorithm=instant; +--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON +alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0, algorithm=nocopy; alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0; show warnings; show create table innodb_compressed; @@ -95,6 +98,7 @@ update innodb_page_compressed6 set c1 = c1 + 1; update innodb_page_compressed7 set c1 = c1 + 1; update innodb_page_compressed8 set c1 = c1 + 1; update innodb_page_compressed9 set c1 = c1 + 1; +commit; select count(*) from innodb_compressed; select count(*) from innodb_page_compressed1; select count(*) from innodb_page_compressed1 where c1 < 500000; @@ -189,8 +193,3 @@ drop table innodb_page_compressed6; drop table innodb_page_compressed7; drop table innodb_page_compressed8; drop table innodb_page_compressed9; - -# reset system ---disable_query_log -eval set global innodb_compression_algorithm = $innodb_compression_algorithm_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 bf83ebf5e82..a51a697931a 100644 --- a/mysql-test/suite/innodb/t/innodb-page_compression_tables.test +++ b/mysql-test/suite/innodb/t/innodb-page_compression_tables.test @@ -70,8 +70,12 @@ select count(*) from innodb_dynamic where c1 < 1500000; # none set global innodb_compression_algorithm = 0; -alter table innodb_compact engine=innodb page_compressed=DEFAULT; -alter table innodb_dynamic engine=innodb page_compressed=DEFAULT; +--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON +alter table innodb_compact page_compressed=DEFAULT, algorithm=instant; +alter table innodb_compact page_compressed=DEFAULT; +--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON +alter table innodb_dynamic page_compressed=DEFAULT, algorithm=instant; +alter table innodb_dynamic page_compressed=DEFAULT; show create table innodb_compact; show create table innodb_dynamic; 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 0c843314eee..45e62722972 100644 --- a/mysql-test/suite/innodb/t/innodb-page_compression_zip.test +++ b/mysql-test/suite/innodb/t/innodb-page_compression_zip.test @@ -1,8 +1,6 @@ --source include/have_innodb.inc --source include/not_embedded.inc -let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`; - # zlib set global innodb_compression_algorithm = 1; @@ -78,9 +76,14 @@ select count(*) from innodb_page_compressed7 where c1 < 500000; select count(*) from innodb_page_compressed8 where c1 < 500000; select count(*) from innodb_page_compressed9 where c1 < 500000; -alter table innodb_normal page_compressed=1 page_compression_level=8; +alter table innodb_normal page_compressed=1 page_compression_level=8, +algorithm=instant; show warnings; show create table innodb_normal; +--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON +alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0, algorithm=instant; +--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON +alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0, algorithm=nocopy; alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0; show warnings; show create table innodb_compressed; @@ -187,8 +190,3 @@ drop table innodb_page_compressed6; drop table innodb_page_compressed7; drop table innodb_page_compressed8; drop table innodb_page_compressed9; - -# reset system ---disable_query_log -EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig; ---enable_query_log diff --git a/mysql-test/suite/innodb/t/innodb-wl5522.test b/mysql-test/suite/innodb/t/innodb-wl5522.test index 66dfaac0996..24dad21b3af 100644 --- a/mysql-test/suite/innodb/t/innodb-wl5522.test +++ b/mysql-test/suite/innodb/t/innodb-wl5522.test @@ -485,7 +485,7 @@ SELECT * FROM t1; DROP TABLE t1; # -# Row format tests [EXPORT REDUNDANT - IMPORT COMPACT & DYNAMIC] +# EXPORT ROW_FORMAT=REDUNDANT # CREATE TABLE t1( c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, @@ -587,6 +587,29 @@ EOF DROP TABLE t1; +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +--error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t1 IMPORT TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test", "t1"); +EOF + +DROP TABLE t1; + # This should be OK. CREATE TABLE t1( c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, @@ -615,7 +638,7 @@ SELECT * FROM t1; DROP TABLE t1; # -# Row format tests [EXPORT COMPACT - IMPORT REDUNDANT & DYNAMIC] +# EXPORT ROW_FORMAT=COMPACT # CREATE TABLE t1( c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, @@ -717,6 +740,29 @@ EOF DROP TABLE t1; +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +--error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t1 IMPORT TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test", "t1"); +EOF + +DROP TABLE t1; + # This should be OK. CREATE TABLE t1( c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, @@ -746,7 +792,7 @@ SELECT * FROM t1; DROP TABLE t1; # -# Row format tests [EXPORT DYNAMIC- IMPORT REDUNDANT & DYNAMIC] +# EXPORT ROW_FORMAT=DYNAMIC # CREATE TABLE t1( c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, @@ -848,6 +894,29 @@ EOF DROP TABLE t1; +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +--error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t1 IMPORT TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test", "t1"); +EOF + +DROP TABLE t1; + # This should be OK. CREATE TABLE t1( c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, @@ -876,6 +945,185 @@ SELECT * FROM t1; DROP TABLE t1; +# +# EXPORT ROW_FORMAT=COMPRESSED +# +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; + +INSERT INTO t1(c2) VALUES(1); +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; +INSERT INTO t1(c2) SELECT c2 FROM t1; + +SHOW CREATE TABLE t1; +SELECT * FROM t1; + +FLUSH TABLES t1 FOR EXPORT; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test", "t1"); +EOF + +UNLOCK TABLES; + +DROP TABLE t1; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_cleanup("test", "t1"); +EOF + +SHOW CREATE TABLE t1; +SELECT * FROM t1; + +DROP TABLE t1; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +--error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t1 IMPORT TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test", "t1"); +EOF + +DROP TABLE t1; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPACT; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +--error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t1 IMPORT TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test", "t1"); +EOF + +DROP TABLE t1; + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +--error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t1 IMPORT TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test", "t1"); +EOF + +DROP TABLE t1; + + +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB + 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"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +--error ER_TABLE_SCHEMA_MISMATCH +ALTER TABLE t1 IMPORT TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_unlink_tablespace("test", "t1"); +EOF + +DROP TABLE t1; + +# This should be OK. +CREATE TABLE t1( + c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + c2 INT, INDEX idx(c2)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; + +ALTER TABLE t1 DISCARD TABLESPACE; +--error ER_TABLESPACE_DISCARDED +SELECT * FROM t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +ALTER TABLE t1 IMPORT TABLESPACE; +CHECK TABLE t1; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_cleanup("test", "t1"); +EOF + +SHOW CREATE TABLE t1; +SELECT * FROM t1; + +DROP TABLE t1; + call mtr.add_suppression("Got error -1 when reading table '.*'"); call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'.*"); call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded"); diff --git a/mysql-test/suite/innodb/t/innodb_default_row_format.combinations b/mysql-test/suite/innodb/t/innodb_default_row_format.combinations index f3bc2cc0c25..d6041d72bf8 100644 --- a/mysql-test/suite/innodb/t/innodb_default_row_format.combinations +++ b/mysql-test/suite/innodb/t/innodb_default_row_format.combinations @@ -2,3 +2,5 @@ innodb_default_row_format=redundant [dynamic] innodb_default_row_format=dynamic +[compact] +innodb_default_row_format=compact diff --git a/mysql-test/suite/innodb/t/instant_alter.test b/mysql-test/suite/innodb/t/instant_alter.test index c414b92f713..fd7fbe94450 100644 --- a/mysql-test/suite/innodb/t/instant_alter.test +++ b/mysql-test/suite/innodb/t/instant_alter.test @@ -319,6 +319,84 @@ UPDATE t1 SET c = 1; UPDATE t1 SET c = 2; DROP TABLE t1; +# MDEV-16830 Crash in ALTER TABLE DROP FOREIGN KEY +eval CREATE TABLE t1 (a INT PRIMARY KEY) $engine; +eval CREATE TABLE t2 (b INT PRIMARY KEY, FOREIGN KEY(b) REFERENCES t1(a)) +$engine; +INSERT INTO t1 SET a=1; +INSERT INTO t2 SET b=1; +ALTER TABLE t2 ADD COLUMN a INT, DROP FOREIGN KEY t2_ibfk_1; +ALTER TABLE t2 ADD INDEX(a); +--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON +ALTER TABLE t1 ADD COLUMN b INT, ADD FOREIGN KEY(a) REFERENCES t2(a), +ALGORITHM=INSTANT; +SET foreign_key_checks=0; +ALTER TABLE t1 ADD COLUMN b INT, ADD FOREIGN KEY(a) REFERENCES t2(a), +ALGORITHM=INSTANT; +ALTER TABLE t2 ADD CONSTRAINT fk FOREIGN KEY(b) REFERENCES t1(a), +ALGORITHM=INSTANT; +SET foreign_key_checks=1; +ALTER TABLE t2 COMMENT 'domestic keys only', DROP FOREIGN KEY fk; +ALTER TABLE t1 DROP FOREIGN KEY t1_ibfk_1; +ALTER TABLE t1 ADD COLUMN big BLOB NOT NULL +DEFAULT REPEAT('a', @@GLOBAL.innodb_page_size * .75); +CHECK TABLE t2, t1; +DROP TABLE t2, t1; + +# +# MDEV-17483 Insert on delete-marked record can wrongly inherit old values +# for instantly added column +# + +eval CREATE TABLE t1 (a INT PRIMARY KEY) $engine; +INSERT INTO t1 SET a = 1; +ALTER TABLE t1 ADD COLUMN b TEXT; +BEGIN; +UPDATE t1 SET b = REPEAT('1', 32768); +UPDATE t1 SET a = 2; +INSERT INTO t1 SET a = 1; +SELECT a,LENGTH(b) FROM t1; +DELETE FROM t1; +COMMIT; +--source include/wait_all_purged.inc +DROP TABLE t1; + +# MDEV-15562 Instant DROP/ADD/reorder columns + +eval CREATE TABLE t1 (a INT, b INT UNIQUE) $engine; +INSERT INTO t1 (a) VALUES (NULL), (NULL); +ALTER TABLE t1 DROP a, ADD COLUMN a INT; +DELETE FROM t1; +BEGIN;INSERT INTO t1 SET a=NULL;ROLLBACK; +DELETE FROM t1; +DROP TABLE t1; + +eval CREATE TABLE t1 (a INT PRIMARY KEY, t VARCHAR(33101) NOT NULL) $engine; +INSERT INTO t1 VALUES(347,''); +ALTER TABLE t1 DROP COLUMN t, ALGORITHM=INSTANT; +SELECT * FROM t1; +DROP TABLE t1; + +eval CREATE TABLE t1 (a INT) $engine; +INSERT INTO t1() VALUES(); +ALTER TABLE t1 ADD COLUMN b INT FIRST, ADD COLUMN c INT AFTER b; +SELECT * FROM t1; +DROP TABLE t1; + +eval CREATE TABLE t1 (t TEXT) $engine; +SET @t=REPEAT('x',@@innodb_page_size / 2); +INSERT INTO t1 VALUES (@t),(@t),(@t),(@t),(@t),(@t),(NULL),(@t),(@t),(@t),(@t); +ALTER TABLE t1 ADD COLUMN a INT FIRST; +UPDATE t1 SET a = 0; +DROP TABLE t1; + +eval CREATE TABLE t1 (t TEXT) $engine; +INSERT INTO t1 SET t = @x; +ALTER TABLE t1 DROP COLUMN t, ADD COLUMN i INT NOT NULL DEFAULT 1; +ALTER TABLE t1 ADD COLUMN t TEXT; +SELECT * FROM t1; +DROP TABLE t1; + dec $format; } disconnect analyze; diff --git a/mysql-test/suite/innodb/t/instant_alter_crash.test b/mysql-test/suite/innodb/t/instant_alter_crash.test index fe7301b4f78..b1615041393 100644 --- a/mysql-test/suite/innodb/t/instant_alter_crash.test +++ b/mysql-test/suite/innodb/t/instant_alter_crash.test @@ -43,9 +43,38 @@ DELETE FROM t1; ROLLBACK; --source include/wait_all_purged.inc +INSERT INTO t2 VALUES +(16,1551,'Omnium enim rerum'),(128,1571,' principia parva sunt'); + +connect ddl, localhost, root; +SET DEBUG_SYNC='innodb_alter_inplace_before_commit SIGNAL ddl WAIT_FOR ever'; +--send +ALTER TABLE t2 DROP COLUMN c3, ADD COLUMN c5 TEXT DEFAULT 'naturam abhorrere'; + +connection default; +SET DEBUG_SYNC='now WAIT_FOR ddl'; +SET GLOBAL innodb_flush_log_at_trx_commit=1; +DELETE FROM t1; + +--source include/kill_mysqld.inc +disconnect ddl; +--source include/start_mysqld.inc + +SET @saved_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency; +SET GLOBAL innodb_purge_rseg_truncate_frequency=1; + +SELECT * FROM t1; +SELECT * FROM t2; +BEGIN; +INSERT INTO t1 SET id=1; +DELETE FROM t2; +ROLLBACK; +--source include/wait_all_purged.inc + INSERT INTO t2 VALUES (64,42,'De finibus bonorum'), (347,33101,' et malorum'); connect ddl, localhost, root; +ALTER TABLE t2 DROP COLUMN c3; SET DEBUG_SYNC='innodb_alter_inplace_before_commit SIGNAL ddl WAIT_FOR ever'; --send ALTER TABLE t2 ADD COLUMN (c4 TEXT NOT NULL DEFAULT ' et malorum'); @@ -96,16 +125,39 @@ for (my $offset= 0x65; $offset; my $n_fields= unpack("n", substr($page,$offset-4,2)) >> 1 & 0x3ff; my $start= 0; my $name; - for (my $i= 0; $i < $n_fields; $i++) { - my $end= unpack("C", substr($page, $offset-7-$i, 1)); - print ",\n " if $i; - print "$fields[$i]="; - if ($end & 0x80) { - print "NULL(", ($end & 0x7f) - $start, " bytes)" - } else { - print "0x", unpack("H*", substr($page,$offset+$start,$end-$start)) + if (unpack("C", substr($page,$offset-3,1)) & 1) { + for (my $i= 0; $i < $n_fields; $i++) { + my $end= unpack("C", substr($page, $offset-7-$i, 1)); + print ",\n " if $i; + print "$fields[$i]="; + if ($end & 0x80) { + print "NULL(", ($end & 0x7f) - $start, " bytes)" + } else { + print "0x", unpack("H*", substr($page,$offset+$start,$end-$start)) + } + $start= $end & 0x7f; + } + } else { + for (my $i= 0; $i < $n_fields; $i++) { + my $end= unpack("n", substr($page, $offset-8-2*$i, 2)); + print ",\n " if $i; + if ($i > 2 && !(~unpack("C",substr($page,$offset-6,1)) & 0x30)) { + if ($i == 3) { + print "BLOB="; + $start += 8; # skip the space_id,page_number + } else { + print "$fields[$i - 1]="; + } + } else { + print "$fields[$i]="; + } + if ($end & 0x8000) { + print "NULL(", ($end & 0x7fff) - $start, " bytes)" + } else { + print "0x", unpack("H*", substr($page,$offset+$start,($end-$start) & 0x3fff)) + } + $start= $end & 0x3fff; } - $start= $end & 0x7f; } print ")\n"; } diff --git a/mysql-test/suite/innodb/t/instant_alter_debug.test b/mysql-test/suite/innodb/t/instant_alter_debug.test index 27056089767..05812322317 100644 --- a/mysql-test/suite/innodb/t/instant_alter_debug.test +++ b/mysql-test/suite/innodb/t/instant_alter_debug.test @@ -189,7 +189,9 @@ SET DEBUG_SYNC='now WAIT_FOR copied'; BEGIN; INSERT INTO t1 SET b=1; ROLLBACK; -disconnect stop_purge; +connection stop_purge; +COMMIT; +connection default; # Wait for purge to empty the table. let $wait_all_purged=2; @@ -197,8 +199,101 @@ let $wait_all_purged=2; let $wait_all_purged=0; SET DEBUG_SYNC='now SIGNAL logged'; -disconnect ddl; +connection ddl; +reap; +connection default; DROP TABLE t1; SET DEBUG_SYNC='RESET'; +--echo # +--echo # MDEV-16131 Assertion failed in dict_index_t::instant_field_value() +--echo # +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t1 SET a=0; +ALTER TABLE t1 ADD COLUMN b INT NOT NULL DEFAULT 2, ADD COLUMN c INT; + +connection stop_purge; +START TRANSACTION WITH CONSISTENT SNAPSHOT; + +connection default; +DELETE FROM t1; + +connection ddl; +SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL copied WAIT_FOR logged'; +send ALTER TABLE t1 FORCE; + +connection stop_purge; +COMMIT; + +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR copied'; +let $wait_all_purged = 1; +--source include/wait_all_purged.inc +INSERT INTO t1 SET a=1; +INSERT INTO t1 SET a=2,b=3,c=4; +SET DEBUG_SYNC = 'now SIGNAL logged'; + +connection ddl; +reap; + +connection default; +SET DEBUG_SYNC = RESET; +SELECT * FROM t1; +ALTER TABLE t1 DROP b, ALGORITHM=INSTANT; +connection stop_purge; +START TRANSACTION WITH CONSISTENT SNAPSHOT; + +connection default; +DELETE FROM t1; + +connection ddl; +SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL copied WAIT_FOR logged'; +send ALTER TABLE t1 ADD COLUMN b INT NOT NULL DEFAULT 2 AFTER a, FORCE; + +disconnect stop_purge; + +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR copied'; +let $wait_all_purged = 1; +--source include/wait_all_purged.inc +INSERT INTO t1 SET a=1; +INSERT INTO t1 SET a=2,c=4; +SET DEBUG_SYNC = 'now SIGNAL logged'; + +connection ddl; +reap; +UPDATE t1 SET b = b + 1 WHERE a = 2; + +connection default; +SET DEBUG_SYNC = RESET; +SELECT * FROM t1; + +--echo # +--echo # MDEV-15872 Crash in online ALTER TABLE...ADD PRIMARY KEY +--echo # after instant ADD COLUMN ... NULL +--echo # +ALTER TABLE t1 ADD COLUMN d INT, ALGORITHM=INSTANT; +UPDATE t1 SET d=1; + +connection ddl; +SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL copied WAIT_FOR logged'; +send ALTER IGNORE TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY (a,d); + +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR copied'; +BEGIN; +INSERT INTO t1 SET a=3; +ROLLBACK; +SET DEBUG_SYNC = 'now SIGNAL logged'; + +connection ddl; +--error ER_INVALID_USE_OF_NULL +reap; +disconnect ddl; + +connection default; +SET DEBUG_SYNC = RESET; +SELECT * FROM t1; +DROP TABLE t1; + SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency; diff --git a/mysql-test/suite/innodb/t/instant_alter_limit.test b/mysql-test/suite/innodb/t/instant_alter_limit.test new file mode 100644 index 00000000000..ded14eee89b --- /dev/null +++ b/mysql-test/suite/innodb/t/instant_alter_limit.test @@ -0,0 +1,42 @@ +--source include/have_innodb.inc + +SET @old_instant= +(SELECT variable_value FROM information_schema.global_status +WHERE variable_name = 'innodb_instant_alter_column'); + +CREATE TABLE t(a INT PRIMARY KEY, b INT, c INT, d INT, e INT) +ENGINE=InnoDB; +INSERT INTO t VALUES(1,2,3,4,5); +--disable_query_log +let $n=253; +while ($n) { +dec $n; +ALTER TABLE t DROP b, DROP c, DROP d, DROP e, +ADD COLUMN b INT FIRST, ADD COLUMN c INT, ADD COLUMN d INT AFTER b, +ADD COLUMN e INT AFTER c, ALGORITHM=INSTANT; +} +--enable_query_log +SELECT * FROM t; +--error ER_ALTER_OPERATION_NOT_SUPPORTED +ALTER TABLE t DROP b, DROP c, DROP d, DROP e, +ADD COLUMN b INT, ALGORITHM=INSTANT; +ALTER TABLE t CHANGE COLUMN b beta INT AFTER a, ALGORITHM=INSTANT; +ALTER TABLE t DROP e, DROP c, DROP d, ALGORITHM=INSTANT; +SELECT * FROM t; +ALTER TABLE t DROP COLUMN beta, ALGORITHM=INSTANT; +--error ER_ALTER_OPERATION_NOT_SUPPORTED +ALTER TABLE t ADD COLUMN b INT NOT NULL, ALGORITHM=INSTANT; + +SELECT variable_value-@old_instant instants +FROM information_schema.global_status +WHERE variable_name = 'innodb_instant_alter_column'; + +ALTER TABLE t ADD COLUMN b INT NOT NULL; + +SELECT variable_value-@old_instant instants +FROM information_schema.global_status +WHERE variable_name = 'innodb_instant_alter_column'; + +SELECT * FROM t; + +DROP TABLE t; diff --git a/mysql-test/suite/innodb/t/instant_alter_rollback.test b/mysql-test/suite/innodb/t/instant_alter_rollback.test index 487a60dcbe1..cfece7e0738 100644 --- a/mysql-test/suite/innodb/t/instant_alter_rollback.test +++ b/mysql-test/suite/innodb/t/instant_alter_rollback.test @@ -1,4 +1,5 @@ --source include/have_innodb.inc +--source innodb_default_row_format.inc # The embedded server tests do not support restarting. --source include/not_embedded.inc @@ -7,44 +8,49 @@ FLUSH TABLES; --echo # --echo # MDEV-11369: Instant ADD COLUMN for InnoDB +--echo # MDEV-15562: Instant DROP COLUMN or changing the order of columns --echo # connect to_be_killed, localhost, root; -let $format= 3; -while ($format) { -let $fmt= `SELECT CASE $format WHEN 1 THEN 'DYNAMIC' WHEN 2 THEN 'COMPACT' -ELSE 'REDUNDANT' END`; -let $engine= ENGINE=InnoDB ROW_FORMAT=$fmt; - -eval CREATE TABLE empty_$fmt -(id INT PRIMARY KEY, c2 INT UNIQUE) $engine; -eval CREATE TABLE once_$fmt LIKE empty_$fmt; -eval CREATE TABLE twice_$fmt LIKE empty_$fmt; -eval INSERT INTO once_$fmt SET id=1,c2=1; -eval INSERT INTO twice_$fmt SET id=1,c2=1; -eval ALTER TABLE empty_$fmt ADD COLUMN (d1 INT DEFAULT 15); -eval ALTER TABLE once_$fmt ADD COLUMN (d1 INT DEFAULT 20); -eval ALTER TABLE twice_$fmt ADD COLUMN (d1 INT DEFAULT 20); -eval ALTER TABLE twice_$fmt ADD COLUMN +SET @old_instant= +(SELECT variable_value FROM information_schema.global_status +WHERE variable_name = 'innodb_instant_alter_column'); +CREATE TABLE empty (id INT PRIMARY KEY, c2 INT UNIQUE) ENGINE=InnoDB; +CREATE TABLE once LIKE empty; +CREATE TABLE twice LIKE empty; +CREATE TABLE thrice LIKE empty; +INSERT INTO once SET id=1,c2=1; +INSERT INTO twice SET id=1,c2=1; +INSERT INTO thrice SET id=1,c2=1; +ALTER TABLE empty ADD COLUMN (d1 INT DEFAULT 15); +ALTER TABLE once ADD COLUMN (d1 INT DEFAULT 20); +ALTER TABLE twice ADD COLUMN (d1 INT DEFAULT 20); +ALTER TABLE thrice ADD COLUMN (d1 INT DEFAULT 20); +ALTER TABLE twice ADD COLUMN (d2 INT NOT NULL DEFAULT 10, d3 VARCHAR(15) NOT NULL DEFAULT 'var och en char'); -dec $format; -} +ALTER TABLE thrice ADD COLUMN +(d2 INT NOT NULL DEFAULT 10, + d3 TEXT NOT NULL DEFAULT 'con'); +ALTER TABLE thrice DROP c2, DROP d3, CHANGE d2 d3 INT NOT NULL FIRST; -BEGIN; +SELECT variable_value-@old_instant instants +FROM information_schema.global_status +WHERE variable_name = 'innodb_instant_alter_column'; -let $format= 3; -while ($format) { -let $fmt= `SELECT CASE $format WHEN 1 THEN 'DYNAMIC' WHEN 2 THEN 'COMPACT' -ELSE 'REDUNDANT' END`; +BEGIN; -eval INSERT INTO empty_$fmt set id=0,c2=42; -eval UPDATE once_$fmt set c2=c2+1; -eval UPDATE twice_$fmt set c2=c2+1; -eval INSERT INTO twice_$fmt SET id=2,c2=0,d3=''; -dec $format; -} +INSERT INTO empty set id=0,c2=42; +UPDATE once set c2=c2+1; +UPDATE twice set c2=c2+1; +UPDATE thrice set d3=d3+1; +INSERT INTO twice SET id=2,c2=0,d3=''; +INSERT INTO thrice SET id=2,d3=0; +DELETE FROM empty; +DELETE FROM once; +DELETE FROM twice; +DELETE FROM thrice; connection default; SET GLOBAL innodb_flush_log_at_trx_commit=1; @@ -60,14 +66,8 @@ DROP TABLE foo; --source include/wait_all_purged.inc SET GLOBAL innodb_purge_rseg_truncate_frequency=@saved_frequency; -let $format= 3; -while ($format) { -let $fmt= `SELECT CASE $format WHEN 1 THEN 'DYNAMIC' WHEN 2 THEN 'COMPACT' -ELSE 'REDUNDANT' END`; - -eval SELECT * FROM empty_$fmt; -eval SELECT * FROM once_$fmt; -eval SELECT * FROM twice_$fmt; -eval DROP TABLE empty_$fmt, once_$fmt, twice_$fmt; -dec $format; -} +SELECT * FROM empty; +SELECT * FROM once; +SELECT * FROM twice; +SELECT * FROM thrice; +DROP TABLE empty, once, twice, thrice; diff --git a/mysql-test/suite/innodb/t/instant_drop.test b/mysql-test/suite/innodb/t/instant_drop.test new file mode 100644 index 00000000000..7be4998dccd --- /dev/null +++ b/mysql-test/suite/innodb/t/instant_drop.test @@ -0,0 +1,98 @@ +--source include/have_innodb.inc + +create table t1(f1 int not null, f2 int not null, f3 int not null)engine=innodb; +insert into t1 values(1, 2, 3),(4, 5, 6); +alter table t1 drop column f2, algorithm=instant; +select * from t1; +insert into t1 values(1,2); +select * from t1; +alter table t1 add column f4 int not null default 5, algorithm=instant; +select * from t1; +alter table t1 drop column f1, algorithm=instant; +select * from t1; +insert into t1 values(7, 9); +select * from t1; +alter table t1 add column f5 blob default repeat('aaa', 950), drop column f4, algorithm=instant; +select * from t1; +select f3 from t1; +update t1 set f3 = 10 where f3 > 2; +select * from t1; +delete from t1 where f3 = 10; +show create table t1; +select f3 from t1; +update t1 set f5 = 'world'; +select * from t1; +drop table t1; + +create table t1(f1 int, f2 int not null, index idx(f2))engine=innodb; +insert into t1 values(1, 2); +alter table t1 drop column f1, add column f3 varchar(100) default 'thiru', algorithm=instant; +select * from t1 force index (idx); +alter table t1 drop column f3, algorithm=instant; +select * from t1; +begin; +insert into t1 values(10); +select * from t1; +update t1 set f2 = 100; +select * from t1; +delete from t1 where f2 = 100; +select * from t1; +rollback; +select * from t1; +show create table t1; +drop table t1; + +create table t1(f1 int, f2 int not null)engine=innodb; +insert into t1 values(1, 2); +alter table t1 drop column f2, algorithm=instant; +insert into t1 values(NULL); +select * from t1; +drop table t1; + +create table t1(f1 int not null, f2 int not null)engine=innodb; +insert into t1 values(1, 2); +alter table t1 add column f5 int default 10, algorithm=instant; +alter table t1 add column f3 int not null default 100, algorithm=instant; +alter table t1 add column f4 int default 100, drop column f3, algorithm=instant; +insert into t1 values(2, 3, 20, 100); +select * from t1; +drop table t1; + +create table t1(f1 int not null, f2 int not null) engine=innodb; +insert into t1 values(1, 1); +alter table t1 drop column f2, add column f3 int default 3, algorithm=instant; +select * from t1; +update t1 set f3 = 19; +select * from t1; +alter table t1 drop column f1, add column f5 int default 10, algorithm=instant; +insert into t1 values(4, 10); +select * from t1; + +create table t2(f1 int, f2 int not null) engine=innodb; +insert into t2(f1, f2) values(1, 2); +alter table t2 drop column f2, add column f4 varchar(100) default repeat('a', 20), add column f5 int default 10, algorithm=instant; +select * from t2; +show create table t2; +alter table t2 add column f6 char(100) default repeat('a', 99), algorithm=instant; + +create table t3(f1 int, f2 int not null)engine=innodb; +insert into t3 values(1, 2); +alter table t3 drop column f2, add column f3 int default 1, add column f4 int default 4, algorithm=instant; + +--source include/restart_mysqld.inc +select * from t1; +alter table t1 add column f6 int default 9,drop column f5, algorithm = instant; +insert into t1 values(4, 9); +alter table t1 force, algorithm=inplace; +select * from t1; + +select * from t2; +alter table t2 force, algorithm=inplace; +select * from t2; +show create table t2; + +select * from t3; +alter table t3 add column f5 char(100) default repeat('a', 99), algorithm=instant; +--source include/restart_mysqld.inc +select * from t3; +drop table t1,t2,t3; diff --git a/mysql-test/suite/innodb/t/log_file_size.test b/mysql-test/suite/innodb/t/log_file_size.test index 44cb155c7d9..1e6c7cd4d00 100644 --- a/mysql-test/suite/innodb/t/log_file_size.test +++ b/mysql-test/suite/innodb/t/log_file_size.test @@ -43,7 +43,7 @@ eval $check_no_innodb; --move_file $MYSQLD_DATADIR/ib_logfile.old $MYSQLD_DATADIR/ib_logfile.0 --source include/shutdown_mysqld.inc let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; -let SEARCH_PATTERN= InnoDB: Log file .*ib_logfile0 size 0 is too small; +let SEARCH_PATTERN= InnoDB: Log file .*ib_logfile1 is of different size .* bytes than other log files 0 bytes!; --source include/search_pattern_in_file.inc --source include/start_mysqld.inc CHECK TABLE t1; diff --git a/mysql-test/suite/innodb/t/system_tables.test b/mysql-test/suite/innodb/t/system_tables.test index 90cb8c59fbd..172628790f8 100644 --- a/mysql-test/suite/innodb/t/system_tables.test +++ b/mysql-test/suite/innodb/t/system_tables.test @@ -9,4 +9,4 @@ insert envois3 values ('2008-08-11 22:43:00'); --source include/restart_mysqld.inc select convert_tz(starttime,'UTC','Europe/Moscow') starttime from envois3; drop table envois3; -alter table mysql.time_zone_name engine=MyISAM; +alter table mysql.time_zone_name engine=Aria; diff --git a/mysql-test/suite/innodb/t/table_flags.test b/mysql-test/suite/innodb/t/table_flags.test index 6c9b5e7a8cd..284589a17c8 100644 --- a/mysql-test/suite/innodb/t/table_flags.test +++ b/mysql-test/suite/innodb/t/table_flags.test @@ -1,6 +1,7 @@ --source include/innodb_page_size.inc # Embedded server tests do not support restarting --source include/not_embedded.inc +--source include/maybe_debug.inc --disable_query_log call mtr.add_suppression("InnoDB: Table `mysql`\\.`innodb_table_stats` not found"); @@ -30,7 +31,9 @@ let bugdir= $MYSQLTEST_VARDIR/tmp/table_flags; --let $d=$d --innodb-undo-tablespaces=0 --let $d=$d --innodb-purge-rseg-truncate-frequency=1 --let $d=$d --skip-innodb-fast-shutdown - +if ($have_debug) { +--let $d=$d --debug=d,create_and_drop_garbage +} --let $restart_parameters=$d --innodb-stats-persistent=0 --source include/restart_mysqld.inc diff --git a/mysql-test/suite/innodb/t/temporary_table.test b/mysql-test/suite/innodb/t/temporary_table.test index 52334b05999..8e3ddf95634 100644 --- a/mysql-test/suite/innodb/t/temporary_table.test +++ b/mysql-test/suite/innodb/t/temporary_table.test @@ -477,6 +477,23 @@ ROLLBACK; SELECT * FROM t1; DROP TABLE t1; +delimiter //; +create procedure t1_proc() +begin +DECLARE var INT UNSIGNED; +CREATE TEMPORARY TABLE t1(f1 INT UNSIGNED, f2 INT UNSIGNED, KEY( f1, f2 ) )engine=innodb; +SET TRANSACTION ISOLATION LEVEL READ COMMITTED; +START TRANSACTION; +INSERT INTO t1 SET f1 = 1, f2 = 1; +UPDATE t1 SET f2 = 2; +SET var = ( SELECT 1 FROM t1 ); +DROP TABLE t1; +END// +delimiter ;// + +call t1_proc; +drop procedure t1_proc; + --echo # --echo # MDEV-15874 CREATE TABLE creates extra transaction --echo # diff --git a/mysql-test/suite/innodb/t/truncate.test b/mysql-test/suite/innodb/t/truncate.test new file mode 100644 index 00000000000..cf71ca83c4c --- /dev/null +++ b/mysql-test/suite/innodb/t/truncate.test @@ -0,0 +1,17 @@ +--source include/have_innodb.inc + +CREATE TABLE t (a SERIAL) ENGINE=InnoDB; + +connect (dml,localhost,root); +# At the end of this statement, close_thread_tables() +# should add the open table handle to the table definition cache (tdc). +select * from t; + +connection default; +# This should purge the handle from the tdc; +# otherwise ha_innobase::truncate() would hang, +# waiting for the reference count to drop to 0. +TRUNCATE TABLE t; +disconnect dml; + +DROP TABLE t; diff --git a/mysql-test/suite/innodb/t/truncate_crash.test b/mysql-test/suite/innodb/t/truncate_crash.test new file mode 100644 index 00000000000..5cb39c745dc --- /dev/null +++ b/mysql-test/suite/innodb/t/truncate_crash.test @@ -0,0 +1,23 @@ +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc +--source include/not_embedded.inc + +FLUSH TABLES; +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1),(2); + +connect (wait,localhost,root,,test); +SET DEBUG_SYNC='before_trx_state_committed_in_memory SIGNAL c WAIT_FOR ever'; +send TRUNCATE TABLE t1; + +connection default; +SET DEBUG_SYNC='now WAIT_FOR c'; +--let $shutdown_timeout=0 +--source include/restart_mysqld.inc +disconnect wait; + +--replace_result 2 0 +SELECT COUNT(*) FROM t1; +TRUNCATE TABLE t1; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/truncate_debug.test b/mysql-test/suite/innodb/t/truncate_debug.test deleted file mode 100644 index 74d9064faa4..00000000000 --- a/mysql-test/suite/innodb/t/truncate_debug.test +++ /dev/null @@ -1,128 +0,0 @@ ---source include/have_innodb.inc ---source include/have_debug.inc ---source include/have_debug_sync.inc - ---source include/count_sessions.inc - ---echo # ---echo # Bug #23070734 CONCURRENT TRUNCATE TABLES CAUSE STALLS ---echo # - -SET @ahi= @@global.innodb_adaptive_hash_index; -# Ensure that there is no adaptive hash index on any system tables, -# or any other tables than the ones that we are creating below. -SET GLOBAL innodb_adaptive_hash_index=OFF; -SET GLOBAL innodb_adaptive_hash_index=ON; - ---echo Test_1 :- Check if DDL operations are possible on ---echo table being truncated. Also check if ---echo DDL operations on other tables succeed. - -create table t1 (f1 int,f2 int,key(f2),f3 int) engine=innodb row_format=redundant; -create index idx1 on t1(f3); -create table t2 (f1 int,f2 int,key(f2),f3 int) engine=innodb row_format=redundant; - -create table t3 (f1 int,f2 int,key(f2)) engine=innodb row_format=redundant; - -insert into t1 values (10,20,30),(30,40,50),(50,60,70); -insert into t1 select * from t1; -insert into t1 select * from t1; -insert into t1 select * from t1; -insert into t2 values (10,20,30),(30,40,50),(50,60,70); - -insert into t2 select * from t2; -insert into t2 select * from t2; -insert into t2 select * from t2; - -insert into t3 values (10,20),(30,40),(50,50); -insert into t3 select * from t3; -insert into t3 select * from t3; - -SET session lock_wait_timeout = 1; - -connect (con1,localhost,root,,); -SET DEBUG_SYNC= 'buffer_pool_scan SIGNAL started WAIT_FOR finish_scan'; -send truncate table t1; - -connection default; -SET DEBUG_SYNC= 'now WAIT_FOR started'; - ---echo Check Analyze table. Gives lock time out error. -analyze table t1; - ---echo Check if we can turn off auto recalculation. ---error ER_LOCK_WAIT_TIMEOUT -alter table t1 STATS_AUTO_RECALC=0; - ---echo Check if we can turn off persistent stats on the table ---error ER_LOCK_WAIT_TIMEOUT -alter table t1 STATS_PERSISTENT=0; - ---echo Check if DML is possible on table being truncated ---error ER_LOCK_WAIT_TIMEOUT -insert into t1 values (10,89,99); - ---echo Check if DDL is possible on table being truncated ---error ER_LOCK_WAIT_TIMEOUT -alter table t1 add column f4 int; - ---echo check if table can be created with the same name ---error ER_TABLE_EXISTS_ERROR,ER_LOCK_WAIT_TIMEOUT -create table t1 (bd int) engine=innodb; - ---echo check if index can be created on table being truncated ---error ER_LOCK_WAIT_TIMEOUT -create index idx1 on t1(f1); - ---echo Check if DROP of table is possible during truncate ---error ER_LOCK_WAIT_TIMEOUT -drop table t1; - ---echo Check if select is possible during truncate ---error ER_LOCK_WAIT_TIMEOUT -select * from t1; - ---error ER_BAD_FIELD_ERROR -select * from t2 where t2.f1=t1.f1; - ---echo Check concurrent truncate operation on table; ---error ER_LOCK_WAIT_TIMEOUT -truncate table t1; - ---echo Check concurrent selects and inserts on the other table -insert into t3 values (10,20),(30,40),(50,50); -select * from t3 where f1=40; - ---echo Concurrent truncate on other tables -truncate table t2; - ---echo Concurrent alters on the other tables -alter table t2 add column f4 int; - ---echo check if index can be created on the other table -create index idx1 on t2(f3); - ---echo Check if we can turn off persistent stats off entire instance -SET GLOBAL innodb_stats_persistent=off; - -connect (con2,localhost,root,,); -send set global innodb_adaptive_hash_index=off; - -connection default; -SET DEBUG_SYNC= 'now SIGNAL finish_scan'; - -connection con1; -reap; -disconnect con1; - -connection con2; -reap; -disconnect con2; - -connection default; -SET DEBUG_SYNC= 'RESET'; - -SET GLOBAL innodb_adaptive_hash_index=@ahi; - -drop table t1,t2,t3; ---source include/wait_until_count_sessions.inc diff --git a/mysql-test/suite/innodb/t/truncate_foreign.test b/mysql-test/suite/innodb/t/truncate_foreign.test new file mode 100644 index 00000000000..2c00c0641e9 --- /dev/null +++ b/mysql-test/suite/innodb/t/truncate_foreign.test @@ -0,0 +1,68 @@ +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc + +CREATE TABLE parent (a INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO parent SET a=1; + +CREATE TABLE child (a INT PRIMARY KEY, FOREIGN KEY (a) REFERENCES parent(a) +ON UPDATE CASCADE) +ENGINE=InnoDB; +INSERT INTO child SET a=1; + +--error ER_TRUNCATE_ILLEGAL_FK +TRUNCATE TABLE parent; +TRUNCATE TABLE child; + +INSERT INTO child SET a=1; +UPDATE parent SET a=2; +SELECT * FROM child; + +connect (dml,localhost,root); +SET DEBUG_SYNC='foreign_constraint_update_cascade SIGNAL fk WAIT_FOR go'; +send UPDATE parent SET a=3; + +connection default; +SET DEBUG_SYNC='now WAIT_FOR fk'; +SET lock_wait_timeout=1; +--error ER_LOCK_WAIT_TIMEOUT +TRUNCATE TABLE child; +SET DEBUG_SYNC='now SIGNAL go'; + +connection dml; +reap; +SELECT * FROM child; +SET DEBUG_SYNC='foreign_constraint_check_for_update SIGNAL fk WAIT_FOR go'; +send DELETE FROM parent; + +connection default; +SET DEBUG_SYNC='now WAIT_FOR fk'; +--error ER_LOCK_WAIT_TIMEOUT +TRUNCATE TABLE child; +SET DEBUG_SYNC='now SIGNAL go'; + +connection dml; +--error ER_ROW_IS_REFERENCED_2 +reap; +SELECT * FROM child; +INSERT INTO parent SET a=5; +SET DEBUG_SYNC='foreign_constraint_check_for_ins SIGNAL fk WAIT_FOR go'; +send INSERT INTO child SET a=5; + +connection default; +SET DEBUG_SYNC='now WAIT_FOR fk'; +SET foreign_key_checks=0; +TRUNCATE TABLE parent; +SET DEBUG_SYNC='now SIGNAL go'; + +connection dml; +--error ER_NO_REFERENCED_ROW_2 +reap; +SELECT * FROM parent; +SELECT * FROM child; +disconnect dml; + +connection default; +SET DEBUG_SYNC = RESET; + +DROP TABLE child, parent; diff --git a/mysql-test/suite/innodb/t/truncate_inject.test b/mysql-test/suite/innodb/t/truncate_inject.test deleted file mode 100644 index 35e516324bb..00000000000 --- a/mysql-test/suite/innodb/t/truncate_inject.test +++ /dev/null @@ -1,97 +0,0 @@ -# This test is based on innodb_zip.wl6501_error_1 in MySQL 5.7. - ---source include/have_innodb.inc ---source include/innodb_row_format.inc ---source include/have_debug.inc - -SET @save_dbug = @@SESSION.debug_dbug; - -call mtr.add_suppression("InnoDB: Flagged corruption of .* in table `test`\\.`t` in TRUNCATE TABLE"); - ---echo # 1. Error in assigning undo logs for truncate action -CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), INDEX ck(c)) -ENGINE = InnoDB; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -check table t; -# -SET debug_dbug = '+d,ib_err_trunc_assigning_undo_log'; ---error ER_GET_ERRNO -truncate table t; -SET debug_dbug = @save_dbug; -check table t; -select * from t; - ---echo # 2. Error while preparing for truncate -SET debug_dbug = '+d,ib_err_trunc_preparing_for_truncate'; ---error ER_GET_ERRNO -truncate table t; -SET debug_dbug = @save_dbug; -check table t; -select * from t; - ---echo # 3. Error while dropping/creating indexes -SET debug_dbug = '+d,ib_err_trunc_drop_index'; ---error ER_GET_ERRNO -truncate table t; -SET debug_dbug = @save_dbug; -check table t; ---error ER_TABLE_CORRUPT,ER_GET_ERRNO -select * from t; -drop table t; - -CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), INDEX ck(c)) -ENGINE = InnoDB; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -check table t; - -SET debug_dbug = '+d,ib_err_trunc_create_index'; ---error ER_GET_ERRNO -truncate table t; -SET debug_dbug = @save_dbug; -check table t; ---error ER_TABLE_CORRUPT,ER_GET_ERRNO -select * from t; -drop table t; - -CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), INDEX ck(c)) -ENGINE = InnoDB; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -check table t; - -SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index'; -truncate table t; -SET debug_dbug = @save_dbug; - -check table t; -select * from t; -drop table t; - ---echo # 4. Error while completing truncate of table involving FTS -CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), -FULLTEXT INDEX(c)) ENGINE = InnoDB; -insert into t values (1, 1.1, 'mysql is now oracle company'), - (2, 2.2, 'innodb is part of mysql'), - (3, 3.3, 'innodb is default storage engine of mysql'); -check table t; -SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index'; -truncate table t; -SET debug_dbug = @save_dbug; - -check table t; -select * from t; -drop table t; - ---echo # 5. Error while updating sys-tables -CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), -FULLTEXT INDEX(c)) ENGINE = InnoDB; -insert into t values (1, 1.1, 'mysql is now oracle company'), - (2, 2.2, 'innodb is part of mysql'), - (3, 3.3, 'innodb is default storage engine of mysql'); -check table t; -SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index'; -truncate table t; -SET debug_dbug = @save_dbug; - -check table t; -select * from t order by i; -drop table t; diff --git a/mysql-test/suite/innodb/t/truncate_missing.test b/mysql-test/suite/innodb/t/truncate_missing.test new file mode 100644 index 00000000000..832b94e3a19 --- /dev/null +++ b/mysql-test/suite/innodb/t/truncate_missing.test @@ -0,0 +1,22 @@ +--source include/have_innodb.inc +--source include/not_embedded.inc + +call mtr.add_suppression("InnoDB: Operating system error number "); +call mtr.add_suppression("InnoDB: (The error means|If you are|Cannot open datafile) "); +call mtr.add_suppression("InnoDB: Ignoring tablespace for `test`\.`t`"); +call mtr.add_suppression("InnoDB: Table test/t .* does not exist"); + +CREATE TABLE t (a SERIAL) ENGINE=InnoDB; +INSERT INTO t() VALUES(); +SHOW CREATE TABLE t; +let $datadir=`select @@datadir`; + +--source include/shutdown_mysqld.inc +--remove_file $datadir/test/t.ibd +--source include/start_mysqld.inc + +--error ER_NO_SUCH_TABLE_IN_ENGINE +SELECT * FROM t; +--error ER_NO_SUCH_TABLE_IN_ENGINE +TRUNCATE TABLE t; +DROP TABLE t; diff --git a/mysql-test/suite/innodb/t/truncate_purge_debug.opt b/mysql-test/suite/innodb/t/truncate_purge_debug.opt deleted file mode 100644 index 8bed7e46166..00000000000 --- a/mysql-test/suite/innodb/t/truncate_purge_debug.opt +++ /dev/null @@ -1,3 +0,0 @@ ---innodb-purge-threads=1 ---innodb-purge-batch-size=1 ---innodb-stats-persistent=OFF diff --git a/mysql-test/suite/innodb/t/truncate_purge_debug.test b/mysql-test/suite/innodb/t/truncate_purge_debug.test deleted file mode 100644 index e8f5768f557..00000000000 --- a/mysql-test/suite/innodb/t/truncate_purge_debug.test +++ /dev/null @@ -1,49 +0,0 @@ ---source include/have_innodb.inc ---source include/have_debug.inc ---source include/have_debug_sync.inc ---source include/count_sessions.inc - ---echo # ---echo # Bug #23070734 CONCURRENT TRUNCATE TABLES CAUSE STALLS ---echo # - -create table t1 (f1 int ,f2 int,key(f2)) engine=innodb; -begin; -insert into t1 values (10,45),(20,78),(30,88),(40,23),(50,78),(60,11),(70,56),(80,90); -delete from t1; - -connect (con2,localhost,root,,); -# Stop the purge thread -START TRANSACTION WITH CONSISTENT SNAPSHOT; - -connection default; -# Ensure that the history list length will actually be decremented by purge. -SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency; -SET GLOBAL innodb_purge_rseg_truncate_frequency = 1; -commit; - -connect (con1,localhost,root,,); -SET DEBUG_SYNC= 'buffer_pool_scan SIGNAL started WAIT_FOR finish_scan'; -send truncate table t1; - -connection con2; -SET DEBUG_SYNC= 'now WAIT_FOR started'; -# Allow purge to proceed, by discarding our read view. -COMMIT; -disconnect con2; - -connection default; ---source include/wait_all_purged.inc - -SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency; - -SET DEBUG_SYNC = 'now SIGNAL finish_scan'; - -connection con1; -reap; -disconnect con1; - -connection default; -SET DEBUG_SYNC = 'RESET'; -drop table t1; ---source include/wait_until_count_sessions.inc diff --git a/mysql-test/suite/innodb/t/truncate_restart.test b/mysql-test/suite/innodb/t/truncate_restart.test deleted file mode 100644 index 60a3d83cd81..00000000000 --- a/mysql-test/suite/innodb/t/truncate_restart.test +++ /dev/null @@ -1,16 +0,0 @@ ---source include/have_innodb.inc ---source include/have_debug.inc ---source include/have_debug_sync.inc - -SET GLOBAL innodb_stats_persistent= ON; -CREATE TABLE t1 (t TEXT) ENGINE=InnoDB STATS_PERSISTENT=1; ---connect (con1,localhost,root,,test) -SET DEBUG_SYNC='ib_trunc_table_trunc_completing SIGNAL committed WAIT_FOR ever'; ---send -TRUNCATE TABLE t1; ---connection default -SET DEBUG_SYNC='now WAIT_FOR committed'; ---source include/restart_mysqld.inc ---disconnect con1 -SELECT COUNT(*) FROM t1; -DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/undo_truncate.test b/mysql-test/suite/innodb/t/undo_truncate.test new file mode 100644 index 00000000000..af6ed2b4372 --- /dev/null +++ b/mysql-test/suite/innodb/t/undo_truncate.test @@ -0,0 +1,122 @@ +--source include/have_innodb.inc +--source include/innodb_page_size.inc +--source include/have_undo_tablespaces.inc + +SET @save_undo_logs = @@GLOBAL.innodb_undo_logs; +SET @save_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency; +SET @save_truncate = @@GLOBAL.innodb_undo_log_truncate; +SET GLOBAL innodb_undo_log_truncate = 0; +SET GLOBAL innodb_undo_logs = 4; +SET GLOBAL innodb_purge_rseg_truncate_frequency = 1; + +SET @trunc_start= +(SELECT variable_value FROM information_schema.global_status +WHERE variable_name = 'innodb_undo_truncations'); + +#----------------------------------------------------------------------------- +# +# Perform DML action using multiple clients and multiple undo tablespace. +# +# +create table t1(keyc int primary key, c char(100)) engine = innodb; +create table t2(keyc int primary key, c char(100)) engine = innodb; +# +delimiter |; +CREATE PROCEDURE populate_t1() +BEGIN + DECLARE i INT DEFAULT 1; + while (i <= 20000) DO + insert into t1 values (i, 'a'); + SET i = i + 1; + END WHILE; +END | +delimiter ;| +# +delimiter |; +CREATE PROCEDURE populate_t2() +BEGIN + DECLARE i INT DEFAULT 1; + while (i <= 20000) DO + insert into t2 values (i, 'a'); + SET i = i + 1; + END WHILE; +END | +delimiter ;| +# +# +let DATADIR = `select @@datadir`; +connect (con1,localhost,root,,); +begin; +send call populate_t1(); + +connect (con2,localhost,root,,); +begin; +send call populate_t2(); + +connection con1; reap; send update t1 set c = 'mysql'; +connection con2; reap; send update t2 set c = 'mysql'; +connection con1; reap; send update t1 set c = 'oracle'; +connection con2; reap; send update t2 set c = 'oracle'; +connection con1; reap; send delete from t1; +connection con2; reap; delete from t2; +connection con1; reap; + +let CHECKFILE = $MYSQL_TMP_DIR/check.txt; +perl; +($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size1) + = stat("$ENV{DATADIR}/undo001"); +($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size2) + = stat("$ENV{DATADIR}/undo002"); +open(OUT, ">$ENV{CHECKFILE}") || die; +print OUT "let \$size1='$size1,$size2';\n"; +close(OUT); +EOF + +SET GLOBAL innodb_undo_log_truncate = 1; +commit; disconnect con1; +connection con2; commit; disconnect con2; + +connection default; +drop table t1, t2; +drop PROCEDURE populate_t1; +drop PROCEDURE populate_t2; + +--source include/wait_all_purged.inc + +# Truncation will normally not occur with innodb_page_size=64k, +# and occasionally not with innodb_page_size=32k, +# because the undo log will not grow enough. +if (`select @@innodb_page_size IN (4096,8192,16384)`) +{ + let $wait_condition = (SELECT variable_value!=@trunc_start + FROM information_schema.global_status + WHERE variable_name = 'innodb_undo_truncations'); + source include/wait_condition.inc; +} + +--source $CHECKFILE +perl; +($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size1) + = stat("$ENV{DATADIR}/undo001"); +($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size2) + = stat("$ENV{DATADIR}/undo002"); +open(OUT, ">$ENV{CHECKFILE}") || die; +print OUT "let \$size2='$size1,$size2';\n"; +close(OUT); +EOF + +--source $CHECKFILE +--remove_file $CHECKFILE + +if ($size1 == $size2) +{ + # This fails for innodb_page_size=64k, occasionally also for 32k. + if (`select @@innodb_page_size IN (4096,8192,16384)`) + { + echo Truncation did not happen: $size1; + } +} + +SET GLOBAL innodb_undo_logs = @save_undo_logs; +SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency; +SET GLOBAL innodb_undo_log_truncate = @save_truncate; diff --git a/mysql-test/suite/innodb/t/undo_truncate_recover.test b/mysql-test/suite/innodb/t/undo_truncate_recover.test new file mode 100644 index 00000000000..56647bcc567 --- /dev/null +++ b/mysql-test/suite/innodb/t/undo_truncate_recover.test @@ -0,0 +1,50 @@ +# +# WL#6965: Truncate UNDO logs. +# + +# With larger innodb_page_size, the undo log tablespaces do not grow enough. +--source include/innodb_page_size_small.inc +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_undo_tablespaces.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 + +SET GLOBAL innodb_undo_logs = 4; +SET GLOBAL innodb_undo_log_truncate = 1; +SET GLOBAL innodb_purge_rseg_truncate_frequency = 1; + +let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err; + +create table t1(keyc int primary key, c char(100)) engine = innodb; +begin; +--disable_query_log +let $i=30000; +while ($i) { + eval insert into t1 values(30000-$i, ''); + dec $i; +} +--enable_query_log +commit; + +let SEARCH_PATTERN = ib_undo_trunc; +begin; +update t1 set c = 'MariaDB'; +update t1 set c = 'InnoDB'; +eval set global debug_dbug = '+d,$SEARCH_PATTERN'; +commit; +# FIXME: remove this work-around, and generate less log! +call mtr.add_suppression("InnoDB: The redo log transaction size "); +SET GLOBAL innodb_fast_shutdown=0; +--source include/shutdown_mysqld.inc +--source include/search_pattern_in_file.inc +# FIXME: remove this work-around, and generate less log! +--let $restart_parameters= --innodb-buffer-pool-size=16m +--source include/start_mysqld.inc + +drop table t1; diff --git a/mysql-test/suite/innodb_fts/r/crash_recovery.result b/mysql-test/suite/innodb_fts/r/crash_recovery.result index 7bf86631d1e..7d596684344 100644 --- a/mysql-test/suite/innodb_fts/r/crash_recovery.result +++ b/mysql-test/suite/innodb_fts/r/crash_recovery.result @@ -1,3 +1,4 @@ +FLUSH TABLES; CREATE TABLE articles ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, title VARCHAR(200), diff --git a/mysql-test/suite/innodb_fts/r/fts_kill_query.result b/mysql-test/suite/innodb_fts/r/fts_kill_query.result new file mode 100644 index 00000000000..53ad9b3a37c --- /dev/null +++ b/mysql-test/suite/innodb_fts/r/fts_kill_query.result @@ -0,0 +1,9 @@ +CREATE TABLE t1 (a VARCHAR(7), b text, FULLTEXT KEY idx (a,b)) ENGINE=InnoDB; +COMMIT; +SELECT COUNT(*) FROM t1 +WHERE MATCH (a,b) AGAINST ('foo bar' IN BOOLEAN MODE); +connect con1,localhost,root,,; +KILL QUERY @id; +disconnect con1; +connection default; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb_fts/r/sync_ddl.result b/mysql-test/suite/innodb_fts/r/sync_ddl.result new file mode 100644 index 00000000000..441954dc77b --- /dev/null +++ b/mysql-test/suite/innodb_fts/r/sync_ddl.result @@ -0,0 +1,105 @@ +CREATE TABLE t1 ( +id INT AUTO_INCREMENT NOT NULL PRIMARY KEY, +value VARCHAR(1024) +) ENGINE=InnoDB; +CREATE FULLTEXT INDEX idx1 ON t1(value); +SET @save_debug = @@GLOBAL.debug_dbug; +SET GLOBAL debug_dbug = '+d,fts_instrument_sync_request,fts_instrument_sync_before_syncing,ib_trunc_sleep_before_fts_cache_clear'; +INSERT INTO t1 (value) VALUES +('By default or with the IN NATURAL LANGUAGE MODE modifier') +; +TRUNCATE TABLE t1; +DROP TABLE t1; +SET GLOBAL debug_dbug = @save_debug; +CREATE TABLE t1 ( +id INT AUTO_INCREMENT NOT NULL PRIMARY KEY, +value VARCHAR(1024) +) ENGINE=InnoDB; +CREATE FULLTEXT INDEX idx1 ON t1(value); +SET GLOBAL debug_dbug = '+d,fts_instrument_sync_request,fts_instrument_write_words_before_select_index,ib_trunc_sleep_before_fts_cache_clear'; +INSERT INTO t1 (value) VALUES +('By default or with the IN NATURAL LANGUAGE MODE modifier'), +('performs a natural language search for a string'), +('collection is a set of one or more columns included'), +('returns a relevance value; that is, a similarity measure'), +('and the text in that row in the columns named in'), +('By default, the search is performed in case-insensitive'), +('sensitive full-text search, use a binary collation '), +('example, a column that uses the latin1 character'), +('collation of latin1_bin to make it case sensitive') +; +TRUNCATE TABLE t1; +DROP TABLE t1; +SET GLOBAL debug_dbug = @save_debug; +CREATE TABLE t1 ( +value VARCHAR(1024) +) ENGINE=InnoDB; +CREATE FULLTEXT INDEX idx1 ON t1(value); +SET GLOBAL debug_dbug = '+d,fts_instrument_sync_request,fts_instrument_msg_sync_sleep'; +INSERT INTO t1 (value) VALUES +('By default or with the IN NATURAL LANGUAGE MODE modifier'), +('performs a natural language search for a string'), +('collection is a set of one or more columns included'), +('returns a relevance value; that is, a similarity measure'), +('and the text in that row in the columns named in'), +('By default, the search is performed in case-insensitive'), +('sensitive full-text search, use a binary collation '), +('example, a column that uses the latin1 character'), +('collation of latin1_bin to make it case sensitive') +; +DROP INDEX idx1 ON t1; +DROP TABLE t1; +SET GLOBAL debug_dbug = @save_debug; +CREATE TABLE t1 ( +value VARCHAR(1024) +) ENGINE=InnoDB; +CREATE FULLTEXT INDEX idx1 ON t1(value); +SET GLOBAL debug_dbug = '+d,fts_instrument_sync_request,fts_instrument_msg_sync_sleep'; +INSERT INTO t1 (value) VALUES +('By default or with the IN NATURAL LANGUAGE MODE modifier'), +('performs a natural language search for a string'), +('collection is a set of one or more columns included'), +('returns a relevance value; that is, a similarity measure'), +('and the text in that row in the columns named in'), +('By default, the search is performed in case-insensitive'), +('sensitive full-text search, use a binary collation '), +('example, a column that uses the latin1 character'), +('collation of latin1_bin to make it case sensitive') +; +ALTER TABLE t1 +DROP INDEX idx1, +ALGORITHM=INPLACE; +DROP TABLE t1; +SET GLOBAL debug_dbug = @save_debug; +CREATE TABLE t1 ( +value VARCHAR(1024) +) ENGINE=InnoDB; +CREATE FULLTEXT INDEX idx1 ON t1(value); +SET GLOBAL debug_dbug = '+d,fts_instrument_sync_request,fts_instrument_msg_sync_sleep'; +INSERT INTO t1 (value) VALUES +('example, a column that uses the latin1 character'), +('collation of latin1_bin to make it case sensitive') +; +ALTER TABLE t1 +DROP INDEX idx1, +ALGORITHM=COPY; +DROP TABLE t1; +SET GLOBAL debug_dbug = @save_debug; +CREATE TABLE t1 ( +id1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +value VARCHAR(1024) +) ENGINE=InnoDB; +CREATE FULLTEXT INDEX idx1 ON t1(value); +SET GLOBAL debug_dbug = '+d,fts_instrument_sync_request,fts_instrument_msg_sync_sleep'; +INSERT INTO t1 (value) VALUES +('example, a column that uses the latin1 character'), +('collation of latin1_bin to make it case sensitive') +; +ALTER TABLE t1 +DROP COLUMN id1, +ADD COLUMN id2 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, +DROP INDEX idx1, +ADD FULLTEXT INDEX idx2(value), +ALGORITHM=INPLACE; +DROP TABLE t1; +SET GLOBAL debug_dbug = @save_debug; diff --git a/mysql-test/suite/innodb_fts/r/truncate.result b/mysql-test/suite/innodb_fts/r/truncate.result deleted file mode 100644 index 0e21717a4d3..00000000000 --- a/mysql-test/suite/innodb_fts/r/truncate.result +++ /dev/null @@ -1,31 +0,0 @@ -# -# Bug#25053705 - INVALID I/O ON TABLE AFTER TRUNCATE -# -CREATE TABLE t1 (a INT, d INT, b VARCHAR(198), c CHAR(158), FULLTEXT fts1(c,b), -FULLTEXT fts2(c)); -TRUNCATE TABLE t1; -INSERT INTO t1 (a,d,b,c) VALUES ( -'79795','6',repeat('uololoaroolccaaruolraloouuoocorrcorurlu','1'), -repeat('orouculcaocuocloooolooloooaorlroclouulrrucclulalouaulrluorooaclllluuorc -cuullucocraloracurooulrooauuar','1')); -CREATE TABLE t2 (a INT, d INT, b VARCHAR(198), c CHAR(158), FULLTEXT fts1(c,b)); -INSERT INTO t2 VALUES (1, 1, repeat('uololoaroolccaaruolraloouuoocorrcorurlu','1'), -repeat('orouculcaocuocloooolooloooaorlroclouulrrucclulalouaulrluorooaclllluuorccuullucocraloracurooulrooauuar','1')); -create procedure insert_t2(IN total int) -begin -declare i int default 1; -while (i <= total) DO -insert into t2 select * from t2; -set i = i + 1; -end while; -end| -CALL insert_t2(15); -SET @save_dbug = @@SESSION.DEBUG_DBUG; -SET DEBUG_DBUG = '+d,innodb_invalid_read_after_truncate'; -INSERT INTO t1 (a,d,b,c) VALUES ( -'7795','6',repeat('uololoaroolccaaruolraloouuoocorrcorurlu','1'), -repeat('orouculcaocuocloooolooloooaorlroclouulrrucclulalouaulrluorooaclllluuorc -cuullucocraloracurooulrooauuar','1')); -SET DEBUG_DBUG = @save_dbug; -DROP PROCEDURE insert_t2; -DROP TABLE t1,t2; diff --git a/mysql-test/suite/innodb_fts/t/crash_recovery.test b/mysql-test/suite/innodb_fts/t/crash_recovery.test index 63843ef8511..f39d6680dfb 100644 --- a/mysql-test/suite/innodb_fts/t/crash_recovery.test +++ b/mysql-test/suite/innodb_fts/t/crash_recovery.test @@ -7,6 +7,7 @@ # The embedded server tests do not support restarting. --source include/not_embedded.inc +FLUSH TABLES; # 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 diff --git a/mysql-test/suite/innodb_fts/t/fts_kill_query.test b/mysql-test/suite/innodb_fts/t/fts_kill_query.test new file mode 100644 index 00000000000..3dda29a3876 --- /dev/null +++ b/mysql-test/suite/innodb_fts/t/fts_kill_query.test @@ -0,0 +1,30 @@ +--source include/have_innodb.inc + +CREATE TABLE t1 (a VARCHAR(7), b text, FULLTEXT KEY idx (a,b)) ENGINE=InnoDB; + +--disable_query_log +BEGIN; +let $n=1000; +while ($n) { +INSERT INTO t1 VALUES('foo bar','boo far'); +dec $n; +} +--enable_query_log +COMMIT; + +let $id = `SELECT CONNECTION_ID()`; +send SELECT COUNT(*) FROM t1 +WHERE MATCH (a,b) AGAINST ('foo bar' IN BOOLEAN MODE); + +connect (con1,localhost,root,,); +let $ignore= `SELECT @id := $ID`; +KILL QUERY @id; +disconnect con1; + +connection default; +# The following would return a result set if the KILL was not fast enough. +--disable_result_log +--error 0,ER_QUERY_INTERRUPTED,HA_ERR_ABORTED_BY_USER +reap; +--enable_result_log +DROP TABLE t1; diff --git a/mysql-test/suite/innodb_fts/t/innodb_fts_multiple_index.test b/mysql-test/suite/innodb_fts/t/innodb_fts_multiple_index.test index 012881173e0..c8293655d1b 100644 --- a/mysql-test/suite/innodb_fts/t/innodb_fts_multiple_index.test +++ b/mysql-test/suite/innodb_fts/t/innodb_fts_multiple_index.test @@ -25,7 +25,7 @@ ALTER TABLE t1 ADD FULLTEXT INDEX idx_1 (a); ALTER TABLE t1 ADD FULLTEXT INDEX idx_2 (b); EVAL SHOW CREATE TABLE t1; -# check mutiple index with transaction +# check multiple index with transaction START TRANSACTION; # Insert rows INSERT INTO t1 (a,b) VALUES diff --git a/mysql-test/suite/innodb_fts/t/sync_ddl.test b/mysql-test/suite/innodb_fts/t/sync_ddl.test new file mode 100644 index 00000000000..2950297d5bb --- /dev/null +++ b/mysql-test/suite/innodb_fts/t/sync_ddl.test @@ -0,0 +1,177 @@ +# +# BUG#27082268 FTS synchronization issues +# + +--source include/have_innodb.inc +--source include/have_debug.inc + +#-------------------------------------- +# Check FTS_sync vs TRUNCATE (1) +#-------------------------------------- + +CREATE TABLE t1 ( + id INT AUTO_INCREMENT NOT NULL PRIMARY KEY, + value VARCHAR(1024) + ) ENGINE=InnoDB; + +CREATE FULLTEXT INDEX idx1 ON t1(value); + +SET @save_debug = @@GLOBAL.debug_dbug; +SET GLOBAL debug_dbug = '+d,fts_instrument_sync_request,fts_instrument_sync_before_syncing,ib_trunc_sleep_before_fts_cache_clear'; + +INSERT INTO t1 (value) VALUES + ('By default or with the IN NATURAL LANGUAGE MODE modifier') + ; + +TRUNCATE TABLE t1; + +DROP TABLE t1; + +SET GLOBAL debug_dbug = @save_debug; + +#-------------------------------------- +# Check FTS sync vs DROP INDEX (2) +#-------------------------------------- + +CREATE TABLE t1 ( + id INT AUTO_INCREMENT NOT NULL PRIMARY KEY, + value VARCHAR(1024) + ) ENGINE=InnoDB; + +CREATE FULLTEXT INDEX idx1 ON t1(value); + +SET GLOBAL debug_dbug = '+d,fts_instrument_sync_request,fts_instrument_write_words_before_select_index,ib_trunc_sleep_before_fts_cache_clear'; + +INSERT INTO t1 (value) VALUES + ('By default or with the IN NATURAL LANGUAGE MODE modifier'), + ('performs a natural language search for a string'), + ('collection is a set of one or more columns included'), + ('returns a relevance value; that is, a similarity measure'), + ('and the text in that row in the columns named in'), + ('By default, the search is performed in case-insensitive'), + ('sensitive full-text search, use a binary collation '), + ('example, a column that uses the latin1 character'), + ('collation of latin1_bin to make it case sensitive') + ; + +TRUNCATE TABLE t1; + +DROP TABLE t1; + +SET GLOBAL debug_dbug = @save_debug; + +#-------------------------------------- +# Check FTS sync vs DROP INDEX +#-------------------------------------- + +CREATE TABLE t1 ( + value VARCHAR(1024) + ) ENGINE=InnoDB; + +CREATE FULLTEXT INDEX idx1 ON t1(value); + +SET GLOBAL debug_dbug = '+d,fts_instrument_sync_request,fts_instrument_msg_sync_sleep'; + +INSERT INTO t1 (value) VALUES + ('By default or with the IN NATURAL LANGUAGE MODE modifier'), + ('performs a natural language search for a string'), + ('collection is a set of one or more columns included'), + ('returns a relevance value; that is, a similarity measure'), + ('and the text in that row in the columns named in'), + ('By default, the search is performed in case-insensitive'), + ('sensitive full-text search, use a binary collation '), + ('example, a column that uses the latin1 character'), + ('collation of latin1_bin to make it case sensitive') + ; + +DROP INDEX idx1 ON t1; + +DROP TABLE t1; + +SET GLOBAL debug_dbug = @save_debug; + +#-------------------------------------- +# Check FTS sync vs ALTER TABLE DROP INDEX (INPLACE) +#-------------------------------------- + +CREATE TABLE t1 ( + value VARCHAR(1024) + ) ENGINE=InnoDB; + +CREATE FULLTEXT INDEX idx1 ON t1(value); + +SET GLOBAL debug_dbug = '+d,fts_instrument_sync_request,fts_instrument_msg_sync_sleep'; + +INSERT INTO t1 (value) VALUES + ('By default or with the IN NATURAL LANGUAGE MODE modifier'), + ('performs a natural language search for a string'), + ('collection is a set of one or more columns included'), + ('returns a relevance value; that is, a similarity measure'), + ('and the text in that row in the columns named in'), + ('By default, the search is performed in case-insensitive'), + ('sensitive full-text search, use a binary collation '), + ('example, a column that uses the latin1 character'), + ('collation of latin1_bin to make it case sensitive') + ; + +ALTER TABLE t1 + DROP INDEX idx1, + ALGORITHM=INPLACE; + +DROP TABLE t1; + +SET GLOBAL debug_dbug = @save_debug; + +#-------------------------------------- +# Check FTS sync vs ALTER TABLE DROP INDEX (COPY) +#-------------------------------------- + +CREATE TABLE t1 ( + value VARCHAR(1024) + ) ENGINE=InnoDB; + +CREATE FULLTEXT INDEX idx1 ON t1(value); + +SET GLOBAL debug_dbug = '+d,fts_instrument_sync_request,fts_instrument_msg_sync_sleep'; + +INSERT INTO t1 (value) VALUES + ('example, a column that uses the latin1 character'), + ('collation of latin1_bin to make it case sensitive') + ; + +ALTER TABLE t1 + DROP INDEX idx1, + ALGORITHM=COPY; + +DROP TABLE t1; + +SET GLOBAL debug_dbug = @save_debug; + +#-------------------------------------- +# Check FTS sync vs ALTER TABLE (INPLACE, new cluster) +#-------------------------------------- + +CREATE TABLE t1 ( + id1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + value VARCHAR(1024) + ) ENGINE=InnoDB; + +CREATE FULLTEXT INDEX idx1 ON t1(value); + +SET GLOBAL debug_dbug = '+d,fts_instrument_sync_request,fts_instrument_msg_sync_sleep'; + +INSERT INTO t1 (value) VALUES + ('example, a column that uses the latin1 character'), + ('collation of latin1_bin to make it case sensitive') + ; + +ALTER TABLE t1 + DROP COLUMN id1, + ADD COLUMN id2 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + DROP INDEX idx1, + ADD FULLTEXT INDEX idx2(value), + ALGORITHM=INPLACE; + +DROP TABLE t1; + +SET GLOBAL debug_dbug = @save_debug; diff --git a/mysql-test/suite/innodb_fts/t/truncate.opt b/mysql-test/suite/innodb_fts/t/truncate.opt deleted file mode 100644 index d143088d352..00000000000 --- a/mysql-test/suite/innodb_fts/t/truncate.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb-random-read-ahead=1 diff --git a/mysql-test/suite/innodb_fts/t/truncate.test b/mysql-test/suite/innodb_fts/t/truncate.test deleted file mode 100644 index 46ba732b019..00000000000 --- a/mysql-test/suite/innodb_fts/t/truncate.test +++ /dev/null @@ -1,50 +0,0 @@ ---source include/have_innodb.inc ---source include/have_debug.inc - ---echo # ---echo # Bug#25053705 - INVALID I/O ON TABLE AFTER TRUNCATE ---echo # - -CREATE TABLE t1 (a INT, d INT, b VARCHAR(198), c CHAR(158), FULLTEXT fts1(c,b), -FULLTEXT fts2(c)); - -TRUNCATE TABLE t1; - -INSERT INTO t1 (a,d,b,c) VALUES ( -'79795','6',repeat('uololoaroolccaaruolraloouuoocorrcorurlu','1'), -repeat('orouculcaocuocloooolooloooaorlroclouulrrucclulalouaulrluorooaclllluuorc -cuullucocraloracurooulrooauuar','1')); - -# The following CREATE TABLE and INSERTs are used to remove the pages related to table t1 -# from the buffer pool. -CREATE TABLE t2 (a INT, d INT, b VARCHAR(198), c CHAR(158), FULLTEXT fts1(c,b)); - -INSERT INTO t2 VALUES (1, 1, repeat('uololoaroolccaaruolraloouuoocorrcorurlu','1'), -repeat('orouculcaocuocloooolooloooaorlroclouulrrucclulalouaulrluorooaclllluuorccuullucocraloracurooulrooauuar','1')); - -delimiter |; -create procedure insert_t2(IN total int) -begin - declare i int default 1; - while (i <= total) DO - insert into t2 select * from t2; - set i = i + 1; - end while; -end| -delimiter ;| - -CALL insert_t2(15); - -SET @save_dbug = @@SESSION.DEBUG_DBUG; -SET DEBUG_DBUG = '+d,innodb_invalid_read_after_truncate'; - -INSERT INTO t1 (a,d,b,c) VALUES ( -'7795','6',repeat('uololoaroolccaaruolraloouuoocorrcorurlu','1'), -repeat('orouculcaocuocloooolooloooaorlroclouulrrucclulalouaulrluorooaclllluuorc -cuullucocraloracurooulrooauuar','1')); - -SET DEBUG_DBUG = @save_dbug; - -DROP PROCEDURE insert_t2; - -DROP TABLE t1,t2; 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 7caa5f6829c..d9febe4b6b6 100644 --- a/mysql-test/suite/innodb_gis/r/alter_spatial_index.result +++ b/mysql-test/suite/innodb_gis/r/alter_spatial_index.result @@ -521,7 +521,7 @@ HEX(c8) ROLLBACK; ALTER TABLE tab add COLUMN c9 POINT NOT NULL AFTER c5, ALGORITHM = INPLACE, LOCK=NONE; -ERROR 0A000: LOCK=NONE is not supported. Reason: Do not support online operation on table with GIS index. Try LOCK=SHARED +ALTER TABLE tab DROP COLUMN c9, ALGORITHM=INSTANT; SHOW CREATE TABLE tab; Table Create Table tab CREATE TABLE `tab` ( diff --git a/mysql-test/suite/innodb_gis/r/create_spatial_index.result b/mysql-test/suite/innodb_gis/r/create_spatial_index.result index fe46ef2e2f8..1af03c251bf 100644 --- a/mysql-test/suite/innodb_gis/r/create_spatial_index.result +++ b/mysql-test/suite/innodb_gis/r/create_spatial_index.result @@ -1286,7 +1286,7 @@ CREATE SPATIAL INDEX idx2 ON t1(c1); DROP TABLE t1; CREATE TABLE mysql.innodb_table_stats ( database_name varchar(64) COLLATE utf8_bin NOT NULL, -table_name varchar(64) COLLATE utf8_bin NOT NULL, +table_name varchar(199) COLLATE utf8_bin NOT NULL, last_update timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, n_rows bigint(20) unsigned NOT NULL, clustered_index_size bigint(20) unsigned NOT NULL, diff --git a/mysql-test/suite/innodb_gis/r/rtree_concurrent_srch.result b/mysql-test/suite/innodb_gis/r/rtree_concurrent_srch.result index 1b52059fff9..9c5db3e06aa 100644 --- a/mysql-test/suite/innodb_gis/r/rtree_concurrent_srch.result +++ b/mysql-test/suite/innodb_gis/r/rtree_concurrent_srch.result @@ -260,9 +260,7 @@ INSERT INTO t1 VALUES (1, ST_GeomFromText('LineString(6 6, 190 190)')); INSERT INTO t1 VALUES (1, ST_GeomFromText('LineString(7 7, 200 200)')); INSERT INTO t1 VALUES (1, ST_GeomFromText('LineString(8 8, 210 210)')); connect a,localhost,root,,; -SET SESSION debug="+d,rtr_pcur_move_to_next_return"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead +SET SESSION debug_dbug='+d,rtr_pcur_move_to_next_return'; set transaction isolation level serializable; start transaction; set @g1 = ST_GeomFromText('Polygon((100 100, 100 110, 110 110, 110 100, 100 100))'); 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 653e250017a..5843c6fc8f6 100644 --- a/mysql-test/suite/innodb_gis/t/alter_spatial_index.test +++ b/mysql-test/suite/innodb_gis/t/alter_spatial_index.test @@ -491,9 +491,8 @@ FROM tab LIMIT 1; SELECT HEX(c8) FROM tab; ROLLBACK; -# not instant, not supported ---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON ALTER TABLE tab add COLUMN c9 POINT NOT NULL AFTER c5, ALGORITHM = INPLACE, LOCK=NONE; +ALTER TABLE tab DROP COLUMN c9, ALGORITHM=INSTANT; SHOW CREATE TABLE tab; diff --git a/mysql-test/suite/innodb_gis/t/create_spatial_index.test b/mysql-test/suite/innodb_gis/t/create_spatial_index.test index f8626b3c052..7ddece9ad86 100644 --- a/mysql-test/suite/innodb_gis/t/create_spatial_index.test +++ b/mysql-test/suite/innodb_gis/t/create_spatial_index.test @@ -1168,7 +1168,7 @@ CREATE SPATIAL INDEX idx2 ON t1(c1); DROP TABLE t1; CREATE TABLE mysql.innodb_table_stats ( database_name varchar(64) COLLATE utf8_bin NOT NULL, - table_name varchar(64) COLLATE utf8_bin NOT NULL, + table_name varchar(199) COLLATE utf8_bin NOT NULL, last_update timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, n_rows bigint(20) unsigned NOT NULL, clustered_index_size bigint(20) unsigned NOT NULL, diff --git a/mysql-test/suite/innodb_gis/t/rtree_concurrent_srch.test b/mysql-test/suite/innodb_gis/t/rtree_concurrent_srch.test index c10ce368b11..43119415d47 100644 --- a/mysql-test/suite/innodb_gis/t/rtree_concurrent_srch.test +++ b/mysql-test/suite/innodb_gis/t/rtree_concurrent_srch.test @@ -307,7 +307,7 @@ INSERT INTO t1 VALUES (1, ST_GeomFromText('LineString(7 7, 200 200)')); INSERT INTO t1 VALUES (1, ST_GeomFromText('LineString(8 8, 210 210)')); connect (a,localhost,root,,); -SET SESSION debug="+d,rtr_pcur_move_to_next_return"; +SET SESSION debug_dbug='+d,rtr_pcur_move_to_next_return'; set transaction isolation level serializable; start transaction; diff --git a/mysql-test/suite/innodb_undo/include/truncate_recover.inc b/mysql-test/suite/innodb_undo/include/truncate_recover.inc deleted file mode 100644 index fe068afa6e3..00000000000 --- a/mysql-test/suite/innodb_undo/include/truncate_recover.inc +++ /dev/null @@ -1,8 +0,0 @@ -begin; -update t1 set c = 'MariaDB'; -update t1 set c = 'InnoDB'; -eval set global debug_dbug = '+d,$SEARCH_PATTERN'; -commit; ---source include/shutdown_mysqld.inc ---source include/search_pattern_in_file.inc ---source include/start_mysqld.inc diff --git a/mysql-test/suite/innodb_undo/r/truncate.result b/mysql-test/suite/innodb_undo/r/truncate.result deleted file mode 100644 index 4f62d85e08a..00000000000 --- a/mysql-test/suite/innodb_undo/r/truncate.result +++ /dev/null @@ -1,11 +0,0 @@ -SET GLOBAL innodb_fast_shutdown=0; -create table t1(keyc int primary key, c1 char(100)) engine = innodb; -begin; -update t1 set c1 = 'mysql'; -update t1 set c1 = 'oracle'; -delete from t1; -commit; -drop table t1; -SET GLOBAL innodb_fast_shutdown=0; -SET GLOBAL innodb_undo_log_truncate=1; -SET GLOBAL innodb_purge_rseg_truncate_frequency=1; diff --git a/mysql-test/suite/innodb_undo/r/truncate_recover.result b/mysql-test/suite/innodb_undo/r/truncate_recover.result deleted file mode 100644 index f89bc0a9e47..00000000000 --- a/mysql-test/suite/innodb_undo/r/truncate_recover.result +++ /dev/null @@ -1,15 +0,0 @@ -create table t1(keyc int primary key, c char(100)) engine = innodb; -begin; -commit; -begin; -update t1 set c = 'MariaDB'; -update t1 set c = 'InnoDB'; -set global debug_dbug = '+d,ib_undo_trunc_before_truncate'; -commit; -FOUND 1 /ib_undo_trunc_before_truncate/ in mysqld.1.err -begin; -update t1 set c = 'MariaDB'; -update t1 set c = 'InnoDB'; -set global debug_dbug = '+d,ib_undo_trunc_before_ddl_log_end'; -commit; -FOUND 1 /ib_undo_trunc_before_ddl_log_end/ in mysqld.1.err diff --git a/mysql-test/suite/innodb_undo/t/truncate.test b/mysql-test/suite/innodb_undo/t/truncate.test deleted file mode 100644 index 2c612478929..00000000000 --- a/mysql-test/suite/innodb_undo/t/truncate.test +++ /dev/null @@ -1,72 +0,0 @@ -# -# WL#6965: Truncate UNDO logs. -# - ---source include/have_innodb.inc ---source include/have_innodb_max_16k.inc ---source include/have_undo_tablespaces.inc - -# The test is restarting the server to force undo truncation. ---source include/not_embedded.inc - -SET GLOBAL innodb_fast_shutdown=0; ---let $restart_parameters=--innodb_undo_tablespaces=2 --innodb_undo_logs=4 ---source include/restart_mysqld.inc - -let MYSQLD_DATADIR = `select @@datadir`; - -#----------------------------------------------------------------------------- -# -# 1. Perform enough DML action so that undo tablespace size grows beyond -# set threshold and then wait and see if it is being truncated. -# -create table t1(keyc int primary key, c1 char(100)) engine = innodb; -begin; ---disable_query_log -let $i=30000; -while ($i) { - eval insert into t1 values(30000-$i, ''); - dec $i; -} ---enable_query_log -update t1 set c1 = 'mysql'; -update t1 set c1 = 'oracle'; -delete from t1; -commit; -drop table t1; - -let CHECKFILE = $MYSQL_TMP_DIR/check.txt; -perl; -($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size1) - = stat("$ENV{MYSQLD_DATADIR}/undo001"); -($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size2) - = stat("$ENV{MYSQLD_DATADIR}/undo002"); -open(OUT, ">$ENV{CHECKFILE}") || die; -print OUT "let \$size1='$size1,$size2';\n"; -close(OUT); -EOF -SET GLOBAL innodb_fast_shutdown=0; -SET GLOBAL innodb_undo_log_truncate=1; -SET GLOBAL innodb_purge_rseg_truncate_frequency=1; ---source include/shutdown_mysqld.inc ---source $CHECKFILE -perl; -($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size1) - = stat("$ENV{MYSQLD_DATADIR}/undo001"); -($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size2) - = stat("$ENV{MYSQLD_DATADIR}/undo002"); -open(OUT, ">$ENV{CHECKFILE}") || die; -print OUT "let \$size2='$size1,$size2';\n"; -close(OUT); -EOF - ---source $CHECKFILE ---remove_file $CHECKFILE - -if ($size1 == $size2) -{ - echo Truncation did not happen: $size1 == $size2; -} - ---let $restart_parameters= ---source include/start_mysqld.inc diff --git a/mysql-test/suite/innodb_undo/t/truncate_multi_client.test b/mysql-test/suite/innodb_undo/t/truncate_multi_client.test deleted file mode 100644 index ac4ead00b51..00000000000 --- a/mysql-test/suite/innodb_undo/t/truncate_multi_client.test +++ /dev/null @@ -1,77 +0,0 @@ -# -# WL#6965: Truncate UNDO logs. -# - ---source include/have_innodb.inc -# This test is restarting the server. ---source include/not_embedded.inc -# With larger innodb_page_size, the undo log tablespaces do not grow enough. ---source include/have_innodb_max_16k.inc ---source include/have_undo_tablespaces.inc - -SET GLOBAL innodb_fast_shutdown=0; ---let $restart_parameters=--innodb_undo_tablespaces=2 --innodb_undo_logs=4 ---source include/restart_mysqld.inc - -#----------------------------------------------------------------------------- -# -# Perform DML action using multiple clients and multiple undo tablespace. -# -# -create table t1(keyc int primary key, c char(100)) engine = innodb; -create table t2(keyc int primary key, c char(100)) engine = innodb; -# -delimiter |; -CREATE PROCEDURE populate_t1() -BEGIN - DECLARE i INT DEFAULT 1; - while (i <= 20000) DO - insert into t1 values (i, 'a'); - SET i = i + 1; - END WHILE; -END | -delimiter ;| -# -delimiter |; -CREATE PROCEDURE populate_t2() -BEGIN - DECLARE i INT DEFAULT 1; - while (i <= 20000) DO - insert into t2 values (i, 'a'); - SET i = i + 1; - END WHILE; -END | -delimiter ;| -# -# -connect (con1,localhost,root,,); -begin; -send call populate_t1(); - -connect (con2,localhost,root,,); -begin; -send call populate_t2(); - -connection con1; reap; send update t1 set c = 'mysql'; -connection con2; reap; send update t2 set c = 'mysql'; -connection con1; reap; send update t1 set c = 'oracle'; -connection con2; reap; send update t2 set c = 'oracle'; -connection con1; reap; send delete from t1; -connection con2; reap; send delete from t2; -connection con1; reap; commit; disconnect con1; -connection con2; reap; commit; disconnect con2; - -connection default; -drop table t1, t2; -drop PROCEDURE populate_t1; -drop PROCEDURE populate_t2; - -SET GLOBAL innodb_fast_shutdown=0; -SET GLOBAL innodb_undo_log_truncate=1; -SET GLOBAL innodb_purge_rseg_truncate_frequency=1; - ---source include/restart_mysqld.inc - -let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err; -let SEARCH_PATTERN = Truncating UNDO tablespace 1; ---source include/search_pattern_in_file.inc diff --git a/mysql-test/suite/innodb_undo/t/truncate_recover.test b/mysql-test/suite/innodb_undo/t/truncate_recover.test deleted file mode 100644 index 8087d191f1e..00000000000 --- a/mysql-test/suite/innodb_undo/t/truncate_recover.test +++ /dev/null @@ -1,50 +0,0 @@ -# -# WL#6965: Truncate UNDO logs. -# - ---source include/have_innodb.inc ---source include/have_debug.inc -# With larger innodb_page_size, the undo log tablespaces do not grow enough. ---source include/have_innodb_max_16k.inc ---source include/have_undo_tablespaces.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 - ---disable_query_log -# FIXME: The doublewrite buffer should not issue these warnings. -# FIXME: Maybe buf_dblwr_process() should empty the buffer at the end? -call mtr.add_suppression("InnoDB: A copy of page.*in the doublewrite buffer slot.*is not within space bounds"); -FLUSH TABLES; ---enable_query_log - ---let $restart_parameters=--innodb-undo-logs=4 --innodb-undo-tablespaces=2 --innodb-undo-log-truncate=1 --innodb-max-undo-log-size=10485760 --innodb-purge-rseg-truncate-frequency=1 --innodb-fast-shutdown=0 ---source include/restart_mysqld.inc - -let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err; - -create table t1(keyc int primary key, c char(100)) engine = innodb; -begin; ---disable_query_log -let $i=30000; -while ($i) { - eval insert into t1 values(30000-$i, ''); - dec $i; -} ---enable_query_log -commit; - -let SEARCH_PATTERN = ib_undo_trunc_before_truncate; ---source include/truncate_recover.inc - -let SEARCH_PATTERN = ib_undo_trunc_before_ddl_log_end; ---source include/truncate_recover.inc - -let SEARCH_PATTERN = ib_undo_trunc_trunc_done; -let $restart_parameters= ---source include/truncate_recover.inc -drop table t1; diff --git a/mysql-test/suite/innodb_zip/include/innodb_wl6501_scale.inc b/mysql-test/suite/innodb_zip/include/innodb_wl6501_scale.inc deleted file mode 100644 index 99bf065c515..00000000000 --- a/mysql-test/suite/innodb_zip/include/innodb_wl6501_scale.inc +++ /dev/null @@ -1,110 +0,0 @@ -# -# load tables with some significant amount of data and then truncate it. -# - -#----------------------------------------------------------------------------- -# -# create test-bed -# -let $per_table = `select @@innodb_file_per_table`; - -let $WL6501_TMP_DIR = `select @@tmpdir`; -let $WL6501_DATA_DIR = `select @@datadir`; -set innodb_strict_mode=OFF; - -#----------------------------------------------------------------------------- -# -# create procedure to load data -# -delimiter |; -create procedure populate() -begin - declare i int default 1; - while (i <= 5000) do - insert into t1 values (i, 'a', 'b'); - insert into t2 values (i, 'a', 'b'); - insert into t3 values (i, 'a', 'b'); - set i = i + 1; - end while; -end| -create procedure populate_small() -begin - declare i int default 10001; - while (i <= 12000) do - insert into t1 values (i, 'c', 'd'); - insert into t2 values (i, 'a', 'b'); - insert into t3 values (i, 'a', 'b'); - set i = i + 1; - end while; -end| -delimiter ;| - -#----------------------------------------------------------------------------- -# -# create and load the tables. -# -eval set global innodb_file_per_table = $wl6501_file_per_table; ---replace_regex /[0-9]+/NUMBER/ -eval create table t1 - (i int, c1 char(100), c2 char(100), - index c1_idx(c1)) - engine=innodb row_format=$wl6501_row_fmt - key_block_size=$wl6501_kbs; -eval create table t2 - (i int, c1 char(100), c2 char(100), - index c1_idx(c1)) - engine=innodb row_format=$wl6501_row_fmt - key_block_size=$wl6501_kbs; -eval create temporary table t3 - (i int, c1 char(100), c2 char(100), - index c1_idx(c1)) - engine=innodb row_format=$wl6501_row_fmt - key_block_size=$wl6501_kbs; -# -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -begin; -call populate(); -commit; -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -# -truncate table t1; -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -# -call populate_small(); -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -# -truncate table t2; -truncate table t3; -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -# -call populate_small(); -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -# -drop table t1; -drop table t2; -drop table t3; - -#----------------------------------------------------------------------------- -# -# drop the procedure -# -drop procedure populate; -drop procedure populate_small; - -#----------------------------------------------------------------------------- -# -# remove test-bed -# -eval set global innodb_file_per_table = $per_table; 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 58d35cf2603..4866c152640 100644 --- a/mysql-test/suite/innodb_zip/r/index_large_prefix.result +++ b/mysql-test/suite/innodb_zip/r/index_large_prefix.result @@ -337,7 +337,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 -Error 1071 Specified key was too long; max key length is 3072 bytes +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 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/restart.result b/mysql-test/suite/innodb_zip/r/restart.result index 1075cf990b2..262c34df5fb 100644 --- a/mysql-test/suite/innodb_zip/r/restart.result +++ b/mysql-test/suite/innodb_zip/r/restart.result @@ -419,12 +419,12 @@ ALTER TABLE t7_restart TRUNCATE PARTITION p1; === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -test/t5_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd test/t6_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd test/t6_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd -test/t6_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd +test/t5_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd +test/t6_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd INSERT INTO t5_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot'); @@ -523,12 +523,12 @@ innodb_file_per_table ON === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -test/t5_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd test/t6_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd test/t6_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd -test/t6_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd +test/t5_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd +test/t6_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd SELECT count(*) FROM t5_restart; @@ -624,12 +624,12 @@ RENAME TABLE t7_restart TO t77_restart; === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd test/t66_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd test/t66_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd -test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd +test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd +test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart); @@ -721,12 +721,12 @@ innodb_file_per_table ON === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd test/t66_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd test/t66_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd -test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd +test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd +test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart); @@ -854,12 +854,12 @@ t77_restart#p#p1#sp#s3.ibd === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd -test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd test/t66_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p0.ibd test/t66_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p1.ibd -test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p2.ibd test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s0.ibd test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s1.ibd +test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd +test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p2.ibd test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s2.ibd test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s3.ibd INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart); @@ -991,12 +991,12 @@ t77_restart.par === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t55_restart.ibd test/t66_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQLD_DATADIR/test/t66_restart#p#p0.ibd test/t66_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQLD_DATADIR/test/t66_restart#p#p1.ibd -test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQLD_DATADIR/test/t66_restart#p#p2.ibd test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s0.ibd test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s1.ibd +test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t55_restart.ibd +test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQLD_DATADIR/test/t66_restart#p#p2.ibd test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s2.ibd test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s3.ibd INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart); diff --git a/mysql-test/suite/innodb_zip/r/wl6501_1.result b/mysql-test/suite/innodb_zip/r/wl6501_1.result deleted file mode 100644 index bf901804be5..00000000000 --- a/mysql-test/suite/innodb_zip/r/wl6501_1.result +++ /dev/null @@ -1,1202 +0,0 @@ -set global innodb_file_per_table=on; -# Verify that 'TRUNCATE TABLE' statement works fine and the size -# of .ibd file is equal to the initial size after truncation. -drop table if exists t1,t2,t3,t4,t6; -Warnings: -Note 1051 Unknown table 'test.t1' -Note 1051 Unknown table 'test.t2' -Note 1051 Unknown table 'test.t3' -Note 1051 Unknown table 'test.t4' -Note 1051 Unknown table 'test.t6' -create table t1(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=redundant; -create table t2(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compact; -create table t3(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compressed key_block_size=4; -create table t4(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=dynamic; -create temporary table t5(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb; -create table t6 ( a int ) engine = innodb; -insert into t6 values (50),(100),(150); -select count(*) from t1; -count(*) -3 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -count(*) -3 -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_during_drop_index_temp_table"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_during_drop_index_temp_table point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t5; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -3 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_on_drop_of_sec_index point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t1; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_on_drop_of_sec_index point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t2; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_on_drop_of_sec_index point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t3; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_on_drop_of_sec_index point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t4; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -0 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -drop table t1, t2, t3, t4, t6; -create table t1(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=redundant; -create table t2(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compact; -create table t3(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compressed key_block_size=4; -create table t4(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=dynamic; -create temporary table t5(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb; -create table t6 ( a int ) engine = innodb; -insert into t6 values (50),(100),(150); -select count(*) from t1; -count(*) -3 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -count(*) -3 -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_drop_reinit_done_create_to_start---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t5; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -3 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_on_create_of_sec_index---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t1; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_on_create_of_sec_index---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t2; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_on_create_of_sec_index---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t3; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_on_create_of_sec_index---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t4; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -0 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -drop table t1, t2, t3, t4, t6; -create table t1(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=redundant; -create table t2(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compact; -create table t3(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compressed key_block_size=4; -create table t4(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=dynamic; -create temporary table t5(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb; -create table t6 ( a int ) engine = innodb; -insert into t6 values (50),(100),(150); -select count(*) from t1; -count(*) -3 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -count(*) -3 -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_before_log_removal point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t1; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_before_log_removal point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t2; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_before_log_removal point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t3; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_before_log_removal point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t4; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -0 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -drop table t1, t2, t3, t4, t6; -create table t1(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=redundant; -create table t2(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compact; -create table t3(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compressed key_block_size=4; -create table t4(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=dynamic; -create temporary table t5(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb; -create table t6 ( a int ) engine = innodb; -insert into t6 values (50),(100),(150); -select count(*) from t1; -count(*) -3 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -count(*) -3 -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_after_truncate_done point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t1; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_after_truncate_done point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t2; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_after_truncate_done point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t3; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_after_truncate_done point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t4; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -0 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -drop table t1, t2, t3, t4, t6; -create table t1(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=redundant; -create table t2(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compact; -create table t3(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compressed key_block_size=4; -create table t4(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=dynamic; -create temporary table t5(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb; -create table t6 ( a int ) engine = innodb; -insert into t6 values (50),(100),(150); -select count(*) from t1; -count(*) -3 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -count(*) -3 -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_after_truncate_done point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t1; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_after_truncate_done point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t2; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_after_truncate_done point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t3; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_after_truncate_done point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t4; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -0 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -drop table t1, t2, t3, t4, t6; -create table t1(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=redundant; -create table t2(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compact; -create table t3(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compressed key_block_size=4; -create table t4(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=dynamic; -create temporary table t5(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb; -create table t6 ( a int ) engine = innodb; -insert into t6 values (50),(100),(150); -select count(*) from t1; -count(*) -3 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -count(*) -3 -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_after_redo_log_write_complete point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t1; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_after_redo_log_write_complete point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t2; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_after_redo_log_write_complete point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t3; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -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 -"---debug ib_trunc_crash_after_redo_log_write_complete point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t4; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -0 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -drop table t1, t2, t3, t4, t6; diff --git a/mysql-test/suite/innodb_zip/r/wl6501_crash_3.result b/mysql-test/suite/innodb_zip/r/wl6501_crash_3.result deleted file mode 100644 index 554bb2892f6..00000000000 --- a/mysql-test/suite/innodb_zip/r/wl6501_crash_3.result +++ /dev/null @@ -1,462 +0,0 @@ -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'"); -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 innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine=innodb row_format=compressed -key_block_size=16; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"2. Hit crash point on completion of redo log write." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 16; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"3. Hit crash point while dropping indexes." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 16; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f)) -engine = innodb row_format = compressed -key_block_size = 16; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 16; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"4. Hit crash point on completing drop of all indexes before creation" -" of index is commenced." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 16; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"5. Hit crash point while creating indexes." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 16; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f)) -engine = innodb row_format = compressed -key_block_size = 16; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 16; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"6. Hit crash point after data is updated to system-table and" -" in-memory dict." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 16; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"7. Hit crash point before/after log checkpoint is done." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 16; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 16; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -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 deleted file mode 100644 index d766ecceaac..00000000000 --- a/mysql-test/suite/innodb_zip/r/wl6501_crash_4.result +++ /dev/null @@ -1,519 +0,0 @@ -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'"); -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 innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine=innodb row_format=compressed -key_block_size=4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"2. Hit crash point on completion of redo log write." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"3. Hit crash point while dropping indexes." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"4. Hit crash point on completing drop of all indexes before creation" -" of index is commenced." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"5. Hit crash point while creating indexes." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"6. Hit crash point after data is updated to system-table and" -" in-memory dict." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"7. Hit crash point before/after log checkpoint is done." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -set global innodb_file_per_table = 1; -call mtr.add_suppression("does not exist in the InnoDB internal"); -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 innodb_strict_mode=off; -create temporary table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -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 -"2. Hit crash point after data is updated to system-table and" -" in-memory dict." -set global innodb_file_per_table = 1; -set innodb_strict_mode=off; -create temporary table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -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_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 deleted file mode 100644 index b5fea6382ff..00000000000 --- a/mysql-test/suite/innodb_zip/r/wl6501_crash_5.result +++ /dev/null @@ -1,462 +0,0 @@ -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'"); -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 innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine=innodb row_format=compressed -key_block_size=8; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"2. Hit crash point on completion of redo log write." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 8; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"3. Hit crash point while dropping indexes." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 8; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f)) -engine = innodb row_format = compressed -key_block_size = 8; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 8; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"4. Hit crash point on completing drop of all indexes before creation" -" of index is commenced." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 8; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"5. Hit crash point while creating indexes." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 8; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f)) -engine = innodb row_format = compressed -key_block_size = 8; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 8; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"6. Hit crash point after data is updated to system-table and" -" in-memory dict." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 8; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"7. Hit crash point before/after log checkpoint is done." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 8; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 8; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -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 deleted file mode 100644 index 464a97ba2fe..00000000000 --- a/mysql-test/suite/innodb_zip/r/wl6501_scale_1.result +++ /dev/null @@ -1,336 +0,0 @@ -set innodb_strict_mode=OFF; -create procedure populate() -begin -declare i int default 1; -while (i <= 5000) do -insert into t1 values (i, 'a', 'b'); -insert into t2 values (i, 'a', 'b'); -insert into t3 values (i, 'a', 'b'); -set i = i + 1; -end while; -end| -create procedure populate_small() -begin -declare i int default 10001; -while (i <= 12000) do -insert into t1 values (i, 'c', 'd'); -insert into t2 values (i, 'a', 'b'); -insert into t3 values (i, 'a', 'b'); -set i = i + 1; -end while; -end| -set global innodb_file_per_table = 1; -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: 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: 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 is ignored for TEMPORARY TABLE. -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16. -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -begin; -call populate(); -commit; -select count(*) from t1; -count(*) -5000 -select count(*) from t2; -count(*) -5000 -select count(*) from t3; -count(*) -5000 -truncate table t1; -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -5000 -select count(*) from t3; -count(*) -5000 -call populate_small(); -select count(*) from t1; -count(*) -2000 -select count(*) from t2; -count(*) -7000 -select count(*) from t3; -count(*) -7000 -truncate table t2; -truncate table t3; -select count(*) from t1; -count(*) -2000 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -call populate_small(); -select count(*) from t1; -count(*) -4000 -select count(*) from t2; -count(*) -2000 -select count(*) from t3; -count(*) -2000 -drop table t1; -drop table t2; -drop table t3; -drop procedure populate; -drop procedure populate_small; -set global innodb_file_per_table = 1; -set innodb_strict_mode=OFF; -create procedure populate() -begin -declare i int default 1; -while (i <= 5000) do -insert into t1 values (i, 'a', 'b'); -insert into t2 values (i, 'a', 'b'); -insert into t3 values (i, 'a', 'b'); -set i = i + 1; -end while; -end| -create procedure populate_small() -begin -declare i int default 10001; -while (i <= 12000) do -insert into t1 values (i, 'c', 'd'); -insert into t2 values (i, 'a', 'b'); -insert into t3 values (i, 'a', 'b'); -set i = i + 1; -end while; -end| -set global innodb_file_per_table = 1; -create table tNUMBER -(i int, cNUMBER char(NUMBER), cNUMBER char(NUMBER), -index cNUMBER_idx(cNUMBER)) -engine=innodb row_format=compressed -key_block_size=NUMBER; -create table t2 -(i int, c1 char(100), c2 char(100), -index c1_idx(c1)) -engine=innodb row_format=compressed -key_block_size=16; -create temporary table t3 -(i int, c1 char(100), c2 char(100), -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 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -begin; -call populate(); -commit; -select count(*) from t1; -count(*) -5000 -select count(*) from t2; -count(*) -5000 -select count(*) from t3; -count(*) -5000 -truncate table t1; -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -5000 -select count(*) from t3; -count(*) -5000 -call populate_small(); -select count(*) from t1; -count(*) -2000 -select count(*) from t2; -count(*) -7000 -select count(*) from t3; -count(*) -7000 -truncate table t2; -truncate table t3; -select count(*) from t1; -count(*) -2000 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -call populate_small(); -select count(*) from t1; -count(*) -4000 -select count(*) from t2; -count(*) -2000 -select count(*) from t3; -count(*) -2000 -drop table t1; -drop table t2; -drop table t3; -drop procedure populate; -drop procedure populate_small; -set global innodb_file_per_table = 1; -set innodb_strict_mode=OFF; -create procedure populate() -begin -declare i int default 1; -while (i <= 5000) do -insert into t1 values (i, 'a', 'b'); -insert into t2 values (i, 'a', 'b'); -insert into t3 values (i, 'a', 'b'); -set i = i + 1; -end while; -end| -create procedure populate_small() -begin -declare i int default 10001; -while (i <= 12000) do -insert into t1 values (i, 'c', 'd'); -insert into t2 values (i, 'a', 'b'); -insert into t3 values (i, 'a', 'b'); -set i = i + 1; -end while; -end| -set global innodb_file_per_table = 0; -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_per_table. -Warning NUMBER InnoDB: ignoring KEY_BLOCK_SIZE=NUMBER. -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_per_table. -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16. -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 is ignored for TEMPORARY TABLE. -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16. -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -begin; -call populate(); -commit; -select count(*) from t1; -count(*) -5000 -select count(*) from t2; -count(*) -5000 -select count(*) from t3; -count(*) -5000 -truncate table t1; -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -5000 -select count(*) from t3; -count(*) -5000 -call populate_small(); -select count(*) from t1; -count(*) -2000 -select count(*) from t2; -count(*) -7000 -select count(*) from t3; -count(*) -7000 -truncate table t2; -truncate table t3; -select count(*) from t1; -count(*) -2000 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -call populate_small(); -select count(*) from t1; -count(*) -4000 -select count(*) from t2; -count(*) -2000 -select count(*) from t3; -count(*) -2000 -drop table t1; -drop table t2; -drop table t3; -drop procedure populate; -drop procedure populate_small; -set global innodb_file_per_table = 1; diff --git a/mysql-test/suite/innodb_zip/t/wl6501_1.test b/mysql-test/suite/innodb_zip/t/wl6501_1.test deleted file mode 100644 index dd8b5f65b31..00000000000 --- a/mysql-test/suite/innodb_zip/t/wl6501_1.test +++ /dev/null @@ -1,451 +0,0 @@ - -#################################################################### -# TC to check truncate table statement atomicity for single # -# tablespace # -# Sceanrio covered: # -# 1. Debug points added for worklog # -# 2. Table with differnt row types # -# 3. Transactional statement. # -#################################################################### - - ---source include/have_innodb.inc ---source include/have_debug.inc ---source include/big_test.inc ---source include/have_innodb_16k.inc - -# Valgrind would result in a "long semaphore wait" inside InnoDB ---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 - -#----------------------------------------------------------------------- ---disable_query_log -let $MYSQL_DATA_DIR= `select @@datadir`; -let $data_directory = data directory='$MYSQL_TMP_DIR/alt_dir'; -let $innodb_file_per_table_orig=`select @@innodb_file_per_table`; - -call mtr.add_suppression("InnoDB.*table did not exist in the InnoDB data dictionary.*"); -call mtr.add_suppression("InnoDB: A page in the doublewrite buffer is not within space bounds.*"); -call mtr.add_suppression("InnoDB: Cannot create file.*"); -call mtr.add_suppression("InnoDB: Error number 17 means 'File exists'.*"); -call mtr.add_suppression("InnoDB: A page in the doublewrite buffer is not within space bounds"); -call mtr.add_suppression("InnoDB: Error: table .* does not exist in the InnoDB internal"); ---enable_query_log - -#----------------------------------------------------------------------- -set global innodb_file_per_table=on; ---echo # Verify that 'TRUNCATE TABLE' statement works fine and the size ---echo # of .ibd file is equal to the initial size after truncation. - -#----------------------------------------------------------------------- -drop table if exists t1,t2,t3,t4,t6; -let $cnt = 6; -while ($cnt) { - - # table with basic data type + primary ,secondary,composite,prefix index - create table t1(c1 int not null, - c2 int not null, - c3 char(255) not null, - c4 text(500) not null, - c5 blob(500) not null, - c6 varchar(500) not null, - c7 varchar(500) not null, - c8 datetime, - c9 decimal(5,3), - primary key (c1), - index (c3,c4(50),c5(50)), - index (c2)) - engine=innodb row_format=redundant; - - - create table t2(c1 int not null, - c2 int not null, - c3 char(255) not null, - c4 text(500) not null, - c5 blob(500) not null, - c6 varchar(500) not null, - c7 varchar(500) not null, - c8 datetime, - c9 decimal(5,3), - primary key (c1), - index (c3,c4(50),c5(50)), - index (c2)) - engine=innodb row_format=compact; - - - # with row type , key block size = 4K - create table t3(c1 int not null, - c2 int not null, - c3 char(255) not null, - c4 text(500) not null, - c5 blob(500) not null, - c6 varchar(500) not null, - c7 varchar(500) not null, - c8 datetime, - c9 decimal(5,3), - primary key (c1), - index (c3,c4(50),c5(50)), - index (c2)) - engine=innodb row_format=compressed key_block_size=4; - - - create table t4(c1 int not null, - c2 int not null, - c3 char(255) not null, - c4 text(500) not null, - c5 blob(500) not null, - c6 varchar(500) not null, - c7 varchar(500) not null, - c8 datetime, - c9 decimal(5,3), - primary key (c1), - index (c3,c4(50),c5(50)), - index (c2)) - engine=innodb row_format=dynamic; - - - create temporary table t5(c1 int not null, - c2 int not null, - c3 char(255) not null, - c4 text(500) not null, - c5 blob(500) not null, - c6 varchar(500) not null, - c7 varchar(500) not null, - c8 datetime, - c9 decimal(5,3), - primary key (c1), - index (c3,c4(50),c5(50)), - index (c2)) - engine=innodb; - - create table t6 ( a int ) engine = innodb; - insert into t6 values (50),(100),(150); - - --disable_query_log - --disable_result_log - let $n=5; - - # load created tables. - while ($n) - { - start transaction; - - eval insert ignore into t1 values( - $n, $n, - repeat(concat(' tc3_',$n), 42), - repeat(concat(' tc4_',$n), 300), - repeat(concat(' tc5_',$n), 300), - repeat(concat(' tc6_',$n), 300), - repeat(concat(' tc7_',$n), 300), - now(), (100.55+$n)); - - eval insert ignore into t2 values( - $n, $n, - repeat(concat(' tc3_',$n), 42), - repeat(concat(' tc4_',$n), 300), - repeat(concat(' tc5_',$n), 300), - repeat(concat(' tc6_',$n), 300), - repeat(concat(' tc7_',$n), 300), - now(), (100.55+$n)); - - eval insert ignore into t3 values( - $n, $n, - repeat(concat(' tc3_',$n), 42), - repeat(concat(' tc4_',$n), 300), - repeat(concat(' tc5_',$n), 300), - repeat(concat(' tc6_',$n), 300), - repeat(concat(' tc7_',$n), 300), - now(), (100.55+$n)); - - eval insert ignore into t4 values( - $n, $n, - repeat(concat(' tc3_',$n), 42), - repeat(concat(' tc4_',$n), 300), - repeat(concat(' tc5_',$n), 300), - repeat(concat(' tc6_',$n), 300), - repeat(concat(' tc7_',$n), 300), - now(), (100.55+$n)); - - eval insert ignore into t5 values( - $n, $n, - repeat(concat(' tc3_',$n), 42), - repeat(concat(' tc4_',$n), 300), - repeat(concat(' tc5_',$n), 300), - repeat(concat(' tc6_',$n), 300), - repeat(concat(' tc7_',$n), 300), - now(), (100.55+$n)); - - if ($n <= 3) - { - commit; - } - - if ($n > 3) - { - rollback; - } - - dec $n; - } - - # validate loading of the tables. - --enable_result_log - --enable_query_log - select count(*) from t1; - select count(*) from t2; - select count(*) from t3; - select count(*) from t4; - select count(*) from t5; - select count(*) from t6; - - # set the debug crash point and exercise them. - if ($cnt == 6) - { - set session debug="+d,ib_trunc_crash_during_drop_index_temp_table"; - --echo "---debug ib_trunc_crash_during_drop_index_temp_table point---" - } - if ($cnt == 5) - { - set session debug="+d,ib_trunc_crash_drop_reinit_done_create_to_start"; - --echo "---debug ib_trunc_crash_drop_reinit_done_create_to_start---" - } - - if ($cnt >= 5) { - --echo # Write file to make mysql-test-run.pl expect crash and restart - --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - --echo # Run the crashing query - --error 2013 - truncate table t5; - --source include/wait_until_disconnected.inc - --enable_reconnect - --echo # Restart the MySQL server - --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - --source include/wait_until_connected_again.inc - --disable_reconnect - select count(*) from t1; - select count(*) from t2; - select count(*) from t3; - select count(*) from t4; - --error ER_NO_SUCH_TABLE - select count(*) from t5; - select count(*) from t6; - } - - # set the debug crash point and exercise them. - if ($cnt == 6) - { - set session debug="+d,ib_trunc_crash_on_drop_of_sec_index"; - --echo "---debug ib_trunc_crash_on_drop_of_sec_index point---" - } - if ($cnt == 5) - { - set session debug="+d,ib_trunc_crash_on_create_of_sec_index"; - --echo "---debug ib_trunc_crash_on_create_of_sec_index---" - } - if ($cnt == 4) - { - set session debug="+d,ib_trunc_crash_before_log_removal"; - --echo "---debug ib_trunc_crash_before_log_removal point---" - } - if ($cnt == 3) - { - set session debug="+d,ib_trunc_crash_after_truncate_done"; - --echo "---debug ib_trunc_crash_after_truncate_done point---" - } - if ($cnt == 2) - { - set session debug="+d,ib_trunc_crash_after_truncate_done"; - --echo "---debug ib_trunc_crash_after_truncate_done point---" - } - if ($cnt == 1) - { - set session debug="+d,ib_trunc_crash_after_redo_log_write_complete"; - --echo "---debug ib_trunc_crash_after_redo_log_write_complete point---" - } - - --echo # Write file to make mysql-test-run.pl expect crash and restart - --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - --echo # Run the crashing query - --error 2013 - truncate table t1; - --source include/wait_until_disconnected.inc - --enable_reconnect - --echo # Restart the MySQL server - --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - --source include/wait_until_connected_again.inc - --disable_reconnect - select count(*) from t1; - select count(*) from t2; - select count(*) from t3; - select count(*) from t4; - --error ER_NO_SUCH_TABLE - select count(*) from t5; - select count(*) from t6; - - if ($cnt == 6) - { - set session debug="+d,ib_trunc_crash_on_drop_of_sec_index"; - --echo "---debug ib_trunc_crash_on_drop_of_sec_index point---" - } - if ($cnt == 5) - { - set session debug="+d,ib_trunc_crash_on_create_of_sec_index"; - --echo "---debug ib_trunc_crash_on_create_of_sec_index---" - } - if ($cnt == 4) - { - set session debug="+d,ib_trunc_crash_before_log_removal"; - --echo "---debug ib_trunc_crash_before_log_removal point---" - } - if ($cnt == 3) - { - set session debug="+d,ib_trunc_crash_after_truncate_done"; - --echo "---debug ib_trunc_crash_after_truncate_done point---" - } - if ($cnt == 2) - { - set session debug="+d,ib_trunc_crash_after_truncate_done"; - --echo "---debug ib_trunc_crash_after_truncate_done point---" - } - if ($cnt == 1) - { - set session debug="+d,ib_trunc_crash_after_redo_log_write_complete"; - --echo "---debug ib_trunc_crash_after_redo_log_write_complete point---" - } - - - --echo # Write file to make mysql-test-run.pl expect crash and restart - --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - --echo # Run the crashing query - --error 2013 - truncate table t2; - --source include/wait_until_disconnected.inc - --enable_reconnect - --echo # Restart the MySQL server - --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - --source include/wait_until_connected_again.inc - --disable_reconnect - select count(*) from t1; - select count(*) from t2; - select count(*) from t3; - select count(*) from t4; - --error ER_NO_SUCH_TABLE - select count(*) from t5; - select count(*) from t6; - - if ($cnt == 6) - { - set session debug="+d,ib_trunc_crash_on_drop_of_sec_index"; - --echo "---debug ib_trunc_crash_on_drop_of_sec_index point---" - } - if ($cnt == 5) - { - set session debug="+d,ib_trunc_crash_on_create_of_sec_index"; - --echo "---debug ib_trunc_crash_on_create_of_sec_index---" - } - if ($cnt == 4) - { - set session debug="+d,ib_trunc_crash_before_log_removal"; - --echo "---debug ib_trunc_crash_before_log_removal point---" - } - if ($cnt == 3) - { - set session debug="+d,ib_trunc_crash_after_truncate_done"; - --echo "---debug ib_trunc_crash_after_truncate_done point---" - } - if ($cnt == 2) - { - set session debug="+d,ib_trunc_crash_after_truncate_done"; - --echo "---debug ib_trunc_crash_after_truncate_done point---" - } - if ($cnt == 1) - { - set session debug="+d,ib_trunc_crash_after_redo_log_write_complete"; - --echo "---debug ib_trunc_crash_after_redo_log_write_complete point---" - } - - - --echo # Write file to make mysql-test-run.pl expect crash and restart - --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - --echo # Run the crashing query - --error 2013 - truncate table t3; - --source include/wait_until_disconnected.inc - --enable_reconnect - --echo # Restart the MySQL server - --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - --source include/wait_until_connected_again.inc - --disable_reconnect - select count(*) from t1; - select count(*) from t2; - select count(*) from t3; - select count(*) from t4; - --error ER_NO_SUCH_TABLE - select count(*) from t5; - select count(*) from t6; - - - if ($cnt == 6) - { - set session debug="+d,ib_trunc_crash_on_drop_of_sec_index"; - --echo "---debug ib_trunc_crash_on_drop_of_sec_index point---" - } - if ($cnt == 5) - { - set session debug="+d,ib_trunc_crash_on_create_of_sec_index"; - --echo "---debug ib_trunc_crash_on_create_of_sec_index---" - } - if ($cnt == 4) - { - set session debug="+d,ib_trunc_crash_before_log_removal"; - --echo "---debug ib_trunc_crash_before_log_removal point---" - } - if ($cnt == 3) - { - set session debug="+d,ib_trunc_crash_after_truncate_done"; - --echo "---debug ib_trunc_crash_after_truncate_done point---" - } - if ($cnt == 2) - { - set session debug="+d,ib_trunc_crash_after_truncate_done"; - --echo "---debug ib_trunc_crash_after_truncate_done point---" - } - if ($cnt == 1) - { - set session debug="+d,ib_trunc_crash_after_redo_log_write_complete"; - --echo "---debug ib_trunc_crash_after_redo_log_write_complete point---" - } - - --echo # Write file to make mysql-test-run.pl expect crash and restart - --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - --echo # Run the crashing query - --error 2013 - truncate table t4; - --source include/wait_until_disconnected.inc - --enable_reconnect - --echo # Restart the MySQL server - --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - --source include/wait_until_connected_again.inc - --disable_reconnect - select count(*) from t1; - select count(*) from t2; - select count(*) from t3; - select count(*) from t4; - --error ER_NO_SUCH_TABLE - select count(*) from t5; - select count(*) from t6; - - drop table t1, t2, t3, t4, t6; - - dec $cnt; - - --disable_query_log - eval set global innodb_file_per_table=$innodb_file_per_table_orig; - --enable_query_log -} - - - diff --git a/mysql-test/suite/innodb_zip/t/wl6501_crash_3.test b/mysql-test/suite/innodb_zip/t/wl6501_crash_3.test deleted file mode 100644 index 3ec990b4715..00000000000 --- a/mysql-test/suite/innodb_zip/t/wl6501_crash_3.test +++ /dev/null @@ -1,25 +0,0 @@ -# -# WL#6501: make truncate table atomic -# - -# TC tries to hit crash point during truncate of -# compressed non-temp table residing in single tablespace -# with page-size=16k - ---source include/have_innodb.inc ---source include/have_innodb_16k.inc ---source include/have_debug.inc ---source include/big_test.inc - -# Valgrind would complain about memory leaks when we crash on purpose. ---source include/not_valgrind.inc -# Embedded server does not support crashing ---source include/not_embedded.inc -# Avoid CrashReporter popup on Mac ---source include/not_crashrep.inc - -let $wl6501_file_per_table = 1; -let $wl6501_row_fmt = compressed; -let $wl6501_kbs = 16; ---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 deleted file mode 100644 index f54df3c128c..00000000000 --- a/mysql-test/suite/innodb_zip/t/wl6501_crash_4.test +++ /dev/null @@ -1,27 +0,0 @@ -# -# WL#6501: make truncate table atomic -# - -# TC tries to hit crash point during truncate of -# compressed non-temp table residing in single tablespace. -# with page-size=4k - ---source include/have_innodb.inc ---source include/have_innodb_4k.inc ---source include/have_debug.inc ---source include/big_test.inc - -# Valgrind would complain about memory leaks when we crash on purpose. ---source include/not_valgrind.inc -# Embedded server does not support crashing ---source include/not_embedded.inc -# Avoid CrashReporter popup on Mac ---source include/not_crashrep.inc - -let $wl6501_file_per_table = 1; -let $wl6501_row_fmt = compressed; -let $wl6501_kbs = 4; ---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 deleted file mode 100644 index 2f9847ae5fb..00000000000 --- a/mysql-test/suite/innodb_zip/t/wl6501_crash_5.test +++ /dev/null @@ -1,25 +0,0 @@ -# -# WL#6501: make truncate table atomic -# - -# TC tries to hit crash point during truncate of -# compressed non-temp table residing in single tablespace. -# with page-size=8k - ---source include/have_innodb.inc ---source include/have_innodb_8k.inc ---source include/have_debug.inc ---source include/big_test.inc - -# Valgrind would complain about memory leaks when we crash on purpose. ---source include/not_valgrind.inc -# Embedded server does not support crashing ---source include/not_embedded.inc -# Avoid CrashReporter popup on Mac ---source include/not_crashrep.inc - -let $wl6501_file_per_table = 1; -let $wl6501_row_fmt = compressed; -let $wl6501_kbs = 8; ---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 deleted file mode 100644 index e6392759d5e..00000000000 --- a/mysql-test/suite/innodb_zip/t/wl6501_scale_1.test +++ /dev/null @@ -1,37 +0,0 @@ -# -# WL#6501: make truncate table atomic -# - -# load table with some significiant amount of data -# and then try truncate - ---source include/have_innodb.inc ---source include/have_debug.inc ---source include/big_test.inc ---source include/have_innodb_16k.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 - - -# Single-Tablespace/Non-Compressed -let $wl6501_file_per_table = 1; -let $wl6501_row_fmt = compact; -let $wl6501_kbs = 16; ---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; ---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; ---source suite/innodb_zip/include/innodb_wl6501_scale.inc diff --git a/mysql-test/suite/maria/concurrent.result b/mysql-test/suite/maria/concurrent.result new file mode 100644 index 00000000000..caea6fd1fb9 --- /dev/null +++ b/mysql-test/suite/maria/concurrent.result @@ -0,0 +1,33 @@ +CREATE TABLE t1 (a INT, b CHAR(12), c INT, FULLTEXT KEY(b), KEY (c)) ENGINE=Aria; +CREATE TABLE t2 (a INT, b CHAR(12), c INT) ENGINE=Aria; +INSERT INTO t2 VALUES (1,'foo',8), (2,'bar',9); +connect con1,localhost,root,,test; +INSERT INTO t1 SELECT * FROM t2; +connection default; +select 1; +1 +1 +select 1; +1 +1 +select 1; +1 +1 +select 1; +1 +1 +select 1; +1 +1 +select 1; +1 +1 +select 1; +1 +1 +SELECT * FROM t1 WHERE a = ( SELECT 1 FROM non_existing_table2 ); +ERROR 42S02: Table 'test.non_existing_table2' doesn't exist +connection con1; +disconnect con1; +connection default; +DROP TABLE t1, t2; diff --git a/mysql-test/suite/maria/concurrent.test b/mysql-test/suite/maria/concurrent.test new file mode 100644 index 00000000000..42adb082d40 --- /dev/null +++ b/mysql-test/suite/maria/concurrent.test @@ -0,0 +1,28 @@ +# +# MDEV-15797 Assertion `thd->killed != 0' failed in ha_maria::enable_indexes +# + +CREATE TABLE t1 (a INT, b CHAR(12), c INT, FULLTEXT KEY(b), KEY (c)) ENGINE=Aria; +CREATE TABLE t2 (a INT, b CHAR(12), c INT) ENGINE=Aria; +INSERT INTO t2 VALUES (1,'foo',8), (2,'bar',9); + +--connect (con1,localhost,root,,test) +--send + INSERT INTO t1 SELECT * FROM t2; +--connection default +select 1; +select 1; +select 1; +select 1; +select 1; +select 1; +select 1; +--error ER_NO_SUCH_TABLE +SELECT * FROM t1 WHERE a = ( SELECT 1 FROM non_existing_table2 ); +--connection con1 +--reap + +# Cleanup +--disconnect con1 +--connection default +DROP TABLE t1, t2; diff --git a/mysql-test/suite/maria/create.result b/mysql-test/suite/maria/create.result new file mode 100644 index 00000000000..82c6b8c9871 --- /dev/null +++ b/mysql-test/suite/maria/create.result @@ -0,0 +1,33 @@ +CREATE OR REPLACE TABLE t1 ( +f1 DECIMAL(43,0) NOT NULL, +f2 TIME(4) NULL, +f3 BINARY(101) NULL, +f4 TIMESTAMP(4) NULL, +f5 DATETIME(1) NULL, +f6 SET('a','b','c') NOT NULL DEFAULT 'a', +f7 VARBINARY(2332) NOT NULL DEFAULT '', +f8 DATE NULL, +f9 BLOB NULL, +f10 MEDIUMINT(45) NOT NULL DEFAULT 0, +f11 YEAR NULL, +f12 BIT(58) NULL, +v2 TIME(1) AS (f2) VIRTUAL, +v3 BINARY(115) AS (f3) VIRTUAL, +v4 TIMESTAMP(3) AS (f4) VIRTUAL, +v7 VARBINARY(658) AS (f7) PERSISTENT, +v8 DATE AS (f8) PERSISTENT, +v9 TINYTEXT AS (f9) PERSISTENT, +v11 YEAR AS (f11) VIRTUAL +) ENGINE=Aria; +INSERT IGNORE INTO t1 (f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12) VALUES +(0.8,'16:01:46',NULL,'2006-03-01 12:44:34','2029-10-10 21:27:53','a','foo','1989-12-24','bar',9,1975,b'1'); +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +DROP TABLE t1; +CREATE OR REPLACE TABLE t1 (a INT(45)); +INSERT IGNORE INTO t1 VALUES (1),(2); +CREATE OR REPLACE TABLE t2 ENGINE=Aria AS SELECT SUM(a) AS f1, IFNULL( 'qux', ExtractValue( 'foo', 'bar' ) ) AS f2 FROM t1; +select * from t2; +f1 f2 +3 qux +DROP TABLE t1, t2; diff --git a/mysql-test/suite/maria/create.test b/mysql-test/suite/maria/create.test new file mode 100644 index 00000000000..8f2ffd7492f --- /dev/null +++ b/mysql-test/suite/maria/create.test @@ -0,0 +1,42 @@ +--source include/have_maria.inc + +# MDEV-17021 +# Server crash or assertion `length <= column->length' failure in +# write_block_record +# + +CREATE OR REPLACE TABLE t1 ( + f1 DECIMAL(43,0) NOT NULL, + f2 TIME(4) NULL, + f3 BINARY(101) NULL, + f4 TIMESTAMP(4) NULL, + f5 DATETIME(1) NULL, + f6 SET('a','b','c') NOT NULL DEFAULT 'a', + f7 VARBINARY(2332) NOT NULL DEFAULT '', + f8 DATE NULL, + f9 BLOB NULL, + f10 MEDIUMINT(45) NOT NULL DEFAULT 0, + f11 YEAR NULL, + f12 BIT(58) NULL, + v2 TIME(1) AS (f2) VIRTUAL, + v3 BINARY(115) AS (f3) VIRTUAL, + v4 TIMESTAMP(3) AS (f4) VIRTUAL, + v7 VARBINARY(658) AS (f7) PERSISTENT, + v8 DATE AS (f8) PERSISTENT, + v9 TINYTEXT AS (f9) PERSISTENT, + v11 YEAR AS (f11) VIRTUAL +) ENGINE=Aria; +INSERT IGNORE INTO t1 (f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12) VALUES + (0.8,'16:01:46',NULL,'2006-03-01 12:44:34','2029-10-10 21:27:53','a','foo','1989-12-24','bar',9,1975,b'1'); +DROP TABLE t1; + +# +# MDEV-17067 Server crash in write_block_record +# + +CREATE OR REPLACE TABLE t1 (a INT(45)); +INSERT IGNORE INTO t1 VALUES (1),(2); + +CREATE OR REPLACE TABLE t2 ENGINE=Aria AS SELECT SUM(a) AS f1, IFNULL( 'qux', ExtractValue( 'foo', 'bar' ) ) AS f2 FROM t1; +select * from t2; +DROP TABLE t1, t2; diff --git a/mysql-test/suite/maria/disabled.def b/mysql-test/suite/maria/disabled.def new file mode 100644 index 00000000000..fd72451f61b --- /dev/null +++ b/mysql-test/suite/maria/disabled.def @@ -0,0 +1,13 @@ +############################################################################## +# +# List the test cases that are to be disabled temporarily. +# +# Separate the test case name and the comment with ':'. +# +# <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment> +# +# Do not use any TAB characters for whitespace. +# +############################################################################## + +small_blocksize: Can't be used when Aria is used for privilege tables diff --git a/mysql-test/suite/maria/fulltext2.result b/mysql-test/suite/maria/fulltext2.result new file mode 100644 index 00000000000..1e4e6636ef6 --- /dev/null +++ b/mysql-test/suite/maria/fulltext2.result @@ -0,0 +1,86 @@ +CREATE TABLE t1 ( +i int(10) unsigned not null auto_increment primary key, +a varchar(255) not null, +FULLTEXT KEY (a) +) ENGINE=Aria ROW_FORMAT=DYNAMIC MAX_ROWS=2000000000000; +repair table t1 quick; +Table Op Msg_type Msg_text +test.t1 repair status OK +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +repair table t1; +Table Op Msg_type Msg_text +test.t1 repair status OK +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +repair table t1; +Table Op Msg_type Msg_text +test.t1 repair status OK +select count(*) from t1 where match a against ('aaaxxx'); +count(*) +0 +select count(*) from t1 where match a against ('aaayyy'); +count(*) +150 +select count(*) from t1 where match a against ('aaaxxx' in boolean mode); +count(*) +1024 +select count(*) from t1 where match a against ('aaayyy' in boolean mode); +count(*) +150 +select count(*) from t1 where match a against ('aaax*' in boolean mode); +count(*) +1024 +select count(*) from t1 where match a against ('aaay*' in boolean mode); +count(*) +150 +select count(*) from t1 where match a against ('aaa*' in boolean mode); +count(*) +1174 +insert t1 (a) values ('aaaxxx'),('aaayyy'); +select count(*) from t1 where match a against ('aaaxxx' in boolean mode); +count(*) +1025 +select count(*) from t1 where match a against ('aaayyy'); +count(*) +151 +insert t1 (a) values ('aaaxxx 000000'); +select count(*) from t1 where match a against ('000000'); +count(*) +1 +delete from t1 where match a against ('000000'); +select count(*) from t1 where match a against ('000000'); +count(*) +0 +select count(*) from t1 where match a against ('aaaxxx'); +count(*) +0 +select count(*) from t1 where match a against ('aaaxxx' in boolean mode); +count(*) +1025 +select count(*) from t1 where match a against ('aaayyy' in boolean mode); +count(*) +151 +select count(*) from t1 where a = 'aaaxxx'; +count(*) +1025 +select count(*) from t1 where a = 'aaayyy'; +count(*) +151 +insert t1 (a) values ('aaaxxx 000000'); +select count(*) from t1 where match a against ('000000'); +count(*) +1 +select count(*) from t1 where match a against ('aaaxxx' in boolean mode); +count(*) +1026 +update t1 set a='aaaxxx' where a = 'aaayyy'; +select count(*) from t1 where match a against ('aaaxxx' in boolean mode); +count(*) +1177 +select count(*) from t1 where match a against ('aaayyy' in boolean mode); +count(*) +0 +drop table t1; diff --git a/mysql-test/suite/maria/fulltext2.test b/mysql-test/suite/maria/fulltext2.test new file mode 100644 index 00000000000..060b748eb4f --- /dev/null +++ b/mysql-test/suite/maria/fulltext2.test @@ -0,0 +1,77 @@ +# +# test of new fulltext search features +# + +let collation=utf8_unicode_ci; +source include/have_collation.inc; + +# +# two-level tree +# + +CREATE TABLE t1 ( + i int(10) unsigned not null auto_increment primary key, + a varchar(255) not null, + FULLTEXT KEY (a) +) ENGINE=Aria ROW_FORMAT=DYNAMIC MAX_ROWS=2000000000000; + +# two-level entry, second-level tree with depth 2 +disable_query_log; +let $1=1024; +while ($1) +{ + eval insert t1 (a) values ('aaaxxx'); + dec $1; +} + +# one-level entry (entries) +let $1=150; +while ($1) +{ + eval insert t1 (a) values ('aaayyy'); + dec $1; +} +enable_query_log; + +repair table t1 quick; +check table t1; +repair table t1; +check table t1; +repair table t1; + +select count(*) from t1 where match a against ('aaaxxx'); +select count(*) from t1 where match a against ('aaayyy'); +select count(*) from t1 where match a against ('aaaxxx' in boolean mode); +select count(*) from t1 where match a against ('aaayyy' in boolean mode); + +select count(*) from t1 where match a against ('aaax*' in boolean mode); +select count(*) from t1 where match a against ('aaay*' in boolean mode); +select count(*) from t1 where match a against ('aaa*' in boolean mode); + +# mi_write: +insert t1 (a) values ('aaaxxx'),('aaayyy'); +# call to enlarge_root() below +select count(*) from t1 where match a against ('aaaxxx' in boolean mode); +select count(*) from t1 where match a against ('aaayyy'); + +# mi_delete +insert t1 (a) values ('aaaxxx 000000'); +select count(*) from t1 where match a against ('000000'); +delete from t1 where match a against ('000000'); +select count(*) from t1 where match a against ('000000'); +select count(*) from t1 where match a against ('aaaxxx'); +select count(*) from t1 where match a against ('aaaxxx' in boolean mode); +select count(*) from t1 where match a against ('aaayyy' in boolean mode); +# double-check without index +select count(*) from t1 where a = 'aaaxxx'; +select count(*) from t1 where a = 'aaayyy'; + +# update +insert t1 (a) values ('aaaxxx 000000'); +select count(*) from t1 where match a against ('000000'); +select count(*) from t1 where match a against ('aaaxxx' in boolean mode); +update t1 set a='aaaxxx' where a = 'aaayyy'; +select count(*) from t1 where match a against ('aaaxxx' in boolean mode); +select count(*) from t1 where match a against ('aaayyy' in boolean mode); + +drop table t1; diff --git a/mysql-test/suite/maria/maria-recover.result b/mysql-test/suite/maria/maria-recover.result index 4d0b4317afe..8a33307b2b0 100644 --- a/mysql-test/suite/maria/maria-recover.result +++ b/mysql-test/suite/maria/maria-recover.result @@ -27,7 +27,7 @@ ThursdayMorningsMarket ThursdayMorningsMarketb Warnings: Error 145 t_corrupted2' is marked as crashed and should be repaired -Error 1034 1 client is using or hasn't closed the table properly +Warning 1034 1 client is using or hasn't closed the table properly Error 1034 Wrong base information on indexpage at page: 1 select * from t_corrupted2; a diff --git a/mysql-test/suite/maria/maria-recover.test b/mysql-test/suite/maria/maria-recover.test index 0f9f5e9cd26..893cd5e601d 100644 --- a/mysql-test/suite/maria/maria-recover.test +++ b/mysql-test/suite/maria/maria-recover.test @@ -2,6 +2,18 @@ --source include/have_maria.inc +# +# Ensure that we don't get warnings from mysql.proc (used by check_mysqld) +# + +--disable_query_log +--disable_warnings +--disable_result_log +select count(*) from mysql.proc; +--enable_result_log +--enable_warnings +--enable_query_log + --disable_query_log # Note: \\. matches a single period. We use '.' as directory separator to # account for Unix and Windows variation. diff --git a/mysql-test/suite/maria/maria-ucs2.result b/mysql-test/suite/maria/maria-ucs2.result index 7499b37279b..1a54ab78081 100644 --- a/mysql-test/suite/maria/maria-ucs2.result +++ b/mysql-test/suite/maria/maria-ucs2.result @@ -1,6 +1,6 @@ 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 +Aria YES Crash-safe tables with MyISAM heritage. Used for internal temporary tables and privilege tables NO NO NO set global storage_engine=aria; set session storage_engine=aria; drop table if exists t1; diff --git a/mysql-test/suite/maria/maria.result b/mysql-test/suite/maria/maria.result index 106bb85c4c8..83210676ed8 100644 --- a/mysql-test/suite/maria/maria.result +++ b/mysql-test/suite/maria/maria.result @@ -1,7 +1,7 @@ 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 +Aria YES Crash-safe tables with MyISAM heritage. Used for internal temporary tables and privilege tables NO NO NO set global storage_engine=aria; set session storage_engine=aria; set global aria_page_checksum=0; @@ -2227,9 +2227,9 @@ Block_size: 8192 Recordlength: 99 Table description: -Key Start Len Index Type -1 2 30 multip. varchar -2 33 30 multip. char NULL +Key Start Len Index Type +1 2 30 multip. varchar +2 33 30 multip. char NULL DROP TABLE t1; create table t1 (n int not null, c char(1)) transactional=1; show create table t1; @@ -2791,6 +2791,10 @@ id name -1 dog 2 cat DROP TABLE t1; +CREATE TABLE t1 (pk int, i2 int) ENGINE=Aria; +INSERT INTO t1 VALUES (1,2), (2,3),(3,4); +DELETE FROM tt.*, t1.* USING t1 AS tt LEFT JOIN t1 ON (tt.i2 = t1.pk); +DROP TABLE t1; # # End of 5.5 tests # diff --git a/mysql-test/suite/maria/maria.test b/mysql-test/suite/maria/maria.test index d7710047f48..19aab4aa944 100644 --- a/mysql-test/suite/maria/maria.test +++ b/mysql-test/suite/maria/maria.test @@ -2008,6 +2008,16 @@ INSERT INTO t1 (name) VALUES ('cat'); SELECT * FROM t1; DROP TABLE t1; +# +# MDEV-16682 +# Assertion `(buff[7] & 7) == HEAD_PAGE' failed. +# + +CREATE TABLE t1 (pk int, i2 int) ENGINE=Aria; +INSERT INTO t1 VALUES (1,2), (2,3),(3,4); +DELETE FROM tt.*, t1.* USING t1 AS tt LEFT JOIN t1 ON (tt.i2 = t1.pk); +DROP TABLE t1; + --echo # --echo # End of 5.5 tests --echo # diff --git a/mysql-test/suite/maria/maria3.result b/mysql-test/suite/maria/maria3.result index 6099dc9c982..1fd49df00e1 100644 --- a/mysql-test/suite/maria/maria3.result +++ b/mysql-test/suite/maria/maria3.result @@ -1,6 +1,6 @@ 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 +Aria YES Crash-safe tables with MyISAM heritage. Used for internal temporary tables and privilege tables NO NO NO set global storage_engine=aria; set session storage_engine=aria; set global aria_page_checksum=0; diff --git a/mysql-test/suite/maria/system_tables.result b/mysql-test/suite/maria/system_tables.result new file mode 100644 index 00000000000..32fddf6127e --- /dev/null +++ b/mysql-test/suite/maria/system_tables.result @@ -0,0 +1,13 @@ +CREATE TABLE t1 (i INT) ENGINE=Aria; +LOCK TABLE t1 WRITE; +connect con1,localhost,root,,test; +SET lock_wait_timeout= 2; +FLUSH TABLES; +connection default; +CALL non_existing_sp; +ERROR 42000: PROCEDURE test.non_existing_sp does not exist +connection con1; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +disconnect con1; +connection default; +DROP TABLE t1; diff --git a/mysql-test/suite/maria/system_tables.test b/mysql-test/suite/maria/system_tables.test new file mode 100644 index 00000000000..7b5c20ded85 --- /dev/null +++ b/mysql-test/suite/maria/system_tables.test @@ -0,0 +1,27 @@ +# +# Test related to Aria system tables +# + +# +# MDEV-16986 Unitialized mutex, SIGSEGV and assorted assertion failures in +# Aria code +# + +CREATE TABLE t1 (i INT) ENGINE=Aria; +LOCK TABLE t1 WRITE; + +--connect (con1,localhost,root,,test) +SET lock_wait_timeout= 2; +--send + FLUSH TABLES; +--connection default +--error ER_SP_DOES_NOT_EXIST +CALL non_existing_sp; +--connection con1 +--error ER_LOCK_WAIT_TIMEOUT +--reap + +# Cleanup +--disconnect con1 +--connection default +DROP TABLE t1; diff --git a/mysql-test/suite/mariabackup/absolute_ibdata_paths.opt b/mysql-test/suite/mariabackup/absolute_ibdata_paths.opt index 52b6b743ac8..71996e09b18 100644 --- a/mysql-test/suite/mariabackup/absolute_ibdata_paths.opt +++ b/mysql-test/suite/mariabackup/absolute_ibdata_paths.opt @@ -1 +1 @@ ---innodb --innodb-data-home-dir= --innodb-data-file-path=$MYSQLTEST_VARDIR/tmp/absolute_path_ibdata1:3M;ibdata_second:1M:autoextend
\ No newline at end of file +--innodb --innodb-data-home-dir= --innodb-data-file-path=$MYSQLTEST_VARDIR/tmp/absolute_path_ibdata1:3M;ibdata_second:1M:autoextend --innodb-undo-tablespaces=2
\ No newline at end of file diff --git a/mysql-test/suite/mariabackup/create_during_backup.result b/mysql-test/suite/mariabackup/create_during_backup.result new file mode 100644 index 00000000000..f99c2633ab5 --- /dev/null +++ b/mysql-test/suite/mariabackup/create_during_backup.result @@ -0,0 +1,10 @@ +# xtrabackup backup +# xtrabackup prepare +# shutdown server +# remove datadir +# xtrabackup move back +# restart server +SELECT COUNT(*) from t1; +COUNT(*) +10000 +DROP TABLE t1; diff --git a/mysql-test/suite/mariabackup/create_during_backup.test b/mysql-test/suite/mariabackup/create_during_backup.test new file mode 100644 index 00000000000..985a5a3e53a --- /dev/null +++ b/mysql-test/suite/mariabackup/create_during_backup.test @@ -0,0 +1,26 @@ +--source include/have_debug.inc +let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; +mkdir $targetdir; + +# this will table and populate it, after backup has list of tables to be copied +--let after_load_tablespaces =CREATE TABLE test.t1 ENGINE=INNODB SELECT UUID() from test.seq_1_to_10000 + +echo # xtrabackup backup; +--disable_result_log +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,mariabackup_events; +--enable_result_log + +--let after_load_tables= + +echo # xtrabackup prepare; +--disable_result_log +exec $XTRABACKUP --prepare --target-dir=$targetdir; +-- source include/restart_and_restore.inc +--enable_result_log + +# Check that new table is there after restore. +SELECT COUNT(*) from t1; +DROP TABLE t1; +rmdir $targetdir; + + diff --git a/mysql-test/suite/mariabackup/create_with_data_directory_during_backup.result b/mysql-test/suite/mariabackup/create_with_data_directory_during_backup.result new file mode 100644 index 00000000000..a06150bcb6a --- /dev/null +++ b/mysql-test/suite/mariabackup/create_with_data_directory_during_backup.result @@ -0,0 +1,10 @@ +# xtrabackup backup +# xtrabackup prepare +DROP TABLE t; +# shutdown server +# remove datadir +# xtrabackup move back +# restart server +SELECT * FROM t; +i +DROP TABLE t; diff --git a/mysql-test/suite/mariabackup/create_with_data_directory_during_backup.test b/mysql-test/suite/mariabackup/create_with_data_directory_during_backup.test new file mode 100644 index 00000000000..d0cb83d069f --- /dev/null +++ b/mysql-test/suite/mariabackup/create_with_data_directory_during_backup.test @@ -0,0 +1,24 @@ +--source include/have_debug.inc +let $table_data_dir=$MYSQLTEST_VARDIR/tmp/ddir; +let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; +mkdir $table_data_dir; +--replace_result $table_data_dir table_data_dir +--let after_load_tablespaces=CREATE TABLE test.t(i int) ENGINE=INNODB DATA DIRECTORY='$table_data_dir' +echo # xtrabackup backup; +let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; +--disable_result_log +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,mariabackup_events; +--enable_result_log +--source include/shutdown_mysqld.inc +echo # xtrabackup prepare; +--disable_result_log +exec $XTRABACKUP --prepare --target-dir=$targetdir; +--source include/start_mysqld.inc +DROP TABLE t; +rmdir $table_data_dir; +-- source include/restart_and_restore.inc +--enable_result_log +SELECT * FROM t; +DROP TABLE t; +rmdir $targetdir; +rmdir $table_data_dir; diff --git a/mysql-test/suite/mariabackup/disabled.def b/mysql-test/suite/mariabackup/disabled.def deleted file mode 100644 index 8b137891791..00000000000 --- a/mysql-test/suite/mariabackup/disabled.def +++ /dev/null @@ -1 +0,0 @@ - diff --git a/mysql-test/suite/mariabackup/drop_table_during_backup.result b/mysql-test/suite/mariabackup/drop_table_during_backup.result new file mode 100644 index 00000000000..1472ddbddcf --- /dev/null +++ b/mysql-test/suite/mariabackup/drop_table_during_backup.result @@ -0,0 +1,13 @@ +CREATE TABLE t1 (i int) ENGINE=INNODB; +CREATE TABLE t2 (i int) ENGINE=INNODB; +CREATE TABLE t3 (i int) ENGINE=INNODB; +# xtrabackup prepare +# shutdown server +# remove datadir +# xtrabackup move back +# restart server +CREATE TABLE t1(i int); +DROP TABLE t1; +CREATE TABLE t2(i int); +DROP TABLE t2; +DROP TABLE t3; diff --git a/mysql-test/suite/mariabackup/drop_table_during_backup.test b/mysql-test/suite/mariabackup/drop_table_during_backup.test new file mode 100644 index 00000000000..02c7710145b --- /dev/null +++ b/mysql-test/suite/mariabackup/drop_table_during_backup.test @@ -0,0 +1,24 @@ +--source include/have_debug.inc +let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; +CREATE TABLE t1 (i int) ENGINE=INNODB; +CREATE TABLE t2 (i int) ENGINE=INNODB; +CREATE TABLE t3 (i int) ENGINE=INNODB; +--let before_copy_test_t1=DROP TABLE test.t1 +--let after_copy_test_t2=DROP TABLE test.t2; +--disable_result_log +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,mariabackup_events; +--enable_result_log + +echo # xtrabackup prepare; +--disable_result_log +exec $XTRABACKUP --prepare --target-dir=$targetdir; +-- source include/restart_and_restore.inc +--enable_result_log + +#check that the table t1 does not exist in backup +CREATE TABLE t1(i int); +DROP TABLE t1; +CREATE TABLE t2(i int); +DROP TABLE t2; +DROP TABLE t3; +rmdir $targetdir; diff --git a/mysql-test/suite/mariabackup/incremental_ddl_during_backup.result b/mysql-test/suite/mariabackup/incremental_ddl_during_backup.result new file mode 100644 index 00000000000..ffca1ef0e1f --- /dev/null +++ b/mysql-test/suite/mariabackup/incremental_ddl_during_backup.result @@ -0,0 +1,22 @@ +call mtr.add_suppression("InnoDB: New log files created"); +CREATE TABLE t1(i INT PRIMARY KEY) ENGINE INNODB; +CREATE TABLE t2(i INT PRIMARY KEY) ENGINE INNODB; +CREATE TABLE t3(i INT) ENGINE INNODB; +# Create full backup , modify table, then create incremental/differential backup +INSERT into t1 values(1); +# Prepare full backup, apply incremental one +# Restore and check results +# shutdown server +# remove datadir +# xtrabackup move back +# restart server +CREATE TABLE t1(i int); +DROP TABLE t1; +SELECT * from t1_renamed; +i +1 +DROP TABLE t1_renamed; +CREATE TABLE t2(i INT PRIMARY KEY) ENGINE INNODB; +DROP TABLE t2; +DROP TABLE t3; +DROP TABLE t4; diff --git a/mysql-test/suite/mariabackup/incremental_ddl_during_backup.test b/mysql-test/suite/mariabackup/incremental_ddl_during_backup.test new file mode 100644 index 00000000000..60780b13920 --- /dev/null +++ b/mysql-test/suite/mariabackup/incremental_ddl_during_backup.test @@ -0,0 +1,52 @@ +--source include/have_debug.inc + +call mtr.add_suppression("InnoDB: New log files created"); + +let $basedir=$MYSQLTEST_VARDIR/tmp/backup; +let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1; + +CREATE TABLE t1(i INT PRIMARY KEY) ENGINE INNODB; +CREATE TABLE t2(i INT PRIMARY KEY) ENGINE INNODB; +CREATE TABLE t3(i INT) ENGINE INNODB; + +echo # Create full backup , modify table, then create incremental/differential backup; +--disable_result_log +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir; +--enable_result_log + +INSERT into t1 values(1); + +--let after_load_tablespaces=CREATE TABLE test.t4 ENGINE=INNODB SELECT UUID() from test.seq_1_to_10000 +--let after_copy_test_t1=RENAME TABLE test.t1 TO test.t1_renamed +--let after_copy_test_t2=DROP TABLE test.t2 +--let after_copy_test_t3=CREATE INDEX a_i ON test.t3(i); + +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$incremental_dir --incremental-basedir=$basedir --dbug=+d,mariabackup_events; +--let after_load_tablespaces= +--disable_result_log +echo # Prepare full backup, apply incremental one; +exec $XTRABACKUP --apply-log-only --prepare --target-dir=$basedir; +exec $XTRABACKUP --prepare --target-dir=$basedir --incremental-dir=$incremental_dir ; + +echo # Restore and check results; +let $targetdir=$basedir; +-- source include/restart_and_restore.inc +--enable_result_log + +# Test that t1 does not exist, but t1_renamed does +CREATE TABLE t1(i int); +DROP TABLE t1; + +SELECT * from t1_renamed; +DROP TABLE t1_renamed; + +# Test that t2 does not exist; +CREATE TABLE t2(i INT PRIMARY KEY) ENGINE INNODB; +DROP TABLE t2; + +DROP TABLE t3; +DROP TABLE t4; + +# Cleanup +rmdir $basedir; +rmdir $incremental_dir; diff --git a/mysql-test/suite/mariabackup/innodb_log_optimize_ddl.result b/mysql-test/suite/mariabackup/innodb_log_optimize_ddl.result new file mode 100644 index 00000000000..47b74e0f709 --- /dev/null +++ b/mysql-test/suite/mariabackup/innodb_log_optimize_ddl.result @@ -0,0 +1,37 @@ +SET GLOBAL innodb_log_optimize_ddl=OFF; +CREATE TABLE tz(id BIGINT PRIMARY KEY, i INT) +ENGINE=InnoDB ROW_FORMAT=COMPRESSED; +INSERT INTO tz(id) select * from seq_1_to_10000; +CREATE TABLE tr(id BIGINT PRIMARY KEY, i INT) +ENGINE=InnoDB ROW_FORMAT=REDUNDANT; +INSERT INTO tr(id) select * from seq_1_to_10000; +CREATE TABLE td(id BIGINT PRIMARY KEY, i INT) +ENGINE=InnoDB; +INSERT INTO td(id) select * from seq_1_to_10000; +CREATE PROCEDURE a() +BEGIN +ALTER TABLE tz ADD INDEX(i); +ALTER TABLE tr ADD INDEX(i); +ALTER TABLE td ADD INDEX(i); +END // +call a(); +# shutdown server +# remove datadir +# xtrabackup move back +# restart server +DROP PROCEDURE a; +CHECK TABLE tz,tr,td; +Table Op Msg_type Msg_text +test.tz check status OK +test.tr check status OK +test.td check status OK +SELECT COUNT(*) FROM tz; +COUNT(*) +10000 +SELECT COUNT(*) FROM tr; +COUNT(*) +10000 +SELECT COUNT(*) FROM td; +COUNT(*) +10000 +DROP TABLE tz,tr,td; diff --git a/mysql-test/suite/mariabackup/innodb_log_optimize_ddl.test b/mysql-test/suite/mariabackup/innodb_log_optimize_ddl.test new file mode 100644 index 00000000000..d6680bec077 --- /dev/null +++ b/mysql-test/suite/mariabackup/innodb_log_optimize_ddl.test @@ -0,0 +1,47 @@ +# see unsupported_redo.test for the opposite (default) case +--source include/have_innodb.inc +--source include/have_sequence.inc + +SET GLOBAL innodb_log_optimize_ddl=OFF; + +CREATE TABLE tz(id BIGINT PRIMARY KEY, i INT) +ENGINE=InnoDB ROW_FORMAT=COMPRESSED; +INSERT INTO tz(id) select * from seq_1_to_10000; +CREATE TABLE tr(id BIGINT PRIMARY KEY, i INT) +ENGINE=InnoDB ROW_FORMAT=REDUNDANT; +INSERT INTO tr(id) select * from seq_1_to_10000; +CREATE TABLE td(id BIGINT PRIMARY KEY, i INT) +ENGINE=InnoDB; +INSERT INTO td(id) select * from seq_1_to_10000; + +DELIMITER //; +CREATE PROCEDURE a() +BEGIN + ALTER TABLE tz ADD INDEX(i); + ALTER TABLE tr ADD INDEX(i); + ALTER TABLE td ADD INDEX(i); +END // +DELIMITER ;// + +let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; + +send call a(); + +--disable_result_log +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir; +--enable_result_log +exec $XTRABACKUP --prepare --target-dir=$targetdir; + +reap; + +-- source include/restart_and_restore.inc +--rmdir $targetdir + +DROP PROCEDURE a; + +CHECK TABLE tz,tr,td; +SELECT COUNT(*) FROM tz; +SELECT COUNT(*) FROM tr; +SELECT COUNT(*) FROM td; + +DROP TABLE tz,tr,td; diff --git a/mysql-test/suite/mariabackup/mlog_index_load.result b/mysql-test/suite/mariabackup/mlog_index_load.result new file mode 100644 index 00000000000..bc83981106e --- /dev/null +++ b/mysql-test/suite/mariabackup/mlog_index_load.result @@ -0,0 +1,15 @@ +CREATE TABLE t1(i INT PRIMARY KEY auto_increment, a int) ENGINE INNODB; +INSERT INTO t1(a) SELECT * from seq_1_to_10000; +# xtrabackup backup +t1.frm +t1.ibd +t1.new +# xtrabackup prepare +# shutdown server +# remove datadir +# xtrabackup move back +# restart server +SELECT COUNT(*) from t1; +COUNT(*) +10000 +DROP TABLE t1; diff --git a/mysql-test/suite/mariabackup/mlog_index_load.test b/mysql-test/suite/mariabackup/mlog_index_load.test new file mode 100644 index 00000000000..fb29041fd3c --- /dev/null +++ b/mysql-test/suite/mariabackup/mlog_index_load.test @@ -0,0 +1,27 @@ +--source include/have_debug.inc + +CREATE TABLE t1(i INT PRIMARY KEY auto_increment, a int) ENGINE INNODB; +INSERT INTO t1(a) SELECT * from seq_1_to_10000; + +let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; + +let after_copy_test_t1=CREATE INDEX a_ind ON test.t1(a) ALGORITHM=INPLACE; +echo # xtrabackup backup; +--disable_result_log +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,mariabackup_events; +--enable_result_log + +--list_files $targetdir/test t1* +--let before_copy_test_t1= + +echo # xtrabackup prepare; +--disable_result_log +exec $XTRABACKUP --prepare --target-dir=$targetdir; +-- source include/restart_and_restore.inc +--enable_result_log + +# Check that new table is there after restore. +SELECT COUNT(*) from t1; +DROP TABLE t1; +rmdir $targetdir; + diff --git a/mysql-test/suite/mariabackup/nolock_ddl_during_backup_end.result b/mysql-test/suite/mariabackup/nolock_ddl_during_backup_end.result new file mode 100644 index 00000000000..1bd3052b708 --- /dev/null +++ b/mysql-test/suite/mariabackup/nolock_ddl_during_backup_end.result @@ -0,0 +1,2 @@ +CREATE TABLE t1(i int) ENGINE=INNODB; +# xtrabackup backup diff --git a/mysql-test/suite/mariabackup/nolock_ddl_during_backup_end.test b/mysql-test/suite/mariabackup/nolock_ddl_during_backup_end.test new file mode 100644 index 00000000000..f6bc51bd9a6 --- /dev/null +++ b/mysql-test/suite/mariabackup/nolock_ddl_during_backup_end.test @@ -0,0 +1,14 @@ +--source include/have_debug.inc +let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; +mkdir $targetdir; + +CREATE TABLE t1(i int) ENGINE=INNODB; + +# this will table and populate it, after backup has list of tables to be copied +--let backup_fix_ddl=BEGIN NOT ATOMIC DROP TABLE test.t1;DO SLEEP(10000); END +echo # xtrabackup backup; +--disable_result_log +error 1; +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --no-lock --dbug=+d,mariabackup_events; +--enable_result_log +rmdir $targetdir; diff --git a/mysql-test/suite/mariabackup/recreate_table_during_backup.result b/mysql-test/suite/mariabackup/recreate_table_during_backup.result new file mode 100644 index 00000000000..4e038fee71a --- /dev/null +++ b/mysql-test/suite/mariabackup/recreate_table_during_backup.result @@ -0,0 +1,23 @@ +CREATE TABLE t1(i int) ENGINE=INNODB; +CREATE TABLE t2(i int) ENGINE=INNODB; +CREATE TABLE t3(a CHAR(36)) ENGINE INNODB; +INSERT INTO t3 SELECT UUID() FROM seq_1_to_1000; +# xtrabackup backup +# xtrabackup prepare +# shutdown server +# remove datadir +# xtrabackup move back +# restart server +SELECT COUNT(*) from t1; +COUNT(*) +100 +SELECT COUNT(*) from t2; +COUNT(*) +1000 +SELECT COUNT(*) from t3; +COUNT(*) +1000 +DROP INDEX index_a ON t3; +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; diff --git a/mysql-test/suite/mariabackup/recreate_table_during_backup.test b/mysql-test/suite/mariabackup/recreate_table_during_backup.test new file mode 100644 index 00000000000..c3c9cf5aeef --- /dev/null +++ b/mysql-test/suite/mariabackup/recreate_table_during_backup.test @@ -0,0 +1,37 @@ +--source include/have_debug.inc +let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; +mkdir $targetdir; + +CREATE TABLE t1(i int) ENGINE=INNODB; +CREATE TABLE t2(i int) ENGINE=INNODB; +CREATE TABLE t3(a CHAR(36)) ENGINE INNODB; +INSERT INTO t3 SELECT UUID() FROM seq_1_to_1000; + +# this will table and populate it, after backup has list of tables to be copied +--let before_copy_test_t1=BEGIN NOT ATOMIC DROP TABLE test.t1;CREATE TABLE test.t1 ENGINE=INNODB SELECT UUID() from test.seq_1_to_100; END +--let after_copy_test_t2=BEGIN NOT ATOMIC DROP TABLE test.t2;CREATE TABLE test.t2 ENGINE=INNODB SELECT UUID() from test.seq_1_to_1000; END +--let after_copy_test_t3=ALTER TABLE test.t3 ADD INDEX index_a(a),ALGORITHM=COPY +echo # xtrabackup backup; +--disable_result_log +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --close-files --dbug=+d,mariabackup_events; +--enable_result_log +--let after_load_tables= + +echo # xtrabackup prepare; +--disable_result_log +exec $XTRABACKUP --prepare --target-dir=$targetdir; +-- source include/restart_and_restore.inc +--enable_result_log + +# Check that new table is there after restore. +SELECT COUNT(*) from t1; +SELECT COUNT(*) from t2; +SELECT COUNT(*) from t3; +DROP INDEX index_a ON t3; +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +rmdir $targetdir; + + + diff --git a/mysql-test/suite/mariabackup/rename_during_backup.result b/mysql-test/suite/mariabackup/rename_during_backup.result new file mode 100644 index 00000000000..6e8f365f643 --- /dev/null +++ b/mysql-test/suite/mariabackup/rename_during_backup.result @@ -0,0 +1,53 @@ +CREATE TABLE t1(i int) ENGINE INNODB; +INSERT into t1 values(1); +CREATE TABLE t2(i int) ENGINE INNODB; +INSERT INTO t2 values(2); +CREATE TABLE t3(i int) ENGINE INNODB; +CREATE TABLE t4(i int) ENGINE INNODB; +CREATE TABLE a(a int) ENGINE INNODB; +INSERT INTO a values(1); +CREATE TABLE b(b CHAR(1)) ENGINE INNODB; +INSERT INTO b VALUES('b'); +CREATE TABLE a1(a1 int) ENGINE INNODB; +INSERT INTO a1 VALUES(1); +CREATE TABLE b1(b1 CHAR(2)) ENGINE INNODB; +INSERT INTO b1 VALUES('b1'); +# xtrabackup prepare +# shutdown server +# remove datadir +# xtrabackup move back +# restart server +CREATE TABLE t1(i int); +DROP TABLE t1; +SELECT * from t1_renamed; +i +1 +DROP TABLE t1_renamed; +CREATE TABLE t2(i int); +DROP TABLE t2; +SELECT * from t2_renamed; +i +2 +DROP TABLE t2_renamed; +SELECT * from t3; +i +3 +DROP TABLE t3; +SELECT * from t4; +i +DROP TABLE t4; +CREATE TABLE tmp(i int); +DROP TABLE tmp; +SELECT * FROM a; +b +b +SELECT * FROM b; +a +1 +SELECT * FROM a1; +b1 +b1 +SELECT * FROM b1; +a1 +1 +DROP TABLE a,b,a1,b1; diff --git a/mysql-test/suite/mariabackup/rename_during_backup.test b/mysql-test/suite/mariabackup/rename_during_backup.test new file mode 100644 index 00000000000..f176af1451b --- /dev/null +++ b/mysql-test/suite/mariabackup/rename_during_backup.test @@ -0,0 +1,86 @@ +--source include/have_debug.inc +let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; +mkdir $targetdir; + +CREATE TABLE t1(i int) ENGINE INNODB; +INSERT into t1 values(1); + +CREATE TABLE t2(i int) ENGINE INNODB; +INSERT INTO t2 values(2); + +CREATE TABLE t3(i int) ENGINE INNODB; +CREATE TABLE t4(i int) ENGINE INNODB; + +CREATE TABLE a(a int) ENGINE INNODB; +INSERT INTO a values(1); +CREATE TABLE b(b CHAR(1)) ENGINE INNODB; +INSERT INTO b VALUES('b'); + +CREATE TABLE a1(a1 int) ENGINE INNODB; +INSERT INTO a1 VALUES(1); + +CREATE TABLE b1(b1 CHAR(2)) ENGINE INNODB; +INSERT INTO b1 VALUES('b1'); + +# Test renames before of after copying tablespaces +--let before_copy_test_t1=RENAME TABLE test.t1 TO test.t1_renamed +--let after_copy_test_t2=RENAME TABLE test.t2 TO test.t2_renamed +--let after_copy_test_t3=BEGIN NOT ATOMIC RENAME TABLE test.t3 TO test.t3_tmp; INSERT INTO test.t3_tmp VALUES(3); RENAME TABLE test.t3_tmp TO test.t3; END +--let before_copy_test_t4=RENAME TABLE test.t4 TO test.t4_tmp +--let after_copy_test_t4=RENAME TABLE test.t4_tmp TO test.t4 + +# Test circular renames +--let before_copy_test_b=RENAME TABLE test.a to test.tmp, test.b to test.a, test.tmp to test.b +--let after_copy_test_b1=RENAME TABLE test.a1 to test.tmp, test.b1 to test.a1, test.tmp to test.b1 + +--disable_result_log +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,mariabackup_events; +--enable_result_log + +--let before_copy_test_t1='' +--let after_copy_test_t2='' +--let before_copy_test_a='' +--let after_copy_test_a1='' + +echo # xtrabackup prepare; +--disable_result_log +exec $XTRABACKUP --prepare --target-dir=$targetdir; +-- source include/restart_and_restore.inc +--enable_result_log + +# the table was renamed from t1 to t1_renamed +# make sure t1 does not exist, and t1_renamed does. + +CREATE TABLE t1(i int); +DROP TABLE t1; + +SELECT * from t1_renamed; +DROP TABLE t1_renamed; + + +CREATE TABLE t2(i int); +DROP TABLE t2; + +SELECT * from t2_renamed; +DROP TABLE t2_renamed; + +#rename to itself +SELECT * from t3; +DROP TABLE t3; + +SELECT * from t4; +DROP TABLE t4; + +# For circular renames , make sure intermediate tables do not exist +CREATE TABLE tmp(i int); +DROP TABLE tmp; + +SELECT * FROM a; +SELECT * FROM b; +SELECT * FROM a1; +SELECT * FROM b1; + +DROP TABLE a,b,a1,b1; +rmdir $targetdir; + + diff --git a/mysql-test/suite/mariabackup/rename_during_mdl_lock.result b/mysql-test/suite/mariabackup/rename_during_mdl_lock.result index 982851438f2..3b64cdc38bc 100644 --- a/mysql-test/suite/mariabackup/rename_during_mdl_lock.result +++ b/mysql-test/suite/mariabackup/rename_during_mdl_lock.result @@ -1,3 +1,11 @@ CREATE TABLE t1(i int) ENGINE INNODB; -FOUND 1 /failed to execute query SELECT 1 FROM/ in backup.log +# xtrabackup prepare +# shutdown server +# remove datadir +# xtrabackup move back +# restart server +CREATE TABLE t1(i int); +DROP TABLE t1; +SELECT * from t2; +i DROP TABLE t2; diff --git a/mysql-test/suite/mariabackup/rename_during_mdl_lock.test b/mysql-test/suite/mariabackup/rename_during_mdl_lock.test index 0a41f1dfe74..6d22e0db4a7 100644 --- a/mysql-test/suite/mariabackup/rename_during_mdl_lock.test +++ b/mysql-test/suite/mariabackup/rename_during_mdl_lock.test @@ -1,13 +1,21 @@ --source include/have_debug.inc -let $targetdir=$MYSQLTEST_VARDIR/backup; +let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; mkdir $targetdir; CREATE TABLE t1(i int) ENGINE INNODB; ---error 1 -exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --lock-ddl-per-table --dbug=+d,rename_during_mdl_lock_table 2>$targetdir/backup.log; +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --lock-ddl-per-table --dbug=+d,rename_during_mdl_lock_table; -let SEARCH_FILE=$targetdir/backup.log; -let SEARCH_PATTERN=failed to execute query SELECT 1 FROM; -source include/search_pattern_in_file.inc; +echo # xtrabackup prepare; +--disable_result_log +exec $XTRABACKUP --prepare --target-dir=$targetdir; +-- source include/restart_and_restore.inc +--enable_result_log +# the table was renamed from t1 to t2 +# make sure t1 does not exist, and t2 does +CREATE TABLE t1(i int); +DROP TABLE t1; +SELECT * from t2; DROP TABLE t2; + rmdir $targetdir; + diff --git a/mysql-test/suite/mariabackup/skip_innodb.opt b/mysql-test/suite/mariabackup/skip_innodb.opt new file mode 100644 index 00000000000..213331f5575 --- /dev/null +++ b/mysql-test/suite/mariabackup/skip_innodb.opt @@ -0,0 +1 @@ +--loose-skip-innodb
\ No newline at end of file diff --git a/mysql-test/suite/mariabackup/skip_innodb.result b/mysql-test/suite/mariabackup/skip_innodb.result new file mode 100644 index 00000000000..0d56b55bf4b --- /dev/null +++ b/mysql-test/suite/mariabackup/skip_innodb.result @@ -0,0 +1,10 @@ +CREATE TABLE t(i int); +INSERT INTO t VALUES(1); +# shutdown server +# remove datadir +# xtrabackup move back +# restart server +SELECT * from t; +i +1 +DROP TABLE t; diff --git a/mysql-test/suite/mariabackup/skip_innodb.test b/mysql-test/suite/mariabackup/skip_innodb.test new file mode 100644 index 00000000000..14e4bc007f6 --- /dev/null +++ b/mysql-test/suite/mariabackup/skip_innodb.test @@ -0,0 +1,12 @@ +let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; +CREATE TABLE t(i int); +INSERT INTO t VALUES(1); +--disable_result_log +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir; +exec $XTRABACKUP --prepare --target-dir=$targetdir; +-- source include/restart_and_restore.inc +--enable_result_log +SELECT * from t; +DROP TABLE t; + +rmdir $targetdir;
\ No newline at end of file diff --git a/mysql-test/suite/mariabackup/suite.opt b/mysql-test/suite/mariabackup/suite.opt index de3637814b2..1df4643562e 100644 --- a/mysql-test/suite/mariabackup/suite.opt +++ b/mysql-test/suite/mariabackup/suite.opt @@ -1 +1 @@ ---innodb --loose-changed_page_bitmaps --innodb-sys-tables --innodb-flush-log-at-trx-commit=2 +--innodb --loose-changed_page_bitmaps --innodb-sys-tables --innodb-flush-log-at-trx-commit=2 --sequence diff --git a/mysql-test/suite/mariabackup/truncate_during_backup.result b/mysql-test/suite/mariabackup/truncate_during_backup.result new file mode 100644 index 00000000000..f9d5c785749 --- /dev/null +++ b/mysql-test/suite/mariabackup/truncate_during_backup.result @@ -0,0 +1,4 @@ +CREATE TABLE t1 ENGINE=InnoDB SELECT 1; +DROP TABLE t1; +SET GLOBAL innodb_log_checkpoint_now=1; +SET GLOBAL innodb_log_checkpoint_now=DEFAULT; diff --git a/mysql-test/suite/mariabackup/truncate_during_backup.test b/mysql-test/suite/mariabackup/truncate_during_backup.test new file mode 100644 index 00000000000..46ee244dfb0 --- /dev/null +++ b/mysql-test/suite/mariabackup/truncate_during_backup.test @@ -0,0 +1,18 @@ +--source include/have_debug.inc +let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; +mkdir $targetdir; + +CREATE TABLE t1 ENGINE=InnoDB SELECT 1; + +--let after_load_tablespaces=TRUNCATE test.t1 + +--disable_result_log +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,mariabackup_events; +--enable_result_log + +--let after_load_tablespaces= + +DROP TABLE t1; +SET GLOBAL innodb_log_checkpoint_now=1; +SET GLOBAL innodb_log_checkpoint_now=DEFAULT; +rmdir $targetdir; diff --git a/mysql-test/suite/mariabackup/undo_space_id.opt b/mysql-test/suite/mariabackup/undo_space_id.opt index 16135129d5b..006e17a2535 100644 --- a/mysql-test/suite/mariabackup/undo_space_id.opt +++ b/mysql-test/suite/mariabackup/undo_space_id.opt @@ -1,2 +1,3 @@ --debug=d,innodb_undo_upgrade,force_rebootstrap +--innodb_data_file_path=ib_mysql:10M --innodb_undo_tablespaces=2 diff --git a/mysql-test/suite/mariabackup/unsupported_redo.result b/mysql-test/suite/mariabackup/unsupported_redo.result index a1f95c099cd..fbad89be0ac 100644 --- a/mysql-test/suite/mariabackup/unsupported_redo.result +++ b/mysql-test/suite/mariabackup/unsupported_redo.result @@ -7,7 +7,7 @@ call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: "); call mtr.add_suppression("Table .* in the InnoDB data dictionary has tablespace id .*, but tablespace with that id or name does not exist"); CREATE TABLE t1(i INT PRIMARY KEY auto_increment, a int) ENGINE INNODB; ALTER TABLE t1 FORCE, ALGORITHM=INPLACE; -# Fails during full backup +# No longer fails during full backup DROP TABLE t1; CREATE TABLE t1(i INT PRIMARY KEY auto_increment, a int) ENGINE INNODB; INSERT INTO t1(a) select 1 union select 2 union select 3; diff --git a/mysql-test/suite/mariabackup/unsupported_redo.test b/mysql-test/suite/mariabackup/unsupported_redo.test index 319ee2c7571..b9456751b9c 100644 --- a/mysql-test/suite/mariabackup/unsupported_redo.test +++ b/mysql-test/suite/mariabackup/unsupported_redo.test @@ -11,33 +11,15 @@ let $basedir=$MYSQLTEST_VARDIR/tmp/backup; let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1; CREATE TABLE t1(i INT PRIMARY KEY auto_increment, a int) ENGINE INNODB; ---source ../../suite/innodb/include/no_checkpoint_start.inc ALTER TABLE t1 FORCE, ALGORITHM=INPLACE; -# Below mariabackup operation may complete successfully if checkpoint happens -# after the alter table command. - -echo # Fails during full backup; +echo # No longer fails during full backup; --disable_result_log ---error 0,1 exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir; --enable_result_log DROP TABLE t1; ---let MYSQLD_DATADIR=$basedir/ -perl; -open(OUT, ">$ENV{MYSQLTEST_VARDIR}/log/check.txt") || die; -print OUT ' ---let no_checkpoint_end=1 ---let CLEANUP_IF_CHECKPOINT=rmdir $basedir; ---source ../../suite/innodb/include/no_checkpoint_end.inc ---exit Backup failed to fail despite MLOG_INDEX_LOAD record -' if (-f "$ENV{MYSQLD_DATADIR}/xtrabackup_info"); -close(OUT); -EOF ---source $MYSQLTEST_VARDIR/log/check.txt ---remove_file $MYSQLTEST_VARDIR/log/check.txt rmdir $basedir; CREATE TABLE t1(i INT PRIMARY KEY auto_increment, a int) ENGINE INNODB; @@ -50,29 +32,14 @@ INSERT INTO t1(a) select 1 union select 2 union select 3; exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir; --enable_result_log ---source ../../suite/innodb/include/no_checkpoint_start.inc ALTER TABLE t1 FORCE, ALGORITHM=INPLACE; --disable_result_log ---error 0,1 exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$incremental_dir --incremental-basedir=$basedir; --enable_result_log DROP TABLE t1; ---let MYSQLD_DATADIR=$incremental_dir/ -perl; -open(OUT, ">$ENV{MYSQLTEST_VARDIR}/log/check.txt") || die; -print OUT ' ---let no_checkpoint_end=1 ---let CLEANUP_IF_CHECKPOINT=rmdir $basedir;rmdir $incremental_dir; ---source ../../suite/innodb/include/no_checkpoint_end.inc ---exit Backup failed to fail despite MLOG_INDEX_LOAD record -' if (-f "$ENV{MYSQLD_DATADIR}/xtrabackup_info"); -close(OUT); -EOF ---source $MYSQLTEST_VARDIR/log/check.txt ---remove_file $MYSQLTEST_VARDIR/log/check.txt rmdir $basedir;rmdir $incremental_dir; CREATE TABLE t1(i INT) ENGINE INNODB; diff --git a/mysql-test/suite/mariabackup/xb_aws_key_management.result b/mysql-test/suite/mariabackup/xb_aws_key_management.result index fd12344dfa0..6efc76a8be3 100644 --- a/mysql-test/suite/mariabackup/xb_aws_key_management.result +++ b/mysql-test/suite/mariabackup/xb_aws_key_management.result @@ -11,4 +11,6 @@ INSERT INTO t VALUES('foobar1'); SELECT * from t; c foobar1 +Warnings: +Note 1105 AWS KMS plugin: loaded key 1, version 1, key length 128 bit DROP TABLE t; diff --git a/mysql-test/suite/multi_source/gtid_ignore_duplicates.result b/mysql-test/suite/multi_source/gtid_ignore_duplicates.result index 96627b42c97..e142ff8b981 100644 --- a/mysql-test/suite/multi_source/gtid_ignore_duplicates.result +++ b/mysql-test/suite/multi_source/gtid_ignore_duplicates.result @@ -492,21 +492,21 @@ SET GLOBAL slave_parallel_threads= @old_parallel; SET GLOBAL gtid_ignore_duplicates= @old_ignore_duplicates; connection server_1; DROP TABLE t1; -ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; +ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria; include/reset_master_slave.inc disconnect server_1; connection server_2; DROP TABLE t1; -ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; +ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria; include/reset_master_slave.inc disconnect server_2; connection server_3; DROP TABLE t1; -ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; +ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria; include/reset_master_slave.inc disconnect server_3; connection server_4; DROP TABLE t1; -ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; +ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria; include/reset_master_slave.inc disconnect server_4; diff --git a/mysql-test/suite/multi_source/gtid_ignore_duplicates.test b/mysql-test/suite/multi_source/gtid_ignore_duplicates.test index b61da0f0f33..3d2d151bd0d 100644 --- a/mysql-test/suite/multi_source/gtid_ignore_duplicates.test +++ b/mysql-test/suite/multi_source/gtid_ignore_duplicates.test @@ -432,24 +432,24 @@ SET GLOBAL gtid_ignore_duplicates= @old_ignore_duplicates; --connection server_1 DROP TABLE t1; -ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; +ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria; --source include/reset_master_slave.inc --disconnect server_1 --connection server_2 DROP TABLE t1; -ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; +ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria; --source include/reset_master_slave.inc --disconnect server_2 --connection server_3 DROP TABLE t1; -ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; +ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria; --source include/reset_master_slave.inc --disconnect server_3 --connection server_4 DROP TABLE t1; -ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; +ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria; --source include/reset_master_slave.inc --disconnect server_4 diff --git a/mysql-test/suite/parts/r/partition_recover_myisam.result b/mysql-test/suite/parts/r/partition_recover_myisam.result index 4b9e3f5c283..151ff802a82 100644 --- a/mysql-test/suite/parts/r/partition_recover_myisam.result +++ b/mysql-test/suite/parts/r/partition_recover_myisam.result @@ -18,10 +18,10 @@ a 11 Warnings: Error 145 Table 't1_will_crash' is marked as crashed and should be repaired -Error 1034 1 client is using or hasn't closed the table properly +Warning 1034 1 client is using or hasn't closed the table properly Error 1034 Size of indexfile is: 1024 Should be: 2048 -Error 1034 Size of datafile is: 77 Should be: 7 -Error 1034 Number of rows changed from 1 to 11 +Warning 1034 Size of datafile is: 77 Should be: 7 +Warning 1034 Number of rows changed from 1 to 11 DROP TABLE t1_will_crash; CREATE TABLE t1_will_crash (a INT, KEY (a)) ENGINE=MyISAM @@ -47,8 +47,8 @@ a 11 Warnings: Error 145 Table 't1_will_crash#P#p1' is marked as crashed and should be repaired -Error 1034 1 client is using or hasn't closed the table properly +Warning 1034 1 client is using or hasn't closed the table properly Error 1034 Size of indexfile is: 1024 Should be: 2048 -Error 1034 Size of datafile is: 28 Should be: 7 -Error 1034 Number of rows changed from 1 to 4 +Warning 1034 Size of datafile is: 28 Should be: 7 +Warning 1034 Number of rows changed from 1 to 4 DROP TABLE t1_will_crash; diff --git a/mysql-test/suite/parts/r/rpl_partition.result b/mysql-test/suite/parts/r/rpl_partition.result index 480ab219c34..dcd45ce4fe1 100644 --- a/mysql-test/suite/parts/r/rpl_partition.result +++ b/mysql-test/suite/parts/r/rpl_partition.result @@ -65,6 +65,10 @@ DELETE FROM t1 WHERE id = del_count; SET del_count = del_count - 2; END WHILE; END| +Warnings: +Level Warning +Code 1287 +Message '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead CREATE PROCEDURE p2() BEGIN DECLARE ins_count INT DEFAULT 1000; @@ -86,6 +90,10 @@ DELETE FROM t2 WHERE id = del_count; SET del_count = del_count - 2; END WHILE; END| +Warnings: +Level Warning +Code 1287 +Message '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead CREATE PROCEDURE p3() BEGIN DECLARE ins_count INT DEFAULT 1000; @@ -107,6 +115,10 @@ DELETE FROM t3 WHERE id = del_count; SET del_count = del_count - 2; END WHILE; END| +Warnings: +Level Warning +Code 1287 +Message '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead begin; CALL p1(); commit; diff --git a/mysql-test/suite/parts/r/show_create.result b/mysql-test/suite/parts/r/show_create.result index 79ac61d180d..c7b0ecdb6d9 100644 --- a/mysql-test/suite/parts/r/show_create.result +++ b/mysql-test/suite/parts/r/show_create.result @@ -103,3 +103,11 @@ t_partition CREATE TABLE `t_partition` ( PARTITION BY HASH (`f1`) PARTITIONS 2 drop table t_partition; +create table t1 (a int) partition by range(a) (partition p0 values less than (5)); +set sql_mode='ansi_quotes'; +alter table t1 add partition (partition p1 values less than (10)); +set sql_mode= default; +show table status; +Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary +t1 MyISAM 10 Fixed 0 0 0 0 2048 0 NULL X X NULL latin1_swedish_ci NULL partitioned 0 N +drop table t1; diff --git a/mysql-test/suite/parts/r/truncate_locked.result b/mysql-test/suite/parts/r/truncate_locked.result new file mode 100644 index 00000000000..54a3722938e --- /dev/null +++ b/mysql-test/suite/parts/r/truncate_locked.result @@ -0,0 +1,7 @@ +create table t1 (i int) engine=myisam partition by hash(i) partitions 2 ; +lock table t1 write; +truncate table t1; +desc t1; +Field Type Null Key Default Extra +i int(11) YES NULL +drop table t1; diff --git a/mysql-test/suite/parts/r/update_and_cache.result b/mysql-test/suite/parts/r/update_and_cache.result new file mode 100644 index 00000000000..52f13e66702 --- /dev/null +++ b/mysql-test/suite/parts/r/update_and_cache.result @@ -0,0 +1,7 @@ +CREATE TABLE t1 (pk INT PRIMARY KEY, a INT); +INSERT INTO t1 VALUES (1,10),(2,20); +CREATE TABLE t2 (b INT) PARTITION BY KEY (b) PARTITIONS 2; +INSERT INTO t2 VALUES (1),(2); +DELETE t2 FROM t2 WHERE b BETWEEN 5 AND 9; +UPDATE t2 JOIN t1 SET b = 5; +DROP TABLE t1, t2; diff --git a/mysql-test/suite/parts/t/show_create.test b/mysql-test/suite/parts/t/show_create.test index 9c43b163790..3f62ee11757 100644 --- a/mysql-test/suite/parts/t/show_create.test +++ b/mysql-test/suite/parts/t/show_create.test @@ -39,3 +39,14 @@ create table t_partition (f1 int) partition by hash(f1) partitions 2; select * from t_partition as tbl; show create table t_partition; drop table t_partition; + +# +# MDEV-16792 Assertion `m_status == DA_ERROR' failed in Diagnostics_area::sql_errno or wrong result upon SHOW TABLE STATUS after adding partition under ANSI_QUOTES +# +create table t1 (a int) partition by range(a) (partition p0 values less than (5)); +set sql_mode='ansi_quotes'; +alter table t1 add partition (partition p1 values less than (10)); +set sql_mode= default; +--replace_column 12 X 13 X +show table status; +drop table t1; diff --git a/mysql-test/suite/parts/t/truncate_locked.test b/mysql-test/suite/parts/t/truncate_locked.test new file mode 100644 index 00000000000..4ff1016fb05 --- /dev/null +++ b/mysql-test/suite/parts/t/truncate_locked.test @@ -0,0 +1,10 @@ +# +# MDEV-15551 Server hangs or assertion `strcmp(share->unique_file_name,filename) || share->last_version' fails in test_if_reopen or unexpected ER_LOCK_DEADLOCK +# +--source include/have_partition.inc +create table t1 (i int) engine=myisam partition by hash(i) partitions 2 ; +lock table t1 write; +truncate table t1; +desc t1; +drop table t1; + diff --git a/mysql-test/suite/parts/t/update_and_cache.test b/mysql-test/suite/parts/t/update_and_cache.test new file mode 100644 index 00000000000..08ade807422 --- /dev/null +++ b/mysql-test/suite/parts/t/update_and_cache.test @@ -0,0 +1,12 @@ +--source include/have_partition.inc + +CREATE TABLE t1 (pk INT PRIMARY KEY, a INT); +INSERT INTO t1 VALUES (1,10),(2,20); + +CREATE TABLE t2 (b INT) PARTITION BY KEY (b) PARTITIONS 2; +INSERT INTO t2 VALUES (1),(2); + +DELETE t2 FROM t2 WHERE b BETWEEN 5 AND 9; +UPDATE t2 JOIN t1 SET b = 5; + +DROP TABLE t1, t2; diff --git a/mysql-test/suite/perfschema/r/bad_option_1.result b/mysql-test/suite/perfschema/r/bad_option_1.result index 02fd04afd33..07632ce494e 100644 --- a/mysql-test/suite/perfschema/r/bad_option_1.result +++ b/mysql-test/suite/perfschema/r/bad_option_1.result @@ -1,2 +1,3 @@ +# Kill the server Found: unknown variable 'performance-schema-enabled=maybe' Found: Aborting diff --git a/mysql-test/suite/perfschema/r/bad_option_2.result b/mysql-test/suite/perfschema/r/bad_option_2.result index 7a5ab31aabd..c035666c01a 100644 --- a/mysql-test/suite/perfschema/r/bad_option_2.result +++ b/mysql-test/suite/perfschema/r/bad_option_2.result @@ -1 +1,2 @@ +# Kill the server FOUND 1 /ambiguous option '--performance-schema-max_=12'/ in bad_option_2.txt diff --git a/mysql-test/suite/perfschema/r/bad_option_3.result b/mysql-test/suite/perfschema/r/bad_option_3.result index ec717d6f7d2..580bea9ab6b 100644 --- a/mysql-test/suite/perfschema/r/bad_option_3.result +++ b/mysql-test/suite/perfschema/r/bad_option_3.result @@ -1,2 +1,3 @@ +# Kill the server Found: unknown option '-x' Found: Aborting diff --git a/mysql-test/suite/perfschema/r/bad_option_4.result b/mysql-test/suite/perfschema/r/bad_option_4.result index 812ee546200..5319612a82c 100644 --- a/mysql-test/suite/perfschema/r/bad_option_4.result +++ b/mysql-test/suite/perfschema/r/bad_option_4.result @@ -1,2 +1,3 @@ +# Kill the server Found: Can't change dir to.*bad_option_h_param Found: Aborting diff --git a/mysql-test/suite/perfschema/r/bad_option_5.result b/mysql-test/suite/perfschema/r/bad_option_5.result index b318b6e0482..19dfe288939 100644 --- a/mysql-test/suite/perfschema/r/bad_option_5.result +++ b/mysql-test/suite/perfschema/r/bad_option_5.result @@ -1,2 +1,3 @@ +# Kill the server Found: unknown option '-X' Found: Aborting diff --git a/mysql-test/suite/perfschema/r/privilege_table_io.result b/mysql-test/suite/perfschema/r/privilege_table_io.result index 5443c178502..68e55f64880 100644 --- a/mysql-test/suite/perfschema/r/privilege_table_io.result +++ b/mysql-test/suite/perfschema/r/privilege_table_io.result @@ -8,7 +8,6 @@ truncate table performance_schema.events_waits_history_long; flush status; flush tables; # We are forced to suppress here the server response. -optimize table mysql.host; optimize table mysql.user; optimize table mysql.db; optimize table mysql.proxies_priv; @@ -96,7 +95,6 @@ where event_name like 'wait/io/table/%' and object_schema in ("test", "mysql") order by thread_id, event_id; event_name short_source object_type object_schema pretty_name operation number_of_bytes -wait/io/table/sql/handler handler.cc: TABLE mysql host fetch NULL wait/io/table/sql/handler handler.cc: TABLE mysql user fetch NULL wait/io/table/sql/handler handler.cc: TABLE mysql user fetch NULL wait/io/table/sql/handler handler.cc: TABLE mysql user fetch NULL diff --git a/mysql-test/suite/perfschema/t/bad_option_1.test b/mysql-test/suite/perfschema/t/bad_option_1.test index 1c76dbdc512..bba0d6d5357 100644 --- a/mysql-test/suite/perfschema/t/bad_option_1.test +++ b/mysql-test/suite/perfschema/t/bad_option_1.test @@ -4,9 +4,13 @@ --source include/not_embedded.inc --source include/have_perfschema.inc +--source include/kill_mysqld.inc + let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_1.txt; +--disable_warnings --error 0,1 --remove_file $outfile +--enable_warnings --error 7 --exec $MYSQLD_BOOTSTRAP_CMD --loose-console --performance-schema-enabled=maybe > $outfile 2>&1 @@ -32,3 +36,4 @@ perl; EOF --remove_file $outfile +--source include/start_mysqld.inc diff --git a/mysql-test/suite/perfschema/t/bad_option_2.test b/mysql-test/suite/perfschema/t/bad_option_2.test index ce3e5c3243b..d6c2b905167 100644 --- a/mysql-test/suite/perfschema/t/bad_option_2.test +++ b/mysql-test/suite/perfschema/t/bad_option_2.test @@ -4,9 +4,13 @@ --source include/not_embedded.inc --source include/have_perfschema.inc +--source include/kill_mysqld.inc + let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_2.txt; +--disable_warnings --error 0,1 --remove_file $outfile +--enable_warnings --error 3 --exec $MYSQLD_BOOTSTRAP_CMD --loose-console --enable-getopt-prefix-matching --performance-schema-max_=12 > $outfile 2>&1 --let SEARCH_PATTERN=ambiguous option '--performance-schema-max_=12' @@ -14,3 +18,4 @@ let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_2.txt; --source include/search_pattern_in_file.inc --remove_file $outfile +--source include/start_mysqld.inc diff --git a/mysql-test/suite/perfschema/t/bad_option_3.test b/mysql-test/suite/perfschema/t/bad_option_3.test index 63565df14a2..a4efcbccd74 100644 --- a/mysql-test/suite/perfschema/t/bad_option_3.test +++ b/mysql-test/suite/perfschema/t/bad_option_3.test @@ -4,9 +4,13 @@ --source include/not_embedded.inc --source include/have_perfschema.inc +--source include/kill_mysqld.inc + let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_3.txt; +--disable_warnings --error 0,1 --remove_file $outfile +--enable_warnings --error 2 --exec $MYSQLD_BOOTSTRAP_CMD --loose-console -a -x > $outfile 2>&1 @@ -32,3 +36,4 @@ perl; EOF --remove_file $outfile +--source include/start_mysqld.inc diff --git a/mysql-test/suite/perfschema/t/bad_option_4.test b/mysql-test/suite/perfschema/t/bad_option_4.test index 27a32c201a9..ee8705788bc 100644 --- a/mysql-test/suite/perfschema/t/bad_option_4.test +++ b/mysql-test/suite/perfschema/t/bad_option_4.test @@ -4,9 +4,13 @@ --source include/not_embedded.inc --source include/have_perfschema.inc +--source include/kill_mysqld.inc + let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_4.txt; +--disable_warnings --error 0,1 --remove_file $outfile +--enable_warnings --error 1 --exec $MYSQLD_BOOTSTRAP_CMD --loose-console -a -h bad_option_h_param > $outfile 2>&1 @@ -32,3 +36,4 @@ perl; EOF --remove_file $outfile +--source include/start_mysqld.inc diff --git a/mysql-test/suite/perfschema/t/bad_option_5.test b/mysql-test/suite/perfschema/t/bad_option_5.test index ada8228b249..c9c6fc75d52 100644 --- a/mysql-test/suite/perfschema/t/bad_option_5.test +++ b/mysql-test/suite/perfschema/t/bad_option_5.test @@ -4,9 +4,13 @@ --source include/not_embedded.inc --source include/have_perfschema.inc +--source include/kill_mysqld.inc + let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_5.txt; +--disable_warnings --error 0,1 --remove_file $outfile +--enable_warnings --error 2 --exec $MYSQLD_BOOTSTRAP_CMD --loose-console -aXbroken > $outfile 2>&1 @@ -35,3 +39,4 @@ perl; EOF --remove_file $outfile +--source include/start_mysqld.inc diff --git a/mysql-test/suite/perfschema/t/privilege_table_io.test b/mysql-test/suite/perfschema/t/privilege_table_io.test index 6f729537072..a74805f5c7b 100644 --- a/mysql-test/suite/perfschema/t/privilege_table_io.test +++ b/mysql-test/suite/perfschema/t/privilege_table_io.test @@ -17,7 +17,6 @@ # Therefore we suppress the query_log here. --echo # We are forced to suppress here the server response. --disable_result_log -optimize table mysql.host; optimize table mysql.user; optimize table mysql.db; optimize table mysql.proxies_priv; diff --git a/mysql-test/suite/plugins/r/audit_null_debug.result b/mysql-test/suite/plugins/r/audit_null_debug.result index 9d5c7c4a02c..3b18edf1d0b 100644 --- a/mysql-test/suite/plugins/r/audit_null_debug.result +++ b/mysql-test/suite/plugins/r/audit_null_debug.result @@ -1,3 +1,6 @@ +alter table mysql.plugin engine=myisam; +Warnings: +Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1' 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"); @@ -13,3 +16,4 @@ SET debug_dbug=@old_dbug; uninstall plugin audit_null; ERROR 42000: PLUGIN audit_null does not exist delete from mysql.plugin where name='audit_null'; +alter table mysql.plugin engine=aria; diff --git a/mysql-test/suite/plugins/r/auth_ed25519.result b/mysql-test/suite/plugins/r/auth_ed25519.result index ee9320bbc6c..2d9bb81ae86 100644 --- a/mysql-test/suite/plugins/r/auth_ed25519.result +++ b/mysql-test/suite/plugins/r/auth_ed25519.result @@ -22,10 +22,10 @@ ed25519_password(NULL) NULL select * from information_schema.plugins where plugin_name='ed25519'; PLUGIN_NAME ed25519 -PLUGIN_VERSION 1.0 +PLUGIN_VERSION 1.1 PLUGIN_STATUS ACTIVE PLUGIN_TYPE AUTHENTICATION -PLUGIN_TYPE_VERSION 2.1 +PLUGIN_TYPE_VERSION 2.2 PLUGIN_LIBRARY auth_ed25519.so PLUGIN_LIBRARY_VERSION 1.13 PLUGIN_AUTHOR Sergei Golubchik @@ -33,11 +33,30 @@ PLUGIN_DESCRIPTION Elliptic curve ED25519 based authentication PLUGIN_LICENSE GPL LOAD_OPTION ON PLUGIN_MATURITY Stable -PLUGIN_AUTH_VERSION 1.0-alpha +PLUGIN_AUTH_VERSION 1.1 create user test1@localhost identified via ed25519 using 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY'; show grants for test1@localhost; Grants for test1@localhost GRANT USAGE ON *.* TO 'test1'@'localhost' IDENTIFIED VIA ed25519 USING 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY' +drop user test1@localhost; +create user test1@localhost identified via ed25519 using password('foo'); +show grants for test1@localhost; +Grants for test1@localhost +GRANT USAGE ON *.* TO 'test1'@'localhost' IDENTIFIED VIA ed25519 USING 'vubFBzIrapbfHct1/J72dnUryz5VS7lA6XHH8sIx4TI' +select ed25519_password('foo'); +ed25519_password('foo') +vubFBzIrapbfHct1/J72dnUryz5VS7lA6XHH8sIx4TI +set password for test1@localhost = password('bar'); +show create user test1@localhost; +CREATE USER for test1@localhost +CREATE USER 'test1'@'localhost' IDENTIFIED VIA ed25519 USING 'pfzkeWMzkTefY1oshXS+/kATeN51M+4jxi3/cbyTd10' +select ed25519_password('bar'); +ed25519_password('bar') +pfzkeWMzkTefY1oshXS+/kATeN51M+4jxi3/cbyTd10 +set password for test1@localhost = 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY'; +show create user test1@localhost; +CREATE USER for test1@localhost +CREATE USER 'test1'@'localhost' IDENTIFIED VIA ed25519 USING 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY' connect(localhost,test1,public,test,PORT,SOCKET); connect con1, localhost, test1, public; ERROR 28000: Access denied for user 'test1'@'localhost' (using password: YES) diff --git a/mysql-test/suite/plugins/r/simple_password_check.result b/mysql-test/suite/plugins/r/simple_password_check.result index 672d0107492..91b1fef0745 100644 --- a/mysql-test/suite/plugins/r/simple_password_check.result +++ b/mysql-test/suite/plugins/r/simple_password_check.result @@ -135,8 +135,10 @@ grant select on *.* to foo2 identified with mysql_old_password using '2222222222 ERROR HY000: The MariaDB server is running with the --strict-password-validation option so it cannot execute this statement create user foo2 identified with mysql_native_password using ''; ERROR HY000: Your password does not satisfy the current policy requirements +grant select on *.* to foo2 identified with mysql_old_password using ''; +ERROR HY000: Your password does not satisfy the current policy requirements grant select on *.* to foo2 identified with mysql_old_password; -ERROR 28000: Can't find any matching row in the user table +ERROR HY000: Your password does not satisfy the current policy requirements update mysql.user set password='xxx' where user='foo1'; set global strict_password_validation=0; set password for foo1 = ''; @@ -155,6 +157,7 @@ set global strict_password_validation=1; drop user foo1; create role r1; drop role r1; +flush privileges; uninstall plugin simple_password_check; create user foo1 identified by 'pwd'; drop user foo1; diff --git a/mysql-test/suite/plugins/t/audit_null_debug.test b/mysql-test/suite/plugins/t/audit_null_debug.test index 0534108b107..da949b15f8a 100644 --- a/mysql-test/suite/plugins/t/audit_null_debug.test +++ b/mysql-test/suite/plugins/t/audit_null_debug.test @@ -5,6 +5,8 @@ if (!$ADT_NULL_SO) { skip No NULL_AUDIT plugin; } +alter table mysql.plugin engine=myisam; + 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"); @@ -30,4 +32,4 @@ SET debug_dbug=@old_dbug; uninstall plugin audit_null; delete from mysql.plugin where name='audit_null'; - +alter table mysql.plugin engine=aria; diff --git a/mysql-test/suite/plugins/t/auth_ed25519.test b/mysql-test/suite/plugins/t/auth_ed25519.test index 3e02bdf97d2..b8a7b996f65 100644 --- a/mysql-test/suite/plugins/t/auth_ed25519.test +++ b/mysql-test/suite/plugins/t/auth_ed25519.test @@ -28,6 +28,15 @@ query_vertical select * from information_schema.plugins where plugin_name='ed255 let $pwd=`select ed25519_password("secret")`; eval create user test1@localhost identified via ed25519 using '$pwd'; show grants for test1@localhost; +drop user test1@localhost; +create user test1@localhost identified via ed25519 using password('foo'); +show grants for test1@localhost; +select ed25519_password('foo'); +set password for test1@localhost = password('bar'); +show create user test1@localhost; +select ed25519_password('bar'); +eval set password for test1@localhost = '$pwd'; +show create user test1@localhost; replace_result $MASTER_MYPORT PORT $MASTER_MYSOCK SOCKET; error ER_ACCESS_DENIED_ERROR; diff --git a/mysql-test/suite/plugins/t/simple_password_check.test b/mysql-test/suite/plugins/t/simple_password_check.test index 4965ee492d2..213d061247d 100644 --- a/mysql-test/suite/plugins/t/simple_password_check.test +++ b/mysql-test/suite/plugins/t/simple_password_check.test @@ -83,7 +83,9 @@ create user foo2 identified with mysql_native_password using '111111111111111111 grant select on *.* to foo2 identified with mysql_old_password using '2222222222222222'; --error ER_NOT_VALID_PASSWORD create user foo2 identified with mysql_native_password using ''; ---error ER_PASSWORD_NO_MATCH +--error ER_NOT_VALID_PASSWORD +grant select on *.* to foo2 identified with mysql_old_password using ''; +--error ER_NOT_VALID_PASSWORD grant select on *.* to foo2 identified with mysql_old_password; # direct updates are not protected @@ -113,6 +115,8 @@ drop user foo1; create role r1; drop role r1; +flush privileges; + uninstall plugin simple_password_check; create user foo1 identified by 'pwd'; diff --git a/mysql-test/suite/rpl/include/check_type.inc b/mysql-test/suite/rpl/include/check_type.inc index 97300753d38..baba7a21e86 100644 --- a/mysql-test/suite/rpl/include/check_type.inc +++ b/mysql-test/suite/rpl/include/check_type.inc @@ -24,11 +24,19 @@ connection master; disable_warnings; DROP TABLE IF EXISTS t1; enable_warnings; +if ($source_temp_format) +{ + --eval SET @@global.mysql56_temporal_format= $source_temp_format +} eval CREATE TABLE t1( pk INT NOT NULL PRIMARY KEY, a $source_type ) ENGINE=$engine_type; sync_slave_with_master; +if ($target_temp_format) +{ + --eval SET @@global.mysql56_temporal_format= $source_temp_format +} eval ALTER TABLE t1 MODIFY a $target_type; connection master; diff --git a/mysql-test/suite/rpl/include/rpl_foreign_key.test b/mysql-test/suite/rpl/include/rpl_foreign_key.test deleted file mode 100644 index d10deece1b1..00000000000 --- a/mysql-test/suite/rpl/include/rpl_foreign_key.test +++ /dev/null @@ -1,60 +0,0 @@ -# Check the replication of the FOREIGN_KEY_CHECKS variable. - --- source include/master-slave.inc - -eval CREATE TABLE t1 (a INT AUTO_INCREMENT KEY) ENGINE=$engine_type; -eval CREATE TABLE t2 (b INT AUTO_INCREMENT KEY, c INT, FOREIGN KEY(b) REFERENCES t1(a)) ENGINE=$engine_type; - -SET FOREIGN_KEY_CHECKS=0; -INSERT INTO t1 VALUES (10); -INSERT INTO t1 VALUES (NULL),(NULL),(NULL); -INSERT INTO t2 VALUES (5,0); -INSERT INTO t2 VALUES (NULL,LAST_INSERT_ID()); -SET FOREIGN_KEY_CHECKS=1; -SELECT * FROM t1 ORDER BY a; -SELECT * FROM t2 ORDER BY b; -sync_slave_with_master; -SELECT * FROM t1 ORDER BY a; -SELECT * FROM t2 ORDER BY b; - -connection master; -SET TIMESTAMP=1000000000; -CREATE TABLE t3 ( a INT UNIQUE ); -SET FOREIGN_KEY_CHECKS=0; ---error ER_DUP_ENTRY -INSERT INTO t3 VALUES (1),(1); -sync_slave_with_master; - -connection master; -SET FOREIGN_KEY_CHECKS=0; -DROP TABLE IF EXISTS t1,t2,t3; -SET FOREIGN_KEY_CHECKS=1; -sync_slave_with_master; - -# -# Bug #32468 delete rows event on a table with foreign key constraint fails -# - -connection master; - -eval create table t1 (b int primary key) engine = $engine_type; -eval create table t2 (a int primary key, b int, foreign key (b) references t1(b)) - engine = $engine_type; - -insert into t1 set b=1; -insert into t2 set a=1, b=1; - -set foreign_key_checks=0; -delete from t1; - ---echo must sync w/o a problem (could not with the buggy code) -sync_slave_with_master; -select count(*) from t1 /* must be zero */; - - -# cleanup for bug#32468 - -connection master; -drop table t2,t1; - ---source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/include/rpl_lower_case_table_names.test b/mysql-test/suite/rpl/include/rpl_lower_case_table_names.test new file mode 100644 index 00000000000..fa48142ee91 --- /dev/null +++ b/mysql-test/suite/rpl/include/rpl_lower_case_table_names.test @@ -0,0 +1,141 @@ +# BUG#37656 +# +# This test aims at checking whether lower_case_table_names=1 option works +# for database names and table names. +# +# This test checks the following (when lower_case_table_names=1 is set on slave): +# (i) creating a database on upper case on master results in lower case +# database name on slave +# (ii) creating tables with upper case names on master results in lower case +# table names on slave +# (iii) loading data infile into capitalized table name on master replicates to +# lower case table name on slave +# (iv) Propagating changes from upper case table names on into correspondent +# lower case table names on slave works. + + +# setup: create database and tables +-- echo ******** [ MASTER ] ******** +-- let $dbname_upper= BUG_37656 +-- let $dbname_lower= `SELECT LOWER('$dbname_upper')` +-- eval CREATE DATABASE $dbname_upper +-- eval use $dbname_upper + +# assert: database names are in upper case in master and lower +# case in slave +-- eval show databases like '$dbname_upper' +sync_slave_with_master; +-- echo ******** [ SLAVE ] ******** +--eval show databases like '$dbname_lower' + +-- connection master +-- echo ******** [ MASTER ] ******** +CREATE TABLE T1 (a int); +-- eval CREATE TABLE T2 (b int) ENGINE=$engine +CREATE TABLE T3 (txt TEXT); + +# assert: that tables exist on master with upper case names +show tables; + +# assert: that tables exist on slave but with lower case names +-- sync_slave_with_master +-- echo ******** [ SLAVE ] ******** +-- eval use $dbname_lower +show tables; + +# action: lets create t1 for asserting below that t1 does not get changes +# from master (slave configured with --replicate-ignore-db=$dbname_lower.t1) +CREATE TABLE t1 (a INT); + +# action: fill data into tables +-- connection master +-- echo ******** [ MASTER ] ******** +-- eval use $dbname_upper +INSERT INTO T1 VALUES (1); +INSERT INTO T2 VALUES (1); +if (`SELECT @@session.binlog_format != 'ROW'`) +{ + -- eval LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE $dbname_upper.T3 +} + +if (`SELECT @@session.binlog_format = 'ROW'`) +{ + use test; + -- eval INSERT INTO $dbname_upper.T1 VALUES (2) + -- eval INSERT INTO $dbname_upper.T2 VALUES (2) + -- eval LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE $dbname_upper.T3 +} +# assert: lower case tables on lower case database on slave +# get updates from upper case tables on upper case +# database on master +-- sync_slave_with_master +-- echo ******** [ SLAVE ] ******** + +# assert: changes for slave's t1 were filterd out +if (`SELECT count(*) != 0 FROM t1`) +{ + -- echo UNEXPECTED DATA on $dbname_lower.t1 as table is filtered by replicate-ignore-table rules +} + +-- let $diff_tables=master:$dbname_upper.T2, slave:$dbname_lower.t2 +-- source include/diff_tables.inc + +-- let $diff_tables=master:$dbname_upper.T3, slave:$dbname_lower.t3 +-- source include/diff_tables.inc + +# clean up +-- connection master +-- echo ******** [ MASTER ] ******** +-- eval DROP DATABASE $dbname_upper +-- sync_slave_with_master + + +# +# BUG#50653: drop procedure implicitely treats db name in a case sensitive way +# + +-- connection master + +-- let $dbname= B50653 +-- let $procname= b50653_proc + +-- eval CREATE DATABASE $dbname +-- eval USE $dbname +-- eval CREATE PROCEDURE $procname() BEGIN SELECT 1; END + +if (`SELECT count(*) = 1 FROM mysql.proc WHERE name like '$dbname'`) +{ + -- die Procedure not created on MASTER +} + +-- sync_slave_with_master +if (`SELECT count(*) = 1 FROM mysql.proc WHERE name like '$dbname'`) +{ + -- die Procedure not created on SLAVE +} + +-- connection master +-- eval DROP PROCEDURE $procname + +if (`SELECT count(*) FROM mysql.proc WHERE name like '$dbname'`) +{ + -- die Procedure not dropped on MASTER +} + +-- sync_slave_with_master +if (`SELECT count(*) FROM mysql.proc WHERE name like '$dbname'`) +{ + -- die Procedure not dropped on SLAVE +} + +-- let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1) +if ($last_error) +{ + -- die UNEXPECTED SLAVE SQL error: $last_error +} + +-- connection master +-- eval DROP DATABASE $dbname +-- sync_slave_with_master + +-- source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/include/rpl_mixed_dml.inc b/mysql-test/suite/rpl/include/rpl_mixed_dml.inc index 114cd53d244..bb1a2c173de 100644 --- a/mysql-test/suite/rpl/include/rpl_mixed_dml.inc +++ b/mysql-test/suite/rpl/include/rpl_mixed_dml.inc @@ -289,7 +289,6 @@ DROP TRIGGER tr1; --echo --echo --echo ******************** EVENTS ******************** -GRANT EVENT ON *.* TO 'root'@'localhost'; INSERT INTO t1 VALUES(1, 'test1'); CREATE EVENT e1 ON SCHEDULE EVERY '1' SECOND COMMENT 'e_second_comment' DO DELETE FROM t1; --source suite/rpl/include/rpl_mixed_check_event.inc diff --git a/mysql-test/suite/rpl/include/rpl_row_001.test b/mysql-test/suite/rpl/include/rpl_row_001.test index 97b3a93b4ed..4df2d793244 100644 --- a/mysql-test/suite/rpl/include/rpl_row_001.test +++ b/mysql-test/suite/rpl/include/rpl_row_001.test @@ -21,7 +21,7 @@ connection slave; sync_with_master; STOP SLAVE; connection master; -SET PASSWORD FOR root@"localhost" = PASSWORD('foo'); +UPDATE mysql.user SET password=password('foo') WHERE host='localhost' AND user='root'; connection slave; START SLAVE; connection master; @@ -29,7 +29,7 @@ connection master; # Give slave time to do at last one failed connect retry # This one must be short so that the slave will not stop retrying real_sleep 2; -SET PASSWORD FOR root@"localhost" = PASSWORD(''); +UPDATE mysql.user SET password=password('') WHERE host='localhost' AND user='root'; # Give slave time to connect (will retry every second) sleep 2; diff --git a/mysql-test/suite/rpl/include/type_conversions.test b/mysql-test/suite/rpl/include/type_conversions.test index dc8706a7ec1..edd46f14ba9 100644 --- a/mysql-test/suite/rpl/include/type_conversions.test +++ b/mysql-test/suite/rpl/include/type_conversions.test @@ -1177,5 +1177,96 @@ source suite/rpl/include/check_type.inc; --echo # End of MDEV-15833 +--echo # +--echo # MDEV-17098 DATE <-> DATETIME +--echo # + +# NON-LOSSY +let $source_temp_format= 1; # irrelevant with DATE though +let $source_type= DATE; +let $target_temp_format= 1; # to produce MYSQL_TYPE_DATETIME2 +let $target_type= DATETIME(6); +let $source_value= '2018-10-11'; +let $target_value= '2018-10-11 00:00:00.000000'; +let $can_convert = $if_is_non_lossy; +source suite/rpl/include/check_type.inc; + +let $source_temp_format= 1; +let $source_type= DATE; +let $target_temp_format= 0; # to produce "old" MYSQL_TYPE_DATETIME +let $target_type= DATETIME(6); +let $source_value= '2018-10-11'; +let $target_value= '2018-10-11 00:00:00.000000'; +let $can_convert = $if_is_non_lossy; +source suite/rpl/include/check_type.inc; + +let $source_temp_format= 0; +let $source_type= DATE; +let $target_temp_format= 1; +let $target_type= DATETIME(6); +let $source_value= '2018-10-11'; +let $target_value= '2018-10-11 00:00:00.000000'; +let $can_convert = $if_is_non_lossy; +source suite/rpl/include/check_type.inc; + +# zero-precision test version +let $source_temp_format= 1; +let $source_type= DATE; +let $target_temp_format= 1; +let $target_type= DATETIME(0); +let $source_value= '2018-10-11'; +let $target_value= '2018-10-11 00:00:00'; +let $can_convert = $if_is_non_lossy; +source suite/rpl/include/check_type.inc; + +# LOSSY +let $source_temp_format= 1; +let $source_type= DATETIME(6); +let $target_temp_format= 1; +let $target_type= DATE; +let $source_value= '2018-10-11 00:00:00.000001'; +let $target_value= '2018-10-11'; +let $can_convert = $if_is_lossy; +source suite/rpl/include/check_type.inc; + +let $source_temp_format= 1; +let $source_type= DATETIME(6); +let $target_temp_format= 0; +let $target_type= DATE; +let $source_value= '2018-10-11 00:00:00.000001'; +let $target_value= '2018-10-11'; +let $can_convert = $if_is_lossy; +source suite/rpl/include/check_type.inc; + +# zero-precision test version +let $source_temp_format= 1; +let $source_type= DATETIME(0); +let $target_temp_format= 1; +let $target_type= DATE; +let $source_value= '2018-10-11 00:00:00'; +let $target_value= '2018-10-11'; +let $can_convert = $if_is_lossy; +source suite/rpl/include/check_type.inc; + +# TODO: fix MDEV-17394 Row-based replication DATETIME(m) to +# DATETIME(s) does not work or incorrect +# +# +# let $source_temp_format= 0; +# let $source_type= DATETIME(6); +# let $target_temp_format= 1; +# let $target_type= DATE; +# ... +# let $source_temp_format= 0; +# let $source_type= DATETIME(6); +# let $target_temp_format= 0; +# let $target_type= DATE; +# ... + +let $source_temp_format=; +let $target_temp_format=; +--echo # End of MDEV-17098 + + --source include/rpl_reset.inc enable_query_log; diff --git a/mysql-test/suite/rpl/r/rpl_15919.result b/mysql-test/suite/rpl/r/rpl_15919.result new file mode 100644 index 00000000000..4d2aaac44ef --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_15919.result @@ -0,0 +1,19 @@ +include/master-slave.inc +[connection master] +connection master; +create table RPL(a int); +insert into RPL values(1); +connection slave; +select * from rpl; +a +1 +insert into RPL values(3); +insert into rpl values(4); +select * from rpl; +a +1 +3 +4 +connection master; +drop table RPL; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment.result b/mysql-test/suite/rpl/r/rpl_auto_increment.result index 077645ac500..48617a0f713 100644 --- a/mysql-test/suite/rpl/r/rpl_auto_increment.result +++ b/mysql-test/suite/rpl/r/rpl_auto_increment.result @@ -318,15 +318,7 @@ INSERT INTO t2 VALUES(4); FLUSH LOGS; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; DROP TABLE t2; @@ -334,15 +326,7 @@ connection slave; connection master; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; DROP TABLE t2; 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 de804312a39..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 @@ -116,20 +116,8 @@ connection slave; #Test if the results are consistent on master and slave #for 'INVOKES A TRIGGER with after insert action' include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:t4, slave:t4] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:t6, slave:t6] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; DROP TABLE t2; @@ -255,20 +243,8 @@ connection slave; #Test if the results are consistent on master and slave #for 'INVOKES A TRIGGER with before insert action' include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:t4, slave:t4] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:t6, slave:t6] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; DROP TABLE t2; @@ -394,20 +370,8 @@ connection slave; #Test if the results are consistent on master and slave #for 'INVOKES A TRIGGER with after update action' include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:t4, slave:t4] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:t6, slave:t6] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; DROP TABLE t2; @@ -533,20 +497,8 @@ connection slave; #Test if the results are consistent on master and slave #for 'INVOKES A TRIGGER with before update action' include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:t4, slave:t4] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:t6, slave:t6] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; DROP TABLE t2; @@ -672,20 +624,8 @@ connection slave; #Test if the results are consistent on master and slave #for 'INVOKES A TRIGGER with after delete action' include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:t4, slave:t4] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:t6, slave:t6] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; DROP TABLE t2; @@ -811,20 +751,8 @@ connection slave; #Test if the results are consistent on master and slave #for 'INVOKES A TRIGGER with before delete action' include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:t4, slave:t4] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:t6, slave:t6] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; DROP TABLE t2; @@ -904,15 +832,7 @@ connection slave; #Test if the results are consistent on master and slave #for 'CALLS A FUNCTION which INVOKES A TRIGGER with after insert action' include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:t3, slave:t3] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; drop table t1; drop table t2; @@ -989,15 +909,7 @@ connection slave; #Test if the results are consistent on master and slave #for 'CALLS A FUNCTION which INVOKES A TRIGGER with before insert action' include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:t3, slave:t3] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; drop table t1; drop table t2; @@ -1028,10 +940,6 @@ connection slave; #Test if the results are consistent on master and slave #for 'INSERT DATA INTO VIEW WHICH INVOKES TRIGGERS' include/diff_tables.inc [master:t3, slave:t3] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; DROP TABLE t2; @@ -1062,10 +970,6 @@ connection slave; #Test if the results are consistent on master and slave #for 'INSERT DATA INTO VIEW WHICH INVOKES TRIGGERS' include/diff_tables.inc [master:t3, slave:t3] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; DROP TABLE t2; @@ -1189,15 +1093,7 @@ connection slave; #Test if the results are consistent on master and slave #for 'UPDATE MORE THAN ONE TABLES ON TOP-STATEMENT' include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; drop table t1; drop table t2; @@ -1258,15 +1154,7 @@ connection slave; #Test if the results are consistent on master and slave #for 'INSERT DATA INTO VIEW WHICH INVOLVED MORE THAN ONE TABLES' include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; drop table t1; drop table t2; diff --git a/mysql-test/suite/rpl/r/rpl_binlog_index.result b/mysql-test/suite/rpl/r/rpl_binlog_index.result index b0e59c55b4a..4257dbde57a 100644 --- a/mysql-test/suite/rpl/r/rpl_binlog_index.result +++ b/mysql-test/suite/rpl/r/rpl_binlog_index.result @@ -45,10 +45,6 @@ include/start_slave.inc connection master; connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; connection slave; diff --git a/mysql-test/suite/rpl/r/rpl_checksum_cache.result b/mysql-test/suite/rpl/r/rpl_checksum_cache.result index 85700e4e239..e8f221cc181 100644 --- a/mysql-test/suite/rpl/r/rpl_checksum_cache.result +++ b/mysql-test/suite/rpl/r/rpl_checksum_cache.result @@ -43,10 +43,6 @@ Variable_name Value Binlog_cache_disk_use 1 connection slave; include/diff_tables.inc [master:test.t1, slave:test.t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; begin; delete from t1; @@ -64,10 +60,6 @@ Variable_name Value Binlog_cache_disk_use 1 connection slave; include/diff_tables.inc [master:test.t2, slave:test.t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; begin; delete from t2; @@ -85,10 +77,6 @@ Variable_name Value Binlog_cache_disk_use 1 connection slave; include/diff_tables.inc [master:test.t3, slave:test.t3] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; begin; delete from t3; @@ -131,20 +119,8 @@ Variable_name Value Binlog_cache_disk_use 1 connection slave; include/diff_tables.inc [master:test.t1, slave:test.t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:test.t2, slave:test.t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:test.t3, slave:test.t3] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; begin; delete from t1; diff --git a/mysql-test/suite/rpl/r/rpl_conditional_comments.result b/mysql-test/suite/rpl/r/rpl_conditional_comments.result index fe81ea2df0e..044f31427be 100644 --- a/mysql-test/suite/rpl/r/rpl_conditional_comments.result +++ b/mysql-test/suite/rpl/r/rpl_conditional_comments.result @@ -18,10 +18,6 @@ master-bin.000001 # Query # # use `test`; /* 999999 --- */INSERT /*!INTO*/ /*!10 master-bin.000001 # Query # # COMMIT connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead # Case 2: # ----------------------------------------------------------------- @@ -35,10 +31,6 @@ CREATE TABLE t1(c1 INT); EXECUTE stmt; connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; SET @value=62; @@ -71,10 +63,6 @@ master-bin.000001 # Query # # use `test`; INSERT INTO /* 999999 blabla */ t1 VAL master-bin.000001 # Query # # COMMIT connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead # Case 3: # ----------------------------------------------------------------- diff --git a/mysql-test/suite/rpl/r/rpl_corruption.result b/mysql-test/suite/rpl/r/rpl_corruption.result index 161559af81f..14a67b3a3a5 100644 --- a/mysql-test/suite/rpl/r/rpl_corruption.result +++ b/mysql-test/suite/rpl/r/rpl_corruption.result @@ -53,10 +53,6 @@ include/start_slave.inc connection master; connection slave; include/diff_tables.inc [master:test.t1, slave:test.t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead # 8. Clean up connection master; SET GLOBAL debug_dbug= ""; diff --git a/mysql-test/suite/rpl/r/rpl_create_drop_user.result b/mysql-test/suite/rpl/r/rpl_create_drop_user.result index f8cc271e8cf..f9069530e82 100644 --- a/mysql-test/suite/rpl/r/rpl_create_drop_user.result +++ b/mysql-test/suite/rpl/r/rpl_create_drop_user.result @@ -17,15 +17,15 @@ CURRENT_USER u2@localhost disconnect user_a; connection master; -SELECT user, password FROM mysql.user WHERE user LIKE 'u%' ORDER BY user; -user password -u1 *D9553C4CE316A9845CE49E30A2D7E3857AF966C4 -u2 +SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ; +user password plugin authentication_string +u1 mysql_native_password *D9553C4CE316A9845CE49E30A2D7E3857AF966C4 +u2 mysql_native_password connection slave; -SELECT user, password FROM mysql.user WHERE user LIKE 'u%' ORDER BY user; -user password -u1 *D9553C4CE316A9845CE49E30A2D7E3857AF966C4 -u2 +SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ; +user password plugin authentication_string +u1 mysql_native_password *D9553C4CE316A9845CE49E30A2D7E3857AF966C4 +u2 mysql_native_password connection master; CREATE OR REPLACE USER u1@localhost IDENTIFIED BY 'abcdefghijk2'; connect user_a, localhost, u1,'abcdefghijk2',; @@ -35,25 +35,25 @@ CURRENT_USER u1@localhost disconnect user_a; connection master; -SELECT user, password FROM mysql.user WHERE user LIKE 'u%' ORDER BY user; -user password -u1 *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E -u2 +SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ; +user password plugin authentication_string +u1 mysql_native_password *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E +u2 mysql_native_password connection slave; -SELECT user, password FROM mysql.user WHERE user LIKE 'u%' ORDER BY user; -user password -u1 *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E -u2 +SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ; +user password plugin authentication_string +u1 mysql_native_password *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E +u2 mysql_native_password connection master; CREATE USER u1@localhost; ERROR HY000: Operation CREATE USER failed for 'u1'@'localhost' DROP USER u3@localhost; ERROR HY000: Operation DROP USER failed for 'u3'@'localhost' connection slave; -SELECT user, password FROM mysql.user WHERE user LIKE 'u%' ORDER BY user; -user password -u1 *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E -u2 +SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ; +user password plugin authentication_string +u1 mysql_native_password *A9A5EF53CE2EFAA6F4A746D63A917B2370971A7E +u2 mysql_native_password connection master; DROP USER IF EXISTS u1@localhost; DROP USER u2@localhost; @@ -61,6 +61,6 @@ DROP USER IF EXISTS u3@localhost; Warnings: Note 1974 Can't drop user 'u3'@'localhost'; it doesn't exist connection slave; -SELECT user, password FROM mysql.user WHERE user LIKE 'u%' ORDER BY user; -user password +SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ; +user password plugin authentication_string include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_current_user.result b/mysql-test/suite/rpl/r/rpl_current_user.result index 35e23863616..ba5269bef22 100644 --- a/mysql-test/suite/rpl/r/rpl_current_user.result +++ b/mysql-test/suite/rpl/r/rpl_current_user.result @@ -27,78 +27,36 @@ connection conn1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM CURRENT_USER(); include/rpl_sync.inc include/diff_tables.inc [server_1:v_user, server_2:v_user, server_3:v_user] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead # Verify 'GRANT ... ON TABLE ...' statement GRANT CREATE, INSERT, SELECT ON TABLE test.t1 TO CURRENT_USER(); include/rpl_sync.inc include/diff_tables.inc [server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead # Verify 'GRANT ... ON PROCEDURE...' statement GRANT ALTER ROUTINE, EXECUTE ON PROCEDURE p1 TO CURRENT_USER(); include/rpl_sync.inc include/diff_tables.inc [server_1:v_procs_priv, server_2:v_procs_priv, server_3:v_procs_priv] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead # Verify 'GRANT ... ON *.* ...' statement GRANT ALL PRIVILEGES ON *.* TO CURRENT_USER() WITH GRANT OPTION; include/rpl_sync.inc include/diff_tables.inc [server_1:v_procs_priv, server_2:v_procs_priv, server_3:v_procs_priv] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead # Verify 'REVOKE ... ON TABLE ...' statement REVOKE CREATE, INSERT, SELECT ON TABLE t1 FROM CURRENT_USER(); include/rpl_sync.inc include/diff_tables.inc [server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead # Verify 'REVOKE ... ON PROCEDURE...' statement REVOKE ALTER ROUTINE, EXECUTE ON PROCEDURE p1 FROM CURRENT_USER(); include/rpl_sync.inc include/diff_tables.inc [server_1:v_procs_priv, server_2:v_procs_priv, server_3:v_procs_priv] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead # Verify 'REVOKE ... ON *.* ...' statement REVOKE ALL PRIVILEGES ON *.* FROM CURRENT_USER(); include/rpl_sync.inc include/diff_tables.inc [server_1:v_user, server_2:v_user, server_3:v_user] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead # Verify 'GRANT ...' statement in the procedure CREATE PROCEDURE my_grant() @@ -106,12 +64,6 @@ GRANT CREATE, INSERT, SELECT ON TABLE test.t1 TO CURRENT_USER(); call my_grant; include/rpl_sync.inc include/diff_tables.inc [server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead # Verify 'REVOKE ... ON TABLE ...' statement in the procedure CREATE PROCEDURE my_revoke() @@ -119,23 +71,11 @@ REVOKE CREATE, INSERT, SELECT ON TABLE t1 FROM CURRENT_USER(); call my_revoke; include/rpl_sync.inc include/diff_tables.inc [server_1:v_tables_priv, server_2:v_tables_priv, server_3:v_tables_priv] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead # Verify 'RENAME USER ...' statement RENAME USER CURRENT_USER TO 'bug48321_2'@'localhost'; include/rpl_sync.inc include/diff_tables.inc [server_1:v_user, server_2:v_user, server_3:v_user] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead disconnect conn1; # Verify 'DROP USER ...' statement @@ -146,12 +86,6 @@ connection conn1; DROP USER CURRENT_USER(); include/rpl_sync.inc include/diff_tables.inc [server_1:v_user, server_2:v_user, server_3:v_user] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead # Verify 'ALTER EVENT...' statement connection master; @@ -160,24 +94,12 @@ CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT * FROM t1; ALTER DEFINER=CURRENT_USER() EVENT e1 ENABLE; include/rpl_sync.inc include/diff_tables.inc [server_1:v_event, server_2:v_event, server_3:v_event] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead # Session user will be set as definer, if the statement does not assign # a definer ALTER EVENT e1 ENABLE; include/rpl_sync.inc include/diff_tables.inc [server_1:v_event, server_2:v_event, server_3:v_event] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead # Verify that this patch does not affect the calling of CURRENT_USER() # in the other statements diff --git a/mysql-test/suite/rpl/r/rpl_do_grant.result b/mysql-test/suite/rpl/r/rpl_do_grant.result index 9eca21b38e4..9f6328bce8e 100644 --- a/mysql-test/suite/rpl/r/rpl_do_grant.result +++ b/mysql-test/suite/rpl/r/rpl_do_grant.result @@ -328,4 +328,5 @@ Grantor root@localhost connection master; DROP USER user_bug27606@localhost; +update mysql.user set plugin=''; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result b/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result index 120ae018d2f..7f2a82f1efb 100644 --- a/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result @@ -43,8 +43,7 @@ SET FOREIGN_KEY_CHECKS=1; connection slave; connection master; create table t1 (b int primary key) engine = INNODB; -create table t2 (a int primary key, b int, foreign key (b) references t1(b)) -engine = INNODB; +create table t2 (a int primary key, b int, foreign key (b) references t1(b)) engine = INNODB; insert into t1 set b=1; insert into t2 set a=1, b=1; set foreign_key_checks=0; diff --git a/mysql-test/suite/rpl/r/rpl_gtid_ignored.result b/mysql-test/suite/rpl/r/rpl_gtid_ignored.result index ac608c3c2a3..de4a815ab60 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_ignored.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_ignored.result @@ -79,7 +79,7 @@ a 9 connection server_1; DROP TABLE t1; -ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; +ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria; SET GLOBAL gtid_strict_mode= @old_gtid_strict_mode; SET debug_sync = "reset"; connection server_2; diff --git a/mysql-test/suite/rpl/r/rpl_gtid_mdev4484.result b/mysql-test/suite/rpl/r/rpl_gtid_mdev4484.result index aaeb0c8f119..00307a8c104 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_mdev4484.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_mdev4484.result @@ -3,7 +3,7 @@ include/master-slave.inc connection slave; include/stop_slave.inc SET sql_log_bin=0; -ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; +ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria; SET sql_log_bin=1; include/start_slave.inc connection master; 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 ff845794c22..1647b6c998c 100644 --- a/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result +++ b/mysql-test/suite/rpl/r/rpl_gtid_stop_start.result @@ -159,7 +159,7 @@ a 8 9 SET sql_log_bin= 0; -ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; +ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria; SET sql_log_bin= 1; include/start_slave.inc connection server_1; diff --git a/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result b/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result index a666ae26c51..69215ecb545 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result +++ b/mysql-test/suite/rpl/r/rpl_innodb_bug28430.result @@ -51,6 +51,10 @@ DELETE FROM test.regular_tbl WHERE id = del_count; SET del_count = del_count - 2; END WHILE; END| +Warnings: +Level Warning +Code 1287 +Message '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead CREATE PROCEDURE test.proc_bykey() BEGIN DECLARE ins_count INT DEFAULT 1000; @@ -72,6 +76,10 @@ DELETE FROM test.bykey_tbl WHERE id = del_count; SET del_count = del_count - 2; END WHILE; END| +Warnings: +Level Warning +Code 1287 +Message '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead CREATE PROCEDURE test.proc_byrange() BEGIN DECLARE ins_count INT DEFAULT 1000; @@ -93,6 +101,10 @@ DELETE FROM test.byrange_tbl WHERE id = del_count; SET del_count = del_count - 2; END WHILE; END| +Warnings: +Level Warning +Code 1287 +Message '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead begin; CALL test.proc_norm(); commit; 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 24ce8899e2c..45742c989c4 100644 --- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result +++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result @@ -482,36 +482,36 @@ SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; CREATE USER 'user_test_rpl'@'localhost' IDENTIFIED BY PASSWORD '*1111111111111111111111111111111111111111'; SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%'; host user password plugin authentication_string select_priv -localhost user_test_rpl *1111111111111111111111111111111111111111 N +localhost user_test_rpl mysql_native_password *1111111111111111111111111111111111111111 N connection slave; USE test_rpl; SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%'; host user password plugin authentication_string select_priv -localhost user_test_rpl *1111111111111111111111111111111111111111 N +localhost user_test_rpl mysql_native_password *1111111111111111111111111111111111111111 N connection master; ******************** GRANT ******************** GRANT SELECT ON *.* TO 'user_test_rpl'@'localhost'; SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%'; host user password plugin authentication_string select_priv -localhost user_test_rpl *1111111111111111111111111111111111111111 Y +localhost user_test_rpl mysql_native_password *1111111111111111111111111111111111111111 Y connection slave; USE test_rpl; SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%'; host user password plugin authentication_string select_priv -localhost user_test_rpl *1111111111111111111111111111111111111111 Y +localhost user_test_rpl mysql_native_password *1111111111111111111111111111111111111111 Y connection master; ******************** REVOKE ******************** REVOKE SELECT ON *.* FROM 'user_test_rpl'@'localhost'; SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%'; host user password plugin authentication_string select_priv -localhost user_test_rpl *1111111111111111111111111111111111111111 N +localhost user_test_rpl mysql_native_password *1111111111111111111111111111111111111111 N connection slave; USE test_rpl; SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%'; host user password plugin authentication_string select_priv -localhost user_test_rpl *1111111111111111111111111111111111111111 N +localhost user_test_rpl mysql_native_password *1111111111111111111111111111111111111111 N connection master; ******************** SET PASSWORD ******************** @@ -676,7 +676,6 @@ DROP TRIGGER tr1; ******************** EVENTS ******************** -GRANT EVENT ON *.* TO 'root'@'localhost'; INSERT INTO t1 VALUES(1, 'test1'); CREATE EVENT e1 ON SCHEDULE EVERY '1' SECOND COMMENT 'e_second_comment' DO DELETE FROM t1; SHOW EVENTS; @@ -1098,8 +1097,6 @@ master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2 master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # GTID #-#-# master-bin.000001 # Query # # use `test_rpl`; DROP TRIGGER tr1 -master-bin.000001 # Gtid # # GTID #-#-# -master-bin.000001 # Query # # use `test_rpl`; GRANT EVENT ON *.* TO 'root'@'localhost' master-bin.000001 # Gtid # # BEGIN GTID #-#-# master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 'test1') master-bin.000001 # Xid # # COMMIT /* XID */ diff --git a/mysql-test/suite/rpl/r/rpl_insert_ignore.result b/mysql-test/suite/rpl/r/rpl_insert_ignore.result index 3181749f604..9c621169a66 100644 --- a/mysql-test/suite/rpl/r/rpl_insert_ignore.result +++ b/mysql-test/suite/rpl/r/rpl_insert_ignore.result @@ -25,10 +25,6 @@ INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a; include/assert.inc [Count of elements in t1 should be 6.] connection slave; include/diff_tables.inc [master:test.t1 , slave:test.t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a; include/assert.inc [Count of elements in t1 should be 6.] @@ -73,10 +69,6 @@ INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a; include/assert.inc [Count of elements in t1 should be 6.] connection slave; include/diff_tables.inc [master:test.t1 , slave:test.t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a; include/assert.inc [Count of elements in t1 should be 6.] diff --git a/mysql-test/suite/rpl/r/rpl_lcase_tblnames_rewrite_db.result b/mysql-test/suite/rpl/r/rpl_lcase_tblnames_rewrite_db.result new file mode 100644 index 00000000000..f7010750b18 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_lcase_tblnames_rewrite_db.result @@ -0,0 +1,38 @@ +include/master-slave.inc +[connection master] +SET SQL_LOG_BIN=0; +CREATE DATABASE B37656; +SET SQL_LOG_BIN=1; +connection slave; +CREATE DATABASE BUG37656; +### action: show that database on slave is created in lowercase +SHOW DATABASES LIKE '%37656'; +Database (%37656) +bug37656 +connection master; +USE B37656; +CREATE TABLE T1 (a int); +INSERT INTO T1 VALUES (1); +### assertion: master contains capitalized case table +SHOW TABLES; +Tables_in_B37656 +T1 +connection slave; +use bug37656; +### assertion: slave contains lowered case table +SHOW TABLES; +Tables_in_bug37656 +t1 +### assertion: master and slave tables do not differ +include/diff_tables.inc [master:B37656.T1, slave:bug37656.t1] +connection master; +SET SQL_LOG_BIN=0; +DROP DATABASE B37656; +SET SQL_LOG_BIN=1; +SHOW DATABASES LIKE '%37656'; +Database (%37656) +connection slave; +DROP DATABASE BUG37656; +SHOW DATABASES LIKE '%37656'; +Database (%37656) +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata.result b/mysql-test/suite/rpl/r/rpl_loaddata.result index 551361dcec5..e759f34bb9d 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata.result @@ -119,10 +119,6 @@ connection master; connection slave; use b48297_db1; include/diff_tables.inc [master:b48297_db1.t1, slave:b48297_db1.t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP DATABASE b48297_db1; DROP DATABASE b42897_db2; diff --git a/mysql-test/suite/rpl/r/rpl_loadfile.result b/mysql-test/suite/rpl/r/rpl_loadfile.result index ebb06b179e3..2afe510ddeb 100644 --- a/mysql-test/suite/rpl/r/rpl_loadfile.result +++ b/mysql-test/suite/rpl/r/rpl_loadfile.result @@ -244,10 +244,6 @@ include/start_slave.inc connection master; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; DROP PROCEDURE p; diff --git a/mysql-test/suite/rpl/r/rpl_lost_events_on_rotate.result b/mysql-test/suite/rpl/r/rpl_lost_events_on_rotate.result index ab58c613d1c..e03606874b8 100644 --- a/mysql-test/suite/rpl/r/rpl_lost_events_on_rotate.result +++ b/mysql-test/suite/rpl/r/rpl_lost_events_on_rotate.result @@ -10,10 +10,6 @@ FLUSH LOGS; SET DEBUG_SYNC= 'now SIGNAL signal.rotate_finished'; connection slave; include/diff_tables.inc [master:t,slave:t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; SET @@GLOBAL.DEBUG_DBUG= @debug_saved; SET DEBUG_SYNC= 'RESET'; diff --git a/mysql-test/suite/rpl/r/rpl_mdev10863.result b/mysql-test/suite/rpl/r/rpl_mdev10863.result index 6accd1ee830..0326316563c 100644 --- a/mysql-test/suite/rpl/r/rpl_mdev10863.result +++ b/mysql-test/suite/rpl/r/rpl_mdev10863.result @@ -46,6 +46,6 @@ SET GLOBAL slave_parallel_threads=@old_parallel_threads; SET GLOBAL max_relay_log_size= @old_max_relay; include/start_slave.inc connection server_1; -ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; +ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria; DROP TABLE t1; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_mdev12179.result b/mysql-test/suite/rpl/r/rpl_mdev12179.result index 336839ca866..dcda036cdfb 100644 --- a/mysql-test/suite/rpl/r/rpl_mdev12179.result +++ b/mysql-test/suite/rpl/r/rpl_mdev12179.result @@ -49,7 +49,7 @@ a 1 include/stop_slave.inc SET sql_log_bin=0; -ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; +ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria; CREATE TABLE mysql.gtid_slave_pos_innodb LIKE mysql.gtid_slave_pos; ALTER TABLE mysql.gtid_slave_pos_innodb ENGINE=InnoDB; INSERT INTO mysql.gtid_slave_pos_innodb SELECT * FROM mysql.gtid_slave_pos; @@ -77,7 +77,7 @@ SELECT table_name, engine FROM information_schema.tables WHERE table_schema='mysql' AND table_name LIKE 'gtid_slave_pos%' ORDER BY table_name; table_name engine -gtid_slave_pos MyISAM +gtid_slave_pos Aria gtid_slave_pos_innodb InnoDB SELECT @@gtid_pos_auto_engines; @@gtid_pos_auto_engines @@ -122,7 +122,7 @@ table_name engine gtid_slave_pos InnoDB include/stop_slave.inc SET sql_log_bin=0; -ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; +ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria; SET sql_log_bin=1; connection server_1; INSERT INTO t1 VALUES (5); @@ -157,7 +157,7 @@ SELECT lower(table_name), engine FROM information_schema.tables WHERE table_schema='mysql' AND table_name LIKE 'gtid_slave_pos%' ORDER BY table_name; lower(table_name) engine -gtid_slave_pos MyISAM +gtid_slave_pos Aria gtid_slave_pos_innodb InnoDB include/stop_slave.inc SET sql_log_bin=0; @@ -202,7 +202,7 @@ SELECT table_name, engine FROM information_schema.tables WHERE table_schema='mysql' AND table_name LIKE 'gtid_slave_pos%' ORDER BY table_name; table_name engine -gtid_slave_pos MyISAM +gtid_slave_pos Aria SELECT domain_id, max(seq_no) FROM mysql.gtid_slave_pos GROUP BY domain_id; domain_id max(seq_no) 0 11 @@ -250,7 +250,7 @@ SELECT lower(table_name), engine FROM information_schema.tables WHERE table_schema='mysql' AND table_name LIKE 'gtid_slave_pos%' ORDER BY table_name; lower(table_name) engine -gtid_slave_pos MyISAM +gtid_slave_pos Aria gtid_slave_pos_innodb InnoDB SELECT domain_id, max(seq_no) FROM mysql.gtid_slave_pos GROUP BY domain_id; domain_id max(seq_no) diff --git a/mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result b/mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result index ffee1a01158..388c8e67b68 100644 --- a/mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result +++ b/mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result @@ -23,10 +23,6 @@ include/wait_for_slave_sql_error_and_skip.inc [errno=1590] Got one of the listed errors include/wait_for_slave_sql_error_and_skip.inc [errno=1590] include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ######################################################################################## # 2 - BEGIN - IMPLICIT COMMIT by DDL ######################################################################################## @@ -59,10 +55,6 @@ INSERT INTO t1 (a, data) VALUES (29, 's');; CREATE TABLE t5 (a int); connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ######################################################################################## # 3 - BEGIN - COMMIT ######################################################################################## @@ -77,10 +69,6 @@ Got one of the listed errors COMMIT; connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ######################################################################################## # 4 - BEGIN - ROLLBACK ######################################################################################## @@ -97,10 +85,6 @@ Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ######################################################################################## # 5 - PROCEDURE ######################################################################################## @@ -127,10 +111,6 @@ Got one of the listed errors ROLLBACK; connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ######################################################################################## # 6 - XID ######################################################################################## @@ -151,10 +131,6 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back COMMIT; connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ######################################################################################## # 7 - NON-TRANS TABLE ######################################################################################## @@ -176,10 +152,6 @@ Got one of the listed errors COMMIT; connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ######################################################################## # 8 - Bug#55375(Regression Bug) Transaction bigger than # max_binlog_cache_size crashes slave 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 24eedb5a0d5..f900a8b0e9a 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 @@ -332,10 +332,6 @@ SET AUTOCOMMIT= 1; ################################################################################### connection slave; include/diff_tables.inc [master:tt_1,slave:tt_1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ################################################################################### # CLEAN ################################################################################### diff --git a/mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result b/mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result index 93a81cd3cf7..630bfa226cf 100644 --- a/mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result +++ b/mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result @@ -22,10 +22,6 @@ INSERT INTO t1 VALUES (RAND()); INSERT INTO t1 VALUES (LAST_INSERT_ID()); connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_not_null_innodb.result b/mysql-test/suite/rpl/r/rpl_not_null_innodb.result index 40898c452dc..2d53a525f2c 100644 --- a/mysql-test/suite/rpl/r/rpl_not_null_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_not_null_innodb.result @@ -46,15 +46,7 @@ INSERT INTO t4(a) VALUES (5); connection slave; TABLES t1 and t2 must be equal otherwise an error will be thrown. include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead TABLES t2 and t3 must be different. connection master; SELECT * FROM t3 ORDER BY a; @@ -95,10 +87,6 @@ REPLACE INTO t1(a,b,c) VALUES (2, NULL, 300); connection slave; TABLES t1 and t2 must be equal otherwise an error will be thrown. include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ************* CLEANING ************* connection master; DROP TABLE t1; @@ -151,10 +139,6 @@ REPLACE INTO t1(a,b,c) VALUES (2, NULL, b'00'); TABLES t1 and t2 must be equal otherwise an error will be thrown. connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; connection slave; diff --git a/mysql-test/suite/rpl/r/rpl_not_null_myisam.result b/mysql-test/suite/rpl/r/rpl_not_null_myisam.result index 83b7804f133..93c13e9943f 100644 --- a/mysql-test/suite/rpl/r/rpl_not_null_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_not_null_myisam.result @@ -46,15 +46,7 @@ INSERT INTO t4(a) VALUES (5); connection slave; TABLES t1 and t2 must be equal otherwise an error will be thrown. include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead TABLES t2 and t3 must be different. connection master; SELECT * FROM t3 ORDER BY a; @@ -95,10 +87,6 @@ REPLACE INTO t1(a,b,c) VALUES (2, NULL, 300); connection slave; TABLES t1 and t2 must be equal otherwise an error will be thrown. include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ************* CLEANING ************* connection master; DROP TABLE t1; @@ -151,10 +139,6 @@ REPLACE INTO t1(a,b,c) VALUES (2, NULL, b'00'); TABLES t1 and t2 must be equal otherwise an error will be thrown. connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; connection slave; diff --git a/mysql-test/suite/rpl/r/rpl_old_master.result b/mysql-test/suite/rpl/r/rpl_old_master.result index dd3de4d327b..f985bee6832 100644 --- a/mysql-test/suite/rpl/r/rpl_old_master.result +++ b/mysql-test/suite/rpl/r/rpl_old_master.result @@ -9,7 +9,10 @@ connection slave; SET @old_parallel= @@GLOBAL.slave_parallel_threads; SET GLOBAL slave_parallel_threads=10; CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4; +FLUSH TABLES WITH READ LOCK; include/start_slave.inc +include/wait_for_slave_param.inc [Seconds_Behind_Master] +UNLOCK TABLES; connection master; CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t2 VALUES (1); diff --git a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result index 07b080a72c3..ca202a66b0e 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result +++ b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result @@ -648,4 +648,12 @@ SET GLOBAL slave_parallel_threads=@old_parallel_threads; include/start_slave.inc connection server_1; DROP TABLE t1, t2, t3; +include/save_master_gtid.inc +connection server_2; +include/sync_with_master_gtid.inc +Check that no more than the expected last four GTIDs are in mysql.gtid_slave_pos +select count(4) <= 4 from mysql.gtid_slave_pos order by domain_id, sub_id; +count(4) <= 4 +1 +connection server_1; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_reset_slave_fail.result b/mysql-test/suite/rpl/r/rpl_reset_slave_fail.result index 3173c8b768b..34ce68cb079 100644 --- a/mysql-test/suite/rpl/r/rpl_reset_slave_fail.result +++ b/mysql-test/suite/rpl/r/rpl_reset_slave_fail.result @@ -31,10 +31,6 @@ include/start_slave.inc connection master; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; connection slave; diff --git a/mysql-test/suite/rpl/r/rpl_row_001.result b/mysql-test/suite/rpl/r/rpl_row_001.result index b5b2b370e61..f7684d5ad97 100644 --- a/mysql-test/suite/rpl/r/rpl_row_001.result +++ b/mysql-test/suite/rpl/r/rpl_row_001.result @@ -19,11 +19,11 @@ create temporary table tmp select * from mysql.user where host="localhost" and u connection slave; STOP SLAVE; connection master; -SET PASSWORD FOR root@"localhost" = PASSWORD('foo'); +UPDATE mysql.user SET password=password('foo') WHERE host='localhost' AND user='root'; connection slave; START SLAVE; connection master; -SET PASSWORD FOR root@"localhost" = PASSWORD(''); +UPDATE mysql.user SET password=password('') WHERE host='localhost' AND user='root'; CREATE TABLE t3(n INT); INSERT INTO t3 VALUES(1),(2); connection slave; 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 9cea1883839..1d4b31a4a87 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result @@ -535,20 +535,12 @@ INSERT INTO t1 VALUES (1, "", 1); INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2); connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead [expecting slave to replicate correctly] connection master; INSERT INTO t2 VALUES (1, "", 1); INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2); connection slave; include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection slave; 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"); @@ -562,10 +554,6 @@ INSERT INTO t4 VALUES (1, "", 1); INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2); connection slave; include/diff_tables.inc [master:t4, slave:t4] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead [expecting slave to stop] connection master; INSERT INTO t5 VALUES (1, "", 1); @@ -588,10 +576,6 @@ INSERT INTO t7 VALUES (1, "", 1); INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2); connection slave; include/diff_tables.inc [master:t7, slave:t7] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; drop table t1, t2, t3, t4, t5, t6, t7; connection slave; @@ -603,10 +587,6 @@ ERROR 23000: Duplicate entry '10' for key 'PRIMARY' INSERT INTO t1 VALUES (4); connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; drop table t1; connection slave; @@ -665,10 +645,6 @@ UPDATE t1 SET `int_key` = 4 ORDER BY `pk` LIMIT 6; connection slave; *** results: t2 must be consistent **** include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1, t2; EOF OF TESTS @@ -688,10 +664,6 @@ UPDATE t1 SET a = 0 WHERE a < 4; UPDATE t1 SET a = 8 WHERE a < 5; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; drop table t1; connection slave; @@ -739,10 +711,6 @@ INSERT INTO t1 ( a ) VALUES ( 1 ); UPDATE IGNORE t1 SET a = 9 WHERE a < 5 LIMIT 3; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; drop table t1; connection slave; 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 38575a29943..1e3ddd4f289 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result @@ -540,20 +540,12 @@ INSERT INTO t1 VALUES (1, "", 1); INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2); connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead [expecting slave to replicate correctly] connection master; INSERT INTO t2 VALUES (1, "", 1); INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2); connection slave; include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection slave; 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"); @@ -567,10 +559,6 @@ INSERT INTO t4 VALUES (1, "", 1); INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2); connection slave; include/diff_tables.inc [master:t4, slave:t4] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead [expecting slave to stop] connection master; INSERT INTO t5 VALUES (1, "", 1); @@ -593,10 +581,6 @@ INSERT INTO t7 VALUES (1, "", 1); INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2); connection slave; include/diff_tables.inc [master:t7, slave:t7] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; drop table t1, t2, t3, t4, t5, t6, t7; connection slave; @@ -608,10 +592,6 @@ ERROR 23000: Duplicate entry '10' for key 'PRIMARY' INSERT INTO t1 VALUES (4); connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; drop table t1; connection slave; @@ -670,10 +650,6 @@ UPDATE t1 SET `int_key` = 4 ORDER BY `pk` LIMIT 6; connection slave; *** results: t2 must be consistent **** include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1, t2; EOF OF TESTS @@ -693,10 +669,6 @@ UPDATE t1 SET a = 0 WHERE a < 4; UPDATE t1 SET a = 8 WHERE a < 5; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; drop table t1; connection slave; @@ -748,10 +720,6 @@ 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] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; drop table t1; connection slave; diff --git a/mysql-test/suite/rpl/r/rpl_row_find_row.result b/mysql-test/suite/rpl/r/rpl_row_find_row.result index 9f83ebf555e..e9ce7e6e21b 100644 --- a/mysql-test/suite/rpl/r/rpl_row_find_row.result +++ b/mysql-test/suite/rpl/r/rpl_row_find_row.result @@ -34,10 +34,6 @@ INSERT INTO t1(c1,c2) VALUES(1,2); UPDATE t1 SET c1=1000 WHERE c2=2; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; connection slave; diff --git a/mysql-test/suite/rpl/r/rpl_row_img_blobs.result b/mysql-test/suite/rpl/r/rpl_row_img_blobs.result index c444802aefb..546f42b61aa 100644 --- a/mysql-test/suite/rpl/r/rpl_row_img_blobs.result +++ b/mysql-test/suite/rpl/r/rpl_row_img_blobs.result @@ -66,24 +66,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -119,24 +107,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -172,24 +148,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -225,24 +189,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -277,24 +229,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -329,24 +269,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -381,24 +309,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -436,24 +352,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -489,24 +393,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -542,24 +434,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -595,24 +475,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -647,24 +515,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -699,24 +555,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -751,24 +595,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -806,24 +638,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -859,24 +679,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -912,24 +720,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -965,24 +761,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1017,24 +801,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1069,24 +841,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1121,24 +881,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1176,24 +924,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1229,24 +965,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1282,24 +1006,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1335,24 +1047,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1387,24 +1087,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1439,24 +1127,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1491,24 +1167,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1546,24 +1210,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1599,24 +1251,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1652,24 +1292,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1705,24 +1333,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1757,24 +1373,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1809,24 +1413,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1861,24 +1453,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1916,24 +1496,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1969,24 +1537,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2022,24 +1578,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2075,24 +1619,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2127,24 +1659,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2179,24 +1699,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2231,24 +1739,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2286,24 +1782,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2339,24 +1823,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2392,24 +1864,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2445,24 +1905,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2497,24 +1945,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2549,24 +1985,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2601,24 +2025,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2656,24 +2068,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2709,24 +2109,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2762,24 +2150,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2815,24 +2191,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2867,24 +2231,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2919,24 +2271,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2971,24 +2311,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3055,24 +2383,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3108,24 +2424,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3161,24 +2465,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3214,24 +2506,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3266,24 +2546,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3318,24 +2586,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3370,24 +2626,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3425,24 +2669,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3478,24 +2710,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3531,24 +2751,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3584,24 +2792,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3636,24 +2832,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3688,24 +2872,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3740,24 +2912,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3795,24 +2955,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3848,24 +2996,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3901,24 +3037,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3954,24 +3078,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4006,24 +3118,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4058,24 +3158,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4110,24 +3198,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4165,24 +3241,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4218,24 +3282,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4271,24 +3323,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4324,24 +3364,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4376,24 +3404,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4428,24 +3444,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4480,24 +3484,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4535,24 +3527,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4588,24 +3568,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4641,24 +3609,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4694,24 +3650,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4746,24 +3690,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4798,24 +3730,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4850,24 +3770,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4905,24 +3813,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4958,24 +3854,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5011,24 +3895,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5064,24 +3936,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5116,24 +3976,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5168,24 +4016,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5220,24 +4056,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5275,24 +4099,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5328,24 +4140,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5381,24 +4181,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5434,24 +4222,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5486,24 +4262,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5538,24 +4302,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5590,24 +4342,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5645,24 +4385,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5698,24 +4426,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5751,24 +4467,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5804,24 +4508,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5856,24 +4548,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5908,24 +4588,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5960,24 +4628,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -6044,24 +4700,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -6097,24 +4741,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -6150,24 +4782,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -6203,24 +4823,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -6255,24 +4863,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -6307,24 +4903,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -6359,24 +4943,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -6414,24 +4986,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -6467,24 +5027,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -6520,24 +5068,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -6573,24 +5109,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -6625,24 +5149,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -6677,24 +5189,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -6729,24 +5229,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -6784,24 +5272,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -6837,24 +5313,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -6890,24 +5354,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -6943,24 +5395,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -6995,24 +5435,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -7047,24 +5475,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -7099,24 +5515,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -7154,24 +5558,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -7207,24 +5599,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -7260,24 +5640,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -7313,24 +5681,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -7365,24 +5721,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -7417,24 +5761,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -7469,24 +5801,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -7524,24 +5844,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -7577,24 +5885,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -7630,24 +5926,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -7683,24 +5967,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -7735,24 +6007,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -7787,24 +6047,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -7839,24 +6087,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -7894,24 +6130,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -7947,24 +6171,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -8000,24 +6212,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -8053,24 +6253,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -8105,24 +6293,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -8157,24 +6333,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -8209,24 +6373,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -8264,24 +6416,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -8317,24 +6457,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -8370,24 +6498,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -8423,24 +6539,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -8475,24 +6579,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -8527,24 +6619,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -8579,24 +6659,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -8634,24 +6702,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -8687,24 +6743,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -8740,24 +6784,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -8793,24 +6825,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -8845,24 +6865,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -8897,24 +6905,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -8949,24 +6945,12 @@ UPDATE t SET c1=30 WHERE c3=30; UPDATE t SET c3=40 WHERE c1=30; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c2="a"; DELETE FROM t WHERE c1=20; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_img_eng_min.result b/mysql-test/suite/rpl/r/rpl_row_img_eng_min.result index 57195c1fe3f..965f74a5b94 100644 --- a/mysql-test/suite/rpl/r/rpl_row_img_eng_min.result +++ b/mysql-test/suite/rpl/r/rpl_row_img_eng_min.result @@ -74,24 +74,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -135,24 +123,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -196,24 +172,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -257,24 +221,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -318,24 +270,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -379,24 +319,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -440,24 +368,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -501,24 +417,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -562,24 +466,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -623,24 +515,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -684,24 +564,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -745,24 +613,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -808,24 +664,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -869,24 +713,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -930,24 +762,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -991,24 +811,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1052,24 +860,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1113,24 +909,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1174,24 +958,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1235,24 +1007,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1296,24 +1056,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1357,24 +1105,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1418,24 +1154,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1479,24 +1203,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1542,24 +1254,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1603,24 +1303,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1664,24 +1352,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1725,24 +1401,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1786,24 +1450,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1847,24 +1499,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1908,24 +1548,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1969,24 +1597,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2030,24 +1646,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2091,24 +1695,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2152,24 +1744,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2213,24 +1793,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2276,24 +1844,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2337,24 +1893,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2398,24 +1942,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2459,24 +1991,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2520,24 +2040,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2581,24 +2089,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2642,24 +2138,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2703,24 +2187,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2764,24 +2236,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2825,24 +2285,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2886,24 +2334,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2947,24 +2383,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3010,24 +2434,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3071,24 +2483,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3132,24 +2532,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3193,24 +2581,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3254,24 +2630,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3315,24 +2679,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3376,24 +2728,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3437,24 +2777,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3498,24 +2826,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3559,24 +2875,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3620,24 +2924,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3681,24 +2973,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3744,24 +3024,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3805,24 +3073,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3866,24 +3122,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3927,24 +3171,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3988,24 +3220,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4049,24 +3269,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4110,24 +3318,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4171,24 +3367,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4232,24 +3416,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4293,24 +3465,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4354,24 +3514,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4415,24 +3563,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4478,24 +3614,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4539,24 +3663,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4600,24 +3712,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4661,24 +3761,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4722,24 +3810,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4783,24 +3859,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4844,24 +3908,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4905,24 +3957,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4966,24 +4006,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5027,24 +4055,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5088,24 +4104,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5149,24 +4153,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5212,24 +4204,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5273,24 +4253,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5334,24 +4302,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5395,24 +4351,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5456,24 +4400,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5517,24 +4449,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5578,24 +4498,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5639,24 +4547,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5700,24 +4596,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5761,24 +4645,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5822,24 +4694,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5883,24 +4743,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_img_eng_noblob.result b/mysql-test/suite/rpl/r/rpl_row_img_eng_noblob.result index 112b98035c3..6a9eb40226a 100644 --- a/mysql-test/suite/rpl/r/rpl_row_img_eng_noblob.result +++ b/mysql-test/suite/rpl/r/rpl_row_img_eng_noblob.result @@ -74,24 +74,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -135,24 +123,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -196,24 +172,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -257,24 +221,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -318,24 +270,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -379,24 +319,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -440,24 +368,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -501,24 +417,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -562,24 +466,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -623,24 +515,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -684,24 +564,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -745,24 +613,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -808,24 +664,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -869,24 +713,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -930,24 +762,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -991,24 +811,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1052,24 +860,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1113,24 +909,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1174,24 +958,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1235,24 +1007,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1296,24 +1056,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1357,24 +1105,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1418,24 +1154,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1479,24 +1203,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1542,24 +1254,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1603,24 +1303,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1664,24 +1352,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1725,24 +1401,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1786,24 +1450,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1847,24 +1499,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1908,24 +1548,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -1969,24 +1597,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2030,24 +1646,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2091,24 +1695,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2152,24 +1744,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2213,24 +1793,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2276,24 +1844,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2337,24 +1893,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2398,24 +1942,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2459,24 +1991,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2520,24 +2040,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2581,24 +2089,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2642,24 +2138,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2703,24 +2187,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2764,24 +2236,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2825,24 +2285,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2886,24 +2334,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -2947,24 +2383,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3010,24 +2434,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3071,24 +2483,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3132,24 +2532,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3193,24 +2581,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3254,24 +2630,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3315,24 +2679,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3376,24 +2728,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3437,24 +2777,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3498,24 +2826,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3559,24 +2875,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3620,24 +2924,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3681,24 +2973,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3744,24 +3024,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3805,24 +3073,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3866,24 +3122,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3927,24 +3171,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -3988,24 +3220,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4049,24 +3269,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4110,24 +3318,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4171,24 +3367,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4232,24 +3416,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4293,24 +3465,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4354,24 +3514,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4415,24 +3563,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4478,24 +3614,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4539,24 +3663,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4600,24 +3712,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4661,24 +3761,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4722,24 +3810,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4783,24 +3859,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4844,24 +3908,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4905,24 +3957,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -4966,24 +4006,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5027,24 +4055,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5088,24 +4104,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5149,24 +4153,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5212,24 +4204,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5273,24 +4253,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5334,24 +4302,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5395,24 +4351,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5456,24 +4400,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5517,24 +4449,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5578,24 +4498,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5639,24 +4547,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5700,24 +4596,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5761,24 +4645,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5822,24 +4694,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc @@ -5883,24 +4743,12 @@ UPDATE t SET c2 = '0' WHERE c4 = '0'; UPDATE t SET c2 = '2' WHERE c4 = '2'; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DELETE FROM t WHERE c1 = 7; DELETE FROM t WHERE c1 = 8; DELETE FROM t; include/rpl_sync.inc include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection server_1; DROP TABLE t; include/rpl_sync.inc 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 b82c303ae6a..ef393873b97 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 @@ -417,10 +417,6 @@ SET AUTOCOMMIT= 1; ################################################################################### connection slave; include/diff_tables.inc [master:tt_1,slave:tt_1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ################################################################################### # CLEAN ################################################################################### diff --git a/mysql-test/suite/rpl/r/rpl_row_lcase_tblnames.result b/mysql-test/suite/rpl/r/rpl_row_lcase_tblnames.result new file mode 100644 index 00000000000..1184b77d8f6 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_lcase_tblnames.result @@ -0,0 +1,60 @@ +include/master-slave.inc +[connection master] +******** [ MASTER ] ******** +CREATE DATABASE BUG_37656; +use BUG_37656; +show databases like 'BUG_37656'; +Database (BUG_37656) +BUG_37656 +connection slave; +******** [ SLAVE ] ******** +show databases like 'bug_37656'; +Database (bug_37656) +bug_37656 +connection master; +******** [ MASTER ] ******** +CREATE TABLE T1 (a int); +CREATE TABLE T2 (b int) ENGINE=InnoDB; +CREATE TABLE T3 (txt TEXT); +show tables; +Tables_in_BUG_37656 +T1 +T2 +T3 +connection slave; +******** [ SLAVE ] ******** +use bug_37656; +show tables; +Tables_in_bug_37656 +t2 +t3 +CREATE TABLE t1 (a INT); +connection master; +******** [ MASTER ] ******** +use BUG_37656; +INSERT INTO T1 VALUES (1); +INSERT INTO T2 VALUES (1); +use test; +INSERT INTO BUG_37656.T1 VALUES (2); +INSERT INTO BUG_37656.T2 VALUES (2); +LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE BUG_37656.T3; +connection slave; +******** [ SLAVE ] ******** +include/diff_tables.inc [master:BUG_37656.T2, slave:bug_37656.t2] +include/diff_tables.inc [master:BUG_37656.T3, slave:bug_37656.t3] +connection master; +******** [ MASTER ] ******** +DROP DATABASE BUG_37656; +connection slave; +connection master; +CREATE DATABASE B50653; +USE B50653; +CREATE PROCEDURE b50653_proc() BEGIN SELECT 1; END; +connection slave; +connection master; +DROP PROCEDURE b50653_proc; +connection slave; +connection master; +DROP DATABASE B50653; +connection slave; +include/rpl_end.inc 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 ab29acae31d..0704f5c69a1 100644 --- a/mysql-test/suite/rpl/r/rpl_row_loaddata_concurrent.result +++ b/mysql-test/suite/rpl/r/rpl_row_loaddata_concurrent.result @@ -135,10 +135,6 @@ connection master; connection slave; use b48297_db1; include/diff_tables.inc [master:b48297_db1.t1, slave:b48297_db1.t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP DATABASE b48297_db1; DROP DATABASE b42897_db2; diff --git a/mysql-test/suite/rpl/r/rpl_row_merge_engine.result b/mysql-test/suite/rpl/r/rpl_row_merge_engine.result index d58162e04b5..ecc0e6d6d18 100644 --- a/mysql-test/suite/rpl/r/rpl_row_merge_engine.result +++ b/mysql-test/suite/rpl/r/rpl_row_merge_engine.result @@ -10,30 +10,14 @@ ALTER TABLE tt1_merge ENGINE=MERGE UNION (t2, t1); CREATE TABLE t1_merge LIKE tt1_merge; connection slave; include/diff_tables.inc [master:test.t1, slave:test.t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:test.t2, slave:test.t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; UPDATE t1_merge SET a=10 WHERE a=1; DELETE FROM t1_merge WHERE a=10; connection slave; connection master; include/diff_tables.inc [master:test.t1, slave:test.t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:test.t2, slave:test.t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead DROP TABLE t1_merge, t1, t2; 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 15ea775f315..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 @@ -9,10 +9,6 @@ INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); UPDATE IGNORE t1 SET c5 = 'a'; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; connection slave; @@ -26,10 +22,6 @@ INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); UPDATE IGNORE t1 SET c5 = 'a'; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; connection slave; @@ -42,10 +34,6 @@ INSERT INTO t1(c1) VALUES (NULL); UPDATE t1 SET c1= 0; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; connection slave; 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 2fa3d146664..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 @@ -10,10 +10,6 @@ INSERT INTO t1(c1,c2) VALUES (NULL, b'1'); UPDATE t1 SET c1= 0; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; connection slave; @@ -26,10 +22,6 @@ INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); UPDATE IGNORE t1 SET c5 = 'a'; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; connection slave; @@ -43,10 +35,6 @@ INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); UPDATE IGNORE t1 SET c5 = 'a'; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; connection slave; @@ -59,10 +47,6 @@ INSERT INTO t1(c1) VALUES (NULL); UPDATE t1 SET c1= 0; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; connection slave; diff --git a/mysql-test/suite/rpl/r/rpl_row_spatial.result b/mysql-test/suite/rpl/r/rpl_row_spatial.result new file mode 100644 index 00000000000..86bac89a174 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_spatial.result @@ -0,0 +1,16 @@ +include/master-slave.inc +[connection master] +CREATE TABLE t1 (g POINT NOT NULL, SPATIAL INDEX(g)); +INSERT INTO t1 VALUES (ST_GEOMFROMTEXT('Point(1 1)')); +INSERT INTO t1 VALUES (ST_GEOMFROMTEXT('Point(2 1)')); +INSERT INTO t1 VALUES (ST_GEOMFROMTEXT('Point(1 2)')); +INSERT INTO t1 VALUES (ST_GEOMFROMTEXT('Point(2 2)')); +DELETE FROM t1 where MBREqual(g, ST_GEOMFROMTEXT('Point(1 2)')); +connection slave; +select count(*) from t1; +count(*) +3 +connection master; +DELETE FROM t1; +drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result b/mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result index 5575f0d8a76..c8f8d0fc4a1 100644 --- a/mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result +++ b/mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result @@ -158,10 +158,6 @@ connection slave; connection master; ### assertion: the slave replicated event successfully and tables match include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead DROP TABLE `t1`; connection master; connection slave; @@ -186,91 +182,51 @@ connection master; FLUSH LOGS; ### assertion: the slave replicated event successfully and tables match for t10 include/diff_tables.inc [master:t10, slave:t10] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; connection slave; connection master; ### assertion: the slave replicated event successfully and tables match for t9 include/diff_tables.inc [master:t9, slave:t9] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; connection slave; connection master; ### assertion: the slave replicated event successfully and tables match for t8 include/diff_tables.inc [master:t8, slave:t8] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; connection slave; connection master; ### assertion: the slave replicated event successfully and tables match for t7 include/diff_tables.inc [master:t7, slave:t7] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; connection slave; connection master; ### assertion: the slave replicated event successfully and tables match for t6 include/diff_tables.inc [master:t6, slave:t6] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; connection slave; connection master; ### assertion: the slave replicated event successfully and tables match for t5 include/diff_tables.inc [master:t5, slave:t5] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; connection slave; connection master; ### assertion: the slave replicated event successfully and tables match for t4 include/diff_tables.inc [master:t4, slave:t4] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; connection slave; connection master; ### assertion: the slave replicated event successfully and tables match for t3 include/diff_tables.inc [master:t3, slave:t3] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; connection slave; connection master; ### assertion: the slave replicated event successfully and tables match for t2 include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; connection slave; connection master; ### assertion: the slave replicated event successfully and tables match for t1 include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; connection slave; connection master; diff --git a/mysql-test/suite/rpl/r/rpl_row_utf16.result b/mysql-test/suite/rpl/r/rpl_row_utf16.result index 1090bab3a5d..c6a6c4f8520 100644 --- a/mysql-test/suite/rpl/r/rpl_row_utf16.result +++ b/mysql-test/suite/rpl/r/rpl_row_utf16.result @@ -15,10 +15,6 @@ hex(c1) 006100620063 c1 ola hex(c1) 006F006C0061 include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync_master_shutdown.result b/mysql-test/suite/rpl/r/rpl_semi_sync_master_shutdown.result new file mode 100644 index 00000000000..786e1682bb0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_semi_sync_master_shutdown.result @@ -0,0 +1,33 @@ +include/master-slave.inc +[connection master] +connection master; +SET @@GLOBAL.rpl_semi_sync_master_enabled = 1; +connection slave; +include/stop_slave.inc +SET @@GLOBAL. rpl_semi_sync_slave_enabled = 1; +include/start_slave.inc +connection master; +CREATE TABLE t1 (a INT); +INSERT INTO t1 SET a=1; +connection slave; +connection master; +# Shutdown master +include/rpl_stop_server.inc [server_number=1] +connection slave; +include/stop_slave.inc +# Restart master +include/rpl_start_server.inc [server_number=1] +connection slave; +include/stop_slave.inc +Warnings: +Note 1255 Slave already has been stopped +include/start_slave.inc +connection master; +SET @@GLOBAL.debug_dbug=""; +SET @@GLOBAL. rpl_semi_sync_master_enabled = 0; +connection master; +DROP TABLE t1; +connection slave; +include/stop_slave.inc +SET @@GLOBAL. rpl_semi_sync_slave_enabled = 0; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_set_null_innodb.result b/mysql-test/suite/rpl/r/rpl_set_null_innodb.result index 82988039df1..0daab7561c1 100644 --- a/mysql-test/suite/rpl/r/rpl_set_null_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_set_null_innodb.result @@ -7,18 +7,10 @@ INSERT INTO `t1` VALUES ( 1, 1 ); UPDATE t1 SET c1=NULL where c2=1; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DELETE FROM t1 WHERE c2=1 LIMIT 1; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; connection slave; @@ -32,18 +24,10 @@ w UPDATE t1 SET c1=NULL WHERE c1='w'; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DELETE FROM t1 LIMIT 2; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; connection slave; diff --git a/mysql-test/suite/rpl/r/rpl_set_null_myisam.result b/mysql-test/suite/rpl/r/rpl_set_null_myisam.result index 9bad1817a2c..7ec3e62fab4 100644 --- a/mysql-test/suite/rpl/r/rpl_set_null_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_set_null_myisam.result @@ -7,18 +7,10 @@ INSERT INTO `t1` VALUES ( 1, 1 ); UPDATE t1 SET c1=NULL where c2=1; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DELETE FROM t1 WHERE c2=1 LIMIT 1; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; connection slave; @@ -32,18 +24,10 @@ w UPDATE t1 SET c1=NULL WHERE c1='w'; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DELETE FROM t1 LIMIT 2; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; connection slave; diff --git a/mysql-test/suite/rpl/r/rpl_slave_load_in.result b/mysql-test/suite/rpl/r/rpl_slave_load_in.result index deda93cb845..aeabdb79677 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_load_in.result +++ b/mysql-test/suite/rpl/r/rpl_slave_load_in.result @@ -12,15 +12,7 @@ load data infile '../../std_data/rpl_loaddata.dat' into table t2; commit; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; drop table t1; drop table t2; diff --git a/mysql-test/suite/rpl/r/rpl_special_charset.result b/mysql-test/suite/rpl/r/rpl_special_charset.result index 728f4114aa7..b947cf3484d 100644 --- a/mysql-test/suite/rpl/r/rpl_special_charset.result +++ b/mysql-test/suite/rpl/r/rpl_special_charset.result @@ -5,10 +5,6 @@ CREATE TABLE t1(i VARCHAR(20)); INSERT INTO t1 VALUES (0xFFFF); connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_000001.result b/mysql-test/suite/rpl/r/rpl_stm_000001.result index 5680d22f233..47567ef7b72 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_000001.result +++ b/mysql-test/suite/rpl/r/rpl_stm_000001.result @@ -19,11 +19,16 @@ abandons connection slave; stop slave; connection master; +create temporary table tmp select * from mysql.user where host="localhost" and user="root"; set password for root@"localhost" = password('foo'); connection slave; start slave; connection master; -set password for root@"localhost" = password(''); +replace into mysql.user select * from tmp; +Warnings: +Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave +drop temporary table tmp; +flush privileges; create table t3(n int); insert into t3 values(1),(2); connection slave; diff --git a/mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result b/mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result index ffee1a01158..388c8e67b68 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result +++ b/mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result @@ -23,10 +23,6 @@ include/wait_for_slave_sql_error_and_skip.inc [errno=1590] Got one of the listed errors include/wait_for_slave_sql_error_and_skip.inc [errno=1590] include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ######################################################################################## # 2 - BEGIN - IMPLICIT COMMIT by DDL ######################################################################################## @@ -59,10 +55,6 @@ INSERT INTO t1 (a, data) VALUES (29, 's');; CREATE TABLE t5 (a int); connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ######################################################################################## # 3 - BEGIN - COMMIT ######################################################################################## @@ -77,10 +69,6 @@ Got one of the listed errors COMMIT; connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ######################################################################################## # 4 - BEGIN - ROLLBACK ######################################################################################## @@ -97,10 +85,6 @@ Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ######################################################################################## # 5 - PROCEDURE ######################################################################################## @@ -127,10 +111,6 @@ Got one of the listed errors ROLLBACK; connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ######################################################################################## # 6 - XID ######################################################################################## @@ -151,10 +131,6 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back COMMIT; connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ######################################################################################## # 7 - NON-TRANS TABLE ######################################################################################## @@ -176,10 +152,6 @@ Got one of the listed errors COMMIT; connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ######################################################################## # 8 - Bug#55375(Regression Bug) Transaction bigger than # max_binlog_cache_size crashes slave diff --git a/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result b/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result index 24eedb5a0d5..f900a8b0e9a 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result +++ b/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result @@ -332,10 +332,6 @@ SET AUTOCOMMIT= 1; ################################################################################### connection slave; include/diff_tables.inc [master:tt_1,slave:tt_1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ################################################################################### # CLEAN ################################################################################### diff --git a/mysql-test/suite/rpl/r/rpl_stm_lcase_tblnames.result b/mysql-test/suite/rpl/r/rpl_stm_lcase_tblnames.result new file mode 100644 index 00000000000..abb93fca45c --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_stm_lcase_tblnames.result @@ -0,0 +1,57 @@ +include/master-slave.inc +[connection master] +******** [ MASTER ] ******** +CREATE DATABASE BUG_37656; +use BUG_37656; +show databases like 'BUG_37656'; +Database (BUG_37656) +BUG_37656 +connection slave; +******** [ SLAVE ] ******** +show databases like 'bug_37656'; +Database (bug_37656) +bug_37656 +connection master; +******** [ MASTER ] ******** +CREATE TABLE T1 (a int); +CREATE TABLE T2 (b int) ENGINE=InnoDB; +CREATE TABLE T3 (txt TEXT); +show tables; +Tables_in_BUG_37656 +T1 +T2 +T3 +connection slave; +******** [ SLAVE ] ******** +use bug_37656; +show tables; +Tables_in_bug_37656 +t2 +t3 +CREATE TABLE t1 (a INT); +connection master; +******** [ MASTER ] ******** +use BUG_37656; +INSERT INTO T1 VALUES (1); +INSERT INTO T2 VALUES (1); +LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE BUG_37656.T3; +connection slave; +******** [ SLAVE ] ******** +include/diff_tables.inc [master:BUG_37656.T2, slave:bug_37656.t2] +include/diff_tables.inc [master:BUG_37656.T3, slave:bug_37656.t3] +connection master; +******** [ MASTER ] ******** +DROP DATABASE BUG_37656; +connection slave; +connection master; +CREATE DATABASE B50653; +USE B50653; +CREATE PROCEDURE b50653_proc() BEGIN SELECT 1; END; +connection slave; +connection master; +DROP PROCEDURE b50653_proc; +connection slave; +connection master; +DROP DATABASE B50653; +connection slave; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result b/mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result index 6bfc7dedd7b..f510eae74f8 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result +++ b/mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result @@ -136,10 +136,6 @@ connection master; connection slave; use b48297_db1; include/diff_tables.inc [master:b48297_db1.t1, slave:b48297_db1.t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP DATABASE b48297_db1; DROP DATABASE b42897_db2; diff --git a/mysql-test/suite/rpl/r/rpl_stm_relay_ign_space.result b/mysql-test/suite/rpl/r/rpl_stm_relay_ign_space.result index 1dde93df372..3113eec9e10 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_relay_ign_space.result +++ b/mysql-test/suite/rpl/r/rpl_stm_relay_ign_space.result @@ -2,9 +2,5 @@ include/master-slave.inc [connection master] include/assert.inc [Assert that relay log space is close to the limit] include/diff_tables.inc [master:test.t1,slave:test.t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection slave; include/rpl_end.inc 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 02176068a14..cb2120523b2 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_user_variables.result +++ b/mysql-test/suite/rpl/r/rpl_stm_user_variables.result @@ -221,10 +221,6 @@ SET sql_mode = DEFAULT; connection slave; ## assertion: master and slave tables are in sync include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TRIGGER tr1; DROP TABLE t1; diff --git a/mysql-test/suite/rpl/r/rpl_stop_slave.result b/mysql-test/suite/rpl/r/rpl_stop_slave.result index 2e143f84f5a..4b9c544527b 100644 --- a/mysql-test/suite/rpl/r/rpl_stop_slave.result +++ b/mysql-test/suite/rpl/r/rpl_stop_slave.result @@ -40,10 +40,6 @@ include/wait_for_slave_sql_to_stop.inc # Slave should stop after the transaction has committed. # So t1 on master is same to t1 on slave. include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection slave; START SLAVE SQL_THREAD; include/wait_for_slave_sql_to_start.inc @@ -72,10 +68,6 @@ include/wait_for_slave_sql_to_stop.inc # Slave should stop after the transaction has committed. # So t1 on master is same to t1 on slave. include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection slave; START SLAVE SQL_THREAD; include/wait_for_slave_sql_to_start.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 2f7f1b07cb4..936f604be2e 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 @@ -140,7 +140,7 @@ create table t4 select * from t1 where 3 in (select 1 union select 2 union selec 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' +Warning 1292 Truncated incorrect datetime value: '3' 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 diff --git a/mysql-test/suite/rpl/r/rpl_sync.result b/mysql-test/suite/rpl/r/rpl_sync.result index 90c90f269c6..1240c446164 100644 --- a/mysql-test/suite/rpl/r/rpl_sync.result +++ b/mysql-test/suite/rpl/r/rpl_sync.result @@ -29,10 +29,6 @@ include/start_slave.inc connection master; connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead =====Corrupting the master.info=======; connection slave; include/stop_slave.inc @@ -51,10 +47,6 @@ include/start_slave.inc connection master; connection slave; include/diff_tables.inc [master:t1,slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead =====Clean up=======; connection master; drop table t1; 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 61f0fdde3cf..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 @@ -134,10 +134,6 @@ master-bin.000001 # Query # # COMMIT connection slave; # Compare the base table. include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; diff --git a/mysql-test/suite/rpl/r/rpl_test_framework.result b/mysql-test/suite/rpl/r/rpl_test_framework.result index 27c85ba5a16..63585deb56a 100644 --- a/mysql-test/suite/rpl/r/rpl_test_framework.result +++ b/mysql-test/suite/rpl/r/rpl_test_framework.result @@ -14,12 +14,6 @@ DELETE FROM t1; INSERT INTO t1 VALUES (1); include/rpl_sync.inc include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/rpl_end.inc include/rpl_init.inc [topology=2 -> 3] include/rpl_generate_sync_chain.inc @@ -32,12 +26,6 @@ DELETE FROM t1; INSERT INTO t1 VALUES (2); include/rpl_sync.inc include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/rpl_end.inc include/rpl_init.inc [topology=none] include/rpl_generate_sync_chain.inc @@ -53,12 +41,6 @@ DELETE FROM t1; INSERT INTO t1 VALUES (3); include/rpl_sync.inc include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/rpl_end.inc include/rpl_init.inc [topology=1->2, 2->1] include/rpl_generate_sync_chain.inc @@ -71,12 +53,6 @@ DELETE FROM t1; INSERT INTO t1 VALUES (4); include/rpl_sync.inc include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/rpl_end.inc include/rpl_init.inc [topology=1->2->1] include/rpl_generate_sync_chain.inc @@ -89,12 +65,6 @@ DELETE FROM t1; INSERT INTO t1 VALUES (5); include/rpl_sync.inc include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/rpl_end.inc include/rpl_init.inc [topology=2->1->2] include/rpl_generate_sync_chain.inc @@ -107,12 +77,6 @@ DELETE FROM t1; INSERT INTO t1 VALUES (6); include/rpl_sync.inc include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/rpl_end.inc include/rpl_init.inc [topology=1->2->3] include/rpl_generate_sync_chain.inc @@ -122,12 +86,6 @@ DELETE FROM t1; INSERT INTO t1 VALUES (7); include/rpl_sync.inc include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/rpl_end.inc include/rpl_init.inc [topology=2->3->2->1] include/rpl_generate_sync_chain.inc @@ -137,12 +95,6 @@ DELETE FROM t1; INSERT INTO t1 VALUES (8); include/rpl_sync.inc include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/rpl_end.inc include/rpl_init.inc [topology=1->2,2->3,3->1] include/rpl_generate_sync_chain.inc @@ -152,12 +104,6 @@ DELETE FROM t1; INSERT INTO t1 VALUES (9); include/rpl_sync.inc include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/rpl_end.inc include/rpl_init.inc [topology=1->3->2->1] include/rpl_generate_sync_chain.inc @@ -167,12 +113,6 @@ DELETE FROM t1; INSERT INTO t1 VALUES (10); include/rpl_sync.inc include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/rpl_end.inc ==== Test 6-server topologies ==== include/rpl_init.inc [topology=1->2->3->4->1->5->6] @@ -183,18 +123,6 @@ DELETE FROM t1; INSERT INTO t1 VALUES (11); include/rpl_sync.inc include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1,server_4:t1,server_5:t1,server_6:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/rpl_end.inc include/rpl_init.inc [topology=3->4->5->6->3->1->2] include/rpl_generate_sync_chain.inc @@ -204,18 +132,6 @@ DELETE FROM t1; INSERT INTO t1 VALUES (12); include/rpl_sync.inc include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1,server_4:t1,server_5:t1,server_6:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/rpl_end.inc include/rpl_init.inc [topology=6->5->4->3->2->1] include/rpl_generate_sync_chain.inc @@ -225,18 +141,6 @@ DELETE FROM t1; INSERT INTO t1 VALUES (13); include/rpl_sync.inc include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1,server_4:t1,server_5:t1,server_6:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/rpl_end.inc include/rpl_init.inc [topology=1->2->3->1,4->5->6] include/rpl_generate_sync_chain.inc @@ -249,18 +153,6 @@ DELETE FROM t1; INSERT INTO t1 VALUES (14); include/rpl_sync.inc include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1,server_4:t1,server_5:t1,server_6:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/rpl_end.inc ==== Test 9-server topology ==== include/rpl_init.inc [topology=1->2, 2->3, 3->4, 4->5, 5->1, 1->6, 6->7, 6->8, 8->9] @@ -271,24 +163,6 @@ DELETE FROM t1; INSERT INTO t1 VALUES (15); include/rpl_sync.inc include/diff_tables.inc [server_1:t1,server_2:t1,server_3:t1,server_4:t1,server_5:t1,server_6:t1,server_7:t1,server_8:t1,server_9:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/rpl_end.inc ==== Clean up ==== include/rpl_init.inc [topology=1->2->3->4->5->6->7->8->9] diff --git a/mysql-test/suite/rpl/r/rpl_trigger.result b/mysql-test/suite/rpl/r/rpl_trigger.result index ec1c70571b8..06d5a3c895f 100644 --- a/mysql-test/suite/rpl/r/rpl_trigger.result +++ b/mysql-test/suite/rpl/r/rpl_trigger.result @@ -1097,15 +1097,7 @@ Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:log, slave:log] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; drop table t1, log; connection slave; diff --git a/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result b/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result index d823133e4f5..a8a08ef564d 100644 --- a/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result +++ b/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result @@ -9,10 +9,6 @@ connection master; TRUNCATE TABLE t1; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ==== Test using a table with delete triggers ==== connection master; SET @count := 1; @@ -23,10 +19,6 @@ connection master; TRUNCATE TABLE t1; connection slave; include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1,t2; connection slave; @@ -39,10 +31,6 @@ connection master; DELETE FROM t1; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ==== Test using a table with delete triggers ==== connection master; SET @count := 1; @@ -53,10 +41,6 @@ connection master; DELETE FROM t1; connection slave; include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1,t2; connection slave; diff --git a/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result b/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result index 14118562ae8..da03d2e8cc3 100644 --- a/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result +++ b/mysql-test/suite/rpl/r/rpl_truncate_3innodb.result @@ -9,10 +9,6 @@ connection master; TRUNCATE TABLE t1; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ==== Test using a table with delete triggers ==== connection master; SET @count := 1; @@ -23,10 +19,6 @@ connection master; TRUNCATE TABLE t1; connection slave; include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1,t2; connection slave; @@ -39,10 +31,6 @@ connection master; DELETE FROM t1; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ==== Test using a table with delete triggers ==== connection master; SET @count := 1; @@ -53,10 +41,6 @@ connection master; DELETE FROM t1; connection slave; include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1,t2; connection slave; diff --git a/mysql-test/suite/rpl/r/rpl_typeconv.result b/mysql-test/suite/rpl/r/rpl_typeconv.result index cb50c69aa55..1ba259edf8e 100644 --- a/mysql-test/suite/rpl/r/rpl_typeconv.result +++ b/mysql-test/suite/rpl/r/rpl_typeconv.result @@ -47,6 +47,10 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS=''; # MDEV-15833 Row format replication between LONGBLOB and MEDIUMBLOB does not work for long values # # End of MDEV-15833 +# +# MDEV-17098 DATE <-> DATETIME +# +# End of MDEV-17098 include/rpl_reset.inc connection slave; SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_NON_LOSSY'; @@ -59,6 +63,10 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_NON_LOSSY'; # MDEV-15833 Row format replication between LONGBLOB and MEDIUMBLOB does not work for long values # # End of MDEV-15833 +# +# MDEV-17098 DATE <-> DATETIME +# +# End of MDEV-17098 include/rpl_reset.inc connection slave; SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_LOSSY'; @@ -71,6 +79,10 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_LOSSY'; # MDEV-15833 Row format replication between LONGBLOB and MEDIUMBLOB does not work for long values # # End of MDEV-15833 +# +# MDEV-17098 DATE <-> DATETIME +# +# End of MDEV-17098 include/rpl_reset.inc connection slave; SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_LOSSY,ALL_NON_LOSSY'; @@ -83,6 +95,10 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_LOSSY,ALL_NON_LOSSY'; # MDEV-15833 Row format replication between LONGBLOB and MEDIUMBLOB does not work for long values # # End of MDEV-15833 +# +# MDEV-17098 DATE <-> DATETIME +# +# End of MDEV-17098 include/rpl_reset.inc connection slave; **** Result of conversions **** @@ -244,6 +260,13 @@ LONGBLOB TINYBLOB <Correct error> LONGBLOB BLOB <Correct error> LONGBLOB MEDIUMBLOB <Correct error> LONGBLOB VARBINARY(65500 <Correct error> +DATE DATETIME(6) <Correct error> +DATE DATETIME(6) <Correct error> +DATE DATETIME(6) <Correct error> +DATE DATETIME(0) <Correct error> +DATETIME(6) DATE <Correct error> +DATETIME(6) DATE <Correct error> +DATETIME(0) DATE <Correct error> TINYBLOB TINYBLOB ALL_NON_LOSSY <Correct value> TINYBLOB BLOB ALL_NON_LOSSY <Correct value> TINYBLOB MEDIUMBLOB ALL_NON_LOSSY <Correct value> @@ -401,6 +424,13 @@ LONGBLOB TINYBLOB ALL_NON_LOSSY <Correct error> LONGBLOB BLOB ALL_NON_LOSSY <Correct error> LONGBLOB MEDIUMBLOB ALL_NON_LOSSY <Correct error> LONGBLOB VARBINARY(65500 ALL_NON_LOSSY <Correct error> +DATE DATETIME(6) ALL_NON_LOSSY <Correct value> +DATE DATETIME(6) ALL_NON_LOSSY <Correct value> +DATE DATETIME(6) ALL_NON_LOSSY <Correct value> +DATE DATETIME(0) ALL_NON_LOSSY <Correct value> +DATETIME(6) DATE ALL_NON_LOSSY <Correct error> +DATETIME(6) DATE ALL_NON_LOSSY <Correct error> +DATETIME(0) DATE ALL_NON_LOSSY <Correct error> TINYBLOB TINYBLOB ALL_LOSSY <Correct value> TINYBLOB BLOB ALL_LOSSY <Correct error> TINYBLOB MEDIUMBLOB ALL_LOSSY <Correct error> @@ -558,6 +588,13 @@ LONGBLOB TINYBLOB ALL_LOSSY <Correct value> LONGBLOB BLOB ALL_LOSSY <Correct value> LONGBLOB MEDIUMBLOB ALL_LOSSY <Correct value> LONGBLOB VARBINARY(65500 ALL_LOSSY <Correct value> +DATE DATETIME(6) ALL_LOSSY <Correct error> +DATE DATETIME(6) ALL_LOSSY <Correct error> +DATE DATETIME(6) ALL_LOSSY <Correct error> +DATE DATETIME(0) ALL_LOSSY <Correct error> +DATETIME(6) DATE ALL_LOSSY <Correct value> +DATETIME(6) DATE ALL_LOSSY <Correct value> +DATETIME(0) DATE ALL_LOSSY <Correct value> TINYBLOB TINYBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> TINYBLOB BLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> TINYBLOB MEDIUMBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> @@ -715,6 +752,13 @@ LONGBLOB TINYBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> LONGBLOB BLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> LONGBLOB MEDIUMBLOB ALL_LOSSY,ALL_NON_LOSSY <Correct value> LONGBLOB VARBINARY(65500 ALL_LOSSY,ALL_NON_LOSSY <Correct value> +DATE DATETIME(6) ALL_LOSSY,ALL_NON_LOSSY <Correct value> +DATE DATETIME(6) ALL_LOSSY,ALL_NON_LOSSY <Correct value> +DATE DATETIME(6) ALL_LOSSY,ALL_NON_LOSSY <Correct value> +DATE DATETIME(0) ALL_LOSSY,ALL_NON_LOSSY <Correct value> +DATETIME(6) DATE ALL_LOSSY,ALL_NON_LOSSY <Correct value> +DATETIME(6) DATE ALL_LOSSY,ALL_NON_LOSSY <Correct value> +DATETIME(0) DATE ALL_LOSSY,ALL_NON_LOSSY <Correct value> DROP TABLE type_conversions; call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t1. cannot be converted from type.* error.* 1677"); connection master; diff --git a/mysql-test/suite/rpl/r/rpl_typeconv_innodb.result b/mysql-test/suite/rpl/r/rpl_typeconv_innodb.result index a1cda543f57..0ea02440b93 100644 --- a/mysql-test/suite/rpl/r/rpl_typeconv_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_typeconv_innodb.result @@ -8,10 +8,6 @@ CREATE TABLE t1(b1 BIT(1), b2 BIT(2), b3 BIT(3)) ENGINE=InnoDB; INSERT INTO t1 VALUES (b'0', b'01', b'101'); connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; connection slave; diff --git a/mysql-test/suite/rpl/r/rpl_unsafe_statements.result b/mysql-test/suite/rpl/r/rpl_unsafe_statements.result index 047b19f21d5..ca790f5d148 100644 --- a/mysql-test/suite/rpl/r/rpl_unsafe_statements.result +++ b/mysql-test/suite/rpl/r/rpl_unsafe_statements.result @@ -16,15 +16,7 @@ UNLOCK TABLES; COMMIT; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1,t2; CREATE TABLE t1(i INT) ENGINE=INNODB; @@ -41,15 +33,7 @@ UNLOCK TABLES; COMMIT; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead include/diff_tables.inc [master:t2, slave:t2] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1,t2; CREATE TABLE t1(i int, id INT AUTO_INCREMENT, PRIMARY KEY (i, id)) ENGINE=MYISAM; @@ -61,10 +45,6 @@ UNLOCK TABLES; COMMIT; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; CREATE TABLE t1(i INT, j INT, UNIQUE KEY(i), UNIQUE KEY(j)) ENGINE=INNODB; @@ -76,10 +56,6 @@ UNLOCK TABLES; COMMIT; connection slave; include/diff_tables.inc [master:t1, slave:t1] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead connection master; DROP TABLE t1; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_variables.result b/mysql-test/suite/rpl/r/rpl_variables.result index b0cd3671a30..dcd4b4ec884 100644 --- a/mysql-test/suite/rpl/r/rpl_variables.result +++ b/mysql-test/suite/rpl/r/rpl_variables.result @@ -573,26 +573,6 @@ id truth num text 32 NULL NULL Centrum connection slave; include/diff_tables.inc [master:tstmt, master:tproc, master:tfunc, master:ttrig, master:tprep, slave:tstmt, slave:tproc, slave:tfunc, slave:ttrig, slave:tprep] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ==== Clean up ==== connection master; DROP PROCEDURE proc; diff --git a/mysql-test/suite/rpl/r/rpl_variables_stm.result b/mysql-test/suite/rpl/r/rpl_variables_stm.result index eb4ac403e12..f3d80977a6b 100644 --- a/mysql-test/suite/rpl/r/rpl_variables_stm.result +++ b/mysql-test/suite/rpl/r/rpl_variables_stm.result @@ -488,26 +488,6 @@ id num text 58 NULL 1717 connection slave; include/diff_tables.inc [master:tstmt, master:tproc, master:tfunc, master:ttrig, master:tprep, slave:tstmt, slave:tproc, slave:tfunc, slave:ttrig, slave:tprep] -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead -Warnings: -Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead ==== Clean up ==== connection master; DROP PROCEDURE proc; diff --git a/mysql-test/suite/rpl/t/rpl_15919-slave.opt b/mysql-test/suite/rpl/t/rpl_15919-slave.opt new file mode 100644 index 00000000000..62ab6dad1e0 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_15919-slave.opt @@ -0,0 +1 @@ +--lower_case_table_names=1 diff --git a/mysql-test/suite/rpl/t/rpl_15919.test b/mysql-test/suite/rpl/t/rpl_15919.test new file mode 100644 index 00000000000..a5b25929ad0 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_15919.test @@ -0,0 +1,18 @@ +--source include/have_case_sensitive_file_system.inc +--source include/have_innodb.inc +--source include/master-slave.inc + +--connection master +create table RPL(a int); +insert into RPL values(1); + +--sync_slave_with_master +select * from rpl; +insert into RPL values(3); +insert into rpl values(4); +select * from rpl; + +--connection master +drop table RPL; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_create_drop_user.test b/mysql-test/suite/rpl/t/rpl_create_drop_user.test index 5fcf0a14c36..c5f193a0d0c 100644 --- a/mysql-test/suite/rpl/t/rpl_create_drop_user.test +++ b/mysql-test/suite/rpl/t/rpl_create_drop_user.test @@ -15,9 +15,11 @@ SELECT CURRENT_USER; disconnect user_a; connection master; -SELECT user, password FROM mysql.user WHERE user LIKE 'u%' ORDER BY user; +--sorted_result +SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ; sync_slave_with_master; -SELECT user, password FROM mysql.user WHERE user LIKE 'u%' ORDER BY user; +--sorted_result +SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ; connection master; CREATE OR REPLACE USER u1@localhost IDENTIFIED BY 'abcdefghijk2'; @@ -26,9 +28,11 @@ connection user_a; SELECT CURRENT_USER; disconnect user_a; connection master; -SELECT user, password FROM mysql.user WHERE user LIKE 'u%' ORDER BY user; +--sorted_result +SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ; sync_slave_with_master; -SELECT user, password FROM mysql.user WHERE user LIKE 'u%' ORDER BY user; +--sorted_result +SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ; connection master; --error ER_CANNOT_USER @@ -38,7 +42,8 @@ CREATE USER u1@localhost; DROP USER u3@localhost; sync_slave_with_master; -SELECT user, password FROM mysql.user WHERE user LIKE 'u%' ORDER BY user; +--sorted_result +SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ; connection master; DROP USER IF EXISTS u1@localhost; @@ -46,6 +51,7 @@ DROP USER u2@localhost; DROP USER IF EXISTS u3@localhost; sync_slave_with_master; -SELECT user, password FROM mysql.user WHERE user LIKE 'u%' ORDER BY user; +--sorted_result +SELECT user,password,plugin,authentication_string FROM mysql.user WHERE user LIKE 'u%' ; --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_do_grant.test b/mysql-test/suite/rpl/t/rpl_do_grant.test index 0024c7039e4..ba70eda6358 100644 --- a/mysql-test/suite/rpl/t/rpl_do_grant.test +++ b/mysql-test/suite/rpl/t/rpl_do_grant.test @@ -363,5 +363,6 @@ SELECT Grantor FROM mysql.tables_priv WHERE User='user_bug27606'; --connection master DROP USER user_bug27606@localhost; +update mysql.user set plugin=''; --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_drop_db.test b/mysql-test/suite/rpl/t/rpl_drop_db.test index f66187b12f5..372afaa63c6 100644 --- a/mysql-test/suite/rpl/t/rpl_drop_db.test +++ b/mysql-test/suite/rpl/t/rpl_drop_db.test @@ -13,8 +13,8 @@ insert into mysqltest1.t1 values (1); select * from mysqltest1.t1 into outfile 'mysqltest1/f1.txt'; create table mysqltest1.t2 (n int); create table mysqltest1.t3 (n int); ---replace_result \\ / 66 39 93 39 17 39 247 39 "File exists" "Directory not empty" ---error 1010 +--replace_result \\ / 66 39 93 39 17 39 247 39 41 39 "File exists" "Directory not empty" +--error ER_DB_DROP_RMDIR drop database mysqltest1; use mysqltest1; show tables; @@ -30,8 +30,8 @@ while ($1) } --enable_query_log ---replace_result \\ / 66 39 93 39 17 39 247 39 "File exists" "Directory not empty" ---error 1010 +--replace_result \\ / 66 39 93 39 17 39 247 39 41 39 "File exists" "Directory not empty" +--error ER_DB_DROP_RMDIR drop database mysqltest1; use mysqltest1; show tables; diff --git a/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test b/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test index 489e90f9eb5..53db1723325 100644 --- a/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_foreign_key_innodb.test @@ -1,3 +1,61 @@ -- source include/have_innodb.inc -let $engine_type=INNODB; --- source include/rpl_foreign_key.test + +# Check the replication of the FOREIGN_KEY_CHECKS variable. + +-- source include/master-slave.inc + +CREATE TABLE t1 (a INT AUTO_INCREMENT KEY) ENGINE=INNODB; +CREATE TABLE t2 (b INT AUTO_INCREMENT KEY, c INT, FOREIGN KEY(b) REFERENCES t1(a)) ENGINE=INNODB; + +SET FOREIGN_KEY_CHECKS=0; +INSERT INTO t1 VALUES (10); +INSERT INTO t1 VALUES (NULL),(NULL),(NULL); +INSERT INTO t2 VALUES (5,0); +INSERT INTO t2 VALUES (NULL,LAST_INSERT_ID()); +SET FOREIGN_KEY_CHECKS=1; +SELECT * FROM t1 ORDER BY a; +SELECT * FROM t2 ORDER BY b; +sync_slave_with_master; +SELECT * FROM t1 ORDER BY a; +SELECT * FROM t2 ORDER BY b; + +connection master; +SET TIMESTAMP=1000000000; +CREATE TABLE t3 ( a INT UNIQUE ); +SET FOREIGN_KEY_CHECKS=0; +--error ER_DUP_ENTRY +INSERT INTO t3 VALUES (1),(1); +sync_slave_with_master; + +connection master; +SET FOREIGN_KEY_CHECKS=0; +DROP TABLE IF EXISTS t1,t2,t3; +SET FOREIGN_KEY_CHECKS=1; +sync_slave_with_master; + +# +# Bug #32468 delete rows event on a table with foreign key constraint fails +# + +connection master; + +create table t1 (b int primary key) engine = INNODB; +create table t2 (a int primary key, b int, foreign key (b) references t1(b)) engine = INNODB; + +insert into t1 set b=1; +insert into t2 set a=1, b=1; + +set foreign_key_checks=0; +delete from t1; + +--echo must sync w/o a problem (could not with the buggy code) +sync_slave_with_master; +select count(*) from t1 /* must be zero */; + + +# cleanup for bug#32468 + +connection master; +drop table t2,t1; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_gtid_ignored.test b/mysql-test/suite/rpl/t/rpl_gtid_ignored.test index 6e927bd5a77..3c1324b2ea6 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_ignored.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_ignored.test @@ -129,7 +129,7 @@ SELECT * FROM t1 ORDER BY a; # Clean up. --connection server_1 DROP TABLE t1; -ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; +ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria; SET GLOBAL gtid_strict_mode= @old_gtid_strict_mode; SET debug_sync = "reset"; diff --git a/mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test b/mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test index e1f5696f5a1..1e5d1abbb3b 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test @@ -9,7 +9,7 @@ # back). So fix it to make sure we are consistent, in case an earlier test case # left it as InnoDB. SET sql_log_bin=0; -ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; +ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria; SET sql_log_bin=1; --source include/start_slave.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 309debd87c5..53d62805c58 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test @@ -230,7 +230,7 @@ EOF --enable_reconnect --source include/wait_until_connected_again.inc SET sql_log_bin= 0; -ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; +ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria; SET sql_log_bin= 1; # Do a second restart to get the mysql.gtid_slave_pos table loaded with # the right engine. diff --git a/mysql-test/suite/rpl/t/rpl_lcase_tblnames_rewrite_db-slave.opt b/mysql-test/suite/rpl/t/rpl_lcase_tblnames_rewrite_db-slave.opt new file mode 100644 index 00000000000..0031a57a693 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_lcase_tblnames_rewrite_db-slave.opt @@ -0,0 +1 @@ +--lower-case-table-names=1 "--replicate-rewrite-db=b37656->bug37656" diff --git a/mysql-test/suite/rpl/t/rpl_lcase_tblnames_rewrite_db.test b/mysql-test/suite/rpl/t/rpl_lcase_tblnames_rewrite_db.test new file mode 100644 index 00000000000..9c804d8206a --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_lcase_tblnames_rewrite_db.test @@ -0,0 +1,60 @@ +# BUG#37656 +# +# DESCRIPTION +# +# +# This test case is tests whether replication works properly when +# slave is configured with --lower-case-table-names=1 and replication +# rewrite rules are in effect. +# +# It checks four issues: +# +# (i) master contains capitalized table name +# +# (ii) slave contains lowered case table name +# +# (iii) master and slave tables do not differ +# +-- source include/master-slave.inc +-- source include/not_windows.inc + +SET SQL_LOG_BIN=0; +CREATE DATABASE B37656; +SET SQL_LOG_BIN=1; + +-- connection slave +CREATE DATABASE BUG37656; + +-- echo ### action: show that database on slave is created in lowercase +SHOW DATABASES LIKE '%37656'; + +-- connection master +USE B37656; +CREATE TABLE T1 (a int); +INSERT INTO T1 VALUES (1); + +-- echo ### assertion: master contains capitalized case table +SHOW TABLES; + +-- sync_slave_with_master + +use bug37656; + +-- echo ### assertion: slave contains lowered case table +SHOW TABLES; + +-- echo ### assertion: master and slave tables do not differ +let $diff_tables= master:B37656.T1, slave:bug37656.t1; + +-- source include/diff_tables.inc + +-- connection master +SET SQL_LOG_BIN=0; +DROP DATABASE B37656; +SET SQL_LOG_BIN=1; +SHOW DATABASES LIKE '%37656'; + +-- connection slave +DROP DATABASE BUG37656; +SHOW DATABASES LIKE '%37656'; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_mdev10863.test b/mysql-test/suite/rpl/t/rpl_mdev10863.test index 81cdfd84dbe..73062df861e 100644 --- a/mysql-test/suite/rpl/t/rpl_mdev10863.test +++ b/mysql-test/suite/rpl/t/rpl_mdev10863.test @@ -99,7 +99,7 @@ SET GLOBAL max_relay_log_size= @old_max_relay; --source include/start_slave.inc --connection server_1 -ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; +ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria; DROP TABLE t1; --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_mdev12179.test b/mysql-test/suite/rpl/t/rpl_mdev12179.test index eb0f6c04b42..db1ec3d4d22 100644 --- a/mysql-test/suite/rpl/t/rpl_mdev12179.test +++ b/mysql-test/suite/rpl/t/rpl_mdev12179.test @@ -44,7 +44,7 @@ SELECT * FROM t1 ORDER BY a; SET sql_log_bin=0; # Reset storage engine for mysql.gtid_slave_pos in case an earlier test # might have changed it to InnoDB. -ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; +ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria; CREATE TABLE mysql.gtid_slave_pos_innodb LIKE mysql.gtid_slave_pos; ALTER TABLE mysql.gtid_slave_pos_innodb ENGINE=InnoDB; INSERT INTO mysql.gtid_slave_pos_innodb SELECT * FROM mysql.gtid_slave_pos; @@ -128,7 +128,7 @@ SELECT table_name, engine FROM information_schema.tables --source include/stop_slave.inc SET sql_log_bin=0; -ALTER TABLE mysql.gtid_slave_pos ENGINE=MyISAM; +ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria; SET sql_log_bin=1; --write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect diff --git a/mysql-test/suite/rpl/t/rpl_mdev382.test b/mysql-test/suite/rpl/t/rpl_mdev382.test index 3ec877cdb1a..1d951cc7456 100644 --- a/mysql-test/suite/rpl/t/rpl_mdev382.test +++ b/mysql-test/suite/rpl/t/rpl_mdev382.test @@ -1,6 +1,7 @@ --source include/have_innodb.inc --source include/have_binlog_format_statement.inc --source include/master-slave.inc +--source include/not_windows.inc #unix shell escaping used for mysqlbinlog # MDEV-382: multiple SQL injections in replication code. diff --git a/mysql-test/suite/rpl/t/rpl_old_master.test b/mysql-test/suite/rpl/t/rpl_old_master.test index 8f61d6979cd..6ddc227fc14 100644 --- a/mysql-test/suite/rpl/t/rpl_old_master.test +++ b/mysql-test/suite/rpl/t/rpl_old_master.test @@ -27,7 +27,15 @@ SET @old_parallel= @@GLOBAL.slave_parallel_threads; SET GLOBAL slave_parallel_threads=10; --replace_result $SERVER_MYPORT_1 SERVER_MYPORT_1 eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4; + +# Block execution yet when the blocked query timestamp has been already accounted +FLUSH TABLES WITH READ LOCK; --source include/start_slave.inc +--let $slave_param = Seconds_Behind_Master +--let $slave_param_value = 1 +--let $slave_param_comparison= >= +--source include/wait_for_slave_param.inc +UNLOCK TABLES; --connection master CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB; diff --git a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test index a49d59c4eb4..e08472d5f51 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test +++ b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test @@ -553,5 +553,29 @@ SET GLOBAL slave_parallel_threads=@old_parallel_threads; --connection server_1 DROP TABLE t1, t2, t3; +--source include/save_master_gtid.inc +--connection server_2 +--source include/sync_with_master_gtid.inc +# Check for left-over rows in table mysql.gtid_slave_pos (MDEV-12147). +# +# There was a bug when a transaction got a conflict and was rolled back. It +# might have also handled deletion of some old rows, and these deletions would +# then also be rolled back. And since the deletes were never re-tried, old no +# longer needed rows would accumulate in the table without limit. +# +# The earlier part of this test file have plenty of transactions being rolled +# back. But the last DROP TABLE statement runs on its own and should never +# conflict, thus at this point the mysql.gtid_slave_pos table should be clean. +# +# To support @@gtid_pos_auto_engines, when a row is inserted in the table, it +# is associated with the engine of the table at insertion time, and it will +# only be deleted during record_gtid from a table of the same engine. Since we +# alter the table from MyISAM to InnoDB at the start of this test, we should +# end up with 4 rows: two left-over from when the table was MyISAM, and two +# left-over from the InnoDB part. +--echo Check that no more than the expected last four GTIDs are in mysql.gtid_slave_pos +select count(4) <= 4 from mysql.gtid_slave_pos order by domain_id, sub_id; + +--connection server_1 --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.cnf b/mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.cnf index 0ea0d951568..b85a84f6625 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.cnf +++ b/mysql-test/suite/rpl/t/rpl_parallel_optimistic_nobinlog.cnf @@ -5,5 +5,6 @@ log-slave-updates=0 loose-innodb [mysqld.2] +slave-transaction-retries=100 log-slave-updates=0 loose-innodb diff --git a/mysql-test/suite/rpl/t/rpl_row_lcase_tblnames-slave.opt b/mysql-test/suite/rpl/t/rpl_row_lcase_tblnames-slave.opt new file mode 100644 index 00000000000..7624b013dcd --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_lcase_tblnames-slave.opt @@ -0,0 +1 @@ +--replicate-do-db=bug_37656 --replicate-ignore-table=buG_37656.T1 --replicate-do-table=bUg_37656.T2 --replicate-do-table=bUg_37656.T3 --lower-case-table-names=1 diff --git a/mysql-test/suite/rpl/t/rpl_row_lcase_tblnames.test b/mysql-test/suite/rpl/t/rpl_row_lcase_tblnames.test new file mode 100644 index 00000000000..44c04dd62d3 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_lcase_tblnames.test @@ -0,0 +1,12 @@ +# BUG#37656 +# +# For details look into extra/rpl_tests/rpl_lower_case_table_names.test +# + +-- source include/master-slave.inc +-- source include/have_innodb.inc +-- source include/not_windows.inc +-- source include/have_binlog_format_row.inc + +-- let $engine=InnoDB +-- source include/rpl_lower_case_table_names.test diff --git a/mysql-test/suite/rpl/t/rpl_row_spatial.test b/mysql-test/suite/rpl/t/rpl_row_spatial.test new file mode 100644 index 00000000000..00c3dd7c54d --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_spatial.test @@ -0,0 +1,17 @@ +--source include/have_binlog_format_row.inc +--source include/master-slave.inc + +CREATE TABLE t1 (g POINT NOT NULL, SPATIAL INDEX(g)); +INSERT INTO t1 VALUES (ST_GEOMFROMTEXT('Point(1 1)')); +INSERT INTO t1 VALUES (ST_GEOMFROMTEXT('Point(2 1)')); +INSERT INTO t1 VALUES (ST_GEOMFROMTEXT('Point(1 2)')); +INSERT INTO t1 VALUES (ST_GEOMFROMTEXT('Point(2 2)')); +DELETE FROM t1 where MBREqual(g, ST_GEOMFROMTEXT('Point(1 2)')); + +--sync_slave_with_master +select count(*) from t1; + +--connection master +DELETE FROM t1; +drop table t1; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_master_shutdown.test b/mysql-test/suite/rpl/t/rpl_semi_sync_master_shutdown.test new file mode 100644 index 00000000000..2224f78d6d0 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_semi_sync_master_shutdown.test @@ -0,0 +1,60 @@ +# MDEV-16812 Semisync slave io thread segfaults at STOP-SLAVE handling +# +# The test verifies that the semisync-enabled slave io thread +# finishes off as specified in particular trying to connect even to a shut down +# master for a semisync firewell routine. + +source include/not_embedded.inc; +source include/have_debug.inc; +source include/master-slave.inc; + +--connection master + +--let $sav_enabled_master=`SELECT @@GLOBAL.rpl_semi_sync_master_enabled ` +SET @@GLOBAL.rpl_semi_sync_master_enabled = 1; + +--connection slave +source include/stop_slave.inc; +--let $sav_enabled_slave=`SELECT @@GLOBAL.rpl_semi_sync_slave_enabled ` +SET @@GLOBAL. rpl_semi_sync_slave_enabled = 1; +source include/start_slave.inc; + +--connection master +CREATE TABLE t1 (a INT); +INSERT INTO t1 SET a=1; + +--sync_slave_with_master + +connection master; +--echo # Shutdown master +--let $rpl_server_number=1 +source include/rpl_stop_server.inc; + +--connection slave +--source include/stop_slave.inc + +#connection master; +--echo # Restart master +--let $rpl_server_number=1 +source include/rpl_start_server.inc; + +# +# Clean up +# +--connection slave +--source include/stop_slave.inc +--source include/start_slave.inc + +--connection master +SET @@GLOBAL.debug_dbug=""; +--eval SET @@GLOBAL. rpl_semi_sync_master_enabled = $sav_enabled_master + +--connection master +DROP TABLE t1; + +--sync_slave_with_master +source include/stop_slave.inc; +--eval SET @@GLOBAL. rpl_semi_sync_slave_enabled = $sav_enabled_slave + +--let $rpl_only_running_threads= 1 +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_000001.test b/mysql-test/suite/rpl/t/rpl_stm_000001.test index 7e8f669ff34..72c89789af4 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_000001.test +++ b/mysql-test/suite/rpl/t/rpl_stm_000001.test @@ -19,6 +19,7 @@ select * from t1 limit 10; sync_slave_with_master; stop slave; connection master; +create temporary table tmp select * from mysql.user where host="localhost" and user="root"; set password for root@"localhost" = password('foo'); connection slave; start slave; @@ -27,7 +28,9 @@ connection master; # Give slave time to do at last one failed connect retry # This one must be short so that the slave will not stop retrying real_sleep 2; -set password for root@"localhost" = password(''); +replace into mysql.user select * from tmp; +drop temporary table tmp; +flush privileges; # Give slave time to connect (will retry every second) sleep 2; diff --git a/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames-slave.opt b/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames-slave.opt new file mode 100644 index 00000000000..8be29bbe976 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames-slave.opt @@ -0,0 +1 @@ +--replicate-do-db=bug_37656 --replicate-ignore-table=bug_37656.t1 --replicate-do-table=bug_37656.t2 --replicate-do-table=bug_37656.t3 --lower-case-table-names=1 diff --git a/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test b/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test new file mode 100644 index 00000000000..305c5b4b530 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test @@ -0,0 +1,12 @@ +# BUG#37656 +# +# For details look into extra/rpl_tests/rpl_lower_case_table_names.test +# + +-- source include/master-slave.inc +-- source include/have_innodb.inc +-- source include/not_windows.inc +-- source include/have_binlog_format_mixed_or_statement.inc + +-- let $engine=InnoDB +-- source include/rpl_lower_case_table_names.test diff --git a/mysql-test/suite/sql_sequence/auto_increment.result b/mysql-test/suite/sql_sequence/auto_increment.result new file mode 100644 index 00000000000..bf0a04bbaf1 --- /dev/null +++ b/mysql-test/suite/sql_sequence/auto_increment.result @@ -0,0 +1,30 @@ +set global auto_increment_increment= 2, auto_increment_offset= 2; +create sequence s start with -3 minvalue= -1000 increment 0; +select nextval(s); +nextval(s) +-2 +select nextval(s); +nextval(s) +0 +flush tables; +select nextval(s); +nextval(s) +1998 +drop sequence s; +set global auto_increment_increment= 2, auto_increment_offset= 1; +create sequence s start with -3 minvalue= -1000 increment 0; +select nextval(s); +nextval(s) +-3 +select nextval(s); +nextval(s) +-1 +select nextval(s); +nextval(s) +1 +flush tables; +select nextval(s); +nextval(s) +1997 +drop sequence s; +set global auto_increment_increment= default, auto_increment_offset= default; diff --git a/mysql-test/suite/sql_sequence/auto_increment.test b/mysql-test/suite/sql_sequence/auto_increment.test new file mode 100644 index 00000000000..335bef7ea37 --- /dev/null +++ b/mysql-test/suite/sql_sequence/auto_increment.test @@ -0,0 +1,30 @@ +--source include/have_sequence.inc + +# +# tests with auto_increment_increment and auto_increment_offset +# + +set global auto_increment_increment= 2, auto_increment_offset= 2; + +create sequence s start with -3 minvalue= -1000 increment 0; + +select nextval(s); +select nextval(s); +flush tables; +select nextval(s); +drop sequence s; + +set global auto_increment_increment= 2, auto_increment_offset= 1; + +create sequence s start with -3 minvalue= -1000 increment 0; + +select nextval(s); +select nextval(s); +select nextval(s); +flush tables; +select nextval(s); +drop sequence s; + +# Clean up + +set global auto_increment_increment= default, auto_increment_offset= default; diff --git a/mysql-test/suite/sql_sequence/create.result b/mysql-test/suite/sql_sequence/create.result index cb683d158d8..55d45a75abf 100644 --- a/mysql-test/suite/sql_sequence/create.result +++ b/mysql-test/suite/sql_sequence/create.result @@ -644,3 +644,12 @@ TABLE_ID NAME FLAG N_COLS SPACE ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE DROP SEQUENCE seq1; CREATE TEMPORARY SEQUENCE seq1 ENGINE=InnoDB ROW_FORMAT=REDUNDANT; DROP TEMPORARY SEQUENCE seq1; +# +# MDEV-17503 CREATE SEQUENCE failed with innodb_force_primary_key =1 +# +set global innodb_force_primary_key =1; +CREATE SEQUENCE s1 START WITH 100 INCREMENT BY 10 ENGINE=innodb; +set global innodb_force_primary_key=default; +ALTER TABLE s1 ADD PRIMARY KEY (next_not_cached_value); +ERROR HY000: Sequence 'test.s1' table structure is invalid (Sequence tables cannot have any keys) +DROP SEQUENCE s1; diff --git a/mysql-test/suite/sql_sequence/create.test b/mysql-test/suite/sql_sequence/create.test index b2562058ca6..1bc62117526 100644 --- a/mysql-test/suite/sql_sequence/create.test +++ b/mysql-test/suite/sql_sequence/create.test @@ -462,3 +462,14 @@ SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME='test/seq1'; DROP SEQUENCE seq1; CREATE TEMPORARY SEQUENCE seq1 ENGINE=InnoDB ROW_FORMAT=REDUNDANT; DROP TEMPORARY SEQUENCE seq1; + +--echo # +--echo # MDEV-17503 CREATE SEQUENCE failed with innodb_force_primary_key =1 +--echo # + +set global innodb_force_primary_key =1; +CREATE SEQUENCE s1 START WITH 100 INCREMENT BY 10 ENGINE=innodb; +set global innodb_force_primary_key=default; +--error ER_SEQUENCE_INVALID_TABLE_STRUCTURE +ALTER TABLE s1 ADD PRIMARY KEY (next_not_cached_value); +DROP SEQUENCE s1; diff --git a/mysql-test/suite/sql_sequence/next.result b/mysql-test/suite/sql_sequence/next.result index d138c342c9d..b1b1bb69306 100644 --- a/mysql-test/suite/sql_sequence/next.result +++ b/mysql-test/suite/sql_sequence/next.result @@ -519,3 +519,18 @@ create temporary table tmp (i int); select next value for tmp; ERROR 42S02: 'test.tmp' is not a SEQUENCE drop table tmp; +# +# Test negative numbers +# +create sequence s start with 1 minvalue=-1000 maxvalue=1000 increment -1; +select next value for s; +next value for s +1 +select next value for s; +next value for s +0 +flush tables; +select next value for s; +next value for s +-999 +drop sequence s; diff --git a/mysql-test/suite/sql_sequence/next.test b/mysql-test/suite/sql_sequence/next.test index 79249002d8f..a1f91bd7823 100644 --- a/mysql-test/suite/sql_sequence/next.test +++ b/mysql-test/suite/sql_sequence/next.test @@ -269,3 +269,14 @@ create temporary table tmp (i int); --error ER_NOT_SEQUENCE select next value for tmp; drop table tmp; + +--echo # +--echo # Test negative numbers +--echo # + +create sequence s start with 1 minvalue=-1000 maxvalue=1000 increment -1; +select next value for s; +select next value for s; +flush tables; +select next value for s; +drop sequence s; diff --git a/mysql-test/suite/sys_vars/r/delayed_insert_limit_func.result b/mysql-test/suite/sys_vars/r/delayed_insert_limit_func.result index 0a7c9a8169d..2e6b730f104 100644 --- a/mysql-test/suite/sys_vars/r/delayed_insert_limit_func.result +++ b/mysql-test/suite/sys_vars/r/delayed_insert_limit_func.result @@ -14,7 +14,7 @@ INSERT INTO t1 VALUES('3','1','1'); INSERT INTO t1 VALUES('4','1','1'); INSERT INTO t1 VALUES('5','1','1'); INSERT INTO t1 VALUES('6','1','1'); -LOCK TABLE v1 WRITE; +LOCK TABLE v1 READ; connection con1; INSERT DELAYED INTO t1 VALUES('7','1','1'); INSERT DELAYED INTO t1 VALUES('8','1','1'); @@ -83,7 +83,7 @@ INSERT INTO t1 VALUES('3'); INSERT INTO t1 VALUES('4'); INSERT INTO t1 VALUES('5'); INSERT INTO t1 VALUES('6'); -LOCK TABLE v1 WRITE; +LOCK TABLE v1 READ; connection con1; Asynchronous execute INSERT DELAYED INTO t1 VALUES('7'); diff --git a/mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_32.result b/mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_32.result new file mode 100644 index 00000000000..b3bec1eecdd --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_32.result @@ -0,0 +1,7 @@ +set global innodb_ft_result_cache_limit=5000000000; +Warnings: +Warning 1292 Truncated incorrect innodb_ft_result_cache_limit value: '5000000000' +select @@innodb_ft_result_cache_limit; +@@innodb_ft_result_cache_limit +4294967295 +set global innodb_ft_result_cache_limit=2000000000; diff --git a/mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_64.result b/mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_64.result new file mode 100644 index 00000000000..c86331a8a1c --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_64.result @@ -0,0 +1,5 @@ +set global innodb_ft_result_cache_limit=5000000000; +select @@innodb_ft_result_cache_limit; +@@innodb_ft_result_cache_limit +5000000000 +set global innodb_ft_result_cache_limit=2000000000; diff --git a/mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_basic,32bit.rdiff b/mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_basic,32bit.rdiff new file mode 100644 index 00000000000..8b670da6487 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_basic,32bit.rdiff @@ -0,0 +1,13 @@ +--- innodb_ft_result_cache_limit_basic.result ++++ innodb_ft_result_cache_limit_basic,32bit.reject +@@ -31,7 +31,9 @@ + @@innodb_ft_result_cache_limit + 4294967295 + set global innodb_ft_result_cache_limit=4*1024*1024*1024; ++Warnings: ++Warning 1292 Truncated incorrect innodb_ft_result_cache_limit value: '4294967296' + select @@innodb_ft_result_cache_limit; + @@innodb_ft_result_cache_limit +-4294967296 ++4294967295 + set global innodb_ft_result_cache_limit = @save_limit; diff --git a/mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_basic.result b/mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_basic.result index 59f6431a65e..66748507877 100644 --- a/mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_basic.result @@ -15,6 +15,7 @@ INNODB_FT_RESULT_CACHE_LIMIT 2000000000 select * from information_schema.session_variables where variable_name='innodb_ft_result_cache_limit'; VARIABLE_NAME VARIABLE_VALUE INNODB_FT_RESULT_CACHE_LIMIT 2000000000 +SET @save_limit = @@innodb_ft_result_cache_limit; set global innodb_ft_result_cache_limit=900000; Warnings: Warning 1292 Truncated incorrect innodb_ft_result_cache_limit value: '900000' @@ -30,9 +31,7 @@ select @@innodb_ft_result_cache_limit; @@innodb_ft_result_cache_limit 4294967295 set global innodb_ft_result_cache_limit=4*1024*1024*1024; -Warnings: -Warning 1292 Truncated incorrect innodb_ft_result_cache_limit value: '4294967296' select @@innodb_ft_result_cache_limit; @@innodb_ft_result_cache_limit -4294967295 -set global innodb_ft_result_cache_limit=2000000000; +4294967296 +set global innodb_ft_result_cache_limit = @save_limit; diff --git a/mysql-test/suite/sys_vars/r/innodb_log_optimize_ddl_basic.result b/mysql-test/suite/sys_vars/r/innodb_log_optimize_ddl_basic.result new file mode 100644 index 00000000000..993bb13ebf0 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_log_optimize_ddl_basic.result @@ -0,0 +1,39 @@ +SELECT COUNT(@@GLOBAL.innodb_log_optimize_ddl); +COUNT(@@GLOBAL.innodb_log_optimize_ddl) +1 +1 Expected +SELECT COUNT(@@SESSION.innodb_log_optimize_ddl); +ERROR HY000: Variable 'innodb_log_optimize_ddl' is a GLOBAL variable +Expected error 'Variable is a GLOBAL variable' +SELECT @@GLOBAL.innodb_log_optimize_ddl; +@@GLOBAL.innodb_log_optimize_ddl +1 +SELECT @@GLOBAL.innodb_log_optimize_ddl INTO @innodb_log_optimize_ddl_save; +SET @@GLOBAL.innodb_log_optimize_ddl = ON; +SET @@GLOBAL.innodb_log_optimize_ddl = OFF; +SET @@GLOBAL.innodb_log_optimize_ddl = 13; +ERROR 42000: Variable 'innodb_log_optimize_ddl' can't be set to the value of '13' +SET @@GLOBAL.innodb_log_optimize_ddl = 'ABC'; +ERROR 42000: Variable 'innodb_log_optimize_ddl' can't be set to the value of 'ABC' +SELECT @@GLOBAL.innodb_log_optimize_ddl = 0 +OR @@GLOBAL.innodb_log_optimize_ddl = 1 AS col; +col +1 +1 Expected +SELECT @@innodb_log_optimize_ddl = @@GLOBAL.innodb_log_optimize_ddl AS col; +col +1 +1 Expected +SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +WHERE VARIABLE_NAME='innodb_log_optimize_ddl'; +VARIABLE_VALUE +OFF +SHOW VARIABLES WHERE VARIABLE_NAME='innodb_log_optimize_ddl'; +Variable_name Value +innodb_log_optimize_ddl OFF +SELECT @@local.innodb_log_optimize_ddl; +ERROR HY000: Variable 'innodb_log_optimize_ddl' is a GLOBAL variable +Expected error 'Variable is a GLOBAL variable' +SELECT innodb_log_optimize_ddl; +ERROR 42S22: Unknown column 'innodb_log_optimize_ddl' in 'field list' +SET GLOBAL innodb_log_optimize_ddl = @innodb_log_optimize_ddl_save; diff --git a/mysql-test/suite/sys_vars/r/shared_memory_base_name_basic.result b/mysql-test/suite/sys_vars/r/shared_memory_base_name_basic.result deleted file mode 100644 index 356b3c9e879..00000000000 --- a/mysql-test/suite/sys_vars/r/shared_memory_base_name_basic.result +++ /dev/null @@ -1,21 +0,0 @@ -select @@global.shared_memory_base_name; -@@global.shared_memory_base_name -MYSQL_TMP_DIR/mysqld.1.sock -select @@session.shared_memory_base_name; -ERROR HY000: Variable 'shared_memory_base_name' is a GLOBAL variable -show global variables like 'shared_memory_base_name'; -Variable_name Value -shared_memory_base_name MYSQL_TMP_DIR/mysqld.1.sock -show session variables like 'shared_memory_base_name'; -Variable_name Value -shared_memory_base_name MYSQL_TMP_DIR/mysqld.1.sock -select * from information_schema.global_variables where variable_name='shared_memory_base_name'; -VARIABLE_NAME VARIABLE_VALUE -SHARED_MEMORY_BASE_NAME MYSQL_TMP_DIR/mysqld.1.sock -select * from information_schema.session_variables where variable_name='shared_memory_base_name'; -VARIABLE_NAME VARIABLE_VALUE -SHARED_MEMORY_BASE_NAME MYSQL_TMP_DIR/mysqld.1.sock -set global shared_memory_base_name=1; -ERROR HY000: Variable 'shared_memory_base_name' is a read only variable -set session shared_memory_base_name=1; -ERROR HY000: Variable 'shared_memory_base_name' is a read only variable diff --git a/mysql-test/suite/sys_vars/r/shared_memory_basic.result b/mysql-test/suite/sys_vars/r/shared_memory_basic.result deleted file mode 100644 index ab671af610c..00000000000 --- a/mysql-test/suite/sys_vars/r/shared_memory_basic.result +++ /dev/null @@ -1,21 +0,0 @@ -select @@global.shared_memory; -@@global.shared_memory -0 -select @@session.shared_memory; -ERROR HY000: Variable 'shared_memory' is a GLOBAL variable -show global variables like 'shared_memory'; -Variable_name Value -shared_memory OFF -show session variables like 'shared_memory'; -Variable_name Value -shared_memory OFF -select * from information_schema.global_variables where variable_name='shared_memory'; -VARIABLE_NAME VARIABLE_VALUE -SHARED_MEMORY OFF -select * from information_schema.session_variables where variable_name='shared_memory'; -VARIABLE_NAME VARIABLE_VALUE -SHARED_MEMORY OFF -set global shared_memory=1; -ERROR HY000: Variable 'shared_memory' is a read only variable -set session shared_memory=1; -ERROR HY000: Variable 'shared_memory' is a read only variable diff --git a/mysql-test/suite/sys_vars/r/sql_low_priority_updates_func.result b/mysql-test/suite/sys_vars/r/sql_low_priority_updates_func.result index 04af87ae369..c869de7b837 100644 --- a/mysql-test/suite/sys_vars/r/sql_low_priority_updates_func.result +++ b/mysql-test/suite/sys_vars/r/sql_low_priority_updates_func.result @@ -20,7 +20,7 @@ INSERT INTO t1 VALUES('3'); INSERT INTO t1 VALUES('4'); INSERT INTO t1 VALUES('5'); INSERT INTO t1 VALUES('6'); -LOCK TABLE v1 WRITE; +LOCK TABLE v1 WRITE CONCURRENT; connection con1; ** Asynchronous Execution ** UPDATE t1 SET a = CONCAT(a,"-updated");| @@ -56,7 +56,7 @@ INSERT INTO t1 VALUES('3'); INSERT INTO t1 VALUES('4'); INSERT INTO t1 VALUES('5'); INSERT INTO t1 VALUES('6'); -LOCK TABLE v1 WRITE; +LOCK TABLE v1 READ; connection con1; ** Asynchronous Execution ** UPDATE t1 SET a = CONCAT(a,"-updated");| 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 d99d0aeaf35..2f5fb044f1b 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff @@ -1,6 +1,6 @@ --- suite/sys_vars/r/sysvars_innodb.result 2017-09-14 10:37:46.000000000 +0000 +++ suite/sys_vars/r/sysvars_innodb,32bit.reject 2017-09-26 13:13:23.685012523 +0000 -@@ -54,7 +54,7 @@ +@@ -56,7 +56,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 8 VARIABLE_SCOPE GLOBAL @@ -9,7 +9,7 @@ VARIABLE_COMMENT Number of InnoDB Adaptive Hash Index Partitions (default 8) NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 512 -@@ -68,7 +68,7 @@ +@@ -70,7 +70,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 -@@ -82,7 +82,7 @@ +@@ -84,7 +84,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 64 VARIABLE_SCOPE GLOBAL @@ -27,7 +27,7 @@ VARIABLE_COMMENT Data file autoextend increment in megabytes NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 1000 -@@ -96,7 +96,7 @@ +@@ -98,7 +98,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 1 VARIABLE_SCOPE GLOBAL @@ -36,7 +36,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 -@@ -180,10 +180,10 @@ +@@ -182,10 +182,10 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 134217728 VARIABLE_SCOPE GLOBAL @@ -49,7 +49,7 @@ NUMERIC_BLOCK_SIZE 1048576 ENUM_VALUE_LIST NULL READ_ONLY YES -@@ -222,7 +222,7 @@ +@@ -224,7 +224,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 25 VARIABLE_SCOPE GLOBAL @@ -58,7 +58,7 @@ VARIABLE_COMMENT Dump only the hottest N% of each buffer pool, defaults to 25 NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 100 -@@ -264,7 +264,7 @@ +@@ -266,7 +266,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -67,7 +67,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 -@@ -334,7 +334,7 @@ +@@ -336,7 +336,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -76,7 +76,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 -@@ -446,7 +446,7 @@ +@@ -448,7 +448,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -85,7 +85,7 @@ VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 1000 -@@ -488,7 +488,7 @@ +@@ -490,7 +490,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 5 VARIABLE_SCOPE GLOBAL @@ -94,7 +94,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 -@@ -516,7 +516,7 @@ +@@ -518,7 +518,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 50 VARIABLE_SCOPE GLOBAL @@ -103,7 +103,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 -@@ -530,10 +530,10 @@ +@@ -532,10 +532,10 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 5000 VARIABLE_SCOPE GLOBAL @@ -116,7 +116,7 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -796,7 +796,7 @@ +@@ -798,7 +798,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 120 VARIABLE_SCOPE GLOBAL @@ -125,7 +125,7 @@ VARIABLE_COMMENT Number of pages reserved in doublewrite buffer for batch flushing NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 127 -@@ -894,7 +894,7 @@ +@@ -896,7 +896,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 600 VARIABLE_SCOPE GLOBAL @@ -134,7 +134,7 @@ VARIABLE_COMMENT Maximum number of seconds that semaphore times out in InnoDB. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 4294967295 -@@ -936,7 +936,7 @@ +@@ -938,7 +938,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -143,7 +143,7 @@ VARIABLE_COMMENT Make the first page of the given tablespace dirty. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 -@@ -950,7 +950,7 @@ +@@ -952,7 +952,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 30 VARIABLE_SCOPE GLOBAL @@ -152,7 +152,7 @@ VARIABLE_COMMENT Number of iterations over which the background flushing is averaged. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 1000 -@@ -978,7 +978,7 @@ +@@ -980,7 +980,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 1 VARIABLE_SCOPE GLOBAL @@ -161,7 +161,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 -@@ -1006,7 +1006,7 @@ +@@ -1008,7 +1008,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 1 VARIABLE_SCOPE GLOBAL @@ -170,7 +170,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 -@@ -1062,7 +1062,7 @@ +@@ -1064,7 +1064,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -179,7 +179,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 -@@ -1090,7 +1090,7 @@ +@@ -1092,7 +1092,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 8000000 VARIABLE_SCOPE GLOBAL @@ -188,7 +188,7 @@ VARIABLE_COMMENT InnoDB Fulltext search cache size in bytes NUMERIC_MIN_VALUE 1600000 NUMERIC_MAX_VALUE 80000000 -@@ -1132,7 +1132,7 @@ +@@ -1134,7 +1134,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 84 VARIABLE_SCOPE GLOBAL @@ -197,7 +197,7 @@ VARIABLE_COMMENT InnoDB Fulltext search maximum token size in characters NUMERIC_MIN_VALUE 10 NUMERIC_MAX_VALUE 84 -@@ -1146,7 +1146,7 @@ +@@ -1148,7 +1148,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 3 VARIABLE_SCOPE GLOBAL @@ -206,7 +206,7 @@ VARIABLE_COMMENT InnoDB Fulltext search minimum token size in characters NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 16 -@@ -1160,7 +1160,7 @@ +@@ -1162,7 +1162,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 2000 VARIABLE_SCOPE GLOBAL @@ -215,7 +215,7 @@ VARIABLE_COMMENT InnoDB Fulltext search number of words to optimize for each optimize table call NUMERIC_MIN_VALUE 1000 NUMERIC_MAX_VALUE 10000 -@@ -1174,7 +1174,7 @@ +@@ -1176,10 +1176,10 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 2000000000 VARIABLE_SCOPE GLOBAL @@ -223,8 +223,12 @@ +VARIABLE_TYPE INT UNSIGNED VARIABLE_COMMENT InnoDB Fulltext search query result cache limit in bytes NUMERIC_MIN_VALUE 1000000 - NUMERIC_MAX_VALUE 4294967295 -@@ -1202,7 +1202,7 @@ +-NUMERIC_MAX_VALUE 18446744073709551615 ++NUMERIC_MAX_VALUE 4294967295 + NUMERIC_BLOCK_SIZE 0 + ENUM_VALUE_LIST NULL + READ_ONLY NO +@@ -1204,7 +1204,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 2 VARIABLE_SCOPE GLOBAL @@ -233,7 +237,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 -@@ -1216,7 +1216,7 @@ +@@ -1218,7 +1218,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 640000000 VARIABLE_SCOPE GLOBAL @@ -242,7 +246,7 @@ VARIABLE_COMMENT Total memory allocated for InnoDB Fulltext Search cache NUMERIC_MIN_VALUE 32000000 NUMERIC_MAX_VALUE 1600000000 -@@ -1244,7 +1244,7 @@ +@@ -1246,7 +1246,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 100 VARIABLE_SCOPE GLOBAL @@ -251,7 +255,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 -@@ -1272,10 +1272,10 @@ +@@ -1274,10 +1274,10 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 200 VARIABLE_SCOPE GLOBAL @@ -264,7 +268,7 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -1284,12 +1284,12 @@ +@@ -1286,12 +1286,12 @@ SESSION_VALUE NULL GLOBAL_VALUE 2000 GLOBAL_VALUE_ORIGIN COMPILE-TIME @@ -280,7 +284,7 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -1342,7 +1342,7 @@ +@@ -1344,7 +1344,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 50 VARIABLE_SCOPE SESSION @@ -289,7 +293,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 0 NUMERIC_MAX_VALUE 1073741824 -@@ -1356,10 +1356,10 @@ +@@ -1358,10 +1358,10 @@ GLOBAL_VALUE_ORIGIN CONFIG DEFAULT_VALUE 16777216 VARIABLE_SCOPE GLOBAL @@ -302,7 +306,7 @@ NUMERIC_BLOCK_SIZE 1024 ENUM_VALUE_LIST NULL READ_ONLY YES -@@ -1412,7 +1412,7 @@ +@@ -1414,7 +1414,7 @@ GLOBAL_VALUE_ORIGIN CONFIG DEFAULT_VALUE 2 VARIABLE_SCOPE GLOBAL @@ -311,7 +315,7 @@ VARIABLE_COMMENT Number of log files in the log group. InnoDB writes to the files in a circular fashion. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 100 -@@ -1454,7 +1454,7 @@ +@@ -1470,7 +1470,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 8192 VARIABLE_SCOPE GLOBAL @@ -320,7 +324,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 -@@ -1468,10 +1468,10 @@ +@@ -1484,10 +1484,10 @@ GLOBAL_VALUE_ORIGIN CONFIG DEFAULT_VALUE 1024 VARIABLE_SCOPE GLOBAL @@ -333,7 +337,7 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -1524,10 +1524,10 @@ +@@ -1540,10 +1540,10 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -346,7 +350,7 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -1538,7 +1538,7 @@ +@@ -1554,7 +1554,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -355,7 +359,7 @@ VARIABLE_COMMENT Maximum delay of user threads in micro-seconds NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 10000000 -@@ -1678,10 +1678,10 @@ +@@ -1694,10 +1694,10 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -368,7 +372,7 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY YES -@@ -1706,7 +1706,7 @@ +@@ -1722,7 +1722,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 4 VARIABLE_SCOPE GLOBAL @@ -377,7 +381,7 @@ VARIABLE_COMMENT Page cleaner threads can be from 1 to 64. Default is 4. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 64 -@@ -1734,7 +1734,7 @@ +@@ -1750,7 +1750,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 16 VARIABLE_SCOPE GLOBAL @@ -386,7 +390,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 -@@ -1748,7 +1748,7 @@ +@@ -1764,7 +1764,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 16384 VARIABLE_SCOPE GLOBAL @@ -395,7 +399,7 @@ VARIABLE_COMMENT Page size to use for all InnoDB tablespaces. NUMERIC_MIN_VALUE 4096 NUMERIC_MAX_VALUE 65536 -@@ -1790,7 +1790,7 @@ +@@ -1806,7 +1806,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 300 VARIABLE_SCOPE GLOBAL @@ -404,7 +408,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 -@@ -1804,7 +1804,7 @@ +@@ -1820,7 +1820,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 128 VARIABLE_SCOPE GLOBAL @@ -413,7 +417,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 -@@ -1846,7 +1846,7 @@ +@@ -1834,7 +1834,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 4 VARIABLE_SCOPE GLOBAL @@ -422,7 +426,7 @@ VARIABLE_COMMENT Purge threads can be from 1 to 32. Default is 4. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 32 -@@ -1874,7 +1874,7 @@ +@@ -1862,7 +1862,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 56 VARIABLE_SCOPE GLOBAL @@ -431,7 +435,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 -@@ -1888,7 +1888,7 @@ +@@ -1876,7 +1876,7 @@ GLOBAL_VALUE_ORIGIN CONFIG DEFAULT_VALUE 4 VARIABLE_SCOPE GLOBAL @@ -440,7 +444,7 @@ VARIABLE_COMMENT Number of background read I/O threads in InnoDB. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 64 -@@ -1916,10 +1916,10 @@ +@@ -1904,10 +1904,10 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -453,7 +457,7 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -1944,7 +1944,7 @@ +@@ -1932,7 +1932,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 128 VARIABLE_SCOPE GLOBAL @@ -462,7 +466,7 @@ VARIABLE_COMMENT Number of undo logs to use (deprecated). NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 128 -@@ -1958,7 +1958,7 @@ +@@ -1946,7 +1946,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -471,7 +475,7 @@ VARIABLE_COMMENT An InnoDB page number. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 4294967295 -@@ -2014,7 +2014,7 @@ +@@ -2002,7 +2002,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 1048576 VARIABLE_SCOPE GLOBAL @@ -480,7 +484,7 @@ VARIABLE_COMMENT Memory buffer size for index creation NUMERIC_MIN_VALUE 65536 NUMERIC_MAX_VALUE 67108864 -@@ -2224,7 +2224,7 @@ +@@ -2212,7 +2212,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 1 VARIABLE_SCOPE GLOBAL @@ -489,7 +493,7 @@ VARIABLE_COMMENT Size of the mutex/lock wait array. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 1024 -@@ -2252,10 +2252,10 @@ +@@ -2240,10 +2240,10 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 30 VARIABLE_SCOPE GLOBAL @@ -502,7 +506,7 @@ NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO -@@ -2294,7 +2294,7 @@ +@@ -2282,7 +2282,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -511,7 +515,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 -@@ -2308,7 +2308,7 @@ +@@ -2296,7 +2296,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 10000 VARIABLE_SCOPE GLOBAL @@ -520,7 +524,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 -@@ -2378,7 +2378,7 @@ +@@ -2366,7 +2366,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 128 VARIABLE_SCOPE GLOBAL @@ -529,7 +533,7 @@ VARIABLE_COMMENT Number of undo logs to use. NUMERIC_MIN_VALUE 1 NUMERIC_MAX_VALUE 128 -@@ -2406,7 +2406,7 @@ +@@ -2394,7 +2394,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL @@ -538,7 +542,7 @@ VARIABLE_COMMENT Number of undo tablespaces to use. NUMERIC_MIN_VALUE 0 NUMERIC_MAX_VALUE 127 -@@ -2448,7 +2448,7 @@ +@@ -2422,7 +2422,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 e98cf8e41ff..a6f626dd0b5 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result @@ -1179,7 +1179,7 @@ VARIABLE_SCOPE GLOBAL VARIABLE_TYPE BIGINT UNSIGNED VARIABLE_COMMENT InnoDB Fulltext search query result cache limit in bytes NUMERIC_MIN_VALUE 1000000 -NUMERIC_MAX_VALUE 4294967295 +NUMERIC_MAX_VALUE 18446744073709551615 NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO @@ -1450,6 +1450,20 @@ NUMERIC_BLOCK_SIZE NULL ENUM_VALUE_LIST NULL READ_ONLY YES COMMAND_LINE_ARGUMENT REQUIRED +VARIABLE_NAME INNODB_LOG_OPTIMIZE_DDL +SESSION_VALUE NULL +GLOBAL_VALUE ON +GLOBAL_VALUE_ORIGIN COMPILE-TIME +DEFAULT_VALUE ON +VARIABLE_SCOPE GLOBAL +VARIABLE_TYPE BOOLEAN +VARIABLE_COMMENT Reduce redo logging when natively creating indexes or rebuilding tables. Setting this OFF avoids delay due to page flushing and allows concurrent backup. +NUMERIC_MIN_VALUE NULL +NUMERIC_MAX_VALUE NULL +NUMERIC_BLOCK_SIZE NULL +ENUM_VALUE_LIST OFF,ON +READ_ONLY NO +COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME INNODB_LOG_WRITE_AHEAD_SIZE SESSION_VALUE NULL GLOBAL_VALUE 8192 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 079f63ba354..835145531b9 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result +++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result @@ -586,6 +586,20 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY NO COMMAND_LINE_ARGUMENT REQUIRED +VARIABLE_NAME CORE_FILE +SESSION_VALUE NULL +GLOBAL_VALUE ON +GLOBAL_VALUE_ORIGIN COMPILE-TIME +DEFAULT_VALUE NULL +VARIABLE_SCOPE GLOBAL +VARIABLE_TYPE BOOLEAN +VARIABLE_COMMENT write a core-file on crashes +NUMERIC_MIN_VALUE NULL +NUMERIC_MAX_VALUE NULL +NUMERIC_BLOCK_SIZE NULL +ENUM_VALUE_LIST OFF,ON +READ_ONLY YES +COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME DATADIR SESSION_VALUE NULL GLOBAL_VALUE PATH @@ -866,6 +880,20 @@ NUMERIC_BLOCK_SIZE NULL ENUM_VALUE_LIST NULL READ_ONLY NO COMMAND_LINE_ARGUMENT NULL +VARIABLE_NAME EQ_RANGE_INDEX_DIVE_LIMIT +SESSION_VALUE 0 +GLOBAL_VALUE 0 +GLOBAL_VALUE_ORIGIN COMPILE-TIME +DEFAULT_VALUE 0 +VARIABLE_SCOPE SESSION +VARIABLE_TYPE INT UNSIGNED +VARIABLE_COMMENT The optimizer will use existing index statistics instead of doing index dives for equality ranges if the number of equality ranges for the index is larger than or equal to this number. If set to 0, index dives are always used. +NUMERIC_MIN_VALUE 0 +NUMERIC_MAX_VALUE 4294967295 +NUMERIC_BLOCK_SIZE 1 +ENUM_VALUE_LIST NULL +READ_ONLY NO +COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME ERROR_COUNT SESSION_VALUE 0 GLOBAL_VALUE NULL @@ -3861,7 +3889,7 @@ NUMERIC_MAX_VALUE NULL NUMERIC_BLOCK_SIZE NULL ENUM_VALUE_LIST OFF,ON READ_ONLY NO -COMMAND_LINE_ARGUMENT NULL +COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME SQL_SELECT_LIMIT SESSION_VALUE 18446744073709551615 GLOBAL_VALUE 18446744073709551615 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 2e2ea63d50a..26acbfad9c6 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result +++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result @@ -586,6 +586,20 @@ NUMERIC_BLOCK_SIZE 1 ENUM_VALUE_LIST NULL READ_ONLY NO COMMAND_LINE_ARGUMENT REQUIRED +VARIABLE_NAME CORE_FILE +SESSION_VALUE NULL +GLOBAL_VALUE ON +GLOBAL_VALUE_ORIGIN COMPILE-TIME +DEFAULT_VALUE NULL +VARIABLE_SCOPE GLOBAL +VARIABLE_TYPE BOOLEAN +VARIABLE_COMMENT write a core-file on crashes +NUMERIC_MIN_VALUE NULL +NUMERIC_MAX_VALUE NULL +NUMERIC_BLOCK_SIZE NULL +ENUM_VALUE_LIST OFF,ON +READ_ONLY YES +COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME DATADIR SESSION_VALUE NULL GLOBAL_VALUE PATH @@ -880,6 +894,20 @@ NUMERIC_BLOCK_SIZE NULL ENUM_VALUE_LIST NULL READ_ONLY NO COMMAND_LINE_ARGUMENT NULL +VARIABLE_NAME EQ_RANGE_INDEX_DIVE_LIMIT +SESSION_VALUE 0 +GLOBAL_VALUE 0 +GLOBAL_VALUE_ORIGIN COMPILE-TIME +DEFAULT_VALUE 0 +VARIABLE_SCOPE SESSION +VARIABLE_TYPE INT UNSIGNED +VARIABLE_COMMENT The optimizer will use existing index statistics instead of doing index dives for equality ranges if the number of equality ranges for the index is larger than or equal to this number. If set to 0, index dives are always used. +NUMERIC_MIN_VALUE 0 +NUMERIC_MAX_VALUE 4294967295 +NUMERIC_BLOCK_SIZE 1 +ENUM_VALUE_LIST NULL +READ_ONLY NO +COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME ERROR_COUNT SESSION_VALUE 0 GLOBAL_VALUE NULL @@ -4771,7 +4799,7 @@ NUMERIC_MAX_VALUE NULL NUMERIC_BLOCK_SIZE NULL ENUM_VALUE_LIST OFF,ON READ_ONLY NO -COMMAND_LINE_ARGUMENT NULL +COMMAND_LINE_ARGUMENT OPTIONAL VARIABLE_NAME SQL_SELECT_LIMIT SESSION_VALUE 18446744073709551615 GLOBAL_VALUE 18446744073709551615 diff --git a/mysql-test/suite/sys_vars/r/thread_pool_size_high.result b/mysql-test/suite/sys_vars/r/thread_pool_size_high.result index f581ae8e315..bc30104b79d 100644 --- a/mysql-test/suite/sys_vars/r/thread_pool_size_high.result +++ b/mysql-test/suite/sys_vars/r/thread_pool_size_high.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("Could not increase number of max_open_files to more than"); SELECT @@global.thread_pool_size; @@global.thread_pool_size 200 diff --git a/mysql-test/suite/sys_vars/r/wsrep_start_position_basic.result b/mysql-test/suite/sys_vars/r/wsrep_start_position_basic.result index fd6dc1b5a4d..a49e6135d47 100644 --- a/mysql-test/suite/sys_vars/r/wsrep_start_position_basic.result +++ b/mysql-test/suite/sys_vars/r/wsrep_start_position_basic.result @@ -17,6 +17,10 @@ SELECT @@global.wsrep_start_position; 00000000-0000-0000-0000-000000000000:-1 # valid values +SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:-2'; +SELECT @@global.wsrep_start_position; +@@global.wsrep_start_position +00000000-0000-0000-0000-000000000000:-2 SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:100'; SELECT @@global.wsrep_start_position; @@global.wsrep_start_position @@ -27,12 +31,6 @@ SELECT @@global.wsrep_start_position; 00000000-0000-0000-0000-000000000000:-1 # invalid values -call mtr.add_suppression("WSREP: SST position can't be set in past. Requested: -2, Current: -1."); -SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:-2'; -ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '00000000-0000-0000-0000-000000000000:-2' -SELECT @@global.wsrep_start_position; -@@global.wsrep_start_position -00000000-0000-0000-0000-000000000000:-1 SET @@global.wsrep_start_position='000000000000000-0000-0000-0000-000000000000:-1'; ERROR 42000: Variable 'wsrep_start_position' can't be set to the value of '000000000000000-0000-0000-0000-000000000000:-1' SET @@global.wsrep_start_position='12345678-1234-1234-12345-123456789012:100'; diff --git a/mysql-test/suite/sys_vars/t/delayed_insert_limit_func.test b/mysql-test/suite/sys_vars/t/delayed_insert_limit_func.test index 33c278dc118..fe0c579acf4 100644 --- a/mysql-test/suite/sys_vars/t/delayed_insert_limit_func.test +++ b/mysql-test/suite/sys_vars/t/delayed_insert_limit_func.test @@ -59,7 +59,7 @@ INSERT INTO t1 VALUES('4','1','1'); INSERT INTO t1 VALUES('5','1','1'); INSERT INTO t1 VALUES('6','1','1'); -LOCK TABLE v1 WRITE; +LOCK TABLE v1 READ; connection con1; @@ -106,9 +106,8 @@ delimiter ;| connection con0; let $wait_condition= - SELECT variable_value > @@global.delayed_insert_limit - FROM information_schema.global_status - WHERE variable_name like 'Not_flushed_delayed_rows'; + SELECT COUNT(*) = 1 FROM information_schema.processlist + WHERE state = 'Waiting for table level lock' AND user='delayed'; --source include/wait_condition.inc let $my_select= SELECT COUNT(*) FROM t1; send; @@ -130,13 +129,6 @@ connection con0; --echo Asynchronous "reap" result --echo The next result suffers from --echo '# Bug#35386 insert delayed inserts 1 + limit rows instead of just limit rows' -# -# on UNLOCK TABLES both SELECT in the con0 and delayed insert thread in the -# con1 were awaken. There's no FIFO for TL_WRITE_DELAYED and TL_READ, -# so either the first delayed_insert_limit rows will be inserted -# before select (which will see 21 row) or select will go first (and see 6 rows) -# ---replace_result 6 21 reap; connection default; @@ -165,7 +157,7 @@ INSERT INTO t1 VALUES('4'); INSERT INTO t1 VALUES('5'); INSERT INTO t1 VALUES('6'); -LOCK TABLE v1 WRITE; +LOCK TABLE v1 READ; connection con1; @@ -194,8 +186,8 @@ delimiter ;| connection con0; let $wait_condition= - SELECT variable_value > 0 FROM information_schema.global_status - WHERE variable_name like 'Not_flushed_delayed_rows'; + SELECT COUNT(*) = 1 FROM information_schema.processlist + WHERE state = 'Waiting for table level lock' AND user='delayed'; --source include/wait_condition.inc --echo Asynchronous execute # Due to performance and server behaveiour the test observes values between 6 and 22. diff --git a/mysql-test/suite/sys_vars/t/innodb_ft_result_cache_limit_32.test b/mysql-test/suite/sys_vars/t/innodb_ft_result_cache_limit_32.test new file mode 100644 index 00000000000..d9defc7447b --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_ft_result_cache_limit_32.test @@ -0,0 +1,9 @@ +--source include/have_32bit.inc +--source include/have_innodb.inc + +let $innodb_ft_result_cache_limit_orig=`select @@innodb_ft_result_cache_limit`; + +set global innodb_ft_result_cache_limit=5000000000; +select @@innodb_ft_result_cache_limit; + +eval set global innodb_ft_result_cache_limit=$innodb_ft_result_cache_limit_orig; diff --git a/mysql-test/suite/sys_vars/t/innodb_ft_result_cache_limit_64.test b/mysql-test/suite/sys_vars/t/innodb_ft_result_cache_limit_64.test new file mode 100644 index 00000000000..2606d2b5ca8 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_ft_result_cache_limit_64.test @@ -0,0 +1,9 @@ +--source include/have_64bit.inc +--source include/have_innodb.inc + +let $innodb_ft_result_cache_limit_orig=`select @@innodb_ft_result_cache_limit`; + +set global innodb_ft_result_cache_limit=5000000000; +select @@innodb_ft_result_cache_limit; + +eval set global innodb_ft_result_cache_limit=$innodb_ft_result_cache_limit_orig; diff --git a/mysql-test/suite/sys_vars/t/innodb_ft_result_cache_limit_basic.test b/mysql-test/suite/sys_vars/t/innodb_ft_result_cache_limit_basic.test index 0a797a5ab5d..31cdfed4478 100644 --- a/mysql-test/suite/sys_vars/t/innodb_ft_result_cache_limit_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_ft_result_cache_limit_basic.test @@ -4,6 +4,7 @@ # --source include/have_innodb.inc +--source include/word_size.inc # # show the global and session values; @@ -21,7 +22,7 @@ select * from information_schema.session_variables where variable_name='innodb_f # # test default, min, max value # -let $innodb_ft_result_cache_limit_orig=`select @@innodb_ft_result_cache_limit`; +SET @save_limit = @@innodb_ft_result_cache_limit; set global innodb_ft_result_cache_limit=900000; select @@innodb_ft_result_cache_limit; @@ -35,4 +36,4 @@ select @@innodb_ft_result_cache_limit; set global innodb_ft_result_cache_limit=4*1024*1024*1024; select @@innodb_ft_result_cache_limit; -eval set global innodb_ft_result_cache_limit=$innodb_ft_result_cache_limit_orig; +set global innodb_ft_result_cache_limit = @save_limit; diff --git a/mysql-test/suite/sys_vars/t/innodb_log_optimize_ddl_basic.test b/mysql-test/suite/sys_vars/t/innodb_log_optimize_ddl_basic.test new file mode 100644 index 00000000000..8e7612b0d9e --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_log_optimize_ddl_basic.test @@ -0,0 +1,65 @@ +############# suite/sys_vars/t/innodb_log_optimize_ddl_basic.test ############# +# # +# Variable Name: innodb_log_optimize_ddl # +# Scope: Global # +# Access Type: Dynamic # +# Data Type: boolean # +# # +# The variable was introduced by # +# MDEV-16809 Allow full redo logging for ALTER TABLE # +# # +############################################################################### + +--source include/have_innodb.inc + +#### Reveal that the global innodb system variable exists +SELECT COUNT(@@GLOBAL.innodb_log_optimize_ddl); +--echo 1 Expected + +#### Reveal that no session innodb system variable exists +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT COUNT(@@SESSION.innodb_log_optimize_ddl); +--echo Expected error 'Variable is a GLOBAL variable' + +#### Display the default value +SELECT @@GLOBAL.innodb_log_optimize_ddl; + +SELECT @@GLOBAL.innodb_log_optimize_ddl INTO @innodb_log_optimize_ddl_save; +#### Check if the value can be set +SET @@GLOBAL.innodb_log_optimize_ddl = ON; +SET @@GLOBAL.innodb_log_optimize_ddl = OFF; + +#### Check if disallowed values are refused +--error ER_WRONG_VALUE_FOR_VAR +SET @@GLOBAL.innodb_log_optimize_ddl = 13; +--error ER_WRONG_VALUE_FOR_VAR +SET @@GLOBAL.innodb_log_optimize_ddl = 'ABC'; + +#### Check if the initial value was in the range of supported values +# We use 0 and 1 in order to avoid a warning. +SELECT @@GLOBAL.innodb_log_optimize_ddl = 0 + OR @@GLOBAL.innodb_log_optimize_ddl = 1 AS col; +--echo 1 Expected + +#### Check if the value presented without GLOBAL point is the same +SELECT @@innodb_log_optimize_ddl = @@GLOBAL.innodb_log_optimize_ddl AS col; +--echo 1 Expected + +#### Show the value presented in information_schema and SHOW VARIABLES +# We do not want to get and than maybe suppress the print of +# Warning 1292 Truncated incorrect DOUBLE value: 'OFF' +# and so we simply print the value and do not compare. +SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +WHERE VARIABLE_NAME='innodb_log_optimize_ddl'; +SHOW VARIABLES WHERE VARIABLE_NAME='innodb_log_optimize_ddl'; + +#### Show that variants with @@local. and without @@ do not exist. +--Error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT @@local.innodb_log_optimize_ddl; +--echo Expected error 'Variable is a GLOBAL variable' +--Error ER_BAD_FIELD_ERROR +SELECT innodb_log_optimize_ddl; + +#### Restore the initial value +SET GLOBAL innodb_log_optimize_ddl = @innodb_log_optimize_ddl_save; + diff --git a/mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test b/mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test deleted file mode 100644 index da165564791..00000000000 --- a/mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test +++ /dev/null @@ -1,25 +0,0 @@ ---source include/windows.inc ---source include/not_embedded.inc -# -# only global -# ---replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR -select @@global.shared_memory_base_name; ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -select @@session.shared_memory_base_name; ---replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR -show global variables like 'shared_memory_base_name'; ---replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR -show session variables like 'shared_memory_base_name'; ---replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR -select * from information_schema.global_variables where variable_name='shared_memory_base_name'; ---replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR -select * from information_schema.session_variables where variable_name='shared_memory_base_name'; - -# -# show that it's read-only -# ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -set global shared_memory_base_name=1; ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -set session shared_memory_base_name=1; diff --git a/mysql-test/suite/sys_vars/t/shared_memory_basic.test b/mysql-test/suite/sys_vars/t/shared_memory_basic.test deleted file mode 100644 index 57be4ef7ecd..00000000000 --- a/mysql-test/suite/sys_vars/t/shared_memory_basic.test +++ /dev/null @@ -1,20 +0,0 @@ ---source include/windows.inc ---source include/not_embedded.inc -# -# only global -# -select @@global.shared_memory; ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -select @@session.shared_memory; -show global variables like 'shared_memory'; -show session variables like 'shared_memory'; -select * from information_schema.global_variables where variable_name='shared_memory'; -select * from information_schema.session_variables where variable_name='shared_memory'; - -# -# show that it's read-only -# ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -set global shared_memory=1; ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -set session shared_memory=1; diff --git a/mysql-test/suite/sys_vars/t/sql_low_priority_updates_func.test b/mysql-test/suite/sys_vars/t/sql_low_priority_updates_func.test index 7939f3dfda0..b8f6d9551e3 100644 --- a/mysql-test/suite/sys_vars/t/sql_low_priority_updates_func.test +++ b/mysql-test/suite/sys_vars/t/sql_low_priority_updates_func.test @@ -64,7 +64,7 @@ INSERT INTO t1 VALUES('4'); INSERT INTO t1 VALUES('5'); INSERT INTO t1 VALUES('6'); -LOCK TABLE v1 WRITE; +LOCK TABLE v1 WRITE CONCURRENT; connection con1; @@ -130,7 +130,7 @@ INSERT INTO t1 VALUES('4'); INSERT INTO t1 VALUES('5'); INSERT INTO t1 VALUES('6'); -LOCK TABLE v1 WRITE; +LOCK TABLE v1 READ; connection con1; diff --git a/mysql-test/suite/sys_vars/t/thread_pool_size_high.test b/mysql-test/suite/sys_vars/t/thread_pool_size_high.test index 761aeee2b0a..d1e68f026f0 100644 --- a/mysql-test/suite/sys_vars/t/thread_pool_size_high.test +++ b/mysql-test/suite/sys_vars/t/thread_pool_size_high.test @@ -1,6 +1,7 @@ --source include/not_windows.inc --source include/not_embedded.inc --source include/have_pool_of_threads.inc +call mtr.add_suppression("Could not increase number of max_open_files to more than"); SELECT @@global.thread_pool_size; diff --git a/mysql-test/suite/sys_vars/t/wsrep_start_position_basic.test b/mysql-test/suite/sys_vars/t/wsrep_start_position_basic.test index 7f8eb138727..3e57cfa6da2 100644 --- a/mysql-test/suite/sys_vars/t/wsrep_start_position_basic.test +++ b/mysql-test/suite/sys_vars/t/wsrep_start_position_basic.test @@ -19,6 +19,8 @@ SELECT @@global.wsrep_start_position; --echo --echo # valid values +SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:-2'; +SELECT @@global.wsrep_start_position; SET @@global.wsrep_start_position='12345678-1234-1234-1234-123456789012:100'; SELECT @@global.wsrep_start_position; SET @@global.wsrep_start_position=default; @@ -26,10 +28,6 @@ SELECT @@global.wsrep_start_position; --echo --echo # invalid values -call mtr.add_suppression("WSREP: SST position can't be set in past. Requested: -2, Current: -1."); ---error ER_WRONG_VALUE_FOR_VAR -SET @@global.wsrep_start_position='00000000-0000-0000-0000-000000000000:-2'; -SELECT @@global.wsrep_start_position; --error ER_WRONG_VALUE_FOR_VAR SET @@global.wsrep_start_position='000000000000000-0000-0000-0000-000000000000:-1'; --error ER_WRONG_VALUE_FOR_VAR diff --git a/mysql-test/suite/vcol/r/index.result b/mysql-test/suite/vcol/r/index.result index 8860a728bd1..6ab9aa5eb29 100644 --- a/mysql-test/suite/vcol/r/index.result +++ b/mysql-test/suite/vcol/r/index.result @@ -89,3 +89,13 @@ pk left(c, 10) length(c) i 1 bar bar ba 60000 11 drop table t1; disconnect c1; +CREATE TABLE t1 (b BLOB, vb TEXT AS (b) PERSISTENT, KEY(vb(64))) ENGINE=InnoDB; +INSERT INTO t1 (b) VALUES ('foo'); +connect con1,localhost,root,,test; +CREATE TABLE t2 LIKE t1; +connection default; +DELETE FROM t1; +connection con1; +disconnect con1; +connection default; +DROP TABLE t1, t2; diff --git a/mysql-test/suite/vcol/r/races.result b/mysql-test/suite/vcol/r/races.result new file mode 100644 index 00000000000..c46ed5ba2ef --- /dev/null +++ b/mysql-test/suite/vcol/r/races.result @@ -0,0 +1,16 @@ +create table t1 (f text, vf tinytext as (f), key (vf(64))) engine=innodb; +insert t1 (f) values ('foo'); +flush tables; +connect con1,localhost,root,,test; +set debug_sync='TABLE_after_field_clone WAIT_FOR go'; +delete from t1; +connection default; +select * from t1; +f vf +foo foo +set debug_sync='now SIGNAL go'; +connection con1; +disconnect con1; +connection default; +drop table t1; +set debug_sync='reset'; diff --git a/mysql-test/suite/vcol/r/wrong_arena.result b/mysql-test/suite/vcol/r/wrong_arena.result index c105a069b7f..cd36801f601 100644 --- a/mysql-test/suite/vcol/r/wrong_arena.result +++ b/mysql-test/suite/vcol/r/wrong_arena.result @@ -7,9 +7,9 @@ d int as ((a,a) in ((1,1),(2,1),(NULL,1))), # cmp_item_datetime 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' +Warning 1292 Truncated incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '2' +Warning 1292 Truncated incorrect datetime value: '3' show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -20,21 +20,21 @@ t1 CREATE TABLE `t1` ( `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' +Warning 1292 Truncated incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '2' +Warning 1292 Truncated 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' +Warning 1292 Truncated incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '2' +Warning 1292 Truncated incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '1' +Warning 1292 Truncated incorrect datetime value: '2' disconnect con1; connection default; select * from t1; @@ -50,14 +50,14 @@ select * from t1; a b 2010-10-10 10:10:10 0000-00-00 00:00:00 Warnings: -Warning 1292 Incorrect datetime value: '1' +Warning 1292 Truncated 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' +Warning 1292 Truncated incorrect datetime value: '1' drop table t1; create table t1 ( id int not null , diff --git a/mysql-test/suite/vcol/t/index.test b/mysql-test/suite/vcol/t/index.test index 72eed0a8a40..b93c337fab6 100644 --- a/mysql-test/suite/vcol/t/index.test +++ b/mysql-test/suite/vcol/t/index.test @@ -79,3 +79,19 @@ commit; select pk, left(c, 10), length(c), i from t1; drop table t1; disconnect c1; + +# +# MDEV-16961 Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed upon concurrent DELETE and DDL with virtual blob column +# + +CREATE TABLE t1 (b BLOB, vb TEXT AS (b) PERSISTENT, KEY(vb(64))) ENGINE=InnoDB; +INSERT INTO t1 (b) VALUES ('foo'); +--connect (con1,localhost,root,,test) +--send CREATE TABLE t2 LIKE t1 +--connection default +DELETE FROM t1; +--connection con1 +--reap +--disconnect con1 +--connection default +DROP TABLE t1, t2; diff --git a/mysql-test/suite/vcol/t/races.test b/mysql-test/suite/vcol/t/races.test new file mode 100644 index 00000000000..1bf4e43dec9 --- /dev/null +++ b/mysql-test/suite/vcol/t/races.test @@ -0,0 +1,22 @@ +# +# MDEV-17349 Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed on concurrent SELECT and DELETE after RENAME from table with index on virtual column +# +source include/have_innodb.inc; +source include/have_debug_sync.inc; +create table t1 (f text, vf tinytext as (f), key (vf(64))) engine=innodb; +insert t1 (f) values ('foo'); +flush tables; +connect con1,localhost,root,,test; +set debug_sync='TABLE_after_field_clone WAIT_FOR go'; +send delete from t1; +connection default; +let $wait_condition= select state like 'debug sync point%' from information_schema.processlist; +source include/wait_condition.inc; +select * from t1; +set debug_sync='now SIGNAL go'; +connection con1; +reap; +disconnect con1; +connection default; +drop table t1; +set debug_sync='reset'; diff --git a/mysql-test/suite/versioning/innodb.combinations b/mysql-test/suite/versioning/innodb.combinations new file mode 100644 index 00000000000..1a0812cfafe --- /dev/null +++ b/mysql-test/suite/versioning/innodb.combinations @@ -0,0 +1,5 @@ +[timestamp] +default-storage-engine=innodb + +[trx_id] +default-storage-engine=innodb diff --git a/mysql-test/suite/versioning/innodb.inc b/mysql-test/suite/versioning/innodb.inc new file mode 100644 index 00000000000..c841fece702 --- /dev/null +++ b/mysql-test/suite/versioning/innodb.inc @@ -0,0 +1 @@ +--source include/have_innodb.inc diff --git a/mysql-test/suite/versioning/r/alter.result b/mysql-test/suite/versioning/r/alter.result index 6fac910fcb0..7cddc374f5f 100644 --- a/mysql-test/suite/versioning/r/alter.result +++ b/mysql-test/suite/versioning/r/alter.result @@ -372,7 +372,7 @@ a b 1 NULL 2 NULL 3 1 -4 4 +4 2 create or replace table t (a int) with system versioning; insert into t values (1), (2), (3); delete from t where a<3; diff --git a/mysql-test/suite/versioning/r/online.result b/mysql-test/suite/versioning/r/online.result index b2a34481d63..580500544d6 100644 --- a/mysql-test/suite/versioning/r/online.result +++ b/mysql-test/suite/versioning/r/online.result @@ -1,34 +1,128 @@ set system_versioning_alter_history=keep; -create or replace table t (a int, b int) engine=innodb; +create or replace table t (a int); alter table t add system versioning, lock=none; -ERROR 0A000: LOCK=NONE is not supported. Reason: Not implemented for system-versioned tables. Try LOCK=SHARED +ERROR 0A000: LOCK=NONE is not supported. Reason: Not implemented for system-versioned timestamp tables. Try LOCK=SHARED +alter table t add system versioning, algorithm=inplace; +ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Not implemented for system-versioned timestamp tables. Try ALGORITHM=COPY alter table t add system versioning, lock=shared; -alter table t drop column b, lock=none; -ERROR 0A000: LOCK=NONE is not supported. Reason: Not implemented for system-versioned tables. Try LOCK=SHARED -alter table t drop column b, algorithm=inplace; -ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Not implemented for system-versioned tables. Try ALGORITHM=COPY -alter table t add index idx(a), lock=none; +alter table t add column b int, change column a a int without system versioning, lock=none; alter table t drop system versioning, lock=none; -ERROR 0A000: LOCK=NONE is not supported. Reason: Not implemented for system-versioned tables. Try LOCK=SHARED +ERROR 0A000: LOCK=NONE is not supported. Reason: Not implemented for system-versioned operations. Try LOCK=SHARED alter table t drop system versioning, algorithm=inplace; -ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Not implemented for system-versioned tables. Try ALGORITHM=COPY +create or replace table t ( +a int, b int, +row_start SYS_DATATYPE as row start invisible, +row_end SYS_DATATYPE as row end invisible, +period for system_time (row_start, row_end) +) with system versioning; +insert into t values (1, 0); +insert into t values (2, 0); +delete from t where a = 2; +alter table t drop column b, lock=none; +alter table t add index idx(a), lock=none; +select a, check_row(row_start, row_end) from t for system_time all order by a; +a check_row(row_start, row_end) +1 CURRENT ROW +2 HISTORICAL ROW +# MDEV-17038 ALTER TABLE CHANGE COLUMN c1 c1 bigint NOT NULL - +# generates error if table uses SYSTEM VERSIONING [tempesta-tech/mariadb#540] +create or replace table t1 (a int, key(a)) with system versioning; +create or replace table t2 like t; +alter table t2 add foreign key(a) references t1(a); +alter table t2 modify column a int not null, lock=none; +drop table t2; +drop table t1; +# MDEV-16330 Allow instant change of WITH SYSTEM VERSIONING column attribute +create or replace table t1 ( +a int, +b int, +row_start SYS_DATATYPE as row start invisible, +row_end SYS_DATATYPE as row end invisible, +period for system_time(row_start, row_end) +) with system versioning; +create or replace table t2 ( +a int without system versioning, +b int, +row_start SYS_DATATYPE as row start invisible, +row_end SYS_DATATYPE as row end invisible, +period for system_time(row_start, row_end) +) with system versioning; +insert into t1 values (1,1); +insert into t2 values (1,1); +set @@system_versioning_alter_history=keep; +# without rebuild +alter table t1 +change a a int without system versioning, +algorithm=instant; +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +alter table t2 +change a a int with system versioning, +add primary key pk (a), +algorithm=instant; +ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=INPLACE +# with rebuild +alter table t2 +change a a int with system versioning, +add primary key pk (a); +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 +update t1 set a=2; +select count(*) from t1 for system_time all; +count(*) +1 +update t2 set a=2; +select count(*) from t2 for system_time all; +count(*) +2 +drop table t1, t2; +# rollback ALTER TABLE: nothing should change +create or replace table t ( +a int, +b int, +row_start SYS_DATATYPE as row start invisible, +row_end SYS_DATATYPE as row end invisible, +period for system_time(row_start, row_end) +) with system versioning; +insert into t values (1, 1); +select c.prtype from information_schema.innodb_sys_columns as c +join information_schema.innodb_sys_tables as t on c.table_id=t.table_id +where t.name='test/t' and c.name='b'; +prtype +50179 +set @@system_versioning_alter_history=keep; +select c.prtype from information_schema.innodb_sys_columns as c +join information_schema.innodb_sys_tables as t on c.table_id=t.table_id +where t.name='test/t' and c.name='b'; +prtype +50179 +show create table t; +Table Create Table +t CREATE TABLE `t` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL, + `row_start` SYS_DATATYPE GENERATED ALWAYS AS ROW START INVISIBLE, + `row_end` SYS_DATATYPE GENERATED ALWAYS AS ROW END INVISIBLE, + PERIOD FOR SYSTEM_TIME (`row_start`, `row_end`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING +select count(*) from t for system_time all; +count(*) +1 +update t set b=11; +select count(*) from t for system_time all; +count(*) +2 +# Start of 10.4 tests create or replace table t (a int, b int) engine=innodb; alter table t add s bigint unsigned as row start, add e bigint unsigned as row end, add period for system_time(s, e), -add system versioning, -lock=none; -ERROR 0A000: LOCK=NONE is not supported. Reason: Not implemented for system-versioned tables. Try LOCK=SHARED -alter table t -add s bigint unsigned as row start, -add e bigint unsigned as row end, -add period for system_time(s, e), add system versioning; -alter table t drop column b, lock=none; -ERROR 0A000: LOCK=NONE is not supported. Reason: Not implemented for system-versioned tables. Try LOCK=SHARED +alter table t drop column b, algorithm=instant; alter table t add index idx(a), lock=none; alter table t drop column s, drop column e; alter table t drop system versioning, lock=none; -ERROR 0A000: LOCK=NONE is not supported. Reason: Not implemented for system-versioned tables. Try LOCK=SHARED -drop table t; +ERROR 0A000: LOCK=NONE is not supported. Reason: Not implemented for system-versioned operations. Try LOCK=SHARED +drop database test; +create database test; diff --git a/mysql-test/suite/versioning/r/partition.result b/mysql-test/suite/versioning/r/partition.result index 75efe62b5c6..f5106e03a14 100644 --- a/mysql-test/suite/versioning/r/partition.result +++ b/mysql-test/suite/versioning/r/partition.result @@ -435,7 +435,7 @@ partition_name partition_ordinal_position partition_method timediff(partition_de p0 1 SYSTEM_TIME 00:00:00.000000 pn 2 SYSTEM_TIME NULL Warnings: -Warning 1292 Truncated incorrect time value: 'CURRENT' +Warning 1292 Incorrect time value: 'CURRENT' alter table t1 add partition (partition p1 history, partition p2 history); select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1'; partition_name partition_ordinal_position partition_method timediff(partition_description, @ts) @@ -444,7 +444,7 @@ p1 2 SYSTEM_TIME 01:00:00.000000 p2 3 SYSTEM_TIME 02:00:00.000000 pn 4 SYSTEM_TIME NULL Warnings: -Warning 1292 Truncated incorrect time value: 'CURRENT' +Warning 1292 Incorrect time value: 'CURRENT' alter table t1 drop partition p0; select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1'; partition_name partition_ordinal_position partition_method timediff(partition_description, @ts) @@ -452,7 +452,7 @@ p1 1 SYSTEM_TIME 01:00:00.000000 p2 2 SYSTEM_TIME 02:00:00.000000 pn 3 SYSTEM_TIME NULL Warnings: -Warning 1292 Truncated incorrect time value: 'CURRENT' +Warning 1292 Incorrect time value: 'CURRENT' alter table t1 drop partition p2; ERROR HY000: Can only drop oldest partitions when rotating by INTERVAL select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1'; @@ -461,7 +461,7 @@ p1 1 SYSTEM_TIME 01:00:00.000000 p2 2 SYSTEM_TIME 02:00:00.000000 pn 3 SYSTEM_TIME NULL Warnings: -Warning 1292 Truncated incorrect time value: 'CURRENT' +Warning 1292 Incorrect time value: 'CURRENT' # # MDEV-15103 Assertion in ha_partition::part_records() for updating VIEW # diff --git a/mysql-test/suite/versioning/r/truncate.result b/mysql-test/suite/versioning/r/truncate.result index 308501915dc..d38b9eed162 100644 --- a/mysql-test/suite/versioning/r/truncate.result +++ b/mysql-test/suite/versioning/r/truncate.result @@ -100,5 +100,11 @@ ERROR 42S02: 'v' is a view unlock tables; drop view v; drop table t; +create table t1 (i int) with system versioning; +create procedure pr() delete history from t1 before system_time now(); +call pr; +call pr; +drop procedure pr; +drop table t1; drop database test; create database test; diff --git a/mysql-test/suite/versioning/r/trx_id.result b/mysql-test/suite/versioning/r/trx_id.result index 483d5e607d0..f8339c0a4b8 100644 --- a/mysql-test/suite/versioning/r/trx_id.result +++ b/mysql-test/suite/versioning/r/trx_id.result @@ -491,3 +491,6 @@ COUNT(*) 1 DROP TABLE t; SET @@SYSTEM_VERSIONING_ALTER_HISTORY=ERROR; +SELECT count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp; +count(*) +0 diff --git a/mysql-test/suite/versioning/r/trx_id_versioning_attribute_persistence.result b/mysql-test/suite/versioning/r/trx_id_versioning_attribute_persistence.result deleted file mode 100644 index bf555fb2a7d..00000000000 --- a/mysql-test/suite/versioning/r/trx_id_versioning_attribute_persistence.result +++ /dev/null @@ -1,86 +0,0 @@ -CREATE OR REPLACE TABLE t1 ( -a INT, -b INT, -row_start BIGINT UNSIGNED AS ROW START INVISIBLE, -row_end BIGINT UNSIGNED AS ROW END INVISIBLE, -PERIOD FOR SYSTEM_TIME(row_start, row_end) -) WITH SYSTEM VERSIONING ENGINE=INNODB; -CREATE OR REPLACE TABLE t2 ( -a INT WITHOUT SYSTEM VERSIONING, -b INT, -row_start BIGINT UNSIGNED AS ROW START INVISIBLE, -row_end BIGINT UNSIGNED AS ROW END INVISIBLE, -PERIOD FOR SYSTEM_TIME(row_start, row_end) -) WITH SYSTEM VERSIONING ENGINE=INNODB; -INSERT INTO t1 VALUES (1,1); -INSERT INTO t2 VALUES (1,1); -SET @@SYSTEM_VERSIONING_ALTER_HISTORY=KEEP; -# without rebuild -ALTER TABLE t1 -CHANGE a a INT WITHOUT SYSTEM VERSIONING, -ALGORITHM=INSTANT; -affected rows: 0 -info: Records: 0 Duplicates: 0 Warnings: 0 -ALTER TABLE t2 -CHANGE a a INT WITH SYSTEM VERSIONING, -ADD PRIMARY KEY pk (a), -ALGORITHM=INSTANT; -ERROR 0A000: ALGORITHM=INSTANT is not supported for this operation. Try ALGORITHM=INPLACE -# with rebuild -ALTER TABLE t2 -CHANGE a a INT WITH SYSTEM VERSIONING, -ADD PRIMARY KEY pk (a); -affected rows: 0 -info: Records: 0 Duplicates: 0 Warnings: 0 -UPDATE t1 SET a=2; -SELECT COUNT(*) FROM t1 FOR SYSTEM_TIME ALL; -COUNT(*) -1 -UPDATE t2 SET a=2; -SELECT COUNT(*) FROM t2 FOR SYSTEM_TIME ALL; -COUNT(*) -2 -DROP TABLE t1, t2; -# rollback ALTER TABLE: nothing should change -CREATE TABLE t ( -a INT, -b INT, -row_start BIGINT UNSIGNED AS ROW START INVISIBLE, -row_end BIGINT UNSIGNED AS ROW END INVISIBLE, -PERIOD FOR SYSTEM_TIME(row_start, row_end) -) WITH SYSTEM VERSIONING ENGINE=INNODB; -INSERT INTO t VALUES (1, 1); -SELECT C.PRTYPE FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS AS C -JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES AS t ON C.TABLE_ID=t.TABLE_ID -WHERE t.NAME='test/t' AND C.NAME='b'; -PRTYPE -50179 -SET @@SYSTEM_VERSIONING_ALTER_HISTORY=KEEP; -SET @SAVED_DEBUG_DBUG = @@SESSION.DEBUG_DBUG; -SET DEBUG_DBUG='+d,ib_commit_inplace_fail_1'; -ALTER TABLE t -CHANGE b b INT WITHOUT SYSTEM VERSIONING; -ERROR HY000: Internal error: Injected error! -SET DEBUG_DBUG = @SAVED_DEBUG_DBUG; -SELECT C.PRTYPE FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS AS C -JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES AS t ON C.TABLE_ID=t.TABLE_ID -WHERE t.NAME='test/t' AND C.NAME='b'; -PRTYPE -50179 -SHOW CREATE TABLE t; -Table Create Table -t CREATE TABLE `t` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL, - `row_start` bigint(20) unsigned GENERATED ALWAYS AS ROW START INVISIBLE, - `row_end` bigint(20) unsigned GENERATED ALWAYS AS ROW END INVISIBLE, - PERIOD FOR SYSTEM_TIME (`row_start`, `row_end`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING -SELECT COUNT(*) FROM t FOR SYSTEM_TIME ALL; -COUNT(*) -1 -UPDATE t SET b=11; -SELECT COUNT(*) FROM t FOR SYSTEM_TIME ALL; -COUNT(*) -2 -DROP TABLE t; diff --git a/mysql-test/suite/versioning/t/online.test b/mysql-test/suite/versioning/t/online.test index 4fbd5d85100..9de4937d8da 100644 --- a/mysql-test/suite/versioning/t/online.test +++ b/mysql-test/suite/versioning/t/online.test @@ -1,42 +1,152 @@ ---source include/have_innodb.inc +--source suite/versioning/innodb.inc +--source suite/versioning/common.inc +--source include/maybe_debug.inc set system_versioning_alter_history=keep; -create or replace table t (a int, b int) engine=innodb; - +create or replace table t (a int); --error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON alter table t add system versioning, lock=none; -alter table t add system versioning, lock=shared; --error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON -alter table t drop column b, lock=none; ---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON -alter table t drop column b, algorithm=inplace; -alter table t add index idx(a), lock=none; +alter table t add system versioning, algorithm=inplace; +alter table t add system versioning, lock=shared; + +alter table t add column b int, change column a a int without system versioning, lock=none; --error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON alter table t drop system versioning, lock=none; ---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON alter table t drop system versioning, algorithm=inplace; +--replace_result $sys_datatype_expl SYS_DATATYPE +eval create or replace table t ( + a int, b int, + row_start $sys_datatype_expl as row start invisible, + row_end $sys_datatype_expl as row end invisible, + period for system_time (row_start, row_end) +) with system versioning; +insert into t values (1, 0); +insert into t values (2, 0); +delete from t where a = 2; +alter table t drop column b, lock=none; +alter table t add index idx(a), lock=none; -create or replace table t (a int, b int) engine=innodb; +select a, check_row(row_start, row_end) from t for system_time all order by a; ---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON +--echo # MDEV-17038 ALTER TABLE CHANGE COLUMN c1 c1 bigint NOT NULL - +--echo # generates error if table uses SYSTEM VERSIONING [tempesta-tech/mariadb#540] +create or replace table t1 (a int, key(a)) with system versioning; +create or replace table t2 like t; +alter table t2 add foreign key(a) references t1(a); +alter table t2 modify column a int not null, lock=none; + +drop table t2; +drop table t1; + +--echo # MDEV-16330 Allow instant change of WITH SYSTEM VERSIONING column attribute +--replace_result $sys_datatype_expl SYS_DATATYPE +eval create or replace table t1 ( + a int, + b int, + row_start $sys_datatype_expl as row start invisible, + row_end $sys_datatype_expl as row end invisible, + period for system_time(row_start, row_end) +) with system versioning; + +--replace_result $sys_datatype_expl SYS_DATATYPE +eval create or replace table t2 ( + a int without system versioning, + b int, + row_start $sys_datatype_expl as row start invisible, + row_end $sys_datatype_expl as row end invisible, + period for system_time(row_start, row_end) +) with system versioning; + +insert into t1 values (1,1); +insert into t2 values (1,1); + +set @@system_versioning_alter_history=keep; + +--enable_info +--echo # without rebuild +alter table t1 + change a a int without system versioning, + algorithm=instant; + +--error ER_ALTER_OPERATION_NOT_SUPPORTED +alter table t2 + change a a int with system versioning, + add primary key pk (a), + algorithm=instant; + +--echo # with rebuild +alter table t2 + change a a int with system versioning, + add primary key pk (a); +--disable_info + +--source include/restart_mysqld.inc + +update t1 set a=2; +select count(*) from t1 for system_time all; + +update t2 set a=2; +select count(*) from t2 for system_time all; + +drop table t1, t2; + +--echo # rollback ALTER TABLE: nothing should change +--replace_result $sys_datatype_expl SYS_DATATYPE +eval create or replace table t ( + a int, + b int, + row_start $sys_datatype_expl as row start invisible, + row_end $sys_datatype_expl as row end invisible, + period for system_time(row_start, row_end) +) with system versioning; + +insert into t values (1, 1); + +select c.prtype from information_schema.innodb_sys_columns as c + join information_schema.innodb_sys_tables as t on c.table_id=t.table_id + where t.name='test/t' and c.name='b'; + +set @@system_versioning_alter_history=keep; + +if ($have_debug) { +--disable_query_log +--disable_result_log +set debug_dbug='+d,ib_commit_inplace_fail_1'; +--error ER_INTERNAL_ERROR alter table t - add s bigint unsigned as row start, - add e bigint unsigned as row end, - add period for system_time(s, e), - add system versioning, - lock=none; + change b b int without system versioning; +set debug_dbug= default; +--enable_query_log +--enable_result_log +} + +select c.prtype from information_schema.innodb_sys_columns as c + join information_schema.innodb_sys_tables as t on c.table_id=t.table_id + where t.name='test/t' and c.name='b'; + +--replace_result $sys_datatype_expl SYS_DATATYPE +show create table t; + +select count(*) from t for system_time all; +update t set b=11; +select count(*) from t for system_time all; + +--echo # Start of 10.4 tests + +create or replace table t (a int, b int) engine=innodb; alter table t add s bigint unsigned as row start, add e bigint unsigned as row end, add period for system_time(s, e), add system versioning; ---error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON -alter table t drop column b, lock=none; +alter table t drop column b, algorithm=instant; alter table t add index idx(a), lock=none; alter table t drop column s, drop column e; --error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON alter table t drop system versioning, lock=none; -drop table t; +drop database test; +create database test; diff --git a/mysql-test/suite/versioning/t/truncate.test b/mysql-test/suite/versioning/t/truncate.test index 4e039a76567..1727c7787ef 100644 --- a/mysql-test/suite/versioning/t/truncate.test +++ b/mysql-test/suite/versioning/t/truncate.test @@ -107,5 +107,15 @@ unlock tables; drop view v; drop table t; +# +# MDEV-16783 Assertion `!conds' failed in mysql_delete upon 2nd execution of SP with DELETE HISTORY +# +create table t1 (i int) with system versioning; +create procedure pr() delete history from t1 before system_time now(); +call pr; +call pr; +drop procedure pr; +drop table t1; + drop database test; create database test; diff --git a/mysql-test/suite/versioning/t/trx_id.test b/mysql-test/suite/versioning/t/trx_id.test index 35ba6595440..885455a6977 100644 --- a/mysql-test/suite/versioning/t/trx_id.test +++ b/mysql-test/suite/versioning/t/trx_id.test @@ -492,3 +492,5 @@ SELECT COUNT(*) FROM t FOR SYSTEM_TIME ALL; DROP TABLE t; SET @@SYSTEM_VERSIONING_ALTER_HISTORY=ERROR; + +SELECT count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp; diff --git a/mysql-test/suite/versioning/t/trx_id_versioning_attribute_persistence.test b/mysql-test/suite/versioning/t/trx_id_versioning_attribute_persistence.test deleted file mode 100644 index 4e92ee247e4..00000000000 --- a/mysql-test/suite/versioning/t/trx_id_versioning_attribute_persistence.test +++ /dev/null @@ -1,87 +0,0 @@ --- source include/have_innodb.inc --- source include/have_debug.inc - -CREATE OR REPLACE TABLE t1 ( - a INT, - b INT, - row_start BIGINT UNSIGNED AS ROW START INVISIBLE, - row_end BIGINT UNSIGNED AS ROW END INVISIBLE, - PERIOD FOR SYSTEM_TIME(row_start, row_end) -) WITH SYSTEM VERSIONING ENGINE=INNODB; - -CREATE OR REPLACE TABLE t2 ( - a INT WITHOUT SYSTEM VERSIONING, - b INT, - row_start BIGINT UNSIGNED AS ROW START INVISIBLE, - row_end BIGINT UNSIGNED AS ROW END INVISIBLE, - PERIOD FOR SYSTEM_TIME(row_start, row_end) -) WITH SYSTEM VERSIONING ENGINE=INNODB; - -INSERT INTO t1 VALUES (1,1); -INSERT INTO t2 VALUES (1,1); - -SET @@SYSTEM_VERSIONING_ALTER_HISTORY=KEEP; - ---enable_info ---echo # without rebuild -ALTER TABLE t1 - CHANGE a a INT WITHOUT SYSTEM VERSIONING, - ALGORITHM=INSTANT; - ---error ER_ALTER_OPERATION_NOT_SUPPORTED -ALTER TABLE t2 - CHANGE a a INT WITH SYSTEM VERSIONING, - ADD PRIMARY KEY pk (a), - ALGORITHM=INSTANT; - ---echo # with rebuild -ALTER TABLE t2 - CHANGE a a INT WITH SYSTEM VERSIONING, - ADD PRIMARY KEY pk (a); ---disable_info - ---source include/restart_mysqld.inc - -UPDATE t1 SET a=2; -SELECT COUNT(*) FROM t1 FOR SYSTEM_TIME ALL; - -UPDATE t2 SET a=2; -SELECT COUNT(*) FROM t2 FOR SYSTEM_TIME ALL; - -DROP TABLE t1, t2; - ---echo # rollback ALTER TABLE: nothing should change -CREATE TABLE t ( - a INT, - b INT, - row_start BIGINT UNSIGNED AS ROW START INVISIBLE, - row_end BIGINT UNSIGNED AS ROW END INVISIBLE, - PERIOD FOR SYSTEM_TIME(row_start, row_end) -) WITH SYSTEM VERSIONING ENGINE=INNODB; - -INSERT INTO t VALUES (1, 1); - -SELECT C.PRTYPE FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS AS C - JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES AS t ON C.TABLE_ID=t.TABLE_ID - WHERE t.NAME='test/t' AND C.NAME='b'; - -SET @@SYSTEM_VERSIONING_ALTER_HISTORY=KEEP; - -SET @SAVED_DEBUG_DBUG = @@SESSION.DEBUG_DBUG; -SET DEBUG_DBUG='+d,ib_commit_inplace_fail_1'; ---error ER_INTERNAL_ERROR -ALTER TABLE t - CHANGE b b INT WITHOUT SYSTEM VERSIONING; -SET DEBUG_DBUG = @SAVED_DEBUG_DBUG; - -SELECT C.PRTYPE FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS AS C - JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES AS t ON C.TABLE_ID=t.TABLE_ID - WHERE t.NAME='test/t' AND C.NAME='b'; - -SHOW CREATE TABLE t; - -SELECT COUNT(*) FROM t FOR SYSTEM_TIME ALL; -UPDATE t SET b=11; -SELECT COUNT(*) FROM t FOR SYSTEM_TIME ALL; - -DROP TABLE t; diff --git a/mysql-test/suite/wsrep/include/check_galera_version.inc b/mysql-test/suite/wsrep/include/check_galera_version.inc index e495da8f1ee..32d01197f94 100644 --- a/mysql-test/suite/wsrep/include/check_galera_version.inc +++ b/mysql-test/suite/wsrep/include/check_galera_version.inc @@ -17,23 +17,27 @@ eval SET @GALERA_VERSION='$galera_version'; SELECT CAST(REGEXP_REPLACE(@GALERA_VERSION,'^(\\d+)\\.(\\d+).*','\\1') AS UNSIGNED) INTO @GALERA_MAJOR_VERSION; SELECT CAST(REGEXP_REPLACE(@GALERA_VERSION,'^(\\d+)\\.(\\d+).*','\\2') AS UNSIGNED) INTO @GALERA_MINOR_VERSION; +SELECT CAST(REGEXP_REPLACE(@GALERA_VERSION,'^(\\d+)\\.(\\d+)\\.(\\d+).*','\\3') AS UNSIGNED) INTO @GALERA_RELEASE_VERSION; # Actual SELECT VARIABLE_VALUE INTO @ACTUAL_GALERA_VERSION FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME LIKE 'wsrep_provider_version'; - -SELECT CAST(REGEXP_REPLACE(@ACTUAL_GALERA_VERSION,'^(\\d+)\\.(\\d+).*','\\1') AS UNSIGNED) INTO @ACTUAL_GALERA_MAJOR_VERSION; -SELECT CAST(REGEXP_REPLACE(@ACTUAL_GALERA_VERSION,'^(\\d+)\\.(\\d+).*','\\2') AS UNSIGNED) INTO @ACTUAL_GALERA_MINOR_VERSION; +SELECT CAST(REGEXP_REPLACE(@ACTUAL_GALERA_VERSION,'^[\\d\\.]*(\\d+)\\.\\d+.*','\\1') AS UNSIGNED) INTO @ACTUAL_GALERA_MINOR_VERSION; +SELECT CAST(REGEXP_REPLACE(@ACTUAL_GALERA_VERSION,'^[\\d\\.]*\\.(\\d+).*','\\1') AS UNSIGNED) INTO @ACTUAL_GALERA_RELEASE_VERSION; # For testing -#SELECT @GALERA_MAJOR_VERSION, @GALERA_MINOR_VERSION; +#SELECT @GALERA_MAJOR_VERSION; +#SELECT @GALERA_MINOR_VERSION; +#SELECT @GALERA_RELEASE_VERSION; #SELECT @ACTUAL_GALERA_VERSION; -#SELECT @ACTUAL_GALERA_MAJOR_VERSION, @ACTUAL_GALERA_MINOR_VERSION; +#SELECT @ACTUAL_GALERA_MINOR_VERSION; +#SELECT @ACTUAL_GALERA_RELEASE_VERSION; -if (!`SELECT (@ACTUAL_GALERA_MAJOR_VERSION > @GALERA_MAJOR_VERSION) OR - (@ACTUAL_GALERA_MAJOR_VERSION = @GALERA_MAJOR_VERSION AND @ACTUAL_GALERA_MINOR_VERSION >= @GALERA_MINOR_VERSION) +if (!`SELECT (@ACTUAL_GALERA_MINOR_VERSION > @GALERA_MINOR_VERSION) OR + (@ACTUAL_GALERA_MINOR_VERSION = @GALERA_MINOR_VERSION AND + @ACTUAL_GALERA_RELEASE_VERSION >= @GALERA_RELEASE_VERSION) `) { - skip Test requires Galera library version $galera_version; + skip Test requires Galera library version >= $galera_version; } --enable_query_log diff --git a/mysql-test/suite/wsrep/r/variables.result b/mysql-test/suite/wsrep/r/variables.result index b6f22828532..cb371b33bfd 100644 --- a/mysql-test/suite/wsrep/r/variables.result +++ b/mysql-test/suite/wsrep/r/variables.result @@ -59,6 +59,8 @@ wsrep_local_send_queue_min # wsrep_local_state # wsrep_local_state_comment # wsrep_local_state_uuid # +wsrep_open_connections # +wsrep_open_transactions # wsrep_protocol_version # wsrep_provider_name # wsrep_provider_vendor # @@ -114,6 +116,8 @@ wsrep_local_send_queue_min # wsrep_local_state # wsrep_local_state_comment # wsrep_local_state_uuid # +wsrep_open_connections # +wsrep_open_transactions # wsrep_protocol_version # wsrep_provider_name # wsrep_provider_vendor # diff --git a/mysql-test/suite/wsrep/t/variables.test b/mysql-test/suite/wsrep/t/variables.test index 1315f090d5c..f74b26167b2 100644 --- a/mysql-test/suite/wsrep/t/variables.test +++ b/mysql-test/suite/wsrep/t/variables.test @@ -29,7 +29,7 @@ CALL mtr.add_suppression("WSREP: Could not open saved state file for reading.*") --disable_query_log eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER'; ---let $galera_version=25.3.17 +--let $galera_version=25.3.24 source include/check_galera_version.inc; --enable_query_log @@ -101,8 +101,10 @@ SHOW STATUS LIKE 'wsrep_thread_count'; --echo # Setting wsrep_cluster_address triggers the creation of --echo # applier/rollbacker threads. SET GLOBAL wsrep_cluster_address= 'gcomm://'; + --echo # Wait for applier threads to get created. -sleep 3; +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count'; +--source include/wait_condition.inc --replace_regex /.*libgalera_smm.*/libgalera_smm.so/ SELECT @@global.wsrep_provider; @@ -113,8 +115,11 @@ SHOW STATUS LIKE 'wsrep_thread_count'; SET @wsrep_slave_threads_saved= @@global.wsrep_slave_threads; SET GLOBAL wsrep_slave_threads= 10; + --echo # Wait for applier threads to get created. -sleep 3; +--let $wait_condition = SELECT VARIABLE_VALUE = 11 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count'; +--source include/wait_condition.inc + SHOW STATUS LIKE 'threads_connected'; SHOW STATUS LIKE 'wsrep_thread_count'; diff --git a/mysql-test/unstable-tests b/mysql-test/unstable-tests index d97792355b4..045e220ac55 100644 --- a/mysql-test/unstable-tests +++ b/mysql-test/unstable-tests @@ -23,7 +23,7 @@ # ############################################################################## -# Based on bb-10.3-release 36e59752e7fc70bc5179a3d730b5ce3ee58e4e30 +# Based on 10.3 9556d56da2a87b47f545ce4c9cbd09f7778ad527 #----------------------------------------------------------------------- @@ -32,21 +32,28 @@ archive.archive_symlink : MDEV-12170 archive.discover : MDEV-10510 - Table is marked as crashed archive.mysqlhotcopy_archive : MDEV-10995 - Hang on debug +archive-test_sql_discovery.discover : MDEV-16817 - Table marked as crashed + #----------------------------------------------------------------------- binlog.binlog_commit_wait : MDEV-10150 - Mismatch binlog.binlog_flush_binlogs_delete_domain : MDEV-14431 - Wrong exit code +binlog.binlog_incident : Modified in 10.1.36 binlog.binlog_killed : MDEV-12925 - Wrong result binlog.binlog_xa_recover : MDEV-8517 - Extra checkpoint +binlog.load_data_stm_view : MDEV-16948 - Wrong result +binlog_tmp_table_row : Added in 10.3.9 #----------------------------------------------------------------------- +binlog_encryption.binlog_incident : Modified in 10.1.36 binlog_encryption.binlog_xa_recover : MDEV-12908 - Extra checkpoint -binlog_encryption.encrypted_master : MDEV-14201 - Extra warnings; modified in 10.3.8 +binlog_encryption.encrypted_master : MDEV-14201 - Extra warnings binlog_encryption.encrypted_master_switch_to_unencrypted : MDEV-14190 - Can't init tc log -binlog_encryption.encrypted_slave : Modified in 10.3.8 binlog_encryption.encryption_combo : MDEV-14199 - Table is marked as crashed binlog_encryption.rpl_binlog_errors : MDEV-12742 - Crash +binlog_encryption.rpl_checksum : MDEV-16951 - Wrong result +binlog_encryption.rpl_gtid_basic : MDEV-16947 - Server failed to start binlog_encryption.rpl_loadfile : MDEV-16645 - Timeout in include binlog_encryption.rpl_parallel : MDEV-10653 - Timeout in include binlog_encryption.rpl_relayrotate : MDEV-15194 - Timeout @@ -55,22 +62,18 @@ binlog_encryption.rpl_skip_replication : MDEV-13571 binlog_encryption.rpl_ssl : MDEV-14507 - Timeouts binlog_encryption.rpl_stm_relay_ign_space : MDEV-13278 - Wrong result (test assertion) binlog_encryption.rpl_sync : MDEV-13830 - Assertion failure +binlog_encryption.rpl_typeconv : MDEV-14362 - Lost connection to MySQL server during query #----------------------------------------------------------------------- -compat/oracle.column_compression : Added in 10.3.7 -compat/oracle.func_concat : Modified in 10.3.7 -compat/oracle.gis : Added in 10.3.7 -compat/oracle.parser : Modified in 10.3.8 -compat/oracle.sp-cursor-rowtype : Modified in 10.3.8 -compat/oracle.table_value_constr : Added in 10.3.7 -compat/oracle.versioning : Added in 10.3.7 -compat/oracle.win : Added in 10.3.7 +compat/oracle.events : Added in 10.3.9 +compat/oracle.table_value_constr : Modified in 10.3.10 #----------------------------------------------------------------------- connect.pivot : MDEV-14803 - Failed to discover table connect.vcol : MDEV-12374 - Fails on Windows +connect.xml2 : Modified in 10.3.10 connect.zip : MDEV-13884 - Wrong result #----------------------------------------------------------------------- @@ -79,15 +82,17 @@ encryption.create_or_replace : MDEV-12694 encryption.debug_key_management : MDEV-13841 - Timeout encryption.encrypt_and_grep : MDEV-13765 - Wrong result encryption.innochecksum : MDEV-13644 - Assertion failure -encryption.innodb-checksum-algorithm : MDEV-12898 - Deadlock of threads +encryption.innodb-checksum-algorithm : MDEV-12898 - Deadlock of threads; MDEV-16896 - Server crash encryption.innodb-compressed-blob : MDEV-14728 - Unable to get certificate -encryption.innodb-discard-import : Modified in 10.3.8 encryption.innodb-encryption-alter : MDEV-13566 - Lock wait timeout +encryption.innodb_encryption_tables : MDEV-17339 - Crash on restart encryption.innodb-first-page-read : MDEV-14356 - Timeout in wait condition +encryption.innodb-force-corrupt : MDEV-17286 - SSL error +encryption.innodb-missing-key : MDEV-14728 - SSL error encryption.innodb-page_encryption : MDEV-10641 - mutex problem +encryption.innodb-page_encryption_log_encryption : MDEV-17339 - Crash on restart encryption.innodb-read-only : MDEV-16563 - Crash on startup encryption.innodb-redo-badkey : MDEV-13893 - Page cannot be decrypted -encryption.innodb-redo-nokeys : Modified in 10.3.8 encryption.innodb-remove-encryption : MDEV-16493 - Timeout in wait condition encryption.innodb-spatial-index : MDEV-13746 - Wrong result encryption.innodb_encrypt_log : MDEV-13725 - Wrong result @@ -97,6 +102,8 @@ encryption.innodb_encryption_discard_import : MDEV-16116 encryption.innodb_encryption_filekeys : MDEV-15673 - Timeout encryption.innodb_encryption_row_compressed : MDEV-16113 - Crash encryption.innodb_first_page : MDEV-10689 - Crash +encryption.innodb_lotoftables : MDEV-16111 - Wrong result +encryption.innodb_onlinealter_encryption : MDEV-17287 - SIGABRT on server restart encryption.innodb_scrub : MDEV-8139 - scrubbing tests need fixing encryption.innodb_scrub_background : MDEV-8139 - scrubbing tests need fixing encryption.innodb_scrub_compressed : MDEV-8139 - scrubbing tests need fixing @@ -109,18 +116,16 @@ engines/rr_trx.* : MDEV-10998 #----------------------------------------------------------------------- -federated.assisted_discovery : Modified in 10.3.7 federated.federated_bug_35333 : MDEV-13410 - Wrong result federated.federated_bug_585688 : MDEV-14805 - Server crash, MDEV-12907 - Valgrind federated.federated_innodb : MDEV-10617 - Wrong checksum federated.federated_partition : MDEV-10417 - Fails on Mips federated.federated_transactions : MDEV-10617 - Wrong checksum federated.federatedx : MDEV-10617 - Wrong checksum -federated.federatedx_versioning : Added in 10.3.7 -federated.timestamps : Added in 10.3.7 #----------------------------------------------------------------------- +funcs_1.is_check_constraints : Added in 10.3.10 funcs_1.memory_views : MDEV-11773 - timeout funcs_1.processlist_val_no_prot : MDEV-11223 - Wrong result funcs_1.processlist_val_ps : MDEV-12175 - Wrong plan @@ -134,134 +139,130 @@ funcs_2/charset.* : MDEV-10999 #----------------------------------------------------------------------- galera.* : Suite is not stable yet - -galera.MW-328A : MDEV-13876 - Wrong result -galera.galera_applier_ftwrl_table_alter : MDEV-13738 - MySQL server has gone away -galera.galera_gcs_fc_limit : MDEV-13877 - Timeout -galera.galera_suspend_slave : MDEV-13873 - Wrong error code -galera.galera_toi_truncate : MDEV-13743 - query 'reap' succeeded -galera.galera_unicode_identifiers : MDEV-13871 - Unknown database -galera.galera_var_node_address : MDEV-13880 - Failed to start mysqld -galera.galera_wan : MDEV-13879 - Stray state UUID msg warnings -galera.galera_wsrep_log_conficts : MDEV-13874 - check-testcase failed -galera.partition : MDEV-13881 - Wrong result -galera.query_cache : MDEV-13883 - Wrong result - -#----------------------------------------------------------------------- - galera_3nodes.* : Suite is not stable yet #----------------------------------------------------------------------- -gcol.innodb_virtual_debug : MDEV-14134 - Crash, assertion failure; modified in 10.3.8 -gcol.innodb_virtual_index : Modified in 10.3.7 - -#----------------------------------------------------------------------- - -handler.heap : Modified in 10.3.7 -handler.innodb : Modified in 10.3.7 -handler.interface : Modified in 10.3.7 -handler.ps : Added in 10.3.8 - -#----------------------------------------------------------------------- - -heap.heap_auto_increment : MDEV-16652 - Out of range, modified in 10.3.8 +gcol.gcol_rollback : MDEV-16954 - Unknown storage engine 'InnoDB' +gcol.gcol_update : Include file modified in 10.3.9 +gcol.innodb_virtual_basic : MDEV-16950 - Failing assertion +gcol.innodb_virtual_debug : MDEV-14134 - Crash, assertion failure +gcol.innodb_virtual_debug_purge : MDEV-16952 - Wrong result; modified in 10.3.10 +gcol.innodb_virtual_index : Include file modified in 10.3.9 +gcol.innodb_virtual_purge : Include file modified in 10.3.9 #----------------------------------------------------------------------- innodb.101_compatibility : MDEV-13891 - Wrong result +innodb.alter_algorithm : Modified in 10.3.10 innodb.alter_copy : MDEV-16181 - Assertion failure -innodb.alter_foreign_crash : Added in 10.3.7 -innodb.alter_kill : MDEV-16273 - Unknown storage engine 'InnoDB'; added in 10.3.7 -innodb.alter_non_null : Added in 10.3.8 -innodb.alter_non_null_debug : Added in 10.3.8 -innodb.alter_not_null : Modified in 10.3.8 -innodb.alter_partitioned : Added in 10.3.7 -innodb.alter_rename_files : Added in 10.3.7 -innodb.alter_sql_mode : Combinations added in 10.3.8 -innodb.analyze_table : Added in 10.3.7 +innodb.alter_crash : MDEV-16944 - The process cannot access the file +innodb.alter_kill : MDEV-16273 - Unknown storage engine 'InnoDB', MDEV-16946 - Wrong result +innodb.alter_not_null : Modified in 10.3.9 +innodb.alter_not_null_debug : Added in 10.3.9 innodb.autoinc_persist : MDEV-15282 - Assertion failure innodb.binlog_consistent : MDEV-10618 - Server fails to start +innodb.dml_purge : Include file modified in 10.3.9 innodb.doublewrite : MDEV-12905 - Server crash +innodb.foreign_key : Modified in 10.3.10 +innodb.foreign-keys : Modified in 10.3.10 innodb.group_commit_crash : MDEV-14191 - InnoDB registration failed innodb.group_commit_crash_no_optimize_thread : MDEV-13830 - Assertion failure +innodb.index_merge_threshold : Include files modified in 10.3.9 +innodb.innodb-16k : Modified in 10.3.9 +innodb.innodb-32k-crash : MDEV-16953 - Corrupt log record found innodb.innodb-64k-crash : MDEV-13872 - Failure and crash on startup innodb.innodb-alter-debug : MDEV-13182 - InnoDB: adjusting FSP_SPACE_FLAGS innodb.innodb-alter-table : MDEV-10619 - Testcase timeout innodb.innodb-alter-tempfile : MDEV-15285 - Table already exists -innodb.innodb-alter-timestamp : Modified in 10.3.8 -innodb.innodb-autoinc : Modified in 10.3.8 -innodb.innodb-blob : Modified in 10.3.8 +innodb.innodb-blob : MDEV-12053 - Client crash +innodb.innodb-corrupted-table : Modified in 10.3.9 innodb.innodb-fk : MDEV-13832 - Assertion failure on shutdown innodb.innodb-get-fk : MDEV-13276 - Server crash innodb.innodb-index-online : MDEV-14809 - Cannot save statistics -innodb.innodb-mdev7046 : Modified in 10.3.8 -innodb.innodb-online-alter-gis : Modified in 10.3.7 -innodb.innodb-page_compression_default : MDEV-13644 - Assertion failure; modified in 10.3.8 -innodb.innodb-page_compression_lzma : MDEV-14353 - Wrong result -innodb.innodb-page_compression_snappy : /MDEV-13644 - Assertion failure; modified in 10.3.8 -innodb.innodb-page_compression_zip : MDEV-10641 - mutex problem -innodb.innodb-table-online : MDEV-13894 - Wrong result; modified in 10.3.8 -innodb.innodb-wl5522 : MDEV-13644 - Assertion failure +innodb.innodb-lock : Modified in 10.3.10 +innodb.innodb-mdev-7513 : Modified in 10.3.9 +innodb.innodb-page_compression_bzip2 : Modified in 10.3.10 +innodb.innodb-page_compression_default : MDEV-13644 - Assertion failure +innodb.innodb-page_compression_lz4 : Modified in 10.3.10 +innodb.innodb-page_compression_lzma : MDEV-14353 - Wrong result; modified in 10.3.10 +innodb.innodb-page_compression_lzo : Modified in 10.3.10 +innodb.innodb-page_compression_snappy : MDEV-13644 - Assertion failure +innodb.innodb-page_compression_tables : Modified in 10.3.10 +innodb.innodb-page_compression_zip : MDEV-10641 - mutex problem; modified in 10.3.10 +innodb.innodb-table-online : MDEV-13894 - Wrong result +innodb.innodb-wl5522 : MDEV-13644 - Assertion failure; modified in 10.3.9 innodb.innodb-wl5522-debug : MDEV-14200 - Wrong errno -innodb.innodb_bug13510739 : Modified in 10.3.7 innodb.innodb_bug14147491 : MDEV-11808 - Index is corrupt innodb.innodb_bug30423 : MDEV-7311 - Wrong result innodb.innodb_bug48024 : MDEV-14352 - Assertion failure -innodb.innodb_bug54044 : Modified in 10.3.7 innodb.innodb_bug59641 : MDEV-13830 - Assertion failure +innodb.innodb_buffer_pool_resize : MDEV-16964 - Assertion failure +innodb.innodb_buffer_pool_resize_with_chunks : MDEV-16964 - Assertion failure innodb.innodb_bulk_create_index_replication : MDEV-15273 - Slave failed to start innodb.innodb_defrag_stats_many_tables : MDEV-14198 - Table is full -innodb.innodb_defragment_small : Modified in 10.3.8 innodb.innodb_information_schema : MDEV-8851 - Wrong result innodb.innodb_max_recordsize_32k : MDEV-14801 - Operation failed innodb.innodb_max_recordsize_64k : MDEV-15203 - Wrong result innodb.innodb_monitor : MDEV-10939 - Testcase timeout -innodb.innodb_query_cache : Added in 10.3.8 +innodb.innodb-page_compression_tables : MDEV-13644 - Assertion failure innodb.innodb_stats : MDEV-10682 - wrong result +innodb.innodb_stats_persistent : Include file modified in 10.3.9 innodb.innodb_stats_persistent_debug : MDEV-14801 - Operation failed innodb.innodb_sys_semaphore_waits : MDEV-10331 - Semaphore wait innodb.innodb_zip_innochecksum2 : MDEV-13882 - Extra warnings innodb.innodb_zip_innochecksum3 : MDEV-14486 - Resource temporarily unavailable +innodb.instant_alter : Modified in 10.3.10 +innodb.instant_alter_crash : Include file modified in 10.3.9 +innodb.instant_alter_debug : Modified in 10.3.10 +innodb.instant_alter_rollback : Include file modified in 10.3.9 innodb.log_corruption : MDEV-13251 - Wrong result innodb.log_data_file_size : MDEV-14204 - Server failed to start innodb.log_file_name : MDEV-14193 - Exception innodb.log_file_size : MDEV-15668 - Not found pattern -innodb.monitor : MDEV-16179 - Wrong result -innodb.purge_secondary : MDEV-15681 - Wrong result +innodb.monitor : MDEV-16179 - Wrong result; modified in 10.3.9 +innodb.purge_secondary : MDEV-15681 - Wrong result; include file modified in 10.3.9 innodb.purge_thread_shutdown : MDEV-13792 - Wrong result innodb.read_only_recovery : MDEV-13886 - Server crash innodb.recovery_shutdown : MDEV-15671 - Checksum mismatch in datafile -innodb.rename_table : Modified in 10.3.8 innodb.row_format_redundant : MDEV-15192 - Trying to access missing tablespace -innodb.sp_temp_table : MDEV-16647 - Could not remove temporary table +innodb.strict_mode : Modified in 10.3.9 innodb.table_definition_cache_debug : MDEV-14206 - Extra warning innodb.table_flags : MDEV-13572 - Wrong result innodb.temp_table_savepoint : MDEV-16182 - Wrong result -innodb.temporary_table : MDEV-13265 - Wrong result; modified in 10.3.7 -innodb.tmpdir : Modified in 10.3.7 +innodb.temporary_table : MDEV-13265 - Wrong result; modified in 10.3.9 +innodb.truncate : Added in 10.3.10 +innodb.truncate_crash : Added in 10.3.10 +innodb.truncate_foreign : Added in 10.3.10 +innodb.truncate_missing : Added in 10.3.10 innodb.update_time : MDEV-14804 - Wrong result +innodb.undo_log : Include file modified in 10.3.9 +innodb.undo_truncate : MDEV-17340 - Server hung; added in 10.3.10 +innodb.undo_truncate_recover : MDEV-13080 - Missing checkpoint; added in 10.3.10 innodb.xa_recovery : MDEV-15279 - mysqld got exception #----------------------------------------------------------------------- -innodb_fts.fulltext2 : Modified in 10.3.7 -innodb_fts.fulltext_var : Modified in 10.3.7 +innodb_fts.fts_kill_query : Added in 10.3.9 innodb_fts.innodb-fts-fic : MDEV-14154 - Assertion failure -innodb_fts.innodb_fts_misc : Modified in 10.3.7 innodb_fts.innodb_fts_misc_debug : MDEV-14156 - Unexpected warning +innodb_fts.innodb_fts_multiple_index : Modified in 10.3.9 innodb_fts.innodb_fts_plugin : MDEV-13888 - Errors in server log innodb_fts.innodb_fts_stopword_charset : MDEV-13259 - Table crashed innodb_fts.sync : MDEV-14808 - Wrong result +innodb_fts.sync_ddl : MDEV-17296 - Server crash; added in 10.3.9 #----------------------------------------------------------------------- +innodb_gis.create_spatial_index : Modified in 10.3.9 +innodb_gis.kill_server : MDEV-16941 - Checksum mismatch +innodb_gis.rtree_compress : Include file modified in 10.3.9 innodb_gis.rtree_compress2 : MDEV-16269 - Wrong result innodb_gis.rtree_concurrent_srch : MDEV-15284 - Wrong result with embedded -innodb_gis.rtree_purge : MDEV-15275 - Timeout +innodb_gis.rtree_purge : MDEV-15275 - Timeout; include file modified in 10.3.9 innodb_gis.rtree_recovery : MDEV-15274 - Error on check innodb_gis.rtree_split : MDEV-14208 - Too many arguments -innodb_gis.rtree_undo : MDEV-14456 - Timeout in include file +innodb_gis.rtree_undo : MDEV-14456 - Timeout in include file; include file modified in 10.3.9 innodb_gis.types : MDEV-15679 - Table is marked as crashed #----------------------------------------------------------------------- @@ -270,188 +271,195 @@ innodb_zip.cmp_per_index : MDEV-14490 innodb_zip.innochecksum_3 : MDEV-13279 - Extra warnings innodb_zip.wl5522_debug_zip : MDEV-11600 - Operating system error number 2 innodb_zip.wl6470_1 : MDEV-14240 - Assertion failure -innodb_zip.wl6501_1 : MDEV-10891 - Can't create UNIX socket -innodb_zip.wl6501_scale_1 : MDEV-13254 - Timeout, MDEV-14104 - Error 192 #----------------------------------------------------------------------- -main.alter_table : Modified in 10.3.8 -main.alter_table_errors : Added in 10.3.7 main.alter_table_trans : MDEV-12084 - timeout main.analyze_stmt_slow_query_log : MDEV-12237 - Wrong result -main.ansi : Modified in 10.3.7 main.auth_named_pipe : MDEV-14724 - System error 2 -main.auto_increment : MDEV-16652 - Out of range, modified in 10.3.8 -main.check : Modified in 10.3.8 -main.check_constraint : Modified in 10.3.7 -main.connect : MDEV-16270 - Wrong result +main.bootstrap : Modified in 10.3.9 +main.check_constraint : Modified in 10.3.9 +main.column_compression : Modified in 10.3.9 +main.connect : MDEV-16270, MDEV-17282 - Wrong result main.connect2 : MDEV-13885 - Server crash +main.constraints : Modified in 10.3.10 main.count_distinct2 : MDEV-11768 - timeout main.create_delayed : MDEV-10605 - failed with timeout main.create_drop_event : MDEV-16271 - Wrong result -main.create_or_replace : Modified in 10.3.7 -main.cte_nonrecursive : Modified in 10.3.8 -main.cte_recursive : Modified in 10.3.7 -main.ctype_utf16le : MDEV-10675: timeout or extra warnings -main.custom_aggregate_functions : Modified in 10.3.7 +main.create_or_replace : Modified in 10.3.10 +main.create_replace_tmp : Added in 10.3.9 +main.cte_nonrecursive : Modified in 10.3.10 +main.cte_recursive : Modified in 10.3.10 +main.cte_recursive_not_embedded : Added in 10.3.9 +main.ctype_binary : Modified in 10.3.9 +main.ctype_eucjpms : Modified in 10.3.9 +main.ctype_euckr : Modified in 10.3.9 +main.ctype_gbk : Modified in 10.3.9 +main.ctype_latin1 : Modified in 10.3.9 +main.ctype_ucs : Modified in 10.3.9 +main.ctype_ujis : Modified in 10.3.9 +main.ctype_upgrade : MDEV-16945 - Error upon mysql_upgrade +main.ctype_utf16le : MDEV-10675: timeout or extra warnings; modified in 10.3.9 +main.ctype_utf16 : MDEV-10675: timeout or extra warnings; modified in 10.3.9 +main.ctype_utf32 : Modified in 10.3.9 +main.ctype_utf8mb4 : Modified in 10.3.9 +main.ctype_utf8 : Modified in 10.3.9 main.debug_sync : MDEV-10607 - internal error -main.derived_cond_pushdown : Modified in 10.3.8 +main.derived : Modified in 10.3.9 +main.derived_cond_pushdown : Modified in 10.3.10 main.derived_opt : MDEV-11768 - timeout -main.derived_view : Modified in 10.3.8 -main.distinct : MDEV-14194 - Crash; modified in 10.3.7 +main.derived_split_innodb : Modified in 10.3.10 +main.distinct : MDEV-14194 - Crash main.drop_bad_db_type : MDEV-15676 - Wrong result main.events_2 : MDEV-13277 - Crash main.events_bugs : MDEV-12892 - Crash main.events_restart : MDEV-12236 - Server shutdown problem main.events_slowlog : MDEV-12821 - Wrong result -main.explain_slowquerylog : Modified in 10.3.7 -main.func_json : Modified in 10.3.8 -main.func_misc : Modified in 10.3.8 -main.func_time : Modified in 10.3.8 -main.func_time_hires : Modified in 10.3.8 -main.gis : MDEV-13411 - wrong result on P8 -main.grant : Modified in 10.3.8 -main.grant2 : Modified in 10.3.8 -main.grant_not_windows : Added in 10.3.7 -main.having : Modified in 10.3.8 +main.flush : Modified in 10.3.10 +main.func_isnull : Modified in 10.3.10 +main.func_json : Modified in 10.3.10 +main.func_time : Modified in 10.3.10 +main.gis : MDEV-13411 - wrong result on P8; modified in 10.3.10 +main.gis-precise : Modified in 10.3.10 +main.grant : Modified in 10.3.10 +main.group_min_max : Modified in 10.3.10 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 - Plan mismatch main.innodb_mysql_lock : MDEV-7861 - Wrong result -main.insert_select : Modified in 10.3.7 -main.invisible_field_grant_completely : Added in 10.3.7 -main.invisible_field_grant_system : Added in 10.3.7 +main.invisible_field_debug : Modified in 10.3.9 +main.join : Modified in 10.3.10 +main.join_cache : Modified in 10.3.9 +main.join_outer : Modified in 10.3.9 main.kill-2 : MDEV-13257 - Wrong result main.kill_processlist-6619 : MDEV-10793 - Wrong result -main.limit : Modified in 10.3.8 -main.lock : Modified in 10.3.8 main.log_slow : MDEV-13263 - Wrong result main.log_tables-big : MDEV-13408 - wrong result -main.max_statement_time : Modified in 10.3.8 +main.mdev375 : MDEV-10607 - sporadic "can't connect" main.mdev-504 : MDEV-15171 - warning main.merge : MDEV-10607 - sporadic "can't connect" -main.multi_update : Modified in 10.3.7 -main.mysql : Modified in 10.3.7 -main.mysql_client_test_comp : MDEV-16641 - exec failed +main.mysql : Modified in 10.3.10 +main.mysql_client_test_comp : MDEV-16641 - Error in exec main.mysql_client_test_nonblock : CONC-208 - Error on Power; MDEV-15096 - exec failed -main.mysql_cp932 : Modified in 10.3.7 -main.mysql_upgrade_noengine : MDEV-14355 - Wrong result -main.mysql_upgrade_ssl : MDEV-13492 - Unknown SSL error +main.mysql_not_windows : Modified in 10.3.10 main.mysqld_option_err : MDEV-12747 - Timeout -main.mysqldump : MDEV-14800 - Stack smashing detected; modified in 10.3.8 +main.mysqldump : MDEV-14800 - Stack smashing detected main.mysqlhotcopy_myisam : MDEV-10995 - Hang on debug -main.mysqlslap : Modified in 10.3.8 +main.mysqlslap : MDEV-11801 - timeout main.mysqltest : MDEV-13887 - Wrong result -main.mysqltest_tracking_info : Added in 10.3.8 -main.olap : Modified in 10.3.8 +main.mysql_upgrade_noengine : MDEV-14355 - Wrong result +main.mysql_upgrade_ssl : MDEV-13492 - Unknown SSL error main.openssl_1 : MDEV-13492 - Unknown SSL error +main.openssl_6975 : MDEV-17184 - Failures with OpenSSL 1.1.1 +main.opt_tvc : Modified in 10.3.10 main.order_by_optimizer_innodb : MDEV-10683 - Wrong result -main.parser : Modified in 10.3.7 main.partition_debug_sync : MDEV-15669 - Deadlock found when trying to get lock -main.partition_innodb : Modified in 10.3.7 +main.partition_error : Modified in 10.3.10 main.partition_innodb_plugin : MDEV-12901 - Valgrind warnings -main.partition_open_files_limit : Modified in 10.3.8 -main.ps : MDEV-11017 - Wrong result; modified in 10.3.8 -main.query_cache : MDEV-16180 - Wrong result +main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count; modified in 10.3.10 main.query_cache_debug : MDEV-15281 - Query cache is disabled +main.query_cache : MDEV-16180 - Wrong result +main.range : Modified in 10.3.10 +main.range_debug : Added in 10.3.10 main.range_vs_index_merge_innodb : MDEV-15283 - Server has gone away -main.read_only_innodb : Modified in 10.3.8 -main.rename : Modified in 10.3.8 -main.reset_connection : Added in 10.3.8 -main.select : MDEV-15430 - Wrong result with clang-4 (compiler bug) -main.select_jcl6 : MDEV-15430 - Wrong result with clang-4 (compiler bug) -main.select_pkeycache : MDEV-15430 - Wrong result with clang-4 (compiler bug) -main.selectivity : Modified in 10.3.8 -main.session_tracker_last_gtid : Added in 10.3.8 -main.set_password : Added in 10.3.8 +main.rename : Modified in 10.3.9 +main.selectivity : Modified in 10.3.10 main.set_statement : MDEV-13183 - Wrong result main.shm : MDEV-12727 - Mismatch, ERROR 2013 main.show_explain : MDEV-10674 - Wrong result code -main.show_grants_with_plugin-7985 : Modified in 10.3.8 -main.sp : MDEV-7866 - Mismatch; modified in 10.3.8 -main.sp-code : Modified in 10.3.7 -main.sp-condition-handler : Added in 10.3.8 -main.sp-cursor : Modified in 10.3.8 -main.sp-row : Modified in 10.3.8 -main.sp-security : Modified in 10.3.8 +main.sp : MDEV-7866 - Mismatch; modified in 10.3.10 main.sp_notembedded : MDEV-10607 - internal error -main.sql_mode : Modified in 10.3.8 +main.sp-security : MDEV-10607 - sporadic "can't connect"; modified in 10.3.10 +main.ssl : MDEV-17184 - Failures with OpenSSL 1.1.1 main.ssl_ca : MDEV-10895 - SSL connection error on Power main.ssl_cert_verify : MDEV-13735 - Server crash +main.ssl_cipher : MDEV-17184 - Failures with OpenSSL 1.1.1 main.ssl_connect : MDEV-13492 - Unknown SSL error main.ssl_timeout : MDEV-11244 - Crash -main.stat_tables_par : MDEV-13266 - Wrong result +main.stat_tables : Modified in 10.3.10 main.stat_tables_par_innodb : MDEV-14155 - Wrong rounding -main.statistics : Modified in 10.3.8 -main.statistics_close : Added in 10.3.8 +main.stat_tables_par : MDEV-13266 - Wrong result main.status : MDEV-13255 - Wrong result -main.subselect-crash_15755 : Added in 10.3.7 +main.subselect_extra_no_semijoin : Modified in 10.3.10 main.subselect_innodb : MDEV-10614 - Wrong result -main.subselect_sj2_mat : Modified in 10.3.8 -main.symlink-aria-11902 : MDEV-15098 - error 40 from storage engine -main.symlink-myisam-11902 : MDEV-15098 - Error 40 from storage engine +main.subselect : Modified in 10.3.9 +main.subselect_sj2_mat : Modified in 10.3.9 +main.subselect_sj_mat : Modified in 10.3.9 +main.table_value_constr : Modified in 10.3.10 main.tc_heuristic_recover : MDEV-14189 - Wrong result -main.trigger : Modified in 10.3.8 -main.type_bit : Modified in 10.3.8 -main.type_blob : MDEV-15195 - Wrong result; modified in 10.3.8 +main.temp_table : Modified in 10.3.10 +main.type_blob : MDEV-15195 - Wrong result main.type_datetime : MDEV-14322 - wrong result -main.type_datetime_hires : MDEV-15430 - Wrong result with clang-4 (compiler bug) -main.type_decimal : Modified in 10.3.8 -main.type_float : MDEV-15430 - Wrong result with clang-4 (compiler bug) -main.type_int : Modified in 10.3.8 -main.type_time_hires : MDEV-15430 - Wrong result with clang-4 (compiler bug) -main.type_timestamp_hires : MDEV-15430 - Wrong result with clang-4 (compiler bug) +main.type_datetime_hires : MDEV-10687 - Timeout +main.type_float : Modified in 10.3.10 +main.union : Modified in 10.3.9 main.userstat : MDEV-12904 - SSL errors -main.win : Modified in 10.3.8 -main.xa : MDEV-11769 - lock wait timeout +main.win : Modified in 10.3.10 +main.win_lead_lag : Modified in 10.3.10 +main.xa : MDEV-11769 - lock wait timeout; modified in 10.3.9 #----------------------------------------------------------------------- -maria.alter : Modified in 10.3.7 +maria.concurrent : Added in 10.3.10 +maria.create : Added in 10.3.10 maria.insert_select : MDEV-12757 - Timeout maria.insert_select-7314 : MDEV-16492 - Timeout -maria.lock : Modified in 10.3.8 -maria.maria : MDEV-14430 - Extra warning; modified in 10.3.8 -maria.maria-autoinc : MDEV-16652 - Out of range; added in 10.3.8 +maria.maria : MDEV-14430 - Extra warning; modified in 10.3.10 #----------------------------------------------------------------------- -mariabackup.absolute_ibdata_paths : MDEV-16642 - Wrong result +mariabackup.absolute_ibdata_paths : MDEV-16571 - Wrong result; opt file modified in 10.3.10 mariabackup.apply-log-only : MDEV-14192 - Assertion failure -mariabackup.apply-log-only-incr : MDEV-14192 - Assertion failure; modified in 10.3.8 +mariabackup.apply-log-only-incr : MDEV-14192 - Assertion failure mariabackup.backup_ssl : MDEV-14192 - Assertion failure +mariabackup.create_during_backup : Added in 10.3.10 +mariabackup.create_with_data_directory_during_backup : Added in 10.3.10 mariabackup.data_directory : MDEV-15270 - Error on exec +mariabackup.drop_table_during_backup : Added in 10.3.10 mariabackup.full_backup : MDEV-16571 - Wrong result mariabackup.huge_lsn : MDEV-15662 - Sequence number is in the future mariabackup.incremental_backup : MDEV-14192 - Assertion failure -mariabackup.incremental_encrypted : MDEV-14188 - Wrong result, MDEV-15667 - timeout -mariabackup.lock_ddl_per_table : Modified in 10.3.8 -mariabackup.mdev-14447 : MDEV-15201 - Timeout; modified in 10.3.8 +mariabackup.incremental_ddl_during_backup : Added in 10.3.10 +mariabackup.incremental_encrypted : MDEV-15667 - timeout; modified in 10.3.9 +mariabackup.innodb_log_optimize_ddl : Added in 10.3.9 +mariabackup.log_checksum_mismatch : MDEV-16571 - Wrong result +mariabackup.mdev-14447 : MDEV-15201 - Timeout +mariabackup.mlog_index_load : MDEV-14192 - Assertion failure; added in 10.3.10 +mariabackup.nolock_ddl_during_backup_end : Added in 10.3.10 mariabackup.partial_exclude : MDEV-15270 - Error on exec -mariabackup.partition_datadir : Modified in 10.3.8 -mariabackup.rename_during_mdl_lock : Added in 10.3.8 -mariabackup.xb_aws_key_management : MDEV-15680 - Error: xtrabackup_copy_logfile() failed +mariabackup.recreate_table_during_backup : Added in 10.3.10 +mariabackup.rename_during_backup : Added in 10.3.10 +mariabackup.rename_during_mdl_lock : Modified in 10.3.10 +mariabackup.skip_innodb : Added in 10.3.10 +mariabackup.truncate_during_backup : Added in 10.3.10 +mariabackup.undo_space_id : Opt file modified in 10.3.10 +mariabackup.unsupported_redo : MDEV-14192 - Crash; modified in 10.3.10 +mariabackup.xb_aws_key_management : MDEV-17341 - Missing warning mariabackup.xb_compressed_encrypted : MDEV-14812 - Segmentation fault -mariabackup.xb_file_key_management : MDEV-16650 - Wrong result +mariabackup.xb_file_key_management : MDEV-16571 - Wrong result mariabackup.xb_history : MDEV-16268 - Error on exec mariabackup.xb_page_compress : MDEV-14810 - status: 1, errno: 11 -mariabackup.xb_partition : MDEV-16643 - Table does not exist -mariabackup.xb_rocksdb : Added in 10.3.8 -mariabackup.xb_rocksdb_datadir : Added in 10.3.8 -mariabackup.xb_rocksdb_datadir_debug : Added in 10.3.8 +mariabackup.xb_partition : MDEV-14192 - Crash +mariabackup.xb_rocksdb : MDEV-17338 - Server hung on shutdown mariabackup.xbstream : MDEV-14192 - Crash #----------------------------------------------------------------------- -mroonga/storage.* : MDEV-16127 - Wrong result - mroonga/storage.column_datetime_32bit_2038 : Wrong result on Alpha mroonga/storage.column_datetime_32bit_before_unix_epoch : Wrong result on Alpha mroonga/storage.column_datetime_32bit_max : Wrong result on Alpha mroonga/storage.column_datetime_32bit_out_of_range : Wrong result on Alpha +mroonga/storage.index_multiple_column_range_all_used_less_than : MDEV-16127 - Wrong result with GCC 8 +mroonga/storage.index_multiple_column_range_all_used_less_than_or_equal : MDEV-16127 - Wrong result with GCC 8 +mroonga/storage.index_multiple_column_range_partially_used_have_prefix_less_than : MDEV-16127 - Wrong result with GCC 8 +mroonga/storage.index_multiple_column_range_partially_used_have_prefix_less_than_or_equal : MDEV-16127 - Wrong result with GCC 8 +mroonga/storage.index_multiple_column_range_partially_used_no_prefix_less_than : MDEV-16127 - Wrong result with GCC 8 +mroonga/storage.index_multiple_column_range_partially_used_no_prefix_less_than_or_equal : MDEV-16127 - Wrong result with GCC 8 mroonga/storage.index_multiple_column_unique_date_32bit_equal : Wrong result on Alpha mroonga/storage.index_multiple_column_unique_date_order_32bit_desc : Wrong result on Alpha mroonga/storage.index_multiple_column_unique_datetime_index_read : MDEV-8643 - Valgrind +mroonga/storage.optimization_order_limit_optimized_datetime_less_than : MDEV-16127 - Wrong result with GCC 8 +mroonga/storage.optimization_order_limit_optimized_datetime_less_than_or_equal : MDEV-16127 - Wrong result with GCC 8 mroonga/storage.repair_table_no_index_file : MDEV-9364 - wrong result, MDEV-14807 - wrong error message mroonga/wrapper.repair_table_no_index_file : MDEV-14807 - Wrong error message @@ -467,14 +475,16 @@ multi_source.status_vars : MDEV-4632 - #----------------------------------------------------------------------- -parts.alter_data_directory_innodb : Added in 10.3.8 parts.partition_alter2_2_maria : MDEV-14364 - Lost connection to MySQL server during query parts.partition_auto_increment_archive : MDEV-16491 - Marked as crashed and should be repaired parts.partition_auto_increment_maria : MDEV-14430 - Extra warning parts.partition_debug_innodb : MDEV-10891 - Can't create UNIX socket; MDEV-15095 - Table doesn't exist parts.partition_exch_qa_10 : MDEV-11765 - wrong result parts.partition_innodb_status_file : MDEV-12901 - Valgrind -parts.show_create : Added in 10.3.7 +parts.partition_special_innodb : MDEV-16942 - Timeout +parts.show_create : Modified in 10.3.10 +parts.truncate_locked : Added in 10.3.9 +parts.update_and_cache : Added in 10.3.10 #----------------------------------------------------------------------- @@ -485,6 +495,7 @@ percona.* : MDEV-10997 perfschema.bad_option_1 : MDEV-13892 - Timeout perfschema.bad_option_3 : MDEV-12728 - Timeout on Power perfschema.bad_option_5 : MDEV-14197 - Timeout +perfschema.connect_attrs : MDEV-17283 - Wrong result perfschema.dml_file_instances : MDEV-15179 - Wrong result perfschema.func_file_io : MDEV-5708 - fails for s390x perfschema.func_mutex : MDEV-5708 - fails for s390x @@ -492,8 +503,8 @@ perfschema.hostcache_ipv4_addrinfo_again_allow : MDEV-12759 perfschema.hostcache_ipv6_addrinfo_again_allow : MDEV-12752 - Crash perfschema.hostcache_ipv6_addrinfo_bad_allow : MDEV-13260 - Crash perfschema.hostcache_ipv6_ssl : MDEV-10696 - Crash -perfschema.partition : Added in 10.3.8 perfschema.privilege_table_io : MDEV-13184 - Extra lines +perfschema.rpl_gtid_func : MDEV-16897 - Wrong result perfschema.socket_connect : MDEV-15677 - Wrong result perfschema.socket_summary_by_event_name_func : MDEV-10622 - Wrong result perfschema.stage_mdl_global : MDEV-11803 - wrong result on slow builders @@ -508,7 +519,7 @@ perfschema_stress.* : MDEV-10996 #----------------------------------------------------------------------- plugins.feedback_plugin_send : MDEV-7932, MDEV-11118 - Connection problems and such -plugins.processlist : MDEV-16574 - Wrong result; added in 10.3.8 +plugins.processlist : MDEV-16574 - Wrong result plugins.server_audit : MDEV-14295 - Wrong result plugins.thread_pool_server_audit : MDEV-14295 - Wrong result @@ -516,40 +527,6 @@ plugins.thread_pool_server_audit : MDEV-14295 rocksdb.* : Too many crashes in various tests -rocksdb.2pc_group_commit : MDEV-14455 - Wrong result -rocksdb.add_index_inplace : MDEV-16648 - Crash -rocksdb.allow_no_primary_key : MDEV-16634 - Crash -rocksdb.allow_no_primary_key_with_sk : MDEV-16639 - Crash -rocksdb.analyze_table : Modified in 10.3.7 -rocksdb.autoinc_crash_safe : MDEV-16637 - Crash -rocksdb.autoinc_crash_safe_partition : MDEV-16639 - Crash -rocksdb.autoinc_debug : MDEV-16203 - Wrong result -rocksdb.autoinc_secondary : MDEV-16638 - Crash -rocksdb.autoinc_vars_thread : MDEV-16573 - Debug sync timed out -rocksdb.bloomfilter2 : MDEV-16564 - Wrong result -rocksdb.bloomfilter4 : MDEV-16649 - Crash -rocksdb.bulk_load_errors : MDEV-16575 - Wrong result -rocksdb.check_ignore_unknown_options : MDEV-16310 - Non-portable commands; modified in 10.3.8 -rocksdb.deadlock : MDEV-16033 - Timeout -rocksdb.drop_index_inplace : MDEV-14162 - Crash on shutdown -rocksdb.drop_table : MDEV-14308 - Timeout -rocksdb.drop_table2 : MDEV-16631 - Crash -rocksdb.issue255 : MDEV-16577 - Wrong plan; modified in 10.3.8 -rocksdb.locking_issues : MDEV-14464 - Wrong result -rocksdb.mariadb_ignore_dirs : MDEV-16639 - Crash -rocksdb.mariadb_port_fixes : MDEV-16387 - Wrong plan; modified in 10.3.8 -rocksdb.max_open_files : MDEV-16639 - Crash -rocksdb.read_only_tx : MDEV-16565 - Server crash -rocksdb.rocksdb_cf_options : MDEV-16639 - Crash -rocksdb.rocksdb_cf_per_partition : MDEV-16636 - Wrong result -rocksdb.rocksdb_parts : MDEV-13843 - Wrong result -rocksdb.singledelete : MDEV-16633 - Crash -rocksdb.truncate_table3 : MDEV-14506 - Lost connection to server -rocksdb.ttl_primary_read_filtering : MDEV-16560 - Wrong result -rocksdb.ttl_secondary_read_filtering : MDEV-16560 - Wrong result -rocksdb.unique_check : MDEV-16576 - Wrong errno -rocksdb.use_direct_reads_writes : MDEV-16646 - Crash - #----------------------------------------------------------------------- rocksdb_rpl.mdev12179 : MDEV-16632 - Crash @@ -557,21 +534,22 @@ rocksdb_rpl.rpl_binlog_xid_count : MDEV-16644 #----------------------------------------------------------------------- -rocksdb_sys_vars.rocksdb_remove_mariabackup_checkpoint_basic : Added in 10.3.8 +rocksdb_sys_vars.rocksdb_rate_limiter_bytes_per_sec_basic : MDEV-16639 - Crash +rocksdb_sys_vars.rocksdb_update_cf_options_basic : MDEV-16955 - Bytes lost +rocksdb_sys_vars.rocksdb_update_cf_options : MDEV-16955 - Bytes lost #----------------------------------------------------------------------- -roles.acl_load_mutex-5170 : Modified in 10.2.16 roles.create_and_grant_role : MDEV-11772 - wrong result -roles.grant_revoke_current : Modified in 10.3.8 -roles.set_default_role_ps-6960 : Modified in 10.3.8 #----------------------------------------------------------------------- rpl-tokudb.* : MDEV-14354 - Tests fail with tcmalloc +rpl-tokudb.rpl_tokudb_commit_after_flush : MDEV-16966 - Server crash + rpl.last_insert_id : MDEV-10625 - warnings in error log -rpl.rename : Added in 10.3.8 +rpl.rpl_15867 : Added in 10.3.9 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 @@ -580,11 +558,12 @@ rpl.rpl_binlog_index : MDEV-9501 - rpl.rpl_colSize : MDEV-16112 - Server crash rpl.rpl_ctype_latin1 : MDEV-14813 - Wrong result on Mac rpl.rpl_ddl : MDEV-10417 - Fails on Mips -rpl.rpl_do_grant : Modified in 10.3.8 rpl.rpl_domain_id_filter_io_crash : MDEV-12729 - Timeout in include file, MDEV-13677 - Server crash rpl.rpl_domain_id_filter_restart : MDEV-10684 - Wrong result +rpl.rpl_drop_db_fail : MDEV-16898 - Slave fails to start rpl.rpl_extra_col_master_innodb : MDEV-16570 - Extra warning rpl.rpl_extra_col_master_myisam : MDEV-14203 - Extra warning +rpl.rpl_foreign_key_innodb : Modified in 10.3.10 rpl.rpl_gtid_basic : MDEV-10681 - server startup problem rpl.rpl_gtid_crash : MDEV-9501 - Failed registering on master, MDEV-13643 - Lost connection rpl.rpl_gtid_delete_domain : MDEV-14463 - Timeout @@ -594,7 +573,6 @@ rpl.rpl_gtid_reconnect : MDEV-14497 rpl.rpl_gtid_stop_start : MDEV-10629 - Crash on shutdown, MDEV-12629 - Valgrind warnings rpl.rpl_gtid_until : MDEV-10625 - warnings in error log rpl.rpl_innodb_bug30888 : MDEV-10417 - Fails on Mips -rpl.rpl_innodb_mixed_dml : Include file modified in 10.3.8 rpl.rpl_insert : MDEV-9329 - Fails on Ubuntu/s390x rpl.rpl_insert_delayed : MDEV-9329 - Fails on Ubuntu/s390x rpl.rpl_insert_id : MDEV-15197 - Wrong result @@ -602,8 +580,6 @@ rpl.rpl_insert_id_pk : MDEV-16567 rpl.rpl_insert_ignore : MDEV-14365 - Lost connection to MySQL server during query rpl.rpl_invoked_features : MDEV-10417 - Fails on Mips rpl.rpl_mariadb_slave_capability : MDEV-11018 - Extra lines in binlog -rpl.rpl_mdev12179 : Modified in 10.3.7 -rpl.rpl_mdev382 : Modified in 10.3.7 rpl.rpl_mdev6020 : MDEV-15272 - Server crash rpl.rpl_mixed_mixing_engines : MDEV-14489 - Sync slave with master failed rpl.rpl_non_direct_mixed_mixing_engines : MDEV-14489 - Sync slave with master failed @@ -613,13 +589,13 @@ rpl.rpl_parallel : MDEV-10653 rpl.rpl_parallel_conflicts : MDEV-15272 - Server crash rpl.rpl_parallel_mdev6589 : MDEV-12979 - Assertion failure rpl.rpl_parallel_multilevel2 : MDEV-14723 - Timeout -rpl.rpl_parallel_optimistic : MDEV-15278 - Failed to sync with master; modified in 10.3.8 +rpl.rpl_parallel_optimistic : MDEV-15278 - Failed to sync with master rpl.rpl_parallel_optimistic_nobinlog : MDEV-15278 - Failed to sync with master -rpl.rpl_parallel_retry : MDEV-11119 - Crash +rpl.rpl_parallel_retry : MDEV-11119 - Crash; MDEV-17109 - Timeout rpl.rpl_parallel_temptable : MDEV-10356 - Crash rpl.rpl_partition_innodb : MDEV-10417 - Fails on Mips rpl.rpl_password_boundaries : MDEV-11534 - Slave IO warnings -rpl.rpl_row_001 : MDEV-16653 - MTR's internal check fails +rpl.rpl_row_001 : MDEV-16653 - MTR's internal check fails; modified in 10.3.9 rpl.rpl_row_basic_11bugs : MDEV-12171 - Server failed to start rpl.rpl_row_basic_2myisam : MDEV-13875 - command "diff_files" failed rpl.rpl_row_drop_create_temp_table : MDEV-14487 - Wrong result @@ -628,11 +604,13 @@ rpl.rpl_row_img_eng_min : MDEV-13875 rpl.rpl_row_img_eng_noblob : MDEV-13875 - command "diff_files" failed rpl.rpl_row_index_choice : MDEV-15196 - Slave crash rpl.rpl_row_sp001 : MDEV-9329 - Fails on Ubuntu/s390x +rpl.rpl_row_spatial : Added in 10.3.10 rpl.rpl_row_until : MDEV-14052 - Master will not send events with checksum rpl.rpl_semi_sync : MDEV-11220 - Wrong result rpl.rpl_semi_sync_after_sync : MDEV-14366 - Wrong result rpl.rpl_semi_sync_after_sync_row : MDEV-14366 - Wrong result rpl.rpl_semi_sync_event_after_sync : MDEV-11806 - warnings +rpl.rpl_semi_sync_master_shutdown : Added in 10.3.9 rpl.rpl_semi_sync_uninstall_plugin : MDEV-7140 - Assorted failures rpl.rpl_semi_sync_wait_point : MDEV-11807 - timeout in wait condition rpl.rpl_semisync_ali_issues : MDEV-16272 - Wrong result @@ -644,7 +622,7 @@ rpl.rpl_slave_load_tmpdir_not_exist : MDEV-14203 rpl.rpl_slow_query_log : MDEV-13250 - Test abort rpl.rpl_sp_effects : MDEV-13249 - Crash rpl.rpl_start_stop_slave : MDEV-13567 - Sync slave timeout -rpl.rpl_stm_000001 : MDEV-16274 - Connection attributes were truncated +rpl.rpl_stm_000001 : MDEV-16274 - Connection attributes were truncated; modified in 10.3.9 rpl.rpl_stm_mixing_engines : MDEV-14489 - Sync slave with master failed rpl.rpl_stm_multi_query : MDEV-9501 - Failed registering on master rpl.rpl_stm_relay_ign_space : MDEV-14360 - Test assertion @@ -668,7 +646,7 @@ sphinx.union-5539 : MDEV-10986 spider.* : MDEV-9329 - tests are too memory-consuming spider.basic_sql : MDEV-11186 - Internal check fails -spider.spider_fixes_part : Modified in 10.3.8 +spider.timestamp : Added in 10.3.9 spider/bg.direct_aggregate : MDEV-7098 - Packets out of order spider/bg.direct_aggregate_part : MDEV-7098 - Trying to unlock mutex that wasn't locked @@ -683,8 +661,9 @@ spider/handler.* : MDEV-10987, #----------------------------------------------------------------------- +sql_sequence.auto_increment : Added in 10.3.10 sql_sequence.concurrent_create : MDEV-16635 - Server crash -sql_sequence.replication_mixed : Added in 10.3.8 +sql_sequence.next : Modified in 10.3.10 #----------------------------------------------------------------------- @@ -699,18 +678,19 @@ stress.ddl_innodb : MDEV-10635 sys_vars.autocommit_func2 : MDEV-9329 - Fails on Ubuntu/s390x sys_vars.innodb_buffer_pool_dump_at_shutdown_basic : MDEV-14280 - Unexpected error -sys_vars.innodb_stats_include_delete_marked_basic : Modified in 10.3.7 +sys_vars.innodb_log_optimize_ddl_basic : Added in 10.3.9 sys_vars.keep_files_on_create_basic : MDEV-10676 - timeout sys_vars.log_slow_admin_statements_func : MDEV-12235 - Server crash -sys_vars.maximum_basic : Modified in 10.3.8 sys_vars.rpl_init_slave_func : MDEV-10149 - Test assertion sys_vars.slow_query_log_func : MDEV-14273 - Wrong result -sys_vars.sysvars_innodb : Modified in 10.3.8 sys_vars.thread_cache_size_func : MDEV-11775 - Wrong result sys_vars.wait_timeout_func : MDEV-12896 - Wrong result +sys_vars.wsrep_start_position_basic : Modified in 10.3.10 #----------------------------------------------------------------------- +tokudb.* : suite.pm and massive modifications in 10.3.10 + tokudb.change_column_all_1000_10 : MDEV-12640 - Lost connection tokudb.change_column_bin : MDEV-12640 - Lost connection tokudb.change_column_char : MDEV-12822 - Lost connection @@ -742,12 +722,15 @@ tokudb_backup.* : MDEV-11001 #----------------------------------------------------------------------- +tokudb_bugs.alter_table_comment_rebuild_data : Added in 10.1.36 tokudb_bugs.checkpoint_lock : MDEV-10637 - Wrong processlist output tokudb_bugs.checkpoint_lock_3 : MDEV-10637 - Wrong processlist output tokudb_bugs.frm_store : MDEV-12823 - Valgrind tokudb_bugs.frm_store2 : MDEV-12823 - Valgrind tokudb_bugs.frm_store3 : MDEV-12823 - Valgrind +tokudb_bugs.PS-3773 : Added in 10.1.36 tokudb_bugs.xa : MDEV-11804 - Lock wait timeout +tokudb_bugs.xa-3 : MDEV-16953 - Corrupt log record found #----------------------------------------------------------------------- @@ -772,31 +755,21 @@ unit.my_atomic : MDEV-15670 #----------------------------------------------------------------------- -vcol.binlog : Added in 10.3.8 -vcol.index : Added in 10.3.8 +vcol.index : Modified in 10.3.10 vcol.not_supported : MDEV-10639 - Testcase timeout -vcol.update : Modified in 10.3.8 -vcol.update_binlog : Added in 10.3.8 vcol.vcol_keys_innodb : MDEV-10639 - Testcase timeout -vcol.vcol_misc : MDEV-16651 - Wrong error message; modified in 10.3.8 +vcol.vcol_misc : MDEV-16651 - Wrong error message #----------------------------------------------------------------------- -versioning.alter : Modified in 10.3.8 -versioning.partition : Modified in 10.3.7 -versioning.replace : Modified in 10.3.8 -versioning.select : Modified in 10.3.8 -versioning.truncate : Modified in 10.3.7 -versioning.trx_id : Modified in 10.3.8 -versioning.trx_id_versioning_attribute_persistence : Added in 10.3.8 +versioning.truncate : Modified in 10.3.10 #----------------------------------------------------------------------- -wsrep.binlog_format : MDEV-11532 - Could not execute check-testcase wsrep.foreign_key : MDEV-14725 - WSREP has not yet prepared node wsrep.mdev_6832 : MDEV-14195 - Check testcase failed -wsrep.pool_of_threads : MDEV-12234 - GLIBCXX_3.4.20 not found -wsrep.variables : MDEV-14311 - Wrong result; modified in 10.3.8 +wsrep.pool_of_threads : MDEV-17345 - WSREP has not yet prepared node for application use +wsrep.variables : MDEV-14311 - Wrong result; modified in 10.3.10 #----------------------------------------------------------------------- diff --git a/mysql-test/valgrind.supp b/mysql-test/valgrind.supp index 3def1bd083b..a5b65f5315c 100644 --- a/mysql-test/valgrind.supp +++ b/mysql-test/valgrind.supp @@ -626,6 +626,19 @@ } # +# Warning caused by small memory leak in _dl_init +# + +{ + dl_init memory leak + Memcheck:Leak + fun:malloc + obj:*/libstdc++.so* + fun:call_init.part* + fun:_dl_init +} + +# # In glibc (checked version 2.7), inet_ntoa allocates an 18-byte # per-thread static buffer for the return value. That memory is freed # at thread exit, however if called from the main thread, Valgrind |