summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/collections/skip_list_ubsan.txt3
-rw-r--r--mysql-test/include/binlog_combinations.combinations8
-rw-r--r--mysql-test/include/binlog_combinations.inc5
-rw-r--r--mysql-test/include/ctype_ascii_order.inc7
-rw-r--r--mysql-test/include/gis_generic.inc4
-rw-r--r--mysql-test/include/lcase_names.combinations5
-rw-r--r--mysql-test/include/lcase_names.inc2
-rw-r--r--mysql-test/include/mtr_check.sql3
-rw-r--r--mysql-test/include/show_slave_status.inc4
-rw-r--r--mysql-test/include/type_mix_incompatible.inc252
-rw-r--r--mysql-test/include/wait_for_sql_thread_read_all.inc8
-rw-r--r--mysql-test/main/alter_table.result15
-rw-r--r--mysql-test/main/alter_table.test20
-rw-r--r--mysql-test/main/alter_table_combinations.result2
-rw-r--r--mysql-test/main/assign_key_cache.result2
-rw-r--r--mysql-test/main/count_distinct.result14
-rw-r--r--mysql-test/main/count_distinct.test21
-rw-r--r--mysql-test/main/create.test2
-rw-r--r--mysql-test/main/ctype_big5.result194
-rw-r--r--mysql-test/main/ctype_big5.test1
-rw-r--r--mysql-test/main/ctype_cp932.result275
-rw-r--r--mysql-test/main/ctype_cp932.test9
-rw-r--r--mysql-test/main/ctype_eucjpms.result275
-rw-r--r--mysql-test/main/ctype_eucjpms.test8
-rw-r--r--mysql-test/main/ctype_euckr.result270
-rw-r--r--mysql-test/main/ctype_euckr.test2
-rw-r--r--mysql-test/main/ctype_gb2312.result194
-rw-r--r--mysql-test/main/ctype_gb2312.test1
-rw-r--r--mysql-test/main/ctype_gbk.result194
-rw-r--r--mysql-test/main/ctype_gbk.test1
-rw-r--r--mysql-test/main/ctype_sjis.result270
-rw-r--r--mysql-test/main/ctype_sjis.test2
-rw-r--r--mysql-test/main/ctype_tis620.result46
-rw-r--r--mysql-test/main/ctype_ujis.result276
-rw-r--r--mysql-test/main/ctype_ujis.test10
-rw-r--r--mysql-test/main/ctype_utf8.result4
-rw-r--r--mysql-test/main/ctype_utf8.test2
-rw-r--r--mysql-test/main/ddl_i18n_koi8r.result10
-rw-r--r--mysql-test/main/ddl_i18n_utf8.result10
-rw-r--r--mysql-test/main/default.result6
-rw-r--r--mysql-test/main/func_hybrid_type.result16
-rw-r--r--mysql-test/main/func_in.result11
-rw-r--r--mysql-test/main/func_in.test11
-rw-r--r--mysql-test/main/func_misc.result5
-rw-r--r--mysql-test/main/func_misc.test1
-rw-r--r--mysql-test/main/func_sformat.result470
-rw-r--r--mysql-test/main/func_sformat.test228
-rw-r--r--mysql-test/main/func_time.result2
-rw-r--r--mysql-test/main/func_time.test2
-rw-r--r--mysql-test/main/get_diagnostics.result1065
-rw-r--r--mysql-test/main/get_diagnostics.test869
-rw-r--r--mysql-test/main/gis.result4
-rw-r--r--mysql-test/main/gis.test4
-rw-r--r--mysql-test/main/handlersocket.result2
-rw-r--r--mysql-test/main/information_schema_part.result36
-rw-r--r--mysql-test/main/invisible_field_debug.test14
-rw-r--r--mysql-test/main/json_equals.result98
-rw-r--r--mysql-test/main/json_equals.test69
-rw-r--r--mysql-test/main/json_normalize.result77
-rw-r--r--mysql-test/main/json_normalize.test58
-rw-r--r--mysql-test/main/long_unique_bugs.test2
-rw-r--r--mysql-test/main/mdl_sync.test8
-rw-r--r--mysql-test/main/metadata.result12
-rw-r--r--mysql-test/main/metadata.test4
-rw-r--r--mysql-test/main/mysql.result14
-rw-r--r--mysql-test/main/mysqld--help.result2
-rw-r--r--mysql-test/main/mysqld--help.test6
-rw-r--r--mysql-test/main/mysqldump-max.result84
-rw-r--r--mysql-test/main/mysqldump-system.result1455
-rw-r--r--mysql-test/main/mysqldump-timing.result3
-rw-r--r--mysql-test/main/mysqldump-utf8mb4.result3
-rw-r--r--mysql-test/main/mysqldump.result259
-rw-r--r--mysql-test/main/natural_sort_key.result214
-rw-r--r--mysql-test/main/natural_sort_key.test102
-rw-r--r--mysql-test/main/openssl_1.result12
-rw-r--r--mysql-test/main/partition.result2
-rw-r--r--mysql-test/main/partition_alter.result65
-rw-r--r--mysql-test/main/partition_alter.test49
-rw-r--r--mysql-test/main/partition_binlog.result10
-rw-r--r--mysql-test/main/partition_binlog.test2
-rw-r--r--mysql-test/main/partition_error.result6
-rw-r--r--mysql-test/main/partition_error.test2
-rw-r--r--mysql-test/main/partition_exchange.result1
-rw-r--r--mysql-test/main/partition_exchange.test2
-rw-r--r--mysql-test/main/partition_mgm_err.result12
-rw-r--r--mysql-test/main/partition_mgm_err.test12
-rw-r--r--mysql-test/main/partition_range.result12
-rw-r--r--mysql-test/main/partition_sync.result2
-rw-r--r--mysql-test/main/partition_sync.test2
-rw-r--r--mysql-test/main/plugin.result6
-rw-r--r--mysql-test/main/ps.result6
-rw-r--r--mysql-test/main/ps_missed_cmds.result23
-rw-r--r--mysql-test/main/ps_missed_cmds.test45
-rw-r--r--mysql-test/main/ps_missed_cmds_bin_prot.result5
-rw-r--r--mysql-test/main/ps_missed_cmds_bin_prot.test13
-rw-r--r--mysql-test/main/signal_code.result16
-rw-r--r--mysql-test/main/signal_sqlmode.result4
-rw-r--r--mysql-test/main/sp-anchor-row-type-table.result2
-rw-r--r--mysql-test/main/sp-anchor-type.result14
-rw-r--r--mysql-test/main/sp-cursor.result4
-rw-r--r--mysql-test/main/sp-error.result2
-rw-r--r--mysql-test/main/sp-row.result6
-rw-r--r--mysql-test/main/sp-row.test6
-rw-r--r--mysql-test/main/sp-vars.result66
-rw-r--r--mysql-test/main/sp-vars.test6
-rw-r--r--mysql-test/main/sp.result44
-rw-r--r--mysql-test/main/sp.test19
-rw-r--r--mysql-test/main/trigger.result11
-rw-r--r--mysql-test/main/trigger.test6
-rw-r--r--mysql-test/main/truncate_notembedded.result3
-rw-r--r--mysql-test/main/truncate_notembedded.test7
-rw-r--r--mysql-test/main/type_date.result2
-rw-r--r--mysql-test/main/type_datetime.result4
-rw-r--r--mysql-test/main/type_decimal.result6
-rw-r--r--mysql-test/main/type_enum.result31
-rw-r--r--mysql-test/main/type_enum.test28
-rw-r--r--mysql-test/main/type_geometry_mix_int.result351
-rw-r--r--mysql-test/main/type_geometry_mix_int.test19
-rw-r--r--mysql-test/main/type_newdecimal.result36
-rw-r--r--mysql-test/main/type_row.result23
-rw-r--r--mysql-test/main/type_row.test28
-rw-r--r--mysql-test/main/type_set.result31
-rw-r--r--mysql-test/main/type_set.test28
-rw-r--r--mysql-test/main/type_time_hires.result8
-rw-r--r--mysql-test/main/type_varchar.result8
-rw-r--r--mysql-test/main/union.test2
-rw-r--r--mysql-test/suite/archive/archive_gis.result4
-rw-r--r--mysql-test/suite/atomic/alter_partition,innodb.rdiff525
-rw-r--r--mysql-test/suite/atomic/alter_partition.combinations6
-rw-r--r--mysql-test/suite/atomic/alter_partition.result743
-rw-r--r--mysql-test/suite/atomic/alter_partition.test174
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_switch_stm_row_mixed.result54
-rw-r--r--mysql-test/suite/compat/oracle/r/sp-anchor-row-type-table.result2
-rw-r--r--mysql-test/suite/compat/oracle/r/sp-cursor.result4
-rw-r--r--mysql-test/suite/compat/oracle/r/sp-param.result46
-rw-r--r--mysql-test/suite/compat/oracle/r/sp-row.result8
-rw-r--r--mysql-test/suite/compat/oracle/r/sp.result14
-rw-r--r--mysql-test/suite/compat/oracle/t/sp-row.test8
-rw-r--r--mysql-test/suite/encryption/r/bulk_insert.result7
-rw-r--r--mysql-test/suite/encryption/r/corrupted_during_recovery.result2
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change.result28
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change2.result18
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change4.result8
-rw-r--r--mysql-test/suite/encryption/r/innodb-missing-key.result8
-rw-r--r--mysql-test/suite/encryption/t/bulk_insert.opt1
-rw-r--r--mysql-test/suite/encryption/t/bulk_insert.test11
-rw-r--r--mysql-test/suite/encryption/t/corrupted_during_recovery.test6
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change.test20
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change2.test10
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change4.test4
-rw-r--r--mysql-test/suite/encryption/t/innodb-missing-key.test8
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_switch_stm_row_mixed.result54
-rw-r--r--mysql-test/suite/engines/funcs/r/tc_partition_reorg_divide.result12
-rw-r--r--mysql-test/suite/engines/funcs/r/tc_partition_reorg_merge.result12
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_partition_reorg_divide.test12
-rw-r--r--mysql-test/suite/engines/funcs/t/tc_partition_reorg_merge.test12
-rw-r--r--mysql-test/suite/federated/error_row_number.result26
-rw-r--r--mysql-test/suite/federated/error_row_number.test18
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_func_view.result4
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_0102.result6
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_03.result6
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_0407.result6
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_08.result6
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_09.result6
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result6
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_innodb.result32
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_memory.result38
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_myisam.result38
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result38
-rw-r--r--mysql-test/suite/funcs_1/r/is_routines_embedded.result6
-rw-r--r--mysql-test/suite/funcs_1/r/memory_func_view.result4
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_0102.result6
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_03.result6
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_0407.result6
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_08.result6
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_09.result6
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_1011ext.result6
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_func_view.result4
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_0102.result6
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_03.result6
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_0407.result6
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_08.result6
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_09.result6
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result6
-rw-r--r--mysql-test/suite/funcs_1/r/storedproc.result192
-rw-r--r--mysql-test/suite/galera/include/have_wsrep_replicate_myisam.inc4
-rw-r--r--mysql-test/suite/galera/r/MDEV-27001.result6
-rw-r--r--mysql-test/suite/galera/r/MW-416.result12
-rw-r--r--mysql-test/suite/galera/r/galera_defaults.result8
-rw-r--r--mysql-test/suite/galera/r/galera_myisam_transactions.result8
-rw-r--r--mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result34
-rw-r--r--mysql-test/suite/galera/r/galera_var_wsrep_strict_ddl.result26
-rw-r--r--mysql-test/suite/galera/t/MDEV-27001.opt1
-rw-r--r--mysql-test/suite/galera/t/MDEV-27001.test7
-rw-r--r--mysql-test/suite/galera/t/MW-416.test12
-rw-r--r--mysql-test/suite/galera/t/galera_backup_stage.test6
-rw-r--r--mysql-test/suite/galera/t/galera_defaults.test2
-rw-r--r--mysql-test/suite/galera/t/galera_myisam_transactions.test4
-rw-r--r--mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test14
-rw-r--r--mysql-test/suite/galera/t/galera_var_wsrep_strict_ddl.test13
-rw-r--r--mysql-test/suite/galera_3nodes/r/GCF-363.result4
-rw-r--r--mysql-test/suite/galera_3nodes/t/GCF-363.test6
-rw-r--r--mysql-test/suite/gcol/inc/gcol_column_def_options.inc2
-rw-r--r--mysql-test/suite/gcol/r/gcol_keys_innodb.result2
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_index.result2
-rw-r--r--mysql-test/suite/innodb/include/have_innodb_bzip2.opt1
-rw-r--r--mysql-test/suite/innodb/include/have_innodb_lz4.opt2
-rw-r--r--mysql-test/suite/innodb/include/have_innodb_lzma.opt2
-rw-r--r--mysql-test/suite/innodb/include/have_innodb_lzo.opt2
-rw-r--r--mysql-test/suite/innodb/include/have_innodb_snappy.opt2
-rw-r--r--mysql-test/suite/innodb/r/alter_kill.result2
-rw-r--r--mysql-test/suite/innodb/r/compression_providers_loaded,lz4.rdiff19
-rw-r--r--mysql-test/suite/innodb/r/compression_providers_loaded,lzma.rdiff19
-rw-r--r--mysql-test/suite/innodb/r/compression_providers_loaded,lzo.rdiff19
-rw-r--r--mysql-test/suite/innodb/r/compression_providers_loaded,snappy.rdiff19
-rw-r--r--mysql-test/suite/innodb/r/compression_providers_loaded.result10
-rw-r--r--mysql-test/suite/innodb/r/compression_providers_unloaded,lz4.rdiff26
-rw-r--r--mysql-test/suite/innodb/r/compression_providers_unloaded,lzma.rdiff26
-rw-r--r--mysql-test/suite/innodb/r/compression_providers_unloaded,lzo.rdiff26
-rw-r--r--mysql-test/suite/innodb/r/compression_providers_unloaded,snappy.rdiff26
-rw-r--r--mysql-test/suite/innodb/r/compression_providers_unloaded.result14
-rw-r--r--mysql-test/suite/innodb/r/corrupted_during_recovery.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb-online-alter-gis.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_gis.result4
-rw-r--r--mysql-test/suite/innodb/r/insert_into_empty.result132
-rw-r--r--mysql-test/suite/innodb/r/instant_alter.result12
-rw-r--r--mysql-test/suite/innodb/t/alter_kill.test5
-rw-r--r--mysql-test/suite/innodb/t/compression_providers_loaded.combinations19
-rw-r--r--mysql-test/suite/innodb/t/compression_providers_loaded.test18
-rw-r--r--mysql-test/suite/innodb/t/compression_providers_unloaded.combinations14
-rw-r--r--mysql-test/suite/innodb/t/compression_providers_unloaded.test13
-rw-r--r--mysql-test/suite/innodb/t/corrupted_during_recovery.test4
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter.test4
-rw-r--r--mysql-test/suite/innodb/t/innodb-index-online-fk.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb-index.test15
-rw-r--r--mysql-test/suite/innodb/t/innodb-table-online.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5980-alter.test4
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug44571.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_page_compressed.combinations5
-rw-r--r--mysql-test/suite/innodb/t/insert_into_empty.test134
-rw-r--r--mysql-test/suite/innodb/t/log_corruption.test2
-rw-r--r--mysql-test/suite/innodb/t/log_file_name.test1
-rw-r--r--mysql-test/suite/innodb_gis/r/0.result4
-rw-r--r--mysql-test/suite/innodb_gis/r/1.result4
-rw-r--r--mysql-test/suite/innodb_gis/r/alter_spatial_index.result2
-rw-r--r--mysql-test/suite/innodb_gis/r/gis.result4
-rw-r--r--mysql-test/suite/innodb_gis/t/1.test4
-rw-r--r--mysql-test/suite/innodb_gis/t/gis.test4
-rw-r--r--mysql-test/suite/json/r/type_json.result58
-rw-r--r--mysql-test/suite/mariabackup/compression_providers_loaded,lz4.rdiff13
-rw-r--r--mysql-test/suite/mariabackup/compression_providers_loaded,lzma.rdiff13
-rw-r--r--mysql-test/suite/mariabackup/compression_providers_loaded,lzo.rdiff13
-rw-r--r--mysql-test/suite/mariabackup/compression_providers_loaded,snappy.rdiff13
-rw-r--r--mysql-test/suite/mariabackup/compression_providers_loaded.combinations14
-rw-r--r--mysql-test/suite/mariabackup/compression_providers_loaded.result27
-rw-r--r--mysql-test/suite/mariabackup/compression_providers_loaded.test38
-rw-r--r--mysql-test/suite/mariabackup/compression_providers_unloaded,lz4.rdiff22
-rw-r--r--mysql-test/suite/mariabackup/compression_providers_unloaded,lzma.rdiff22
-rw-r--r--mysql-test/suite/mariabackup/compression_providers_unloaded,lzo.rdiff22
-rw-r--r--mysql-test/suite/mariabackup/compression_providers_unloaded,snappy.rdiff22
-rw-r--r--mysql-test/suite/mariabackup/compression_providers_unloaded.combinations14
-rw-r--r--mysql-test/suite/mariabackup/compression_providers_unloaded.result22
-rw-r--r--mysql-test/suite/mariabackup/compression_providers_unloaded.test35
-rw-r--r--mysql-test/suite/mariabackup/incremental_page_compressed.result13
-rw-r--r--mysql-test/suite/mariabackup/incremental_page_compressed.test38
-rw-r--r--mysql-test/suite/multi_source/change_master.result8
-rw-r--r--mysql-test/suite/multi_source/change_master.test13
-rw-r--r--mysql-test/suite/multi_source/multisource_for_channel.result366
-rw-r--r--mysql-test/suite/multi_source/multisource_for_channel.test429
-rw-r--r--mysql-test/suite/parts/inc/engines.combinations8
-rw-r--r--mysql-test/suite/parts/inc/engines.inc4
-rw-r--r--mysql-test/suite/parts/inc/partition.pre2
-rw-r--r--mysql-test/suite/parts/inc/partition_alter_1.inc6
-rw-r--r--mysql-test/suite/parts/inc/partition_fail.inc11
-rw-r--r--mysql-test/suite/parts/inc/partition_fail_t2.inc20
-rw-r--r--mysql-test/suite/parts/r/alter_table,list.rdiff85
-rw-r--r--mysql-test/suite/parts/r/alter_table.result316
-rw-r--r--mysql-test/suite/parts/r/debug_innodb_fail.result279
-rw-r--r--mysql-test/suite/parts/r/debug_myisam_fail.result279
-rw-r--r--mysql-test/suite/parts/r/partition_alter4_innodb.result160
-rw-r--r--mysql-test/suite/parts/r/partition_alter4_myisam.result160
-rw-r--r--mysql-test/suite/parts/r/partition_debug.result3478
-rw-r--r--mysql-test/suite/parts/r/partition_debug_innodb.result252
-rw-r--r--mysql-test/suite/parts/t/alter_table.combinations2
-rw-r--r--mysql-test/suite/parts/t/alter_table.test273
-rw-r--r--mysql-test/suite/parts/t/partition_debug.test111
-rw-r--r--mysql-test/suite/perfschema/r/digest_view.result50
-rw-r--r--mysql-test/suite/perfschema/r/max_program_zero.result2
-rw-r--r--mysql-test/suite/perfschema/r/misc.result13
-rw-r--r--mysql-test/suite/perfschema/r/ortho_iter.result2
-rw-r--r--mysql-test/suite/perfschema/r/privilege_table_io.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_idle.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_stages.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_statements.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_transactions.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_waits.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_innodb.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_low_digest_sql_length.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_low_index.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_low_table_lock.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_account.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_cond_class.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_cond_inst.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_file_class.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_file_inst.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_host.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_index.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_mdl.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_memory_class.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_mutex_class.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_setup_actors.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_setup_objects.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_socket_class.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_socket_inst.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_stage_class.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_stages_history.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_statements_history.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_table_hdl.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_table_inst.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_table_lock.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_thread_class.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_thread_inst.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_transactions_history.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_user.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_waits_history.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_off.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_on.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_variables.result2
-rw-r--r--mysql-test/suite/perfschema/r/statement_program_lost_inst.result2
-rw-r--r--mysql-test/suite/perfschema/t/misc.test20
-rw-r--r--mysql-test/suite/plugins/r/auth_ed25519.result2
-rw-r--r--mysql-test/suite/plugins/r/compression,innodb-lz4.rdiff24
-rw-r--r--mysql-test/suite/plugins/r/compression,innodb-lzma.rdiff24
-rw-r--r--mysql-test/suite/plugins/r/compression,innodb-lzo.rdiff24
-rw-r--r--mysql-test/suite/plugins/r/compression,innodb-snappy.rdiff24
-rw-r--r--mysql-test/suite/plugins/r/compression,mroonga-lz4.rdiff40
-rw-r--r--mysql-test/suite/plugins/r/compression.result22
-rw-r--r--mysql-test/suite/plugins/r/compression_load.result33
-rw-r--r--mysql-test/suite/plugins/r/cracklib_password_check.result16
-rw-r--r--mysql-test/suite/plugins/r/password_reuse_check.result94
-rw-r--r--mysql-test/suite/plugins/r/show_all_plugins.result4
-rw-r--r--mysql-test/suite/plugins/r/simple_password_check.result4
-rw-r--r--mysql-test/suite/plugins/r/test_sql_service.result95
-rw-r--r--mysql-test/suite/plugins/t/compression.combinations29
-rw-r--r--mysql-test/suite/plugins/t/compression.test52
-rw-r--r--mysql-test/suite/plugins/t/compression_load.test24
-rw-r--r--mysql-test/suite/plugins/t/cracklib_password_check.test8
-rw-r--r--mysql-test/suite/plugins/t/password_reuse_check.test100
-rw-r--r--mysql-test/suite/plugins/t/test_sql_service.test66
-rw-r--r--mysql-test/suite/roles/definer.result7
-rw-r--r--mysql-test/suite/rpl/include/rpl_extra_col_master.test2
-rw-r--r--mysql-test/suite/rpl/include/rpl_mixed_dml.inc18
-rw-r--r--mysql-test/suite/rpl/include/rpl_switch_stm_row_mixed.inc60
-rw-r--r--mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result30
-rw-r--r--mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result54
-rw-r--r--mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result6
-rw-r--r--mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test6
-rw-r--r--mysql-test/suite/s3/mysqldump.result6
-rw-r--r--mysql-test/suite/sql_sequence/mysqldump.result16
-rw-r--r--mysql-test/suite/sys_vars/r/default_tmp_storage_engine_rocksdb.result102
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_purge_threads_basic.result25
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff9
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb.result4
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_wsrep.result30
-rw-r--r--mysql-test/suite/sys_vars/t/default_tmp_storage_engine_rocksdb.test86
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_purge_threads_basic.test14
-rw-r--r--mysql-test/suite/sysschema/r/pr_statement_performance_analyzer.result4
-rw-r--r--mysql-test/suite/sysschema/r/pr_table_exists.result2
-rw-r--r--mysql-test/suite/vcol/r/binlog.result2
-rw-r--r--mysql-test/suite/versioning/r/data.result59
-rw-r--r--mysql-test/suite/versioning/r/partition,heap.rdiff86
-rw-r--r--mysql-test/suite/versioning/r/partition.result372
-rw-r--r--mysql-test/suite/versioning/t/alter.test4
-rw-r--r--mysql-test/suite/versioning/t/create.test6
-rw-r--r--mysql-test/suite/versioning/t/data.test32
-rw-r--r--mysql-test/suite/versioning/t/partition.test206
-rw-r--r--mysql-test/suite/wsrep/r/variables.result4
-rw-r--r--mysql-test/suite/wsrep/r/variables_debug.result3
387 files changed, 18622 insertions, 2056 deletions
diff --git a/mysql-test/collections/skip_list_ubsan.txt b/mysql-test/collections/skip_list_ubsan.txt
new file mode 100644
index 00000000000..dc178574293
--- /dev/null
+++ b/mysql-test/collections/skip_list_ubsan.txt
@@ -0,0 +1,3 @@
+binlog.binlog_truncate_active_log : MDEV-26919 - undefined value
+main.json_normalize : MDEV-27415 - out of bounds
+main.json_equals : MDEV-27415 - out of bounds
diff --git a/mysql-test/include/binlog_combinations.combinations b/mysql-test/include/binlog_combinations.combinations
new file mode 100644
index 00000000000..07042c2cbec
--- /dev/null
+++ b/mysql-test/include/binlog_combinations.combinations
@@ -0,0 +1,8 @@
+[row]
+binlog-format=row
+
+[stmt]
+binlog-format=statement
+
+[mix]
+binlog-format=mixed
diff --git a/mysql-test/include/binlog_combinations.inc b/mysql-test/include/binlog_combinations.inc
new file mode 100644
index 00000000000..2ddd787681a
--- /dev/null
+++ b/mysql-test/include/binlog_combinations.inc
@@ -0,0 +1,5 @@
+# The goal of including this file is to test with different
+# binlog combinations: row, stmt or mix
+# (see include/binlog_combinations.combinations)
+
+--source include/have_log_bin.inc
diff --git a/mysql-test/include/ctype_ascii_order.inc b/mysql-test/include/ctype_ascii_order.inc
index 93127a7195f..b85cab687ae 100644
--- a/mysql-test/include/ctype_ascii_order.inc
+++ b/mysql-test/include/ctype_ascii_order.inc
@@ -4,11 +4,16 @@ drop table if exists t1;
create table t1 select repeat('a',10) as c1;
delete from t1;
+insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
+insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
insert into t1 values (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27),(0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
insert into t1 values (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37),(0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
insert into t1 values (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47),(0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
insert into t1 values (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57),(0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
insert into t1 values (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67),(0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
insert into t1 values (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77),(0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
-SELECT GROUP_CONCAT(c1 ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM t1 GROUP BY c1;
+create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1;
+select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1';
+SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1;
drop table t1;
+drop view v1;
diff --git a/mysql-test/include/gis_generic.inc b/mysql-test/include/gis_generic.inc
index 8209240614e..c693b86b896 100644
--- a/mysql-test/include/gis_generic.inc
+++ b/mysql-test/include/gis_generic.inc
@@ -180,9 +180,9 @@ insert IGNORE into t1 (a) values ('Garbage');
drop table t1;
create table t1 (pk integer primary key auto_increment, fl geometry not null);
---error 1416
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
insert into t1 (fl) values (1);
---error 1416
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
insert into t1 (fl) values (1.11);
--error 1416
insert into t1 (fl) values ("qwerty");
diff --git a/mysql-test/include/lcase_names.combinations b/mysql-test/include/lcase_names.combinations
new file mode 100644
index 00000000000..7fd344eab3f
--- /dev/null
+++ b/mysql-test/include/lcase_names.combinations
@@ -0,0 +1,5 @@
+[lcase_def]
+[lcase1]
+lower_case_table_names=1
+[lcase2]
+lower_case_table_names=2
diff --git a/mysql-test/include/lcase_names.inc b/mysql-test/include/lcase_names.inc
new file mode 100644
index 00000000000..983e2678d29
--- /dev/null
+++ b/mysql-test/include/lcase_names.inc
@@ -0,0 +1,2 @@
+# The goal of including this file is to test with different
+# lower_case_table_names modes (see include/lcase_name.combinations)
diff --git a/mysql-test/include/mtr_check.sql b/mysql-test/include/mtr_check.sql
index b330ff448a4..5d73d1f59f1 100644
--- a/mysql-test/include/mtr_check.sql
+++ b/mysql-test/include/mtr_check.sql
@@ -99,7 +99,8 @@ BEGIN
mysql.global_priv;
-- verify that no plugin changed its disabled/enabled state
- SELECT * FROM INFORMATION_SCHEMA.PLUGINS;
+ SELECT * FROM INFORMATION_SCHEMA.PLUGINS
+ WHERE PLUGIN_STATUS != 'INACTIVE';
select * from information_schema.session_variables
where variable_name = 'debug_sync';
diff --git a/mysql-test/include/show_slave_status.inc b/mysql-test/include/show_slave_status.inc
index ba2e1b0c48a..429ed8a5abd 100644
--- a/mysql-test/include/show_slave_status.inc
+++ b/mysql-test/include/show_slave_status.inc
@@ -102,6 +102,10 @@ if ($all_slaves_status)
if ($slave_name)
{
--let $_show_query=SHOW SLAVE $slave_name STATUS
+ if ($for_channel)
+ {
+ --let $_show_query=SHOW SLAVE STATUS for channel $slave_name
+ }
}
diff --git a/mysql-test/include/type_mix_incompatible.inc b/mysql-test/include/type_mix_incompatible.inc
new file mode 100644
index 00000000000..92a75be6e81
--- /dev/null
+++ b/mysql-test/include/type_mix_incompatible.inc
@@ -0,0 +1,252 @@
+--echo # Start of type_store_assignment_incompatible.inc
+
+--disable_abort_on_error
+
+SET @sql_mode_save= @@sql_mode;
+
+SET @source_type= (SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS
+ WHERE COLUMN_NAME='source'
+ AND TABLE_NAME='t1'
+ AND TABLE_SCHEMA='test');
+
+SET @target_type= (SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS
+ WHERE COLUMN_NAME='target'
+ AND TABLE_NAME='t1'
+ AND TABLE_SCHEMA='test');
+
+# 'IGNORE' -> ' IGNORE'
+SET @ignore= CASE WHEN @ignore IS NULL OR @ignore = '' THEN ''
+ WHEN @ignore NOT LIKE ' %' THEN CONCAT(' ',@ignore)
+ ELSE @ignore
+ END;
+
+let $source_type= `(SELECT @source_type)`;
+let $target_type= `(SELECT @target_type)`;
+let $ignore=`(SELECT @ignore)`;
+
+CREATE TABLE t2 LIKE t1;
+ALTER TABLE t2 ADD id INT NOT NULL PRIMARY KEY FIRST;
+INSERT INTO t2 VALUES (1,DEFAULT,DEFAULT);
+SHOW CREATE TABLE t2;
+
+#
+# Single row INSERT..VALUES
+#
+
+CREATE TABLE t3 LIKE t2;
+eval INSERT$ignore INTO t3 VALUES
+ (1,
+ (SELECT source FROM t2 ORDER BY id LIMIT 1),
+ (SELECT source FROM t2 ORDER BY id LIMIT 1));
+DROP TABLE t3;
+
+#
+# Multi-row INSERT..VALUES
+#
+
+# INSERT .. VALUES checks assignment compatibility for the first row only.
+# Here the first row is compatible, so no error happens.
+# The second row is not compatible. It works according to the
+# current sql_mode and the table transaction ability, so it can:
+# (a) either raise a warning
+# (b) or escalate a warning to an error and abort on the current row
+# (c) or escalate a warning to an error and rollback
+# Here we test (a) and (b).
+
+SET sql_mode='';
+CREATE TABLE t3 LIKE t2;
+ALTER TABLE t3 ENGINE=MyISAM;
+EXECUTE IMMEDIATE
+ CONCAT('CREATE VIEW v3 AS SELECT id,',
+ IF(@target_type='geometry','AsText(target)','target'), ' AS target,',
+ IF(@source_type='geometry','AsText(source)','source'), ' AS source ',
+ ' FROM t3');
+
+eval INSERT$ignore INTO t3 VALUES
+ (1,
+ (SELECT target FROM t2 ORDER BY id LIMIT 1),
+ (SELECT source FROM t2 ORDER BY id LIMIT 1)),
+ (2,
+ (SELECT source FROM t2 ORDER BY id LIMIT 1),
+ (SELECT source FROM t2 ORDER BY id LIMIT 1));
+SELECT * FROM v3;
+TRUNCATE TABLE t3;
+
+SET sql_mode=STRICT_ALL_TABLES;
+eval INSERT$ignore INTO t3 VALUES
+ (1,
+ (SELECT target FROM t2 ORDER BY id LIMIT 1),
+ (SELECT source FROM t2 ORDER BY id LIMIT 1)),
+ (2,
+ (SELECT source FROM t2 ORDER BY id LIMIT 1),
+ (SELECT source FROM t2 ORDER BY id LIMIT 1));
+SELECT * FROM v3;
+TRUNCATE TABLE t3;
+SET sql_mode=@sql_mode_save;
+DROP TABLE t3;
+DROP VIEW v3;
+
+#
+# INSERT .. SELECT
+#
+
+CREATE TABLE t3 LIKE t2;
+eval INSERT$ignore INTO t3 SELECT id,source,source FROM t2;
+
+eval INSERT$ignore INTO t3 (id,target,source) SELECT id,source,source FROM t2;
+
+#
+# INSERT .. VALUES .. ON DUPLICATE KEY UPDATE target=source
+#
+
+eval INSERT$ignore INTO t3 VALUES (1,DEFAULT,DEFAULT) ON DUPLICATE KEY UPDATE target=source;
+
+eval INSERT$ignore INTO t3 (id,target,source) VALUES (1,DEFAULT,DEFAULT) ON DUPLICATE KEY UPDATE target=source;
+
+#
+# INSERT .. SELECT .. ON DUPLICATE KEY UPDATE target=source
+#
+
+eval INSERT$ignore INTO t3 SELECT 1,DEFAULT(t2.target),DEFAULT(t2.source) FROM t2 ON DUPLICATE KEY UPDATE t3.target=t2.source;
+
+eval INSERT$ignore INTO t3 (id,target,source) SELECT 1,DEFAULT(t2.target),DEFAULT(t2.source) FROM t2 ON DUPLICATE KEY UPDATE t3.target=t2.source;
+
+
+#
+# UPDATE
+#
+eval UPDATE$ignore t3 SET target=source;
+
+
+#
+# UPDATE, multi-table
+#
+
+eval UPDATE$ignore t2, t3 SET t3.target=t2.source WHERE t2.id=t3.id;
+
+
+#
+# ALTER
+#
+
+SET @alter=CONCAT('ALTER', @ignore, ' TABLE t3 MODIFY target ', @source_type);
+SELECT @alter;
+EXECUTE IMMEDIATE @alter;
+
+
+DROP TABLE t3;
+DROP TABLE t2;
+
+#
+# MDEV-28963 Incompatible data type assignment through SP vars is not consistent with columns
+#
+
+#
+# SP local variables
+#
+DELIMITER $$;
+eval CREATE PROCEDURE p1()
+BEGIN
+ DECLARE src $source_type DEFAULT NULL;
+ DECLARE dst $target_type DEFAULT NULL;
+ SET dst=src;
+END;
+$$
+DELIMITER ;$$
+CALL p1;
+DROP PROCEDURE p1;
+
+#
+# SP IN parameters
+#
+
+--eval CREATE FUNCTION f1(a $target_type) RETURNS INT RETURN NULL;
+SELECT f1((SELECT source FROM t1 ORDER BY source LIMIT 1));
+DROP FUNCTION f1;
+
+--eval CREATE PROCEDURE p1(a $target_type) BEGIN END;
+CALL p1((SELECT source FROM t1 ORDER BY source LIMIT 1));
+DROP PROCEDURE p1;
+
+#
+# SP OUT parameters
+#
+
+DELIMITER $$;
+eval CREATE PROCEDURE p1(OUT dst $target_type)
+BEGIN
+ DECLARE src $source_type DEFAULT NULL;
+ SET dst=src;
+END;
+$$
+eval CREATE PROCEDURE p2()
+BEGIN
+ DECLARE dst $target_type DEFAULT NULL;
+ CALL p1(dst);
+END;
+$$
+DELIMITER ;$$
+CALL p2();
+SHOW WARNINGS;
+DROP PROCEDURE p2;
+DROP PROCEDURE p1;
+
+
+#
+# SF RETURN
+#
+
+DELIMITER $$;
+eval CREATE FUNCTION f1() RETURNS $target_type
+BEGIN
+ DECLARE rc $source_type DEFAULT NULL;
+ RETURN rc;
+END;
+$$
+DELIMITER ;$$
+SELECT f1();
+DROP FUNCTION f1;
+
+#
+# Cursor IN parameters
+#
+
+DELIMITER $$;
+eval CREATE PROCEDURE p1()
+BEGIN
+ DECLARE src $source_type DEFAULT NULL;
+ DECLARE cur1 CURSOR(t $target_type) FOR SELECT * FROM t1 WHERE target=t;
+ OPEN cur1(src);
+ CLOSE cur1;
+END;
+$$
+DELIMITER ;$$
+CALL p1();
+DROP PROCEDURE p1;
+
+#
+# FETCH
+#
+
+CREATE TABLE t2 LIKE t1;
+INSERT INTO t2 VALUES ();
+
+DELIMITER $$;
+eval CREATE PROCEDURE p1()
+BEGIN
+ DECLARE dst $target_type DEFAULT NULL;
+ DECLARE cur2 CURSOR FOR SELECT source FROM t2 ORDER BY source LIMIT 1;
+ OPEN cur2;
+ FETCH cur2 INTO dst;
+ CLOSE cur2;
+END;
+$$
+DELIMITER ;$$
+CALL p1();
+DROP PROCEDURE p1;
+
+DROP TABLE t2;
+
+--enable_abort_on_error
+
+--echo # End of type_store_assignment_incompatible.inc
diff --git a/mysql-test/include/wait_for_sql_thread_read_all.inc b/mysql-test/include/wait_for_sql_thread_read_all.inc
index 1bbb006f3a8..1829591c5d1 100644
--- a/mysql-test/include/wait_for_sql_thread_read_all.inc
+++ b/mysql-test/include/wait_for_sql_thread_read_all.inc
@@ -1,6 +1,12 @@
+# This script ensures that a slave has executed everything in the relay log
+# files. This can be used to ensure slave is in a predicate place after
+# a FLUSH RELAY LOGS command.
+# Note that this script does not guarantee that the slave has read everything
+# from the master(s). If this is needed on should use the sync_with_master
+# command or the sync_with_master script.
+
--let $show_statement = show all slaves status
--let $field = Slave_SQL_State
--let $condition = = 'Slave has read all relay log; waiting for more updates'
--let $wait_for_all = 1
--source include/wait_show_condition.inc
-
diff --git a/mysql-test/main/alter_table.result b/mysql-test/main/alter_table.result
index 21998597cad..879bc0edfec 100644
--- a/mysql-test/main/alter_table.result
+++ b/mysql-test/main/alter_table.result
@@ -3093,3 +3093,18 @@ drop table t1;
#
# End of 10.5 tests
#
+#
+# MDEV-26767 Server crashes when rename table and alter storage engine
+#
+alter table txxx engine=innodb, rename to tyyy;
+ERROR 42S02: Table 'test.txxx' doesn't exist
+#
+# MDEV-27048 UBSAN: runtime error: shift exponent 32 is too large for 32-bit type 'unsigned int'
+#
+CREATE TABLE t (a INT,b INT,c INT,x TEXT,y TEXT,z TEXT,id INT UNSIGNED AUTO_INCREMENT,i INT,KEY(id),UNIQUE KEY a (a,b,c));
+ALTER TABLE t ADD CONSTRAINT test UNIQUE (id) USING HASH;
+ERROR HY000: Function or expression 'AUTO_INCREMENT' cannot be used in the USING HASH clause of `id`
+DROP TABLE t;
+#
+# End of 10.7 tests
+#
diff --git a/mysql-test/main/alter_table.test b/mysql-test/main/alter_table.test
index 5eb6cdb0f9d..37ab6260b9f 100644
--- a/mysql-test/main/alter_table.test
+++ b/mysql-test/main/alter_table.test
@@ -1966,7 +1966,7 @@ show create table t1;
drop table t1;
create table t1 (a int, b int, c int, unique(a,b));
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
alter table t1 drop column a;
alter table t1 drop column a, drop index a;
show create table t1;
@@ -2380,3 +2380,21 @@ drop table t1;
--echo #
--echo # End of 10.5 tests
--echo #
+
+--echo #
+--echo # MDEV-26767 Server crashes when rename table and alter storage engine
+--echo #
+--error ER_NO_SUCH_TABLE
+alter table txxx engine=innodb, rename to tyyy;
+
+--echo #
+--echo # MDEV-27048 UBSAN: runtime error: shift exponent 32 is too large for 32-bit type 'unsigned int'
+--echo #
+CREATE TABLE t (a INT,b INT,c INT,x TEXT,y TEXT,z TEXT,id INT UNSIGNED AUTO_INCREMENT,i INT,KEY(id),UNIQUE KEY a (a,b,c));
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+ALTER TABLE t ADD CONSTRAINT test UNIQUE (id) USING HASH;
+DROP TABLE t;
+
+--echo #
+--echo # End of 10.7 tests
+--echo #
diff --git a/mysql-test/main/alter_table_combinations.result b/mysql-test/main/alter_table_combinations.result
index e050fe6655d..cd47c78d404 100644
--- a/mysql-test/main/alter_table_combinations.result
+++ b/mysql-test/main/alter_table_combinations.result
@@ -226,7 +226,7 @@ Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function
SELECT * FROM v1;
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
UPDATE t2 SET f = f + 10;
-ERROR 42S22: Unknown column 'd' in 'OLD'
+ERROR 42S22: Unknown column 'd' in 'NEW'
CALL sp1();
ERROR 42S22: Unknown column 'd' in 'field list'
DROP TRIGGER trg1;
diff --git a/mysql-test/main/assign_key_cache.result b/mysql-test/main/assign_key_cache.result
index 4ed6170136b..32d7bc2c0b8 100644
--- a/mysql-test/main/assign_key_cache.result
+++ b/mysql-test/main/assign_key_cache.result
@@ -3,7 +3,7 @@ create table t1 (i int) engine=myisam partition by hash (i) partitions 2;
xa start 'xid';
cache index t1 partition (non_existing_partition) in my_cache;
Table Op Msg_type Msg_text
-test.t1 assign_to_keycache error Error in list of partitions to test.t1
+test.t1 assign_to_keycache error Wrong partition name or partition list
cache index t1 partition (p1) in my_cache;
Table Op Msg_type Msg_text
test.t1 assign_to_keycache status OK
diff --git a/mysql-test/main/count_distinct.result b/mysql-test/main/count_distinct.result
index 760b2710586..037674aa66a 100644
--- a/mysql-test/main/count_distinct.result
+++ b/mysql-test/main/count_distinct.result
@@ -1,4 +1,3 @@
-drop table if exists t1,t2,t3;
create table t1 (libname varchar(21) not null, city text, primary key (libname));
create table t2 (isbn varchar(21) not null, author text, title text, primary key (isbn));
create table t3 (isbn varchar(21) not null, libname varchar(21) not null, quantity int ,primary key (isbn,libname));
@@ -131,3 +130,16 @@ count(distinct a)
10
drop table t1;
set @@tmp_table_size = default;
+#
+# End of 5.5 tests
+#
+#
+# MDEV-26452 SIGSEGV in Item::cleanup from Item::cleanup_processor
+#
+create table t (a int,b date,primary key(a,b));
+select b,count(distinct a) from t group by b having b is null;
+b count(distinct a)
+drop table t;
+#
+# End of 10.7 tests
+#
diff --git a/mysql-test/main/count_distinct.test b/mysql-test/main/count_distinct.test
index 86045e862e7..9f682af3d63 100644
--- a/mysql-test/main/count_distinct.test
+++ b/mysql-test/main/count_distinct.test
@@ -2,10 +2,6 @@
# Problem with count(distinct)
#
---disable_warnings
-drop table if exists t1,t2,t3;
---enable_warnings
-
create table t1 (libname varchar(21) not null, city text, primary key (libname));
create table t2 (isbn varchar(21) not null, author text, title text, primary key (isbn));
create table t3 (isbn varchar(21) not null, libname varchar(21) not null, quantity int ,primary key (isbn,libname));
@@ -149,6 +145,17 @@ select count(distinct a) from t1;
drop table t1;
set @@tmp_table_size = default;
-#
-# End of 5.5 tests
-#
+--echo #
+--echo # End of 5.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-26452 SIGSEGV in Item::cleanup from Item::cleanup_processor
+--echo #
+create table t (a int,b date,primary key(a,b));
+select b,count(distinct a) from t group by b having b is null;
+drop table t;
+
+--echo #
+--echo # End of 10.7 tests
+--echo #
diff --git a/mysql-test/main/create.test b/mysql-test/main/create.test
index 5f84e282570..a6364e5217e 100644
--- a/mysql-test/main/create.test
+++ b/mysql-test/main/create.test
@@ -741,7 +741,7 @@ create table t1 select * from t1;
--error ER_CANT_AGGREGATE_2COLLATIONS
create table t1 select coalesce('a' collate latin1_swedish_ci,'b' collate latin1_bin);
# Error during table creation
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
create table t1 (primary key(a)) select "b" as b;
# Error in select_create::prepare() which is not related to table creation
create table t1 (a int);
diff --git a/mysql-test/main/ctype_big5.result b/mysql-test/main/ctype_big5.result
index 4aec26214df..b2abca5df7a 100644
--- a/mysql-test/main/ctype_big5.result
+++ b/mysql-test/main/ctype_big5.result
@@ -246,14 +246,53 @@ DROP TABLE t1;
drop table if exists t1;
create table t1 select repeat('a',10) as c1;
delete from t1;
+insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
+insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
insert into t1 values (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27),(0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
insert into t1 values (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37),(0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
insert into t1 values (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47),(0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
insert into t1 values (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57),(0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
insert into t1 values (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67),(0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
insert into t1 values (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77),(0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
-SELECT GROUP_CONCAT(c1 ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM t1 GROUP BY c1;
-GROUP_CONCAT(c1 ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1)
+create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1;
+select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1';
+column_name collation_name
+c1 big5_chinese_ci
+name big5_chinese_ci
+SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1;
+GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1)
+<00> 00
+<01> 01
+<02> 02
+<03> 03
+<04> 04
+<05> 05
+<06> 06
+<07> 07
+<08> 08
+<09> 09
+<0A> 0A
+<0B> 0B
+<0C> 0C
+<0D> 0D
+<0E> 0E
+<0F> 0F
+<10> 10
+<11> 11
+<12> 12
+<13> 13
+<14> 14
+<15> 15
+<16> 16
+<17> 17
+<18> 18
+<19> 19
+<1A> 1A
+<1B> 1B
+<1C> 1C
+<1D> 1D
+<1E> 1E
+<1F> 1F
20
! 21
" 22
@@ -321,8 +360,9 @@ _ 5F
{ 7B
| 7C
} 7D
- 7F
+<7F> 7F
drop table t1;
+drop view v1;
SELECT strcmp('a','a '), strcmp('a ','a');
strcmp('a','a ') strcmp('a ','a')
0 0
@@ -479,6 +519,154 @@ a hex(b) c
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
+drop table if exists t1;
+create table t1 select repeat('a',10) as c1;
+delete from t1;
+insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
+insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
+insert into t1 values (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27),(0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
+insert into t1 values (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37),(0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
+insert into t1 values (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47),(0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
+insert into t1 values (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57),(0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
+insert into t1 values (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67),(0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
+insert into t1 values (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77),(0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
+create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1;
+select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1';
+column_name collation_name
+c1 big5_bin
+name big5_bin
+SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1;
+GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1)
+<00> 00
+<01> 01
+<02> 02
+<03> 03
+<04> 04
+<05> 05
+<06> 06
+<07> 07
+<08> 08
+<09> 09
+<0A> 0A
+<0B> 0B
+<0C> 0C
+<0D> 0D
+<0E> 0E
+<0F> 0F
+<10> 10
+<11> 11
+<12> 12
+<13> 13
+<14> 14
+<15> 15
+<16> 16
+<17> 17
+<18> 18
+<19> 19
+<1A> 1A
+<1B> 1B
+<1C> 1C
+<1D> 1D
+<1E> 1E
+<1F> 1F
+ 20
+! 21
+" 22
+# 23
+$ 24
+% 25
+& 26
+' 27
+( 28
+) 29
+* 2A
++ 2B
+, 2C
+- 2D
+. 2E
+/ 2F
+0 30
+1 31
+2 32
+3 33
+4 34
+5 35
+6 36
+7 37
+8 38
+9 39
+: 3A
+; 3B
+< 3C
+= 3D
+> 3E
+? 3F
+@ 40
+A 41
+B 42
+C 43
+D 44
+E 45
+F 46
+G 47
+H 48
+I 49
+J 4A
+K 4B
+L 4C
+M 4D
+N 4E
+O 4F
+P 50
+Q 51
+R 52
+S 53
+T 54
+U 55
+V 56
+W 57
+X 58
+Y 59
+Z 5A
+[ 5B
+\ 5C
+] 5D
+^ 5E
+_ 5F
+` 60
+a 61
+b 62
+c 63
+d 64
+e 65
+f 66
+g 67
+h 68
+i 69
+j 6A
+k 6B
+l 6C
+m 6D
+n 6E
+o 6F
+p 70
+q 71
+r 72
+s 73
+t 74
+u 75
+v 76
+w 77
+x 78
+y 79
+z 7A
+{ 7B
+| 7C
+} 7D
+~ 7E
+<7F> 7F
+drop table t1;
+drop view v1;
SELECT strcmp('a','a '), strcmp('a ','a');
strcmp('a','a ') strcmp('a ','a')
0 0
diff --git a/mysql-test/main/ctype_big5.test b/mysql-test/main/ctype_big5.test
index 180fa1690fa..b43b734c063 100644
--- a/mysql-test/main/ctype_big5.test
+++ b/mysql-test/main/ctype_big5.test
@@ -25,6 +25,7 @@ SET collation_connection='big5_bin';
-- source include/ctype_innodb_like.inc
-- source include/ctype_like_escape.inc
-- source include/ctype_like_range_f1f2.inc
+-- source include/ctype_ascii_order.inc
-- source include/ctype_pad_space.inc
#
diff --git a/mysql-test/main/ctype_cp932.result b/mysql-test/main/ctype_cp932.result
index 08c94abf74d..47b3cbc12f8 100644
--- a/mysql-test/main/ctype_cp932.result
+++ b/mysql-test/main/ctype_cp932.result
@@ -598,6 +598,281 @@ SET DEFAULT_STORAGE_ENGINE=Default;
# End of 10.2 tests
#
#
+# General tests
+#
+SET NAMES cp932;
+drop table if exists t1;
+create table t1 select repeat('a',10) as c1;
+delete from t1;
+insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
+insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
+insert into t1 values (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27),(0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
+insert into t1 values (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37),(0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
+insert into t1 values (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47),(0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
+insert into t1 values (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57),(0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
+insert into t1 values (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67),(0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
+insert into t1 values (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77),(0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
+create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1;
+select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1';
+column_name collation_name
+c1 cp932_japanese_ci
+name cp932_japanese_ci
+SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1;
+GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1)
+<00> 00
+<01> 01
+<02> 02
+<03> 03
+<04> 04
+<05> 05
+<06> 06
+<07> 07
+<08> 08
+<09> 09
+<0A> 0A
+<0B> 0B
+<0C> 0C
+<0D> 0D
+<0E> 0E
+<0F> 0F
+<10> 10
+<11> 11
+<12> 12
+<13> 13
+<14> 14
+<15> 15
+<16> 16
+<17> 17
+<18> 18
+<19> 19
+<1A> 1A
+<1B> 1B
+<1C> 1C
+<1D> 1D
+<1E> 1E
+<1F> 1F
+ 20
+! 21
+" 22
+# 23
+$ 24
+% 25
+& 26
+' 27
+( 28
+) 29
+* 2A
++ 2B
+, 2C
+- 2D
+. 2E
+/ 2F
+0 30
+1 31
+2 32
+3 33
+4 34
+5 35
+6 36
+7 37
+8 38
+9 39
+: 3A
+; 3B
+< 3C
+= 3D
+> 3E
+? 3F
+@ 40
+Aa 41,61
+Bb 42,62
+Cc 43,63
+Dd 44,64
+Ee 45,65
+Ff 46,66
+Gg 47,67
+Hh 48,68
+Ii 49,69
+Jj 4A,6A
+Kk 4B,6B
+Ll 4C,6C
+Mm 4D,6D
+Nn 4E,6E
+Oo 4F,6F
+Pp 50,70
+Qq 51,71
+Rr 52,72
+Ss 53,73
+Tt 54,74
+Uu 55,75
+Vv 56,76
+Ww 57,77
+Xx 58,78
+Yy 59,79
+Zz 5A,7A
+[ 5B
+\ 5C
+] 5D
+^ 5E
+_ 5F
+` 60
+{ 7B
+| 7C
+} 7D
+~ 7E
+<7F> 7F
+drop table t1;
+drop view v1;
+SET NAMES cp932 COLLATE cp932_bin;
+drop table if exists t1;
+create table t1 select repeat('a',10) as c1;
+delete from t1;
+insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
+insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
+insert into t1 values (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27),(0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
+insert into t1 values (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37),(0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
+insert into t1 values (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47),(0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
+insert into t1 values (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57),(0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
+insert into t1 values (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67),(0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
+insert into t1 values (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77),(0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
+create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1;
+select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1';
+column_name collation_name
+c1 cp932_bin
+name cp932_bin
+SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1;
+GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1)
+<00> 00
+<01> 01
+<02> 02
+<03> 03
+<04> 04
+<05> 05
+<06> 06
+<07> 07
+<08> 08
+<09> 09
+<0A> 0A
+<0B> 0B
+<0C> 0C
+<0D> 0D
+<0E> 0E
+<0F> 0F
+<10> 10
+<11> 11
+<12> 12
+<13> 13
+<14> 14
+<15> 15
+<16> 16
+<17> 17
+<18> 18
+<19> 19
+<1A> 1A
+<1B> 1B
+<1C> 1C
+<1D> 1D
+<1E> 1E
+<1F> 1F
+ 20
+! 21
+" 22
+# 23
+$ 24
+% 25
+& 26
+' 27
+( 28
+) 29
+* 2A
++ 2B
+, 2C
+- 2D
+. 2E
+/ 2F
+0 30
+1 31
+2 32
+3 33
+4 34
+5 35
+6 36
+7 37
+8 38
+9 39
+: 3A
+; 3B
+< 3C
+= 3D
+> 3E
+? 3F
+@ 40
+A 41
+B 42
+C 43
+D 44
+E 45
+F 46
+G 47
+H 48
+I 49
+J 4A
+K 4B
+L 4C
+M 4D
+N 4E
+O 4F
+P 50
+Q 51
+R 52
+S 53
+T 54
+U 55
+V 56
+W 57
+X 58
+Y 59
+Z 5A
+[ 5B
+\ 5C
+] 5D
+^ 5E
+_ 5F
+` 60
+a 61
+b 62
+c 63
+d 64
+e 65
+f 66
+g 67
+h 68
+i 69
+j 6A
+k 6B
+l 6C
+m 6D
+n 6E
+o 6F
+p 70
+q 71
+r 72
+s 73
+t 74
+u 75
+v 76
+w 77
+x 78
+y 79
+z 7A
+{ 7B
+| 7C
+} 7D
+~ 7E
+<7F> 7F
+drop table t1;
+drop view v1;
+#
# Start of 10.5 tests
#
#
diff --git a/mysql-test/main/ctype_cp932.test b/mysql-test/main/ctype_cp932.test
index 0f5ff437d33..2ccbe8f1582 100644
--- a/mysql-test/main/ctype_cp932.test
+++ b/mysql-test/main/ctype_cp932.test
@@ -50,6 +50,15 @@ let $coll_pad='cp932_bin';
--echo #
+--echo # General tests
+--echo #
+SET NAMES cp932;
+-- source include/ctype_ascii_order.inc
+SET NAMES cp932 COLLATE cp932_bin;
+-- source include/ctype_ascii_order.inc
+
+
+--echo #
--echo # Start of 10.5 tests
--echo #
diff --git a/mysql-test/main/ctype_eucjpms.result b/mysql-test/main/ctype_eucjpms.result
index f8d7d6cea46..ea8824584d8 100644
--- a/mysql-test/main/ctype_eucjpms.result
+++ b/mysql-test/main/ctype_eucjpms.result
@@ -2,6 +2,281 @@ drop table if exists t1;
drop table if exists t2;
drop table if exists t3;
drop table if exists t4;
+#
+# General tests
+#
+SET NAMES eucjpms;
+drop table if exists t1;
+create table t1 select repeat('a',10) as c1;
+delete from t1;
+insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
+insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
+insert into t1 values (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27),(0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
+insert into t1 values (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37),(0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
+insert into t1 values (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47),(0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
+insert into t1 values (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57),(0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
+insert into t1 values (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67),(0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
+insert into t1 values (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77),(0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
+create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1;
+select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1';
+column_name collation_name
+c1 eucjpms_japanese_ci
+name eucjpms_japanese_ci
+SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1;
+GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1)
+<00> 00
+<01> 01
+<02> 02
+<03> 03
+<04> 04
+<05> 05
+<06> 06
+<07> 07
+<08> 08
+<09> 09
+<0A> 0A
+<0B> 0B
+<0C> 0C
+<0D> 0D
+<0E> 0E
+<0F> 0F
+<10> 10
+<11> 11
+<12> 12
+<13> 13
+<14> 14
+<15> 15
+<16> 16
+<17> 17
+<18> 18
+<19> 19
+<1A> 1A
+<1B> 1B
+<1C> 1C
+<1D> 1D
+<1E> 1E
+<1F> 1F
+ 20
+! 21
+" 22
+# 23
+$ 24
+% 25
+& 26
+' 27
+( 28
+) 29
+* 2A
++ 2B
+, 2C
+- 2D
+. 2E
+/ 2F
+0 30
+1 31
+2 32
+3 33
+4 34
+5 35
+6 36
+7 37
+8 38
+9 39
+: 3A
+; 3B
+< 3C
+= 3D
+> 3E
+? 3F
+@ 40
+Aa 41,61
+Bb 42,62
+Cc 43,63
+Dd 44,64
+Ee 45,65
+Ff 46,66
+Gg 47,67
+Hh 48,68
+Ii 49,69
+Jj 4A,6A
+Kk 4B,6B
+Ll 4C,6C
+Mm 4D,6D
+Nn 4E,6E
+Oo 4F,6F
+Pp 50,70
+Qq 51,71
+Rr 52,72
+Ss 53,73
+Tt 54,74
+Uu 55,75
+Vv 56,76
+Ww 57,77
+Xx 58,78
+Yy 59,79
+Zz 5A,7A
+[ 5B
+\ 5C
+] 5D
+^ 5E
+_ 5F
+` 60
+{ 7B
+| 7C
+} 7D
+~ 7E
+<7F> 7F
+drop table t1;
+drop view v1;
+SET NAMES eucjpms COLLATE eucjpms_bin;
+drop table if exists t1;
+create table t1 select repeat('a',10) as c1;
+delete from t1;
+insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
+insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
+insert into t1 values (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27),(0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
+insert into t1 values (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37),(0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
+insert into t1 values (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47),(0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
+insert into t1 values (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57),(0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
+insert into t1 values (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67),(0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
+insert into t1 values (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77),(0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
+create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1;
+select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1';
+column_name collation_name
+c1 eucjpms_bin
+name eucjpms_bin
+SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1;
+GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1)
+<00> 00
+<01> 01
+<02> 02
+<03> 03
+<04> 04
+<05> 05
+<06> 06
+<07> 07
+<08> 08
+<09> 09
+<0A> 0A
+<0B> 0B
+<0C> 0C
+<0D> 0D
+<0E> 0E
+<0F> 0F
+<10> 10
+<11> 11
+<12> 12
+<13> 13
+<14> 14
+<15> 15
+<16> 16
+<17> 17
+<18> 18
+<19> 19
+<1A> 1A
+<1B> 1B
+<1C> 1C
+<1D> 1D
+<1E> 1E
+<1F> 1F
+ 20
+! 21
+" 22
+# 23
+$ 24
+% 25
+& 26
+' 27
+( 28
+) 29
+* 2A
++ 2B
+, 2C
+- 2D
+. 2E
+/ 2F
+0 30
+1 31
+2 32
+3 33
+4 34
+5 35
+6 36
+7 37
+8 38
+9 39
+: 3A
+; 3B
+< 3C
+= 3D
+> 3E
+? 3F
+@ 40
+A 41
+B 42
+C 43
+D 44
+E 45
+F 46
+G 47
+H 48
+I 49
+J 4A
+K 4B
+L 4C
+M 4D
+N 4E
+O 4F
+P 50
+Q 51
+R 52
+S 53
+T 54
+U 55
+V 56
+W 57
+X 58
+Y 59
+Z 5A
+[ 5B
+\ 5C
+] 5D
+^ 5E
+_ 5F
+` 60
+a 61
+b 62
+c 63
+d 64
+e 65
+f 66
+g 67
+h 68
+i 69
+j 6A
+k 6B
+l 6C
+m 6D
+n 6E
+o 6F
+p 70
+q 71
+r 72
+s 73
+t 74
+u 75
+v 76
+w 77
+x 78
+y 79
+z 7A
+{ 7B
+| 7C
+} 7D
+~ 7E
+<7F> 7F
+drop table t1;
+drop view v1;
set names eucjpms;
set character_set_database = eucjpms;
CREATE TABLE t1(c1 CHAR(1)) DEFAULT CHARACTER SET = eucjpms;
diff --git a/mysql-test/main/ctype_eucjpms.test b/mysql-test/main/ctype_eucjpms.test
index 6af72270853..393534182dc 100644
--- a/mysql-test/main/ctype_eucjpms.test
+++ b/mysql-test/main/ctype_eucjpms.test
@@ -8,6 +8,14 @@ drop table if exists t3;
drop table if exists t4;
--enable_warnings
+--echo #
+--echo # General tests
+--echo #
+SET NAMES eucjpms;
+-- source include/ctype_ascii_order.inc
+SET NAMES eucjpms COLLATE eucjpms_bin;
+-- source include/ctype_ascii_order.inc
+
set names eucjpms;
set character_set_database = eucjpms;
diff --git a/mysql-test/main/ctype_euckr.result b/mysql-test/main/ctype_euckr.result
index cded18ff920..9e030f9cc6d 100644
--- a/mysql-test/main/ctype_euckr.result
+++ b/mysql-test/main/ctype_euckr.result
@@ -243,6 +243,128 @@ a hex(b) c
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
+drop table if exists t1;
+create table t1 select repeat('a',10) as c1;
+delete from t1;
+insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
+insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
+insert into t1 values (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27),(0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
+insert into t1 values (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37),(0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
+insert into t1 values (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47),(0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
+insert into t1 values (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57),(0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
+insert into t1 values (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67),(0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
+insert into t1 values (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77),(0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
+create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1;
+select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1';
+column_name collation_name
+c1 euckr_korean_ci
+name euckr_korean_ci
+SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1;
+GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1)
+<00> 00
+<01> 01
+<02> 02
+<03> 03
+<04> 04
+<05> 05
+<06> 06
+<07> 07
+<08> 08
+<09> 09
+<0A> 0A
+<0B> 0B
+<0C> 0C
+<0D> 0D
+<0E> 0E
+<0F> 0F
+<10> 10
+<11> 11
+<12> 12
+<13> 13
+<14> 14
+<15> 15
+<16> 16
+<17> 17
+<18> 18
+<19> 19
+<1A> 1A
+<1B> 1B
+<1C> 1C
+<1D> 1D
+<1E> 1E
+<1F> 1F
+ 20
+! 21
+" 22
+# 23
+$ 24
+% 25
+& 26
+' 27
+( 28
+) 29
+* 2A
++ 2B
+, 2C
+- 2D
+. 2E
+/ 2F
+0 30
+1 31
+2 32
+3 33
+4 34
+5 35
+6 36
+7 37
+8 38
+9 39
+: 3A
+; 3B
+< 3C
+= 3D
+> 3E
+? 3F
+@ 40
+Aa 41,61
+Bb 42,62
+Cc 43,63
+Dd 44,64
+Ee 45,65
+Ff 46,66
+Gg 47,67
+Hh 48,68
+Ii 49,69
+Jj 4A,6A
+Kk 4B,6B
+Ll 4C,6C
+Mm 4D,6D
+Nn 4E,6E
+Oo 4F,6F
+Pp 50,70
+Qq 51,71
+Rr 52,72
+Ss 53,73
+Tt 54,74
+Uu 55,75
+Vv 56,76
+Ww 57,77
+Xx 58,78
+Yy 59,79
+Zz 5A,7A
+[ 5B
+\ 5C
+] 5D
+^ 5E
+_ 5F
+` 60
+{ 7B
+| 7C
+} 7D
+~ 7E
+<7F> 7F
+drop table t1;
+drop view v1;
SET collation_connection='euckr_bin';
create table t1 select repeat('a',4000) a;
delete from t1;
@@ -384,6 +506,154 @@ a hex(b) c
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
+drop table if exists t1;
+create table t1 select repeat('a',10) as c1;
+delete from t1;
+insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
+insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
+insert into t1 values (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27),(0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
+insert into t1 values (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37),(0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
+insert into t1 values (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47),(0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
+insert into t1 values (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57),(0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
+insert into t1 values (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67),(0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
+insert into t1 values (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77),(0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
+create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1;
+select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1';
+column_name collation_name
+c1 euckr_bin
+name euckr_bin
+SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1;
+GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1)
+<00> 00
+<01> 01
+<02> 02
+<03> 03
+<04> 04
+<05> 05
+<06> 06
+<07> 07
+<08> 08
+<09> 09
+<0A> 0A
+<0B> 0B
+<0C> 0C
+<0D> 0D
+<0E> 0E
+<0F> 0F
+<10> 10
+<11> 11
+<12> 12
+<13> 13
+<14> 14
+<15> 15
+<16> 16
+<17> 17
+<18> 18
+<19> 19
+<1A> 1A
+<1B> 1B
+<1C> 1C
+<1D> 1D
+<1E> 1E
+<1F> 1F
+ 20
+! 21
+" 22
+# 23
+$ 24
+% 25
+& 26
+' 27
+( 28
+) 29
+* 2A
++ 2B
+, 2C
+- 2D
+. 2E
+/ 2F
+0 30
+1 31
+2 32
+3 33
+4 34
+5 35
+6 36
+7 37
+8 38
+9 39
+: 3A
+; 3B
+< 3C
+= 3D
+> 3E
+? 3F
+@ 40
+A 41
+B 42
+C 43
+D 44
+E 45
+F 46
+G 47
+H 48
+I 49
+J 4A
+K 4B
+L 4C
+M 4D
+N 4E
+O 4F
+P 50
+Q 51
+R 52
+S 53
+T 54
+U 55
+V 56
+W 57
+X 58
+Y 59
+Z 5A
+[ 5B
+\ 5C
+] 5D
+^ 5E
+_ 5F
+` 60
+a 61
+b 62
+c 63
+d 64
+e 65
+f 66
+g 67
+h 68
+i 69
+j 6A
+k 6B
+l 6C
+m 6D
+n 6E
+o 6F
+p 70
+q 71
+r 72
+s 73
+t 74
+u 75
+v 76
+w 77
+x 78
+y 79
+z 7A
+{ 7B
+| 7C
+} 7D
+~ 7E
+<7F> 7F
+drop table t1;
+drop view v1;
SET NAMES euckr;
CREATE TABLE t1 (a text) character set euckr;
INSERT INTO t1 VALUES (0xA2E6),(0xFEF7);
diff --git a/mysql-test/main/ctype_euckr.test b/mysql-test/main/ctype_euckr.test
index 1154047fdb0..e4f07081dba 100644
--- a/mysql-test/main/ctype_euckr.test
+++ b/mysql-test/main/ctype_euckr.test
@@ -17,11 +17,13 @@ SET collation_connection='euckr_korean_ci';
-- source include/ctype_innodb_like.inc
-- source include/ctype_like_escape.inc
-- source include/ctype_like_range_f1f2.inc
+-- source include/ctype_ascii_order.inc
SET collation_connection='euckr_bin';
-- source include/ctype_filesort.inc
-- source include/ctype_innodb_like.inc
-- source include/ctype_like_escape.inc
-- source include/ctype_like_range_f1f2.inc
+-- source include/ctype_ascii_order.inc
#
# Bug#15377 Valid multibyte sequences are truncated on INSERT
diff --git a/mysql-test/main/ctype_gb2312.result b/mysql-test/main/ctype_gb2312.result
index adb289b5fce..163364d4bc4 100644
--- a/mysql-test/main/ctype_gb2312.result
+++ b/mysql-test/main/ctype_gb2312.result
@@ -246,14 +246,53 @@ DROP TABLE t1;
drop table if exists t1;
create table t1 select repeat('a',10) as c1;
delete from t1;
+insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
+insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
insert into t1 values (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27),(0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
insert into t1 values (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37),(0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
insert into t1 values (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47),(0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
insert into t1 values (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57),(0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
insert into t1 values (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67),(0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
insert into t1 values (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77),(0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
-SELECT GROUP_CONCAT(c1 ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM t1 GROUP BY c1;
-GROUP_CONCAT(c1 ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1)
+create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1;
+select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1';
+column_name collation_name
+c1 gb2312_chinese_ci
+name gb2312_chinese_ci
+SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1;
+GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1)
+<00> 00
+<01> 01
+<02> 02
+<03> 03
+<04> 04
+<05> 05
+<06> 06
+<07> 07
+<08> 08
+<09> 09
+<0A> 0A
+<0B> 0B
+<0C> 0C
+<0D> 0D
+<0E> 0E
+<0F> 0F
+<10> 10
+<11> 11
+<12> 12
+<13> 13
+<14> 14
+<15> 15
+<16> 16
+<17> 17
+<18> 18
+<19> 19
+<1A> 1A
+<1B> 1B
+<1C> 1C
+<1D> 1D
+<1E> 1E
+<1F> 1F
20
! 21
" 22
@@ -322,8 +361,9 @@ _ 5F
{ 7B
| 7C
} 7D
- 7F
+<7F> 7F
drop table t1;
+drop view v1;
SET collation_connection='gb2312_bin';
create table t1 select repeat('a',4000) a;
delete from t1;
@@ -465,6 +505,154 @@ a hex(b) c
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
+drop table if exists t1;
+create table t1 select repeat('a',10) as c1;
+delete from t1;
+insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
+insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
+insert into t1 values (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27),(0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
+insert into t1 values (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37),(0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
+insert into t1 values (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47),(0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
+insert into t1 values (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57),(0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
+insert into t1 values (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67),(0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
+insert into t1 values (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77),(0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
+create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1;
+select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1';
+column_name collation_name
+c1 gb2312_bin
+name gb2312_bin
+SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1;
+GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1)
+<00> 00
+<01> 01
+<02> 02
+<03> 03
+<04> 04
+<05> 05
+<06> 06
+<07> 07
+<08> 08
+<09> 09
+<0A> 0A
+<0B> 0B
+<0C> 0C
+<0D> 0D
+<0E> 0E
+<0F> 0F
+<10> 10
+<11> 11
+<12> 12
+<13> 13
+<14> 14
+<15> 15
+<16> 16
+<17> 17
+<18> 18
+<19> 19
+<1A> 1A
+<1B> 1B
+<1C> 1C
+<1D> 1D
+<1E> 1E
+<1F> 1F
+ 20
+! 21
+" 22
+# 23
+$ 24
+% 25
+& 26
+' 27
+( 28
+) 29
+* 2A
++ 2B
+, 2C
+- 2D
+. 2E
+/ 2F
+0 30
+1 31
+2 32
+3 33
+4 34
+5 35
+6 36
+7 37
+8 38
+9 39
+: 3A
+; 3B
+< 3C
+= 3D
+> 3E
+? 3F
+@ 40
+A 41
+B 42
+C 43
+D 44
+E 45
+F 46
+G 47
+H 48
+I 49
+J 4A
+K 4B
+L 4C
+M 4D
+N 4E
+O 4F
+P 50
+Q 51
+R 52
+S 53
+T 54
+U 55
+V 56
+W 57
+X 58
+Y 59
+Z 5A
+[ 5B
+\ 5C
+] 5D
+^ 5E
+_ 5F
+` 60
+a 61
+b 62
+c 63
+d 64
+e 65
+f 66
+g 67
+h 68
+i 69
+j 6A
+k 6B
+l 6C
+m 6D
+n 6E
+o 6F
+p 70
+q 71
+r 72
+s 73
+t 74
+u 75
+v 76
+w 77
+x 78
+y 79
+z 7A
+{ 7B
+| 7C
+} 7D
+~ 7E
+<7F> 7F
+drop table t1;
+drop view v1;
SET NAMES gb2312;
CREATE TABLE t1 (a text) character set gb2312;
INSERT INTO t1 VALUES (0xA2A1),(0xD7FE);
diff --git a/mysql-test/main/ctype_gb2312.test b/mysql-test/main/ctype_gb2312.test
index 96d60445707..cbc43ee8a89 100644
--- a/mysql-test/main/ctype_gb2312.test
+++ b/mysql-test/main/ctype_gb2312.test
@@ -24,6 +24,7 @@ SET collation_connection='gb2312_bin';
-- source include/ctype_innodb_like.inc
-- source include/ctype_like_escape.inc
-- source include/ctype_like_range_f1f2.inc
+-- source include/ctype_ascii_order.inc
#
# Bug#15377 Valid multibyte sequences are truncated on INSERT
diff --git a/mysql-test/main/ctype_gbk.result b/mysql-test/main/ctype_gbk.result
index 0ed7620a177..79dede6d089 100644
--- a/mysql-test/main/ctype_gbk.result
+++ b/mysql-test/main/ctype_gbk.result
@@ -246,14 +246,53 @@ DROP TABLE t1;
drop table if exists t1;
create table t1 select repeat('a',10) as c1;
delete from t1;
+insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
+insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
insert into t1 values (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27),(0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
insert into t1 values (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37),(0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
insert into t1 values (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47),(0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
insert into t1 values (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57),(0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
insert into t1 values (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67),(0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
insert into t1 values (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77),(0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
-SELECT GROUP_CONCAT(c1 ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM t1 GROUP BY c1;
-GROUP_CONCAT(c1 ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1)
+create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1;
+select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1';
+column_name collation_name
+c1 gbk_chinese_ci
+name gbk_chinese_ci
+SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1;
+GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1)
+<00> 00
+<01> 01
+<02> 02
+<03> 03
+<04> 04
+<05> 05
+<06> 06
+<07> 07
+<08> 08
+<09> 09
+<0A> 0A
+<0B> 0B
+<0C> 0C
+<0D> 0D
+<0E> 0E
+<0F> 0F
+<10> 10
+<11> 11
+<12> 12
+<13> 13
+<14> 14
+<15> 15
+<16> 16
+<17> 17
+<18> 18
+<19> 19
+<1A> 1A
+<1B> 1B
+<1C> 1C
+<1D> 1D
+<1E> 1E
+<1F> 1F
20
! 21
" 22
@@ -322,8 +361,9 @@ _ 5F
{ 7B
| 7C
} 7D
- 7F
+<7F> 7F
drop table t1;
+drop view v1;
SET collation_connection='gbk_bin';
create table t1 select repeat('a',4000) a;
delete from t1;
@@ -465,6 +505,154 @@ a hex(b) c
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
+drop table if exists t1;
+create table t1 select repeat('a',10) as c1;
+delete from t1;
+insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
+insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
+insert into t1 values (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27),(0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
+insert into t1 values (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37),(0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
+insert into t1 values (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47),(0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
+insert into t1 values (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57),(0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
+insert into t1 values (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67),(0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
+insert into t1 values (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77),(0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
+create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1;
+select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1';
+column_name collation_name
+c1 gbk_bin
+name gbk_bin
+SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1;
+GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1)
+<00> 00
+<01> 01
+<02> 02
+<03> 03
+<04> 04
+<05> 05
+<06> 06
+<07> 07
+<08> 08
+<09> 09
+<0A> 0A
+<0B> 0B
+<0C> 0C
+<0D> 0D
+<0E> 0E
+<0F> 0F
+<10> 10
+<11> 11
+<12> 12
+<13> 13
+<14> 14
+<15> 15
+<16> 16
+<17> 17
+<18> 18
+<19> 19
+<1A> 1A
+<1B> 1B
+<1C> 1C
+<1D> 1D
+<1E> 1E
+<1F> 1F
+ 20
+! 21
+" 22
+# 23
+$ 24
+% 25
+& 26
+' 27
+( 28
+) 29
+* 2A
++ 2B
+, 2C
+- 2D
+. 2E
+/ 2F
+0 30
+1 31
+2 32
+3 33
+4 34
+5 35
+6 36
+7 37
+8 38
+9 39
+: 3A
+; 3B
+< 3C
+= 3D
+> 3E
+? 3F
+@ 40
+A 41
+B 42
+C 43
+D 44
+E 45
+F 46
+G 47
+H 48
+I 49
+J 4A
+K 4B
+L 4C
+M 4D
+N 4E
+O 4F
+P 50
+Q 51
+R 52
+S 53
+T 54
+U 55
+V 56
+W 57
+X 58
+Y 59
+Z 5A
+[ 5B
+\ 5C
+] 5D
+^ 5E
+_ 5F
+` 60
+a 61
+b 62
+c 63
+d 64
+e 65
+f 66
+g 67
+h 68
+i 69
+j 6A
+k 6B
+l 6C
+m 6D
+n 6E
+o 6F
+p 70
+q 71
+r 72
+s 73
+t 74
+u 75
+v 76
+w 77
+x 78
+y 79
+z 7A
+{ 7B
+| 7C
+} 7D
+~ 7E
+<7F> 7F
+drop table t1;
+drop view v1;
SET NAMES gbk;
CREATE TABLE t1 (a text) character set gbk;
INSERT INTO t1 VALUES (0xA3A0),(0xA1A1);
diff --git a/mysql-test/main/ctype_gbk.test b/mysql-test/main/ctype_gbk.test
index a2046012685..566889c827f 100644
--- a/mysql-test/main/ctype_gbk.test
+++ b/mysql-test/main/ctype_gbk.test
@@ -24,6 +24,7 @@ SET collation_connection='gbk_bin';
-- source include/ctype_innodb_like.inc
-- source include/ctype_like_escape.inc
-- source include/ctype_like_range_f1f2.inc
+-- source include/ctype_ascii_order.inc
#
# Bug#11987 mysql will truncate the text when
diff --git a/mysql-test/main/ctype_sjis.result b/mysql-test/main/ctype_sjis.result
index 4e08b0fbe98..4606c4bd8f3 100644
--- a/mysql-test/main/ctype_sjis.result
+++ b/mysql-test/main/ctype_sjis.result
@@ -231,6 +231,128 @@ SELECT HEX(subject),HEX(pattern),STR_TO_DATE(subject, pattern) FROM t1;
HEX(subject) HEX(pattern) STR_TO_DATE(subject, pattern)
323030318180303181803031 25598180256D81802564 2001-01-01 00:00:00.000000
DROP TABLE t1;
+drop table if exists t1;
+create table t1 select repeat('a',10) as c1;
+delete from t1;
+insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
+insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
+insert into t1 values (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27),(0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
+insert into t1 values (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37),(0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
+insert into t1 values (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47),(0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
+insert into t1 values (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57),(0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
+insert into t1 values (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67),(0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
+insert into t1 values (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77),(0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
+create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1;
+select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1';
+column_name collation_name
+c1 sjis_japanese_ci
+name sjis_japanese_ci
+SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1;
+GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1)
+<00> 00
+<01> 01
+<02> 02
+<03> 03
+<04> 04
+<05> 05
+<06> 06
+<07> 07
+<08> 08
+<09> 09
+<0A> 0A
+<0B> 0B
+<0C> 0C
+<0D> 0D
+<0E> 0E
+<0F> 0F
+<10> 10
+<11> 11
+<12> 12
+<13> 13
+<14> 14
+<15> 15
+<16> 16
+<17> 17
+<18> 18
+<19> 19
+<1A> 1A
+<1B> 1B
+<1C> 1C
+<1D> 1D
+<1E> 1E
+<1F> 1F
+ 20
+! 21
+" 22
+# 23
+$ 24
+% 25
+& 26
+' 27
+( 28
+) 29
+* 2A
++ 2B
+, 2C
+- 2D
+. 2E
+/ 2F
+0 30
+1 31
+2 32
+3 33
+4 34
+5 35
+6 36
+7 37
+8 38
+9 39
+: 3A
+; 3B
+< 3C
+= 3D
+> 3E
+? 3F
+@ 40
+Aa 41,61
+Bb 42,62
+Cc 43,63
+Dd 44,64
+Ee 45,65
+Ff 46,66
+Gg 47,67
+Hh 48,68
+Ii 49,69
+Jj 4A,6A
+Kk 4B,6B
+Ll 4C,6C
+Mm 4D,6D
+Nn 4E,6E
+Oo 4F,6F
+Pp 50,70
+Qq 51,71
+Rr 52,72
+Ss 53,73
+Tt 54,74
+Uu 55,75
+Vv 56,76
+Ww 57,77
+Xx 58,78
+Yy 59,79
+Zz 5A,7A
+[ 5B
+\ 5C
+] 5D
+^ 5E
+_ 5F
+` 60
+{ 7B
+| 7C
+} 7D
+~ 7E
+<7F> 7F
+drop table t1;
+drop view v1;
SET collation_connection='sjis_bin';
create table t1 select repeat('a',4000) a;
delete from t1;
@@ -372,6 +494,154 @@ a hex(b) c
3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
+drop table if exists t1;
+create table t1 select repeat('a',10) as c1;
+delete from t1;
+insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
+insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
+insert into t1 values (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27),(0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
+insert into t1 values (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37),(0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
+insert into t1 values (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47),(0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
+insert into t1 values (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57),(0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
+insert into t1 values (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67),(0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
+insert into t1 values (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77),(0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
+create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1;
+select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1';
+column_name collation_name
+c1 sjis_bin
+name sjis_bin
+SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1;
+GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1)
+<00> 00
+<01> 01
+<02> 02
+<03> 03
+<04> 04
+<05> 05
+<06> 06
+<07> 07
+<08> 08
+<09> 09
+<0A> 0A
+<0B> 0B
+<0C> 0C
+<0D> 0D
+<0E> 0E
+<0F> 0F
+<10> 10
+<11> 11
+<12> 12
+<13> 13
+<14> 14
+<15> 15
+<16> 16
+<17> 17
+<18> 18
+<19> 19
+<1A> 1A
+<1B> 1B
+<1C> 1C
+<1D> 1D
+<1E> 1E
+<1F> 1F
+ 20
+! 21
+" 22
+# 23
+$ 24
+% 25
+& 26
+' 27
+( 28
+) 29
+* 2A
++ 2B
+, 2C
+- 2D
+. 2E
+/ 2F
+0 30
+1 31
+2 32
+3 33
+4 34
+5 35
+6 36
+7 37
+8 38
+9 39
+: 3A
+; 3B
+< 3C
+= 3D
+> 3E
+? 3F
+@ 40
+A 41
+B 42
+C 43
+D 44
+E 45
+F 46
+G 47
+H 48
+I 49
+J 4A
+K 4B
+L 4C
+M 4D
+N 4E
+O 4F
+P 50
+Q 51
+R 52
+S 53
+T 54
+U 55
+V 56
+W 57
+X 58
+Y 59
+Z 5A
+[ 5B
+\ 5C
+] 5D
+^ 5E
+_ 5F
+` 60
+a 61
+b 62
+c 63
+d 64
+e 65
+f 66
+g 67
+h 68
+i 69
+j 6A
+k 6B
+l 6C
+m 6D
+n 6E
+o 6F
+p 70
+q 71
+r 72
+s 73
+t 74
+u 75
+v 76
+w 77
+x 78
+y 79
+z 7A
+{ 7B
+| 7C
+} 7D
+~ 7E
+<7F> 7F
+drop table t1;
+drop view v1;
SET NAMES sjis;
SELECT HEX('²“‘@Œ\') FROM DUAL;
HEX('²“‘@Œ\')
diff --git a/mysql-test/main/ctype_sjis.test b/mysql-test/main/ctype_sjis.test
index 13f919f0c94..0e4ef245c5e 100644
--- a/mysql-test/main/ctype_sjis.test
+++ b/mysql-test/main/ctype_sjis.test
@@ -71,11 +71,13 @@ SET collation_connection='sjis_japanese_ci';
-- source include/ctype_like_escape.inc
-- source include/ctype_like_range_f1f2.inc
-- source include/ctype_str_to_date.inc
+-- source include/ctype_ascii_order.inc
SET collation_connection='sjis_bin';
-- source include/ctype_filesort.inc
-- source include/ctype_innodb_like.inc
-- source include/ctype_like_escape.inc
-- source include/ctype_like_range_f1f2.inc
+-- source include/ctype_ascii_order.inc
# Check parsing of string literals in SJIS with multibyte characters that
# have an embedded \ in them. (Bug #8303)
diff --git a/mysql-test/main/ctype_tis620.result b/mysql-test/main/ctype_tis620.result
index f1d0f5bc20a..f86c2574582 100644
--- a/mysql-test/main/ctype_tis620.result
+++ b/mysql-test/main/ctype_tis620.result
@@ -3042,14 +3042,53 @@ SELECT '\%b' LIKE '%\%';
drop table if exists t1;
create table t1 select repeat('a',10) as c1;
delete from t1;
+insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
+insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
insert into t1 values (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27),(0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
insert into t1 values (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37),(0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
insert into t1 values (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47),(0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
insert into t1 values (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57),(0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
insert into t1 values (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67),(0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
insert into t1 values (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77),(0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
-SELECT GROUP_CONCAT(c1 ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM t1 GROUP BY c1;
-GROUP_CONCAT(c1 ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1)
+create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1;
+select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1';
+column_name collation_name
+c1 tis620_thai_ci
+name tis620_thai_ci
+SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1;
+GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1)
+<00> 00
+<01> 01
+<02> 02
+<03> 03
+<04> 04
+<05> 05
+<06> 06
+<07> 07
+<08> 08
+<09> 09
+<0A> 0A
+<0B> 0B
+<0C> 0C
+<0D> 0D
+<0E> 0E
+<0F> 0F
+<10> 10
+<11> 11
+<12> 12
+<13> 13
+<14> 14
+<15> 15
+<16> 16
+<17> 17
+<18> 18
+<19> 19
+<1A> 1A
+<1B> 1B
+<1C> 1C
+<1D> 1D
+<1E> 1E
+<1F> 1F
20
! 21
" 22
@@ -3119,8 +3158,9 @@ Zz 5A,7A
| 7C
} 7D
~ 7E
- 7F
+<7F> 7F
drop table t1;
+drop view v1;
#
# MDEV-7149 Constant condition propagation erroneously applied for LIKE
#
diff --git a/mysql-test/main/ctype_ujis.result b/mysql-test/main/ctype_ujis.result
index 177a609f446..35bfce8eb5a 100644
--- a/mysql-test/main/ctype_ujis.result
+++ b/mysql-test/main/ctype_ujis.result
@@ -1,5 +1,281 @@
drop table if exists t1;
set names ujis;
+#
+# General tests
+#
+SET NAMES ujis;
+drop table if exists t1;
+create table t1 select repeat('a',10) as c1;
+delete from t1;
+insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
+insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
+insert into t1 values (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27),(0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
+insert into t1 values (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37),(0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
+insert into t1 values (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47),(0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
+insert into t1 values (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57),(0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
+insert into t1 values (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67),(0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
+insert into t1 values (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77),(0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
+create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1;
+select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1';
+column_name collation_name
+c1 ujis_japanese_ci
+name ujis_japanese_ci
+SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1;
+GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1)
+<00> 00
+<01> 01
+<02> 02
+<03> 03
+<04> 04
+<05> 05
+<06> 06
+<07> 07
+<08> 08
+<09> 09
+<0A> 0A
+<0B> 0B
+<0C> 0C
+<0D> 0D
+<0E> 0E
+<0F> 0F
+<10> 10
+<11> 11
+<12> 12
+<13> 13
+<14> 14
+<15> 15
+<16> 16
+<17> 17
+<18> 18
+<19> 19
+<1A> 1A
+<1B> 1B
+<1C> 1C
+<1D> 1D
+<1E> 1E
+<1F> 1F
+ 20
+! 21
+" 22
+# 23
+$ 24
+% 25
+& 26
+' 27
+( 28
+) 29
+* 2A
++ 2B
+, 2C
+- 2D
+. 2E
+/ 2F
+0 30
+1 31
+2 32
+3 33
+4 34
+5 35
+6 36
+7 37
+8 38
+9 39
+: 3A
+; 3B
+< 3C
+= 3D
+> 3E
+? 3F
+@ 40
+Aa 41,61
+Bb 42,62
+Cc 43,63
+Dd 44,64
+Ee 45,65
+Ff 46,66
+Gg 47,67
+Hh 48,68
+Ii 49,69
+Jj 4A,6A
+Kk 4B,6B
+Ll 4C,6C
+Mm 4D,6D
+Nn 4E,6E
+Oo 4F,6F
+Pp 50,70
+Qq 51,71
+Rr 52,72
+Ss 53,73
+Tt 54,74
+Uu 55,75
+Vv 56,76
+Ww 57,77
+Xx 58,78
+Yy 59,79
+Zz 5A,7A
+[ 5B
+\ 5C
+] 5D
+^ 5E
+_ 5F
+` 60
+{ 7B
+| 7C
+} 7D
+~ 7E
+<7F> 7F
+drop table t1;
+drop view v1;
+SET NAMES ujis COLLATE ujis_bin;
+drop table if exists t1;
+create table t1 select repeat('a',10) as c1;
+delete from t1;
+insert into t1 values (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07),(0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
+insert into t1 values (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17),(0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
+insert into t1 values (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27),(0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
+insert into t1 values (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37),(0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
+insert into t1 values (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47),(0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
+insert into t1 values (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57),(0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
+insert into t1 values (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67),(0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
+insert into t1 values (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77),(0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
+create view v1 as select c1, if(c1 < 0x20 OR c1=0x7F, concat('<',hex(c1),'>'),c1) as name from t1;
+select column_name, collation_name from information_schema.columns where table_schema=database() and table_name='v1';
+column_name collation_name
+c1 ujis_bin
+name ujis_bin
+SELECT GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR ''), GROUP_CONCAT(hex(c1) ORDER BY BINARY c1) FROM v1 GROUP BY c1;
+GROUP_CONCAT(name ORDER BY binary c1 SEPARATOR '') GROUP_CONCAT(hex(c1) ORDER BY BINARY c1)
+<00> 00
+<01> 01
+<02> 02
+<03> 03
+<04> 04
+<05> 05
+<06> 06
+<07> 07
+<08> 08
+<09> 09
+<0A> 0A
+<0B> 0B
+<0C> 0C
+<0D> 0D
+<0E> 0E
+<0F> 0F
+<10> 10
+<11> 11
+<12> 12
+<13> 13
+<14> 14
+<15> 15
+<16> 16
+<17> 17
+<18> 18
+<19> 19
+<1A> 1A
+<1B> 1B
+<1C> 1C
+<1D> 1D
+<1E> 1E
+<1F> 1F
+ 20
+! 21
+" 22
+# 23
+$ 24
+% 25
+& 26
+' 27
+( 28
+) 29
+* 2A
++ 2B
+, 2C
+- 2D
+. 2E
+/ 2F
+0 30
+1 31
+2 32
+3 33
+4 34
+5 35
+6 36
+7 37
+8 38
+9 39
+: 3A
+; 3B
+< 3C
+= 3D
+> 3E
+? 3F
+@ 40
+A 41
+B 42
+C 43
+D 44
+E 45
+F 46
+G 47
+H 48
+I 49
+J 4A
+K 4B
+L 4C
+M 4D
+N 4E
+O 4F
+P 50
+Q 51
+R 52
+S 53
+T 54
+U 55
+V 56
+W 57
+X 58
+Y 59
+Z 5A
+[ 5B
+\ 5C
+] 5D
+^ 5E
+_ 5F
+` 60
+a 61
+b 62
+c 63
+d 64
+e 65
+f 66
+g 67
+h 68
+i 69
+j 6A
+k 6B
+l 6C
+m 6D
+n 6E
+o 6F
+p 70
+q 71
+r 72
+s 73
+t 74
+u 75
+v 76
+w 77
+x 78
+y 79
+z 7A
+{ 7B
+| 7C
+} 7D
+~ 7E
+<7F> 7F
+drop table t1;
+drop view v1;
+SET NAMES ujis;
create table t1 (c text character set ujis);
insert into t1 values (0xa4a2),(0xa4a3);
select hex(left(c,1)) from t1 group by c;
diff --git a/mysql-test/main/ctype_ujis.test b/mysql-test/main/ctype_ujis.test
index 72a609edf39..7b77232738b 100644
--- a/mysql-test/main/ctype_ujis.test
+++ b/mysql-test/main/ctype_ujis.test
@@ -9,10 +9,20 @@ drop table if exists t1;
set names ujis;
+--echo #
+--echo # General tests
+--echo #
+
+SET NAMES ujis;
+-- source include/ctype_ascii_order.inc
+SET NAMES ujis COLLATE ujis_bin;
+-- source include/ctype_ascii_order.inc
+
#
# Test problem with LEFT()
#
+SET NAMES ujis;
create table t1 (c text character set ujis);
insert into t1 values (0xa4a2),(0xa4a3);
select hex(left(c,1)) from t1 group by c;
diff --git a/mysql-test/main/ctype_utf8.result b/mysql-test/main/ctype_utf8.result
index 5edd9d53c08..53d3be0b125 100644
--- a/mysql-test/main/ctype_utf8.result
+++ b/mysql-test/main/ctype_utf8.result
@@ -11403,8 +11403,8 @@ DROP TABLE t1;
# MDEV-20890 Illegal mix of collations with UUID()
#
SET NAMES utf8 COLLATE utf8_unicode_ci;
-SELECT uuid()>'';
-uuid()>''
+SELECT sys_guid()>'';
+sys_guid()>''
1
#
# MDEV-8844 Unreadable control characters printed as is in warnings
diff --git a/mysql-test/main/ctype_utf8.test b/mysql-test/main/ctype_utf8.test
index a70d8aa5617..6969f0e080e 100644
--- a/mysql-test/main/ctype_utf8.test
+++ b/mysql-test/main/ctype_utf8.test
@@ -2329,7 +2329,7 @@ DROP TABLE t1;
--echo #
SET NAMES utf8 COLLATE utf8_unicode_ci;
-SELECT uuid()>'';
+SELECT sys_guid()>'';
--echo #
diff --git a/mysql-test/main/ddl_i18n_koi8r.result b/mysql-test/main/ddl_i18n_koi8r.result
index 6504e129693..f588374a26f 100644
--- a/mysql-test/main/ddl_i18n_koi8r.result
+++ b/mysql-test/main/ddl_i18n_koi8r.result
@@ -1739,7 +1739,10 @@ CREATE TABLE `t1` (
`c` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t1` VALUES (1),(0),(1);
+INSERT INTO `t1` VALUES
+(1),
+(0),
+(1);
ALTER DATABASE `mysqltest1` CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -1818,7 +1821,10 @@ CREATE TABLE `t1` (
`c` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t1` VALUES (1),(0),(1);
+INSERT INTO `t1` VALUES
+(1),
+(0),
+(1);
ALTER DATABASE `mysqltest2` CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
diff --git a/mysql-test/main/ddl_i18n_utf8.result b/mysql-test/main/ddl_i18n_utf8.result
index 35234d4fa23..cb57bc5e9df 100644
--- a/mysql-test/main/ddl_i18n_utf8.result
+++ b/mysql-test/main/ddl_i18n_utf8.result
@@ -1739,7 +1739,10 @@ CREATE TABLE `t1` (
`c` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t1` VALUES (1),(0),(1);
+INSERT INTO `t1` VALUES
+(1),
+(0),
+(1);
ALTER DATABASE `mysqltest1` CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -1818,7 +1821,10 @@ CREATE TABLE `t1` (
`c` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t1` VALUES (1),(0),(1);
+INSERT INTO `t1` VALUES
+(1),
+(0),
+(1);
ALTER DATABASE `mysqltest2` CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
diff --git a/mysql-test/main/default.result b/mysql-test/main/default.result
index 0e3422ff1c3..9a29cf7ddb0 100644
--- a/mysql-test/main/default.result
+++ b/mysql-test/main/default.result
@@ -797,7 +797,7 @@ ERROR 42000: Invalid default value for 'a'
#
CREATE TABLE t1 (a INT DEFAULT '1 ');
Warnings:
-Note 1265 Data truncated for column 'a' at row 1
+Note 1265 Data truncated for column 'a' at row 0
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -810,7 +810,7 @@ a
DROP TABLE t1;
CREATE TABLE t1 (a INT DEFAULT CONCAT('1 '));
Warnings:
-Note 1265 Data truncated for column 'a' at row 1
+Note 1265 Data truncated for column 'a' at row 0
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -825,7 +825,7 @@ a
DROP TABLE t1;
CREATE TABLE t1 (a INT DEFAULT COALESCE('1 '));
Warnings:
-Note 1265 Data truncated for column 'a' at row 1
+Note 1265 Data truncated for column 'a' at row 0
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/main/func_hybrid_type.result b/mysql-test/main/func_hybrid_type.result
index 54273452965..dde6cfa4ed8 100644
--- a/mysql-test/main/func_hybrid_type.result
+++ b/mysql-test/main/func_hybrid_type.result
@@ -1609,14 +1609,14 @@ def ifnull___a_a 253 10 1 Y 0 39 8
def least____a_a 253 10 1 Y 0 39 8
def greatest_a_a 253 10 1 Y 0 39 8
def test t1 t1 b ___________b 254 1 1 Y 256 0 8
-def case_______b 254 1 1 Y 0 39 8
-def case_____b_b 254 1 1 Y 0 39 8
-def coalesce___b 254 1 1 Y 0 39 8
-def coalesce_b_b 254 1 1 Y 0 39 8
-def if_______b_b 254 1 1 Y 0 39 8
-def ifnull___b_b 254 1 1 Y 0 39 8
-def least____b_b 254 1 1 Y 0 39 8
-def greatest_b_b 254 1 1 Y 0 39 8
+def case_______b 253 1 1 Y 0 39 8
+def case_____b_b 253 1 1 Y 0 39 8
+def coalesce___b 253 1 1 Y 0 39 8
+def coalesce_b_b 253 1 1 Y 0 39 8
+def if_______b_b 253 1 1 Y 0 39 8
+def ifnull___b_b 253 1 1 Y 0 39 8
+def least____b_b 253 1 1 Y 0 39 8
+def greatest_b_b 253 1 1 Y 0 39 8
___________a a
case_______a a
case_____a_a a
diff --git a/mysql-test/main/func_in.result b/mysql-test/main/func_in.result
index dd7125c393a..918d0481df7 100644
--- a/mysql-test/main/func_in.result
+++ b/mysql-test/main/func_in.result
@@ -784,7 +784,7 @@ SELECT 1 IN (YEAR(FROM_UNIXTIME(NULL)) ,1);
# Bug#13012483: EXPLAIN EXTENDED, PREPARED STATEMENT, CRASH IN CHECK_SIMPLE_EQUALITY
#
CREATE TABLE t1 (a INT);
-PREPARE s FROM "SELECT 1 FROM t1 WHERE 1 < ALL (SELECT @:= (1 IN (SELECT 1 FROM t1)) FROM t1)";
+PREPARE s FROM "SELECT 1 FROM t1 WHERE 1 < ALL (SELECT @a:= (1 IN (SELECT 1 FROM t1)) FROM t1)";
EXECUTE s;
1
DROP TABLE t1;
@@ -805,15 +805,6 @@ select * from t1 where IF(1,a,a)='2.1';
a b
drop table t1;
#
-# LP bug#992380 Crash when creating PS for a query with
-# subquery in WHERE (see also mysql bug#13012483)
-#
-CREATE TABLE t1 (a INT);
-PREPARE s FROM "SELECT 1 FROM t1 WHERE 1 < ALL (SELECT @:= (1 IN (SELECT 1 FROM t1)) FROM t1)";
-EXECUTE s;
-1
-DROP TABLE t1;
-#
# End of 5.3 tests
#
create table t1 (a int);
diff --git a/mysql-test/main/func_in.test b/mysql-test/main/func_in.test
index fb6f2036f20..86a54535a8b 100644
--- a/mysql-test/main/func_in.test
+++ b/mysql-test/main/func_in.test
@@ -567,7 +567,7 @@ SELECT 1 IN (YEAR(FROM_UNIXTIME(NULL)) ,1);
--echo #
CREATE TABLE t1 (a INT);
-PREPARE s FROM "SELECT 1 FROM t1 WHERE 1 < ALL (SELECT @:= (1 IN (SELECT 1 FROM t1)) FROM t1)";
+PREPARE s FROM "SELECT 1 FROM t1 WHERE 1 < ALL (SELECT @a:= (1 IN (SELECT 1 FROM t1)) FROM t1)";
EXECUTE s;
DROP TABLE t1;
@@ -595,15 +595,6 @@ select * from t1 where a='2.1';
select * from t1 where b='2.1';
select * from t1 where IF(1,a,a)='2.1';
drop table t1;
---echo #
---echo # LP bug#992380 Crash when creating PS for a query with
---echo # subquery in WHERE (see also mysql bug#13012483)
---echo #
-CREATE TABLE t1 (a INT);
-PREPARE s FROM "SELECT 1 FROM t1 WHERE 1 < ALL (SELECT @:= (1 IN (SELECT 1 FROM t1)) FROM t1)";
-EXECUTE s;
-
-DROP TABLE t1;
--echo #
--echo # End of 5.3 tests
diff --git a/mysql-test/main/func_misc.result b/mysql-test/main/func_misc.result
index 7d91f4b0777..8ae2cf4ad6b 100644
--- a/mysql-test/main/func_misc.result
+++ b/mysql-test/main/func_misc.result
@@ -118,9 +118,12 @@ create table t1 as select uuid(), length(uuid());
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `uuid()` varchar(36) DEFAULT NULL,
+ `uuid()` uuid DEFAULT NULL,
`length(uuid())` int(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+select length(`uuid()`) from t1;
+length(`uuid()`)
+36
drop table t1;
create table t1 select INET_ATON('255.255.0.1') as `a`;
show create table t1;
diff --git a/mysql-test/main/func_misc.test b/mysql-test/main/func_misc.test
index 56e7a996f94..5e8118d4cef 100644
--- a/mysql-test/main/func_misc.test
+++ b/mysql-test/main/func_misc.test
@@ -106,6 +106,7 @@ select export_set(3, _latin1'foo', _utf8'bar', ',', 4);
create table t1 as select uuid(), length(uuid());
--enable_warnings
show create table t1;
+select length(`uuid()`) from t1;
drop table t1;
#
diff --git a/mysql-test/main/func_sformat.result b/mysql-test/main/func_sformat.result
new file mode 100644
index 00000000000..1809cbad23b
--- /dev/null
+++ b/mysql-test/main/func_sformat.result
@@ -0,0 +1,470 @@
+#
+# MDEV-25015 Custom formatting of strings in MariaDB queries
+#
+#
+# Normal Test Cases
+#
+select sformat('string test');
+sformat('string test')
+string test
+select sformat(0);
+sformat(0)
+0
+select sformat('C');
+sformat('C')
+C
+select sformat(-4.2);
+sformat(-4.2)
+-4.2
+select sformat(5, 5, 5);
+sformat(5, 5, 5)
+5
+select sformat('{} {}', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+sformat('{} {}', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+0 0
+select sformat('{{{}}}', 0);
+sformat('{{{}}}', 0)
+{0}
+select sformat('{{{}{{', 0);
+sformat('{{{}{{', 0)
+{0{
+select sformat('{{{{{}{{', 'param1');
+sformat('{{{{{}{{', 'param1')
+{{param1{
+select sformat(' {{ {{ {} {{ ', 'param1');
+sformat(' {{ {{ {} {{ ', 'param1')
+ { { param1 {
+select sformat(' {{ {} {}', 'param1', 'param2');
+sformat(' {{ {} {}', 'param1', 'param2')
+ { param1 param2
+select sformat('A{}C{}E{}', 'B', 'D', 'F');
+sformat('A{}C{}E{}', 'B', 'D', 'F')
+ABCDEF
+select sformat('{} {}', FALSE, TRUE);
+sformat('{} {}', FALSE, TRUE)
+0 1
+select sformat('Add € != {} != {}?', '$', '£');
+sformat('Add € != {} != {}?', '$', '£')
+Add € != $ != £?
+select sformat('Check {} != {} != {}?', '€', '$', '£');
+sformat('Check {} != {} != {}?', '€', '$', '£')
+Check € != $ != £?
+select sformat('{}{}{}', 1, 2, 3);
+sformat('{}{}{}', 1, 2, 3)
+123
+select sformat('Float {} Boolean {} Number {}', 3.14159, True, -50);
+sformat('Float {} Boolean {} Number {}', 3.14159, True, -50)
+Float 3.14159 Boolean 1 Number -50
+select sformat('SUM {} + {} = {}', 2, 3, 2+3);
+sformat('SUM {} + {} = {}', 2, 3, 2+3)
+SUM 2 + 3 = 5
+select sformat('Numbers {} {} {}', 1, 1.11, 1.111);
+sformat('Numbers {} {} {}', 1, 1.11, 1.111)
+Numbers 1 1.11 1.111
+select sformat('what {} is {}?', 'time', 'it');
+sformat('what {} is {}?', 'time', 'it')
+what time is it?
+select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
+ {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
+ {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
+ {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}', 1, 2, 3, 4, 5, 6,
+7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
+58, 59, 60, 61, 62, 63, 64, 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);
+sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
+ {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
+ {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
+1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
+ 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
+ 62 63 64 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
+select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
+ {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
+ {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
+ {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}', '1', '2', '3 ',
+'4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20',
+'21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36',
+'37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52',
+'53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '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');
+sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
+ {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
+ {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
+1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
+ 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
+ 62 63 64 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
+#
+# Error Test Cases
+#
+select sformat('R={ }', 42);
+sformat('R={ }', 42)
+NULL
+Warnings:
+Warning 4183 SFORMAT error: invalid format string
+select sformat(NULL, 'Null', 'Test');
+sformat(NULL, 'Null', 'Test')
+NULL
+select sformat('Null Test {} {} ', 0, NULL);
+sformat('Null Test {} {} ', 0, NULL)
+NULL
+select sformat(NULL);
+sformat(NULL)
+NULL
+select sformat('My { Test');
+sformat('My { Test')
+NULL
+Warnings:
+Warning 4183 SFORMAT error: invalid format string
+select sformat('Test { {');
+sformat('Test { {')
+NULL
+Warnings:
+Warning 4183 SFORMAT error: invalid format string
+select sformat('A{}C{}E{}', 'B', 'D');
+sformat('A{}C{}E{}', 'B', 'D')
+NULL
+Warnings:
+Warning 4183 SFORMAT error: argument not found
+select sformat();
+ERROR 42000: Incorrect parameter count in the call to native function 'sformat'
+#
+# Table Test Cases
+#
+create table t1 (param1 text, param2 text, param3 int);
+insert into t1 values ('string: {}, number: {}', 'xyz', 123),
+('something {} went {} wrong {}', 'foo', 0),
+('Test case {} -> {}', 'Print', -32);
+select sformat(param1, param2, param3) from t1;
+sformat(param1, param2, param3)
+string: xyz, number: 123
+NULL
+Test case Print -> -32
+Warnings:
+Warning 4183 SFORMAT error: argument not found
+drop table t1;
+create table t2 (param1 FLOAT, param2 SMALLINT, param3 CHAR, param4 DATE);
+insert into t2 values (0.0025, 25, 'A', DATE('2020-06-29')),
+(0.0005, 5, 'B', DATE('2020-6-29')),
+(5.5555, -5, 'C', DATE('200629')),
+(-9, -9, 'D', DATE('20*06*29'));
+select sformat('p1 {:.4f} p2 {} p3 {} p4 {}', param1, param2, param3, param4) from t2;
+sformat('p1 {:.4f} p2 {} p3 {} p4 {}', param1, param2, param3, param4)
+p1 0.0025 p2 25 p3 A p4 2020-06-29
+p1 0.0005 p2 5 p3 B p4 2020-06-29
+p1 5.5555 p2 -5 p3 C p4 2020-06-29
+p1 -9.0000 p2 -9 p3 D p4 2020-06-29
+drop table t2;
+set names utf8;
+create table t3 (format_str text character set 'latin1',
+first_param text character set 'utf8',
+second_param text character set 'latin1');
+insert into t3 values ('test 1 {} {}', UNHEX('C3A5'), UNHEX('E5'));
+select sformat(format_str, first_param, second_param) from t3;
+sformat(format_str, first_param, second_param)
+test 1 å å
+select HEX(sformat(format_str, first_param, second_param)) from t3;
+HEX(sformat(format_str, first_param, second_param))
+74657374203120C3A520C3A5
+drop table t3;
+set names latin1;
+create table t4 (p1 bit(8), p2 boolean, p3 DECIMAL, p4 TIMESTAMP);
+insert into t4 values (42, TRUE, 42, '2021-08-18 16:50:07'),
+(24, FALSE, 24, '0000-00-00 00:00:00');
+select sformat('{}: {} {} {} {}', 'Data', p1, p2, p3, p4) from t4;
+sformat('{}: {} {} {} {}', 'Data', p1, p2, p3, p4)
+Data: 42 1 42 2021-08-18 16:50:07
+Data: 24 0 24 0000-00-00 00:00:00
+drop table t4;
+set names utf8;
+create table t5 (param text character SET utf8 COLLATE utf8_general_ci);
+insert into t5 values (UNHEX('C3A5')),(UNHEX('C5BB')),(UNHEX('e0b1bb')),
+(UNHEX('C38A')), (NULL);
+select sformat('{}', param) from t5;
+sformat('{}', param)
+Ã¥
+Å»
+à±»
+Ê
+NULL
+select HEX(sformat('{}', param)) from t5;
+HEX(sformat('{}', param))
+C3A5
+C5BB
+E0B1BB
+C38A
+NULL
+drop table t5;
+set names latin1;
+#
+# Format Test Cases
+#
+select sformat('Num {:L}', 13800000000);
+sformat('Num {:L}', 13800000000)
+Num 13,800,000,000
+select sformat('Num [{:20}]', 42);
+sformat('Num [{:20}]', 42)
+Num [ 42]
+select sformat('Number: {:*^{}}', 4, 5);
+sformat('Number: {:*^{}}', 4, 5)
+Number: **4**
+select sformat('{:02} - {:02} - {:02}', 1, 2, 3);
+sformat('{:02} - {:02} - {:02}', 1, 2, 3)
+01 - 02 - 03
+select sformat('Character {:c}', 104);
+sformat('Character {:c}', 104)
+Character h
+select sformat('String {:s}', 'hello');
+sformat('String {:s}', 'hello')
+String hello
+select sformat('Large {0:+010.4g}', 392.64);
+sformat('Large {0:+010.4g}', 392.64)
+Large +0000392.6
+select sformat('Large {:g}', 392.65);
+sformat('Large {:g}', 392.65)
+Large 392.65
+select sformat('Float {:.2f}', 42.0);
+sformat('Float {:.2f}', 42.0)
+Float 42.00
+select sformat('Float {:f}', 42.0);
+sformat('Float {:f}', 42.0)
+Float 42.000000
+select sformat('Number {:d}', 42);
+sformat('Number {:d}', 42)
+Number 42
+select sformat('Number {:{}}', 5, 5);
+sformat('Number {:{}}', 5, 5)
+Number 5
+select sformat('Number [{:10}]', 9999);
+sformat('Number [{:10}]', 9999)
+Number [ 9999]
+select sformat('Number {:.3}', 3.1416);
+sformat('Number {:.3}', 3.1416)
+Number 3.14
+select sformat('int: {0:d}; hex: {0:x}; oct: {0:o}', 42);
+sformat('int: {0:d}; hex: {0:x}; oct: {0:o}', 42)
+int: 42; hex: 2a; oct: 52
+select sformat('int: {0:d}; hex: {0:#x}; oct: {0:#o}', 42);
+sformat('int: {0:d}; hex: {0:#x}; oct: {0:#o}', 42)
+int: 42; hex: 0x2a; oct: 052
+select sformat('The Hexadecimal version of {0} is {0:X}', 255);
+sformat('The Hexadecimal version of {0} is {0:X}', 255)
+The Hexadecimal version of 255 is FF
+select sformat('The Hexadecimal version of {0} is {0:x}', 255);
+sformat('The Hexadecimal version of {0} is {0:x}', 255)
+The Hexadecimal version of 255 is ff
+select sformat('The octal version of {0} is {0:o}', 10);
+sformat('The octal version of {0} is {0:o}', 10)
+The octal version of 10 is 12
+select sformat('The binary version of {0} is {0:b}', 5);
+sformat('The binary version of {0} is {0:b}', 5)
+The binary version of 5 is 101
+select sformat('{:+f}; {:+f}', 3.14, -3.14);
+sformat('{:+f}; {:+f}', 3.14, -3.14)
++3.140000; -3.140000
+select sformat('{: f}; {: f}', 3.14, -3.14);
+sformat('{: f}; {: f}', 3.14, -3.14)
+ 3.140000; -3.140000
+select sformat('{:-f}; {:-f}', 3.14, -3.14);
+sformat('{:-f}; {:-f}', 3.14, -3.14)
+3.140000; -3.140000
+select sformat('The temperature is between {: } and {: } degrees celsius.', -3, 7);
+sformat('The temperature is between {: } and {: } degrees celsius.', -3, 7)
+The temperature is between -3 and 7 degrees celsius.
+select sformat('The temperature is between {:-} and {:-} degrees celsius.', -3, 7);
+sformat('The temperature is between {:-} and {:-} degrees celsius.', -3, 7)
+The temperature is between -3 and 7 degrees celsius.
+select sformat('The temperature is between {:+} and {:+} degrees celsius.', -3, 7);
+sformat('The temperature is between {:+} and {:+} degrees celsius.', -3, 7)
+The temperature is between -3 and +7 degrees celsius.
+select sformat('We have {:<8} chickens.', 49);
+sformat('We have {:<8} chickens.', 49)
+We have 49 chickens.
+select sformat('Center alimgn [{:*^10}]', 'data');
+sformat('Center alimgn [{:*^10}]', 'data')
+Center alimgn [***data***]
+select sformat('Center aling [{:^10}].', 'data');
+sformat('Center aling [{:^10}].', 'data')
+Center aling [ data ].
+select sformat('Right aling [{:>10}].', 'data');
+sformat('Right aling [{:>10}].', 'data')
+Right aling [ data].
+select sformat('Left align [{:<10}].', 'data');
+sformat('Left align [{:<10}].', 'data')
+Left align [data ].
+select sformat('{0}{1}{0}', 'abra', 'cad');
+sformat('{0}{1}{0}', 'abra', 'cad')
+abracadabra
+select sformat('Change Order {1} {0}', 'second', 'first');
+sformat('Change Order {1} {0}', 'second', 'first')
+Change Order first second
+#
+# Failed Format Test Cases
+#
+select sformat('Test {:c}', 'word');
+sformat('Test {:c}', 'word')
+NULL
+Warnings:
+Warning 4183 SFORMAT error: invalid type specifier
+select sformat('Test {one} {two} {three}', 1, 2, 3);
+sformat('Test {one} {two} {three}', 1, 2, 3)
+NULL
+Warnings:
+Warning 4183 SFORMAT error: argument not found
+select sformat('Number {:{<}', 8);
+sformat('Number {:{<}', 8)
+NULL
+Warnings:
+Warning 4183 SFORMAT error: invalid fill character '{'
+select sformat('Number {:10000000000}', 5);
+sformat('Number {:10000000000}', 5)
+NULL
+Warnings:
+Warning 4183 SFORMAT error: number is too big
+select sformat('1={1} 2={2} 0={0}', 0, 1);
+sformat('1={1} 2={2} 0={0}', 0, 1)
+NULL
+Warnings:
+Warning 4183 SFORMAT error: argument not found
+select sformat('Number {:.2d}', 42);
+sformat('Number {:.2d}', 42)
+NULL
+Warnings:
+Warning 4183 SFORMAT error: precision not allowed for this argument type
+select sformat('You scored {:.0%}', 0.25);
+sformat('You scored {:.0%}', 0.25)
+NULL
+Warnings:
+Warning 4183 SFORMAT error: invalid type specifier
+select sformat('You scored {:%}', 0.25);
+sformat('You scored {:%}', 0.25)
+NULL
+Warnings:
+Warning 4183 SFORMAT error: invalid type specifier
+select sformat('The price is {:f} dollars.', 45);
+sformat('The price is {:f} dollars.', 45)
+NULL
+Warnings:
+Warning 4183 SFORMAT error: invalid type specifier
+select sformat('The price is {:.2f} dollars.', 45);
+sformat('The price is {:.2f} dollars.', 45)
+NULL
+Warnings:
+Warning 4183 SFORMAT error: precision not allowed for this argument type
+select sformat('We have {:E} chickens.', 5);
+sformat('We have {:E} chickens.', 5)
+NULL
+Warnings:
+Warning 4183 SFORMAT error: invalid type specifier
+select sformat('We have {:e} chickens.', 5);
+sformat('We have {:e} chickens.', 5)
+NULL
+Warnings:
+Warning 4183 SFORMAT error: invalid type specifier
+select sformat('The universe is {:,} years old.', 13800000000);
+sformat('The universe is {:,} years old.', 13800000000)
+NULL
+Warnings:
+Warning 4183 SFORMAT error: invalid type specifier
+select sformat('The universe is {:_} years old.', 13800000000);
+sformat('The universe is {:_} years old.', 13800000000)
+NULL
+Warnings:
+Warning 4183 SFORMAT error: invalid type specifier
+select sformat('String {:-}', 'hello');
+sformat('String {:-}', 'hello')
+NULL
+Warnings:
+Warning 4183 SFORMAT error: format specifier requires numeric argument
+#
+# Table Format Test Cases
+#
+create table t1 (pformat text, data1 FLOAT, data2 INT,
+data3 VARCHAR(30));
+insert into t1 values ('{:.2f} {: } |{:*^15}', 1.11, 1, 'example I'),
+('{:.1f} {:-} |{:^15}', -2.22, -2, 'example II'),
+('{:.2f} {:+} |{:<15}', 3.33, 3, 'example III'),
+('{:.4f} {:d} |{:^15}', -4.44, -4, 'example IV');
+select sformat(pformat, data1, data2, data3) from t1;
+sformat(pformat, data1, data2, data3)
+1.11 1 |***example I***
+-2.2 -2 | example II
+3.33 +3 |example III
+-4.4400 -4 | example IV
+drop table t1;
+create table t2 (a double);
+insert into t2 values (3.14159265358979323846);
+select a, sformat('{:.15f}', a) from t2;
+a sformat('{:.15f}', a)
+3.141592653589793 3.141592653589793
+drop table t2;
+#
+# Unsupported/disabled features
+#
+select sformat('{:p}', '50');
+sformat('{:p}', '50')
+NULL
+Warnings:
+Warning 4183 SFORMAT error: invalid type specifier
+#
+# ucs2 test
+#
+select sformat('={}=', _ucs2 x'006100620063');
+sformat('={}=', _ucs2 x'006100620063')
+=abc=
+set names utf8;
+select sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442');
+sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442')
+=теÑÑ‚=
+select hex(sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442'));
+hex(sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442'))
+003D0442043504410442003D
+create table t1 as select sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442') as x;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` varchar(8) CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+drop table t1;
+set names latin1;
+#
+# ps parameters
+#
+prepare s from 'select sformat("={:d}=", ?)';
+execute s using 100;
+sformat("={:d}=", ?)
+=100=
+execute s using 'abc';
+sformat("={:d}=", ?)
+NULL
+Warnings:
+Warning 4183 SFORMAT error: invalid type specifier
+#
+# MDEV-26691 SFORMAT: Pass down FLOAT as FLOAT, without upcast to DOUBLE
+#
+select sformat('{}', cast(1.1 as float));
+sformat('{}', cast(1.1 as float))
+1.1
+#
+# MDEV-26646 SFORMAT Does not allow @variable use
+#
+set names utf8;
+set @a=3.14;
+select sformat('{:f}', @a);
+sformat('{:f}', @a)
+3.140000
+set names latin1;
+#
+# End of 10.7 tests
+#
diff --git a/mysql-test/main/func_sformat.test b/mysql-test/main/func_sformat.test
new file mode 100644
index 00000000000..7c850fc2644
--- /dev/null
+++ b/mysql-test/main/func_sformat.test
@@ -0,0 +1,228 @@
+echo #;
+echo # MDEV-25015 Custom formatting of strings in MariaDB queries;
+echo #;
+
+# Description
+# -----------
+# Test cases for the sformat function
+
+echo #;
+echo # Normal Test Cases;
+echo #;
+select sformat('string test');
+select sformat(0);
+select sformat('C');
+select sformat(-4.2);
+select sformat(5, 5, 5);
+select sformat('{} {}', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+select sformat('{{{}}}', 0);
+select sformat('{{{}{{', 0);
+select sformat('{{{{{}{{', 'param1');
+select sformat(' {{ {{ {} {{ ', 'param1');
+select sformat(' {{ {} {}', 'param1', 'param2');
+select sformat('A{}C{}E{}', 'B', 'D', 'F');
+select sformat('{} {}', FALSE, TRUE);
+select sformat('Add € != {} != {}?', '$', '£');
+select sformat('Check {} != {} != {}?', '€', '$', '£');
+select sformat('{}{}{}', 1, 2, 3);
+select sformat('Float {} Boolean {} Number {}', 3.14159, True, -50);
+select sformat('SUM {} + {} = {}', 2, 3, 2+3);
+select sformat('Numbers {} {} {}', 1, 1.11, 1.111);
+select sformat('what {} is {}?', 'time', 'it');
+select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
+ {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
+ {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
+ {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}', 1, 2, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
+ 58, 59, 60, 61, 62, 63, 64, 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);
+select sformat('{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
+ {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
+ {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}
+ {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}', '1', '2', '3 ',
+ '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20',
+ '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36',
+ '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52',
+ '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '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');
+
+echo #;
+echo # Error Test Cases;
+echo #;
+select sformat('R={ }', 42);
+select sformat(NULL, 'Null', 'Test');
+select sformat('Null Test {} {} ', 0, NULL);
+select sformat(NULL);
+select sformat('My { Test');
+select sformat('Test { {');
+select sformat('A{}C{}E{}', 'B', 'D');
+error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT;
+select sformat();
+error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT;
+echo #;
+echo # Table Test Cases;
+echo #;
+create table t1 (param1 text, param2 text, param3 int);
+insert into t1 values ('string: {}, number: {}', 'xyz', 123),
+ ('something {} went {} wrong {}', 'foo', 0),
+ ('Test case {} -> {}', 'Print', -32);
+select sformat(param1, param2, param3) from t1;
+drop table t1;
+
+create table t2 (param1 FLOAT, param2 SMALLINT, param3 CHAR, param4 DATE);
+insert into t2 values (0.0025, 25, 'A', DATE('2020-06-29')),
+ (0.0005, 5, 'B', DATE('2020-6-29')),
+ (5.5555, -5, 'C', DATE('200629')),
+ (-9, -9, 'D', DATE('20*06*29'));
+select sformat('p1 {:.4f} p2 {} p3 {} p4 {}', param1, param2, param3, param4) from t2;
+drop table t2;
+
+set names utf8;
+create table t3 (format_str text character set 'latin1',
+ first_param text character set 'utf8',
+ second_param text character set 'latin1');
+insert into t3 values ('test 1 {} {}', UNHEX('C3A5'), UNHEX('E5'));
+select sformat(format_str, first_param, second_param) from t3;
+select HEX(sformat(format_str, first_param, second_param)) from t3;
+drop table t3;
+set names latin1;
+
+create table t4 (p1 bit(8), p2 boolean, p3 DECIMAL, p4 TIMESTAMP);
+insert into t4 values (42, TRUE, 42, '2021-08-18 16:50:07'),
+ (24, FALSE, 24, '0000-00-00 00:00:00');
+select sformat('{}: {} {} {} {}', 'Data', p1, p2, p3, p4) from t4;
+drop table t4;
+
+set names utf8;
+create table t5 (param text character SET utf8 COLLATE utf8_general_ci);
+insert into t5 values (UNHEX('C3A5')),(UNHEX('C5BB')),(UNHEX('e0b1bb')),
+ (UNHEX('C38A')), (NULL);
+select sformat('{}', param) from t5;
+select HEX(sformat('{}', param)) from t5;
+drop table t5;
+set names latin1;
+
+echo #;
+echo # Format Test Cases;
+echo #;
+select sformat('Num {:L}', 13800000000);
+select sformat('Num [{:20}]', 42);
+select sformat('Number: {:*^{}}', 4, 5);
+select sformat('{:02} - {:02} - {:02}', 1, 2, 3);
+select sformat('Character {:c}', 104);
+select sformat('String {:s}', 'hello');
+select sformat('Large {0:+010.4g}', 392.64);
+select sformat('Large {:g}', 392.65);
+select sformat('Float {:.2f}', 42.0);
+select sformat('Float {:f}', 42.0);
+select sformat('Number {:d}', 42);
+select sformat('Number {:{}}', 5, 5);
+select sformat('Number [{:10}]', 9999);
+select sformat('Number {:.3}', 3.1416);
+select sformat('int: {0:d}; hex: {0:x}; oct: {0:o}', 42);
+select sformat('int: {0:d}; hex: {0:#x}; oct: {0:#o}', 42);
+select sformat('The Hexadecimal version of {0} is {0:X}', 255);
+select sformat('The Hexadecimal version of {0} is {0:x}', 255);
+select sformat('The octal version of {0} is {0:o}', 10);
+select sformat('The binary version of {0} is {0:b}', 5);
+select sformat('{:+f}; {:+f}', 3.14, -3.14);
+select sformat('{: f}; {: f}', 3.14, -3.14);
+select sformat('{:-f}; {:-f}', 3.14, -3.14);
+select sformat('The temperature is between {: } and {: } degrees celsius.', -3, 7);
+select sformat('The temperature is between {:-} and {:-} degrees celsius.', -3, 7);
+select sformat('The temperature is between {:+} and {:+} degrees celsius.', -3, 7);
+select sformat('We have {:<8} chickens.', 49);
+select sformat('Center alimgn [{:*^10}]', 'data');
+select sformat('Center aling [{:^10}].', 'data');
+select sformat('Right aling [{:>10}].', 'data');
+select sformat('Left align [{:<10}].', 'data');
+select sformat('{0}{1}{0}', 'abra', 'cad');
+select sformat('Change Order {1} {0}', 'second', 'first');
+
+echo #;
+echo # Failed Format Test Cases;
+echo #;
+select sformat('Test {:c}', 'word');
+select sformat('Test {one} {two} {three}', 1, 2, 3);
+select sformat('Number {:{<}', 8);
+select sformat('Number {:10000000000}', 5);
+select sformat('1={1} 2={2} 0={0}', 0, 1);
+select sformat('Number {:.2d}', 42);
+select sformat('You scored {:.0%}', 0.25);
+select sformat('You scored {:%}', 0.25);
+select sformat('The price is {:f} dollars.', 45);
+select sformat('The price is {:.2f} dollars.', 45);
+select sformat('We have {:E} chickens.', 5);
+select sformat('We have {:e} chickens.', 5);
+select sformat('The universe is {:,} years old.', 13800000000);
+select sformat('The universe is {:_} years old.', 13800000000);
+select sformat('String {:-}', 'hello');
+
+echo #;
+echo # Table Format Test Cases;
+echo #;
+create table t1 (pformat text, data1 FLOAT, data2 INT,
+ data3 VARCHAR(30));
+insert into t1 values ('{:.2f} {: } |{:*^15}', 1.11, 1, 'example I'),
+ ('{:.1f} {:-} |{:^15}', -2.22, -2, 'example II'),
+ ('{:.2f} {:+} |{:<15}', 3.33, 3, 'example III'),
+ ('{:.4f} {:d} |{:^15}', -4.44, -4, 'example IV');
+select sformat(pformat, data1, data2, data3) from t1;
+drop table t1;
+
+create table t2 (a double);
+insert into t2 values (3.14159265358979323846);
+select a, sformat('{:.15f}', a) from t2;
+drop table t2;
+
+echo #;
+echo # Unsupported/disabled features;
+echo #;
+select sformat('{:p}', '50');
+
+echo #;
+echo # ucs2 test;
+echo #;
+select sformat('={}=', _ucs2 x'006100620063');
+set names utf8;
+select sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442');
+select hex(sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442'));
+create table t1 as select sformat(_ucs2 x'003D007B007D003D', _ucs2 x'0442043504410442') as x;
+show create table t1;
+drop table t1;
+set names latin1;
+
+echo #;
+echo # ps parameters;
+echo #;
+prepare s from 'select sformat("={:d}=", ?)';
+execute s using 100;
+execute s using 'abc';
+
+echo #;
+echo # MDEV-26691 SFORMAT: Pass down FLOAT as FLOAT, without upcast to DOUBLE;
+echo #;
+
+select sformat('{}', cast(1.1 as float));
+
+echo #;
+echo # MDEV-26646 SFORMAT Does not allow @variable use;
+echo #;
+
+set names utf8;
+set @a=3.14;
+select sformat('{:f}', @a);
+set names latin1;
+
+echo #;
+echo # End of 10.7 tests;
+echo #;
diff --git a/mysql-test/main/func_time.result b/mysql-test/main/func_time.result
index 62f6f3199b2..27d5810d5f6 100644
--- a/mysql-test/main/func_time.result
+++ b/mysql-test/main/func_time.result
@@ -2798,7 +2798,7 @@ SET sql_mode=DEFAULT;
#
# MDEV-13972 crash in Item_func_sec_to_time::get_date
#
-DO TO_DAYS(SEC_TO_TIME(TIME(CEILING(UUID()))));
+DO TO_DAYS(SEC_TO_TIME(TIME(CEILING(SYS_GUID()))));
DO TO_DAYS(SEC_TO_TIME(MAKEDATE('',RAND(~('')))));
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: ''
diff --git a/mysql-test/main/func_time.test b/mysql-test/main/func_time.test
index 2ae79d41694..7135ae4cc87 100644
--- a/mysql-test/main/func_time.test
+++ b/mysql-test/main/func_time.test
@@ -1705,7 +1705,7 @@ SET sql_mode=DEFAULT;
# The below query can return warning sporadically
--disable_warnings
-DO TO_DAYS(SEC_TO_TIME(TIME(CEILING(UUID()))));
+DO TO_DAYS(SEC_TO_TIME(TIME(CEILING(SYS_GUID()))));
--enable_warnings
DO TO_DAYS(SEC_TO_TIME(MAKEDATE('',RAND(~('')))));
diff --git a/mysql-test/main/get_diagnostics.result b/mysql-test/main/get_diagnostics.result
index b00378d4ee9..48eab8e0734 100644
--- a/mysql-test/main/get_diagnostics.result
+++ b/mysql-test/main/get_diagnostics.result
@@ -628,7 +628,7 @@ v
NULL
Warnings:
Note 1050 Table 't1' already exists
-Error 1406 Data too long for column 'v' at row 1
+Error 1406 Data too long for column 'v' at row 0
DROP TABLE t1;
DROP PROCEDURE p1;
@@ -799,3 +799,1066 @@ CREATE TABLE t2 (a char(1)) VALUES ('a'),('b') UNION VALUES ('foo');
Warnings:
Warning 1406 Data too long for column 'a' at row 3
DROP TABLE t1, t2;
+#
+# End of 10.6 tests
+#
+#
+# MDEV-10075: Provide index of error causing error in array INSERT
+#
+#
+# INSERT STATEMENT
+#
+CREATE TABLE t1(id1 INT PRIMARY KEY, val1 VARCHAR(10), d1 DOUBLE);
+CREATE TABLE t2(id2 INT PRIMARY KEY, val2 VARCHAR(10), d2 DOUBLE, p2 POINT);
+# Simple INSERT statement
+INSERT INTO t1 VALUES(1,'a',1.00101), (2,'b',1.00102), (3,'c',1.00103);
+INSERT INTO t1 VALUES (4,'d',1.00104),(1,'a',1.00101),(2,'b',1.00102);
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+GET DIAGNOSTICS CONDITION 1 @var1= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var2= ROW_NUMBER;
+Warnings:
+Error 1062 Duplicate entry '1' for key 'PRIMARY'
+Error 1758 Invalid condition number
+SELECT @var1, @var2;
+@var1 @var2
+2
+INSERT INTO t1 VALUES (5,'e',1.00105),(6,'f',1.79769313486232e+308);
+ERROR 22007: Illegal double '1.79769313486232e+308' value found during parsing
+GET DIAGNOSTICS CONDITION 1 @var3= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var4= ROW_NUMBER;
+Warnings:
+Error 1367 Illegal double '1.79769313486232e+308' value found during parsing
+Error 1758 Invalid condition number
+SELECT @var3, @var4;
+@var3 @var4
+2 NULL
+INSERT INTO t1 VALUES (7,'g',1.00107),(8,'h',1.00108),(9,'i'),(10,'j');
+ERROR 21S01: Column count doesn't match value count at row 3
+GET DIAGNOSTICS CONDITION 1 @var5= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var6= ROW_NUMBER;
+Warnings:
+Error 1136 Column count doesn't match value count at row 3
+Error 1758 Invalid condition number
+SELECT @var5, @var6;
+@var5 @var6
+3 NULL
+INSERT INTO t1 VALUES (8,8,8),(9,CAST(123 AS CHAR(1)),1.00109);
+Warnings:
+Warning 1292 Truncated incorrect CHAR(1) value: '123'
+GET DIAGNOSTICS CONDITION 1 @var7= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var8= ROW_NUMBER;
+Warnings:
+Warning 1292 Truncated incorrect CHAR(1) value: '123'
+Error 1758 Invalid condition number
+SELECT @var7, @var8;
+@var7 @var8
+2 NULL
+INSERT INTO t1 VALUES (10,10,10),('x','foo',1.0203);
+Warnings:
+Warning 1366 Incorrect integer value: 'x' for column `test`.`t1`.`id1` at row 2
+GET DIAGNOSTICS CONDITION 1 @var9= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var10= ROW_NUMBER;
+Warnings:
+Warning 1366 Incorrect integer value: 'x' for column `test`.`t1`.`id1` at row 2
+Error 1758 Invalid condition number
+SELECT @var9, @var10;
+@var9 @var10
+2 NULL
+INSERT INTO t1 VALUES (11,11,11),(12,12,(13,'m',1.0113));
+ERROR 21000: Operand should contain 1 column(s)
+GET DIAGNOSTICS CONDITION 1 @var11= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var12= ROW_NUMBER;
+Warnings:
+Error 1241 Operand should contain 1 column(s)
+Error 1758 Invalid condition number
+SELECT @var11, @var12;
+@var11 @var12
+2 NULL
+delete from t1 where id1=0;
+INSERT INTO t1 VALUES (14,'n',1.0114), (15,'o',1.0115), (16/0,'p',1.0116);
+Warnings:
+Warning 1365 Division by 0
+Warning 1048 Column 'id1' cannot be null
+GET DIAGNOSTICS CONDITION 1 @var13= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var14= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 3 @var15= ROW_NUMBER;
+Warnings:
+Warning 1365 Division by 0
+Warning 1048 Column 'id1' cannot be null
+Error 1758 Invalid condition number
+SELECT @var13, @var14, @var15;
+@var13 @var14 @var15
+3 3 NULL
+TRUNCATE TABLE t1;
+# INSERT ... IGNORE
+INSERT IGNORE INTO t1 VALUES(1,'a',1.00101), (2,'b',1.00102), (3,'c',1.00103);
+INSERT IGNORE INTO t1 VALUES (4,'d',1.00104),(1,'a',1.00101),(2,'b',1.00102);
+Warnings:
+Warning 1062 Duplicate entry '1' for key 'PRIMARY'
+Warning 1062 Duplicate entry '2' for key 'PRIMARY'
+GET DIAGNOSTICS CONDITION 1 @var16= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var17= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 3 @var18= ROW_NUMBER;
+Warnings:
+Warning 1062 Duplicate entry '1' for key 'PRIMARY'
+Warning 1062 Duplicate entry '2' for key 'PRIMARY'
+Error 1758 Invalid condition number
+SELECT @var16, @var17, @var18;
+@var16 @var17 @var18
+2 3 NULL
+INSERT IGNORE INTO t1 VALUES (5,'e',1.00105),(6,'f',1.79769313486232e+308);
+ERROR 22007: Illegal double '1.79769313486232e+308' value found during parsing
+GET DIAGNOSTICS CONDITION 1 @var19= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var20= ROW_NUMBER;
+Warnings:
+Error 1367 Illegal double '1.79769313486232e+308' value found during parsing
+Error 1758 Invalid condition number
+SELECT @var19, @var20;
+@var19 @var20
+2 NULL
+INSERT IGNORE INTO t1 VALUES (7,'g',1.00107),(8,'h',1.00108),(9,'i'),(10,'j');
+ERROR 21S01: Column count doesn't match value count at row 3
+GET DIAGNOSTICS CONDITION 1 @var21= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var22= ROW_NUMBER;
+Warnings:
+Error 1136 Column count doesn't match value count at row 3
+Error 1758 Invalid condition number
+SELECT @var21, @var22;
+@var21 @var22
+3 NULL
+INSERT IGNORE INTO t1 VALUES (8,8,8),(9,CAST(123 AS CHAR(1)),1.00109);
+Warnings:
+Warning 1292 Truncated incorrect CHAR(1) value: '123'
+GET DIAGNOSTICS CONDITION 1 @var23= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var24= ROW_NUMBER;
+Warnings:
+Warning 1292 Truncated incorrect CHAR(1) value: '123'
+Error 1758 Invalid condition number
+SELECT @var23, @var24;
+@var23 @var24
+2 NULL
+INSERT IGNORE INTO t1 VALUES (10,10,10),('x','foo',1.0203);
+Warnings:
+Warning 1366 Incorrect integer value: 'x' for column `test`.`t1`.`id1` at row 2
+GET DIAGNOSTICS CONDITION 1 @var25= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var26= ROW_NUMBER;
+Warnings:
+Warning 1366 Incorrect integer value: 'x' for column `test`.`t1`.`id1` at row 2
+Error 1758 Invalid condition number
+SELECT @var25, @var26;
+@var25 @var26
+2 NULL
+INSERT IGNORE INTO t1 VALUES (11,11,11),(12,12,(13,'m',1.0113));
+ERROR 21000: Operand should contain 1 column(s)
+GET DIAGNOSTICS CONDITION 1 @var27= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var28= ROW_NUMBER;
+Warnings:
+Error 1241 Operand should contain 1 column(s)
+Error 1758 Invalid condition number
+SELECT @var27, @var28;
+@var27 @var28
+2 NULL
+INSERT IGNORE INTO t1 VALUES (14,'n',1.0114), (15,'o',1.0115),
+(16/0,'p',1.0116);
+Warnings:
+Warning 1365 Division by 0
+Warning 1048 Column 'id1' cannot be null
+Warning 1062 Duplicate entry '0' for key 'PRIMARY'
+GET DIAGNOSTICS CONDITION 1 @var29= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var30= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 3 @var31= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 4 @var32= ROW_NUMBER;
+Warnings:
+Warning 1365 Division by 0
+Warning 1048 Column 'id1' cannot be null
+Warning 1062 Duplicate entry '0' for key 'PRIMARY'
+Error 1758 Invalid condition number
+SELECT @var29, @var30, @var31, @var32;
+@var29 @var30 @var31 @var32
+3 3 3 NULL
+TRUNCATE TABLE t1;
+# INSERT ... SET
+INSERT INTO t1 SET id1=1, val1='a', d1=1.00101;
+INSERT INTO t1 SET id1=2, val1='b', d1=1.00102;
+INSERT INTO t1 SET id1=3, val1='c', d1=1.00103;
+INSERT INTO t1 SET id1=1, val1='a', d1=1.00101;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+GET DIAGNOSTICS CONDITION 1 @var33= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var34= ROW_NUMBER;
+Warnings:
+Error 1062 Duplicate entry '1' for key 'PRIMARY'
+Error 1758 Invalid condition number
+SELECT @var33, @var34;
+@var33 @var34
+1 NULL
+INSERT INTO t1 SET id1=6, val1='f', d1=1.79769313486232e+308);
+ERROR 22007: Illegal double '1.79769313486232e+308' value found during parsing
+GET DIAGNOSTICS CONDITION 1 @var35= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var36= ROW_NUMBER;
+Warnings:
+Error 1367 Illegal double '1.79769313486232e+308' value found during parsing
+Error 1758 Invalid condition number
+SELECT @var35, @var36;
+@var35 @var36
+1 NULL
+INSERT INTO t1 SET id1=9, val1=CAST(123 AS CHAR(1)), d1=1.00109;
+ERROR 22007: Truncated incorrect CHAR(1) value: '123'
+GET DIAGNOSTICS CONDITION 1 @var37= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var38= ROW_NUMBER;
+Warnings:
+Error 1292 Truncated incorrect CHAR(1) value: '123'
+Error 1758 Invalid condition number
+SELECT @var37, @var38;
+@var37 @var38
+1 NULL
+INSERT INTO t1 SET id1='x', val1='foo', d1=1.0203;
+ERROR 22007: Incorrect integer value: 'x' for column `test`.`t1`.`id1` at row 1
+GET DIAGNOSTICS CONDITION 1 @var39= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var40= ROW_NUMBER;
+Warnings:
+Error 1366 Incorrect integer value: 'x' for column `test`.`t1`.`id1` at row 1
+Error 1758 Invalid condition number
+SELECT @var39, @var40;
+@var39 @var40
+1 NULL
+INSERT INTO t1 SET id1=3/0, val1='p', d1=1.0116;
+ERROR 22012: Division by 0
+GET DIAGNOSTICS CONDITION 1 @var41= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var42= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 3 @var43= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 4 @var44= ROW_NUMBER;
+Warnings:
+Error 1365 Division by 0
+Error 1048 Column 'id1' cannot be null
+Error 1105 Unknown error
+Error 1758 Invalid condition number
+SELECT @var41, @var42, @var43, @var44;
+@var41 @var42 @var43 @var44
+1 1 1 NULL
+TRUNCATE TABLE t1;
+# INSERT ... ON DUPLICATE KEY UPDATE
+INSERT INTO t1 VALUES(1,'a',1.00101), (2,'b',1.00102), (3,'c',1.00103);
+INSERT INTO t1 VALUES (4,'d',1.00104),(1,'a',1.00101)
+ON DUPLICATE KEY UPDATE val1='a', d1=1.00101;
+GET DIAGNOSTICS CONDITION 1 @var45= ROW_NUMBER;
+Warnings:
+Error 1758 Invalid condition number
+GET DIAGNOSTICS CONDITION 2 @var46= ROW_NUMBER;
+Warnings:
+Error 1758 Invalid condition number
+Error 1758 Invalid condition number
+SELECT @var45, @var46;
+@var45 @var46
+NULL NULL
+INSERT INTO t1 VALUES (5,'e',1.00105),(3,'f',1.79769313486232e+308)
+ON DUPLICATE KEY UPDATE val1='c';
+ERROR 22007: Illegal double '1.79769313486232e+308' value found during parsing
+GET DIAGNOSTICS CONDITION 1 @var47= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var48= ROW_NUMBER;
+Warnings:
+Error 1367 Illegal double '1.79769313486232e+308' value found during parsing
+Error 1758 Invalid condition number
+SELECT @var47, @var48;
+@var47 @var48
+2 NULL
+INSERT INTO t1 VALUES (5,'e',1.00105), (3,'i')
+ON DUPLICATE KEY UPDATE val1='c';
+ERROR 21S01: Column count doesn't match value count at row 2
+GET DIAGNOSTICS CONDITION 1 @var49= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var50= ROW_NUMBER;
+Warnings:
+Error 1136 Column count doesn't match value count at row 2
+Error 1758 Invalid condition number
+SELECT @var49, @var50;
+@var49 @var50
+2 NULL
+INSERT INTO t1 VALUES (3, CAST(123 AS CHAR(1)), 1.00103)
+ON DUPLICATE KEY UPDATE val1='c';
+ERROR 22007: Truncated incorrect CHAR(1) value: '123'
+GET DIAGNOSTICS CONDITION 1 @var51= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var52= ROW_NUMBER;
+Warnings:
+Error 1292 Truncated incorrect CHAR(1) value: '123'
+Error 1758 Invalid condition number
+SELECT @var51, @var52;
+@var51 @var52
+1 NULL
+INSERT INTO t1 VALUES (10,10,10),('x','foo',1.0203)
+ON DUPLICATE KEY UPDATE val1='c';
+Warnings:
+Warning 1366 Incorrect integer value: 'x' for column `test`.`t1`.`id1` at row 2
+GET DIAGNOSTICS CONDITION 1 @var53= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var54= ROW_NUMBER;
+Warnings:
+Warning 1366 Incorrect integer value: 'x' for column `test`.`t1`.`id1` at row 2
+Error 1758 Invalid condition number
+SELECT @var53, @var54;
+@var53 @var54
+2 NULL
+INSERT INTO t1 VALUES (11,11,11),(12,12,(13,'m',1.0113)) ON DUPLICATE KEY UPDATE val1='c';
+ERROR 21000: Operand should contain 1 column(s)
+GET DIAGNOSTICS CONDITION 1 @var55= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var56= ROW_NUMBER;
+Warnings:
+Error 1241 Operand should contain 1 column(s)
+Error 1758 Invalid condition number
+SELECT @var55, @var56;
+@var55 @var56
+2 NULL
+INSERT INTO t1 VALUES (14,'n',1.0114), (15,'o',1.0115), (2/0,'p',1.00102)
+ON DUPLICATE KEY UPDATE val1='b';
+Warnings:
+Warning 1365 Division by 0
+Warning 1048 Column 'id1' cannot be null
+GET DIAGNOSTICS CONDITION 1 @var57= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var58= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 3 @var59= ROW_NUMBER;
+Warnings:
+Warning 1365 Division by 0
+Warning 1048 Column 'id1' cannot be null
+Error 1758 Invalid condition number
+SELECT @var57, @var58, @var59;
+@var57 @var58 @var59
+3 3 NULL
+INSERT INTO t1 VALUES (1,'e',1.0),(5,'e',1.0),(5,'f',1.7)
+ON DUPLICATE KEY UPDATE id1='1';
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+GET DIAGNOSTICS CONDITION 1 @var60= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var61= ROW_NUMBER;
+Warnings:
+Error 1062 Duplicate entry '1' for key 'PRIMARY'
+Error 1758 Invalid condition number
+SELECT @var60, @var61;
+@var60 @var61
+3 NULL
+TRUNCATE TABLE t1;
+DROP TABLE t1;
+DROP TABLE t2;
+INSERT ... SELECT
+CREATE TABLE t1(id1 INT PRIMARY KEY, val1 VARCHAR(10), d1 DOUBLE);
+CREATE TABLE t2(id2 INT PRIMARY KEY, val2 VARCHAR(10), d2 DOUBLE, p2 POINT);
+INSERT INTO t2 VALUES(1,'a',1.00101,PointFromText('POINT(20 10)')),
+(2,'b',1.00102,PointFromText('POINT(20 10)')),
+(3,'c',1.00103,PointFromText('POINT(20 10)'));
+INSERT INTO t1 SELECT id2, val2, d2 FROM t2;
+INSERT INTO t1 SELECT id2, val2, d2 FROM t2 WHERE id2=1;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+GET DIAGNOSTICS CONDITION 1 @var62= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var63= ROW_NUMBER;
+Warnings:
+Error 1062 Duplicate entry '1' for key 'PRIMARY'
+Error 1758 Invalid condition number
+SELECT @var62, @var63;
+@var62 @var63
+1 NULL
+INSERT INTO t1 SELECT id2, val2, p2 from t2;
+ERROR HY000: Cannot cast 'point' as 'double' in assignment of `test`.`t1`.`d1`
+GET DIAGNOSTICS CONDITION 1 @var64= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var65= ROW_NUMBER;
+Warnings:
+Error 4078 Cannot cast 'point' as 'double' in assignment of `test`.`t1`.`d1`
+Error 1758 Invalid condition number
+SELECT @var64, @var65;
+@var64 @var65
+1 NULL
+INSERT INTO t1 SELECT id2, val2 FROM t2;
+ERROR 21S01: Column count doesn't match value count at row 1
+GET DIAGNOSTICS CONDITION 1 @var66= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var67= ROW_NUMBER;
+Warnings:
+Error 1136 Column count doesn't match value count at row 1
+Error 1758 Invalid condition number
+SELECT @var66, @var67;
+@var66 @var67
+1 NULL
+INSERT INTO t2 VALUES(4,'a',1.00101,PointFromText('POINT(20 10)'));
+INSERT INTO t1 SELECT id2, CAST(123 AS CHAR(1)), d2 FROM t2 WHERE id2=4;
+ERROR 22007: Truncated incorrect CHAR(1) value: '123'
+GET DIAGNOSTICS CONDITION 1 @var68= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var69= ROW_NUMBER;
+Warnings:
+Error 1292 Truncated incorrect CHAR(1) value: '123'
+Error 1758 Invalid condition number
+SELECT @var68, @var69;
+@var68 @var69
+1 NULL
+INSERT INTO t1 SELECT id2, val2, 1.79769313486232e+308 FROM t2;
+ERROR 22007: Illegal double '1.79769313486232e+308' value found during parsing
+GET DIAGNOSTICS CONDITION 1 @var70= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var71= ROW_NUMBER;
+Warnings:
+Error 1367 Illegal double '1.79769313486232e+308' value found during parsing
+Error 1758 Invalid condition number
+SELECT @var70, @var71;
+@var70 @var71
+1 NULL
+INSERT INTO t1 SELECT id2/0, val2, d2 FROM t2;
+ERROR 22012: Division by 0
+GET DIAGNOSTICS CONDITION 1 @var72= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var73= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 3 @var74= ROW_NUMBER;
+Warnings:
+Error 1365 Division by 0
+Error 1048 Column 'id1' cannot be null
+Error 1758 Invalid condition number
+SELECT @var72, @var73, @var74;
+@var72 @var73 @var74
+1 1 NULL
+DROP TABLE t1,t2;
+# Checking ROW_NUMBER in STORED PROCEDURE for INSERT
+CREATE TABLE t1(id1 INT PRIMARY KEY);
+CREATE PROCEDURE proc1 ()
+BEGIN
+DECLARE var75 INT;
+DECLARE var76 INT;
+INSERT INTO t1 VALUES (1),(2);
+INSERT IGNORE INTO t1 VALUES(2);
+GET DIAGNOSTICS CONDITION 1 var75= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 var76= ROW_NUMBER;
+SELECT var75, var76;
+END;
+|
+CALL proc1();
+var75 var76
+1 NULL
+Warnings:
+Warning 1062 Duplicate entry '2' for key 'PRIMARY'
+Error 1758 Invalid condition number
+TRUNCATE TABLE t1;
+# Checking ROW_NUMBER in PREPARED STATEMENTS for INSERT
+INSERT INTO t1 VALUES (1), (2), (3);
+INSERT IGNORE INTO t1 VALUES(2),(3),(4);
+Warnings:
+Warning 1062 Duplicate entry '2' for key 'PRIMARY'
+Warning 1062 Duplicate entry '3' for key 'PRIMARY'
+PREPARE stmt1 FROM "GET DIAGNOSTICS CONDITION 2 @var77= ROW_NUMBER";
+EXECUTE stmt1;
+SELECT @var77;
+@var77
+2
+DROP PROCEDURE proc1;
+DROP PREPARE stmt1;
+DROP TABLE t1;
+#
+# REPLACE STATEMENT
+#
+CREATE TABLE t1(id1 INT PRIMARY KEY, val1 VARCHAR(10), d1 DOUBLE);
+CREATE TABLE t2(id2 INT PRIMARY KEY, val2 VARCHAR(10), d2 DOUBLE);
+# Simple REPLACE statement
+REPLACE INTO t1 VALUES(1,'a',1.00101), (2,'b',1.00102), (3,'c',1.00103);
+REPLACE INTO t1 VALUES (4,'d',1.00104),(1,'a',1.00101),(2,'b',1.00102);
+GET DIAGNOSTICS CONDITION 1 @var78= ROW_NUMBER;
+Warnings:
+Error 1758 Invalid condition number
+SELECT @var78;
+@var78
+NULL
+REPLACE INTO t1 VALUES (5,'e',1.00105),(6,'f',1.79769313486232e+308);
+ERROR 22007: Illegal double '1.79769313486232e+308' value found during parsing
+GET DIAGNOSTICS CONDITION 1 @var79= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var80= ROW_NUMBER;
+Warnings:
+Error 1367 Illegal double '1.79769313486232e+308' value found during parsing
+Error 1758 Invalid condition number
+SELECT @var79, @var80;
+@var79 @var80
+2 NULL
+REPLACE INTO t1 VALUES (7,'g',1.00107),(8,'h',1.00108),(9,'i'),(10,'j');
+ERROR 21S01: Column count doesn't match value count at row 3
+GET DIAGNOSTICS CONDITION 1 @var81= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var82= ROW_NUMBER;
+Warnings:
+Error 1136 Column count doesn't match value count at row 3
+Error 1758 Invalid condition number
+SELECT @var81, @var82;
+@var81 @var82
+3 NULL
+REPLACE INTO t1 VALUES (8,8,8),(9,CAST(123 AS CHAR(1)),1.00109);
+Warnings:
+Warning 1292 Truncated incorrect CHAR(1) value: '123'
+GET DIAGNOSTICS CONDITION 1 @var83= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var84= ROW_NUMBER;
+Warnings:
+Warning 1292 Truncated incorrect CHAR(1) value: '123'
+Error 1758 Invalid condition number
+SELECT @var83, @var84;
+@var83 @var84
+2 NULL
+REPLACE INTO t1 VALUES (10,10,10),('x','foo',1.0203);
+Warnings:
+Warning 1366 Incorrect integer value: 'x' for column `test`.`t1`.`id1` at row 2
+GET DIAGNOSTICS CONDITION 1 @var85= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var86= ROW_NUMBER;
+Warnings:
+Warning 1366 Incorrect integer value: 'x' for column `test`.`t1`.`id1` at row 2
+Error 1758 Invalid condition number
+SELECT @var85, @var86;
+@var85 @var86
+2 NULL
+REPLACE INTO t1 VALUES (11,11,11),(12,12,(13,'m',1.0113));
+ERROR 21000: Operand should contain 1 column(s)
+GET DIAGNOSTICS CONDITION 1 @var87= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var88= ROW_NUMBER;
+Warnings:
+Error 1241 Operand should contain 1 column(s)
+Error 1758 Invalid condition number
+SELECT @var87, @var88;
+@var87 @var88
+2 NULL
+REPLACE INTO t1 VALUES (14,'n',1.0114), (15,'o',1.0115), (16/0,'p',1.0116);
+Warnings:
+Warning 1365 Division by 0
+Warning 1048 Column 'id1' cannot be null
+GET DIAGNOSTICS CONDITION 1 @var89= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var90= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 3 @var91= ROW_NUMBER;
+Warnings:
+Warning 1365 Division by 0
+Warning 1048 Column 'id1' cannot be null
+Error 1758 Invalid condition number
+SELECT @var89, @var90, @var91;
+@var89 @var90 @var91
+3 3 NULL
+TRUNCATE TABLE t1;
+# REPLACE ... SET
+REPLACE INTO t1 SET id1=1, val1='a', d1=1.00101;
+REPLACE INTO t1 SET id1=2, val1='b', d1=1.00102;
+REPLACE INTO t1 SET id1=3, val1='c', d1=1.00103;
+REPLACE INTO t1 SET id1=1, val1='a', d1=1.00101;
+GET DIAGNOSTICS CONDITION 1 @var92= ROW_NUMBER;
+Warnings:
+Error 1758 Invalid condition number
+SELECT @var92;
+@var92
+NULL
+REPLACE INTO t1 SET id1=6, val1='f', d1=1.79769313486232e+308);
+ERROR 22007: Illegal double '1.79769313486232e+308' value found during parsing
+GET DIAGNOSTICS CONDITION 1 @var93= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var94= ROW_NUMBER;
+Warnings:
+Error 1367 Illegal double '1.79769313486232e+308' value found during parsing
+Error 1758 Invalid condition number
+SELECT @var93, @var94;
+@var93 @var94
+1 NULL
+REPLACE INTO t1 SET id1=9, val1=CAST(123 AS CHAR(1)), d1=1.00109;
+ERROR 22007: Truncated incorrect CHAR(1) value: '123'
+GET DIAGNOSTICS CONDITION 1 @var95= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var96= ROW_NUMBER;
+Warnings:
+Error 1292 Truncated incorrect CHAR(1) value: '123'
+Error 1758 Invalid condition number
+SELECT @var95, @var96;
+@var95 @var96
+1 NULL
+REPLACE INTO t1 SET id1='x', val1='foo', d1=1.0203;
+ERROR 22007: Incorrect integer value: 'x' for column `test`.`t1`.`id1` at row 1
+GET DIAGNOSTICS CONDITION 1 @var97= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var98= ROW_NUMBER;
+Warnings:
+Error 1366 Incorrect integer value: 'x' for column `test`.`t1`.`id1` at row 1
+Error 1758 Invalid condition number
+SELECT @var97, @var98;
+@var97 @var98
+1 NULL
+REPLACE INTO t1 SET id1=3/0, val1='p', d1=1.0116;
+ERROR 22012: Division by 0
+GET DIAGNOSTICS CONDITION 1 @var99= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var100= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 3 @var101= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 4 @var102= ROW_NUMBER;
+Warnings:
+Error 1365 Division by 0
+Error 1048 Column 'id1' cannot be null
+Error 1105 Unknown error
+Error 1758 Invalid condition number
+SELECT @var99, @var100, @var101, @var102;
+@var99 @var100 @var101 @var102
+1 1 1 NULL
+TRUNCATE TABLE t1;
+DROP TABLE t1;
+DROP TABLE t2;
+# REPLACE ... SELECT
+CREATE TABLE t1(id1 INT PRIMARY KEY, val1 VARCHAR(10), d1 DOUBLE);
+CREATE TABLE t2(id2 INT PRIMARY KEY, val2 VARCHAR(10), d2 DOUBLE, p2 POINT);
+INSERT INTO t2 VALUES(1,'a',1.00101,PointFromText('POINT(20 10)')),
+(2,'b',1.00102,PointFromText('POINT(20 10)')),
+(3,'c',1.00103,PointFromText('POINT(20 10)'));
+INSERT INTO t1 SELECT id2, val2, d2 FROM t2;
+INSERT INTO t1 SELECT id2, val2, d2 FROM t2 WHERE id2=1;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+GET DIAGNOSTICS CONDITION 1 @var103= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var104= ROW_NUMBER;
+Warnings:
+Error 1062 Duplicate entry '1' for key 'PRIMARY'
+Error 1758 Invalid condition number
+SELECT @var103, @var104;
+@var103 @var104
+1 NULL
+INSERT INTO t1 SELECT id2, val2, p2 from t2;
+ERROR HY000: Cannot cast 'point' as 'double' in assignment of `test`.`t1`.`d1`
+GET DIAGNOSTICS CONDITION 1 @var105= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var106= ROW_NUMBER;
+Warnings:
+Error 4078 Cannot cast 'point' as 'double' in assignment of `test`.`t1`.`d1`
+Error 1758 Invalid condition number
+SELECT @var105, @var106;
+@var105 @var106
+1 NULL
+INSERT INTO t1 SELECT id2, val2 FROM t2;
+ERROR 21S01: Column count doesn't match value count at row 1
+GET DIAGNOSTICS CONDITION 1 @var107= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var108= ROW_NUMBER;
+Warnings:
+Error 1136 Column count doesn't match value count at row 1
+Error 1758 Invalid condition number
+SELECT @var107, @var108;
+@var107 @var108
+1 NULL
+INSERT INTO t2 VALUES(4,'a',1.00101,PointFromText('POINT(20 10)'));
+INSERT INTO t1 SELECT id2, CAST(123 AS CHAR(1)), d2 FROM t2 WHERE id2=4;
+ERROR 22007: Truncated incorrect CHAR(1) value: '123'
+GET DIAGNOSTICS CONDITION 1 @var109= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var110= ROW_NUMBER;
+Warnings:
+Error 1292 Truncated incorrect CHAR(1) value: '123'
+Error 1758 Invalid condition number
+SELECT @var109, @var110;
+@var109 @var110
+1 NULL
+INSERT INTO t1 SELECT id2, val2, 1.79769313486232e+308 FROM t2;
+ERROR 22007: Illegal double '1.79769313486232e+308' value found during parsing
+GET DIAGNOSTICS CONDITION 1 @var111= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var112= ROW_NUMBER;
+Warnings:
+Error 1367 Illegal double '1.79769313486232e+308' value found during parsing
+Error 1758 Invalid condition number
+SELECT @var111, @var112;
+@var111 @var112
+1 NULL
+INSERT INTO t1 SELECT id2/0, val2, d2 FROM t2;
+ERROR 22012: Division by 0
+GET DIAGNOSTICS CONDITION 1 @var113= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var114= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 3 @var115= ROW_NUMBER;
+Warnings:
+Error 1365 Division by 0
+Error 1048 Column 'id1' cannot be null
+Error 1758 Invalid condition number
+SELECT @var113, @var114, @var115;
+@var113 @var114 @var115
+1 1 NULL
+DROP TABLE t1,t2;
+# Checking ROW_NUMBER in STORED PROCEDURE
+CREATE TABLE t1(id1 INT PRIMARY KEY);
+CREATE PROCEDURE proc1 ()
+BEGIN
+DECLARE var116 INT;
+REPLACE INTO t1 VALUES (1),(2);
+GET DIAGNOSTICS CONDITION 1 var116= ROW_NUMBER;
+SELECT var116;
+END;
+|
+CALL proc1();
+var116
+NULL
+Warnings:
+Error 1758 Invalid condition number
+TRUNCATE TABLE t1;
+# Checking ROW_NUMBER in PREPARED STATEMENTS
+REPLACE INTO t1 VALUES (1), (2), (3);
+PREPARE stmt1 FROM "GET DIAGNOSTICS CONDITION 2 @var117= ROW_NUMBER";
+EXECUTE stmt1;
+Warnings:
+Error 1758 Invalid condition number
+SELECT @var117;
+@var117
+NULL
+DROP PROCEDURE proc1;
+DROP PREPARE stmt1;
+DROP TABLE t1;
+#
+# Checking that ROW_NUMBER is only for errors with rows/values
+#
+# INSERT STATEMENT
+CREATE TABLE t1(id1 INT);
+CREATE TABLE t2(id2 INT);
+CREATE VIEW v AS SELECT t1.id1 AS A, t2.id2 AS b FROM t1,t2;
+INSERT INTO t1(id1, id1) VALUES (1,1);
+ERROR 42000: Column 'id1' specified twice
+GET DIAGNOSTICS CONDITION 1 @var118= ROW_NUMBER;
+SELECT @var118;
+@var118
+0
+CREATE FUNCTION f1() RETURNS INT
+BEGIN
+INSERT INTO t1 VALUES (1);
+RETURN 1;
+END |
+INSERT INTO t1 VALUES (1), (f1());
+ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger
+GET DIAGNOSTICS CONDITION 1 @var119= ROW_NUMBER;
+SELECT @var119;
+@var119
+0
+INSERT INTO t1 VALUES (1) RETURNING id2;
+ERROR 42S22: Unknown column 'id2' in 'field list'
+GET DIAGNOSTICS CONDITION 1 @var120= ROW_NUMBER;
+SELECT @var120;
+@var120
+0
+INSERT INTO t1(id2) VALUES(1);
+ERROR 42S22: Unknown column 'id2' in 'field list'
+GET DIAGNOSTICS CONDITION 1 @var121= ROW_NUMBER;
+SELECT @var121;
+@var121
+0
+INSERT INTO v VALUES(1,2);
+ERROR HY000: Can not insert into join view 'test.v' without fields list
+GET DIAGNOSTICS CONDITION 1 @var122= ROW_NUMBER;
+SELECT @var122;
+@var122
+0
+INSERT INTO v(a,b) VALUES (1,2);
+ERROR HY000: Can not modify more than one base table through a join view 'test.v'
+GET DIAGNOSTICS CONDITION 1 @var123= ROW_NUMBER;
+SELECT @var123;
+@var123
+0
+# REPLACE STATEMENT
+REPLACE INTO t1(id1, id1) VALUES (1,1);
+ERROR 42000: Column 'id1' specified twice
+GET DIAGNOSTICS CONDITION 1 @var124= ROW_NUMBER;
+SELECT @var124;
+@var124
+0
+CREATE FUNCTION f2() RETURNS INT
+BEGIN
+REPLACE INTO t1 VALUES (1);
+RETURN 1;
+END |
+REPLACE INTO t1 VALUES (1), (f2());
+ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger
+GET DIAGNOSTICS CONDITION 1 @var125= ROW_NUMBER;
+SELECT @var125;
+@var125
+0
+REPLACE INTO t1 VALUES (1) RETURNING id2;
+ERROR 42S22: Unknown column 'id2' in 'field list'
+GET DIAGNOSTICS CONDITION 1 @var126= ROW_NUMBER;
+SELECT @var126;
+@var126
+0
+REPLACE INTO t1(id2) VALUES(1);
+ERROR 42S22: Unknown column 'id2' in 'field list'
+GET DIAGNOSTICS CONDITION 1 @var127= ROW_NUMBER;
+SELECT @var127;
+@var127
+0
+REPLACE INTO v VALUES(1,2);
+ERROR HY000: Can not insert into join view 'test.v' without fields list
+GET DIAGNOSTICS CONDITION 1 @var128= ROW_NUMBER;
+SELECT @var128;
+@var128
+0
+REPLACE INTO v(a,b) VALUES (1,2);
+ERROR HY000: Can not modify more than one base table through a join view 'test.v'
+GET DIAGNOSTICS CONDITION 1 @var129= ROW_NUMBER;
+SELECT @var129;
+@var129
+0
+DROP TABLE t1,t2;
+DROP FUNCTION f1;
+DROP FUNCTION f2;
+DROP VIEW v;
+#
+# MDEV-26606: ROW_NUMBER property value isn't passed from inside a
+# stored procedure
+#
+# Test 1: Without RESIGNAL
+CREATE OR REPLACE TABLE t1 (pk INT PRIMARY KEY);
+CREATE OR REPLACE PROCEDURE sp(a INT) INSERT INTO t1 VALUES (2),(a);
+SET @num=null, @msg=null;
+INSERT INTO t1 VALUES(1);
+CALL sp(1);
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+GET DIAGNOSTICS CONDITION 1 @num = ROW_NUMBER, @msg = MESSAGE_TEXT;
+SELECT @num, @msg;
+@num @msg
+2 Duplicate entry '1' for key 'PRIMARY'
+DROP PROCEDURE sp;
+DROP TABLE t1;
+# Test 2: With RESIGNAL
+CREATE OR REPLACE TABLE t1 (pk INT PRIMARY KEY);
+CREATE OR REPLACE PROCEDURE sp(a INT)
+BEGIN
+DECLARE n INT;
+DECLARE m VARCHAR(255);
+DECLARE EXIT HANDLER FOR 1062
+BEGIN
+GET DIAGNOSTICS CONDITION 1 n = ROW_NUMBER, m = MESSAGE_TEXT;
+SELECT n, m;
+RESIGNAL;
+END;
+INSERT INTO t1 VALUES (2), (a);
+END |
+SET @num=null, @msg=null;
+INSERT INTO t1 VALUES (1);
+CALL sp(1);
+n m
+2 Duplicate entry '1' for key 'PRIMARY'
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+GET DIAGNOSTICS CONDITION 1 @num = ROW_NUMBER, @msg = MESSAGE_TEXT;
+SELECT @num, @msg;
+@num @msg
+2 Duplicate entry '1' for key 'PRIMARY'
+DROP PROCEDURE sp;
+DROP TABLE t1;
+# Checking more errors
+CREATE TABLE t1 (val1 TINYINT);
+CREATE PROCEDURE sp(a INT) INSERT INTO t1 VALUES (2),(a);
+INSERT INTO t1 VALUES(1);
+CALL sp(100000);
+Warnings:
+Warning 1264 Out of range value for column 'val1' at row 2
+GET DIAGNOSTICS CONDITION 1 @var1= ROW_NUMBER;
+SELECT @var1;
+@var1
+2
+DROP TABLE t1;
+DROP PROCEDURE sp;
+#
+# MDEV-26684: Unexpected ROW_NUMBER in a condition raised by a diagnostics statement
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+GET DIAGNOSTICS CONDITION 5 @msg = MESSAGE_TEXT;
+Warnings:
+Error 1758 Invalid condition number
+SHOW WARNINGS;
+Level Code Message
+Error 1758 Invalid condition number
+GET DIAGNOSTICS CONDITION 1 @ind = ROW_NUMBER, @msg = MESSAGE_TEXT;
+SELECT @ind, @msg;
+@ind @msg
+0 Invalid condition number
+INSERT INTO t1 VALUES (3),(4);
+GET DIAGNOSTICS CONDITION 1 @ind = ROW_NUMBER, @msg = MESSAGE_TEXT;
+Warnings:
+Error 1758 Invalid condition number
+SELECT @ind, @msg;
+@ind @msg
+0 Invalid condition number
+GET DIAGNOSTICS CONDITION 5 @ind = ROW_NUMBER, @msg = MESSAGE_TEXT;
+Warnings:
+Error 1758 Invalid condition number
+Error 1758 Invalid condition number
+SELECT @ind, @msg;
+@ind @msg
+0 Invalid condition number
+DROP TABLE t1;
+#
+# MDEV-26681: ROW_NUMBER is not available within compound statement blocks
+#
+CREATE OR REPLACE TABLE t1 (pk INT PRIMARY KEY, a CHAR(3));
+INSERT IGNORE INTO t1 VALUES (1,'foo'),(1,'bar'),(2,'foobar');
+Warnings:
+Warning 1062 Duplicate entry '1' for key 'PRIMARY'
+Warning 1265 Data truncated for column 'a' at row 3
+BEGIN NOT ATOMIC
+DECLARE i INT DEFAULT 0;
+DECLARE rnum INT DEFAULT -1;
+DECLARE msg VARCHAR(1024) DEFAULT '';
+DECLARE err INT DEFAULT -1;
+WHILE i < @@warning_count
+DO
+SET i = i + 1;
+GET DIAGNOSTICS CONDITION i rnum = ROW_NUMBER, msg = MESSAGE_TEXT, err = MYSQL_ERRNO;
+SELECT i, rnum, msg, err;
+END WHILE;
+END |
+i rnum msg err
+1 2 Duplicate entry '1' for key 'PRIMARY' 1062
+i rnum msg err
+2 3 Data truncated for column 'a' at row 3 1265
+GET DIAGNOSTICS CONDITION 1 @rnum = ROW_NUMBER, @msg = MESSAGE_TEXT, @err = MYSQL_ERRNO;
+select @rnum, @msg, @err;
+@rnum @msg @err
+2 Duplicate entry '1' for key 'PRIMARY' 1062
+GET DIAGNOSTICS CONDITION 2 @rnum = ROW_NUMBER, @msg = MESSAGE_TEXT, @err = MYSQL_ERRNO;
+SELECT @rnum, @msg, @err;
+@rnum @msg @err
+3 Data truncated for column 'a' at row 3 1265
+DROP TABLE t1;
+#
+# ROW_NUMBER differs from the number in the error message upon
+# ER_WARN_DATA_OUT_OF_RANGE
+#
+CREATE TABLE t (a INT);
+INSERT INTO t VALUES (1),(2);
+SELECT CAST(a AS DECIMAL(2,2)) AS f FROM t;
+f
+0.99
+0.99
+Warnings:
+Warning 1264 Out of range value for column 'f' at row 1
+Warning 1264 Out of range value for column 'f' at row 2
+GET DIAGNOSTICS CONDITION 2 @n= ROW_NUMBER, @m = MESSAGE_TEXT;
+SELECT @n, @m;
+@n @m
+2 Out of range value for column 'f' at row 2
+DROP TABLE t;
+#
+# MDEV-26832: ROW_NUMBER in SIGNAL/RESIGNAL causes a syntax error
+#
+# using signal
+CREATE PROCEDURE signal_syntax()
+BEGIN
+DECLARE errno INT DEFAULT 0;
+DECLARE msg TEXT DEFAULT "foo";
+DECLARE row_num INT DEFAULT 0;
+DECLARE cond CONDITION FOR SQLSTATE "01234";
+DECLARE CONTINUE HANDLER for 1012
+BEGIN
+GET DIAGNOSTICS CONDITION 1 errno = MYSQL_ERRNO, msg = MESSAGE_TEXT, row_num= ROW_NUMBER;
+END;
+SIGNAL cond SET MESSAGE_TEXT = "Signal message", MYSQL_ERRNO = 1012, ROW_NUMBER= 5;
+SELECT errno, msg, row_num;
+END|
+CALL signal_syntax();
+errno msg row_num
+1012 Signal message 5
+DROP PROCEDURE signal_syntax;
+# using resignal
+CREATE PROCEDURE resignal_syntax()
+BEGIN
+DECLARE CONTINUE HANDLER
+FOR 1146
+BEGIN
+RESIGNAL SET
+MESSAGE_TEXT = '`temptab` does not exist', ROW_NUMBER= 105;
+END;
+SELECT `c` FROM `temptab`;
+END|
+CALL resignal_syntax();
+ERROR 42S02: `temptab` does not exist
+GET DIAGNOSTICS CONDITION 1 @row_num= ROW_NUMBER;
+SELECT @row_num;
+@row_num
+105
+DROP PROCEDURE resignal_syntax;
+#
+# MDEV-26842: ROW_NUMBER is not set and differs from the message upon
+# WARN_DATA_TRUNCATED produced by inplace ALTER
+#
+CREATE TABLE t1 (a VARCHAR(64)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('foo'),(null);
+ALTER TABLE t1 ADD PRIMARY KEY(a), ALGORITHM=INPLACE;
+ERROR 01000: Data truncated for column 'a' at row 2
+GET DIAGNOSTICS CONDITION 1 @n= ROW_NUMBER, @m= MESSAGE_TEXT;
+SELECT @n, @m;
+@n @m
+2 Data truncated for column 'a' at row 2
+DROP TABLE t1;
+#
+# MDEV-26841: ROW_NUMBER is not set and differs from the message upon
+# ER_WRONG_VALUE_COUNT_ON_ROW for the 1st row
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1,2),(3);
+ERROR 21S01: Column count doesn't match value count at row 1
+GET DIAGNOSTICS CONDITION 1 @n= ROW_NUMBER, @m= MESSAGE_TEXT;
+SELECT @n, @m;
+@n @m
+1 Column count doesn't match value count at row 1
+INSERT INTO t1(a) VALUES(1,2), (3);
+ERROR 21S01: Column count doesn't match value count at row 1
+GET DIAGNOSTICS CONDITION 1 @n= ROW_NUMBER, @m= MESSAGE_TEXT;
+SELECT @n, @m;
+@n @m
+1 Column count doesn't match value count at row 1
+DROP TABLE t1;
+#
+# MDEV-26830: Wrong ROW_NUMBER in diagnostics upon INSERT IGNORE with
+# CHECK violation
+#
+CREATE TABLE t1 (a INT, CHECK(a>0));
+INSERT IGNORE INTO t1 VALUES (1),(0),(2),(0);
+Warnings:
+Warning 4025 CONSTRAINT `CONSTRAINT_1` failed for `test`.`t1`
+Warning 4025 CONSTRAINT `CONSTRAINT_1` failed for `test`.`t1`
+GET DIAGNOSTICS CONDITION 1 @n= ROW_NUMBER;
+SELECT @n;
+@n
+2
+GET DIAGNOSTICS CONDITION 2 @n= ROW_NUMBER;
+SELECT @n;
+@n
+4
+DROP TABLE t1;
+#
+# MDEV-26844: DELETE returns ROW_NUMBER=1 for every row upon
+# ER_TRUNCATED_WRONG_VALUE
+#
+# without ORDER BY
+CREATE TABLE t (a VARCHAR(8));
+INSERT INTO t VALUES ('val1'),('val2'),('100'),('val4');
+SELECT * FROM t;
+a
+val1
+val2
+100
+val4
+DELETE FROM t WHERE a = 100;
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: 'val1'
+Warning 1292 Truncated incorrect DECIMAL value: 'val2'
+Warning 1292 Truncated incorrect DECIMAL value: 'val4'
+SHOW WARNINGS;
+Level Code Message
+Warning 1292 Truncated incorrect DECIMAL value: 'val1'
+Warning 1292 Truncated incorrect DECIMAL value: 'val2'
+Warning 1292 Truncated incorrect DECIMAL value: 'val4'
+GET DIAGNOSTICS CONDITION 3 @n = ROW_NUMBER;
+SELECT @n;
+@n
+4
+DROP TABLE t;
+#
+# MDEV-26695: Number of an invalid row is not calculated for table value constructor
+#
+CREATE TABLE t1 (a CHAR(1)) VALUES ('a'),('b'),('foo');
+Warnings:
+Warning 1406 Data too long for column 'a' at row 3
+GET DIAGNOSTICS CONDITION 1 @n= ROW_NUMBER;
+SELECT @n;
+@n
+3
+CREATE TABLE t2 (a CHAR(1)) VALUES ('a'),('b') UNION VALUES ('foo');
+Warnings:
+Warning 1406 Data too long for column 'a' at row 3
+GET DIAGNOSTICS CONDITION 1 @n= ROW_NUMBER;
+SELECT @n;
+@n
+3
+DROP TABLE t1, t2;
+# Checking that CREATE ... SELECT works
+CREATE TABLE t1 (val1 CHAR(5));
+INSERT INTO t1 VALUES ('A'),('B'),('C'),('DEF');
+CREATE TABLE t2 (val2 CHAR(1)) SELECT val1 as val2 FROM t1;
+Warnings:
+Warning 1406 Data too long for column 'val2' at row 4
+GET DIAGNOSTICS CONDITION 1 @n= ROW_NUMBER;
+SELECT @n;
+@n
+4
+SELECT * FROM t2;
+val2
+A
+B
+C
+D
+DROP TABLE t1,t2;
+#
+# End of 10.7 tests
+#
diff --git a/mysql-test/main/get_diagnostics.test b/mysql-test/main/get_diagnostics.test
index 3c2b435af7f..01063551b9b 100644
--- a/mysql-test/main/get_diagnostics.test
+++ b/mysql-test/main/get_diagnostics.test
@@ -1,3 +1,5 @@
+--source include/have_innodb.inc
+
SET NAMES utf8;
--echo #
@@ -860,3 +862,870 @@ CREATE TABLE t1 (a CHAR(1)) VALUES ('a'),('b'),('foo');
CREATE TABLE t2 (a char(1)) VALUES ('a'),('b') UNION VALUES ('foo');
DROP TABLE t1, t2;
+
+--echo #
+--echo # End of 10.6 tests
+--echo #
+
+--echo #
+--echo # MDEV-10075: Provide index of error causing error in array INSERT
+--echo #
+
+--echo #
+--echo # INSERT STATEMENT
+--echo #
+
+CREATE TABLE t1(id1 INT PRIMARY KEY, val1 VARCHAR(10), d1 DOUBLE);
+CREATE TABLE t2(id2 INT PRIMARY KEY, val2 VARCHAR(10), d2 DOUBLE, p2 POINT);
+
+
+--echo # Simple INSERT statement
+
+INSERT INTO t1 VALUES(1,'a',1.00101), (2,'b',1.00102), (3,'c',1.00103);
+--error ER_DUP_ENTRY
+INSERT INTO t1 VALUES (4,'d',1.00104),(1,'a',1.00101),(2,'b',1.00102);
+GET DIAGNOSTICS CONDITION 1 @var1= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var2= ROW_NUMBER;
+SELECT @var1, @var2;
+
+--error ER_ILLEGAL_VALUE_FOR_TYPE
+INSERT INTO t1 VALUES (5,'e',1.00105),(6,'f',1.79769313486232e+308);
+GET DIAGNOSTICS CONDITION 1 @var3= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var4= ROW_NUMBER;
+SELECT @var3, @var4;
+
+--error ER_WRONG_VALUE_COUNT_ON_ROW
+INSERT INTO t1 VALUES (7,'g',1.00107),(8,'h',1.00108),(9,'i'),(10,'j');
+GET DIAGNOSTICS CONDITION 1 @var5= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var6= ROW_NUMBER;
+SELECT @var5, @var6;
+
+INSERT INTO t1 VALUES (8,8,8),(9,CAST(123 AS CHAR(1)),1.00109);
+GET DIAGNOSTICS CONDITION 1 @var7= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var8= ROW_NUMBER;
+SELECT @var7, @var8;
+
+INSERT INTO t1 VALUES (10,10,10),('x','foo',1.0203);
+GET DIAGNOSTICS CONDITION 1 @var9= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var10= ROW_NUMBER;
+SELECT @var9, @var10;
+
+--error ER_OPERAND_COLUMNS
+INSERT INTO t1 VALUES (11,11,11),(12,12,(13,'m',1.0113));
+GET DIAGNOSTICS CONDITION 1 @var11= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var12= ROW_NUMBER;
+SELECT @var11, @var12;
+
+delete from t1 where id1=0;
+INSERT INTO t1 VALUES (14,'n',1.0114), (15,'o',1.0115), (16/0,'p',1.0116);
+GET DIAGNOSTICS CONDITION 1 @var13= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var14= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 3 @var15= ROW_NUMBER;
+SELECT @var13, @var14, @var15;
+
+TRUNCATE TABLE t1;
+
+--echo # INSERT ... IGNORE
+
+INSERT IGNORE INTO t1 VALUES(1,'a',1.00101), (2,'b',1.00102), (3,'c',1.00103);
+INSERT IGNORE INTO t1 VALUES (4,'d',1.00104),(1,'a',1.00101),(2,'b',1.00102);
+GET DIAGNOSTICS CONDITION 1 @var16= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var17= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 3 @var18= ROW_NUMBER;
+SELECT @var16, @var17, @var18;
+
+--error ER_ILLEGAL_VALUE_FOR_TYPE
+INSERT IGNORE INTO t1 VALUES (5,'e',1.00105),(6,'f',1.79769313486232e+308);
+GET DIAGNOSTICS CONDITION 1 @var19= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var20= ROW_NUMBER;
+SELECT @var19, @var20;
+
+--error ER_WRONG_VALUE_COUNT_ON_ROW
+INSERT IGNORE INTO t1 VALUES (7,'g',1.00107),(8,'h',1.00108),(9,'i'),(10,'j');
+GET DIAGNOSTICS CONDITION 1 @var21= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var22= ROW_NUMBER;
+SELECT @var21, @var22;
+
+INSERT IGNORE INTO t1 VALUES (8,8,8),(9,CAST(123 AS CHAR(1)),1.00109);
+GET DIAGNOSTICS CONDITION 1 @var23= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var24= ROW_NUMBER;
+SELECT @var23, @var24;
+
+INSERT IGNORE INTO t1 VALUES (10,10,10),('x','foo',1.0203);
+GET DIAGNOSTICS CONDITION 1 @var25= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var26= ROW_NUMBER;
+SELECT @var25, @var26;
+
+--error ER_OPERAND_COLUMNS
+INSERT IGNORE INTO t1 VALUES (11,11,11),(12,12,(13,'m',1.0113));
+GET DIAGNOSTICS CONDITION 1 @var27= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var28= ROW_NUMBER;
+SELECT @var27, @var28;
+
+INSERT IGNORE INTO t1 VALUES (14,'n',1.0114), (15,'o',1.0115),
+(16/0,'p',1.0116);
+GET DIAGNOSTICS CONDITION 1 @var29= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var30= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 3 @var31= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 4 @var32= ROW_NUMBER;
+SELECT @var29, @var30, @var31, @var32;
+
+TRUNCATE TABLE t1;
+
+--echo # INSERT ... SET
+
+INSERT INTO t1 SET id1=1, val1='a', d1=1.00101;
+INSERT INTO t1 SET id1=2, val1='b', d1=1.00102;
+INSERT INTO t1 SET id1=3, val1='c', d1=1.00103;
+
+--error ER_DUP_ENTRY
+INSERT INTO t1 SET id1=1, val1='a', d1=1.00101;
+GET DIAGNOSTICS CONDITION 1 @var33= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var34= ROW_NUMBER;
+SELECT @var33, @var34;
+
+--error ER_ILLEGAL_VALUE_FOR_TYPE
+INSERT INTO t1 SET id1=6, val1='f', d1=1.79769313486232e+308);
+GET DIAGNOSTICS CONDITION 1 @var35= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var36= ROW_NUMBER;
+SELECT @var35, @var36;
+
+
+--error ER_TRUNCATED_WRONG_VALUE
+INSERT INTO t1 SET id1=9, val1=CAST(123 AS CHAR(1)), d1=1.00109;
+GET DIAGNOSTICS CONDITION 1 @var37= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var38= ROW_NUMBER;
+SELECT @var37, @var38;
+
+--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
+INSERT INTO t1 SET id1='x', val1='foo', d1=1.0203;
+GET DIAGNOSTICS CONDITION 1 @var39= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var40= ROW_NUMBER;
+SELECT @var39, @var40;
+
+--error ER_DIVISION_BY_ZERO
+INSERT INTO t1 SET id1=3/0, val1='p', d1=1.0116;
+GET DIAGNOSTICS CONDITION 1 @var41= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var42= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 3 @var43= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 4 @var44= ROW_NUMBER;
+SELECT @var41, @var42, @var43, @var44;
+
+TRUNCATE TABLE t1;
+
+--echo # INSERT ... ON DUPLICATE KEY UPDATE
+
+INSERT INTO t1 VALUES(1,'a',1.00101), (2,'b',1.00102), (3,'c',1.00103);
+
+INSERT INTO t1 VALUES (4,'d',1.00104),(1,'a',1.00101)
+ON DUPLICATE KEY UPDATE val1='a', d1=1.00101;
+GET DIAGNOSTICS CONDITION 1 @var45= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var46= ROW_NUMBER;
+SELECT @var45, @var46;
+
+--error ER_ILLEGAL_VALUE_FOR_TYPE
+INSERT INTO t1 VALUES (5,'e',1.00105),(3,'f',1.79769313486232e+308)
+ON DUPLICATE KEY UPDATE val1='c';
+GET DIAGNOSTICS CONDITION 1 @var47= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var48= ROW_NUMBER;
+SELECT @var47, @var48;
+
+--error ER_WRONG_VALUE_COUNT_ON_ROW
+INSERT INTO t1 VALUES (5,'e',1.00105), (3,'i')
+ON DUPLICATE KEY UPDATE val1='c';
+GET DIAGNOSTICS CONDITION 1 @var49= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var50= ROW_NUMBER;
+SELECT @var49, @var50;
+
+--error ER_TRUNCATED_WRONG_VALUE
+INSERT INTO t1 VALUES (3, CAST(123 AS CHAR(1)), 1.00103)
+ON DUPLICATE KEY UPDATE val1='c';
+GET DIAGNOSTICS CONDITION 1 @var51= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var52= ROW_NUMBER;
+SELECT @var51, @var52;
+
+INSERT INTO t1 VALUES (10,10,10),('x','foo',1.0203)
+ON DUPLICATE KEY UPDATE val1='c';
+GET DIAGNOSTICS CONDITION 1 @var53= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var54= ROW_NUMBER;
+SELECT @var53, @var54;
+
+--error ER_OPERAND_COLUMNS
+INSERT INTO t1 VALUES (11,11,11),(12,12,(13,'m',1.0113)) ON DUPLICATE KEY UPDATE val1='c';
+GET DIAGNOSTICS CONDITION 1 @var55= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var56= ROW_NUMBER;
+SELECT @var55, @var56;
+
+INSERT INTO t1 VALUES (14,'n',1.0114), (15,'o',1.0115), (2/0,'p',1.00102)
+ON DUPLICATE KEY UPDATE val1='b';
+GET DIAGNOSTICS CONDITION 1 @var57= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var58= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 3 @var59= ROW_NUMBER;
+SELECT @var57, @var58, @var59;
+
+--error ER_DUP_ENTRY
+INSERT INTO t1 VALUES (1,'e',1.0),(5,'e',1.0),(5,'f',1.7)
+ON DUPLICATE KEY UPDATE id1='1';
+GET DIAGNOSTICS CONDITION 1 @var60= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var61= ROW_NUMBER;
+SELECT @var60, @var61;
+
+TRUNCATE TABLE t1;
+
+DROP TABLE t1;
+DROP TABLE t2;
+
+--echo INSERT ... SELECT
+
+CREATE TABLE t1(id1 INT PRIMARY KEY, val1 VARCHAR(10), d1 DOUBLE);
+CREATE TABLE t2(id2 INT PRIMARY KEY, val2 VARCHAR(10), d2 DOUBLE, p2 POINT);
+
+INSERT INTO t2 VALUES(1,'a',1.00101,PointFromText('POINT(20 10)')),
+ (2,'b',1.00102,PointFromText('POINT(20 10)')),
+ (3,'c',1.00103,PointFromText('POINT(20 10)'));
+INSERT INTO t1 SELECT id2, val2, d2 FROM t2;
+
+--error ER_DUP_ENTRY
+INSERT INTO t1 SELECT id2, val2, d2 FROM t2 WHERE id2=1;
+GET DIAGNOSTICS CONDITION 1 @var62= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var63= ROW_NUMBER;
+SELECT @var62, @var63;
+
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+INSERT INTO t1 SELECT id2, val2, p2 from t2;
+GET DIAGNOSTICS CONDITION 1 @var64= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var65= ROW_NUMBER;
+SELECT @var64, @var65;
+
+--error ER_WRONG_VALUE_COUNT_ON_ROW
+INSERT INTO t1 SELECT id2, val2 FROM t2;
+GET DIAGNOSTICS CONDITION 1 @var66= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var67= ROW_NUMBER;
+SELECT @var66, @var67;
+
+INSERT INTO t2 VALUES(4,'a',1.00101,PointFromText('POINT(20 10)'));
+--error ER_TRUNCATED_WRONG_VALUE
+INSERT INTO t1 SELECT id2, CAST(123 AS CHAR(1)), d2 FROM t2 WHERE id2=4;
+GET DIAGNOSTICS CONDITION 1 @var68= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var69= ROW_NUMBER;
+SELECT @var68, @var69;
+
+--error ER_ILLEGAL_VALUE_FOR_TYPE
+INSERT INTO t1 SELECT id2, val2, 1.79769313486232e+308 FROM t2;
+GET DIAGNOSTICS CONDITION 1 @var70= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var71= ROW_NUMBER;
+SELECT @var70, @var71;
+
+
+--error ER_DIVISION_BY_ZERO
+INSERT INTO t1 SELECT id2/0, val2, d2 FROM t2;
+GET DIAGNOSTICS CONDITION 1 @var72= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var73= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 3 @var74= ROW_NUMBER;
+SELECT @var72, @var73, @var74;
+
+DROP TABLE t1,t2;
+
+--echo # Checking ROW_NUMBER in STORED PROCEDURE for INSERT
+
+CREATE TABLE t1(id1 INT PRIMARY KEY);
+
+DELIMITER |;
+
+CREATE PROCEDURE proc1 ()
+BEGIN
+
+ DECLARE var75 INT;
+ DECLARE var76 INT;
+
+ INSERT INTO t1 VALUES (1),(2);
+ INSERT IGNORE INTO t1 VALUES(2);
+
+ GET DIAGNOSTICS CONDITION 1 var75= ROW_NUMBER;
+ GET DIAGNOSTICS CONDITION 2 var76= ROW_NUMBER;
+
+ SELECT var75, var76;
+
+END;
+|
+
+DELIMITER ;|
+
+CALL proc1();
+TRUNCATE TABLE t1;
+
+--echo # Checking ROW_NUMBER in PREPARED STATEMENTS for INSERT
+
+INSERT INTO t1 VALUES (1), (2), (3);
+INSERT IGNORE INTO t1 VALUES(2),(3),(4);
+
+PREPARE stmt1 FROM "GET DIAGNOSTICS CONDITION 2 @var77= ROW_NUMBER";
+EXECUTE stmt1;
+SELECT @var77;
+
+DROP PROCEDURE proc1;
+DROP PREPARE stmt1;
+DROP TABLE t1;
+
+--echo #
+--echo # REPLACE STATEMENT
+--echo #
+
+CREATE TABLE t1(id1 INT PRIMARY KEY, val1 VARCHAR(10), d1 DOUBLE);
+CREATE TABLE t2(id2 INT PRIMARY KEY, val2 VARCHAR(10), d2 DOUBLE);
+
+
+--echo # Simple REPLACE statement
+
+REPLACE INTO t1 VALUES(1,'a',1.00101), (2,'b',1.00102), (3,'c',1.00103);
+REPLACE INTO t1 VALUES (4,'d',1.00104),(1,'a',1.00101),(2,'b',1.00102);
+GET DIAGNOSTICS CONDITION 1 @var78= ROW_NUMBER;
+SELECT @var78;
+
+--error ER_ILLEGAL_VALUE_FOR_TYPE
+REPLACE INTO t1 VALUES (5,'e',1.00105),(6,'f',1.79769313486232e+308);
+GET DIAGNOSTICS CONDITION 1 @var79= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var80= ROW_NUMBER;
+SELECT @var79, @var80;
+
+--error ER_WRONG_VALUE_COUNT_ON_ROW
+REPLACE INTO t1 VALUES (7,'g',1.00107),(8,'h',1.00108),(9,'i'),(10,'j');
+GET DIAGNOSTICS CONDITION 1 @var81= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var82= ROW_NUMBER;
+SELECT @var81, @var82;
+
+REPLACE INTO t1 VALUES (8,8,8),(9,CAST(123 AS CHAR(1)),1.00109);
+GET DIAGNOSTICS CONDITION 1 @var83= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var84= ROW_NUMBER;
+SELECT @var83, @var84;
+
+REPLACE INTO t1 VALUES (10,10,10),('x','foo',1.0203);
+GET DIAGNOSTICS CONDITION 1 @var85= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var86= ROW_NUMBER;
+SELECT @var85, @var86;
+
+--error ER_OPERAND_COLUMNS
+REPLACE INTO t1 VALUES (11,11,11),(12,12,(13,'m',1.0113));
+GET DIAGNOSTICS CONDITION 1 @var87= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var88= ROW_NUMBER;
+SELECT @var87, @var88;
+
+REPLACE INTO t1 VALUES (14,'n',1.0114), (15,'o',1.0115), (16/0,'p',1.0116);
+GET DIAGNOSTICS CONDITION 1 @var89= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var90= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 3 @var91= ROW_NUMBER;
+SELECT @var89, @var90, @var91;
+
+TRUNCATE TABLE t1;
+
+--echo # REPLACE ... SET
+
+REPLACE INTO t1 SET id1=1, val1='a', d1=1.00101;
+REPLACE INTO t1 SET id1=2, val1='b', d1=1.00102;
+REPLACE INTO t1 SET id1=3, val1='c', d1=1.00103;
+
+REPLACE INTO t1 SET id1=1, val1='a', d1=1.00101;
+GET DIAGNOSTICS CONDITION 1 @var92= ROW_NUMBER;
+SELECT @var92;
+
+--error ER_ILLEGAL_VALUE_FOR_TYPE
+REPLACE INTO t1 SET id1=6, val1='f', d1=1.79769313486232e+308);
+GET DIAGNOSTICS CONDITION 1 @var93= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var94= ROW_NUMBER;
+SELECT @var93, @var94;
+
+
+--error ER_TRUNCATED_WRONG_VALUE
+REPLACE INTO t1 SET id1=9, val1=CAST(123 AS CHAR(1)), d1=1.00109;
+GET DIAGNOSTICS CONDITION 1 @var95= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var96= ROW_NUMBER;
+SELECT @var95, @var96;
+
+--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
+REPLACE INTO t1 SET id1='x', val1='foo', d1=1.0203;
+GET DIAGNOSTICS CONDITION 1 @var97= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var98= ROW_NUMBER;
+SELECT @var97, @var98;
+
+--error ER_DIVISION_BY_ZERO
+REPLACE INTO t1 SET id1=3/0, val1='p', d1=1.0116;
+GET DIAGNOSTICS CONDITION 1 @var99= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var100= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 3 @var101= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 4 @var102= ROW_NUMBER;
+SELECT @var99, @var100, @var101, @var102;
+
+TRUNCATE TABLE t1;
+
+DROP TABLE t1;
+DROP TABLE t2;
+
+--echo # REPLACE ... SELECT
+
+CREATE TABLE t1(id1 INT PRIMARY KEY, val1 VARCHAR(10), d1 DOUBLE);
+CREATE TABLE t2(id2 INT PRIMARY KEY, val2 VARCHAR(10), d2 DOUBLE, p2 POINT);
+
+
+INSERT INTO t2 VALUES(1,'a',1.00101,PointFromText('POINT(20 10)')),
+ (2,'b',1.00102,PointFromText('POINT(20 10)')),
+ (3,'c',1.00103,PointFromText('POINT(20 10)'));
+INSERT INTO t1 SELECT id2, val2, d2 FROM t2;
+
+--error ER_DUP_ENTRY
+INSERT INTO t1 SELECT id2, val2, d2 FROM t2 WHERE id2=1;
+GET DIAGNOSTICS CONDITION 1 @var103= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var104= ROW_NUMBER;
+SELECT @var103, @var104;
+
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+INSERT INTO t1 SELECT id2, val2, p2 from t2;
+GET DIAGNOSTICS CONDITION 1 @var105= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var106= ROW_NUMBER;
+SELECT @var105, @var106;
+
+--error ER_WRONG_VALUE_COUNT_ON_ROW
+INSERT INTO t1 SELECT id2, val2 FROM t2;
+GET DIAGNOSTICS CONDITION 1 @var107= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var108= ROW_NUMBER;
+SELECT @var107, @var108;
+
+INSERT INTO t2 VALUES(4,'a',1.00101,PointFromText('POINT(20 10)'));
+--error ER_TRUNCATED_WRONG_VALUE
+INSERT INTO t1 SELECT id2, CAST(123 AS CHAR(1)), d2 FROM t2 WHERE id2=4;
+GET DIAGNOSTICS CONDITION 1 @var109= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var110= ROW_NUMBER;
+SELECT @var109, @var110;
+
+--error ER_ILLEGAL_VALUE_FOR_TYPE
+INSERT INTO t1 SELECT id2, val2, 1.79769313486232e+308 FROM t2;
+GET DIAGNOSTICS CONDITION 1 @var111= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var112= ROW_NUMBER;
+SELECT @var111, @var112;
+
+
+--error ER_DIVISION_BY_ZERO
+INSERT INTO t1 SELECT id2/0, val2, d2 FROM t2;
+GET DIAGNOSTICS CONDITION 1 @var113= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 2 @var114= ROW_NUMBER;
+GET DIAGNOSTICS CONDITION 3 @var115= ROW_NUMBER;
+SELECT @var113, @var114, @var115;
+
+DROP TABLE t1,t2;
+
+--echo # Checking ROW_NUMBER in STORED PROCEDURE
+
+CREATE TABLE t1(id1 INT PRIMARY KEY);
+
+DELIMITER |;
+
+CREATE PROCEDURE proc1 ()
+BEGIN
+
+ DECLARE var116 INT;
+
+ REPLACE INTO t1 VALUES (1),(2);
+
+ GET DIAGNOSTICS CONDITION 1 var116= ROW_NUMBER;
+
+ SELECT var116;
+
+END;
+|
+
+DELIMITER ;|
+
+CALL proc1();
+TRUNCATE TABLE t1;
+
+--echo # Checking ROW_NUMBER in PREPARED STATEMENTS
+
+REPLACE INTO t1 VALUES (1), (2), (3);
+
+PREPARE stmt1 FROM "GET DIAGNOSTICS CONDITION 2 @var117= ROW_NUMBER";
+EXECUTE stmt1;
+SELECT @var117;
+
+DROP PROCEDURE proc1;
+DROP PREPARE stmt1;
+DROP TABLE t1;
+
+--echo #
+--echo # Checking that ROW_NUMBER is only for errors with rows/values
+--echo #
+
+--echo # INSERT STATEMENT
+
+CREATE TABLE t1(id1 INT);
+CREATE TABLE t2(id2 INT);
+CREATE VIEW v AS SELECT t1.id1 AS A, t2.id2 AS b FROM t1,t2;
+
+--error ER_FIELD_SPECIFIED_TWICE
+INSERT INTO t1(id1, id1) VALUES (1,1);
+GET DIAGNOSTICS CONDITION 1 @var118= ROW_NUMBER;
+SELECT @var118;
+
+delimiter |;
+CREATE FUNCTION f1() RETURNS INT
+BEGIN
+ INSERT INTO t1 VALUES (1);
+ RETURN 1;
+END |
+delimiter ;|
+
+--error ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG
+INSERT INTO t1 VALUES (1), (f1());
+GET DIAGNOSTICS CONDITION 1 @var119= ROW_NUMBER;
+SELECT @var119;
+
+--error ER_BAD_FIELD_ERROR
+INSERT INTO t1 VALUES (1) RETURNING id2;
+GET DIAGNOSTICS CONDITION 1 @var120= ROW_NUMBER;
+SELECT @var120;
+
+--error ER_BAD_FIELD_ERROR
+INSERT INTO t1(id2) VALUES(1);
+GET DIAGNOSTICS CONDITION 1 @var121= ROW_NUMBER;
+SELECT @var121;
+
+--error ER_VIEW_NO_INSERT_FIELD_LIST
+INSERT INTO v VALUES(1,2);
+GET DIAGNOSTICS CONDITION 1 @var122= ROW_NUMBER;
+SELECT @var122;
+
+--error ER_VIEW_MULTIUPDATE
+INSERT INTO v(a,b) VALUES (1,2);
+GET DIAGNOSTICS CONDITION 1 @var123= ROW_NUMBER;
+SELECT @var123;
+
+--echo # REPLACE STATEMENT
+
+--error ER_FIELD_SPECIFIED_TWICE
+REPLACE INTO t1(id1, id1) VALUES (1,1);
+GET DIAGNOSTICS CONDITION 1 @var124= ROW_NUMBER;
+SELECT @var124;
+
+delimiter |;
+CREATE FUNCTION f2() RETURNS INT
+BEGIN
+ REPLACE INTO t1 VALUES (1);
+ RETURN 1;
+END |
+delimiter ;|
+
+--error ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG
+REPLACE INTO t1 VALUES (1), (f2());
+GET DIAGNOSTICS CONDITION 1 @var125= ROW_NUMBER;
+SELECT @var125;
+
+--error ER_BAD_FIELD_ERROR
+REPLACE INTO t1 VALUES (1) RETURNING id2;
+GET DIAGNOSTICS CONDITION 1 @var126= ROW_NUMBER;
+SELECT @var126;
+
+--error ER_BAD_FIELD_ERROR
+REPLACE INTO t1(id2) VALUES(1);
+GET DIAGNOSTICS CONDITION 1 @var127= ROW_NUMBER;
+SELECT @var127;
+
+--error ER_VIEW_NO_INSERT_FIELD_LIST
+REPLACE INTO v VALUES(1,2);
+GET DIAGNOSTICS CONDITION 1 @var128= ROW_NUMBER;
+SELECT @var128;
+
+--error ER_VIEW_MULTIUPDATE
+REPLACE INTO v(a,b) VALUES (1,2);
+GET DIAGNOSTICS CONDITION 1 @var129= ROW_NUMBER;
+SELECT @var129;
+
+DROP TABLE t1,t2;
+DROP FUNCTION f1;
+DROP FUNCTION f2;
+DROP VIEW v;
+
+--echo #
+--echo # MDEV-26606: ROW_NUMBER property value isn't passed from inside a
+--echo # stored procedure
+--echo #
+
+--echo # Test 1: Without RESIGNAL
+
+CREATE OR REPLACE TABLE t1 (pk INT PRIMARY KEY);
+CREATE OR REPLACE PROCEDURE sp(a INT) INSERT INTO t1 VALUES (2),(a);
+SET @num=null, @msg=null;
+
+INSERT INTO t1 VALUES(1);
+
+--error ER_DUP_ENTRY
+CALL sp(1);
+GET DIAGNOSTICS CONDITION 1 @num = ROW_NUMBER, @msg = MESSAGE_TEXT;
+SELECT @num, @msg;
+
+DROP PROCEDURE sp;
+DROP TABLE t1;
+
+--echo # Test 2: With RESIGNAL
+
+CREATE OR REPLACE TABLE t1 (pk INT PRIMARY KEY);
+
+DELIMITER |;
+CREATE OR REPLACE PROCEDURE sp(a INT)
+BEGIN
+ DECLARE n INT;
+ DECLARE m VARCHAR(255);
+ DECLARE EXIT HANDLER FOR 1062
+ BEGIN
+ GET DIAGNOSTICS CONDITION 1 n = ROW_NUMBER, m = MESSAGE_TEXT;
+ SELECT n, m;
+ RESIGNAL;
+ END;
+ INSERT INTO t1 VALUES (2), (a);
+END |
+DELIMITER ;|
+
+SET @num=null, @msg=null;
+INSERT INTO t1 VALUES (1);
+
+--error ER_DUP_ENTRY
+CALL sp(1);
+GET DIAGNOSTICS CONDITION 1 @num = ROW_NUMBER, @msg = MESSAGE_TEXT;
+SELECT @num, @msg;
+
+DROP PROCEDURE sp;
+DROP TABLE t1;
+
+--echo # Checking more errors
+
+CREATE TABLE t1 (val1 TINYINT);
+
+CREATE PROCEDURE sp(a INT) INSERT INTO t1 VALUES (2),(a);
+
+INSERT INTO t1 VALUES(1);
+
+CALL sp(100000);
+GET DIAGNOSTICS CONDITION 1 @var1= ROW_NUMBER;
+SELECT @var1;
+
+DROP TABLE t1;
+DROP PROCEDURE sp;
+
+--echo #
+--echo # MDEV-26684: Unexpected ROW_NUMBER in a condition raised by a diagnostics statement
+--echo #
+
+CREATE TABLE t1 (a INT);
+
+INSERT INTO t1 VALUES (1),(2);
+
+GET DIAGNOSTICS CONDITION 5 @msg = MESSAGE_TEXT;
+SHOW WARNINGS;
+
+GET DIAGNOSTICS CONDITION 1 @ind = ROW_NUMBER, @msg = MESSAGE_TEXT;
+SELECT @ind, @msg;
+
+INSERT INTO t1 VALUES (3),(4);
+
+GET DIAGNOSTICS CONDITION 1 @ind = ROW_NUMBER, @msg = MESSAGE_TEXT;
+SELECT @ind, @msg;
+
+GET DIAGNOSTICS CONDITION 5 @ind = ROW_NUMBER, @msg = MESSAGE_TEXT;
+SELECT @ind, @msg;
+
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-26681: ROW_NUMBER is not available within compound statement blocks
+--echo #
+
+CREATE OR REPLACE TABLE t1 (pk INT PRIMARY KEY, a CHAR(3));
+INSERT IGNORE INTO t1 VALUES (1,'foo'),(1,'bar'),(2,'foobar');
+
+DELIMITER |;
+
+BEGIN NOT ATOMIC
+ DECLARE i INT DEFAULT 0;
+ DECLARE rnum INT DEFAULT -1;
+ DECLARE msg VARCHAR(1024) DEFAULT '';
+ DECLARE err INT DEFAULT -1;
+ WHILE i < @@warning_count
+ DO
+ SET i = i + 1;
+ GET DIAGNOSTICS CONDITION i rnum = ROW_NUMBER, msg = MESSAGE_TEXT, err = MYSQL_ERRNO;
+ SELECT i, rnum, msg, err;
+ END WHILE;
+END |
+
+DELIMITER ;|
+
+GET DIAGNOSTICS CONDITION 1 @rnum = ROW_NUMBER, @msg = MESSAGE_TEXT, @err = MYSQL_ERRNO;
+select @rnum, @msg, @err;
+
+GET DIAGNOSTICS CONDITION 2 @rnum = ROW_NUMBER, @msg = MESSAGE_TEXT, @err = MYSQL_ERRNO;
+SELECT @rnum, @msg, @err;
+
+DROP TABLE t1;
+
+--echo #
+--echo # ROW_NUMBER differs from the number in the error message upon
+--echo # ER_WARN_DATA_OUT_OF_RANGE
+--echo #
+CREATE TABLE t (a INT);
+INSERT INTO t VALUES (1),(2);
+SELECT CAST(a AS DECIMAL(2,2)) AS f FROM t;
+
+GET DIAGNOSTICS CONDITION 2 @n= ROW_NUMBER, @m = MESSAGE_TEXT;
+SELECT @n, @m;
+
+DROP TABLE t;
+
+--echo #
+--echo # MDEV-26832: ROW_NUMBER in SIGNAL/RESIGNAL causes a syntax error
+--echo #
+
+--echo # using signal
+
+DELIMITER |;
+CREATE PROCEDURE signal_syntax()
+BEGIN
+ DECLARE errno INT DEFAULT 0;
+ DECLARE msg TEXT DEFAULT "foo";
+ DECLARE row_num INT DEFAULT 0;
+ DECLARE cond CONDITION FOR SQLSTATE "01234";
+ DECLARE CONTINUE HANDLER for 1012
+ BEGIN
+ GET DIAGNOSTICS CONDITION 1 errno = MYSQL_ERRNO, msg = MESSAGE_TEXT, row_num= ROW_NUMBER;
+ END;
+
+ SIGNAL cond SET MESSAGE_TEXT = "Signal message", MYSQL_ERRNO = 1012, ROW_NUMBER= 5;
+
+ SELECT errno, msg, row_num;
+END|
+DELIMITER ;|
+
+CALL signal_syntax();
+
+DROP PROCEDURE signal_syntax;
+
+--echo # using resignal
+
+DELIMITER |;
+
+CREATE PROCEDURE resignal_syntax()
+BEGIN
+ DECLARE CONTINUE HANDLER
+ FOR 1146
+ BEGIN
+ RESIGNAL SET
+ MESSAGE_TEXT = '`temptab` does not exist', ROW_NUMBER= 105;
+ END;
+ SELECT `c` FROM `temptab`;
+END|
+
+DELIMITER ;|
+
+--error ER_NO_SUCH_TABLE
+CALL resignal_syntax();
+
+GET DIAGNOSTICS CONDITION 1 @row_num= ROW_NUMBER;
+SELECT @row_num;
+
+DROP PROCEDURE resignal_syntax;
+
+--echo #
+--echo # MDEV-26842: ROW_NUMBER is not set and differs from the message upon
+--echo # WARN_DATA_TRUNCATED produced by inplace ALTER
+--echo #
+
+CREATE TABLE t1 (a VARCHAR(64)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('foo'),(null);
+
+--error WARN_DATA_TRUNCATED
+ALTER TABLE t1 ADD PRIMARY KEY(a), ALGORITHM=INPLACE;
+
+GET DIAGNOSTICS CONDITION 1 @n= ROW_NUMBER, @m= MESSAGE_TEXT;
+SELECT @n, @m;
+
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-26841: ROW_NUMBER is not set and differs from the message upon
+--echo # ER_WRONG_VALUE_COUNT_ON_ROW for the 1st row
+--echo #
+
+CREATE TABLE t1 (a INT);
+
+--error ER_WRONG_VALUE_COUNT_ON_ROW
+INSERT INTO t1 VALUES (1,2),(3);
+
+GET DIAGNOSTICS CONDITION 1 @n= ROW_NUMBER, @m= MESSAGE_TEXT;
+SELECT @n, @m;
+
+--error ER_WRONG_VALUE_COUNT_ON_ROW
+INSERT INTO t1(a) VALUES(1,2), (3);
+
+GET DIAGNOSTICS CONDITION 1 @n= ROW_NUMBER, @m= MESSAGE_TEXT;
+SELECT @n, @m;
+
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-26830: Wrong ROW_NUMBER in diagnostics upon INSERT IGNORE with
+--echo # CHECK violation
+--echo #
+
+CREATE TABLE t1 (a INT, CHECK(a>0));
+INSERT IGNORE INTO t1 VALUES (1),(0),(2),(0);
+GET DIAGNOSTICS CONDITION 1 @n= ROW_NUMBER;
+SELECT @n;
+GET DIAGNOSTICS CONDITION 2 @n= ROW_NUMBER;
+SELECT @n;
+
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-26844: DELETE returns ROW_NUMBER=1 for every row upon
+--echo # ER_TRUNCATED_WRONG_VALUE
+--echo #
+
+--echo # without ORDER BY
+
+CREATE TABLE t (a VARCHAR(8));
+
+INSERT INTO t VALUES ('val1'),('val2'),('100'),('val4');
+SELECT * FROM t;
+
+DELETE FROM t WHERE a = 100;
+SHOW WARNINGS;
+
+GET DIAGNOSTICS CONDITION 3 @n = ROW_NUMBER;
+SELECT @n;
+
+DROP TABLE t;
+
+--echo #
+--echo # MDEV-26695: Number of an invalid row is not calculated for table value constructor
+--echo #
+
+CREATE TABLE t1 (a CHAR(1)) VALUES ('a'),('b'),('foo');
+GET DIAGNOSTICS CONDITION 1 @n= ROW_NUMBER;
+SELECT @n;
+CREATE TABLE t2 (a CHAR(1)) VALUES ('a'),('b') UNION VALUES ('foo');
+GET DIAGNOSTICS CONDITION 1 @n= ROW_NUMBER;
+SELECT @n;
+
+DROP TABLE t1, t2;
+
+--echo # Checking that CREATE ... SELECT works
+
+CREATE TABLE t1 (val1 CHAR(5));
+INSERT INTO t1 VALUES ('A'),('B'),('C'),('DEF');
+CREATE TABLE t2 (val2 CHAR(1)) SELECT val1 as val2 FROM t1;
+GET DIAGNOSTICS CONDITION 1 @n= ROW_NUMBER;
+SELECT @n;
+SELECT * FROM t2;
+
+DROP TABLE t1,t2;
+
+--echo #
+--echo # End of 10.7 tests
+--echo #
+
diff --git a/mysql-test/main/gis.result b/mysql-test/main/gis.result
index b547f9f05cd..82fe9a53eee 100644
--- a/mysql-test/main/gis.result
+++ b/mysql-test/main/gis.result
@@ -688,9 +688,9 @@ object_id geometrytype(geo) ISSIMPLE(GEO) ASTEXT(centroid(geo))
drop table t1;
create table t1 (fl geometry not null);
insert into t1 values (1);
-ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 values (1.11);
-ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
+ERROR HY000: Cannot cast 'decimal' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 values ("qwerty");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 values (pointfromtext('point(1,1)'));
diff --git a/mysql-test/main/gis.test b/mysql-test/main/gis.test
index 17a93291b77..f1fed747d51 100644
--- a/mysql-test/main/gis.test
+++ b/mysql-test/main/gis.test
@@ -366,9 +366,9 @@ t1 where object_id=85984;
drop table t1;
create table t1 (fl geometry not null);
---error 1416
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
insert into t1 values (1);
---error 1416
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
insert into t1 values (1.11);
--error 1416
insert into t1 values ("qwerty");
diff --git a/mysql-test/main/handlersocket.result b/mysql-test/main/handlersocket.result
index 8ef9b289cd0..38027afc414 100644
--- a/mysql-test/main/handlersocket.result
+++ b/mysql-test/main/handlersocket.result
@@ -5,7 +5,7 @@ plugin_version 1.0
plugin_status ACTIVE
plugin_type DAEMON
plugin_library handlersocket.so
-plugin_library_version 1.14
+plugin_library_version 1.15
plugin_author higuchi dot akira at dena dot jp
plugin_description Direct access into InnoDB
plugin_license BSD
diff --git a/mysql-test/main/information_schema_part.result b/mysql-test/main/information_schema_part.result
index 2655ef30fc6..1c5b9333550 100644
--- a/mysql-test/main/information_schema_part.result
+++ b/mysql-test/main/information_schema_part.result
@@ -7,9 +7,9 @@ partition x3 values in (16, 8, 5+19, 70-43) tablespace ts3);
select * from information_schema.partitions where table_schema="test"
and table_name="t1";
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME
-def test t1 x1 NULL 1 NULL LIST NULL `b` * `a` NULL 1 0 0 0 # 1024 0 # # NULL NULL default ts1
-def test t1 x2 NULL 2 NULL LIST NULL `b` * `a` NULL 3,11,5,7 0 0 0 # 1024 0 # # NULL NULL default ts2
-def test t1 x3 NULL 3 NULL LIST NULL `b` * `a` NULL 16,8,24,27 0 0 0 # 1024 0 # # NULL NULL default ts3
+def test t1 x1 NULL 1 NULL LIST NULL `b` * `a` NULL 1 0 0 0 # 1024 0 # # NULL NULL default NULL
+def test t1 x2 NULL 2 NULL LIST NULL `b` * `a` NULL 3,11,5,7 0 0 0 # 1024 0 # # NULL NULL default NULL
+def test t1 x3 NULL 3 NULL LIST NULL `b` * `a` NULL 16,8,24,27 0 0 0 # 1024 0 # # NULL NULL default NULL
create table t2 (a int not null,b int not null,c int not null, primary key(a,b))
partition by range (a)
partitions 3
@@ -19,9 +19,9 @@ partition x3 values less than maxvalue tablespace ts3);
select * from information_schema.partitions where table_schema="test"
and table_name="t2";
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME
-def test t2 x1 NULL 1 NULL RANGE NULL `a` NULL 5 0 0 0 # 1024 0 # # NULL NULL default ts1
-def test t2 x2 NULL 2 NULL RANGE NULL `a` NULL 10 0 0 0 # 1024 0 # # NULL NULL default ts2
-def test t2 x3 NULL 3 NULL RANGE NULL `a` NULL MAXVALUE 0 0 0 # 1024 0 # # NULL NULL default ts3
+def test t2 x1 NULL 1 NULL RANGE NULL `a` NULL 5 0 0 0 # 1024 0 # # NULL NULL default NULL
+def test t2 x2 NULL 2 NULL RANGE NULL `a` NULL 10 0 0 0 # 1024 0 # # NULL NULL default NULL
+def test t2 x3 NULL 3 NULL RANGE NULL `a` NULL MAXVALUE 0 0 0 # 1024 0 # # NULL NULL default NULL
create table t3 (f1 date)
partition by hash(month(f1))
partitions 3;
@@ -63,14 +63,14 @@ subpartition x22 tablespace t2)
);
select * from information_schema.partitions where table_schema="test" order by table_name, partition_name;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME
-def test t1 x1 x11 1 1 RANGE HASH `a` `a` + `b` 1 0 0 0 # 1024 0 # # NULL NULL default t1
-def test t1 x1 x12 1 2 RANGE HASH `a` `a` + `b` 1 0 0 0 # 1024 0 # # NULL NULL default t2
-def test t1 x2 x21 2 1 RANGE HASH `a` `a` + `b` 5 0 0 0 # 1024 0 # # NULL NULL default t1
-def test t1 x2 x22 2 2 RANGE HASH `a` `a` + `b` 5 0 0 0 # 1024 0 # # NULL NULL default t2
-def test t2 x1 x11 1 1 RANGE KEY `a` `a` 1 0 0 0 # 1024 0 # # NULL NULL default t1
-def test t2 x1 x12 1 2 RANGE KEY `a` `a` 1 0 0 0 # 1024 0 # # NULL NULL default t2
-def test t2 x2 x21 2 1 RANGE KEY `a` `a` 5 0 0 0 # 1024 0 # # NULL NULL default t1
-def test t2 x2 x22 2 2 RANGE KEY `a` `a` 5 0 0 0 # 1024 0 # # NULL NULL default t2
+def test t1 x1 x11 1 1 RANGE HASH `a` `a` + `b` 1 0 0 0 # 1024 0 # # NULL NULL default NULL
+def test t1 x1 x12 1 2 RANGE HASH `a` `a` + `b` 1 0 0 0 # 1024 0 # # NULL NULL default NULL
+def test t1 x2 x21 2 1 RANGE HASH `a` `a` + `b` 5 0 0 0 # 1024 0 # # NULL NULL default NULL
+def test t1 x2 x22 2 2 RANGE HASH `a` `a` + `b` 5 0 0 0 # 1024 0 # # NULL NULL default NULL
+def test t2 x1 x11 1 1 RANGE KEY `a` `a` 1 0 0 0 # 1024 0 # # NULL NULL default NULL
+def test t2 x1 x12 1 2 RANGE KEY `a` `a` 1 0 0 0 # 1024 0 # # NULL NULL default NULL
+def test t2 x2 x21 2 1 RANGE KEY `a` `a` 5 0 0 0 # 1024 0 # # NULL NULL default NULL
+def test t2 x2 x22 2 2 RANGE KEY `a` `a` 5 0 0 0 # 1024 0 # # NULL NULL default NULL
drop table t1,t2;
create table t1 (
a int not null,
@@ -88,10 +88,10 @@ subpartition x22 tablespace t2 nodegroup 1)
);
select * from information_schema.partitions where table_schema="test";
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME
-def test t1 x1 x11 1 1 RANGE HASH `a` `a` + `b` 1 0 0 0 # 1024 0 # # NULL NULL 0 t1
-def test t1 x1 x12 1 2 RANGE HASH `a` `a` + `b` 1 0 0 0 # 1024 0 # # NULL NULL 1 t2
-def test t1 x2 x21 2 1 RANGE HASH `a` `a` + `b` 5 0 0 0 # 1024 0 # # NULL NULL 0 t1
-def test t1 x2 x22 2 2 RANGE HASH `a` `a` + `b` 5 0 0 0 # 1024 0 # # NULL NULL 1 t2
+def test t1 x1 x11 1 1 RANGE HASH `a` `a` + `b` 1 0 0 0 # 1024 0 # # NULL NULL 0 NULL
+def test t1 x1 x12 1 2 RANGE HASH `a` `a` + `b` 1 0 0 0 # 1024 0 # # NULL NULL 1 NULL
+def test t1 x2 x21 2 1 RANGE HASH `a` `a` + `b` 5 0 0 0 # 1024 0 # # NULL NULL 0 NULL
+def test t1 x2 x22 2 2 RANGE HASH `a` `a` + `b` 5 0 0 0 # 1024 0 # # NULL NULL 1 NULL
show tables;
Tables_in_test
t1
diff --git a/mysql-test/main/invisible_field_debug.test b/mysql-test/main/invisible_field_debug.test
index 3e844fc4521..b813481110f 100644
--- a/mysql-test/main/invisible_field_debug.test
+++ b/mysql-test/main/invisible_field_debug.test
@@ -201,7 +201,7 @@ drop table t1;
set debug_dbug= "+d,test_pseudo_invisible";
Create table t1( a int default(99) invisible, b int);
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
Create table t2( a int default(99) invisible, b int, unique(invisible));
set debug_dbug=@old_debug;
@@ -211,9 +211,9 @@ insert into t1 values(3);
insert into t1 values(4);
select * from t1 order by b;
select invisible, a, b from t1 order by b;
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
alter table t1 add index(invisible);
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
alter table t1 add index(b,invisible);
show index from t1;
drop table t1;
@@ -223,7 +223,7 @@ drop table t1;
set debug_dbug= "+d,test_completely_invisible";
Create table t1( a int default(99) invisible, b int);
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
Create table t2( a int default(99) invisible, b int, unique(invisible));
insert into t1 values(1);
insert into t1 values(2);
@@ -233,9 +233,9 @@ select * from t1 order by b;
select invisible, a, b from t1 order by b;
set debug_dbug=@old_debug;
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
alter table t1 add index(invisible);
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
alter table t1 add index(b,invisible);
show index from t1;
drop table t1;
@@ -262,7 +262,7 @@ select invisible, a ,b from t1;
set debug_dbug=@old_debug;
Show index from t1;
## Sytem Generated Index modification
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
create index a1 on t1(invisible);
set debug_dbug= "+d,test_completely_invisible,test_invisible_index";
## index does not exist for user
diff --git a/mysql-test/main/json_equals.result b/mysql-test/main/json_equals.result
new file mode 100644
index 00000000000..1fa13ec2cf8
--- /dev/null
+++ b/mysql-test/main/json_equals.result
@@ -0,0 +1,98 @@
+select json_equals("{}", "{}");
+json_equals("{}", "{}")
+1
+select json_equals("{}", "[]");
+json_equals("{}", "[]")
+0
+select json_equals("{}", NULL);
+json_equals("{}", NULL)
+NULL
+select json_equals("", "");
+json_equals("", "")
+NULL
+select json_equals("", 1);
+json_equals("", 1)
+NULL
+select json_equals(now(), now());
+json_equals(now(), now())
+NULL
+select json_equals('{"a":[1, 2, 3]}', '{"a":[1, 2, 3, 4]}');
+json_equals('{"a":[1, 2, 3]}', '{"a":[1, 2, 3, 4]}')
+0
+select json_equals('{"a":[1, 2, 3]}', '{"a":[1, 2, 3]}');
+json_equals('{"a":[1, 2, 3]}', '{"a":[1, 2, 3]}')
+1
+select json_equals('{"țanțoș":[1, 2, "ț", {"some uâ߀":"uâßr"}]}',
+'{"țanțoș":[1, 2, "ț", {"some uâ߀":"uâßr"}]}');
+json_equals('{"țanțoș":[1, 2, "ț", {"some uâ߀":"uâßr"}]}',
+'{"țanțoș":[1, 2, "ț", {"some uâ߀":"uâßr"}]}')
+1
+select json_equals('{"a" : [0.123456789123456789], "b" : [1, 2, 3]}',
+'{"b" : [1, 2, 3], "a" : [0.123456789123456789]}');
+json_equals('{"a" : [0.123456789123456789], "b" : [1, 2, 3]}',
+'{"b" : [1, 2, 3], "a" : [0.123456789123456789]}')
+1
+#
+# Test max json depth for json_equals.
+#
+with recursive rec_json (step, obj) as (
+select 1, cast('{"key":"value"}' as varchar(1000))
+union
+select r.step + 1, JSON_INSERT('{}', '$.obj', JSON_QUERY(r.obj, '$'))
+from rec_json r
+where r.step < 10
+)
+select step, obj, json_equals(obj, obj) from rec_json;
+step obj json_equals(obj, obj)
+1 {"key":"value"} 1
+2 {"obj": {"key": "value"}} 1
+3 {"obj": {"obj": {"key": "value"}}} 1
+4 {"obj": {"obj": {"obj": {"key": "value"}}}} 1
+5 {"obj": {"obj": {"obj": {"obj": {"key": "value"}}}}} 1
+6 {"obj": {"obj": {"obj": {"obj": {"obj": {"key": "value"}}}}}} 1
+7 {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"key": "value"}}}}}}} 1
+8 {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"key": "value"}}}}}}}} 1
+9 {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"key": "value"}}}}}}}}} 1
+10 {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"key": "value"}}}}}}}}}} 1
+#
+# 31 levels of nesting.
+#
+select json_equals('{"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"key": "value"}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}',
+'{"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"key": "value"}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}') as 31_levels;
+31_levels
+1
+#
+# 32 Levels of nesting. This should hit max json depth.
+#
+select json_equals('{"obj":{"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"key": "value"}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}',
+'{"obj":{"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"key": "value"}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}') as 32_levels;
+32_levels
+NULL
+#
+# test values from different charset
+# (UTF-8 two-bytes vs. latin1 single high-byte)
+#
+create table t1 (a varchar(200) character set latin1);
+create table t2 (a varchar(200) character set utf8);
+insert into t1 values (UNHEX('22CA22'));
+set names utf8;
+insert into t2 values (UNHEX('22C38A22'));
+select a from t1;
+a
+"Ê"
+select hex(a) from t1;
+hex(a)
+22CA22
+select a from t2;
+a
+"Ê"
+select hex(a) from t2;
+hex(a)
+22C38A22
+select t1.a, t2.a, t1.a = t2.a,
+json_valid(t1.a), json_valid(t2.a), json_equals(t1.a, t2.a)
+from t1, t2;
+a a t1.a = t2.a json_valid(t1.a) json_valid(t2.a) json_equals(t1.a, t2.a)
+"Ê" "Ê" 1 1 1 1
+drop table t1;
+drop table t2;
diff --git a/mysql-test/main/json_equals.test b/mysql-test/main/json_equals.test
new file mode 100644
index 00000000000..904d8a3f67d
--- /dev/null
+++ b/mysql-test/main/json_equals.test
@@ -0,0 +1,69 @@
+
+select json_equals("{}", "{}");
+
+select json_equals("{}", "[]");
+
+select json_equals("{}", NULL);
+
+select json_equals("", "");
+
+select json_equals("", 1);
+
+select json_equals(now(), now());
+
+select json_equals('{"a":[1, 2, 3]}', '{"a":[1, 2, 3, 4]}');
+
+select json_equals('{"a":[1, 2, 3]}', '{"a":[1, 2, 3]}');
+
+select json_equals('{"țanțoș":[1, 2, "ț", {"some uâ߀":"uâßr"}]}',
+ '{"țanțoș":[1, 2, "ț", {"some uâ߀":"uâßr"}]}');
+
+select json_equals('{"a" : [0.123456789123456789], "b" : [1, 2, 3]}',
+ '{"b" : [1, 2, 3], "a" : [0.123456789123456789]}');
+
+--echo #
+--echo # Test max json depth for json_equals.
+--echo #
+with recursive rec_json (step, obj) as (
+ select 1, cast('{"key":"value"}' as varchar(1000))
+ union
+ select r.step + 1, JSON_INSERT('{}', '$.obj', JSON_QUERY(r.obj, '$'))
+ from rec_json r
+ where r.step < 10
+)
+select step, obj, json_equals(obj, obj) from rec_json;
+
+--echo #
+--echo # 31 levels of nesting.
+--echo #
+select json_equals('{"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"key": "value"}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}',
+'{"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"key": "value"}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}') as 31_levels;
+
+--echo #
+--echo # 32 Levels of nesting. This should hit max json depth.
+--echo #
+select json_equals('{"obj":{"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"key": "value"}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}',
+'{"obj":{"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"obj": {"key": "value"}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}') as 32_levels;
+
+
+--echo #
+--echo # test values from different charset
+--echo # (UTF-8 two-bytes vs. latin1 single high-byte)
+--echo #
+create table t1 (a varchar(200) character set latin1);
+create table t2 (a varchar(200) character set utf8);
+insert into t1 values (UNHEX('22CA22'));
+set names utf8;
+insert into t2 values (UNHEX('22C38A22'));
+
+select a from t1;
+select hex(a) from t1;
+select a from t2;
+select hex(a) from t2;
+
+select t1.a, t2.a, t1.a = t2.a,
+ json_valid(t1.a), json_valid(t2.a), json_equals(t1.a, t2.a)
+from t1, t2;
+
+drop table t1;
+drop table t2;
diff --git a/mysql-test/main/json_normalize.result b/mysql-test/main/json_normalize.result
new file mode 100644
index 00000000000..b1363ea9099
--- /dev/null
+++ b/mysql-test/main/json_normalize.result
@@ -0,0 +1,77 @@
+set names utf8;
+create table t1 (json json);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`json`))
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+insert into t1 values
+('{ }'),
+('[ ]'),
+('{ "foo" : "bar" }'),
+('{ "foo" : "bar", "baz" : "whatever" }'),
+('[ 1.2, 0.0, "text", 0, null, true, false ]'),
+('[ "string", { "key" : "val", "a" : "b", "c" : [ 10, 9, 8, "seven", 11 ] }]'),
+('{ "ăț€": "val1", "âț€":"val2" }');
+select json, json_normalize(json) from t1
+order by json;
+json json_normalize(json)
+[ ] []
+[ "string", { "key" : "val", "a" : "b", "c" : [ 10, 9, 8, "seven", 11 ] }] ["string",{"a":"b","c":[1.0E1,9.0E0,8.0E0,"seven",1.1E1],"key":"val"}]
+[ 1.2, 0.0, "text", 0, null, true, false ] [1.2E0,0.0E0,"text",0.0E0,null,true,false]
+{ } {}
+{ "foo" : "bar" } {"foo":"bar"}
+{ "foo" : "bar", "baz" : "whatever" } {"baz":"whatever","foo":"bar"}
+{ "ăț€": "val1", "âț€":"val2" } {"âț€":"val2","ăț€":"val1"}
+create view v1 as (select json, json_normalize(json) norm_json from t1);
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS (select `t1`.`json` AS `json`,json_normalize(`t1`.`json`) AS `norm_json` from `t1`) utf8mb3 utf8mb3_general_ci
+select * from v1
+order by json;
+json norm_json
+[ ] []
+[ "string", { "key" : "val", "a" : "b", "c" : [ 10, 9, 8, "seven", 11 ] }] ["string",{"a":"b","c":[1.0E1,9.0E0,8.0E0,"seven",1.1E1],"key":"val"}]
+[ 1.2, 0.0, "text", 0, null, true, false ] [1.2E0,0.0E0,"text",0.0E0,null,true,false]
+{ } {}
+{ "foo" : "bar" } {"foo":"bar"}
+{ "foo" : "bar", "baz" : "whatever" } {"baz":"whatever","foo":"bar"}
+{ "ăț€": "val1", "âț€":"val2" } {"âț€":"val2","ăț€":"val1"}
+select json_normalize(NULL);
+json_normalize(NULL)
+NULL
+select json_normalize('{ "invalid": "no_close"');
+json_normalize('{ "invalid": "no_close"')
+NULL
+drop table t1;
+drop view v1;
+create table t1 (text varchar(200) character set 'latin1');
+insert into t1 values (unhex('22E522'));
+create table t2 (text varchar(200) character set 'utf8mb4');
+insert into t2 SELECT * FROM t1;
+select t1.text, hex(t1.text) from t1;
+text hex(t1.text)
+"Ã¥" 22E522
+select t2.text, hex(t2.text) from t2;
+text hex(t2.text)
+"Ã¥" 22C3A522
+select t1.text
+, t2.text
+, replace(json_normalize(t1.text), unhex('C3A5'), unhex('C385'))
+, replace(json_normalize(t2.text), unhex('C3A5'), unhex('C385'))
+, hex(replace(json_normalize(t1.text), unhex('C3A5'), unhex('C385')))
+, hex(replace(json_normalize(t2.text), unhex('C3A5'), unhex('C385')))
+from t1, t2;
+text text replace(json_normalize(t1.text), unhex('C3A5'), unhex('C385')) replace(json_normalize(t2.text), unhex('C3A5'), unhex('C385')) hex(replace(json_normalize(t1.text), unhex('C3A5'), unhex('C385'))) hex(replace(json_normalize(t2.text), unhex('C3A5'), unhex('C385')))
+"Ã¥" "Ã¥" "Ã…" "Ã…" 22C38522 22C38522
+drop table t1;
+drop table t2;
+create table t1 (text varchar(1));
+insert into t1 values ('0');
+select concat_ws(' ', t1.text, t1.text) from t1;
+concat_ws(' ', t1.text, t1.text)
+0 0
+select concat_ws(' ', json_normalize(t1.text), json_normalize(t1.text)) from t1;
+concat_ws(' ', json_normalize(t1.text), json_normalize(t1.text))
+0.0E0 0.0E0
+drop table t1;
diff --git a/mysql-test/main/json_normalize.test b/mysql-test/main/json_normalize.test
new file mode 100644
index 00000000000..29faa514cca
--- /dev/null
+++ b/mysql-test/main/json_normalize.test
@@ -0,0 +1,58 @@
+set names utf8;
+
+create table t1 (json json);
+show create table t1;
+
+
+insert into t1 values
+('{ }'),
+('[ ]'),
+('{ "foo" : "bar" }'),
+('{ "foo" : "bar", "baz" : "whatever" }'),
+('[ 1.2, 0.0, "text", 0, null, true, false ]'),
+('[ "string", { "key" : "val", "a" : "b", "c" : [ 10, 9, 8, "seven", 11 ] }]'),
+('{ "ăț€": "val1", "âț€":"val2" }');
+
+select json, json_normalize(json) from t1
+order by json;
+
+
+create view v1 as (select json, json_normalize(json) norm_json from t1);
+show create view v1;
+
+select * from v1
+order by json;
+
+select json_normalize(NULL);
+select json_normalize('{ "invalid": "no_close"');
+
+drop table t1;
+drop view v1;
+
+create table t1 (text varchar(200) character set 'latin1');
+insert into t1 values (unhex('22E522'));
+
+create table t2 (text varchar(200) character set 'utf8mb4');
+insert into t2 SELECT * FROM t1;
+
+select t1.text, hex(t1.text) from t1;
+select t2.text, hex(t2.text) from t2;
+
+select t1.text
+ , t2.text
+ , replace(json_normalize(t1.text), unhex('C3A5'), unhex('C385'))
+ , replace(json_normalize(t2.text), unhex('C3A5'), unhex('C385'))
+ , hex(replace(json_normalize(t1.text), unhex('C3A5'), unhex('C385')))
+ , hex(replace(json_normalize(t2.text), unhex('C3A5'), unhex('C385')))
+from t1, t2;
+
+drop table t1;
+drop table t2;
+
+create table t1 (text varchar(1));
+insert into t1 values ('0');
+
+select concat_ws(' ', t1.text, t1.text) from t1;
+select concat_ws(' ', json_normalize(t1.text), json_normalize(t1.text)) from t1;
+
+drop table t1;
diff --git a/mysql-test/main/long_unique_bugs.test b/mysql-test/main/long_unique_bugs.test
index e313d1d434e..18e430858b0 100644
--- a/mysql-test/main/long_unique_bugs.test
+++ b/mysql-test/main/long_unique_bugs.test
@@ -173,7 +173,7 @@ ALTER TABLE t1 DROP KEY f, ADD INDEX idx1(f), ALGORITHM=INSTANT;
ALTER TABLE t1 ADD KEY idx2(f);
DROP TABLE t1;
CREATE TABLE t1(a blob , b blob , unique(a,b));
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
alter table t1 drop column b;
insert into t1 values(1,1);
--error ER_DUP_ENTRY
diff --git a/mysql-test/main/mdl_sync.test b/mysql-test/main/mdl_sync.test
index 557fbe261a2..3df19aca806 100644
--- a/mysql-test/main/mdl_sync.test
+++ b/mysql-test/main/mdl_sync.test
@@ -113,7 +113,7 @@ insert into t1 values (1), (1);
--echo # Check that SU lock is compatible with it. To do this use ALTER TABLE
--echo # which will fail when constructing .frm and thus obtaining SU metadata
--echo # lock.
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
alter table t1 add index (not_exist);
--echo # Check that SNW lock is compatible with it. To do this use ALTER TABLE
--echo # which will fail during copying the table and thus obtaining SNW metadata
@@ -190,7 +190,7 @@ insert into t1 values (1);
--echo # Check that SU lock is compatible with it. To do this use ALTER TABLE
--echo # which will fail when constructing .frm and thus obtaining SU metadata
--echo # lock.
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
alter table t1 add index (not_exist);
--echo # Check that SNW lock is compatible with it. To do this use ALTER TABLE
--echo # which will fail during copying the table and thus obtaining SNW metadata
@@ -309,7 +309,7 @@ insert into t1 values (1);
--echo # Check that SU lock is compatible with it. To do this use ALTER TABLE
--echo # which will fail when constructing .frm and thus obtaining SU metadata
--echo # lock.
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
alter table t1 add index (not_exist);
--echo # Check that SNW lock is compatible with it. To do this use ALTER TABLE
--echo # which will fail during copying the table and thus obtaining SNW metadata
@@ -418,7 +418,7 @@ insert into t1 values (1);
--echo # Check that SU lock is compatible with it. To do this use ALTER TABLE
--echo # which will fail when constructing .frm and thus obtaining SU metadata
--echo # lock.
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
alter table t1 add index (not_exist);
--echo # Check that SNW lock is not compatible with SW lock.
--echo # Again we use ALTER TABLE which fails during copying
diff --git a/mysql-test/main/metadata.result b/mysql-test/main/metadata.result
index 175b09e5a2b..5786e2fd461 100644
--- a/mysql-test/main/metadata.result
+++ b/mysql-test/main/metadata.result
@@ -553,19 +553,19 @@ d0l d09 d10
# MDEV-12862 Data type of @a:=1e0 depends on the session character set
#
SET NAMES utf8;
-CREATE TABLE t1 AS SELECT @:=1e0;
+CREATE TABLE t1 AS SELECT @a:=1e0;
SELECT * FROM t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def test t1 t1 @:=1e0 @:=1e0 5 3 1 N 36865 31 63
-@:=1e0
+def test t1 t1 @a:=1e0 @a:=1e0 5 3 1 N 36865 31 63
+@a:=1e0
1
DROP TABLE t1;
SET NAMES latin1;
-CREATE TABLE t1 AS SELECT @:=1e0;
+CREATE TABLE t1 AS SELECT @a:=1e0;
SELECT * FROM t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def test t1 t1 @:=1e0 @:=1e0 5 3 1 N 36865 31 63
-@:=1e0
+def test t1 t1 @a:=1e0 @a:=1e0 5 3 1 N 36865 31 63
+@a:=1e0
1
DROP TABLE t1;
#
diff --git a/mysql-test/main/metadata.test b/mysql-test/main/metadata.test
index 96189a9750a..6a03bc81546 100644
--- a/mysql-test/main/metadata.test
+++ b/mysql-test/main/metadata.test
@@ -345,11 +345,11 @@ SELECT
--echo #
--enable_metadata
SET NAMES utf8;
-CREATE TABLE t1 AS SELECT @:=1e0;
+CREATE TABLE t1 AS SELECT @a:=1e0;
SELECT * FROM t1;
DROP TABLE t1;
SET NAMES latin1;
-CREATE TABLE t1 AS SELECT @:=1e0;
+CREATE TABLE t1 AS SELECT @a:=1e0;
SELECT * FROM t1;
DROP TABLE t1;
--disable_metadata
diff --git a/mysql-test/main/mysql.result b/mysql-test/main/mysql.result
index 5363bcd12b2..0b91b513b17 100644
--- a/mysql-test/main/mysql.result
+++ b/mysql-test/main/mysql.result
@@ -558,7 +558,9 @@ CREATE TABLE `a1\``b1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `a1\``b1` VALUES (1),(2);
+INSERT INTO `a1\``b1` VALUES
+(1),
+(2);
insert `a1\``b1` values (4),(5);
show create table `a1\``b1`;
Table Create Table
@@ -587,7 +589,9 @@ CREATE TABLE "a1\""b1" (
"a" int(11) DEFAULT NULL
);
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO "a1\""b1" VALUES (1),(2);
+INSERT INTO "a1\""b1" VALUES
+(1),
+(2);
insert "a1\""b1" values (4),(5);
show create table "a1\""b1";
Table Create Table
@@ -603,11 +607,11 @@ set sql_mode=default;
create table t1 (a text);
select count(*) from t1;
count(*)
-41
+43
truncate table t1;
select count(*) from t1;
count(*)
-41
+43
truncate table t1;
select count(*) from t1;
count(*)
@@ -619,7 +623,7 @@ count(*)
truncate table t1;
select count(*) from t1;
count(*)
-41
+43
truncate table t1;
select count(*) from t1;
count(*)
diff --git a/mysql-test/main/mysqld--help.result b/mysql-test/main/mysqld--help.result
index a3dac7fcfcb..f2ba6ac2d53 100644
--- a/mysql-test/main/mysqld--help.result
+++ b/mysql-test/main/mysqld--help.result
@@ -1713,7 +1713,7 @@ performance-schema-max-socket-classes 10
performance-schema-max-socket-instances -1
performance-schema-max-sql-text-length 1024
performance-schema-max-stage-classes 160
-performance-schema-max-statement-classes 222
+performance-schema-max-statement-classes 221
performance-schema-max-statement-stack 10
performance-schema-max-table-handles -1
performance-schema-max-table-instances -1
diff --git a/mysql-test/main/mysqld--help.test b/mysql-test/main/mysqld--help.test
index f918670d319..42f551974d9 100644
--- a/mysql-test/main/mysqld--help.test
+++ b/mysql-test/main/mysqld--help.test
@@ -27,16 +27,18 @@ perl;
large-files-support lower-case-file-system system-time-zone
collation-server character-set-server log-tc-size table-cache
table-open-cache table-open-cache-instances max-connections
- tls-version version.*/;
+ tls-version version.* password-reuse-check
+ password-reuse-check-interval/;
# Plugins which may or may not be there:
@plugins=qw/innodb archive blackhole federated partition s3
feedback debug temp-pool ssl des-key-file xtradb sequence
thread-concurrency super-large-pages mutex-deadlock-detector
connect null-audit aria oqgraph sphinx thread-handling
- test-sql-discovery query-cache-info
+ test-sql-discovery query-cache-info password-reuse-check
query-response-time metadata-lock-info locales unix-socket
wsrep file-key-management cracklib-password-check user-variables
+ provider-bzip2 provider-lzma provider-lzo
thread-pool-groups thread-pool-queues thread-pool-stats thread-pool-waits/;
# And substitute the content some environment variables with their
diff --git a/mysql-test/main/mysqldump-max.result b/mysql-test/main/mysqldump-max.result
index eb2cf2aec08..7dd1030eac1 100644
--- a/mysql-test/main/mysqldump-max.result
+++ b/mysql-test/main/mysqldump-max.result
@@ -102,7 +102,12 @@ CREATE TABLE `t1` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT DELAYED IGNORE INTO `t1` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value');
+INSERT DELAYED IGNORE INTO `t1` VALUES
+(1,'first value'),
+(2,'first value'),
+(3,'first value'),
+(4,'first value'),
+(5,'first value');
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
DROP TABLE IF EXISTS `t2`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
@@ -114,7 +119,12 @@ CREATE TABLE `t2` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t2` DISABLE KEYS */;
-INSERT DELAYED IGNORE INTO `t2` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value');
+INSERT DELAYED IGNORE INTO `t2` VALUES
+(1,'first value'),
+(2,'first value'),
+(3,'first value'),
+(4,'first value'),
+(5,'first value');
/*!40000 ALTER TABLE `t2` ENABLE KEYS */;
DROP TABLE IF EXISTS `t3`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
@@ -126,7 +136,12 @@ CREATE TABLE `t3` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t3` DISABLE KEYS */;
-INSERT DELAYED IGNORE INTO `t3` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value');
+INSERT DELAYED IGNORE INTO `t3` VALUES
+(1,'first value'),
+(2,'first value'),
+(3,'first value'),
+(4,'first value'),
+(5,'first value');
/*!40000 ALTER TABLE `t3` ENABLE KEYS */;
DROP TABLE IF EXISTS `t4`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
@@ -138,7 +153,12 @@ CREATE TABLE `t4` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t4` DISABLE KEYS */;
-INSERT DELAYED IGNORE INTO `t4` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value');
+INSERT DELAYED IGNORE INTO `t4` VALUES
+(1,'first value'),
+(2,'first value'),
+(3,'first value'),
+(4,'first value'),
+(5,'first value');
/*!40000 ALTER TABLE `t4` ENABLE KEYS */;
DROP TABLE IF EXISTS `t5`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
@@ -150,7 +170,12 @@ CREATE TABLE `t5` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t5` DISABLE KEYS */;
-INSERT DELAYED IGNORE INTO `t5` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value');
+INSERT DELAYED IGNORE INTO `t5` VALUES
+(1,'first value'),
+(2,'first value'),
+(3,'first value'),
+(4,'first value'),
+(5,'first value');
/*!40000 ALTER TABLE `t5` ENABLE KEYS */;
DROP TABLE IF EXISTS `t6`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
@@ -162,7 +187,12 @@ CREATE TABLE `t6` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t6` DISABLE KEYS */;
-INSERT IGNORE INTO `t6` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value');
+INSERT IGNORE INTO `t6` VALUES
+(1,'first value'),
+(2,'first value'),
+(3,'first value'),
+(4,'first value'),
+(5,'first value');
/*!40000 ALTER TABLE `t6` ENABLE KEYS */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -199,7 +229,12 @@ CREATE TABLE `t1` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT DELAYED INTO `t1` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value');
+INSERT DELAYED INTO `t1` VALUES
+(1,'first value'),
+(2,'first value'),
+(3,'first value'),
+(4,'first value'),
+(5,'first value');
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
DROP TABLE IF EXISTS `t2`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
@@ -211,7 +246,12 @@ CREATE TABLE `t2` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t2` DISABLE KEYS */;
-INSERT DELAYED INTO `t2` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value');
+INSERT DELAYED INTO `t2` VALUES
+(1,'first value'),
+(2,'first value'),
+(3,'first value'),
+(4,'first value'),
+(5,'first value');
/*!40000 ALTER TABLE `t2` ENABLE KEYS */;
DROP TABLE IF EXISTS `t3`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
@@ -223,7 +263,12 @@ CREATE TABLE `t3` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t3` DISABLE KEYS */;
-INSERT DELAYED INTO `t3` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value');
+INSERT DELAYED INTO `t3` VALUES
+(1,'first value'),
+(2,'first value'),
+(3,'first value'),
+(4,'first value'),
+(5,'first value');
/*!40000 ALTER TABLE `t3` ENABLE KEYS */;
DROP TABLE IF EXISTS `t4`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
@@ -235,7 +280,12 @@ CREATE TABLE `t4` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t4` DISABLE KEYS */;
-INSERT DELAYED INTO `t4` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value');
+INSERT DELAYED INTO `t4` VALUES
+(1,'first value'),
+(2,'first value'),
+(3,'first value'),
+(4,'first value'),
+(5,'first value');
/*!40000 ALTER TABLE `t4` ENABLE KEYS */;
DROP TABLE IF EXISTS `t5`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
@@ -247,7 +297,12 @@ CREATE TABLE `t5` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t5` DISABLE KEYS */;
-INSERT DELAYED INTO `t5` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value');
+INSERT DELAYED INTO `t5` VALUES
+(1,'first value'),
+(2,'first value'),
+(3,'first value'),
+(4,'first value'),
+(5,'first value');
/*!40000 ALTER TABLE `t5` ENABLE KEYS */;
DROP TABLE IF EXISTS `t6`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
@@ -259,7 +314,12 @@ CREATE TABLE `t6` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t6` DISABLE KEYS */;
-INSERT INTO `t6` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value');
+INSERT INTO `t6` VALUES
+(1,'first value'),
+(2,'first value'),
+(3,'first value'),
+(4,'first value'),
+(5,'first value');
/*!40000 ALTER TABLE `t6` ENABLE KEYS */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
diff --git a/mysql-test/main/mysqldump-system.result b/mysql-test/main/mysqldump-system.result
index 12b4c763f5d..bf2d60c698c 100644
--- a/mysql-test/main/mysqldump-system.result
+++ b/mysql-test/main/mysqldump-system.result
@@ -93,31 +93,39 @@ USE mysql;
LOCK TABLES `column_stats` WRITE;
/*!40000 ALTER TABLE `column_stats` DISABLE KEYS */;
-REPLACE INTO `column_stats` VALUES ('mysql','tz','Time_zone_id','1','5',0.0000,4.0000,98.2500,254,'DOUBLE_PREC_HB','\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿');
+REPLACE INTO `column_stats` VALUES
+('mysql','tz','Time_zone_id','1','5',0.0000,4.0000,98.2500,254,'DOUBLE_PREC_HB','\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿');
/*!40000 ALTER TABLE `column_stats` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `index_stats` WRITE;
/*!40000 ALTER TABLE `index_stats` DISABLE KEYS */;
-REPLACE INTO `index_stats` VALUES ('mysql','tz','PRIMARY',1,98.2500);
+REPLACE INTO `index_stats` VALUES
+('mysql','tz','PRIMARY',1,98.2500);
/*!40000 ALTER TABLE `index_stats` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `table_stats` WRITE;
/*!40000 ALTER TABLE `table_stats` DISABLE KEYS */;
-REPLACE INTO `table_stats` VALUES ('mysql','tz',393);
+REPLACE INTO `table_stats` VALUES
+('mysql','tz',393);
/*!40000 ALTER TABLE `table_stats` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `innodb_index_stats` WRITE;
/*!40000 ALTER TABLE `innodb_index_stats` DISABLE KEYS */;
-REPLACE INTO `innodb_index_stats` VALUES ('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx01',4,1,'Time_zone_id'),('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx02',393,1,'Time_zone_id,Transition_time'),('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('mysql','tz','PRIMARY','2019-12-31 21:00:00','size',1,NULL,'Number of pages in the index');
+REPLACE INTO `innodb_index_stats` VALUES
+('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx01',4,1,'Time_zone_id'),
+('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx02',393,1,'Time_zone_id,Transition_time'),
+('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),
+('mysql','tz','PRIMARY','2019-12-31 21:00:00','size',1,NULL,'Number of pages in the index');
/*!40000 ALTER TABLE `innodb_index_stats` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `innodb_table_stats` WRITE;
/*!40000 ALTER TABLE `innodb_table_stats` DISABLE KEYS */;
-REPLACE INTO `innodb_table_stats` VALUES ('mysql','tz','2019-12-31 21:00:00',393,1,0);
+REPLACE INTO `innodb_table_stats` VALUES
+('mysql','tz','2019-12-31 21:00:00',393,1,0);
/*!40000 ALTER TABLE `innodb_table_stats` ENABLE KEYS */;
UNLOCK TABLES;
@@ -125,31 +133,488 @@ USE mysql;
LOCK TABLES `time_zone` WRITE;
/*!40000 ALTER TABLE `time_zone` DISABLE KEYS */;
-REPLACE INTO `time_zone` VALUES (1,'N'),(2,'N'),(3,'N'),(4,'Y'),(5,'N');
+REPLACE INTO `time_zone` VALUES
+(1,'N'),
+(2,'N'),
+(3,'N'),
+(4,'Y'),
+(5,'N');
/*!40000 ALTER TABLE `time_zone` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `time_zone_name` WRITE;
/*!40000 ALTER TABLE `time_zone_name` DISABLE KEYS */;
-REPLACE INTO `time_zone_name` VALUES ('Europe/Moscow',3),('Japan',5),('leap/Europe/Moscow',4),('MET',1),('Universal',2),('UTC',2);
+REPLACE INTO `time_zone_name` VALUES
+('Europe/Moscow',3),
+('Japan',5),
+('leap/Europe/Moscow',4),
+('MET',1),
+('Universal',2),
+('UTC',2);
/*!40000 ALTER TABLE `time_zone_name` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `time_zone_leap_second` WRITE;
/*!40000 ALTER TABLE `time_zone_leap_second` DISABLE KEYS */;
-REPLACE INTO `time_zone_leap_second` VALUES (78796800,1),(94694401,2),(126230402,3),(157766403,4),(189302404,5),(220924805,6),(252460806,7),(283996807,8),(315532808,9),(362793609,10),(394329610,11),(425865611,12),(489024012,13),(567993613,14),(631152014,15),(662688015,16),(709948816,17),(741484817,18),(773020818,19),(820454419,20),(867715220,21),(915148821,22);
+REPLACE INTO `time_zone_leap_second` VALUES
+(78796800,1),
+(94694401,2),
+(126230402,3),
+(157766403,4),
+(189302404,5),
+(220924805,6),
+(252460806,7),
+(283996807,8),
+(315532808,9),
+(362793609,10),
+(394329610,11),
+(425865611,12),
+(489024012,13),
+(567993613,14),
+(631152014,15),
+(662688015,16),
+(709948816,17),
+(741484817,18),
+(773020818,19),
+(820454419,20),
+(867715220,21),
+(915148821,22);
/*!40000 ALTER TABLE `time_zone_leap_second` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `time_zone_transition` WRITE;
/*!40000 ALTER TABLE `time_zone_transition` DISABLE KEYS */;
-REPLACE INTO `time_zone_transition` VALUES (1,-1693706400,0),(1,-1680483600,1),(1,-1663455600,2),(1,-1650150000,3),(1,-1632006000,2),(1,-1618700400,3),(1,-938905200,2),(1,-857257200,3),(1,-844556400,2),(1,-828226800,3),(1,-812502000,2),(1,-796777200,3),(1,228877200,2),(1,243997200,3),(1,260326800,2),(1,276051600,3),(1,291776400,2),(1,307501200,3),(1,323830800,2),(1,338950800,3),(1,354675600,2),(1,370400400,3),(1,386125200,2),(1,401850000,3),(1,417574800,2),(1,433299600,3),(1,449024400,2),(1,465354000,3),(1,481078800,2),(1,496803600,3),(1,512528400,2),(1,528253200,3),(1,543978000,2),(1,559702800,3),(1,575427600,2),(1,591152400,3),(1,606877200,2),(1,622602000,3),(1,638326800,2),(1,654656400,3),(1,670381200,2),(1,686106000,3),(1,701830800,2),(1,717555600,3),(1,733280400,2),(1,749005200,3),(1,764730000,2),(1,780454800,3),(1,796179600,2),(1,811904400,3),(1,828234000,2),(1,846378000,3),(1,859683600,2),(1,877827600,3),(1,891133200,2),(1,909277200,3),(1,922582800,2),(1,941331600,3),(1,954032400,2),(1,972781200,3),(1,985482000,2),(1,1004230800,3),(1,1017536400,2),(1,1035680400,3),(1,1048986000,2),(1,1067130000,3),(1,1080435600,2),(1,1099184400,3),(1,1111885200,2),(1,1130634000,3),(1,1143334800,2),(1,1162083600,3),(1,1174784400,2),(1,1193533200,3),(1,1206838800,2),(1,1224982800,3),(1,1238288400,2),(1,1256432400,3),(1,1269738000,2),(1,1288486800,3),(1,1301187600,2),(1,1319936400,3),(1,1332637200,2),(1,1351386000,3),(1,1364691600,2),(1,1382835600,3),(1,1396141200,2),(1,1414285200,3),(1,1427590800,2),(1,1445734800,3),(1,1459040400,2),(1,1477789200,3),(1,1490490000,2),(1,1509238800,3),(1,1521939600,2),(1,1540688400,3),(1,1553994000,2),(1,1572138000,3),(1,1585443600,2),(1,1603587600,3),(1,1616893200,2),(1,1635642000,3),(1,1648342800,2),(1,1667091600,3),(1,1679792400,2),(1,1698541200,3),(1,1711846800,2),(1,1729990800,3),(1,1743296400,2),(1,1761440400,3),(1,1774746000,2),(1,1792890000,3),(1,1806195600,2),(1,1824944400,3),(1,1837645200,2),(1,1856394000,3),(1,1869094800,2),(1,1887843600,3),(1,1901149200,2),(1,1919293200,3),(1,1932598800,2),(1,1950742800,3),(1,1964048400,2),(1,1982797200,3),(1,1995498000,2),(1,2014246800,3),(1,2026947600,2),(1,2045696400,3),(1,2058397200,2),(1,2077146000,3),(1,2090451600,2),(1,2108595600,3),(1,2121901200,2),(1,2140045200,3),(3,-1688265000,2),(3,-1656819048,1),(3,-1641353448,2),(3,-1627965048,3),(3,-1618716648,1),(3,-1596429048,3),(3,-1593829848,5),(3,-1589860800,4),(3,-1542427200,5),(3,-1539493200,6),(3,-1525323600,5),(3,-1522728000,4),(3,-1491188400,7),(3,-1247536800,4),(3,354920400,5),(3,370728000,4),(3,386456400,5),(3,402264000,4),(3,417992400,5),(3,433800000,4),(3,449614800,5),(3,465346800,8),(3,481071600,9),(3,496796400,8),(3,512521200,9),(3,528246000,8),(3,543970800,9),(3,559695600,8),(3,575420400,9),(3,591145200,8),(3,606870000,9),(3,622594800,8),(3,638319600,9),(3,654649200,8),(3,670374000,10),(3,686102400,11),(3,695779200,8),(3,701812800,5),(3,717534000,4),(3,733273200,9),(3,748998000,8),(3,764722800,9),(3,780447600,8),(3,796172400,9),(3,811897200,8),(3,828226800,9),(3,846370800,8),(3,859676400,9),(3,877820400,8),(3,891126000,9),(3,909270000,8),(3,922575600,9),(3,941324400,8),(3,954025200,9),(3,972774000,8),(3,985474800,9),(3,1004223600,8),(3,1017529200,9),(3,1035673200,8),(3,1048978800,9),(3,1067122800,8),(3,1080428400,9),(3,1099177200,8),(3,1111878000,9),(3,1130626800,8),(3,1143327600,9),(3,1162076400,8),(3,1174777200,9),(3,1193526000,8),(3,1206831600,9),(3,1224975600,8),(3,1238281200,9),(3,1256425200,8),(3,1269730800,9),(3,1288479600,8),(3,1301180400,9),(3,1319929200,8),(3,1332630000,9),(3,1351378800,8),(3,1364684400,9),(3,1382828400,8),(3,1396134000,9),(3,1414278000,8),(3,1427583600,9),(3,1445727600,8),(3,1459033200,9),(3,1477782000,8),(3,1490482800,9),(3,1509231600,8),(3,1521932400,9),(3,1540681200,8),(3,1553986800,9),(3,1572130800,8),(3,1585436400,9),(3,1603580400,8),(3,1616886000,9),(3,1635634800,8),(3,1648335600,9),(3,1667084400,8),(3,1679785200,9),(3,1698534000,8),(3,1711839600,9),(3,1729983600,8),(3,1743289200,9),(3,1761433200,8),(3,1774738800,9),(3,1792882800,8),(3,1806188400,9),(3,1824937200,8),(3,1837638000,9),(3,1856386800,8),(3,1869087600,9),(3,1887836400,8),(3,1901142000,9),(3,1919286000,8),(3,1932591600,9),(3,1950735600,8),(3,1964041200,9),(3,1982790000,8),(3,1995490800,9),(3,2014239600,8),(3,2026940400,9),(3,2045689200,8),(3,2058390000,9),(3,2077138800,8),(3,2090444400,9),(3,2108588400,8),(3,2121894000,9),(3,2140038000,8),(4,-1688265000,2),(4,-1656819048,1),(4,-1641353448,2),(4,-1627965048,3),(4,-1618716648,1),(4,-1596429048,3),(4,-1593829848,5),(4,-1589860800,4),(4,-1542427200,5),(4,-1539493200,6),(4,-1525323600,5),(4,-1522728000,4),(4,-1491188400,7),(4,-1247536800,4),(4,354920409,5),(4,370728010,4),(4,386456410,5),(4,402264011,4),(4,417992411,5),(4,433800012,4),(4,449614812,5),(4,465346812,8),(4,481071612,9),(4,496796413,8),(4,512521213,9),(4,528246013,8),(4,543970813,9),(4,559695613,8),(4,575420414,9),(4,591145214,8),(4,606870014,9),(4,622594814,8),(4,638319615,9),(4,654649215,8),(4,670374016,10),(4,686102416,11),(4,695779216,8),(4,701812816,5),(4,717534017,4),(4,733273217,9),(4,748998018,8),(4,764722818,9),(4,780447619,8),(4,796172419,9),(4,811897219,8),(4,828226820,9),(4,846370820,8),(4,859676420,9),(4,877820421,8),(4,891126021,9),(4,909270021,8),(4,922575622,9),(4,941324422,8),(4,954025222,9),(4,972774022,8),(4,985474822,9),(4,1004223622,8),(4,1017529222,9),(4,1035673222,8),(4,1048978822,9),(4,1067122822,8),(4,1080428422,9),(4,1099177222,8),(4,1111878022,9),(4,1130626822,8),(4,1143327622,9),(4,1162076422,8),(4,1174777222,9),(4,1193526022,8),(4,1206831622,9),(4,1224975622,8),(4,1238281222,9),(4,1256425222,8),(4,1269730822,9),(4,1288479622,8),(4,1301180422,9),(4,1319929222,8),(4,1332630022,9),(4,1351378822,8),(4,1364684422,9),(4,1382828422,8),(4,1396134022,9),(4,1414278022,8),(4,1427583622,9),(4,1445727622,8),(4,1459033222,9),(4,1477782022,8),(4,1490482822,9),(4,1509231622,8),(4,1521932422,9),(4,1540681222,8),(4,1553986822,9),(4,1572130822,8),(4,1585436422,9),(4,1603580422,8),(4,1616886022,9),(4,1635634822,8),(4,1648335622,9),(4,1667084422,8),(4,1679785222,9),(4,1698534022,8),(4,1711839622,9),(4,1729983622,8),(4,1743289222,9),(4,1761433222,8),(4,1774738822,9),(4,1792882822,8),(4,1806188422,9),(4,1824937222,8),(4,1837638022,9),(4,1856386822,8),(4,1869087622,9),(4,1887836422,8),(4,1901142022,9),(4,1919286022,8),(4,1932591622,9),(4,1950735622,8),(4,1964041222,9),(4,1982790022,8),(4,1995490822,9),(4,2014239622,8),(4,2026940422,9),(4,2045689222,8),(4,2058390022,9),(4,2077138822,8),(4,2090444422,9),(4,2108588422,8),(4,2121894022,9),(4,2140038022,8),(5,-1009875600,1);
+REPLACE INTO `time_zone_transition` VALUES
+(1,-1693706400,0),
+(1,-1680483600,1),
+(1,-1663455600,2),
+(1,-1650150000,3),
+(1,-1632006000,2),
+(1,-1618700400,3),
+(1,-938905200,2),
+(1,-857257200,3),
+(1,-844556400,2),
+(1,-828226800,3),
+(1,-812502000,2),
+(1,-796777200,3),
+(1,228877200,2),
+(1,243997200,3),
+(1,260326800,2),
+(1,276051600,3),
+(1,291776400,2),
+(1,307501200,3),
+(1,323830800,2),
+(1,338950800,3),
+(1,354675600,2),
+(1,370400400,3),
+(1,386125200,2),
+(1,401850000,3),
+(1,417574800,2),
+(1,433299600,3),
+(1,449024400,2),
+(1,465354000,3),
+(1,481078800,2),
+(1,496803600,3),
+(1,512528400,2),
+(1,528253200,3),
+(1,543978000,2),
+(1,559702800,3),
+(1,575427600,2),
+(1,591152400,3),
+(1,606877200,2),
+(1,622602000,3),
+(1,638326800,2),
+(1,654656400,3),
+(1,670381200,2),
+(1,686106000,3),
+(1,701830800,2),
+(1,717555600,3),
+(1,733280400,2),
+(1,749005200,3),
+(1,764730000,2),
+(1,780454800,3),
+(1,796179600,2),
+(1,811904400,3),
+(1,828234000,2),
+(1,846378000,3),
+(1,859683600,2),
+(1,877827600,3),
+(1,891133200,2),
+(1,909277200,3),
+(1,922582800,2),
+(1,941331600,3),
+(1,954032400,2),
+(1,972781200,3),
+(1,985482000,2),
+(1,1004230800,3),
+(1,1017536400,2),
+(1,1035680400,3),
+(1,1048986000,2),
+(1,1067130000,3),
+(1,1080435600,2),
+(1,1099184400,3),
+(1,1111885200,2),
+(1,1130634000,3),
+(1,1143334800,2),
+(1,1162083600,3),
+(1,1174784400,2),
+(1,1193533200,3),
+(1,1206838800,2),
+(1,1224982800,3),
+(1,1238288400,2),
+(1,1256432400,3),
+(1,1269738000,2),
+(1,1288486800,3),
+(1,1301187600,2),
+(1,1319936400,3),
+(1,1332637200,2),
+(1,1351386000,3),
+(1,1364691600,2),
+(1,1382835600,3),
+(1,1396141200,2),
+(1,1414285200,3),
+(1,1427590800,2),
+(1,1445734800,3),
+(1,1459040400,2),
+(1,1477789200,3),
+(1,1490490000,2),
+(1,1509238800,3),
+(1,1521939600,2),
+(1,1540688400,3),
+(1,1553994000,2),
+(1,1572138000,3),
+(1,1585443600,2),
+(1,1603587600,3),
+(1,1616893200,2),
+(1,1635642000,3),
+(1,1648342800,2),
+(1,1667091600,3),
+(1,1679792400,2),
+(1,1698541200,3),
+(1,1711846800,2),
+(1,1729990800,3),
+(1,1743296400,2),
+(1,1761440400,3),
+(1,1774746000,2),
+(1,1792890000,3),
+(1,1806195600,2),
+(1,1824944400,3),
+(1,1837645200,2),
+(1,1856394000,3),
+(1,1869094800,2),
+(1,1887843600,3),
+(1,1901149200,2),
+(1,1919293200,3),
+(1,1932598800,2),
+(1,1950742800,3),
+(1,1964048400,2),
+(1,1982797200,3),
+(1,1995498000,2),
+(1,2014246800,3),
+(1,2026947600,2),
+(1,2045696400,3),
+(1,2058397200,2),
+(1,2077146000,3),
+(1,2090451600,2),
+(1,2108595600,3),
+(1,2121901200,2),
+(1,2140045200,3),
+(3,-1688265000,2),
+(3,-1656819048,1),
+(3,-1641353448,2),
+(3,-1627965048,3),
+(3,-1618716648,1),
+(3,-1596429048,3),
+(3,-1593829848,5),
+(3,-1589860800,4),
+(3,-1542427200,5),
+(3,-1539493200,6),
+(3,-1525323600,5),
+(3,-1522728000,4),
+(3,-1491188400,7),
+(3,-1247536800,4),
+(3,354920400,5),
+(3,370728000,4),
+(3,386456400,5),
+(3,402264000,4),
+(3,417992400,5),
+(3,433800000,4),
+(3,449614800,5),
+(3,465346800,8),
+(3,481071600,9),
+(3,496796400,8),
+(3,512521200,9),
+(3,528246000,8),
+(3,543970800,9),
+(3,559695600,8),
+(3,575420400,9),
+(3,591145200,8),
+(3,606870000,9),
+(3,622594800,8),
+(3,638319600,9),
+(3,654649200,8),
+(3,670374000,10),
+(3,686102400,11),
+(3,695779200,8),
+(3,701812800,5),
+(3,717534000,4),
+(3,733273200,9),
+(3,748998000,8),
+(3,764722800,9),
+(3,780447600,8),
+(3,796172400,9),
+(3,811897200,8),
+(3,828226800,9),
+(3,846370800,8),
+(3,859676400,9),
+(3,877820400,8),
+(3,891126000,9),
+(3,909270000,8),
+(3,922575600,9),
+(3,941324400,8),
+(3,954025200,9),
+(3,972774000,8),
+(3,985474800,9),
+(3,1004223600,8),
+(3,1017529200,9),
+(3,1035673200,8),
+(3,1048978800,9),
+(3,1067122800,8),
+(3,1080428400,9),
+(3,1099177200,8),
+(3,1111878000,9),
+(3,1130626800,8),
+(3,1143327600,9),
+(3,1162076400,8),
+(3,1174777200,9),
+(3,1193526000,8),
+(3,1206831600,9),
+(3,1224975600,8),
+(3,1238281200,9),
+(3,1256425200,8),
+(3,1269730800,9),
+(3,1288479600,8),
+(3,1301180400,9),
+(3,1319929200,8),
+(3,1332630000,9),
+(3,1351378800,8),
+(3,1364684400,9),
+(3,1382828400,8),
+(3,1396134000,9),
+(3,1414278000,8),
+(3,1427583600,9),
+(3,1445727600,8),
+(3,1459033200,9),
+(3,1477782000,8),
+(3,1490482800,9),
+(3,1509231600,8),
+(3,1521932400,9),
+(3,1540681200,8),
+(3,1553986800,9),
+(3,1572130800,8),
+(3,1585436400,9),
+(3,1603580400,8),
+(3,1616886000,9),
+(3,1635634800,8),
+(3,1648335600,9),
+(3,1667084400,8),
+(3,1679785200,9),
+(3,1698534000,8),
+(3,1711839600,9),
+(3,1729983600,8),
+(3,1743289200,9),
+(3,1761433200,8),
+(3,1774738800,9),
+(3,1792882800,8),
+(3,1806188400,9),
+(3,1824937200,8),
+(3,1837638000,9),
+(3,1856386800,8),
+(3,1869087600,9),
+(3,1887836400,8),
+(3,1901142000,9),
+(3,1919286000,8),
+(3,1932591600,9),
+(3,1950735600,8),
+(3,1964041200,9),
+(3,1982790000,8),
+(3,1995490800,9),
+(3,2014239600,8),
+(3,2026940400,9),
+(3,2045689200,8),
+(3,2058390000,9),
+(3,2077138800,8),
+(3,2090444400,9),
+(3,2108588400,8),
+(3,2121894000,9),
+(3,2140038000,8),
+(4,-1688265000,2),
+(4,-1656819048,1),
+(4,-1641353448,2),
+(4,-1627965048,3),
+(4,-1618716648,1),
+(4,-1596429048,3),
+(4,-1593829848,5),
+(4,-1589860800,4),
+(4,-1542427200,5),
+(4,-1539493200,6),
+(4,-1525323600,5),
+(4,-1522728000,4),
+(4,-1491188400,7),
+(4,-1247536800,4),
+(4,354920409,5),
+(4,370728010,4),
+(4,386456410,5),
+(4,402264011,4),
+(4,417992411,5),
+(4,433800012,4),
+(4,449614812,5),
+(4,465346812,8),
+(4,481071612,9),
+(4,496796413,8),
+(4,512521213,9),
+(4,528246013,8),
+(4,543970813,9),
+(4,559695613,8),
+(4,575420414,9),
+(4,591145214,8),
+(4,606870014,9),
+(4,622594814,8),
+(4,638319615,9),
+(4,654649215,8),
+(4,670374016,10),
+(4,686102416,11),
+(4,695779216,8),
+(4,701812816,5),
+(4,717534017,4),
+(4,733273217,9),
+(4,748998018,8),
+(4,764722818,9),
+(4,780447619,8),
+(4,796172419,9),
+(4,811897219,8),
+(4,828226820,9),
+(4,846370820,8),
+(4,859676420,9),
+(4,877820421,8),
+(4,891126021,9),
+(4,909270021,8),
+(4,922575622,9),
+(4,941324422,8),
+(4,954025222,9),
+(4,972774022,8),
+(4,985474822,9),
+(4,1004223622,8),
+(4,1017529222,9),
+(4,1035673222,8),
+(4,1048978822,9),
+(4,1067122822,8),
+(4,1080428422,9),
+(4,1099177222,8),
+(4,1111878022,9),
+(4,1130626822,8),
+(4,1143327622,9),
+(4,1162076422,8),
+(4,1174777222,9),
+(4,1193526022,8),
+(4,1206831622,9),
+(4,1224975622,8),
+(4,1238281222,9),
+(4,1256425222,8),
+(4,1269730822,9),
+(4,1288479622,8),
+(4,1301180422,9),
+(4,1319929222,8),
+(4,1332630022,9),
+(4,1351378822,8),
+(4,1364684422,9),
+(4,1382828422,8),
+(4,1396134022,9),
+(4,1414278022,8),
+(4,1427583622,9),
+(4,1445727622,8),
+(4,1459033222,9),
+(4,1477782022,8),
+(4,1490482822,9),
+(4,1509231622,8),
+(4,1521932422,9),
+(4,1540681222,8),
+(4,1553986822,9),
+(4,1572130822,8),
+(4,1585436422,9),
+(4,1603580422,8),
+(4,1616886022,9),
+(4,1635634822,8),
+(4,1648335622,9),
+(4,1667084422,8),
+(4,1679785222,9),
+(4,1698534022,8),
+(4,1711839622,9),
+(4,1729983622,8),
+(4,1743289222,9),
+(4,1761433222,8),
+(4,1774738822,9),
+(4,1792882822,8),
+(4,1806188422,9),
+(4,1824937222,8),
+(4,1837638022,9),
+(4,1856386822,8),
+(4,1869087622,9),
+(4,1887836422,8),
+(4,1901142022,9),
+(4,1919286022,8),
+(4,1932591622,9),
+(4,1950735622,8),
+(4,1964041222,9),
+(4,1982790022,8),
+(4,1995490822,9),
+(4,2014239622,8),
+(4,2026940422,9),
+(4,2045689222,8),
+(4,2058390022,9),
+(4,2077138822,8),
+(4,2090444422,9),
+(4,2108588422,8),
+(4,2121894022,9),
+(4,2140038022,8),
+(5,-1009875600,1);
/*!40000 ALTER TABLE `time_zone_transition` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `time_zone_transition_type` WRITE;
/*!40000 ALTER TABLE `time_zone_transition_type` DISABLE KEYS */;
-REPLACE INTO `time_zone_transition_type` VALUES (1,0,7200,1,'MEST'),(1,1,3600,0,'MET'),(1,2,7200,1,'MEST'),(1,3,3600,0,'MET'),(2,0,0,0,'UTC'),(3,0,9000,0,'MMT'),(3,1,12648,1,'MST'),(3,2,9048,0,'MMT'),(3,3,16248,1,'MDST'),(3,4,10800,0,'MSK'),(3,5,14400,1,'MSD'),(3,6,18000,1,'MSD'),(3,7,7200,0,'EET'),(3,8,10800,0,'MSK'),(3,9,14400,1,'MSD'),(3,10,10800,1,'EEST'),(3,11,7200,0,'EET'),(4,0,9000,0,'MMT'),(4,1,12648,1,'MST'),(4,2,9048,0,'MMT'),(4,3,16248,1,'MDST'),(4,4,10800,0,'MSK'),(4,5,14400,1,'MSD'),(4,6,18000,1,'MSD'),(4,7,7200,0,'EET'),(4,8,10800,0,'MSK'),(4,9,14400,1,'MSD'),(4,10,10800,1,'EEST'),(4,11,7200,0,'EET'),(5,0,32400,0,'CJT'),(5,1,32400,0,'JST');
+REPLACE INTO `time_zone_transition_type` VALUES
+(1,0,7200,1,'MEST'),
+(1,1,3600,0,'MET'),
+(1,2,7200,1,'MEST'),
+(1,3,3600,0,'MET'),
+(2,0,0,0,'UTC'),
+(3,0,9000,0,'MMT'),
+(3,1,12648,1,'MST'),
+(3,2,9048,0,'MMT'),
+(3,3,16248,1,'MDST'),
+(3,4,10800,0,'MSK'),
+(3,5,14400,1,'MSD'),
+(3,6,18000,1,'MSD'),
+(3,7,7200,0,'EET'),
+(3,8,10800,0,'MSK'),
+(3,9,14400,1,'MSD'),
+(3,10,10800,1,'EEST'),
+(3,11,7200,0,'EET'),
+(4,0,9000,0,'MMT'),
+(4,1,12648,1,'MST'),
+(4,2,9048,0,'MMT'),
+(4,3,16248,1,'MDST'),
+(4,4,10800,0,'MSK'),
+(4,5,14400,1,'MSD'),
+(4,6,18000,1,'MSD'),
+(4,7,7200,0,'EET'),
+(4,8,10800,0,'MSK'),
+(4,9,14400,1,'MSD'),
+(4,10,10800,1,'EEST'),
+(4,11,7200,0,'EET'),
+(5,0,32400,0,'CJT'),
+(5,1,32400,0,'JST');
/*!40000 ALTER TABLE `time_zone_transition_type` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -242,31 +707,39 @@ USE mysql;
LOCK TABLES `column_stats` WRITE;
/*!40000 ALTER TABLE `column_stats` DISABLE KEYS */;
-REPLACE INTO `column_stats` VALUES ('mysql','tz','Time_zone_id','1','5',0.0000,4.0000,98.2500,254,'DOUBLE_PREC_HB','\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿');
+REPLACE INTO `column_stats` VALUES
+('mysql','tz','Time_zone_id','1','5',0.0000,4.0000,98.2500,254,'DOUBLE_PREC_HB','\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿');
/*!40000 ALTER TABLE `column_stats` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `index_stats` WRITE;
/*!40000 ALTER TABLE `index_stats` DISABLE KEYS */;
-REPLACE INTO `index_stats` VALUES ('mysql','tz','PRIMARY',1,98.2500);
+REPLACE INTO `index_stats` VALUES
+('mysql','tz','PRIMARY',1,98.2500);
/*!40000 ALTER TABLE `index_stats` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `table_stats` WRITE;
/*!40000 ALTER TABLE `table_stats` DISABLE KEYS */;
-REPLACE INTO `table_stats` VALUES ('mysql','tz',393);
+REPLACE INTO `table_stats` VALUES
+('mysql','tz',393);
/*!40000 ALTER TABLE `table_stats` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `innodb_index_stats` WRITE;
/*!40000 ALTER TABLE `innodb_index_stats` DISABLE KEYS */;
-REPLACE INTO `innodb_index_stats` VALUES ('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx01',4,1,'Time_zone_id'),('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx02',393,1,'Time_zone_id,Transition_time'),('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('mysql','tz','PRIMARY','2019-12-31 21:00:00','size',1,NULL,'Number of pages in the index');
+REPLACE INTO `innodb_index_stats` VALUES
+('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx01',4,1,'Time_zone_id'),
+('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx02',393,1,'Time_zone_id,Transition_time'),
+('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),
+('mysql','tz','PRIMARY','2019-12-31 21:00:00','size',1,NULL,'Number of pages in the index');
/*!40000 ALTER TABLE `innodb_index_stats` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `innodb_table_stats` WRITE;
/*!40000 ALTER TABLE `innodb_table_stats` DISABLE KEYS */;
-REPLACE INTO `innodb_table_stats` VALUES ('mysql','tz','2019-12-31 21:00:00',393,1,0);
+REPLACE INTO `innodb_table_stats` VALUES
+('mysql','tz','2019-12-31 21:00:00',393,1,0);
/*!40000 ALTER TABLE `innodb_table_stats` ENABLE KEYS */;
UNLOCK TABLES;
@@ -274,31 +747,488 @@ USE mysql;
LOCK TABLES `time_zone` WRITE;
/*!40000 ALTER TABLE `time_zone` DISABLE KEYS */;
-REPLACE INTO `time_zone` VALUES (1,'N'),(2,'N'),(3,'N'),(4,'Y'),(5,'N');
+REPLACE INTO `time_zone` VALUES
+(1,'N'),
+(2,'N'),
+(3,'N'),
+(4,'Y'),
+(5,'N');
/*!40000 ALTER TABLE `time_zone` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `time_zone_name` WRITE;
/*!40000 ALTER TABLE `time_zone_name` DISABLE KEYS */;
-REPLACE INTO `time_zone_name` VALUES ('Europe/Moscow',3),('Japan',5),('leap/Europe/Moscow',4),('MET',1),('Universal',2),('UTC',2);
+REPLACE INTO `time_zone_name` VALUES
+('Europe/Moscow',3),
+('Japan',5),
+('leap/Europe/Moscow',4),
+('MET',1),
+('Universal',2),
+('UTC',2);
/*!40000 ALTER TABLE `time_zone_name` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `time_zone_leap_second` WRITE;
/*!40000 ALTER TABLE `time_zone_leap_second` DISABLE KEYS */;
-REPLACE INTO `time_zone_leap_second` VALUES (78796800,1),(94694401,2),(126230402,3),(157766403,4),(189302404,5),(220924805,6),(252460806,7),(283996807,8),(315532808,9),(362793609,10),(394329610,11),(425865611,12),(489024012,13),(567993613,14),(631152014,15),(662688015,16),(709948816,17),(741484817,18),(773020818,19),(820454419,20),(867715220,21),(915148821,22);
+REPLACE INTO `time_zone_leap_second` VALUES
+(78796800,1),
+(94694401,2),
+(126230402,3),
+(157766403,4),
+(189302404,5),
+(220924805,6),
+(252460806,7),
+(283996807,8),
+(315532808,9),
+(362793609,10),
+(394329610,11),
+(425865611,12),
+(489024012,13),
+(567993613,14),
+(631152014,15),
+(662688015,16),
+(709948816,17),
+(741484817,18),
+(773020818,19),
+(820454419,20),
+(867715220,21),
+(915148821,22);
/*!40000 ALTER TABLE `time_zone_leap_second` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `time_zone_transition` WRITE;
/*!40000 ALTER TABLE `time_zone_transition` DISABLE KEYS */;
-REPLACE INTO `time_zone_transition` VALUES (1,-1693706400,0),(1,-1680483600,1),(1,-1663455600,2),(1,-1650150000,3),(1,-1632006000,2),(1,-1618700400,3),(1,-938905200,2),(1,-857257200,3),(1,-844556400,2),(1,-828226800,3),(1,-812502000,2),(1,-796777200,3),(1,228877200,2),(1,243997200,3),(1,260326800,2),(1,276051600,3),(1,291776400,2),(1,307501200,3),(1,323830800,2),(1,338950800,3),(1,354675600,2),(1,370400400,3),(1,386125200,2),(1,401850000,3),(1,417574800,2),(1,433299600,3),(1,449024400,2),(1,465354000,3),(1,481078800,2),(1,496803600,3),(1,512528400,2),(1,528253200,3),(1,543978000,2),(1,559702800,3),(1,575427600,2),(1,591152400,3),(1,606877200,2),(1,622602000,3),(1,638326800,2),(1,654656400,3),(1,670381200,2),(1,686106000,3),(1,701830800,2),(1,717555600,3),(1,733280400,2),(1,749005200,3),(1,764730000,2),(1,780454800,3),(1,796179600,2),(1,811904400,3),(1,828234000,2),(1,846378000,3),(1,859683600,2),(1,877827600,3),(1,891133200,2),(1,909277200,3),(1,922582800,2),(1,941331600,3),(1,954032400,2),(1,972781200,3),(1,985482000,2),(1,1004230800,3),(1,1017536400,2),(1,1035680400,3),(1,1048986000,2),(1,1067130000,3),(1,1080435600,2),(1,1099184400,3),(1,1111885200,2),(1,1130634000,3),(1,1143334800,2),(1,1162083600,3),(1,1174784400,2),(1,1193533200,3),(1,1206838800,2),(1,1224982800,3),(1,1238288400,2),(1,1256432400,3),(1,1269738000,2),(1,1288486800,3),(1,1301187600,2),(1,1319936400,3),(1,1332637200,2),(1,1351386000,3),(1,1364691600,2),(1,1382835600,3),(1,1396141200,2),(1,1414285200,3),(1,1427590800,2),(1,1445734800,3),(1,1459040400,2),(1,1477789200,3),(1,1490490000,2),(1,1509238800,3),(1,1521939600,2),(1,1540688400,3),(1,1553994000,2),(1,1572138000,3),(1,1585443600,2),(1,1603587600,3),(1,1616893200,2),(1,1635642000,3),(1,1648342800,2),(1,1667091600,3),(1,1679792400,2),(1,1698541200,3),(1,1711846800,2),(1,1729990800,3),(1,1743296400,2),(1,1761440400,3),(1,1774746000,2),(1,1792890000,3),(1,1806195600,2),(1,1824944400,3),(1,1837645200,2),(1,1856394000,3),(1,1869094800,2),(1,1887843600,3),(1,1901149200,2),(1,1919293200,3),(1,1932598800,2),(1,1950742800,3),(1,1964048400,2),(1,1982797200,3),(1,1995498000,2),(1,2014246800,3),(1,2026947600,2),(1,2045696400,3),(1,2058397200,2),(1,2077146000,3),(1,2090451600,2),(1,2108595600,3),(1,2121901200,2),(1,2140045200,3),(3,-1688265000,2),(3,-1656819048,1),(3,-1641353448,2),(3,-1627965048,3),(3,-1618716648,1),(3,-1596429048,3),(3,-1593829848,5),(3,-1589860800,4),(3,-1542427200,5),(3,-1539493200,6),(3,-1525323600,5),(3,-1522728000,4),(3,-1491188400,7),(3,-1247536800,4),(3,354920400,5),(3,370728000,4),(3,386456400,5),(3,402264000,4),(3,417992400,5),(3,433800000,4),(3,449614800,5),(3,465346800,8),(3,481071600,9),(3,496796400,8),(3,512521200,9),(3,528246000,8),(3,543970800,9),(3,559695600,8),(3,575420400,9),(3,591145200,8),(3,606870000,9),(3,622594800,8),(3,638319600,9),(3,654649200,8),(3,670374000,10),(3,686102400,11),(3,695779200,8),(3,701812800,5),(3,717534000,4),(3,733273200,9),(3,748998000,8),(3,764722800,9),(3,780447600,8),(3,796172400,9),(3,811897200,8),(3,828226800,9),(3,846370800,8),(3,859676400,9),(3,877820400,8),(3,891126000,9),(3,909270000,8),(3,922575600,9),(3,941324400,8),(3,954025200,9),(3,972774000,8),(3,985474800,9),(3,1004223600,8),(3,1017529200,9),(3,1035673200,8),(3,1048978800,9),(3,1067122800,8),(3,1080428400,9),(3,1099177200,8),(3,1111878000,9),(3,1130626800,8),(3,1143327600,9),(3,1162076400,8),(3,1174777200,9),(3,1193526000,8),(3,1206831600,9),(3,1224975600,8),(3,1238281200,9),(3,1256425200,8),(3,1269730800,9),(3,1288479600,8),(3,1301180400,9),(3,1319929200,8),(3,1332630000,9),(3,1351378800,8),(3,1364684400,9),(3,1382828400,8),(3,1396134000,9),(3,1414278000,8),(3,1427583600,9),(3,1445727600,8),(3,1459033200,9),(3,1477782000,8),(3,1490482800,9),(3,1509231600,8),(3,1521932400,9),(3,1540681200,8),(3,1553986800,9),(3,1572130800,8),(3,1585436400,9),(3,1603580400,8),(3,1616886000,9),(3,1635634800,8),(3,1648335600,9),(3,1667084400,8),(3,1679785200,9),(3,1698534000,8),(3,1711839600,9),(3,1729983600,8),(3,1743289200,9),(3,1761433200,8),(3,1774738800,9),(3,1792882800,8),(3,1806188400,9),(3,1824937200,8),(3,1837638000,9),(3,1856386800,8),(3,1869087600,9),(3,1887836400,8),(3,1901142000,9),(3,1919286000,8),(3,1932591600,9),(3,1950735600,8),(3,1964041200,9),(3,1982790000,8),(3,1995490800,9),(3,2014239600,8),(3,2026940400,9),(3,2045689200,8),(3,2058390000,9),(3,2077138800,8),(3,2090444400,9),(3,2108588400,8),(3,2121894000,9),(3,2140038000,8),(4,-1688265000,2),(4,-1656819048,1),(4,-1641353448,2),(4,-1627965048,3),(4,-1618716648,1),(4,-1596429048,3),(4,-1593829848,5),(4,-1589860800,4),(4,-1542427200,5),(4,-1539493200,6),(4,-1525323600,5),(4,-1522728000,4),(4,-1491188400,7),(4,-1247536800,4),(4,354920409,5),(4,370728010,4),(4,386456410,5),(4,402264011,4),(4,417992411,5),(4,433800012,4),(4,449614812,5),(4,465346812,8),(4,481071612,9),(4,496796413,8),(4,512521213,9),(4,528246013,8),(4,543970813,9),(4,559695613,8),(4,575420414,9),(4,591145214,8),(4,606870014,9),(4,622594814,8),(4,638319615,9),(4,654649215,8),(4,670374016,10),(4,686102416,11),(4,695779216,8),(4,701812816,5),(4,717534017,4),(4,733273217,9),(4,748998018,8),(4,764722818,9),(4,780447619,8),(4,796172419,9),(4,811897219,8),(4,828226820,9),(4,846370820,8),(4,859676420,9),(4,877820421,8),(4,891126021,9),(4,909270021,8),(4,922575622,9),(4,941324422,8),(4,954025222,9),(4,972774022,8),(4,985474822,9),(4,1004223622,8),(4,1017529222,9),(4,1035673222,8),(4,1048978822,9),(4,1067122822,8),(4,1080428422,9),(4,1099177222,8),(4,1111878022,9),(4,1130626822,8),(4,1143327622,9),(4,1162076422,8),(4,1174777222,9),(4,1193526022,8),(4,1206831622,9),(4,1224975622,8),(4,1238281222,9),(4,1256425222,8),(4,1269730822,9),(4,1288479622,8),(4,1301180422,9),(4,1319929222,8),(4,1332630022,9),(4,1351378822,8),(4,1364684422,9),(4,1382828422,8),(4,1396134022,9),(4,1414278022,8),(4,1427583622,9),(4,1445727622,8),(4,1459033222,9),(4,1477782022,8),(4,1490482822,9),(4,1509231622,8),(4,1521932422,9),(4,1540681222,8),(4,1553986822,9),(4,1572130822,8),(4,1585436422,9),(4,1603580422,8),(4,1616886022,9),(4,1635634822,8),(4,1648335622,9),(4,1667084422,8),(4,1679785222,9),(4,1698534022,8),(4,1711839622,9),(4,1729983622,8),(4,1743289222,9),(4,1761433222,8),(4,1774738822,9),(4,1792882822,8),(4,1806188422,9),(4,1824937222,8),(4,1837638022,9),(4,1856386822,8),(4,1869087622,9),(4,1887836422,8),(4,1901142022,9),(4,1919286022,8),(4,1932591622,9),(4,1950735622,8),(4,1964041222,9),(4,1982790022,8),(4,1995490822,9),(4,2014239622,8),(4,2026940422,9),(4,2045689222,8),(4,2058390022,9),(4,2077138822,8),(4,2090444422,9),(4,2108588422,8),(4,2121894022,9),(4,2140038022,8),(5,-1009875600,1);
+REPLACE INTO `time_zone_transition` VALUES
+(1,-1693706400,0),
+(1,-1680483600,1),
+(1,-1663455600,2),
+(1,-1650150000,3),
+(1,-1632006000,2),
+(1,-1618700400,3),
+(1,-938905200,2),
+(1,-857257200,3),
+(1,-844556400,2),
+(1,-828226800,3),
+(1,-812502000,2),
+(1,-796777200,3),
+(1,228877200,2),
+(1,243997200,3),
+(1,260326800,2),
+(1,276051600,3),
+(1,291776400,2),
+(1,307501200,3),
+(1,323830800,2),
+(1,338950800,3),
+(1,354675600,2),
+(1,370400400,3),
+(1,386125200,2),
+(1,401850000,3),
+(1,417574800,2),
+(1,433299600,3),
+(1,449024400,2),
+(1,465354000,3),
+(1,481078800,2),
+(1,496803600,3),
+(1,512528400,2),
+(1,528253200,3),
+(1,543978000,2),
+(1,559702800,3),
+(1,575427600,2),
+(1,591152400,3),
+(1,606877200,2),
+(1,622602000,3),
+(1,638326800,2),
+(1,654656400,3),
+(1,670381200,2),
+(1,686106000,3),
+(1,701830800,2),
+(1,717555600,3),
+(1,733280400,2),
+(1,749005200,3),
+(1,764730000,2),
+(1,780454800,3),
+(1,796179600,2),
+(1,811904400,3),
+(1,828234000,2),
+(1,846378000,3),
+(1,859683600,2),
+(1,877827600,3),
+(1,891133200,2),
+(1,909277200,3),
+(1,922582800,2),
+(1,941331600,3),
+(1,954032400,2),
+(1,972781200,3),
+(1,985482000,2),
+(1,1004230800,3),
+(1,1017536400,2),
+(1,1035680400,3),
+(1,1048986000,2),
+(1,1067130000,3),
+(1,1080435600,2),
+(1,1099184400,3),
+(1,1111885200,2),
+(1,1130634000,3),
+(1,1143334800,2),
+(1,1162083600,3),
+(1,1174784400,2),
+(1,1193533200,3),
+(1,1206838800,2),
+(1,1224982800,3),
+(1,1238288400,2),
+(1,1256432400,3),
+(1,1269738000,2),
+(1,1288486800,3),
+(1,1301187600,2),
+(1,1319936400,3),
+(1,1332637200,2),
+(1,1351386000,3),
+(1,1364691600,2),
+(1,1382835600,3),
+(1,1396141200,2),
+(1,1414285200,3),
+(1,1427590800,2),
+(1,1445734800,3),
+(1,1459040400,2),
+(1,1477789200,3),
+(1,1490490000,2),
+(1,1509238800,3),
+(1,1521939600,2),
+(1,1540688400,3),
+(1,1553994000,2),
+(1,1572138000,3),
+(1,1585443600,2),
+(1,1603587600,3),
+(1,1616893200,2),
+(1,1635642000,3),
+(1,1648342800,2),
+(1,1667091600,3),
+(1,1679792400,2),
+(1,1698541200,3),
+(1,1711846800,2),
+(1,1729990800,3),
+(1,1743296400,2),
+(1,1761440400,3),
+(1,1774746000,2),
+(1,1792890000,3),
+(1,1806195600,2),
+(1,1824944400,3),
+(1,1837645200,2),
+(1,1856394000,3),
+(1,1869094800,2),
+(1,1887843600,3),
+(1,1901149200,2),
+(1,1919293200,3),
+(1,1932598800,2),
+(1,1950742800,3),
+(1,1964048400,2),
+(1,1982797200,3),
+(1,1995498000,2),
+(1,2014246800,3),
+(1,2026947600,2),
+(1,2045696400,3),
+(1,2058397200,2),
+(1,2077146000,3),
+(1,2090451600,2),
+(1,2108595600,3),
+(1,2121901200,2),
+(1,2140045200,3),
+(3,-1688265000,2),
+(3,-1656819048,1),
+(3,-1641353448,2),
+(3,-1627965048,3),
+(3,-1618716648,1),
+(3,-1596429048,3),
+(3,-1593829848,5),
+(3,-1589860800,4),
+(3,-1542427200,5),
+(3,-1539493200,6),
+(3,-1525323600,5),
+(3,-1522728000,4),
+(3,-1491188400,7),
+(3,-1247536800,4),
+(3,354920400,5),
+(3,370728000,4),
+(3,386456400,5),
+(3,402264000,4),
+(3,417992400,5),
+(3,433800000,4),
+(3,449614800,5),
+(3,465346800,8),
+(3,481071600,9),
+(3,496796400,8),
+(3,512521200,9),
+(3,528246000,8),
+(3,543970800,9),
+(3,559695600,8),
+(3,575420400,9),
+(3,591145200,8),
+(3,606870000,9),
+(3,622594800,8),
+(3,638319600,9),
+(3,654649200,8),
+(3,670374000,10),
+(3,686102400,11),
+(3,695779200,8),
+(3,701812800,5),
+(3,717534000,4),
+(3,733273200,9),
+(3,748998000,8),
+(3,764722800,9),
+(3,780447600,8),
+(3,796172400,9),
+(3,811897200,8),
+(3,828226800,9),
+(3,846370800,8),
+(3,859676400,9),
+(3,877820400,8),
+(3,891126000,9),
+(3,909270000,8),
+(3,922575600,9),
+(3,941324400,8),
+(3,954025200,9),
+(3,972774000,8),
+(3,985474800,9),
+(3,1004223600,8),
+(3,1017529200,9),
+(3,1035673200,8),
+(3,1048978800,9),
+(3,1067122800,8),
+(3,1080428400,9),
+(3,1099177200,8),
+(3,1111878000,9),
+(3,1130626800,8),
+(3,1143327600,9),
+(3,1162076400,8),
+(3,1174777200,9),
+(3,1193526000,8),
+(3,1206831600,9),
+(3,1224975600,8),
+(3,1238281200,9),
+(3,1256425200,8),
+(3,1269730800,9),
+(3,1288479600,8),
+(3,1301180400,9),
+(3,1319929200,8),
+(3,1332630000,9),
+(3,1351378800,8),
+(3,1364684400,9),
+(3,1382828400,8),
+(3,1396134000,9),
+(3,1414278000,8),
+(3,1427583600,9),
+(3,1445727600,8),
+(3,1459033200,9),
+(3,1477782000,8),
+(3,1490482800,9),
+(3,1509231600,8),
+(3,1521932400,9),
+(3,1540681200,8),
+(3,1553986800,9),
+(3,1572130800,8),
+(3,1585436400,9),
+(3,1603580400,8),
+(3,1616886000,9),
+(3,1635634800,8),
+(3,1648335600,9),
+(3,1667084400,8),
+(3,1679785200,9),
+(3,1698534000,8),
+(3,1711839600,9),
+(3,1729983600,8),
+(3,1743289200,9),
+(3,1761433200,8),
+(3,1774738800,9),
+(3,1792882800,8),
+(3,1806188400,9),
+(3,1824937200,8),
+(3,1837638000,9),
+(3,1856386800,8),
+(3,1869087600,9),
+(3,1887836400,8),
+(3,1901142000,9),
+(3,1919286000,8),
+(3,1932591600,9),
+(3,1950735600,8),
+(3,1964041200,9),
+(3,1982790000,8),
+(3,1995490800,9),
+(3,2014239600,8),
+(3,2026940400,9),
+(3,2045689200,8),
+(3,2058390000,9),
+(3,2077138800,8),
+(3,2090444400,9),
+(3,2108588400,8),
+(3,2121894000,9),
+(3,2140038000,8),
+(4,-1688265000,2),
+(4,-1656819048,1),
+(4,-1641353448,2),
+(4,-1627965048,3),
+(4,-1618716648,1),
+(4,-1596429048,3),
+(4,-1593829848,5),
+(4,-1589860800,4),
+(4,-1542427200,5),
+(4,-1539493200,6),
+(4,-1525323600,5),
+(4,-1522728000,4),
+(4,-1491188400,7),
+(4,-1247536800,4),
+(4,354920409,5),
+(4,370728010,4),
+(4,386456410,5),
+(4,402264011,4),
+(4,417992411,5),
+(4,433800012,4),
+(4,449614812,5),
+(4,465346812,8),
+(4,481071612,9),
+(4,496796413,8),
+(4,512521213,9),
+(4,528246013,8),
+(4,543970813,9),
+(4,559695613,8),
+(4,575420414,9),
+(4,591145214,8),
+(4,606870014,9),
+(4,622594814,8),
+(4,638319615,9),
+(4,654649215,8),
+(4,670374016,10),
+(4,686102416,11),
+(4,695779216,8),
+(4,701812816,5),
+(4,717534017,4),
+(4,733273217,9),
+(4,748998018,8),
+(4,764722818,9),
+(4,780447619,8),
+(4,796172419,9),
+(4,811897219,8),
+(4,828226820,9),
+(4,846370820,8),
+(4,859676420,9),
+(4,877820421,8),
+(4,891126021,9),
+(4,909270021,8),
+(4,922575622,9),
+(4,941324422,8),
+(4,954025222,9),
+(4,972774022,8),
+(4,985474822,9),
+(4,1004223622,8),
+(4,1017529222,9),
+(4,1035673222,8),
+(4,1048978822,9),
+(4,1067122822,8),
+(4,1080428422,9),
+(4,1099177222,8),
+(4,1111878022,9),
+(4,1130626822,8),
+(4,1143327622,9),
+(4,1162076422,8),
+(4,1174777222,9),
+(4,1193526022,8),
+(4,1206831622,9),
+(4,1224975622,8),
+(4,1238281222,9),
+(4,1256425222,8),
+(4,1269730822,9),
+(4,1288479622,8),
+(4,1301180422,9),
+(4,1319929222,8),
+(4,1332630022,9),
+(4,1351378822,8),
+(4,1364684422,9),
+(4,1382828422,8),
+(4,1396134022,9),
+(4,1414278022,8),
+(4,1427583622,9),
+(4,1445727622,8),
+(4,1459033222,9),
+(4,1477782022,8),
+(4,1490482822,9),
+(4,1509231622,8),
+(4,1521932422,9),
+(4,1540681222,8),
+(4,1553986822,9),
+(4,1572130822,8),
+(4,1585436422,9),
+(4,1603580422,8),
+(4,1616886022,9),
+(4,1635634822,8),
+(4,1648335622,9),
+(4,1667084422,8),
+(4,1679785222,9),
+(4,1698534022,8),
+(4,1711839622,9),
+(4,1729983622,8),
+(4,1743289222,9),
+(4,1761433222,8),
+(4,1774738822,9),
+(4,1792882822,8),
+(4,1806188422,9),
+(4,1824937222,8),
+(4,1837638022,9),
+(4,1856386822,8),
+(4,1869087622,9),
+(4,1887836422,8),
+(4,1901142022,9),
+(4,1919286022,8),
+(4,1932591622,9),
+(4,1950735622,8),
+(4,1964041222,9),
+(4,1982790022,8),
+(4,1995490822,9),
+(4,2014239622,8),
+(4,2026940422,9),
+(4,2045689222,8),
+(4,2058390022,9),
+(4,2077138822,8),
+(4,2090444422,9),
+(4,2108588422,8),
+(4,2121894022,9),
+(4,2140038022,8),
+(5,-1009875600,1);
/*!40000 ALTER TABLE `time_zone_transition` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `time_zone_transition_type` WRITE;
/*!40000 ALTER TABLE `time_zone_transition_type` DISABLE KEYS */;
-REPLACE INTO `time_zone_transition_type` VALUES (1,0,7200,1,'MEST'),(1,1,3600,0,'MET'),(1,2,7200,1,'MEST'),(1,3,3600,0,'MET'),(2,0,0,0,'UTC'),(3,0,9000,0,'MMT'),(3,1,12648,1,'MST'),(3,2,9048,0,'MMT'),(3,3,16248,1,'MDST'),(3,4,10800,0,'MSK'),(3,5,14400,1,'MSD'),(3,6,18000,1,'MSD'),(3,7,7200,0,'EET'),(3,8,10800,0,'MSK'),(3,9,14400,1,'MSD'),(3,10,10800,1,'EEST'),(3,11,7200,0,'EET'),(4,0,9000,0,'MMT'),(4,1,12648,1,'MST'),(4,2,9048,0,'MMT'),(4,3,16248,1,'MDST'),(4,4,10800,0,'MSK'),(4,5,14400,1,'MSD'),(4,6,18000,1,'MSD'),(4,7,7200,0,'EET'),(4,8,10800,0,'MSK'),(4,9,14400,1,'MSD'),(4,10,10800,1,'EEST'),(4,11,7200,0,'EET'),(5,0,32400,0,'CJT'),(5,1,32400,0,'JST');
+REPLACE INTO `time_zone_transition_type` VALUES
+(1,0,7200,1,'MEST'),
+(1,1,3600,0,'MET'),
+(1,2,7200,1,'MEST'),
+(1,3,3600,0,'MET'),
+(2,0,0,0,'UTC'),
+(3,0,9000,0,'MMT'),
+(3,1,12648,1,'MST'),
+(3,2,9048,0,'MMT'),
+(3,3,16248,1,'MDST'),
+(3,4,10800,0,'MSK'),
+(3,5,14400,1,'MSD'),
+(3,6,18000,1,'MSD'),
+(3,7,7200,0,'EET'),
+(3,8,10800,0,'MSK'),
+(3,9,14400,1,'MSD'),
+(3,10,10800,1,'EEST'),
+(3,11,7200,0,'EET'),
+(4,0,9000,0,'MMT'),
+(4,1,12648,1,'MST'),
+(4,2,9048,0,'MMT'),
+(4,3,16248,1,'MDST'),
+(4,4,10800,0,'MSK'),
+(4,5,14400,1,'MSD'),
+(4,6,18000,1,'MSD'),
+(4,7,7200,0,'EET'),
+(4,8,10800,0,'MSK'),
+(4,9,14400,1,'MSD'),
+(4,10,10800,1,'EEST'),
+(4,11,7200,0,'EET'),
+(5,0,32400,0,'CJT'),
+(5,1,32400,0,'JST');
/*!40000 ALTER TABLE `time_zone_transition_type` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -368,31 +1298,39 @@ USE mysql;
LOCK TABLES `column_stats` WRITE;
/*!40000 ALTER TABLE `column_stats` DISABLE KEYS */;
-INSERT IGNORE INTO `column_stats` VALUES ('mysql','tz','Time_zone_id','1','5',0.0000,4.0000,98.2500,254,'DOUBLE_PREC_HB','\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿');
+INSERT IGNORE INTO `column_stats` VALUES
+('mysql','tz','Time_zone_id','1','5',0.0000,4.0000,98.2500,254,'DOUBLE_PREC_HB','\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿ÿ¿');
/*!40000 ALTER TABLE `column_stats` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `index_stats` WRITE;
/*!40000 ALTER TABLE `index_stats` DISABLE KEYS */;
-INSERT IGNORE INTO `index_stats` VALUES ('mysql','tz','PRIMARY',1,98.2500);
+INSERT IGNORE INTO `index_stats` VALUES
+('mysql','tz','PRIMARY',1,98.2500);
/*!40000 ALTER TABLE `index_stats` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `table_stats` WRITE;
/*!40000 ALTER TABLE `table_stats` DISABLE KEYS */;
-INSERT IGNORE INTO `table_stats` VALUES ('mysql','tz',393);
+INSERT IGNORE INTO `table_stats` VALUES
+('mysql','tz',393);
/*!40000 ALTER TABLE `table_stats` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `innodb_index_stats` WRITE;
/*!40000 ALTER TABLE `innodb_index_stats` DISABLE KEYS */;
-INSERT IGNORE INTO `innodb_index_stats` VALUES ('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx01',4,1,'Time_zone_id'),('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx02',393,1,'Time_zone_id,Transition_time'),('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('mysql','tz','PRIMARY','2019-12-31 21:00:00','size',1,NULL,'Number of pages in the index');
+INSERT IGNORE INTO `innodb_index_stats` VALUES
+('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx01',4,1,'Time_zone_id'),
+('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx02',393,1,'Time_zone_id,Transition_time'),
+('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),
+('mysql','tz','PRIMARY','2019-12-31 21:00:00','size',1,NULL,'Number of pages in the index');
/*!40000 ALTER TABLE `innodb_index_stats` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `innodb_table_stats` WRITE;
/*!40000 ALTER TABLE `innodb_table_stats` DISABLE KEYS */;
-INSERT IGNORE INTO `innodb_table_stats` VALUES ('mysql','tz','2019-12-31 21:00:00',393,1,0);
+INSERT IGNORE INTO `innodb_table_stats` VALUES
+('mysql','tz','2019-12-31 21:00:00',393,1,0);
/*!40000 ALTER TABLE `innodb_table_stats` ENABLE KEYS */;
UNLOCK TABLES;
@@ -400,31 +1338,488 @@ USE mysql;
LOCK TABLES `time_zone` WRITE;
/*!40000 ALTER TABLE `time_zone` DISABLE KEYS */;
-INSERT IGNORE INTO `time_zone` VALUES (1,'N'),(2,'N'),(3,'N'),(4,'Y'),(5,'N');
+INSERT IGNORE INTO `time_zone` VALUES
+(1,'N'),
+(2,'N'),
+(3,'N'),
+(4,'Y'),
+(5,'N');
/*!40000 ALTER TABLE `time_zone` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `time_zone_name` WRITE;
/*!40000 ALTER TABLE `time_zone_name` DISABLE KEYS */;
-INSERT IGNORE INTO `time_zone_name` VALUES ('Europe/Moscow',3),('Japan',5),('leap/Europe/Moscow',4),('MET',1),('Universal',2),('UTC',2);
+INSERT IGNORE INTO `time_zone_name` VALUES
+('Europe/Moscow',3),
+('Japan',5),
+('leap/Europe/Moscow',4),
+('MET',1),
+('Universal',2),
+('UTC',2);
/*!40000 ALTER TABLE `time_zone_name` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `time_zone_leap_second` WRITE;
/*!40000 ALTER TABLE `time_zone_leap_second` DISABLE KEYS */;
-INSERT IGNORE INTO `time_zone_leap_second` VALUES (78796800,1),(94694401,2),(126230402,3),(157766403,4),(189302404,5),(220924805,6),(252460806,7),(283996807,8),(315532808,9),(362793609,10),(394329610,11),(425865611,12),(489024012,13),(567993613,14),(631152014,15),(662688015,16),(709948816,17),(741484817,18),(773020818,19),(820454419,20),(867715220,21),(915148821,22);
+INSERT IGNORE INTO `time_zone_leap_second` VALUES
+(78796800,1),
+(94694401,2),
+(126230402,3),
+(157766403,4),
+(189302404,5),
+(220924805,6),
+(252460806,7),
+(283996807,8),
+(315532808,9),
+(362793609,10),
+(394329610,11),
+(425865611,12),
+(489024012,13),
+(567993613,14),
+(631152014,15),
+(662688015,16),
+(709948816,17),
+(741484817,18),
+(773020818,19),
+(820454419,20),
+(867715220,21),
+(915148821,22);
/*!40000 ALTER TABLE `time_zone_leap_second` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `time_zone_transition` WRITE;
/*!40000 ALTER TABLE `time_zone_transition` DISABLE KEYS */;
-INSERT IGNORE INTO `time_zone_transition` VALUES (1,-1693706400,0),(1,-1680483600,1),(1,-1663455600,2),(1,-1650150000,3),(1,-1632006000,2),(1,-1618700400,3),(1,-938905200,2),(1,-857257200,3),(1,-844556400,2),(1,-828226800,3),(1,-812502000,2),(1,-796777200,3),(1,228877200,2),(1,243997200,3),(1,260326800,2),(1,276051600,3),(1,291776400,2),(1,307501200,3),(1,323830800,2),(1,338950800,3),(1,354675600,2),(1,370400400,3),(1,386125200,2),(1,401850000,3),(1,417574800,2),(1,433299600,3),(1,449024400,2),(1,465354000,3),(1,481078800,2),(1,496803600,3),(1,512528400,2),(1,528253200,3),(1,543978000,2),(1,559702800,3),(1,575427600,2),(1,591152400,3),(1,606877200,2),(1,622602000,3),(1,638326800,2),(1,654656400,3),(1,670381200,2),(1,686106000,3),(1,701830800,2),(1,717555600,3),(1,733280400,2),(1,749005200,3),(1,764730000,2),(1,780454800,3),(1,796179600,2),(1,811904400,3),(1,828234000,2),(1,846378000,3),(1,859683600,2),(1,877827600,3),(1,891133200,2),(1,909277200,3),(1,922582800,2),(1,941331600,3),(1,954032400,2),(1,972781200,3),(1,985482000,2),(1,1004230800,3),(1,1017536400,2),(1,1035680400,3),(1,1048986000,2),(1,1067130000,3),(1,1080435600,2),(1,1099184400,3),(1,1111885200,2),(1,1130634000,3),(1,1143334800,2),(1,1162083600,3),(1,1174784400,2),(1,1193533200,3),(1,1206838800,2),(1,1224982800,3),(1,1238288400,2),(1,1256432400,3),(1,1269738000,2),(1,1288486800,3),(1,1301187600,2),(1,1319936400,3),(1,1332637200,2),(1,1351386000,3),(1,1364691600,2),(1,1382835600,3),(1,1396141200,2),(1,1414285200,3),(1,1427590800,2),(1,1445734800,3),(1,1459040400,2),(1,1477789200,3),(1,1490490000,2),(1,1509238800,3),(1,1521939600,2),(1,1540688400,3),(1,1553994000,2),(1,1572138000,3),(1,1585443600,2),(1,1603587600,3),(1,1616893200,2),(1,1635642000,3),(1,1648342800,2),(1,1667091600,3),(1,1679792400,2),(1,1698541200,3),(1,1711846800,2),(1,1729990800,3),(1,1743296400,2),(1,1761440400,3),(1,1774746000,2),(1,1792890000,3),(1,1806195600,2),(1,1824944400,3),(1,1837645200,2),(1,1856394000,3),(1,1869094800,2),(1,1887843600,3),(1,1901149200,2),(1,1919293200,3),(1,1932598800,2),(1,1950742800,3),(1,1964048400,2),(1,1982797200,3),(1,1995498000,2),(1,2014246800,3),(1,2026947600,2),(1,2045696400,3),(1,2058397200,2),(1,2077146000,3),(1,2090451600,2),(1,2108595600,3),(1,2121901200,2),(1,2140045200,3),(3,-1688265000,2),(3,-1656819048,1),(3,-1641353448,2),(3,-1627965048,3),(3,-1618716648,1),(3,-1596429048,3),(3,-1593829848,5),(3,-1589860800,4),(3,-1542427200,5),(3,-1539493200,6),(3,-1525323600,5),(3,-1522728000,4),(3,-1491188400,7),(3,-1247536800,4),(3,354920400,5),(3,370728000,4),(3,386456400,5),(3,402264000,4),(3,417992400,5),(3,433800000,4),(3,449614800,5),(3,465346800,8),(3,481071600,9),(3,496796400,8),(3,512521200,9),(3,528246000,8),(3,543970800,9),(3,559695600,8),(3,575420400,9),(3,591145200,8),(3,606870000,9),(3,622594800,8),(3,638319600,9),(3,654649200,8),(3,670374000,10),(3,686102400,11),(3,695779200,8),(3,701812800,5),(3,717534000,4),(3,733273200,9),(3,748998000,8),(3,764722800,9),(3,780447600,8),(3,796172400,9),(3,811897200,8),(3,828226800,9),(3,846370800,8),(3,859676400,9),(3,877820400,8),(3,891126000,9),(3,909270000,8),(3,922575600,9),(3,941324400,8),(3,954025200,9),(3,972774000,8),(3,985474800,9),(3,1004223600,8),(3,1017529200,9),(3,1035673200,8),(3,1048978800,9),(3,1067122800,8),(3,1080428400,9),(3,1099177200,8),(3,1111878000,9),(3,1130626800,8),(3,1143327600,9),(3,1162076400,8),(3,1174777200,9),(3,1193526000,8),(3,1206831600,9),(3,1224975600,8),(3,1238281200,9),(3,1256425200,8),(3,1269730800,9),(3,1288479600,8),(3,1301180400,9),(3,1319929200,8),(3,1332630000,9),(3,1351378800,8),(3,1364684400,9),(3,1382828400,8),(3,1396134000,9),(3,1414278000,8),(3,1427583600,9),(3,1445727600,8),(3,1459033200,9),(3,1477782000,8),(3,1490482800,9),(3,1509231600,8),(3,1521932400,9),(3,1540681200,8),(3,1553986800,9),(3,1572130800,8),(3,1585436400,9),(3,1603580400,8),(3,1616886000,9),(3,1635634800,8),(3,1648335600,9),(3,1667084400,8),(3,1679785200,9),(3,1698534000,8),(3,1711839600,9),(3,1729983600,8),(3,1743289200,9),(3,1761433200,8),(3,1774738800,9),(3,1792882800,8),(3,1806188400,9),(3,1824937200,8),(3,1837638000,9),(3,1856386800,8),(3,1869087600,9),(3,1887836400,8),(3,1901142000,9),(3,1919286000,8),(3,1932591600,9),(3,1950735600,8),(3,1964041200,9),(3,1982790000,8),(3,1995490800,9),(3,2014239600,8),(3,2026940400,9),(3,2045689200,8),(3,2058390000,9),(3,2077138800,8),(3,2090444400,9),(3,2108588400,8),(3,2121894000,9),(3,2140038000,8),(4,-1688265000,2),(4,-1656819048,1),(4,-1641353448,2),(4,-1627965048,3),(4,-1618716648,1),(4,-1596429048,3),(4,-1593829848,5),(4,-1589860800,4),(4,-1542427200,5),(4,-1539493200,6),(4,-1525323600,5),(4,-1522728000,4),(4,-1491188400,7),(4,-1247536800,4),(4,354920409,5),(4,370728010,4),(4,386456410,5),(4,402264011,4),(4,417992411,5),(4,433800012,4),(4,449614812,5),(4,465346812,8),(4,481071612,9),(4,496796413,8),(4,512521213,9),(4,528246013,8),(4,543970813,9),(4,559695613,8),(4,575420414,9),(4,591145214,8),(4,606870014,9),(4,622594814,8),(4,638319615,9),(4,654649215,8),(4,670374016,10),(4,686102416,11),(4,695779216,8),(4,701812816,5),(4,717534017,4),(4,733273217,9),(4,748998018,8),(4,764722818,9),(4,780447619,8),(4,796172419,9),(4,811897219,8),(4,828226820,9),(4,846370820,8),(4,859676420,9),(4,877820421,8),(4,891126021,9),(4,909270021,8),(4,922575622,9),(4,941324422,8),(4,954025222,9),(4,972774022,8),(4,985474822,9),(4,1004223622,8),(4,1017529222,9),(4,1035673222,8),(4,1048978822,9),(4,1067122822,8),(4,1080428422,9),(4,1099177222,8),(4,1111878022,9),(4,1130626822,8),(4,1143327622,9),(4,1162076422,8),(4,1174777222,9),(4,1193526022,8),(4,1206831622,9),(4,1224975622,8),(4,1238281222,9),(4,1256425222,8),(4,1269730822,9),(4,1288479622,8),(4,1301180422,9),(4,1319929222,8),(4,1332630022,9),(4,1351378822,8),(4,1364684422,9),(4,1382828422,8),(4,1396134022,9),(4,1414278022,8),(4,1427583622,9),(4,1445727622,8),(4,1459033222,9),(4,1477782022,8),(4,1490482822,9),(4,1509231622,8),(4,1521932422,9),(4,1540681222,8),(4,1553986822,9),(4,1572130822,8),(4,1585436422,9),(4,1603580422,8),(4,1616886022,9),(4,1635634822,8),(4,1648335622,9),(4,1667084422,8),(4,1679785222,9),(4,1698534022,8),(4,1711839622,9),(4,1729983622,8),(4,1743289222,9),(4,1761433222,8),(4,1774738822,9),(4,1792882822,8),(4,1806188422,9),(4,1824937222,8),(4,1837638022,9),(4,1856386822,8),(4,1869087622,9),(4,1887836422,8),(4,1901142022,9),(4,1919286022,8),(4,1932591622,9),(4,1950735622,8),(4,1964041222,9),(4,1982790022,8),(4,1995490822,9),(4,2014239622,8),(4,2026940422,9),(4,2045689222,8),(4,2058390022,9),(4,2077138822,8),(4,2090444422,9),(4,2108588422,8),(4,2121894022,9),(4,2140038022,8),(5,-1009875600,1);
+INSERT IGNORE INTO `time_zone_transition` VALUES
+(1,-1693706400,0),
+(1,-1680483600,1),
+(1,-1663455600,2),
+(1,-1650150000,3),
+(1,-1632006000,2),
+(1,-1618700400,3),
+(1,-938905200,2),
+(1,-857257200,3),
+(1,-844556400,2),
+(1,-828226800,3),
+(1,-812502000,2),
+(1,-796777200,3),
+(1,228877200,2),
+(1,243997200,3),
+(1,260326800,2),
+(1,276051600,3),
+(1,291776400,2),
+(1,307501200,3),
+(1,323830800,2),
+(1,338950800,3),
+(1,354675600,2),
+(1,370400400,3),
+(1,386125200,2),
+(1,401850000,3),
+(1,417574800,2),
+(1,433299600,3),
+(1,449024400,2),
+(1,465354000,3),
+(1,481078800,2),
+(1,496803600,3),
+(1,512528400,2),
+(1,528253200,3),
+(1,543978000,2),
+(1,559702800,3),
+(1,575427600,2),
+(1,591152400,3),
+(1,606877200,2),
+(1,622602000,3),
+(1,638326800,2),
+(1,654656400,3),
+(1,670381200,2),
+(1,686106000,3),
+(1,701830800,2),
+(1,717555600,3),
+(1,733280400,2),
+(1,749005200,3),
+(1,764730000,2),
+(1,780454800,3),
+(1,796179600,2),
+(1,811904400,3),
+(1,828234000,2),
+(1,846378000,3),
+(1,859683600,2),
+(1,877827600,3),
+(1,891133200,2),
+(1,909277200,3),
+(1,922582800,2),
+(1,941331600,3),
+(1,954032400,2),
+(1,972781200,3),
+(1,985482000,2),
+(1,1004230800,3),
+(1,1017536400,2),
+(1,1035680400,3),
+(1,1048986000,2),
+(1,1067130000,3),
+(1,1080435600,2),
+(1,1099184400,3),
+(1,1111885200,2),
+(1,1130634000,3),
+(1,1143334800,2),
+(1,1162083600,3),
+(1,1174784400,2),
+(1,1193533200,3),
+(1,1206838800,2),
+(1,1224982800,3),
+(1,1238288400,2),
+(1,1256432400,3),
+(1,1269738000,2),
+(1,1288486800,3),
+(1,1301187600,2),
+(1,1319936400,3),
+(1,1332637200,2),
+(1,1351386000,3),
+(1,1364691600,2),
+(1,1382835600,3),
+(1,1396141200,2),
+(1,1414285200,3),
+(1,1427590800,2),
+(1,1445734800,3),
+(1,1459040400,2),
+(1,1477789200,3),
+(1,1490490000,2),
+(1,1509238800,3),
+(1,1521939600,2),
+(1,1540688400,3),
+(1,1553994000,2),
+(1,1572138000,3),
+(1,1585443600,2),
+(1,1603587600,3),
+(1,1616893200,2),
+(1,1635642000,3),
+(1,1648342800,2),
+(1,1667091600,3),
+(1,1679792400,2),
+(1,1698541200,3),
+(1,1711846800,2),
+(1,1729990800,3),
+(1,1743296400,2),
+(1,1761440400,3),
+(1,1774746000,2),
+(1,1792890000,3),
+(1,1806195600,2),
+(1,1824944400,3),
+(1,1837645200,2),
+(1,1856394000,3),
+(1,1869094800,2),
+(1,1887843600,3),
+(1,1901149200,2),
+(1,1919293200,3),
+(1,1932598800,2),
+(1,1950742800,3),
+(1,1964048400,2),
+(1,1982797200,3),
+(1,1995498000,2),
+(1,2014246800,3),
+(1,2026947600,2),
+(1,2045696400,3),
+(1,2058397200,2),
+(1,2077146000,3),
+(1,2090451600,2),
+(1,2108595600,3),
+(1,2121901200,2),
+(1,2140045200,3),
+(3,-1688265000,2),
+(3,-1656819048,1),
+(3,-1641353448,2),
+(3,-1627965048,3),
+(3,-1618716648,1),
+(3,-1596429048,3),
+(3,-1593829848,5),
+(3,-1589860800,4),
+(3,-1542427200,5),
+(3,-1539493200,6),
+(3,-1525323600,5),
+(3,-1522728000,4),
+(3,-1491188400,7),
+(3,-1247536800,4),
+(3,354920400,5),
+(3,370728000,4),
+(3,386456400,5),
+(3,402264000,4),
+(3,417992400,5),
+(3,433800000,4),
+(3,449614800,5),
+(3,465346800,8),
+(3,481071600,9),
+(3,496796400,8),
+(3,512521200,9),
+(3,528246000,8),
+(3,543970800,9),
+(3,559695600,8),
+(3,575420400,9),
+(3,591145200,8),
+(3,606870000,9),
+(3,622594800,8),
+(3,638319600,9),
+(3,654649200,8),
+(3,670374000,10),
+(3,686102400,11),
+(3,695779200,8),
+(3,701812800,5),
+(3,717534000,4),
+(3,733273200,9),
+(3,748998000,8),
+(3,764722800,9),
+(3,780447600,8),
+(3,796172400,9),
+(3,811897200,8),
+(3,828226800,9),
+(3,846370800,8),
+(3,859676400,9),
+(3,877820400,8),
+(3,891126000,9),
+(3,909270000,8),
+(3,922575600,9),
+(3,941324400,8),
+(3,954025200,9),
+(3,972774000,8),
+(3,985474800,9),
+(3,1004223600,8),
+(3,1017529200,9),
+(3,1035673200,8),
+(3,1048978800,9),
+(3,1067122800,8),
+(3,1080428400,9),
+(3,1099177200,8),
+(3,1111878000,9),
+(3,1130626800,8),
+(3,1143327600,9),
+(3,1162076400,8),
+(3,1174777200,9),
+(3,1193526000,8),
+(3,1206831600,9),
+(3,1224975600,8),
+(3,1238281200,9),
+(3,1256425200,8),
+(3,1269730800,9),
+(3,1288479600,8),
+(3,1301180400,9),
+(3,1319929200,8),
+(3,1332630000,9),
+(3,1351378800,8),
+(3,1364684400,9),
+(3,1382828400,8),
+(3,1396134000,9),
+(3,1414278000,8),
+(3,1427583600,9),
+(3,1445727600,8),
+(3,1459033200,9),
+(3,1477782000,8),
+(3,1490482800,9),
+(3,1509231600,8),
+(3,1521932400,9),
+(3,1540681200,8),
+(3,1553986800,9),
+(3,1572130800,8),
+(3,1585436400,9),
+(3,1603580400,8),
+(3,1616886000,9),
+(3,1635634800,8),
+(3,1648335600,9),
+(3,1667084400,8),
+(3,1679785200,9),
+(3,1698534000,8),
+(3,1711839600,9),
+(3,1729983600,8),
+(3,1743289200,9),
+(3,1761433200,8),
+(3,1774738800,9),
+(3,1792882800,8),
+(3,1806188400,9),
+(3,1824937200,8),
+(3,1837638000,9),
+(3,1856386800,8),
+(3,1869087600,9),
+(3,1887836400,8),
+(3,1901142000,9),
+(3,1919286000,8),
+(3,1932591600,9),
+(3,1950735600,8),
+(3,1964041200,9),
+(3,1982790000,8),
+(3,1995490800,9),
+(3,2014239600,8),
+(3,2026940400,9),
+(3,2045689200,8),
+(3,2058390000,9),
+(3,2077138800,8),
+(3,2090444400,9),
+(3,2108588400,8),
+(3,2121894000,9),
+(3,2140038000,8),
+(4,-1688265000,2),
+(4,-1656819048,1),
+(4,-1641353448,2),
+(4,-1627965048,3),
+(4,-1618716648,1),
+(4,-1596429048,3),
+(4,-1593829848,5),
+(4,-1589860800,4),
+(4,-1542427200,5),
+(4,-1539493200,6),
+(4,-1525323600,5),
+(4,-1522728000,4),
+(4,-1491188400,7),
+(4,-1247536800,4),
+(4,354920409,5),
+(4,370728010,4),
+(4,386456410,5),
+(4,402264011,4),
+(4,417992411,5),
+(4,433800012,4),
+(4,449614812,5),
+(4,465346812,8),
+(4,481071612,9),
+(4,496796413,8),
+(4,512521213,9),
+(4,528246013,8),
+(4,543970813,9),
+(4,559695613,8),
+(4,575420414,9),
+(4,591145214,8),
+(4,606870014,9),
+(4,622594814,8),
+(4,638319615,9),
+(4,654649215,8),
+(4,670374016,10),
+(4,686102416,11),
+(4,695779216,8),
+(4,701812816,5),
+(4,717534017,4),
+(4,733273217,9),
+(4,748998018,8),
+(4,764722818,9),
+(4,780447619,8),
+(4,796172419,9),
+(4,811897219,8),
+(4,828226820,9),
+(4,846370820,8),
+(4,859676420,9),
+(4,877820421,8),
+(4,891126021,9),
+(4,909270021,8),
+(4,922575622,9),
+(4,941324422,8),
+(4,954025222,9),
+(4,972774022,8),
+(4,985474822,9),
+(4,1004223622,8),
+(4,1017529222,9),
+(4,1035673222,8),
+(4,1048978822,9),
+(4,1067122822,8),
+(4,1080428422,9),
+(4,1099177222,8),
+(4,1111878022,9),
+(4,1130626822,8),
+(4,1143327622,9),
+(4,1162076422,8),
+(4,1174777222,9),
+(4,1193526022,8),
+(4,1206831622,9),
+(4,1224975622,8),
+(4,1238281222,9),
+(4,1256425222,8),
+(4,1269730822,9),
+(4,1288479622,8),
+(4,1301180422,9),
+(4,1319929222,8),
+(4,1332630022,9),
+(4,1351378822,8),
+(4,1364684422,9),
+(4,1382828422,8),
+(4,1396134022,9),
+(4,1414278022,8),
+(4,1427583622,9),
+(4,1445727622,8),
+(4,1459033222,9),
+(4,1477782022,8),
+(4,1490482822,9),
+(4,1509231622,8),
+(4,1521932422,9),
+(4,1540681222,8),
+(4,1553986822,9),
+(4,1572130822,8),
+(4,1585436422,9),
+(4,1603580422,8),
+(4,1616886022,9),
+(4,1635634822,8),
+(4,1648335622,9),
+(4,1667084422,8),
+(4,1679785222,9),
+(4,1698534022,8),
+(4,1711839622,9),
+(4,1729983622,8),
+(4,1743289222,9),
+(4,1761433222,8),
+(4,1774738822,9),
+(4,1792882822,8),
+(4,1806188422,9),
+(4,1824937222,8),
+(4,1837638022,9),
+(4,1856386822,8),
+(4,1869087622,9),
+(4,1887836422,8),
+(4,1901142022,9),
+(4,1919286022,8),
+(4,1932591622,9),
+(4,1950735622,8),
+(4,1964041222,9),
+(4,1982790022,8),
+(4,1995490822,9),
+(4,2014239622,8),
+(4,2026940422,9),
+(4,2045689222,8),
+(4,2058390022,9),
+(4,2077138822,8),
+(4,2090444422,9),
+(4,2108588422,8),
+(4,2121894022,9),
+(4,2140038022,8),
+(5,-1009875600,1);
/*!40000 ALTER TABLE `time_zone_transition` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `time_zone_transition_type` WRITE;
/*!40000 ALTER TABLE `time_zone_transition_type` DISABLE KEYS */;
-INSERT IGNORE INTO `time_zone_transition_type` VALUES (1,0,7200,1,'MEST'),(1,1,3600,0,'MET'),(1,2,7200,1,'MEST'),(1,3,3600,0,'MET'),(2,0,0,0,'UTC'),(3,0,9000,0,'MMT'),(3,1,12648,1,'MST'),(3,2,9048,0,'MMT'),(3,3,16248,1,'MDST'),(3,4,10800,0,'MSK'),(3,5,14400,1,'MSD'),(3,6,18000,1,'MSD'),(3,7,7200,0,'EET'),(3,8,10800,0,'MSK'),(3,9,14400,1,'MSD'),(3,10,10800,1,'EEST'),(3,11,7200,0,'EET'),(4,0,9000,0,'MMT'),(4,1,12648,1,'MST'),(4,2,9048,0,'MMT'),(4,3,16248,1,'MDST'),(4,4,10800,0,'MSK'),(4,5,14400,1,'MSD'),(4,6,18000,1,'MSD'),(4,7,7200,0,'EET'),(4,8,10800,0,'MSK'),(4,9,14400,1,'MSD'),(4,10,10800,1,'EEST'),(4,11,7200,0,'EET'),(5,0,32400,0,'CJT'),(5,1,32400,0,'JST');
+INSERT IGNORE INTO `time_zone_transition_type` VALUES
+(1,0,7200,1,'MEST'),
+(1,1,3600,0,'MET'),
+(1,2,7200,1,'MEST'),
+(1,3,3600,0,'MET'),
+(2,0,0,0,'UTC'),
+(3,0,9000,0,'MMT'),
+(3,1,12648,1,'MST'),
+(3,2,9048,0,'MMT'),
+(3,3,16248,1,'MDST'),
+(3,4,10800,0,'MSK'),
+(3,5,14400,1,'MSD'),
+(3,6,18000,1,'MSD'),
+(3,7,7200,0,'EET'),
+(3,8,10800,0,'MSK'),
+(3,9,14400,1,'MSD'),
+(3,10,10800,1,'EEST'),
+(3,11,7200,0,'EET'),
+(4,0,9000,0,'MMT'),
+(4,1,12648,1,'MST'),
+(4,2,9048,0,'MMT'),
+(4,3,16248,1,'MDST'),
+(4,4,10800,0,'MSK'),
+(4,5,14400,1,'MSD'),
+(4,6,18000,1,'MSD'),
+(4,7,7200,0,'EET'),
+(4,8,10800,0,'MSK'),
+(4,9,14400,1,'MSD'),
+(4,10,10800,1,'EEST'),
+(4,11,7200,0,'EET'),
+(5,0,32400,0,'CJT'),
+(5,1,32400,0,'JST');
/*!40000 ALTER TABLE `time_zone_transition_type` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
diff --git a/mysql-test/main/mysqldump-timing.result b/mysql-test/main/mysqldump-timing.result
index fe44a1eadd4..7fa11893274 100644
--- a/mysql-test/main/mysqldump-timing.result
+++ b/mysql-test/main/mysqldump-timing.result
@@ -51,7 +51,8 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES (0);
+INSERT INTO `t1` VALUES
+(0);
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
diff --git a/mysql-test/main/mysqldump-utf8mb4.result b/mysql-test/main/mysqldump-utf8mb4.result
index 50c23c5efa9..904771302f8 100644
--- a/mysql-test/main/mysqldump-utf8mb4.result
+++ b/mysql-test/main/mysqldump-utf8mb4.result
@@ -56,7 +56,8 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES ('01f300','🌀','U+1F300 CYCLONE');
+INSERT INTO `t1` VALUES
+('01f300','🌀','U+1F300 CYCLONE');
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
diff --git a/mysql-test/main/mysqldump.result b/mysql-test/main/mysqldump.result
index f42551b7006..53ff0e6c8ff 100644
--- a/mysql-test/main/mysqldump.result
+++ b/mysql-test/main/mysqldump.result
@@ -37,7 +37,9 @@ CREATE TABLE `t1` (
`a` decimal(64,20) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t1` VALUES (1234567890123456789012345678901234567890.00000000000000000000),(987654321098765432109876543210987654321.00000000000000000000);
+INSERT INTO `t1` VALUES
+(1234567890123456789012345678901234567890.00000000000000000000),
+(987654321098765432109876543210987654321.00000000000000000000);
DROP TABLE t1;
#
# Bug#2055 mysqldump should replace "-inf" numeric field values with "NULL"
@@ -52,7 +54,8 @@ CREATE TABLE `t1` (
`a` double DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t1` VALUES (-1.7976931348623157e308);
+INSERT INTO `t1` VALUES
+(-1.7976931348623157e308);
DROP TABLE t1;
#
# Bug#3361 mysqldump quotes DECIMAL values inconsistently
@@ -74,7 +77,12 @@ CREATE TABLE `t1` (
`b` float DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t1` VALUES (1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456);
+INSERT INTO `t1` VALUES
+(1.23450,2.3456),
+(1.23450,2.3456),
+(1.23450,2.3456),
+(1.23450,2.3456),
+(1.23450,2.3456);
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
@@ -82,7 +90,12 @@ CREATE TABLE `t1` (
`b` float DEFAULT NULL
);
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t1` VALUES (1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456);
+INSERT INTO `t1` VALUES
+(1.23450,2.3456),
+(1.23450,2.3456),
+(1.23450,2.3456),
+(1.23450,2.3456),
+(1.23450,2.3456);
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -105,7 +118,12 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES (1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456);
+INSERT INTO `t1` VALUES
+(1.23450,2.3456),
+(1.23450,2.3456),
+(1.23450,2.3456),
+(1.23450,2.3456),
+(1.23450,2.3456);
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -132,7 +150,12 @@ CREATE TABLE `t1` (
);
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t1` VALUES (1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456);
+INSERT INTO `t1` VALUES
+(1.23450,2.3456),
+(1.23450,2.3456),
+(1.23450,2.3456),
+(1.23450,2.3456),
+(1.23450,2.3456);
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
@@ -248,7 +271,9 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES (1),(2);
+INSERT INTO `t1` VALUES
+(1),
+(2);
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -271,7 +296,9 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES (1),(2);
+INSERT INTO `t1` VALUES
+(1),
+(2);
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -534,7 +561,8 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES ('ÄÖÜß');
+INSERT INTO `t1` VALUES
+('ÄÖÜß');
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -567,7 +595,8 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES ('Ž™šá');
+INSERT INTO `t1` VALUES
+('Ž™šá');
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -590,7 +619,8 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES ('Ž™šá');
+INSERT INTO `t1` VALUES
+('Ž™šá');
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -613,7 +643,8 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES ('ÄÖÜß');
+INSERT INTO `t1` VALUES
+('ÄÖÜß');
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -652,7 +683,10 @@ CREATE TABLE `t2` (
LOCK TABLES `t2` WRITE;
/*!40000 ALTER TABLE `t2` DISABLE KEYS */;
-INSERT INTO `t2` VALUES (4),(5),(6);
+INSERT INTO `t2` VALUES
+(4),
+(5),
+(6);
/*!40000 ALTER TABLE `t2` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -734,7 +768,13 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT IGNORE INTO `t1` VALUES (1),(2),(3),(4),(5),(6);
+INSERT IGNORE INTO `t1` VALUES
+(1),
+(2),
+(3),
+(4),
+(5),
+(6);
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -767,7 +807,13 @@ CREATE TABLE `t1` (
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT DELAYED IGNORE INTO `t1` VALUES (1),(2),(3),(4),(5),(6);
+INSERT DELAYED IGNORE INTO `t1` VALUES
+(1),
+(2),
+(3),
+(4),
+(5),
+(6);
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -1512,7 +1558,10 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES (1),(2),(3);
+INSERT INTO `t1` VALUES
+(1),
+(2),
+(3);
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -1731,13 +1780,20 @@ insert into t2 (a, b) values (NULL, NULL),(10, NULL),(NULL, "twenty"),(30, "thir
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES (NULL),(10),(20);
+INSERT INTO `t1` VALUES
+(NULL),
+(10),
+(20);
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
LOCK TABLES `t2` WRITE;
/*!40000 ALTER TABLE `t2` DISABLE KEYS */;
-INSERT INTO `t2` VALUES (1,NULL,NULL,NULL,NULL,NULL),(2,10,NULL,NULL,NULL,NULL),(3,NULL,'twenty',NULL,NULL,NULL),(4,30,'thirty',NULL,NULL,NULL);
+INSERT INTO `t2` VALUES
+(1,NULL,NULL,NULL,NULL,NULL),
+(2,10,NULL,NULL,NULL,NULL),
+(3,NULL,'twenty',NULL,NULL,NULL),
+(4,30,'thirty',NULL,NULL,NULL);
/*!40000 ALTER TABLE `t2` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -1770,7 +1826,10 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES (NULL),(10),(20);
+INSERT INTO `t1` VALUES
+(NULL),
+(10),
+(20);
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `t2`;
@@ -1789,7 +1848,11 @@ CREATE TABLE `t2` (
LOCK TABLES `t2` WRITE;
/*!40000 ALTER TABLE `t2` DISABLE KEYS */;
-INSERT INTO `t2` VALUES (1,NULL,NULL,NULL,NULL,NULL),(2,10,NULL,NULL,NULL,NULL),(3,NULL,'twenty',NULL,NULL,NULL),(4,30,'thirty',NULL,NULL,NULL);
+INSERT INTO `t2` VALUES
+(1,NULL,NULL,NULL,NULL,NULL),
+(2,10,NULL,NULL,NULL,NULL),
+(3,NULL,'twenty',NULL,NULL,NULL),
+(4,30,'thirty',NULL,NULL,NULL);
/*!40000 ALTER TABLE `t2` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -1976,7 +2039,8 @@ CREATE TABLE "t1" (
LOCK TABLES "t1" WRITE;
/*!40000 ALTER TABLE "t1" DISABLE KEYS */;
-INSERT INTO "t1" VALUES (815,4711,2006);
+INSERT INTO "t1" VALUES
+(815,4711,2006);
/*!40000 ALTER TABLE "t1" ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -2010,7 +2074,8 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES (815,4711,2006);
+INSERT INTO `t1` VALUES
+(815,4711,2006);
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -2062,7 +2127,12 @@ CREATE TABLE `t2` (
LOCK TABLES `t2` WRITE;
/*!40000 ALTER TABLE `t2` DISABLE KEYS */;
-INSERT INTO `t2` VALUES ('alfred'),('angie'),('bingo'),('waffle'),('lemon');
+INSERT INTO `t2` VALUES
+('alfred'),
+('angie'),
+('bingo'),
+('waffle'),
+('lemon');
/*!40000 ALTER TABLE `t2` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `v2`;
@@ -2226,7 +2296,12 @@ CREATE TABLE `t2` (
LOCK TABLES `t2` WRITE;
/*!40000 ALTER TABLE `t2` DISABLE KEYS */;
-INSERT INTO `t2` VALUES ('alfred'),('angie'),('bingo'),('waffle'),('lemon');
+INSERT INTO `t2` VALUES
+('alfred'),
+('angie'),
+('bingo'),
+('waffle'),
+('lemon');
/*!40000 ALTER TABLE `t2` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `v2`;
@@ -2290,7 +2365,8 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES ('\'');
+INSERT INTO `t1` VALUES
+('\'');
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -2338,7 +2414,10 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES (1,2,'one'),(2,4,'two'),(3,6,'three');
+INSERT INTO `t1` VALUES
+(1,2,'one'),
+(2,4,'two'),
+(3,6,'three');
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `v1`;
@@ -2490,7 +2569,11 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES (1,NULL),(2,NULL),(4,NULL),(11,NULL);
+INSERT INTO `t1` VALUES
+(1,NULL),
+(2,NULL),
+(4,NULL),
+(11,NULL);
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
@@ -2619,7 +2702,11 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES (1,NULL),(2,NULL),(4,NULL),(11,NULL);
+INSERT INTO `t1` VALUES
+(1,NULL),
+(2,NULL),
+(4,NULL),
+(11,NULL);
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `t2`;
@@ -2765,7 +2852,12 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES (1),(2),(3),(4),(5);
+INSERT INTO `t1` VALUES
+(1),
+(2),
+(3),
+(4),
+(5);
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
@@ -2917,7 +3009,9 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES ('2003-10-25 22:00:00'),('2003-10-25 23:00:00');
+INSERT INTO `t1` VALUES
+('2003-10-25 22:00:00'),
+('2003-10-25 23:00:00');
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -2954,7 +3048,9 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES ('2003-10-26 02:00:00'),('2003-10-26 02:00:00');
+INSERT INTO `t1` VALUES
+('2003-10-26 02:00:00'),
+('2003-10-26 02:00:00');
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
@@ -3006,7 +3102,10 @@ CREATE TABLE "t1 test" (
LOCK TABLES "t1 test" WRITE;
/*!40000 ALTER TABLE "t1 test" DISABLE KEYS */;
-INSERT INTO "t1 test" VALUES (1),(2),(3);
+INSERT INTO "t1 test" VALUES
+(1),
+(2),
+(3);
/*!40000 ALTER TABLE "t1 test" ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
@@ -3035,7 +3134,10 @@ CREATE TABLE "t2 test" (
LOCK TABLES "t2 test" WRITE;
/*!40000 ALTER TABLE "t2 test" DISABLE KEYS */;
-INSERT INTO "t2 test" VALUES (1),(2),(3);
+INSERT INTO "t2 test" VALUES
+(1),
+(2),
+(3);
/*!40000 ALTER TABLE "t2 test" ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -3091,7 +3193,10 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES (1,'first value','xxxx'),(2,'second value','tttt'),(3,'third value','vvv vvv');
+INSERT INTO `t1` VALUES
+(1,'first value','xxxx'),
+(2,'second value','tttt'),
+(3,'third value','vvv vvv');
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `v0`;
@@ -3309,7 +3414,8 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES (0x00,'');
+INSERT INTO `t1` VALUES
+(0x00,'');
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -3489,7 +3595,11 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES (1232131),(4711),(3231),(815);
+INSERT INTO `t1` VALUES
+(1232131),
+(4711),
+(3231),
+(815);
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `v1`;
@@ -3874,7 +3984,8 @@ CREATE TABLE `t1` (
`c2` longblob DEFAULT NULL
);
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t1` VALUES (11,0x7171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171);
+INSERT INTO `t1` VALUES
+(11,0x7171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171);
DROP TABLE t1;
#
# Bug#28524 mysqldump --skip-add-drop-table is not
@@ -4106,7 +4217,11 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-REPLACE INTO `t1` VALUES (1,1),(2,3),(3,4),(4,5);
+REPLACE INTO `t1` VALUES
+(1,1),
+(2,3),
+(3,4),
+(4,5);
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -4381,7 +4496,11 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES (1232131),(4711),(3231),(815);
+INSERT INTO `t1` VALUES
+(1232131),
+(4711),
+(3231),
+(815);
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `v1`;
@@ -5476,7 +5595,9 @@ CREATE TABLE `basetable` (
`id` smallint(6) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `basetable` VALUES (5),(6);
+INSERT INTO `basetable` VALUES
+(5),
+(6);
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `nonunique_table_name` (
@@ -5499,14 +5620,18 @@ CREATE TABLE `nonunique_table_name` (
UNIQUE KEY `i1` (`i1`)
) ENGINE=MEMORY AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `nonunique_table_name` VALUES (1),(2);
+INSERT INTO `nonunique_table_name` VALUES
+(1),
+(2);
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `nonunique_table_view_name` (
`i2` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `nonunique_table_view_name` VALUES (3),(4);
+INSERT INTO `nonunique_table_view_name` VALUES
+(3),
+(4);
USE `db1`;
/*!50001 DROP VIEW IF EXISTS `nonunique_table_view_name`*/;
@@ -5535,14 +5660,18 @@ CREATE TABLE `nonunique_table_name` (
UNIQUE KEY `i1` (`i1`)
) ENGINE=MEMORY AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `nonunique_table_name` VALUES (1),(2);
+INSERT INTO `nonunique_table_name` VALUES
+(1),
+(2);
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `nonunique_table_view_name` (
`i2` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `nonunique_table_view_name` VALUES (3),(4);
+INSERT INTO `nonunique_table_view_name` VALUES
+(3),
+(4);
##################################################
# --compact --delayed-insert --no-data-med=0 --databases db2 db1
@@ -5557,14 +5686,18 @@ CREATE TABLE `nonunique_table_name` (
UNIQUE KEY `i1` (`i1`)
) ENGINE=MEMORY AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT DELAYED INTO `nonunique_table_name` VALUES (1),(2);
+INSERT DELAYED INTO `nonunique_table_name` VALUES
+(1),
+(2);
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `nonunique_table_view_name` (
`i2` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `nonunique_table_view_name` VALUES (3),(4);
+INSERT INTO `nonunique_table_view_name` VALUES
+(3),
+(4);
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `db1` /*!40100 DEFAULT CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci */;
@@ -5575,14 +5708,18 @@ CREATE TABLE `basetable` (
`id` smallint(6) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT DELAYED INTO `basetable` VALUES (5),(6);
+INSERT DELAYED INTO `basetable` VALUES
+(5),
+(6);
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `nonunique_table_name` (
`i3` smallint(6) DEFAULT NULL
) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci INSERT_METHOD=LAST UNION=(`basetable`);
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `nonunique_table_name` VALUES (5),(6);
+INSERT INTO `nonunique_table_name` VALUES
+(5),
+(6);
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE VIEW `nonunique_table_view_name` AS SELECT
@@ -6048,7 +6185,8 @@ CREATE TABLE `t1` (
`b` int(11) INVISIBLE DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t1` (`a`, `b`) VALUES (1,NULL),(1,2);
+INSERT INTO `t1` (`a`, `b`) VALUES (1,NULL),
+(1,2);
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t2` (
@@ -6056,7 +6194,9 @@ CREATE TABLE `t2` (
`b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t2` VALUES (1,2),(1,2);
+INSERT INTO `t2` VALUES
+(1,2),
+(1,2);
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t3` (
@@ -6065,14 +6205,18 @@ CREATE TABLE `t3` (
`ds=~!@ \# $% ^ & * ( ) _ - = +` int(11) INVISIBLE DEFAULT 5
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t3` (`invisible`, `a b c & $!@#$%^&*( )`, `ds=~!@ \# $% ^ & * ( ) _ - = +`) VALUES (1,4,5),(5,4,5),(2,4,5),(1,2,3);
+INSERT INTO `t3` (`invisible`, `a b c & $!@#$%^&*( )`, `ds=~!@ \# $% ^ & * ( ) _ - = +`) VALUES (1,4,5),
+(5,4,5),
+(2,4,5),
+(1,2,3);
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t4` (
`ËÃÃŒÃÎËÃ1` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t4` VALUES (1);
+INSERT INTO `t4` VALUES
+(1);
#Check side effect on --complete insert
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
@@ -6081,7 +6225,8 @@ CREATE TABLE `t1` (
`b` int(11) INVISIBLE DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t1` (`a`, `b`) VALUES (1,NULL),(1,2);
+INSERT INTO `t1` (`a`, `b`) VALUES (1,NULL),
+(1,2);
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t2` (
@@ -6089,7 +6234,8 @@ CREATE TABLE `t2` (
`b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t2` (`a`, `b`) VALUES (1,2),(1,2);
+INSERT INTO `t2` (`a`, `b`) VALUES (1,2),
+(1,2);
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t3` (
@@ -6098,7 +6244,10 @@ CREATE TABLE `t3` (
`ds=~!@ \# $% ^ & * ( ) _ - = +` int(11) INVISIBLE DEFAULT 5
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t3` (`invisible`, `a b c & $!@#$%^&*( )`, `ds=~!@ \# $% ^ & * ( ) _ - = +`) VALUES (1,4,5),(5,4,5),(2,4,5),(1,2,3);
+INSERT INTO `t3` (`invisible`, `a b c & $!@#$%^&*( )`, `ds=~!@ \# $% ^ & * ( ) _ - = +`) VALUES (1,4,5),
+(5,4,5),
+(2,4,5),
+(1,2,3);
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t4` (
diff --git a/mysql-test/main/natural_sort_key.result b/mysql-test/main/natural_sort_key.result
new file mode 100644
index 00000000000..218a3e2cd9c
--- /dev/null
+++ b/mysql-test/main/natural_sort_key.result
@@ -0,0 +1,214 @@
+SET NAMES utf8mb4;
+SELECT NATURAL_SORT_KEY(NULL);
+NATURAL_SORT_KEY(NULL)
+NULL
+SELECT NATURAL_SORT_KEY(repeat('a1',@@max_allowed_packet/2-1));
+NATURAL_SORT_KEY(repeat('a1',@@max_allowed_packet/2-1))
+NULL
+Warnings:
+Warning 1301 Result of natural_sort_key() was larger than max_allowed_packet (16777216) - truncated
+SELECT NATURAL_SORT_KEY(repeat('1',@@max_allowed_packet-1));
+NATURAL_SORT_KEY(repeat('1',@@max_allowed_packet-1))
+NULL
+Warnings:
+Warning 1301 Result of natural_sort_key() was larger than max_allowed_packet (16777216) - truncated
+CREATE TABLE t1(
+c VARCHAR(30) CHARACTER SET latin1 COLLATE latin1_bin,
+k VARCHAR(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci AS (NATURAL_SORT_KEY(CONVERT(c USING utf8mb4))) VIRTUAL INVISIBLE);
+INSERT INTO t1 values
+('A1'),('a1'),('A100'),('a100'),('A2'),('ä2'),('a2'),('A99'),
+('äb'),('B1'),('B100'),('B9'),('C'),('100');
+#Natural sort order.
+SELECT c FROM t1 ORDER BY k,c;
+c
+100
+A1
+a1
+A2
+a2
+ä2
+A99
+A100
+a100
+äb
+B1
+B9
+B100
+C
+#Unnatural but unicode aware) sort order
+SELECT c FROM t1 ORDER BY CONVERT(c USING utf8mb4) COLLATE utf8mb4_unicode_ci,c;
+c
+100
+A1
+a1
+A100
+a100
+A2
+a2
+ä2
+A99
+äb
+B1
+B100
+B9
+C
+CREATE TABLE t2 AS SELECT c, NATURAL_SORT_KEY(c) FROM t1 WHERE 0;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c` varchar(30) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
+ `NATURAL_SORT_KEY(c)` varchar(45) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+DROP TABLE t1,t2;
+CREATE TABLE t1(c VARCHAR(1), k VARCHAR(2) AS (NATURAL_SORT_KEY(c)) STORED);
+ERROR HY000: Function or expression 'natural_sort_key()' cannot be used in the GENERATED ALWAYS AS clause of `k`
+SELECT RPAD(val,28,' ') value , RPAD(NATURAL_SORT_KEY(val),36,' ') sortkey , LENGTH(NATURAL_SORT_KEY(val)) - LENGTH(val) encoding_overhead
+FROM
+(
+SELECT '0' val
+UNION SELECT seq FROM seq_1_to_9
+UNION SELECT CONCAT('1',repeat('0',seq)) FROM seq_1_to_27
+) AS numbers ORDER BY sortkey;
+value sortkey encoding_overhead
+0 00 1
+1 01 1
+2 02 1
+3 03 1
+4 04 1
+5 05 1
+6 06 1
+7 07 1
+8 08 1
+9 09 1
+10 110 1
+100 2100 1
+1000 31000 1
+10000 410000 1
+100000 5100000 1
+1000000 61000000 1
+10000000 710000000 1
+100000000 8100000000 1
+1000000000 901000000000 2
+10000000000 9110000000000 2
+100000000000 92100000000000 2
+1000000000000 931000000000000 2
+10000000000000 9410000000000000 2
+100000000000000 95100000000000000 2
+1000000000000000 961000000000000000 2
+10000000000000000 9710000000000000000 2
+100000000000000000 98100000000000000000 2
+1000000000000000000 9901000000000000000000 3
+10000000000000000000 99110000000000000000000 3
+100000000000000000000 992100000000000000000000 3
+1000000000000000000000 9931000000000000000000000 3
+10000000000000000000000 99410000000000000000000000 3
+100000000000000000000000 995100000000000000000000000 3
+1000000000000000000000000 9961000000000000000000000000 3
+10000000000000000000000000 99710000000000000000000000000 3
+100000000000000000000000000 998100000000000000000000000000 3
+1000000000000000000000000000 99901271000000000000000000000000000 7
+SELECT natural_sort_key('1') = natural_sort_key('0001');
+natural_sort_key('1') = natural_sort_key('0001')
+1
+SELECT natural_sort_key('1.1') = natural_sort_key('1.00001');
+natural_sort_key('1.1') = natural_sort_key('1.00001')
+1
+SELECT RPAD(val,20,' ') value, NATURAL_SORT_KEY(val) FROM
+(SELECT '' val WHERE 0 UNION VALUES
+('fred'),
+('pic2'),
+('pic100a'),
+('pic120'),
+('pic121'),
+('jane'),
+('tom'),
+('pic02a'),
+('pic3'),
+('pic4'),
+('1-20'),
+('pic100'),
+('pic02000'),
+('10-20'),
+('1-02'),
+('1-2'),
+('pic01'),
+('pic02'),
+('pic 6'),
+('pic 7'),
+('pic 5'),
+('pic05'),
+('pic 5 '),
+('pic 5 something'),
+('pic 4 else'),
+('2000-1-10'),
+('1999-12-25'),
+('1999-3-3'),
+('2000-3-23'),
+('2000-1-2'),
+('100.200.300.400'),
+('100.50.60.70'),
+('100.8.9.0'),
+('a1b1'),
+('a01b2'),
+('a1b2'),
+('a01b3')
+)AS data ORDER BY 2,1;
+value NATURAL_SORT_KEY(val)
+1-02 01-02
+1-2 01-02
+1-20 01-120
+10-20 110-120
+100.8.9.0 2100.08.09.00
+100.50.60.70 2100.150.160.170
+100.200.300.400 2100.2200.2300.2400
+1999-3-3 31999-03-03
+1999-12-25 31999-112-125
+2000-1-2 32000-01-02
+2000-1-10 32000-01-110
+2000-3-23 32000-03-123
+a1b1 a01b01
+a01b2 a01b02
+a1b2 a01b02
+a01b3 a01b03
+fred fred
+jane jane
+pic 7 pic 07
+pic 4 else pic 04 else
+pic 5 pic 05
+pic 5 something pic 05 something
+pic 6 pic 06
+pic01 pic01
+pic02 pic02
+pic2 pic02
+pic02a pic02a
+pic3 pic03
+pic4 pic04
+pic05 pic05
+pic100 pic2100
+pic100a pic2100a
+pic120 pic2120
+pic121 pic2121
+pic02000 pic32000
+tom tom
+create table t (a varchar(8), b varchar(8) as (natural_sort_key(a)));
+insert into t (a) values ('a2'),(NULL),('a11');
+select * from t order by b;
+a b
+NULL NULL
+a2 a02
+a11 a111
+select a, b from t order by b;
+a b
+NULL NULL
+a2 a02
+a11 a111
+drop table t;
+select natural_sort_key(_utf16 0x0031),natural_sort_key(_ucs2 0x0031), natural_sort_key(_utf32 0x00000031);
+natural_sort_key(_utf16 0x0031) natural_sort_key(_ucs2 0x0031) natural_sort_key(_utf32 0x00000031)
+01 01 01
+select get_lock('a', 0);
+get_lock('a', 0)
+1
+select natural_sort_key(release_lock('a'));
+natural_sort_key(release_lock('a'))
+01
diff --git a/mysql-test/main/natural_sort_key.test b/mysql-test/main/natural_sort_key.test
new file mode 100644
index 00000000000..811f937750c
--- /dev/null
+++ b/mysql-test/main/natural_sort_key.test
@@ -0,0 +1,102 @@
+--source include/have_sequence.inc
+
+SET NAMES utf8mb4;
+SELECT NATURAL_SORT_KEY(NULL);
+
+#Test that max packet overflow produces NULL plus warning
+SELECT NATURAL_SORT_KEY(repeat('a1',@@max_allowed_packet/2-1));
+SELECT NATURAL_SORT_KEY(repeat('1',@@max_allowed_packet-1));
+
+#Test with virtual
+CREATE TABLE t1(
+ c VARCHAR(30) CHARACTER SET latin1 COLLATE latin1_bin,
+ k VARCHAR(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci AS (NATURAL_SORT_KEY(CONVERT(c USING utf8mb4))) VIRTUAL INVISIBLE);
+
+INSERT INTO t1 values
+ ('A1'),('a1'),('A100'),('a100'),('A2'),('ä2'),('a2'),('A99'),
+ ('äb'),('B1'),('B100'),('B9'),('C'),('100');
+
+-- echo #Natural sort order.
+# We sort by 2 colums, for stable sort,as we do not currenly have a case and accent insensitive Unicode collation.
+SELECT c FROM t1 ORDER BY k,c;
+-- echo #Unnatural but unicode aware) sort order
+SELECT c FROM t1 ORDER BY CONVERT(c USING utf8mb4) COLLATE utf8mb4_unicode_ci,c;
+# CREATE TABLE AS SELECT, to see that length of the column is correct.
+CREATE TABLE t2 AS SELECT c, NATURAL_SORT_KEY(c) FROM t1 WHERE 0;
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+#Virtual STORED is temporarily disabled
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
+CREATE TABLE t1(c VARCHAR(1), k VARCHAR(2) AS (NATURAL_SORT_KEY(c)) STORED);
+
+#Show encoding of numbers.
+SELECT RPAD(val,28,' ') value , RPAD(NATURAL_SORT_KEY(val),36,' ') sortkey , LENGTH(NATURAL_SORT_KEY(val)) - LENGTH(val) encoding_overhead
+FROM
+(
+SELECT '0' val
+UNION SELECT seq FROM seq_1_to_9
+UNION SELECT CONCAT('1',repeat('0',seq)) FROM seq_1_to_27
+) AS numbers ORDER BY sortkey;
+
+# leading zeros ignored
+SELECT natural_sort_key('1') = natural_sort_key('0001');
+SELECT natural_sort_key('1.1') = natural_sort_key('1.00001');
+
+# Some examples from https://github.com/sourcefrog/natsort/
+# words
+SELECT RPAD(val,20,' ') value, NATURAL_SORT_KEY(val) FROM
+(SELECT '' val WHERE 0 UNION VALUES
+('fred'),
+('pic2'),
+('pic100a'),
+('pic120'),
+('pic121'),
+('jane'),
+('tom'),
+('pic02a'),
+('pic3'),
+('pic4'),
+('1-20'),
+('pic100'),
+('pic02000'),
+('10-20'),
+('1-02'),
+('1-2'),
+('pic01'),
+('pic02'),
+('pic 6'),
+('pic 7'),
+('pic 5'),
+('pic05'),
+('pic 5 '),
+('pic 5 something'),
+('pic 4 else'),
+('2000-1-10'),
+('1999-12-25'),
+('1999-3-3'),
+('2000-3-23'),
+('2000-1-2'),
+('100.200.300.400'),
+('100.50.60.70'),
+('100.8.9.0'),
+('a1b1'),
+('a01b2'),
+('a1b2'),
+('a01b3')
+)AS data ORDER BY 2,1;
+
+# MDEV-27686 (null value indicator not always reset)
+create table t (a varchar(8), b varchar(8) as (natural_sort_key(a)));
+insert into t (a) values ('a2'),(NULL),('a11');
+select * from t order by b;
+select a, b from t order by b;
+drop table t;
+
+# MDEV-26796 Natural sort does not work for utf32/utf16/ucs2
+select natural_sort_key(_utf16 0x0031),natural_sort_key(_ucs2 0x0031), natural_sort_key(_utf32 0x00000031);
+
+# MDEV-26806 Server crash in Charset::charset / Item_func_natural_sort_key::val_str
+select get_lock('a', 0);
+select natural_sort_key(release_lock('a'));
+
diff --git a/mysql-test/main/openssl_1.result b/mysql-test/main/openssl_1.result
index 64672655ebe..c8377ee82b6 100644
--- a/mysql-test/main/openssl_1.result
+++ b/mysql-test/main/openssl_1.result
@@ -98,7 +98,9 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES (1),(2);
+INSERT INTO `t1` VALUES
+(1),
+(2);
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -132,7 +134,9 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES (1),(2);
+INSERT INTO `t1` VALUES
+(1),
+(2);
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -166,7 +170,9 @@ CREATE TABLE `t1` (
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES (1),(2);
+INSERT INTO `t1` VALUES
+(1),
+(2);
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
diff --git a/mysql-test/main/partition.result b/mysql-test/main/partition.result
index b2b34b975e3..ac759239de6 100644
--- a/mysql-test/main/partition.result
+++ b/mysql-test/main/partition.result
@@ -2643,7 +2643,7 @@ Note 1517 Duplicate partition name p5
alter table t1 drop partition if exists p5;
alter table t1 drop partition if exists p5;
Warnings:
-Note 1507 Error in list of partitions to DROP
+Note 1507 Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (a INT) ENGINE=MyISAM PARTITION BY RANGE(a) (PARTITION p1 VALUES LESS THAN (0));
ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES LESS THAN (1));
diff --git a/mysql-test/main/partition_alter.result b/mysql-test/main/partition_alter.result
index 539f896f54f..0dee3d209b1 100644
--- a/mysql-test/main/partition_alter.result
+++ b/mysql-test/main/partition_alter.result
@@ -290,3 +290,68 @@ test.t check status OK
delete from t order by b limit 1;
drop table t;
# End of 10.5 tests
+create or replace table t1 (x int primary key)
+partition by range(x) (
+p1 values less than (10),
+partition p2 values less than (20),
+p3 values less than (30),
+partition p4 values less than (40),
+p5 values less than (50),
+pn values less than maxvalue);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+create or replace table t1 (x int)
+partition by list(x) (
+partition p1 values in (2, 3, 4),
+partition p2 values in (12, 13, 14),
+partition p3 values in (22, 23, 24),
+p4 values in (32, 33, 34),
+p5 values in (42, 43, 44),
+pn values in (52, 53, 54));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY LIST (`x`)
+(PARTITION `p1` VALUES IN (2,3,4) ENGINE = MyISAM,
+ PARTITION `p2` VALUES IN (12,13,14) ENGINE = MyISAM,
+ PARTITION `p3` VALUES IN (22,23,24) ENGINE = MyISAM,
+ PARTITION `p4` VALUES IN (32,33,34) ENGINE = MyISAM,
+ PARTITION `p5` VALUES IN (42,43,44) ENGINE = MyISAM,
+ PARTITION `pn` VALUES IN (52,53,54) ENGINE = MyISAM)
+create or replace table t1 (x int)
+partition by list(x) (
+partition partition p1 values in (2, 3, 4),
+pn values in (52, 53, 54));
+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 p1 values in (2, 3, 4),
+pn values in (52, 53, 54))' at line 3
+create or replace table t1 (x int)
+partition by list(x) (
+partition partition values in (2, 3, 4),
+pn values in (52, 53, 54));
+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 values in (2, 3, 4),
+pn values in (52, 53, 54))' at line 3
+create or replace table t1 (x int)
+partition by list(x) (
+partition values in (2, 3, 4),
+pn values in (52, 53, 54));
+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 'in (2, 3, 4),
+pn values in (52, 53, 54))' at line 3
+create or replace table t1 (x int)
+partition by list(x) (
+partitio values in (2, 3, 4),
+pn values in (52, 53, 54));
+drop table t1;
+# End of 10.7 tests
diff --git a/mysql-test/main/partition_alter.test b/mysql-test/main/partition_alter.test
index 45fa8d280fe..393755c3b50 100644
--- a/mysql-test/main/partition_alter.test
+++ b/mysql-test/main/partition_alter.test
@@ -238,3 +238,52 @@ delete from t order by b limit 1;
drop table t;
--echo # End of 10.5 tests
+
+create or replace table t1 (x int primary key)
+partition by range(x) (
+ p1 values less than (10),
+ partition p2 values less than (20),
+ p3 values less than (30),
+ partition p4 values less than (40),
+ p5 values less than (50),
+ pn values less than maxvalue);
+
+show create table t1;
+
+create or replace table t1 (x int)
+partition by list(x) (
+ partition p1 values in (2, 3, 4),
+ partition p2 values in (12, 13, 14),
+ partition p3 values in (22, 23, 24),
+ p4 values in (32, 33, 34),
+ p5 values in (42, 43, 44),
+ pn values in (52, 53, 54));
+
+show create table t1;
+
+--error ER_PARSE_ERROR
+create or replace table t1 (x int)
+partition by list(x) (
+ partition partition p1 values in (2, 3, 4),
+ pn values in (52, 53, 54));
+
+--error ER_PARSE_ERROR
+create or replace table t1 (x int)
+partition by list(x) (
+ partition partition values in (2, 3, 4),
+ pn values in (52, 53, 54));
+
+--error ER_PARSE_ERROR
+create or replace table t1 (x int)
+partition by list(x) (
+ partition values in (2, 3, 4),
+ pn values in (52, 53, 54));
+
+create or replace table t1 (x int)
+partition by list(x) (
+ partitio values in (2, 3, 4),
+ pn values in (52, 53, 54));
+
+drop table t1;
+
+--echo # End of 10.7 tests
diff --git a/mysql-test/main/partition_binlog.result b/mysql-test/main/partition_binlog.result
index 3e6100b51d8..45cd636c1f9 100644
--- a/mysql-test/main/partition_binlog.result
+++ b/mysql-test/main/partition_binlog.result
@@ -11,20 +11,20 @@ INSERT INTO t1 VALUES (1), (10), (100), (1000);
ALTER TABLE t1 TRUNCATE PARTITION p1;
ERROR HY000: Unknown partition 'p1' in table 't1'
ALTER TABLE t1 DROP PARTITION p1;
-ERROR HY000: Error in list of partitions to DROP
+ERROR HY000: Wrong partition name or partition list
# No error returned, output in table format instead:
ALTER TABLE t1 ANALYZE PARTITION p1;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
ALTER TABLE t1 CHECK PARTITION p1;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
ALTER TABLE t1 OPTIMIZE PARTITION p1;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
ALTER TABLE t1 REPAIR PARTITION p1;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
ALTER TABLE t1 ANALYZE PARTITION p0;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
diff --git a/mysql-test/main/partition_binlog.test b/mysql-test/main/partition_binlog.test
index d6986c86ebe..665293d4881 100644
--- a/mysql-test/main/partition_binlog.test
+++ b/mysql-test/main/partition_binlog.test
@@ -22,7 +22,7 @@ INSERT INTO t1 VALUES (1), (10), (100), (1000);
--error ER_UNKNOWN_PARTITION
ALTER TABLE t1 TRUNCATE PARTITION p1;
---error ER_DROP_PARTITION_NON_EXISTENT
+--error ER_PARTITION_DOES_NOT_EXIST
ALTER TABLE t1 DROP PARTITION p1;
--echo # No error returned, output in table format instead:
diff --git a/mysql-test/main/partition_error.result b/mysql-test/main/partition_error.result
index 350e8733220..ba3957bedfd 100644
--- a/mysql-test/main/partition_error.result
+++ b/mysql-test/main/partition_error.result
@@ -29,7 +29,7 @@ INSERT INTO t1 VALUES (5,3),(5,6);
ALTER TABLE t1 PARTITION BY KEY(b) PARTITIONS 3 ;
ALTER TABLE t1 REPAIR PARTITION p1, p3;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
ALTER TABLE t1 ORDER BY b;
DROP TABLE t1;
#
@@ -43,7 +43,7 @@ PARTITION p1 VALUES LESS THAN MAXVALUE ) ;
ALTER TABLE t1 DROP PARTITION p1;
ALTER TABLE t1 ANALYZE PARTITION p0, p1;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
ALTER TABLE t1 COMMENT 'altered';
DROP TABLE t1;
#
@@ -765,7 +765,7 @@ ERROR HY000: Field 'c' is of a not allowed type for this type of partitioning
#
CREATE TABLE t1 (a INT) PARTITION BY HASH(a);
CREATE TEMPORARY TABLE tmp_t1 LIKE t1;
-ERROR HY000: Partitioned tables do not support CREATE TEMPORARY TABLE
+ERROR HY000: Table storage engine 'partition' does not support the create option 'TEMPORARY'
DROP TABLE t1;
#
# Bug#42954: SQL MODE 'NO_DIR_IN_CREATE' does not work with
diff --git a/mysql-test/main/partition_error.test b/mysql-test/main/partition_error.test
index edfe7c827be..b8d07e595e5 100644
--- a/mysql-test/main/partition_error.test
+++ b/mysql-test/main/partition_error.test
@@ -800,7 +800,7 @@ PARTITION BY HASH (c) PARTITIONS 4;
--echo # with temporary table and partitions
--echo #
CREATE TABLE t1 (a INT) PARTITION BY HASH(a);
---error ER_FEATURE_NOT_SUPPORTED_WITH_PARTITIONING
+--error ER_ILLEGAL_HA_CREATE_OPTION
CREATE TEMPORARY TABLE tmp_t1 LIKE t1;
DROP TABLE t1;
--echo #
diff --git a/mysql-test/main/partition_exchange.result b/mysql-test/main/partition_exchange.result
index c82d8d2071b..5a3d7330d96 100644
--- a/mysql-test/main/partition_exchange.result
+++ b/mysql-test/main/partition_exchange.result
@@ -1306,7 +1306,6 @@ ALTER TABLE t1 ADD PARTITION (PARTITION pm TABLESPACE = `innodb_file_per_table`)
CREATE TABLE t2 like t1;
ALTER TABLE t2 REMOVE PARTITIONING;
ALTER TABLE t1 EXCHANGE PARTITION pm WITH TABLE t2;
-ERROR HY000: Non matching attribute 'TABLESPACE' between partition and table
DROP TABLE t1, t2;
#
# MDEV-14642 Assertion `table->s->db_create_options == part_table->s->db_create_options' failed in compare_table_with_partition
diff --git a/mysql-test/main/partition_exchange.test b/mysql-test/main/partition_exchange.test
index 09629a52add..8e0be49b5ab 100644
--- a/mysql-test/main/partition_exchange.test
+++ b/mysql-test/main/partition_exchange.test
@@ -533,7 +533,7 @@ CREATE TABLE t1 (a VARCHAR(200)) PARTITION BY KEY(a) partitions 10;
ALTER TABLE t1 ADD PARTITION (PARTITION pm TABLESPACE = `innodb_file_per_table`);
CREATE TABLE t2 like t1;
ALTER TABLE t2 REMOVE PARTITIONING;
---error ER_PARTITION_EXCHANGE_DIFFERENT_OPTION
+# The following works as table spaces are not checked anymore
ALTER TABLE t1 EXCHANGE PARTITION pm WITH TABLE t2;
DROP TABLE t1, t2;
diff --git a/mysql-test/main/partition_mgm_err.result b/mysql-test/main/partition_mgm_err.result
index 01adc4f5adf..864b1cbd37f 100644
--- a/mysql-test/main/partition_mgm_err.result
+++ b/mysql-test/main/partition_mgm_err.result
@@ -16,13 +16,13 @@ ALTER TABLE t1 REORGANIZE PARTITION x0,x1 INTO
PARTITION x11 VALUES LESS THAN (5));
ERROR HY000: Reorganize of range partitions cannot change total ranges except for last partition where it can extend the range
ALTER TABLE t1 DROP PARTITION x0, x1, x2, x3, x3;
-ERROR HY000: Error in list of partitions to DROP
+ERROR HY000: Wrong partition name or partition list
ALTER TABLE t1 DROP PARTITION x0, x1, x2, x10;
-ERROR HY000: Error in list of partitions to DROP
+ERROR HY000: Wrong partition name or partition list
ALTER TABLE t1 DROP PARTITION x10, x1, x2, x1;
-ERROR HY000: Error in list of partitions to DROP
+ERROR HY000: Wrong partition name or partition list
ALTER TABLE t1 DROP PARTITION x10, x1, x2, x3;
-ERROR HY000: Error in list of partitions to DROP
+ERROR HY000: Wrong partition name or partition list
ALTER TABLE t1 REORGANIZE PARTITION x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10 INTO
(PARTITION x11 VALUES LESS THAN (22));
ERROR HY000: More partitions to reorganize than there are partitions
@@ -34,7 +34,7 @@ ALTER TABLE t1 REORGANIZE PARTITION x0, x2 INTO
ERROR HY000: When reorganizing a set of partitions they must be in consecutive order
ALTER TABLE t1 REORGANIZE PARTITION x0, x1, x1 INTO
(PARTITION x11 VALUES LESS THAN (4));
-ERROR HY000: Error in list of partitions to REORGANIZE
+ERROR HY000: Wrong partition name or partition list
ALTER TABLE t1 REORGANIZE PARTITION x0,x1 INTO
(PARTITION x01 VALUES LESS THAN (5));
ERROR HY000: Reorganize of range partitions cannot change total ranges except for last partition where it can extend the range
@@ -113,7 +113,7 @@ PARTITION x1 VALUES LESS THAN (8));
ALTER TABLE t1 ADD PARTITION PARTITIONS 1;
ERROR HY000: For RANGE partitions each partition must be defined
ALTER TABLE t1 DROP PARTITION x2;
-ERROR HY000: Error in list of partitions to DROP
+ERROR HY000: Wrong partition name or partition list
ALTER TABLE t1 COALESCE PARTITION 1;
ERROR HY000: COALESCE PARTITION can only be used on HASH/KEY partitions
ALTER TABLE t1 DROP PARTITION x1;
diff --git a/mysql-test/main/partition_mgm_err.test b/mysql-test/main/partition_mgm_err.test
index 0987c427fc7..82b9db7bbe1 100644
--- a/mysql-test/main/partition_mgm_err.test
+++ b/mysql-test/main/partition_mgm_err.test
@@ -29,16 +29,16 @@ ALTER TABLE t1 REORGANIZE PARTITION x0,x1 INTO
(PARTITION x01 VALUES LESS THAN (2),
PARTITION x11 VALUES LESS THAN (5));
---error ER_DROP_PARTITION_NON_EXISTENT
+--error ER_PARTITION_DOES_NOT_EXIST
ALTER TABLE t1 DROP PARTITION x0, x1, x2, x3, x3;
---error ER_DROP_PARTITION_NON_EXISTENT
+--error ER_PARTITION_DOES_NOT_EXIST
ALTER TABLE t1 DROP PARTITION x0, x1, x2, x10;
---error ER_DROP_PARTITION_NON_EXISTENT
+--error ER_PARTITION_DOES_NOT_EXIST
ALTER TABLE t1 DROP PARTITION x10, x1, x2, x1;
---error ER_DROP_PARTITION_NON_EXISTENT
+--error ER_PARTITION_DOES_NOT_EXIST
ALTER TABLE t1 DROP PARTITION x10, x1, x2, x3;
--error ER_REORG_PARTITION_NOT_EXIST
@@ -53,7 +53,7 @@ ALTER TABLE t1 REORGANIZE PARTITION x0,x1,x2 INTO
ALTER TABLE t1 REORGANIZE PARTITION x0, x2 INTO
(PARTITION x11 VALUES LESS THAN (2));
---error ER_DROP_PARTITION_NON_EXISTENT
+--error ER_PARTITION_DOES_NOT_EXIST
ALTER TABLE t1 REORGANIZE PARTITION x0, x1, x1 INTO
(PARTITION x11 VALUES LESS THAN (4));
@@ -167,7 +167,7 @@ PARTITION BY RANGE (a)
--error ER_PARTITIONS_MUST_BE_DEFINED_ERROR
ALTER TABLE t1 ADD PARTITION PARTITIONS 1;
---error ER_DROP_PARTITION_NON_EXISTENT
+--error ER_PARTITION_DOES_NOT_EXIST
ALTER TABLE t1 DROP PARTITION x2;
--error ER_COALESCE_ONLY_ON_HASH_PARTITION
diff --git a/mysql-test/main/partition_range.result b/mysql-test/main/partition_range.result
index 213997e0758..9cefe83e1e2 100644
--- a/mysql-test/main/partition_range.result
+++ b/mysql-test/main/partition_range.result
@@ -294,9 +294,9 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
PARTITION BY RANGE (`a`)
-(PARTITION `x1` VALUES LESS THAN (5) TABLESPACE = ts1 ENGINE = MyISAM,
- PARTITION `x2` VALUES LESS THAN (10) TABLESPACE = ts2 ENGINE = MyISAM,
- PARTITION `x3` VALUES LESS THAN MAXVALUE TABLESPACE = ts3 ENGINE = MyISAM)
+(PARTITION `x1` VALUES LESS THAN (5) ENGINE = MyISAM,
+ PARTITION `x2` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `x3` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
ALTER TABLE t1
partition by range (a)
partitions 3
@@ -318,9 +318,9 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
PARTITION BY RANGE (`a`)
-(PARTITION `x1` VALUES LESS THAN (5) TABLESPACE = ts1 ENGINE = MyISAM,
- PARTITION `x2` VALUES LESS THAN (10) TABLESPACE = ts2 ENGINE = MyISAM,
- PARTITION `x3` VALUES LESS THAN MAXVALUE TABLESPACE = ts3 ENGINE = MyISAM)
+(PARTITION `x1` VALUES LESS THAN (5) ENGINE = MyISAM,
+ PARTITION `x2` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `x3` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
drop table if exists t1;
CREATE TABLE t1 (
a int not null,
diff --git a/mysql-test/main/partition_sync.result b/mysql-test/main/partition_sync.result
index badcb10e5da..149eadf257b 100644
--- a/mysql-test/main/partition_sync.result
+++ b/mysql-test/main/partition_sync.result
@@ -15,7 +15,7 @@ a
1
connection default;
ALTER TABLE t1 DROP PARTITION p3;
-ERROR HY000: Error in list of partitions to DROP
+ERROR HY000: Wrong partition name or partition list
connection con1;
# This failed with deadlock and should not do so.
SELECT * FROM t1;
diff --git a/mysql-test/main/partition_sync.test b/mysql-test/main/partition_sync.test
index a07fb6e5c13..9b75ab79edd 100644
--- a/mysql-test/main/partition_sync.test
+++ b/mysql-test/main/partition_sync.test
@@ -22,7 +22,7 @@ BEGIN;
SELECT * FROM t1;
connection default;
---error ER_DROP_PARTITION_NON_EXISTENT
+--error ER_PARTITION_DOES_NOT_EXIST
ALTER TABLE t1 DROP PARTITION p3;
connection con1;
diff --git a/mysql-test/main/plugin.result b/mysql-test/main/plugin.result
index 092e817c48e..50a82efe55a 100644
--- a/mysql-test/main/plugin.result
+++ b/mysql-test/main/plugin.result
@@ -12,7 +12,7 @@ PLUGIN_STATUS ACTIVE
PLUGIN_TYPE STORAGE ENGINE
PLUGIN_TYPE_VERSION #
PLUGIN_LIBRARY ha_example.so
-PLUGIN_LIBRARY_VERSION 1.14
+PLUGIN_LIBRARY_VERSION 1.15
PLUGIN_AUTHOR Brian Aker, MySQL AB
PLUGIN_DESCRIPTION Example storage engine
PLUGIN_LICENSE GPL
@@ -25,7 +25,7 @@ PLUGIN_STATUS ACTIVE
PLUGIN_TYPE DAEMON
PLUGIN_TYPE_VERSION #
PLUGIN_LIBRARY ha_example.so
-PLUGIN_LIBRARY_VERSION 1.14
+PLUGIN_LIBRARY_VERSION 1.15
PLUGIN_AUTHOR Sergei Golubchik
PLUGIN_DESCRIPTION Unusable Daemon
PLUGIN_LICENSE GPL
@@ -68,7 +68,7 @@ PLUGIN_STATUS DELETED
PLUGIN_TYPE STORAGE ENGINE
PLUGIN_TYPE_VERSION #
PLUGIN_LIBRARY ha_example.so
-PLUGIN_LIBRARY_VERSION 1.14
+PLUGIN_LIBRARY_VERSION 1.15
PLUGIN_AUTHOR Brian Aker, MySQL AB
PLUGIN_DESCRIPTION Example storage engine
PLUGIN_LICENSE GPL
diff --git a/mysql-test/main/ps.result b/mysql-test/main/ps.result
index 90ac187b043..c0ae100e383 100644
--- a/mysql-test/main/ps.result
+++ b/mysql-test/main/ps.result
@@ -5241,13 +5241,13 @@ DECLARE a DATETIME;
CALL p1(a);
END;
$$
-ERROR 22007: Incorrect datetime value: '10' for column ``.``.`a` at row 1
+ERROR 22007: Incorrect datetime value: '10' for column ``.``.`a` at row 0
BEGIN NOT ATOMIC
DECLARE a DATETIME;
EXECUTE IMMEDIATE 'CALL p1(?)' USING a;
END;
$$
-ERROR 22007: Incorrect datetime value: '10' for column ``.``.`a` at row 1
+ERROR 22007: Incorrect datetime value: '10' for column ``.``.`a` at row 0
BEGIN NOT ATOMIC
DECLARE a DATETIME;
PREPARE stmt FROM 'CALL p1(?)';
@@ -5255,7 +5255,7 @@ EXECUTE stmt USING a;
DEALLOCATE PREPARE stmt;
END;
$$
-ERROR 22007: Incorrect datetime value: '10' for column ``.``.`a` at row 1
+ERROR 22007: Incorrect datetime value: '10' for column ``.``.`a` at row 0
DROP PROCEDURE p1;
#
# MDEV-14454 Binary protocol returns wrong collation ID for SP OUT parameters
diff --git a/mysql-test/main/ps_missed_cmds.result b/mysql-test/main/ps_missed_cmds.result
index 966c4c6313b..bde750434b3 100644
--- a/mysql-test/main/ps_missed_cmds.result
+++ b/mysql-test/main/ps_missed_cmds.result
@@ -521,27 +521,4 @@ EXECUTE stmt_2;
DROP TABLE t1;
DEALLOCATE PREPARE stmt_1;
DEALLOCATE PREPARE stmt_2;
-# Test Test case 25: Check the statements 'CREATE/ALTER/DROP TABLEPSPACE'
-# can be executed as a prepared statement
-PREPARE stmt_1 FROM "CREATE TABLESPACE ts1 ADD DATAFILE 'ts1.ibd' ENGINE=InnoDB";
-PREPARE stmt_2 FROM "ALTER TABLESPACE ts1 ADD DATAFILE 'ts1_1.ibd' ENGINE=InnoDB";
-PREPARE stmt_3 FROM "DROP TABLESPACE ts1 ENGINE=InnoDB";
-EXECUTE stmt_1;
-# Execute the same prepared statement the second time to check that
-# no internal structures used for handling the 'CREATE TABLESPACE'
-# statement were damaged.
-EXECUTE stmt_1;
-EXECUTE stmt_2;
-# Execute the same prepared statement the second time to check that
-# no internal structures used for handling the 'ALTER TABLESPACE'
-# statement were damaged.
-EXECUTE stmt_2;
-EXECUTE stmt_3;
-# Execute the same prepared statement the second time to check that
-# no internal structures used for handling the 'DROP TABLESPACE'
-# statement were damaged.
-EXECUTE stmt_3;
-DEALLOCATE PREPARE stmt_1;
-DEALLOCATE PREPARE stmt_2;
-DEALLOCATE PREPARE stmt_3;
SET default_storage_engine= @save_storage_engine;
diff --git a/mysql-test/main/ps_missed_cmds.test b/mysql-test/main/ps_missed_cmds.test
index 2bce4bef17e..6224ea95baa 100644
--- a/mysql-test/main/ps_missed_cmds.test
+++ b/mysql-test/main/ps_missed_cmds.test
@@ -588,50 +588,5 @@ DROP TABLE t1;
DEALLOCATE PREPARE stmt_1;
DEALLOCATE PREPARE stmt_2;
---echo # Test Test case 25: Check the statements 'CREATE/ALTER/DROP TABLEPSPACE'
---echo # can be executed as a prepared statement
-
-PREPARE stmt_1 FROM "CREATE TABLESPACE ts1 ADD DATAFILE 'ts1.ibd' ENGINE=InnoDB";
-PREPARE stmt_2 FROM "ALTER TABLESPACE ts1 ADD DATAFILE 'ts1_1.ibd' ENGINE=InnoDB";
-PREPARE stmt_3 FROM "DROP TABLESPACE ts1 ENGINE=InnoDB";
-
-# Since MariaDB supports for tablespaces only on syntax level disable warnings
-# before run CREATE/ALTER/DROP TABLESPACE statements in order to exclude
-# the following in result output
-# Warning 1478 Table storage engine 'InnoDB' does not support the create option 'TABLESPACE
---disable_warnings
-
-EXECUTE stmt_1;
---echo # Execute the same prepared statement the second time to check that
---echo # no internal structures used for handling the 'CREATE TABLESPACE'
---echo # statement were damaged.
-# Since the 'CREATE TABLESPACE' statement is supported by MariaDB on syntax
-# level only the second invocation of the CREATE TABLESPACE statement for
-# the same tablespace name doesn't lead to error.
-EXECUTE stmt_1;
-
-EXECUTE stmt_2;
---echo # Execute the same prepared statement the second time to check that
---echo # no internal structures used for handling the 'ALTER TABLESPACE'
---echo # statement were damaged.
-EXECUTE stmt_2;
-
-EXECUTE stmt_3;
---echo # Execute the same prepared statement the second time to check that
---echo # no internal structures used for handling the 'DROP TABLESPACE'
---echo # statement were damaged.
-
-# Since the 'DROP TABLESPACE' statement is supported by MariaDB on syntax
-# level only the second invocation of the DROP TABLESPACE statement for
-# the same tablespace name doesn't lead to an error that tablespace
-# doesn't exist.
-EXECUTE stmt_3;
-
---enable_warnings
-
-DEALLOCATE PREPARE stmt_1;
-DEALLOCATE PREPARE stmt_2;
-DEALLOCATE PREPARE stmt_3;
-
--enable_ps_protocol
SET default_storage_engine= @save_storage_engine;
diff --git a/mysql-test/main/ps_missed_cmds_bin_prot.result b/mysql-test/main/ps_missed_cmds_bin_prot.result
index 759eda0f08b..c8de2f3e64b 100644
--- a/mysql-test/main/ps_missed_cmds_bin_prot.result
+++ b/mysql-test/main/ps_missed_cmds_bin_prot.result
@@ -240,9 +240,4 @@ SIGNAL SQLSTATE '45000' SET MYSQL_ERRNO=30001, MESSAGE_TEXT='Hello, world!';
ERROR 45000: Hello, world!
RESIGNAL SET MESSAGE_TEXT = 'New error message';
ERROR 0K000: RESIGNAL when handler not active
-# Test Test case 29: Check the statements 'CREATE/ALTER/DROP TABLEPSPACE'
-# can be executed as a prepared statement
-CREATE TABLESPACE ts1 ADD DATAFILE 'ts1.ibd' ENGINE=InnoDB;
-ALTER TABLESPACE ts1 ADD DATAFILE 'ts1_1.ibd' ENGINE=InnoDB;
-DROP TABLESPACE ts1 ENGINE=InnoDB;
SET default_storage_engine= @save_storage_engine;
diff --git a/mysql-test/main/ps_missed_cmds_bin_prot.test b/mysql-test/main/ps_missed_cmds_bin_prot.test
index f36385cc079..f10ee9a3b55 100644
--- a/mysql-test/main/ps_missed_cmds_bin_prot.test
+++ b/mysql-test/main/ps_missed_cmds_bin_prot.test
@@ -251,19 +251,6 @@ SIGNAL SQLSTATE '45000' SET MYSQL_ERRNO=30001, MESSAGE_TEXT='Hello, world!';
--error ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER
RESIGNAL SET MESSAGE_TEXT = 'New error message';
---echo # Test Test case 29: Check the statements 'CREATE/ALTER/DROP TABLEPSPACE'
---echo # can be executed as a prepared statement
-
-# Since MariaDB supports for tablespaces only on syntax level disable warnings
-# before run CREATE/ALTER/DROP TABLESPACE statements in order to exclude
-# the following in result output
-# Warning 1478 Table storage engine 'InnoDB' does not support the create option 'TABLESPACE
---disable_warnings
-
-CREATE TABLESPACE ts1 ADD DATAFILE 'ts1.ibd' ENGINE=InnoDB;
-ALTER TABLESPACE ts1 ADD DATAFILE 'ts1_1.ibd' ENGINE=InnoDB;
-DROP TABLESPACE ts1 ENGINE=InnoDB;
-
--enable_warnings
SET default_storage_engine= @save_storage_engine;
diff --git a/mysql-test/main/signal_code.result b/mysql-test/main/signal_code.result
index 32192251fe9..2ea3a7e56b2 100644
--- a/mysql-test/main/signal_code.result
+++ b/mysql-test/main/signal_code.result
@@ -20,16 +20,16 @@ return 0;
end $$
show procedure code signal_proc;
Pos Instruction
-0 stmt 130 "SIGNAL foo"
-1 stmt 130 "SIGNAL foo SET MESSAGE_TEXT = "This i..."
-2 stmt 131 "RESIGNAL foo"
-3 stmt 131 "RESIGNAL foo SET MESSAGE_TEXT = "This..."
+0 stmt 129 "SIGNAL foo"
+1 stmt 129 "SIGNAL foo SET MESSAGE_TEXT = "This i..."
+2 stmt 130 "RESIGNAL foo"
+3 stmt 130 "RESIGNAL foo SET MESSAGE_TEXT = "This..."
drop procedure signal_proc;
show function code signal_func;
Pos Instruction
-0 stmt 130 "SIGNAL foo"
-1 stmt 130 "SIGNAL foo SET MESSAGE_TEXT = "This i..."
-2 stmt 131 "RESIGNAL foo"
-3 stmt 131 "RESIGNAL foo SET MESSAGE_TEXT = "This..."
+0 stmt 129 "SIGNAL foo"
+1 stmt 129 "SIGNAL foo SET MESSAGE_TEXT = "This i..."
+2 stmt 130 "RESIGNAL foo"
+3 stmt 130 "RESIGNAL foo SET MESSAGE_TEXT = "This..."
4 freturn int 0
drop function signal_func;
diff --git a/mysql-test/main/signal_sqlmode.result b/mysql-test/main/signal_sqlmode.result
index db7ac68041c..cb9bd4a8bba 100644
--- a/mysql-test/main/signal_sqlmode.result
+++ b/mysql-test/main/signal_sqlmode.result
@@ -32,7 +32,7 @@ call p;
length(utf8_var) utf8_var
128 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Warnings:
-Warning 1265 Data truncated for column 'utf8_var' at row 1
+Warning 1265 Data truncated for column 'utf8_var' at row 0
call p2;
length(msg) msg
129 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAX
@@ -71,7 +71,7 @@ table_name = name;
end
$$
call p;
-ERROR 22001: Data too long for column 'utf8_var' at row 1
+ERROR 22001: Data too long for column 'utf8_var' at row 0
call p2;
length(msg) msg
513 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAX
diff --git a/mysql-test/main/sp-anchor-row-type-table.result b/mysql-test/main/sp-anchor-row-type-table.result
index c28d26304db..00fda5f12ad 100644
--- a/mysql-test/main/sp-anchor-row-type-table.result
+++ b/mysql-test/main/sp-anchor-row-type-table.result
@@ -707,7 +707,7 @@ Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL,
`b` text DEFAULT NULL,
- `c` char(1) DEFAULT NULL
+ `c` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP PROCEDURE p2;
DROP PROCEDURE p1;
diff --git a/mysql-test/main/sp-anchor-type.result b/mysql-test/main/sp-anchor-type.result
index 73699d7ed03..94e5182acb2 100644
--- a/mysql-test/main/sp-anchor-type.result
+++ b/mysql-test/main/sp-anchor-type.result
@@ -62,7 +62,7 @@ CALL p1();
a b
127 200
Warnings:
-Warning 1264 Out of range value for column 'a' at row 1
+Warning 1264 Out of range value for column 'a' at row 0
DROP PROCEDURE p1;
DROP TABLE t1;
SET sql_mode=DEFAULT;
@@ -469,8 +469,8 @@ t2 CREATE TABLE `t2` (
`t2` text DEFAULT NULL,
`t3` mediumtext DEFAULT NULL,
`t4` longtext DEFAULT NULL,
- `enum1` char(1) DEFAULT NULL,
- `set1` char(5) DEFAULT NULL,
+ `enum1` varchar(1) DEFAULT NULL,
+ `set1` varchar(5) DEFAULT NULL,
`blob1` tinyblob DEFAULT NULL,
`blob2` blob DEFAULT NULL,
`blob3` mediumblob DEFAULT NULL,
@@ -631,8 +631,8 @@ t2 CREATE TABLE `t2` (
`t2` text DEFAULT NULL,
`t3` mediumtext DEFAULT NULL,
`t4` longtext DEFAULT NULL,
- `enum1` char(1) DEFAULT NULL,
- `set1` char(5) DEFAULT NULL,
+ `enum1` varchar(1) DEFAULT NULL,
+ `set1` varchar(5) DEFAULT NULL,
`blob1` tinyblob DEFAULT NULL,
`blob2` blob DEFAULT NULL,
`blob3` mediumblob DEFAULT NULL,
@@ -1044,7 +1044,7 @@ t1 CREATE TABLE `t1` (
`a_flt0` float DEFAULT NULL,
`a_dbl0` double DEFAULT NULL,
`a_bit3` bit(3) DEFAULT NULL,
- `a_enum0` char(1) DEFAULT NULL,
+ `a_enum0` varchar(1) DEFAULT NULL,
`a_varchar10` varchar(10) DEFAULT NULL,
`a_text1` text DEFAULT NULL,
`a_tinytext1` tinytext DEFAULT NULL,
@@ -1062,7 +1062,7 @@ t1 CREATE TABLE `t1` (
`aa_flt0` float DEFAULT NULL,
`aa_dbl0` double DEFAULT NULL,
`aa_bit3` bit(3) DEFAULT NULL,
- `aa_enum0` char(1) DEFAULT NULL,
+ `aa_enum0` varchar(1) DEFAULT NULL,
`aa_varchar10` varchar(10) DEFAULT NULL,
`aa_text1` text DEFAULT NULL,
`aa_tinytext1` tinytext DEFAULT NULL,
diff --git a/mysql-test/main/sp-cursor.result b/mysql-test/main/sp-cursor.result
index 230bf8c66ef..aa23d808352 100644
--- a/mysql-test/main/sp-cursor.result
+++ b/mysql-test/main/sp-cursor.result
@@ -167,12 +167,12 @@ CALL p1('1b');
v_a
1
Warnings:
-Warning 1265 Data truncated for column 'p_a' at row 1
+Warning 1265 Data truncated for column 'p_a' at row 0
CALL p1('b1');
v_a
0
Warnings:
-Warning 1366 Incorrect integer value: 'b1' for column ``.``.`p_a` at row 1
+Warning 1366 Incorrect integer value: 'b1' for column ``.``.`p_a` at row 0
DROP PROCEDURE p1;
SET sql_mode=DEFAULT;
#
diff --git a/mysql-test/main/sp-error.result b/mysql-test/main/sp-error.result
index 3832d63c073..c77f58b6a66 100644
--- a/mysql-test/main/sp-error.result
+++ b/mysql-test/main/sp-error.result
@@ -2780,7 +2780,7 @@ END|
CALL p1()|
Warnings:
-Warning 1366 Incorrect integer value: 'string' for column ``.``.`var1` at row 1
+Warning 1366 Incorrect integer value: 'string' for column ``.``.`var1` at row 0
SET sql_mode = DEFAULT|
CREATE PROCEDURE p2()
diff --git a/mysql-test/main/sp-row.result b/mysql-test/main/sp-row.result
index 36a371d8c04..b66455dfdb9 100644
--- a/mysql-test/main/sp-row.result
+++ b/mysql-test/main/sp-row.result
@@ -20,7 +20,7 @@ RETURN a;
END;
$$
SELECT f1(ROW(10,20));
-ERROR 21000: Operand should contain 1 column(s)
+ERROR HY000: Cannot cast 'row' as 'int' in assignment of `f1(ROW(10,20))`
DROP FUNCTION f1;
#
# ROW as an SP parameter
@@ -236,7 +236,7 @@ SELECT f1(a);
END;
$$
CALL p1();
-ERROR 21000: Operand should contain 1 column(s)
+ERROR HY000: Cannot cast 'row' as 'int' in assignment of `a`
DROP PROCEDURE p1;
DROP FUNCTION f1;
#
@@ -286,7 +286,7 @@ RETURN rec;
END;
$$
SELECT f1(10);
-ERROR 21000: Operand should contain 1 column(s)
+ERROR HY000: Cannot cast 'row' as 'int' in assignment of `f1(10)`
DROP FUNCTION f1;
#
# Using the entire ROW in SELECT..CREATE
diff --git a/mysql-test/main/sp-row.test b/mysql-test/main/sp-row.test
index 527ff9455bd..c49ea293bfe 100644
--- a/mysql-test/main/sp-row.test
+++ b/mysql-test/main/sp-row.test
@@ -27,7 +27,7 @@ BEGIN
END;
$$
DELIMITER ;$$
---error ER_OPERAND_COLUMNS
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
SELECT f1(ROW(10,20));
DROP FUNCTION f1;
@@ -307,7 +307,7 @@ BEGIN
END;
$$
DELIMITER ;$$
---error ER_OPERAND_COLUMNS
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
CALL p1();
DROP PROCEDURE p1;
DROP FUNCTION f1;
@@ -393,7 +393,7 @@ BEGIN
END;
$$
DELIMITER ;$$
---error ER_OPERAND_COLUMNS
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
SELECT f1(10);
DROP FUNCTION f1;
diff --git a/mysql-test/main/sp-vars.result b/mysql-test/main/sp-vars.result
index 2ee3f730788..a5616b9e231 100644
--- a/mysql-test/main/sp-vars.result
+++ b/mysql-test/main/sp-vars.result
@@ -110,7 +110,7 @@ v7 v8 v9 v10 v11 v12 v13 v14 v15 v16
v17 v18 v19 v20
12.00 12.12 12.00 12.12
Warnings:
-Note 1265 Data truncated for column 'v20' at row 1
+Note 1265 Data truncated for column 'v20' at row 0
CALL sp_vars_check_assignment();
i1 i2 i3 i4
127 -128 127 -128
@@ -130,22 +130,22 @@ SELECT sp_vars_check_ret1();
sp_vars_check_ret1()
127
Warnings:
-Warning 1264 Out of range value for column 'sp_vars_check_ret1()' at row 1
+Warning 1264 Out of range value for column 'sp_vars_check_ret1()' at row 0
SELECT sp_vars_check_ret2();
sp_vars_check_ret2()
127
Warnings:
-Warning 1264 Out of range value for column 'sp_vars_check_ret2()' at row 1
+Warning 1264 Out of range value for column 'sp_vars_check_ret2()' at row 0
SELECT sp_vars_check_ret3();
sp_vars_check_ret3()
0
Warnings:
-Warning 1366 Incorrect integer value: 'Hello, world' for column ``.``.`sp_vars_check_ret3()` at row 1
+Warning 1366 Incorrect integer value: 'Hello, world' for column ``.``.`sp_vars_check_ret3()` at row 0
SELECT sp_vars_check_ret4();
sp_vars_check_ret4()
154.12
Warnings:
-Note 1265 Data truncated for column 'sp_vars_check_ret4()' at row 1
+Note 1265 Data truncated for column 'sp_vars_check_ret4()' at row 0
SELECT sp_vars_div_zero();
sp_vars_div_zero()
NULL
@@ -165,7 +165,7 @@ v7 v8 v9 v10 v11 v12 v13 v14 v15 v16
v17 v18 v19 v20
12.00 12.12 12.00 12.12
Warnings:
-Note 1265 Data truncated for column 'v20' at row 1
+Note 1265 Data truncated for column 'v20' at row 0
CALL sp_vars_check_assignment();
i1 i2 i3 i4
127 -128 127 -128
@@ -185,22 +185,22 @@ SELECT sp_vars_check_ret1();
sp_vars_check_ret1()
127
Warnings:
-Warning 1264 Out of range value for column 'sp_vars_check_ret1()' at row 1
+Warning 1264 Out of range value for column 'sp_vars_check_ret1()' at row 0
SELECT sp_vars_check_ret2();
sp_vars_check_ret2()
127
Warnings:
-Warning 1264 Out of range value for column 'sp_vars_check_ret2()' at row 1
+Warning 1264 Out of range value for column 'sp_vars_check_ret2()' at row 0
SELECT sp_vars_check_ret3();
sp_vars_check_ret3()
0
Warnings:
-Warning 1366 Incorrect integer value: 'Hello, world' for column ``.``.`sp_vars_check_ret3()` at row 1
+Warning 1366 Incorrect integer value: 'Hello, world' for column ``.``.`sp_vars_check_ret3()` at row 0
SELECT sp_vars_check_ret4();
sp_vars_check_ret4()
154.12
Warnings:
-Note 1265 Data truncated for column 'sp_vars_check_ret4()' at row 1
+Note 1265 Data truncated for column 'sp_vars_check_ret4()' at row 0
SELECT sp_vars_div_zero();
sp_vars_div_zero()
NULL
@@ -306,20 +306,20 @@ Calling the routines, created in TRADITIONAL mode.
---------------------------------------------------------------
CALL sp_vars_check_dflt();
-ERROR 22003: Out of range value for column 'v1' at row 1
+ERROR 22003: Out of range value for column 'v1' at row 0
CALL sp_vars_check_assignment();
-ERROR 22003: Out of range value for column 'i1' at row 1
+ERROR 22003: Out of range value for column 'i1' at row 0
SELECT sp_vars_check_ret1();
-ERROR 22003: Out of range value for column 'sp_vars_check_ret1()' at row 1
+ERROR 22003: Out of range value for column 'sp_vars_check_ret1()' at row 0
SELECT sp_vars_check_ret2();
-ERROR 22003: Out of range value for column 'sp_vars_check_ret2()' at row 1
+ERROR 22003: Out of range value for column 'sp_vars_check_ret2()' at row 0
SELECT sp_vars_check_ret3();
-ERROR 22007: Incorrect integer value: 'Hello, world' for column ``.``.`sp_vars_check_ret3()` at row 1
+ERROR 22007: Incorrect integer value: 'Hello, world' for column ``.``.`sp_vars_check_ret3()` at row 0
SELECT sp_vars_check_ret4();
sp_vars_check_ret4()
154.12
Warnings:
-Note 1265 Data truncated for column 'sp_vars_check_ret4()' at row 1
+Note 1265 Data truncated for column 'sp_vars_check_ret4()' at row 0
SELECT sp_vars_div_zero();
ERROR 22012: Division by 0
SET @@sql_mode = 'ansi';
@@ -385,7 +385,7 @@ FF
HEX(v10)
FF
Warnings:
-Warning 1264 Out of range value for column 'v5' at row 1
+Warning 1264 Out of range value for column 'v5' at row 0
DROP PROCEDURE p1;
---------------------------------------------------------------
@@ -602,7 +602,7 @@ CALL p1('alpha', 'abcdef');
x y
alpha abc
Warnings:
-Warning 1265 Data truncated for column 'y' at row 1
+Warning 1265 Data truncated for column 'y' at row 0
DROP PROCEDURE p1;
---------------------------------------------------------------
@@ -628,7 +628,7 @@ t1 CREATE TABLE "t1" (
"x" datetime DEFAULT NULL
)
Warnings:
-Warning 1265 Data truncated for column 'x' at row 1
+Warning 1265 Data truncated for column 'x' at row 0
DROP PROCEDURE p1;
---------------------------------------------------------------
@@ -777,17 +777,17 @@ SET var := arg;
SELECT arg, var;
END|
CALL p1();
-ERROR 22003: Out of range value for column 'v' at row 1
+ERROR 22003: Out of range value for column 'v' at row 0
CALL p2();
-ERROR 22003: Out of range value for column 'v' at row 1
+ERROR 22003: Out of range value for column 'v' at row 0
CALL p3();
-ERROR 22001: Data too long for column 'v' at row 1
+ERROR 22001: Data too long for column 'v' at row 0
CALL p4('aaa');
-ERROR 22001: Data too long for column 'arg' at row 1
+ERROR 22001: Data too long for column 'arg' at row 0
CALL p5('aa');
-ERROR 22001: Data too long for column 'var' at row 1
+ERROR 22001: Data too long for column 'var' at row 0
CALL p6(10);
-ERROR 22003: Out of range value for column 'var' at row 1
+ERROR 22003: Out of range value for column 'var' at row 0
SET @@sql_mode = 'ansi';
DROP PROCEDURE p1;
DROP PROCEDURE p2;
@@ -817,7 +817,7 @@ CALL p1(1929.003);
var
1929.00
Warnings:
-Note 1265 Data truncated for column 'arg' at row 1
+Note 1265 Data truncated for column 'arg' at row 0
DROP PROCEDURE p1;
---------------------------------------------------------------
@@ -950,17 +950,17 @@ CALL p1('c');
arg
Warnings:
-Warning 1265 Data truncated for column 'arg' at row 1
+Warning 1265 Data truncated for column 'arg' at row 0
CALL p2('a');
arg var
a
Warnings:
-Warning 1265 Data truncated for column 'var' at row 1
+Warning 1265 Data truncated for column 'var' at row 0
SELECT f1('a');
f1('a')
Warnings:
-Warning 1265 Data truncated for column 'f1('a')' at row 1
+Warning 1265 Data truncated for column 'f1('a')' at row 0
DROP PROCEDURE p1;
DROP PROCEDURE p2;
DROP FUNCTION f1;
@@ -1026,11 +1026,11 @@ BEGIN
SELECT arg;
END|
CALL p1((1, 2));
-ERROR 21000: Operand should contain 1 column(s)
+ERROR HY000: Cannot cast 'row' as 'tinyint' in assignment of `arg`
CALL p1((SELECT * FROM t1 LIMIT 1));
-ERROR 21000: Operand should contain 1 column(s)
+ERROR HY000: Cannot cast 'row' as 'tinyint' in assignment of `arg`
CALL p1((SELECT col1, col2 FROM t1 LIMIT 1));
-ERROR 21000: Operand should contain 1 column(s)
+ERROR HY000: Cannot cast 'row' as 'tinyint' in assignment of `arg`
DROP PROCEDURE p1;
DROP TABLE t1;
@@ -1307,7 +1307,7 @@ $$
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
- "var" char(1) DEFAULT NULL
+ "var" varchar(1) DEFAULT NULL
)
DROP TABLE t1;
#
diff --git a/mysql-test/main/sp-vars.test b/mysql-test/main/sp-vars.test
index 9edf245acbe..5e1e07888ca 100644
--- a/mysql-test/main/sp-vars.test
+++ b/mysql-test/main/sp-vars.test
@@ -1221,13 +1221,13 @@ BEGIN
END|
delimiter ;|
---error ER_OPERAND_COLUMNS
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
CALL p1((1, 2));
---error ER_OPERAND_COLUMNS
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
CALL p1((SELECT * FROM t1 LIMIT 1));
---error ER_OPERAND_COLUMNS
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
CALL p1((SELECT col1, col2 FROM t1 LIMIT 1));
#
diff --git a/mysql-test/main/sp.result b/mysql-test/main/sp.result
index b14551d35c7..37fdf62a6a9 100644
--- a/mysql-test/main/sp.result
+++ b/mysql-test/main/sp.result
@@ -255,7 +255,7 @@ return i+1|
call sub1("sub1a", (select 7))|
call sub1("sub1b", (select max(i) from t2))|
call sub1("sub1c", (select i,d from t2 limit 1))|
-ERROR 21000: Operand should contain 1 column(s)
+ERROR HY000: Cannot cast 'row' as 'int' in assignment of `x`
call sub1("sub1d", (select 1 from (select 1) a))|
call sub2("sub2")|
select * from t1 order by id|
@@ -3073,14 +3073,14 @@ select bug9775('a'),bug9775('b'),bug9775('c')|
bug9775('a') bug9775('b') bug9775('c')
a b
Warnings:
-Warning 1265 Data truncated for column 'bug9775('c')' at row 1
+Warning 1265 Data truncated for column 'bug9775('c')' at row 0
drop function bug9775|
create function bug9775(v1 int) returns enum('a','b') return v1|
select bug9775(1),bug9775(2),bug9775(3)|
bug9775(1) bug9775(2) bug9775(3)
a b
Warnings:
-Warning 1265 Data truncated for column 'bug9775(3)' at row 1
+Warning 1265 Data truncated for column 'bug9775(3)' at row 0
drop function bug9775|
create function bug9775(v1 char(1)) returns set('a','b') return v1|
select bug9775('a'),bug9775('b'),bug9775('a,b'),bug9775('c')|
@@ -3088,14 +3088,14 @@ bug9775('a') bug9775('b') bug9775('a,b') bug9775('c')
a b a
Warnings:
Warning 1265 Data truncated for column 'v1' at row 1
-Warning 1265 Data truncated for column 'bug9775('c')' at row 1
+Warning 1265 Data truncated for column 'bug9775('c')' at row 0
drop function bug9775|
create function bug9775(v1 int) returns set('a','b') return v1|
select bug9775(1),bug9775(2),bug9775(3),bug9775(4)|
bug9775(1) bug9775(2) bug9775(3) bug9775(4)
a b a,b
Warnings:
-Warning 1265 Data truncated for column 'bug9775(4)' at row 1
+Warning 1265 Data truncated for column 'bug9775(4)' at row 0
drop function bug9775|
drop function if exists bug8861|
create function bug8861(v1 int) returns year return v1|
@@ -3118,10 +3118,10 @@ create procedure bug9004_2(x char(16))
call bug9004_1(x)|
call bug9004_1('12345678901234567')|
Warnings:
-Warning 1265 Data truncated for column 'x' at row 1
+Warning 1265 Data truncated for column 'x' at row 0
call bug9004_2('12345678901234567890')|
Warnings:
-Warning 1265 Data truncated for column 'x' at row 1
+Warning 1265 Data truncated for column 'x' at row 0
delete from t1|
drop procedure bug9004_1|
drop procedure bug9004_2|
@@ -4591,7 +4591,7 @@ call bug15231_3()|
Result
Missed it (correct)
Level Code Message
-Warning 1366 Incorrect decimal value: 'zap' for column ``.``.`x` at row 1
+Warning 1366 Incorrect decimal value: 'zap' for column ``.``.`x` at row 0
Result
Caught it (correct)
call bug15231_5()|
@@ -6438,7 +6438,7 @@ DROP TABLE t1;
CALL p1('text');
Warnings:
-Warning 1265 Data truncated for column 'v' at row 1
+Warning 1265 Data truncated for column 'v' at row 0
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -6458,7 +6458,7 @@ DROP TABLE t1;
CALL p2('text');
Warnings:
-Warning 1366 Incorrect integer value: 'text' for column ``.``.`v` at row 1
+Warning 1366 Incorrect integer value: 'text' for column ``.``.`v` at row 0
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -7070,10 +7070,10 @@ CALL p1(4, 'a');
1
1
Warnings:
-Warning 1265 Data truncated for column 'b' at row 1
-Warning 1265 Data truncated for column 'b' at row 1
-Warning 1265 Data truncated for column 'b' at row 1
-Warning 1265 Data truncated for column 'b' at row 1
+Warning 1265 Data truncated for column 'b' at row 0
+Warning 1265 Data truncated for column 'b' at row 0
+Warning 1265 Data truncated for column 'b' at row 0
+Warning 1265 Data truncated for column 'b' at row 0
SET @@max_sp_recursion_depth= @save_max_sp_recursion;
DROP PROCEDURE p1;
DROP PROCEDURE IF EXISTS p1;
@@ -7091,7 +7091,7 @@ CAST('10 ' as UNSIGNED INTEGER)
1
1
Warnings:
-Warning 1265 Data truncated for column 'a' at row 1
+Warning 1265 Data truncated for column 'a' at row 0
Note 1292 Truncated incorrect INTEGER value: '10 '
DROP PROCEDURE p1;
DROP PROCEDURE IF EXISTS p1;
@@ -7144,7 +7144,7 @@ SELECT f1();
f1()
a
Warnings:
-Warning 1265 Data truncated for column 'f4()' at row 1
+Warning 1265 Data truncated for column 'f4()' at row 0
DROP FUNCTION f1;
DROP FUNCTION f2;
DROP FUNCTION f3;
@@ -8932,3 +8932,15 @@ ERROR 42000: PROCEDURE does not support subqueries or stored functions
DROP TABLE t1;
# End of 10.4 tests
#
+#
+# MDEV-28129: MariaDB UAF issue at lex_end_nops(LEX*)
+#
+CREATE PROCEDURE sp() SELECT 1 INTO @;
+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 '' at line 1
+CREATE PROCEDURE sp() SET @=1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '=1' at line 1
+CREATE PROCEDURE sp() SELECT @;
+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 '' at line 1
+#
+# End of 10.7 tests
+#
diff --git a/mysql-test/main/sp.test b/mysql-test/main/sp.test
index 5713f22defa..f195ba2f3fa 100644
--- a/mysql-test/main/sp.test
+++ b/mysql-test/main/sp.test
@@ -387,7 +387,7 @@ create function sub3(i int) returns int deterministic
call sub1("sub1a", (select 7))|
call sub1("sub1b", (select max(i) from t2))|
---error ER_OPERAND_COLUMNS
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
call sub1("sub1c", (select i,d from t2 limit 1))|
call sub1("sub1d", (select 1 from (select 1) a))|
call sub2("sub2")|
@@ -10507,3 +10507,20 @@ DROP TABLE t1;
--echo # End of 10.4 tests
--echo #
+
+--echo #
+--echo # MDEV-28129: MariaDB UAF issue at lex_end_nops(LEX*)
+--echo #
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp() SELECT 1 INTO @;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp() SET @=1;
+
+--error ER_PARSE_ERROR
+CREATE PROCEDURE sp() SELECT @;
+
+--echo #
+--echo # End of 10.7 tests
+--echo #
diff --git a/mysql-test/main/trigger.result b/mysql-test/main/trigger.result
index 55ca537f992..410c5a53ce2 100644
--- a/mysql-test/main/trigger.result
+++ b/mysql-test/main/trigger.result
@@ -2308,18 +2308,20 @@ DROP TABLE t1, t2;
set time_zone="+00:00";
SET TIMESTAMP=UNIX_TIMESTAMP('2001-01-01 10:20:30');
SET @@session.sql_mode = 'STRICT_ALL_TABLES,STRICT_TRANS_TABLES';
+set @rpt=1;
CREATE TABLE t1 (c CHAR(1) NOT NULL);
CREATE TRIGGER t1_bi
BEFORE INSERT
ON t1
FOR EACH ROW
BEGIN
-SET NEW.c = 'www';
+SET NEW.c = repeat(@rpt,@rpt);
+set @rpt=@rpt+1;
END;
|
SET @@session.sql_mode = default;
-INSERT INTO t1 VALUES ('a');
-ERROR 22001: Data too long for column 'c' at row 1
+INSERT INTO t1 VALUES ('a'),('b');
+ERROR 22001: Data too long for column 'c' at row 0
show create trigger t1_bi;
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
t1_bi STRICT_TRANS_TABLES,STRICT_ALL_TABLES CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi
@@ -2327,7 +2329,8 @@ BEFORE INSERT
ON t1
FOR EACH ROW
BEGIN
-SET NEW.c = 'www';
+SET NEW.c = repeat(@rpt,@rpt);
+set @rpt=@rpt+1;
END latin1 latin1_swedish_ci latin1_swedish_ci 2001-01-01 10:20:30.00
DROP TRIGGER t1_bi;
DROP TABLE t1;
diff --git a/mysql-test/main/trigger.test b/mysql-test/main/trigger.test
index 16d117e7342..f2f2001eb37 100644
--- a/mysql-test/main/trigger.test
+++ b/mysql-test/main/trigger.test
@@ -2628,6 +2628,7 @@ DROP TABLE t1, t2;
set time_zone="+00:00";
SET TIMESTAMP=UNIX_TIMESTAMP('2001-01-01 10:20:30');
SET @@session.sql_mode = 'STRICT_ALL_TABLES,STRICT_TRANS_TABLES';
+set @rpt=1;
CREATE TABLE t1 (c CHAR(1) NOT NULL);
DELIMITER |;
CREATE TRIGGER t1_bi
@@ -2635,13 +2636,14 @@ CREATE TRIGGER t1_bi
ON t1
FOR EACH ROW
BEGIN
- SET NEW.c = 'www';
+ SET NEW.c = repeat(@rpt,@rpt);
+ set @rpt=@rpt+1;
END;
|
DELIMITER ;|
SET @@session.sql_mode = default;
--error ER_DATA_TOO_LONG
-INSERT INTO t1 VALUES ('a');
+INSERT INTO t1 VALUES ('a'),('b'); # this is a BUG, must be "at row 2"
show create trigger t1_bi;
DROP TRIGGER t1_bi;
DROP TABLE t1;
diff --git a/mysql-test/main/truncate_notembedded.result b/mysql-test/main/truncate_notembedded.result
index 67beb79707c..e8bf6c2575b 100644
--- a/mysql-test/main/truncate_notembedded.result
+++ b/mysql-test/main/truncate_notembedded.result
@@ -5,7 +5,7 @@
CREATE TABLE t1 (a INT) ENGINE=MyISAM;
LOCK TABLE t1 READ;
connect con1,localhost,root,,test;
-SET SESSION max_session_mem_used= 45500;
+SET SESSION max_session_mem_used= 8192;
LOCK TABLE t1 WRITE;
connection default;
SELECT * FROM t1;
@@ -13,6 +13,7 @@ a
UNLOCK TABLES;
connection con1;
TRUNCATE TABLE t1;
+ERROR HY000: The MariaDB server is running with the --max-session-mem-used=8192 option so it cannot execute this statement
disconnect con1;
connection default;
DROP TABLE t1;
diff --git a/mysql-test/main/truncate_notembedded.test b/mysql-test/main/truncate_notembedded.test
index 8b6d2becfa9..70da48f5a4f 100644
--- a/mysql-test/main/truncate_notembedded.test
+++ b/mysql-test/main/truncate_notembedded.test
@@ -9,7 +9,7 @@ CREATE TABLE t1 (a INT) ENGINE=MyISAM;
LOCK TABLE t1 READ;
--connect (con1,localhost,root,,test)
-SET SESSION max_session_mem_used= 45500;
+SET SESSION max_session_mem_used= 8192;
--send
LOCK TABLE t1 WRITE;
@@ -20,10 +20,7 @@ UNLOCK TABLES;
--connection con1
--error 0,ER_OPTION_PREVENTS_STATEMENT
--reap
-# This may work or fail as different servers uses different amount of
-# memory and the statement may work or not. What is important is that we
-# don't get a crash here!
---error 0,ER_OPTION_PREVENTS_STATEMENT
+--error ER_OPTION_PREVENTS_STATEMENT
TRUNCATE TABLE t1;
--disconnect con1
diff --git a/mysql-test/main/type_date.result b/mysql-test/main/type_date.result
index abd777f3520..0a9da9eb8aa 100644
--- a/mysql-test/main/type_date.result
+++ b/mysql-test/main/type_date.result
@@ -391,7 +391,7 @@ call test5041();
d
2013-09-21
Warnings:
-Note 1265 Data truncated for column 'd' at row 1
+Note 1265 Data truncated for column 'd' at row 0
drop procedure test5041;
SET @@timestamp=DEFAULT;
#
diff --git a/mysql-test/main/type_datetime.result b/mysql-test/main/type_datetime.result
index 2293050292a..3e864d0ffa9 100644
--- a/mysql-test/main/type_datetime.result
+++ b/mysql-test/main/type_datetime.result
@@ -199,7 +199,7 @@ CAST(CAST('10:11:12.098700' AS TIME(6)) AS DECIMAL(20,6))
set @org_mode=@@sql_mode;
create table t1 (da date default '1962-03-03 23:33:34', dt datetime default '1962-03-03');
Warnings:
-Note 1265 Data truncated for column 'da' at row 1
+Note 1265 Data truncated for column 'da' at row 0
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -595,7 +595,7 @@ 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');
Warnings:
-Note 1265 Data truncated for column 'da' at row 1
+Note 1265 Data truncated for column 'da' at row 0
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/main/type_decimal.result b/mysql-test/main/type_decimal.result
index 29067f8f5a5..3643dbea272 100644
--- a/mysql-test/main/type_decimal.result
+++ b/mysql-test/main/type_decimal.result
@@ -1091,7 +1091,7 @@ a
Warnings:
Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
Warning 1292 Truncated incorrect DECIMAL value: '.00000000000000000000000000000000000001e111111111111111111111'
-Warning 1264 Out of range value for column 'a' at row 1
+Warning 1264 Out of range value for column 'a' at row 0
CREATE TABLE t1 (str VARCHAR(128), comment VARCHAR(128));
INSERT INTO t1 VALUES
('0e111111111111111111111', 'Zero mantissa and a huge positive exponent'),
@@ -1152,13 +1152,13 @@ CAST(str AS DECIMAL(38,0))
Level Code Message
Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
Warning 1292 Truncated incorrect DECIMAL value: '1e111111111111111111111'
-Warning 1264 Out of range value for column 'CAST(str AS DECIMAL(38,0))' at row 1
+Warning 1264 Out of range value for column 'CAST(str AS DECIMAL(38,0))' at row 2
CAST(CONCAT(str,'garbage') AS DECIMAL(38,0))
99999999999999999999999999999999999999
Level Code Message
Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
Warning 1292 Truncated incorrect DECIMAL value: '1e111111111111111111111garbage'
-Warning 1264 Out of range value for column 'CAST(CONCAT(str,'garbage') AS DECIMAL(38,0))' at row 1
+Warning 1264 Out of range value for column 'CAST(CONCAT(str,'garbage') AS DECIMAL(38,0))' at row 2
DROP TABLE t1;
#
# End of 10.2 tests
diff --git a/mysql-test/main/type_enum.result b/mysql-test/main/type_enum.result
index f9300b81b39..9e313f5b302 100644
--- a/mysql-test/main/type_enum.result
+++ b/mysql-test/main/type_enum.result
@@ -2353,3 +2353,34 @@ a FLOOR(a) CEILING(a) TRUNCATE(a,0) ROUND(a)
999999999999999999999999999999999999999999999999999999999999 1 1 1 1
DROP TABLE t2;
DROP TABLE t1;
+#
+# MDEV-29062 Wrong result set metadata for a mix of INT+ENUM
+#
+CREATE TABLE t1
+(
+c_int INT,
+c_enum ENUM('1')
+);
+CREATE TABLE t2 AS SELECT c_int FROM t1 UNION SELECT c_enum FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c_int` varchar(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+DROP TABLE t2;
+CREATE OR REPLACE TABLE t2 AS SELECT COALESCE(c_int, c_enum) FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `COALESCE(c_int, c_enum)` varchar(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+DROP TABLE t2;
+SELECT c_int FROM t1 UNION SELECT c_enum FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def c_int c_int 253 11 0 Y 0 0 8
+c_int
+SELECT COALESCE(c_int, c_enum) FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def COALESCE(c_int, c_enum) 253 11 0 Y 0 39 8
+COALESCE(c_int, c_enum)
+DROP TABLE t1;
diff --git a/mysql-test/main/type_enum.test b/mysql-test/main/type_enum.test
index 6ff3e257feb..2d6938c27ae 100644
--- a/mysql-test/main/type_enum.test
+++ b/mysql-test/main/type_enum.test
@@ -551,3 +551,31 @@ SHOW CREATE TABLE t2;
SELECT * FROM t2;
DROP TABLE t2;
DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-29062 Wrong result set metadata for a mix of INT+ENUM
+--echo #
+
+CREATE TABLE t1
+(
+ c_int INT,
+ c_enum ENUM('1')
+);
+
+CREATE TABLE t2 AS SELECT c_int FROM t1 UNION SELECT c_enum FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t2;
+
+CREATE OR REPLACE TABLE t2 AS SELECT COALESCE(c_int, c_enum) FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t2;
+
+--disable_ps_protocol
+--enable_metadata
+SELECT c_int FROM t1 UNION SELECT c_enum FROM t1;
+SELECT COALESCE(c_int, c_enum) FROM t1;
+--disable_metadata
+--enable_ps_protocol
+
+DROP TABLE t1;
diff --git a/mysql-test/main/type_geometry_mix_int.result b/mysql-test/main/type_geometry_mix_int.result
new file mode 100644
index 00000000000..773eaabc65a
--- /dev/null
+++ b/mysql-test/main/type_geometry_mix_int.result
@@ -0,0 +1,351 @@
+#
+# Start of 10.7 tests
+#
+#
+# MDEV-28918 Implicit cast from INET6 UNSIGNED works differently on UPDATE vs ALTER
+#
+CREATE TABLE t1 (target GEOMETRY DEFAULT POINT(1,1), source INT DEFAULT 0);
+# Start of type_store_assignment_incompatible.inc
+SET @sql_mode_save= @@sql_mode;
+SET @source_type= (SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS
+WHERE COLUMN_NAME='source'
+ AND TABLE_NAME='t1'
+ AND TABLE_SCHEMA='test');
+SET @target_type= (SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS
+WHERE COLUMN_NAME='target'
+ AND TABLE_NAME='t1'
+ AND TABLE_SCHEMA='test');
+SET @ignore= CASE WHEN @ignore IS NULL OR @ignore = '' THEN ''
+ WHEN @ignore NOT LIKE ' %' THEN CONCAT(' ',@ignore)
+ELSE @ignore
+END;
+CREATE TABLE t2 LIKE t1;
+ALTER TABLE t2 ADD id INT NOT NULL PRIMARY KEY FIRST;
+INSERT INTO t2 VALUES (1,DEFAULT,DEFAULT);
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `id` int(11) NOT NULL,
+ `target` geometry DEFAULT point(1,1),
+ `source` int(11) DEFAULT 0,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+CREATE TABLE t3 LIKE t2;
+INSERT INTO t3 VALUES
+(1,
+(SELECT source FROM t2 ORDER BY id LIMIT 1),
+(SELECT source FROM t2 ORDER BY id LIMIT 1));
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
+DROP TABLE t3;
+SET sql_mode='';
+CREATE TABLE t3 LIKE t2;
+ALTER TABLE t3 ENGINE=MyISAM;
+EXECUTE IMMEDIATE
+CONCAT('CREATE VIEW v3 AS SELECT id,',
+IF(@target_type='geometry','AsText(target)','target'), ' AS target,',
+IF(@source_type='geometry','AsText(source)','source'), ' AS source ',
+' FROM t3');
+INSERT INTO t3 VALUES
+(1,
+(SELECT target FROM t2 ORDER BY id LIMIT 1),
+(SELECT source FROM t2 ORDER BY id LIMIT 1)),
+(2,
+(SELECT source FROM t2 ORDER BY id LIMIT 1),
+(SELECT source FROM t2 ORDER BY id LIMIT 1));
+ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
+SELECT * FROM v3;
+id target source
+1 POINT(1 1) 0
+TRUNCATE TABLE t3;
+SET sql_mode=STRICT_ALL_TABLES;
+INSERT INTO t3 VALUES
+(1,
+(SELECT target FROM t2 ORDER BY id LIMIT 1),
+(SELECT source FROM t2 ORDER BY id LIMIT 1)),
+(2,
+(SELECT source FROM t2 ORDER BY id LIMIT 1),
+(SELECT source FROM t2 ORDER BY id LIMIT 1));
+ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
+SELECT * FROM v3;
+id target source
+1 POINT(1 1) 0
+TRUNCATE TABLE t3;
+SET sql_mode=@sql_mode_save;
+DROP TABLE t3;
+DROP VIEW v3;
+CREATE TABLE t3 LIKE t2;
+INSERT INTO t3 SELECT id,source,source FROM t2;
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
+INSERT INTO t3 (id,target,source) SELECT id,source,source FROM t2;
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
+INSERT INTO t3 VALUES (1,DEFAULT,DEFAULT) ON DUPLICATE KEY UPDATE target=source;
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
+INSERT INTO t3 (id,target,source) VALUES (1,DEFAULT,DEFAULT) ON DUPLICATE KEY UPDATE target=source;
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
+INSERT INTO t3 SELECT 1,DEFAULT(t2.target),DEFAULT(t2.source) FROM t2 ON DUPLICATE KEY UPDATE t3.target=t2.source;
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
+INSERT INTO t3 (id,target,source) SELECT 1,DEFAULT(t2.target),DEFAULT(t2.source) FROM t2 ON DUPLICATE KEY UPDATE t3.target=t2.source;
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
+UPDATE t3 SET target=source;
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
+UPDATE t2, t3 SET t3.target=t2.source WHERE t2.id=t3.id;
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
+SET @alter=CONCAT('ALTER', @ignore, ' TABLE t3 MODIFY target ', @source_type);
+SELECT @alter;
+@alter
+ALTER TABLE t3 MODIFY target int(11)
+EXECUTE IMMEDIATE @alter;
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
+DROP TABLE t3;
+DROP TABLE t2;
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE src int(11) DEFAULT NULL;
+DECLARE dst geometry DEFAULT NULL;
+SET dst=src;
+END;
+$$
+CALL p1;
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `dst`
+DROP PROCEDURE p1;
+CREATE FUNCTION f1(a geometry) RETURNS INT RETURN NULL;;
+SELECT f1((SELECT source FROM t1 ORDER BY source LIMIT 1));
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `a`
+DROP FUNCTION f1;
+CREATE PROCEDURE p1(a geometry) BEGIN END;;
+CALL p1((SELECT source FROM t1 ORDER BY source LIMIT 1));
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `a`
+DROP PROCEDURE p1;
+CREATE PROCEDURE p1(OUT dst geometry)
+BEGIN
+DECLARE src int(11) DEFAULT NULL;
+SET dst=src;
+END;
+$$
+CREATE PROCEDURE p2()
+BEGIN
+DECLARE dst geometry DEFAULT NULL;
+CALL p1(dst);
+END;
+$$
+CALL p2();
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `dst`
+SHOW WARNINGS;
+Level Code Message
+Error 4078 Cannot cast 'int' as 'geometry' in assignment of `dst`
+Note 4094 At line 4 in test.p1
+Note 4094 At line 4 in test.p2
+DROP PROCEDURE p2;
+DROP PROCEDURE p1;
+CREATE FUNCTION f1() RETURNS geometry
+BEGIN
+DECLARE rc int(11) DEFAULT NULL;
+RETURN rc;
+END;
+$$
+SELECT f1();
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `f1()`
+DROP FUNCTION f1;
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE src int(11) DEFAULT NULL;
+DECLARE cur1 CURSOR(t geometry) FOR SELECT * FROM t1 WHERE target=t;
+OPEN cur1(src);
+CLOSE cur1;
+END;
+$$
+CALL p1();
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `t`
+DROP PROCEDURE p1;
+CREATE TABLE t2 LIKE t1;
+INSERT INTO t2 VALUES ();
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE dst geometry DEFAULT NULL;
+DECLARE cur2 CURSOR FOR SELECT source FROM t2 ORDER BY source LIMIT 1;
+OPEN cur2;
+FETCH cur2 INTO dst;
+CLOSE cur2;
+END;
+$$
+CALL p1();
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `dst`
+DROP PROCEDURE p1;
+DROP TABLE t2;
+# End of type_store_assignment_incompatible.inc
+DROP TABLE t1;
+CREATE TABLE t1 (target INT DEFAULT 0, source GEOMETRY DEFAULT POINT(1,1));
+# Start of type_store_assignment_incompatible.inc
+SET @sql_mode_save= @@sql_mode;
+SET @source_type= (SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS
+WHERE COLUMN_NAME='source'
+ AND TABLE_NAME='t1'
+ AND TABLE_SCHEMA='test');
+SET @target_type= (SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS
+WHERE COLUMN_NAME='target'
+ AND TABLE_NAME='t1'
+ AND TABLE_SCHEMA='test');
+SET @ignore= CASE WHEN @ignore IS NULL OR @ignore = '' THEN ''
+ WHEN @ignore NOT LIKE ' %' THEN CONCAT(' ',@ignore)
+ELSE @ignore
+END;
+CREATE TABLE t2 LIKE t1;
+ALTER TABLE t2 ADD id INT NOT NULL PRIMARY KEY FIRST;
+INSERT INTO t2 VALUES (1,DEFAULT,DEFAULT);
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `id` int(11) NOT NULL,
+ `target` int(11) DEFAULT 0,
+ `source` geometry DEFAULT point(1,1),
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+CREATE TABLE t3 LIKE t2;
+INSERT INTO t3 VALUES
+(1,
+(SELECT source FROM t2 ORDER BY id LIMIT 1),
+(SELECT source FROM t2 ORDER BY id LIMIT 1));
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
+DROP TABLE t3;
+SET sql_mode='';
+CREATE TABLE t3 LIKE t2;
+ALTER TABLE t3 ENGINE=MyISAM;
+EXECUTE IMMEDIATE
+CONCAT('CREATE VIEW v3 AS SELECT id,',
+IF(@target_type='geometry','AsText(target)','target'), ' AS target,',
+IF(@source_type='geometry','AsText(source)','source'), ' AS source ',
+' FROM t3');
+INSERT INTO t3 VALUES
+(1,
+(SELECT target FROM t2 ORDER BY id LIMIT 1),
+(SELECT source FROM t2 ORDER BY id LIMIT 1)),
+(2,
+(SELECT source FROM t2 ORDER BY id LIMIT 1),
+(SELECT source FROM t2 ORDER BY id LIMIT 1));
+Warnings:
+Warning 1366 Incorrect integer value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF0?\x00\x00\x00\x00\x00\x00\xF0?' for column `test`.`t3`.`target` at row 2
+SELECT * FROM v3;
+id target source
+1 0 POINT(1 1)
+2 0 POINT(1 1)
+TRUNCATE TABLE t3;
+SET sql_mode=STRICT_ALL_TABLES;
+INSERT INTO t3 VALUES
+(1,
+(SELECT target FROM t2 ORDER BY id LIMIT 1),
+(SELECT source FROM t2 ORDER BY id LIMIT 1)),
+(2,
+(SELECT source FROM t2 ORDER BY id LIMIT 1),
+(SELECT source FROM t2 ORDER BY id LIMIT 1));
+ERROR 22007: Incorrect integer value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF0?\x00\x00\x00\x00\x00\x00\xF0?' for column `test`.`t3`.`target` at row 2
+SELECT * FROM v3;
+id target source
+1 0 POINT(1 1)
+TRUNCATE TABLE t3;
+SET sql_mode=@sql_mode_save;
+DROP TABLE t3;
+DROP VIEW v3;
+CREATE TABLE t3 LIKE t2;
+INSERT INTO t3 SELECT id,source,source FROM t2;
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
+INSERT INTO t3 (id,target,source) SELECT id,source,source FROM t2;
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
+INSERT INTO t3 VALUES (1,DEFAULT,DEFAULT) ON DUPLICATE KEY UPDATE target=source;
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
+INSERT INTO t3 (id,target,source) VALUES (1,DEFAULT,DEFAULT) ON DUPLICATE KEY UPDATE target=source;
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
+INSERT INTO t3 SELECT 1,DEFAULT(t2.target),DEFAULT(t2.source) FROM t2 ON DUPLICATE KEY UPDATE t3.target=t2.source;
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
+INSERT INTO t3 (id,target,source) SELECT 1,DEFAULT(t2.target),DEFAULT(t2.source) FROM t2 ON DUPLICATE KEY UPDATE t3.target=t2.source;
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
+UPDATE t3 SET target=source;
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
+UPDATE t2, t3 SET t3.target=t2.source WHERE t2.id=t3.id;
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
+SET @alter=CONCAT('ALTER', @ignore, ' TABLE t3 MODIFY target ', @source_type);
+SELECT @alter;
+@alter
+ALTER TABLE t3 MODIFY target geometry
+EXECUTE IMMEDIATE @alter;
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
+DROP TABLE t3;
+DROP TABLE t2;
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE src geometry DEFAULT NULL;
+DECLARE dst int(11) DEFAULT NULL;
+SET dst=src;
+END;
+$$
+CALL p1;
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `dst`
+DROP PROCEDURE p1;
+CREATE FUNCTION f1(a int(11)) RETURNS INT RETURN NULL;;
+SELECT f1((SELECT source FROM t1 ORDER BY source LIMIT 1));
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `a`
+DROP FUNCTION f1;
+CREATE PROCEDURE p1(a int(11)) BEGIN END;;
+CALL p1((SELECT source FROM t1 ORDER BY source LIMIT 1));
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `a`
+DROP PROCEDURE p1;
+CREATE PROCEDURE p1(OUT dst int(11))
+BEGIN
+DECLARE src geometry DEFAULT NULL;
+SET dst=src;
+END;
+$$
+CREATE PROCEDURE p2()
+BEGIN
+DECLARE dst int(11) DEFAULT NULL;
+CALL p1(dst);
+END;
+$$
+CALL p2();
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `dst`
+SHOW WARNINGS;
+Level Code Message
+Error 4078 Cannot cast 'geometry' as 'int' in assignment of `dst`
+Note 4094 At line 4 in test.p1
+Note 4094 At line 4 in test.p2
+DROP PROCEDURE p2;
+DROP PROCEDURE p1;
+CREATE FUNCTION f1() RETURNS int(11)
+BEGIN
+DECLARE rc geometry DEFAULT NULL;
+RETURN rc;
+END;
+$$
+SELECT f1();
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `f1()`
+DROP FUNCTION f1;
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE src geometry DEFAULT NULL;
+DECLARE cur1 CURSOR(t int(11)) FOR SELECT * FROM t1 WHERE target=t;
+OPEN cur1(src);
+CLOSE cur1;
+END;
+$$
+CALL p1();
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `t`
+DROP PROCEDURE p1;
+CREATE TABLE t2 LIKE t1;
+INSERT INTO t2 VALUES ();
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE dst int(11) DEFAULT NULL;
+DECLARE cur2 CURSOR FOR SELECT source FROM t2 ORDER BY source LIMIT 1;
+OPEN cur2;
+FETCH cur2 INTO dst;
+CLOSE cur2;
+END;
+$$
+CALL p1();
+ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `dst`
+DROP PROCEDURE p1;
+DROP TABLE t2;
+# End of type_store_assignment_incompatible.inc
+DROP TABLE t1;
+#
+# End of 10.7 tests
+#
diff --git a/mysql-test/main/type_geometry_mix_int.test b/mysql-test/main/type_geometry_mix_int.test
new file mode 100644
index 00000000000..1c64a13e1e8
--- /dev/null
+++ b/mysql-test/main/type_geometry_mix_int.test
@@ -0,0 +1,19 @@
+--echo #
+--echo # Start of 10.7 tests
+--echo #
+
+--echo #
+--echo # MDEV-28918 Implicit cast from INET6 UNSIGNED works differently on UPDATE vs ALTER
+--echo #
+
+CREATE TABLE t1 (target GEOMETRY DEFAULT POINT(1,1), source INT DEFAULT 0);
+--source include/type_mix_incompatible.inc
+DROP TABLE t1;
+
+CREATE TABLE t1 (target INT DEFAULT 0, source GEOMETRY DEFAULT POINT(1,1));
+--source include/type_mix_incompatible.inc
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.7 tests
+--echo #
diff --git a/mysql-test/main/type_newdecimal.result b/mysql-test/main/type_newdecimal.result
index 645178db2ce..1aa8c28b44a 100644
--- a/mysql-test/main/type_newdecimal.result
+++ b/mysql-test/main/type_newdecimal.result
@@ -956,14 +956,14 @@ f6 decimal unsigned not null default 199.91,
f7 decimal unsigned not null default 999.9,
f8 decimal unsigned not null default 9999.99);
Warnings:
-Note 1265 Data truncated for column 'f1' at row 1
-Note 1265 Data truncated for column 'f2' at row 1
-Note 1265 Data truncated for column 'f3' at row 1
-Note 1265 Data truncated for column 'f4' at row 1
-Note 1265 Data truncated for column 'f5' at row 1
-Note 1265 Data truncated for column 'f6' at row 1
-Note 1265 Data truncated for column 'f7' at row 1
-Note 1265 Data truncated for column 'f8' at row 1
+Note 1265 Data truncated for column 'f1' at row 0
+Note 1265 Data truncated for column 'f2' at row 0
+Note 1265 Data truncated for column 'f3' at row 0
+Note 1265 Data truncated for column 'f4' at row 0
+Note 1265 Data truncated for column 'f5' at row 0
+Note 1265 Data truncated for column 'f6' at row 0
+Note 1265 Data truncated for column 'f7' at row 0
+Note 1265 Data truncated for column 'f8' at row 0
insert into t1 (f1) values (1);
select * from t1;
f1 f2 f3 f4 f5 f6 f7 f8
@@ -1458,8 +1458,8 @@ cast(a as DECIMAL(3,2))
9.99
Warnings:
Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
-Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
-Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
+Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 2
+Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 3
select cast(a as DECIMAL(3,2)), count(*)
from (select 11.1233 as a
UNION select 11.1234
@@ -1470,8 +1470,8 @@ cast(a as DECIMAL(3,2)) count(*)
Warnings:
Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
-Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
-Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
+Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 2
+Warning 1264 Out of range value for column 'cast(a as DECIMAL(3,2))' at row 3
create table t1 (s varchar(100));
insert into t1 values (0.00000000010000000000000000364321973154977415791655470655996396089904010295867919921875);
drop table t1;
@@ -2292,7 +2292,7 @@ a
DROP TABLE t1;
CREATE TABLE t1 (a DECIMAL(2,1) DEFAULT '1e-10000');
Warnings:
-Note 1265 Data truncated for column 'a' at row 1
+Note 1265 Data truncated for column 'a' at row 0
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2301,7 +2301,7 @@ t1 CREATE TABLE `t1` (
DROP TABLE t1;
CREATE TABLE t1 (a DECIMAL(2,1) DEFAULT '0.1 ');
Warnings:
-Note 1265 Data truncated for column 'a' at row 1
+Note 1265 Data truncated for column 'a' at row 0
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2310,7 +2310,7 @@ t1 CREATE TABLE `t1` (
DROP TABLE t1;
CREATE TABLE t1 (a DECIMAL(2,1) DEFAULT '0.10001 ');
Warnings:
-Note 1265 Data truncated for column 'a' at row 1
+Note 1265 Data truncated for column 'a' at row 0
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2319,7 +2319,7 @@ t1 CREATE TABLE `t1` (
DROP TABLE t1;
CREATE TABLE t1 (a DECIMAL(2,1) DEFAULT '0.10001');
Warnings:
-Note 1265 Data truncated for column 'a' at row 1
+Note 1265 Data truncated for column 'a' at row 0
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2328,7 +2328,7 @@ t1 CREATE TABLE `t1` (
DROP TABLE t1;
CREATE TABLE t1 (a DECIMAL(2,1) DEFAULT 0.10001);
Warnings:
-Note 1265 Data truncated for column 'a' at row 1
+Note 1265 Data truncated for column 'a' at row 0
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2337,7 +2337,7 @@ t1 CREATE TABLE `t1` (
DROP TABLE t1;
CREATE TABLE t1 (a DECIMAL(2,1) DEFAULT 0.10001e0);
Warnings:
-Note 1265 Data truncated for column 'a' at row 1
+Note 1265 Data truncated for column 'a' at row 0
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/main/type_row.result b/mysql-test/main/type_row.result
index dc74cfc88a4..45f4fd895bf 100644
--- a/mysql-test/main/type_row.result
+++ b/mysql-test/main/type_row.result
@@ -49,3 +49,26 @@ ERROR HY000: Illegal parameter data types row and int for operation 'MOD'
#
# End of 10.5 tests
#
+#
+# Start of 10.7 tests
+#
+#
+# MDEV-29356 Assertion `0' failed in Type_handler_row::Item_save_in_field on INSERT
+#
+SET sql_mode='';
+CREATE TABLE t1 (c1 INT,c2 INT);
+CREATE TRIGGER t BEFORE INSERT ON t1 FOR EACH ROW SET NEW.c1=(SELECT * FROM t1);
+INSERT INTO t1 VALUES (0,0);
+ERROR HY000: Cannot cast 'row' as 'int' in assignment of `test`.`t1`.`c1`
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+SET sql_mode='';
+CREATE TABLE t1 (c1 INT,c2 INT) ENGINE=MyISAM;
+CREATE TRIGGER t BEFORE INSERT ON t1 FOR EACH ROW SET NEW.c1=ROW(1,1);
+INSERT INTO t1 VALUES (0,0);
+ERROR HY000: Cannot cast 'row' as 'int' in assignment of `test`.`t1`.`c1`
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+#
+# End of 10.7 tests
+#
diff --git a/mysql-test/main/type_row.test b/mysql-test/main/type_row.test
index 2a5902351e2..6f8312d5f18 100644
--- a/mysql-test/main/type_row.test
+++ b/mysql-test/main/type_row.test
@@ -60,3 +60,31 @@ SELECT ROW(1,1) % 1;
--echo #
--echo # End of 10.5 tests
--echo #
+
+--echo #
+--echo # Start of 10.7 tests
+--echo #
+
+--echo #
+--echo # MDEV-29356 Assertion `0' failed in Type_handler_row::Item_save_in_field on INSERT
+--echo #
+
+SET sql_mode='';
+CREATE TABLE t1 (c1 INT,c2 INT);
+CREATE TRIGGER t BEFORE INSERT ON t1 FOR EACH ROW SET NEW.c1=(SELECT * FROM t1);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+INSERT INTO t1 VALUES (0,0);
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+SET sql_mode='';
+CREATE TABLE t1 (c1 INT,c2 INT) ENGINE=MyISAM;
+CREATE TRIGGER t BEFORE INSERT ON t1 FOR EACH ROW SET NEW.c1=ROW(1,1);
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
+INSERT INTO t1 VALUES (0,0);
+DROP TABLE t1;
+SET sql_mode=DEFAULT;
+
+--echo #
+--echo # End of 10.7 tests
+--echo #
diff --git a/mysql-test/main/type_set.result b/mysql-test/main/type_set.result
index ea057157569..571e0d36eaf 100644
--- a/mysql-test/main/type_set.result
+++ b/mysql-test/main/type_set.result
@@ -379,3 +379,34 @@ a FLOOR(a) CEILING(a) TRUNCATE(a,0) ROUND(a)
999999999999999999999999999999999999999999999999999999999999 1 1 1 1
DROP TABLE t2;
DROP TABLE t1;
+#
+# MDEV-29062 Wrong result set metadata for a mix of INT+ENUM
+#
+CREATE TABLE t1
+(
+c_int INT,
+c_set SET('1')
+);
+CREATE TABLE t2 AS SELECT c_int FROM t1 UNION SELECT c_set FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c_int` varchar(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+DROP TABLE t2;
+CREATE OR REPLACE TABLE t2 AS SELECT COALESCE(c_int, c_set) FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `COALESCE(c_int, c_set)` varchar(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+DROP TABLE t2;
+SELECT c_int FROM t1 UNION SELECT c_set FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def c_int c_int 253 33 0 Y 0 0 33
+c_int
+SELECT COALESCE(c_int, c_set) FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def COALESCE(c_int, c_set) 253 33 0 Y 0 39 33
+COALESCE(c_int, c_set)
+DROP TABLE t1;
diff --git a/mysql-test/main/type_set.test b/mysql-test/main/type_set.test
index 2d0c81340ae..b79a3fff452 100644
--- a/mysql-test/main/type_set.test
+++ b/mysql-test/main/type_set.test
@@ -261,3 +261,31 @@ SHOW CREATE TABLE t2;
SELECT * FROM t2;
DROP TABLE t2;
DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-29062 Wrong result set metadata for a mix of INT+ENUM
+--echo #
+
+CREATE TABLE t1
+(
+ c_int INT,
+ c_set SET('1')
+);
+
+CREATE TABLE t2 AS SELECT c_int FROM t1 UNION SELECT c_set FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t2;
+
+CREATE OR REPLACE TABLE t2 AS SELECT COALESCE(c_int, c_set) FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t2;
+
+--disable_ps_protocol
+--enable_metadata
+SELECT c_int FROM t1 UNION SELECT c_set FROM t1;
+SELECT COALESCE(c_int, c_set) FROM t1;
+--disable_metadata
+--enable_ps_protocol
+
+DROP TABLE t1;
diff --git a/mysql-test/main/type_time_hires.result b/mysql-test/main/type_time_hires.result
index 5fa9d11591a..7ec77db87d6 100644
--- a/mysql-test/main/type_time_hires.result
+++ b/mysql-test/main/type_time_hires.result
@@ -271,8 +271,8 @@ create table t1 (a time(6), b time(6));
create procedure foo(x time, y time(4)) insert into t1 values (x, y);
call foo('2010-02-03 4:5:6.789123', '2010-02-03 4:5:6.789123');
Warnings:
-Note 1265 Data truncated for column 'x' at row 1
-Note 1265 Data truncated for column 'y' at row 1
+Note 1265 Data truncated for column 'x' at row 0
+Note 1265 Data truncated for column 'y' at row 0
select * from t1;
a b
04:05:06.000000 04:05:06.789100
@@ -284,7 +284,7 @@ insert t1 values (b, c + interval a microsecond);
end|
call bar(1111111, '2011-01-02 3:4:5.123456');
Warnings:
-Note 1265 Data truncated for column 'c' at row 1
+Note 1265 Data truncated for column 'c' at row 0
select * from t1;
a b
04:05:06.000000 04:05:06.789100
@@ -297,7 +297,7 @@ select xyz('1:1:1.010101');
xyz('1:1:1.010101')
11:11:11.1111
Warnings:
-Note 1265 Data truncated for column 'xyz('1:1:1.010101')' at row 1
+Note 1265 Data truncated for column 'xyz('1:1:1.010101')' at row 0
drop function xyz;
create view v1 as select * from t1 group by a,b;
select * from v1;
diff --git a/mysql-test/main/type_varchar.result b/mysql-test/main/type_varchar.result
index d00531018a4..ea31dddabda 100644
--- a/mysql-test/main/type_varchar.result
+++ b/mysql-test/main/type_varchar.result
@@ -709,14 +709,14 @@ CREATE TABLE t1 (c VARCHAR(1) DEFAULT 'foo');
ERROR 42000: Invalid default value for 'c'
SHOW WARNINGS;
Level Code Message
-Warning 1265 Data truncated for column 'c' at row 1
+Warning 1265 Data truncated for column 'c' at row 0
Error 1067 Invalid default value for 'c'
SET sql_mode='STRICT_ALL_TABLES';
CREATE TABLE t1 (c VARCHAR(1) DEFAULT 'foo');
ERROR 42000: Invalid default value for 'c'
SHOW WARNINGS;
Level Code Message
-Warning 1265 Data truncated for column 'c' at row 1
+Warning 1265 Data truncated for column 'c' at row 0
Error 1067 Invalid default value for 'c'
CREATE TABLE t1 (c VARCHAR(1));
SET sql_mode='';
@@ -724,14 +724,14 @@ ALTER TABLE t1 ALTER column c SET DEFAULT 'foo';
ERROR 42000: Invalid default value for 'c'
SHOW WARNINGS;
Level Code Message
-Warning 1265 Data truncated for column 'c' at row 1
+Warning 1265 Data truncated for column 'c' at row 0
Error 1067 Invalid default value for 'c'
SET sql_mode='STRICT_ALL_TABLES';
ALTER TABLE t1 ALTER column c SET DEFAULT 'foo';
ERROR 42000: Invalid default value for 'c'
SHOW WARNINGS;
Level Code Message
-Warning 1265 Data truncated for column 'c' at row 1
+Warning 1265 Data truncated for column 'c' at row 0
Error 1067 Invalid default value for 'c'
DROP TABLE t1;
SET sql_mode=DEFAULT;
diff --git a/mysql-test/main/union.test b/mysql-test/main/union.test
index 28cc9bb004e..a6b054a848f 100644
--- a/mysql-test/main/union.test
+++ b/mysql-test/main/union.test
@@ -1896,7 +1896,7 @@ set @save_default_storage_engine=@@default_storage_engine;
SET @@default_storage_engine=MEMORY;
CREATE TABLE t1 SELECT NULL UNION SELECT NULL;
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
ALTER TABLE t1 ADD INDEX (`PRIMARY`);
CREATE TABLE t2 SELECT NULL;
diff --git a/mysql-test/suite/archive/archive_gis.result b/mysql-test/suite/archive/archive_gis.result
index b629f09f5f2..a137888662f 100644
--- a/mysql-test/suite/archive/archive_gis.result
+++ b/mysql-test/suite/archive/archive_gis.result
@@ -452,9 +452,9 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
drop table t1;
create table t1 (pk integer primary key auto_increment, fl geometry not null);
insert into t1 (fl) values (1);
-ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 (fl) values (1.11);
-ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
+ERROR HY000: Cannot cast 'decimal' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 (fl) values ("qwerty");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values (pointfromtext('point(1,1)'));
diff --git a/mysql-test/suite/atomic/alter_partition,innodb.rdiff b/mysql-test/suite/atomic/alter_partition,innodb.rdiff
new file mode 100644
index 00000000000..571136eb626
--- /dev/null
+++ b/mysql-test/suite/atomic/alter_partition,innodb.rdiff
@@ -0,0 +1,525 @@
+--- alter_partition.result
++++ alter_partition,innodb.reject
+@@ -17,12 +17,9 @@
+ end $
+ # QUERY: ALTER TABLE t1 CONVERT PARTITION p1 TO TABLE tp1
+ # CRASH: crash_create_before_create_frm
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+ Table Create Table
+@@ -38,12 +35,9 @@
+ 12
+ 22
+ # CRASH: crash_alter_partition_after_create_frm
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+ Table Create Table
+@@ -59,12 +53,9 @@
+ 12
+ 22
+ # CRASH: crash_alter_partition_after_write_frm
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+ Table Create Table
+@@ -80,12 +71,9 @@
+ 12
+ 22
+ # CRASH: crash_convert_partition_1
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+ Table Create Table
+@@ -101,12 +89,9 @@
+ 12
+ 22
+ # CRASH: crash_convert_partition_2
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+ Table Create Table
+@@ -122,12 +107,9 @@
+ 12
+ 22
+ # CRASH: crash_convert_partition_3
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+ Table Create Table
+@@ -143,12 +125,9 @@
+ 12
+ 22
+ # CRASH: crash_convert_partition_4
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+ Table Create Table
+@@ -164,12 +143,9 @@
+ 12
+ 22
+ # CRASH: crash_convert_partition_5
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+ Table Create Table
+@@ -185,12 +161,9 @@
+ 12
+ 22
+ # CRASH: crash_convert_partition_6
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+ Table Create Table
+@@ -206,12 +179,9 @@
+ 12
+ 22
+ # CRASH: crash_convert_partition_7
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+ Table Create Table
+@@ -227,12 +197,9 @@
+ 12
+ 22
+ # CRASH: crash_convert_partition_8
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+ Table Create Table
+@@ -248,15 +215,12 @@
+ 12
+ 22
+ # CRASH: crash_convert_partition_9
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+-tp1.MYD
+-tp1.MYI
+ tp1.frm
++tp1.ibd
+ master-bin.000001 # Query # # use `test`; ALTER TABLE t1 CONVERT PARTITION p1 TO TABLE tp1
+ Table Create Table
+ t1 CREATE TABLE `t1` (
+@@ -275,15 +239,12 @@
+ x
+ 12
+ # CRASH: crash_convert_partition_10
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+-tp1.MYD
+-tp1.MYI
+ tp1.frm
++tp1.ibd
+ master-bin.000001 # Query # # use `test`; ALTER TABLE t1 CONVERT PARTITION p1 TO TABLE tp1
+ Table Create Table
+ t1 CREATE TABLE `t1` (
+@@ -302,15 +263,12 @@
+ x
+ 12
+ # CRASH: crash_convert_partition_11
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+-tp1.MYD
+-tp1.MYI
+ tp1.frm
++tp1.ibd
+ master-bin.000001 # Query # # use `test`; ALTER TABLE t1 CONVERT PARTITION p1 TO TABLE tp1
+ Table Create Table
+ t1 CREATE TABLE `t1` (
+@@ -330,14 +288,10 @@
+ 12
+ # QUERY: ALTER TABLE t1 CONVERT TABLE tp2 TO PARTITION p2 values less than (40)
+ # NO CRASH: crash_create_before_create_frm
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#p2.MYD
+-t1#P#p2.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#p2.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+ master-bin.000001 # Query # # use `test`; ALTER TABLE t1 CONVERT TABLE tp2 TO PARTITION p2 values less than (40)
+@@ -357,14 +311,10 @@
+ 32
+ 39
+ # NO CRASH: crash_alter_partition_after_create_frm
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#p2.MYD
+-t1#P#p2.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#p2.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+ master-bin.000001 # Query # # use `test`; ALTER TABLE t1 CONVERT TABLE tp2 TO PARTITION p2 values less than (40)
+@@ -384,14 +334,10 @@
+ 32
+ 39
+ # NO CRASH: crash_alter_partition_after_write_frm
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#p2.MYD
+-t1#P#p2.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#p2.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+ master-bin.000001 # Query # # use `test`; ALTER TABLE t1 CONVERT TABLE tp2 TO PARTITION p2 values less than (40)
+@@ -411,17 +357,13 @@
+ 32
+ 39
+ # CRASH: crash_convert_partition_1
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+-tp2.MYD
+-tp2.MYI
+ tp2.frm
++tp2.ibd
+ Table Create Table
+ t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+@@ -442,17 +384,13 @@
+ 32
+ 39
+ # CRASH: crash_convert_partition_2
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+-tp2.MYD
+-tp2.MYI
+ tp2.frm
++tp2.ibd
+ Table Create Table
+ t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+@@ -473,17 +411,13 @@
+ 32
+ 39
+ # CRASH: crash_convert_partition_3
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+-tp2.MYD
+-tp2.MYI
+ tp2.frm
++tp2.ibd
+ Table Create Table
+ t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+@@ -504,17 +438,13 @@
+ 32
+ 39
+ # CRASH: crash_convert_partition_4
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+-tp2.MYD
+-tp2.MYI
+ tp2.frm
++tp2.ibd
+ Table Create Table
+ t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+@@ -535,17 +465,13 @@
+ 32
+ 39
+ # CRASH: crash_convert_partition_5
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+-tp2.MYD
+-tp2.MYI
+ tp2.frm
++tp2.ibd
+ Table Create Table
+ t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+@@ -566,17 +492,13 @@
+ 32
+ 39
+ # CRASH: crash_convert_partition_6
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+-tp2.MYD
+-tp2.MYI
+ tp2.frm
++tp2.ibd
+ Table Create Table
+ t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+@@ -597,17 +519,13 @@
+ 32
+ 39
+ # CRASH: crash_convert_partition_7
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+-tp2.MYD
+-tp2.MYI
+ tp2.frm
++tp2.ibd
+ Table Create Table
+ t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+@@ -628,17 +546,13 @@
+ 32
+ 39
+ # CRASH: crash_convert_partition_8
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+-tp2.MYD
+-tp2.MYI
+ tp2.frm
++tp2.ibd
+ Table Create Table
+ t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+@@ -659,14 +573,10 @@
+ 32
+ 39
+ # CRASH: crash_convert_partition_9
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#p2.MYD
+-t1#P#p2.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#p2.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+ master-bin.000001 # Query # # use `test`; ALTER TABLE t1 CONVERT TABLE tp2 TO PARTITION p2 values less than (40)
+@@ -686,14 +596,10 @@
+ 32
+ 39
+ # CRASH: crash_convert_partition_10
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#p2.MYD
+-t1#P#p2.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#p2.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+ master-bin.000001 # Query # # use `test`; ALTER TABLE t1 CONVERT TABLE tp2 TO PARTITION p2 values less than (40)
+@@ -713,14 +619,10 @@
+ 32
+ 39
+ # CRASH: crash_convert_partition_11
+-t1#P#p0.MYD
+-t1#P#p0.MYI
+-t1#P#p1.MYD
+-t1#P#p1.MYI
+-t1#P#p2.MYD
+-t1#P#p2.MYI
+-t1#P#pn.MYD
+-t1#P#pn.MYI
++t1#P#p0.ibd
++t1#P#p1.ibd
++t1#P#p2.ibd
++t1#P#pn.ibd
+ t1.frm
+ t1.par
+ master-bin.000001 # Query # # use `test`; ALTER TABLE t1 CONVERT TABLE tp2 TO PARTITION p2 values less than (40)
diff --git a/mysql-test/suite/atomic/alter_partition.combinations b/mysql-test/suite/atomic/alter_partition.combinations
new file mode 100644
index 00000000000..898d2f2f332
--- /dev/null
+++ b/mysql-test/suite/atomic/alter_partition.combinations
@@ -0,0 +1,6 @@
+[innodb]
+innodb
+
+[myisam]
+
+[aria]
diff --git a/mysql-test/suite/atomic/alter_partition.result b/mysql-test/suite/atomic/alter_partition.result
new file mode 100644
index 00000000000..c4af43ad1bd
--- /dev/null
+++ b/mysql-test/suite/atomic/alter_partition.result
@@ -0,0 +1,743 @@
+# Crash recovery
+create or replace procedure prepare_table(r int)
+begin
+create or replace table t1 (x int)
+with system versioning
+partition by range(x) (
+partition p0 values less than (10),
+partition p1 values less than (20),
+partition pn values less than (30));
+insert into t1 values (2), (12), (22);
+if r > 1 then
+create or replace table tp2 (x int)
+with system versioning;
+insert into tp2 values (32), (39);
+end if;
+flush tables;
+end $
+# QUERY: ALTER TABLE t1 CONVERT PARTITION p1 TO TABLE tp1
+# CRASH: crash_create_before_create_frm
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+# CRASH: crash_alter_partition_after_create_frm
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+# CRASH: crash_alter_partition_after_write_frm
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+# CRASH: crash_convert_partition_1
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+# CRASH: crash_convert_partition_2
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+# CRASH: crash_convert_partition_3
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+# CRASH: crash_convert_partition_4
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+# CRASH: crash_convert_partition_5
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+# CRASH: crash_convert_partition_6
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+# CRASH: crash_convert_partition_7
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+# CRASH: crash_convert_partition_8
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+# CRASH: crash_convert_partition_9
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+tp1.MYD
+tp1.MYI
+tp1.frm
+master-bin.000001 # Query # # use `test`; ALTER TABLE t1 CONVERT PARTITION p1 TO TABLE tp1
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE)
+x
+2
+22
+Table Create Table
+tp1 CREATE TABLE `tp1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+x
+12
+# CRASH: crash_convert_partition_10
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+tp1.MYD
+tp1.MYI
+tp1.frm
+master-bin.000001 # Query # # use `test`; ALTER TABLE t1 CONVERT PARTITION p1 TO TABLE tp1
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE)
+x
+2
+22
+Table Create Table
+tp1 CREATE TABLE `tp1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+x
+12
+# CRASH: crash_convert_partition_11
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+tp1.MYD
+tp1.MYI
+tp1.frm
+master-bin.000001 # Query # # use `test`; ALTER TABLE t1 CONVERT PARTITION p1 TO TABLE tp1
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE)
+x
+2
+22
+Table Create Table
+tp1 CREATE TABLE `tp1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+x
+12
+# QUERY: ALTER TABLE t1 CONVERT TABLE tp2 TO PARTITION p2 values less than (40)
+# NO CRASH: crash_create_before_create_frm
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+master-bin.000001 # Query # # use `test`; ALTER TABLE t1 CONVERT TABLE tp2 TO PARTITION p2 values less than (40)
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p2` VALUES LESS THAN (40) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+32
+39
+# NO CRASH: crash_alter_partition_after_create_frm
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+master-bin.000001 # Query # # use `test`; ALTER TABLE t1 CONVERT TABLE tp2 TO PARTITION p2 values less than (40)
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p2` VALUES LESS THAN (40) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+32
+39
+# NO CRASH: crash_alter_partition_after_write_frm
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+master-bin.000001 # Query # # use `test`; ALTER TABLE t1 CONVERT TABLE tp2 TO PARTITION p2 values less than (40)
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p2` VALUES LESS THAN (40) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+32
+39
+# CRASH: crash_convert_partition_1
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+tp2.MYD
+tp2.MYI
+tp2.frm
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+Table Create Table
+tp2 CREATE TABLE `tp2` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+x
+32
+39
+# CRASH: crash_convert_partition_2
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+tp2.MYD
+tp2.MYI
+tp2.frm
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+Table Create Table
+tp2 CREATE TABLE `tp2` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+x
+32
+39
+# CRASH: crash_convert_partition_3
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+tp2.MYD
+tp2.MYI
+tp2.frm
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+Table Create Table
+tp2 CREATE TABLE `tp2` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+x
+32
+39
+# CRASH: crash_convert_partition_4
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+tp2.MYD
+tp2.MYI
+tp2.frm
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+Table Create Table
+tp2 CREATE TABLE `tp2` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+x
+32
+39
+# CRASH: crash_convert_partition_5
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+tp2.MYD
+tp2.MYI
+tp2.frm
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+Table Create Table
+tp2 CREATE TABLE `tp2` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+x
+32
+39
+# CRASH: crash_convert_partition_6
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+tp2.MYD
+tp2.MYI
+tp2.frm
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+Table Create Table
+tp2 CREATE TABLE `tp2` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+x
+32
+39
+# CRASH: crash_convert_partition_7
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+tp2.MYD
+tp2.MYI
+tp2.frm
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+Table Create Table
+tp2 CREATE TABLE `tp2` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+x
+32
+39
+# CRASH: crash_convert_partition_8
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+tp2.MYD
+tp2.MYI
+tp2.frm
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+Table Create Table
+tp2 CREATE TABLE `tp2` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+x
+32
+39
+# CRASH: crash_convert_partition_9
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+master-bin.000001 # Query # # use `test`; ALTER TABLE t1 CONVERT TABLE tp2 TO PARTITION p2 values less than (40)
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p2` VALUES LESS THAN (40) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+32
+39
+# CRASH: crash_convert_partition_10
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+master-bin.000001 # Query # # use `test`; ALTER TABLE t1 CONVERT TABLE tp2 TO PARTITION p2 values less than (40)
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p2` VALUES LESS THAN (40) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+32
+39
+# CRASH: crash_convert_partition_11
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+master-bin.000001 # Query # # use `test`; ALTER TABLE t1 CONVERT TABLE tp2 TO PARTITION p2 values less than (40)
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p1` VALUES LESS THAN (20) ENGINE = DEFAULT_ENGINE,
+ PARTITION `pn` VALUES LESS THAN (30) ENGINE = DEFAULT_ENGINE,
+ PARTITION `p2` VALUES LESS THAN (40) ENGINE = DEFAULT_ENGINE)
+x
+2
+12
+22
+32
+39
+Warnings:
+Note 1051 Unknown table 'test.t1'
diff --git a/mysql-test/suite/atomic/alter_partition.test b/mysql-test/suite/atomic/alter_partition.test
new file mode 100644
index 00000000000..23b996cf5a1
--- /dev/null
+++ b/mysql-test/suite/atomic/alter_partition.test
@@ -0,0 +1,174 @@
+--source include/have_partition.inc
+--source include/have_debug.inc
+--source include/have_sequence.inc
+--source include/binlog_combinations.inc
+--source include/have_binlog_format_row_or_statement.inc
+--source include/not_valgrind.inc
+
+let $default_engine=InnoDB;
+let $extra_option=;
+let $save_debug=`select @@debug_dbug`;
+
+if ($MTR_COMBINATION_MYISAM)
+{
+ let $default_engine=MyISAM;
+}
+if ($MTR_COMBINATION_ARIA)
+{
+ let $default_engine=Aria;
+ let $extra_option=transactional=1;
+}
+
+if ($MTR_COMBINATION_STMT)
+{
+ let $binlog_format=include/set_binlog_format_statement.sql;
+}
+if ($MTR_COMBINATION_ROW)
+{
+ let $binlog_format=include/set_binlog_format_row.sql;
+}
+
+--disable_query_log
+--eval set @@default_storage_engine=$default_engine
+--enable_query_log
+
+--echo # Crash recovery
+
+let $MYSQLD_DATADIR= `SELECT @@datadir`;
+
+let $crash_count= 14;
+let $crash_points='crash_create_before_create_frm',
+ 'crash_alter_partition_after_create_frm',
+ 'crash_alter_partition_after_write_frm',
+ 'crash_convert_partition_1',
+ 'crash_convert_partition_2',
+ 'crash_convert_partition_3',
+ 'crash_convert_partition_4',
+ 'crash_convert_partition_5',
+ 'crash_convert_partition_6',
+ 'crash_convert_partition_7',
+ 'crash_convert_partition_8',
+ 'crash_convert_partition_9',
+ 'crash_convert_partition_10',
+ 'crash_convert_partition_11';
+
+#let $crash_count= 1;
+#let $crash_points= 'crash_convert_partition_10';
+
+let $statement_count= 2;
+let $statements= 'ALTER TABLE t1 CONVERT PARTITION p1 TO TABLE tp1',
+ 'ALTER TABLE t1 CONVERT TABLE tp2 TO PARTITION p2 values less than (40)';
+
+#let $statement_count= 1;
+#let $statements= 'ALTER TABLE t1 CONVERT TABLE tp2 TO PARTITION p2 values less than (40)';
+
+--delimiter $
+create or replace procedure prepare_table(r int)
+begin
+ create or replace table t1 (x int)
+ with system versioning
+ partition by range(x) (
+ partition p0 values less than (10),
+ partition p1 values less than (20),
+ partition pn values less than (30));
+ insert into t1 values (2), (12), (22);
+
+ if r > 1 then
+ create or replace table tp2 (x int)
+ with system versioning;
+ insert into tp2 values (32), (39);
+ end if;
+
+ flush tables;
+end $
+--delimiter ;
+
+let $old_debug=`select @@debug_dbug`;
+
+let $keep_include_silent=1;
+let $grep_script=ALTER;
+--disable_query_log
+
+let $r=0;
+while ($r < $statement_count)
+{
+ inc $r;
+ let $statement=`select ELT($r, $statements)`;
+ --echo # QUERY: $statement
+
+ let $c=0;
+ while ($c < $crash_count)
+ {
+ inc $c;
+ let $crash=`select ELT($c, $crash_points)`;
+
+ --eval set @@default_storage_engine=$default_engine
+ eval call prepare_table($r);
+ if (!$c)
+ {
+ lock tables t1 write;
+ }
+
+ --source $binlog_format
+
+ RESET MASTER;
+ --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+ --disable_reconnect
+ --eval set @@debug_dbug="+d,$crash"
+ let $errno=0;
+ --error 0,2013
+ --eval $statement;
+ let $error=$errno;
+ --enable_reconnect
+ --source include/wait_until_connected_again.inc
+ --disable_query_log
+ --eval set @@debug_dbug="$old_debug"
+
+ if ($error == 0)
+ {
+ --echo # NO CRASH: $crash
+ }
+ if ($error)
+ {
+ --echo # CRASH: $crash
+ }
+ # Check which tables still exists
+ --replace_result MAI MYI MAD MYD
+ --list_files $MYSQLD_DATADIR/test t*
+ --replace_regex /backup-\d+/backup/
+ --list_files $MYSQLD_DATADIR/test *sql*
+ --remove_files_wildcard $MYSQLD_DATADIR/test *sql-backup-*
+
+ --let $binlog_file=master-bin.000001
+ --source include/show_binlog_events.inc
+ if ($error)
+ {
+ --let $binlog_file=master-bin.000002
+ --source include/show_binlog_events.inc
+ }
+
+ --replace_result $default_engine DEFAULT_ENGINE ' PAGE_CHECKSUM=1' ''
+ show create table t1;
+ select * from t1;
+ --replace_result $default_engine DEFAULT_ENGINE ' PAGE_CHECKSUM=1' ''
+ --error 0, ER_NO_SUCH_TABLE
+ show create table tp1;
+ --error 0, ER_NO_SUCH_TABLE
+ select * from tp1;
+ --replace_result $default_engine DEFAULT_ENGINE ' PAGE_CHECKSUM=1' ''
+ --error 0, ER_NO_SUCH_TABLE
+ show create table tp2;
+ --error 0, ER_NO_SUCH_TABLE
+ select * from tp2;
+ # Drop the tables. The warnings will show what was dropped
+ --disable_warnings
+ drop table t1;
+ drop table if exists tp1;
+ --enable_warnings
+ }
+}
+drop table if exists t1;
+drop procedure prepare_table;
+--eval set @@debug_dbug="$save_debug"
+
+--enable_query_log
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 936f604be2e..71332034b15 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
@@ -41,16 +41,16 @@ select @@global.binlog_format, @@session.binlog_format;
@@global.binlog_format @@session.binlog_format
ROW ROW
CREATE TABLE t1 (a varchar(100));
-prepare stmt1 from 'insert into t1 select concat(UUID(),?)';
+prepare stmt1 from 'insert into t1 select concat(SYS_GUID(),?)';
set @string="emergency_1_";
insert into t1 values("work_2_");
execute stmt1 using @string;
deallocate prepare stmt1;
prepare stmt1 from 'insert into t1 select ?';
-insert into t1 values(concat(UUID(),"work_3_"));
+insert into t1 values(concat(SYS_GUID(),"work_3_"));
execute stmt1 using @string;
deallocate prepare stmt1;
-insert into t1 values(concat("for_4_",UUID()));
+insert into t1 values(concat("for_4_",SYS_GUID()));
insert into t1 select "yesterday_5_";
create temporary table tmp(a char(100));
insert into tmp values("see_6_");
@@ -116,43 +116,43 @@ set binlog_format=default;
select @@global.binlog_format, @@session.binlog_format;
@@global.binlog_format @@session.binlog_format
MIXED MIXED
-prepare stmt1 from 'insert into t1 select concat(UUID(),?)';
+prepare stmt1 from 'insert into t1 select concat(SYS_GUID(),?)';
set @string="emergency_17_";
insert into t1 values("work_18_");
execute stmt1 using @string;
deallocate prepare stmt1;
prepare stmt1 from 'insert into t1 select ?';
-insert into t1 values(concat(UUID(),"work_19_"));
+insert into t1 values(concat(SYS_GUID(),"work_19_"));
execute stmt1 using @string;
deallocate prepare stmt1;
-insert into t1 values(concat("for_20_",UUID()));
+insert into t1 values(concat("for_20_",SYS_GUID()));
insert into t1 select "yesterday_21_";
prepare stmt1 from 'insert into t1 select ?';
-insert into t1 values(concat(UUID(),"work_22_"));
+insert into t1 values(concat(SYS_GUID(),"work_22_"));
execute stmt1 using @string;
deallocate prepare stmt1;
-insert into t1 values(concat("for_23_",UUID()));
+insert into t1 values(concat("for_23_",SYS_GUID()));
insert into t1 select "yesterday_24_";
-create table t2 ENGINE=MyISAM select rpad(UUID(),100,' ');
-create table t3 select 1 union select UUID();
+create table t2 ENGINE=MyISAM select rpad(SYS_GUID(),100,' ');
+create table t3 select 1 union select SYS_GUID();
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
-create table t4 select * from t1 where 3 in (select 1 union select 2 union select UUID() union select 3);
+create table t4 select * from t1 where 3 in (select 1 union select 2 union select SYS_GUID() union select 3);
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3);
Warnings:
Warning 1292 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);
+insert ignore into t5 select SYS_GUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4);
create procedure foo()
begin
insert into t1 values("work_25_");
-insert into t1 values(concat("for_26_",UUID()));
+insert into t1 values(concat("for_26_",SYS_GUID()));
insert into t1 select "yesterday_27_";
end|
create procedure foo2()
begin
-insert into t1 values(concat("emergency_28_",UUID()));
+insert into t1 values(concat("emergency_28_",SYS_GUID()));
insert into t1 values("work_29_");
-insert into t1 values(concat("for_30_",UUID()));
+insert into t1 values(concat("for_30_",SYS_GUID()));
set session binlog_format=row; # accepted for stored procs
insert into t1 values("more work_31_");
set session binlog_format=mixed;
@@ -171,7 +171,7 @@ end|
call foo();
call foo2();
call foo4("hello");
-call foo4(UUID());
+call foo4(SYS_GUID());
call foo4("world");
select foo3();
ERROR HY000: Cannot change the binary logging format inside a stored function or trigger
@@ -207,7 +207,7 @@ foo4()
deallocate prepare stmt1;
create function foo5() returns bigint unsigned
begin
-insert into t2 select UUID();
+insert into t2 select SYS_GUID();
return 100;
end|
select foo5();
@@ -229,18 +229,18 @@ end|
select foo6("foo6_1_");
foo6("foo6_1_")
100
-select foo6(concat("foo6_2_",UUID()));
-foo6(concat("foo6_2_",UUID()))
+select foo6(concat("foo6_2_",SYS_GUID()));
+foo6(concat("foo6_2_",SYS_GUID()))
100
-prepare stmt1 from 'select foo6(concat("foo6_3_",UUID()))';
+prepare stmt1 from 'select foo6(concat("foo6_3_",SYS_GUID()))';
execute stmt1;
-foo6(concat("foo6_3_",UUID()))
+foo6(concat("foo6_3_",SYS_GUID()))
100
execute stmt1;
-foo6(concat("foo6_3_",UUID()))
+foo6(concat("foo6_3_",SYS_GUID()))
100
deallocate prepare stmt1;
-create view v1 as select uuid();
+create view v1 as select SYS_GUID();
create table t11 (data varchar(255));
insert into t11 select * from v1;
insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11');
@@ -250,11 +250,11 @@ execute stmt1;
deallocate prepare stmt1;
create trigger t11_bi before insert on t11 for each row
begin
-set NEW.data = concat(NEW.data,UUID());
+set NEW.data = concat(NEW.data,SYS_GUID());
end|
insert into t11 values("try_560_");
insert delayed into t2 values("delay_1_");
-insert delayed into t2 values(concat("delay_2_",UUID()));
+insert delayed into t2 values(concat("delay_2_",SYS_GUID()));
insert delayed into t2 values("delay_6_");
insert delayed into t2 values(rand());
set @a=2.345;
@@ -356,7 +356,7 @@ alter table t1 modify a int, drop primary key;
insert into t1 values(null,"try_57_");
connection slave;
connection master;
-CREATE TEMPORARY TABLE t15 SELECT UUID();
+CREATE TEMPORARY TABLE t15 SELECT SYS_GUID();
create table t16 like t15;
INSERT INTO t16 SELECT * FROM t15;
insert into t16 values("try_65_");
@@ -427,7 +427,7 @@ DROP TABLE IF EXISTS t12;
SET SESSION BINLOG_FORMAT=MIXED;
CREATE TABLE t12 (data LONG);
LOCK TABLES t12 WRITE;
-INSERT INTO t12 VALUES(UUID());
+INSERT INTO t12 VALUES(SYS_GUID());
UNLOCK TABLES;
connection slave;
connection master;
diff --git a/mysql-test/suite/compat/oracle/r/sp-anchor-row-type-table.result b/mysql-test/suite/compat/oracle/r/sp-anchor-row-type-table.result
index 9edec669908..b878042174b 100644
--- a/mysql-test/suite/compat/oracle/r/sp-anchor-row-type-table.result
+++ b/mysql-test/suite/compat/oracle/r/sp-anchor-row-type-table.result
@@ -21,7 +21,7 @@ Table Create Table
t2 CREATE TABLE "t2" (
"a" int(11) DEFAULT NULL,
"b" text DEFAULT NULL,
- "c" char(1) DEFAULT NULL
+ "c" varchar(1) DEFAULT NULL
)
DROP PROCEDURE p2;
DROP PROCEDURE p1;
diff --git a/mysql-test/suite/compat/oracle/r/sp-cursor.result b/mysql-test/suite/compat/oracle/r/sp-cursor.result
index 2e0c43c8b87..d7e88430bc7 100644
--- a/mysql-test/suite/compat/oracle/r/sp-cursor.result
+++ b/mysql-test/suite/compat/oracle/r/sp-cursor.result
@@ -454,12 +454,12 @@ CALL p1('1b');
msg
Fetched a record a=1
Warnings:
-Warning 1265 Data truncated for column 'p_a' at row 1
+Warning 1265 Data truncated for column 'p_a' at row 0
CALL p1('b1');
msg
Fetched a record a=0
Warnings:
-Warning 1366 Incorrect integer value: 'b1' for column ``.``.`p_a` at row 1
+Warning 1366 Incorrect integer value: 'b1' for column ``.``.`p_a` at row 0
DROP PROCEDURE p1;
#
# One parameter in SELECT list + subselect
diff --git a/mysql-test/suite/compat/oracle/r/sp-param.result b/mysql-test/suite/compat/oracle/r/sp-param.result
index 3b9be4585d4..bb415bd74a7 100644
--- a/mysql-test/suite/compat/oracle/r/sp-param.result
+++ b/mysql-test/suite/compat/oracle/r/sp-param.result
@@ -152,7 +152,7 @@ begin
call p1(w,'0123456789');
end;
/
-ERROR 22001: Data too long for column 'pinout' at row 1
+ERROR 22001: Data too long for column 'pinout' at row 0
declare w varchar(20);
begin
w:='aaa';
@@ -165,7 +165,7 @@ w:='aaa';
call p1(w,'0123456789');
end;
/
-ERROR 22001: Data too long for column 'pinout' at row 1
+ERROR 22001: Data too long for column 'pinout' at row 0
declare str varchar(6000);
pout varchar(6000);
begin
@@ -184,7 +184,7 @@ call p1(pout,str);
select length(pout);
end;
/
-ERROR 22001: Data too long for column 'pinout' at row 1
+ERROR 22001: Data too long for column 'pinout' at row 0
declare str varchar(40000);
pout varchar(60000);
begin
@@ -203,7 +203,7 @@ call p1(pout,str);
select length(pout);
end;
/
-ERROR 22001: Data too long for column 'pin' at row 1
+ERROR 22001: Data too long for column 'pin' at row 0
declare str text(80000);
pout text(80000);
begin
@@ -240,7 +240,7 @@ CALL p2(11);
LENGTH(pinout)
10
Warnings:
-Warning 1265 Data truncated for column 'pinout' at row 1
+Warning 1265 Data truncated for column 'pinout' at row 0
DROP PROCEDURE p1;
DROP PROCEDURE p2;
SET sql_mode=ORACLE;
@@ -261,12 +261,12 @@ CALL p2(65535);
LENGTH(f1(str,padlen))
65532
Warnings:
-Warning 1265 Data truncated for column 'pin' at row 1
+Warning 1265 Data truncated for column 'pin' at row 0
CALL p2(65536);
LENGTH(f1(str,padlen))
65532
Warnings:
-Warning 1265 Data truncated for column 'pin' at row 1
+Warning 1265 Data truncated for column 'pin' at row 0
DROP PROCEDURE p2;
DROP FUNCTION f1;
SET sql_mode='ORACLE,STRICT_TRANS_TABLES';
@@ -290,9 +290,9 @@ CALL p2(21844);
length(pout)
21844
CALL p2(21845);
-ERROR 22001: Data too long for column 'pin' at row 1
+ERROR 22001: Data too long for column 'pin' at row 0
CALL p2(21846);
-ERROR 22001: Data too long for column 'pin' at row 1
+ERROR 22001: Data too long for column 'pin' at row 0
DROP PROCEDURE p2;
DROP PROCEDURE p1;
SET sql_mode='ORACLE,STRICT_TRANS_TABLES';
@@ -316,9 +316,9 @@ CALL p2(21844);
length(pout)
21844
CALL p2(21845);
-ERROR 22001: Data too long for column 'pin' at row 1
+ERROR 22001: Data too long for column 'pin' at row 0
CALL p2(21846);
-ERROR 22001: Data too long for column 'pin' at row 1
+ERROR 22001: Data too long for column 'pin' at row 0
DROP PROCEDURE p2;
DROP PROCEDURE p1;
SET sql_mode='ORACLE,STRICT_TRANS_TABLES';
@@ -339,13 +339,13 @@ CALL p2(65532);
LENGTH(f1(str,padlen))
65532
CALL p2(65533);
-ERROR 22001: Data too long for column 'pin' at row 1
+ERROR 22001: Data too long for column 'pin' at row 0
CALL p2(65534);
-ERROR 22001: Data too long for column 'pin' at row 1
+ERROR 22001: Data too long for column 'pin' at row 0
CALL p2(65535);
-ERROR 22001: Data too long for column 'pin' at row 1
+ERROR 22001: Data too long for column 'pin' at row 0
CALL p2(65536);
-ERROR 22001: Data too long for column 'pin' at row 1
+ERROR 22001: Data too long for column 'pin' at row 0
DROP PROCEDURE p2;
DROP FUNCTION f1;
SET sql_mode='ORACLE,STRICT_TRANS_TABLES';
@@ -366,9 +366,9 @@ CALL p2(21844);
LENGTH(f1(str,padlen))
21844
CALL p2(21845);
-ERROR 22001: Data too long for column 'pin' at row 1
+ERROR 22001: Data too long for column 'pin' at row 0
CALL p2(21846);
-ERROR 22001: Data too long for column 'pin' at row 1
+ERROR 22001: Data too long for column 'pin' at row 0
DROP PROCEDURE p2;
DROP FUNCTION f1;
SET sql_mode='ORACLE,STRICT_TRANS_TABLES';
@@ -389,9 +389,9 @@ CALL p2(21844);
LENGTH(f1(str,padlen))
21844
CALL p2(21845);
-ERROR 22001: Data too long for column 'pin' at row 1
+ERROR 22001: Data too long for column 'pin' at row 0
CALL p2(21846);
-ERROR 22001: Data too long for column 'pin' at row 1
+ERROR 22001: Data too long for column 'pin' at row 0
DROP PROCEDURE p2;
DROP FUNCTION f1;
SET sql_mode='ORACLE,STRICT_TRANS_TABLES';
@@ -412,12 +412,12 @@ CALL p2(65532);
LENGTH(f1(str,padlen))
65532
CALL p2(65533);
-ERROR 22001: Data too long for column 'pin' at row 1
+ERROR 22001: Data too long for column 'pin' at row 0
CALL p2(65534);
-ERROR 22001: Data too long for column 'pin' at row 1
+ERROR 22001: Data too long for column 'pin' at row 0
CALL p2(65535);
-ERROR 22001: Data too long for column 'pin' at row 1
+ERROR 22001: Data too long for column 'pin' at row 0
CALL p2(65536);
-ERROR 22001: Data too long for column 'pin' at row 1
+ERROR 22001: Data too long for column 'pin' at row 0
DROP PROCEDURE p2;
DROP FUNCTION f1;
diff --git a/mysql-test/suite/compat/oracle/r/sp-row.result b/mysql-test/suite/compat/oracle/r/sp-row.result
index 3ed11d7f9de..0b23f303030 100644
--- a/mysql-test/suite/compat/oracle/r/sp-row.result
+++ b/mysql-test/suite/compat/oracle/r/sp-row.result
@@ -24,7 +24,7 @@ RETURN a;
END;
$$
SELECT f1(ROW(10,20));
-ERROR 21000: Operand should contain 1 column(s)
+ERROR HY000: Cannot cast 'row' as 'int' in assignment of `f1(ROW(10,20))`
DROP FUNCTION f1;
#
# ROW as an SP parameter
@@ -261,7 +261,7 @@ SELECT f1(a);
END;
$$
CALL p1();
-ERROR 21000: Operand should contain 1 column(s)
+ERROR HY000: Cannot cast 'row' as 'int' in assignment of `a`
DROP PROCEDURE p1;
DROP FUNCTION f1;
CREATE FUNCTION f1(a INT) RETURN INT
@@ -278,7 +278,7 @@ SELECT f1(a);
END;
$$
CALL p1();
-ERROR 21000: Operand should contain 1 column(s)
+ERROR HY000: Cannot cast 'row' as 'int' in assignment of `a`
DROP PROCEDURE p1;
DROP FUNCTION f1;
#
@@ -332,7 +332,7 @@ RETURN rec;
END;
$$
SELECT f1(10);
-ERROR 21000: Operand should contain 1 column(s)
+ERROR HY000: Cannot cast 'row' as 'int' in assignment of `f1(10)`
DROP FUNCTION f1;
#
# Using the entire ROW in SELECT..CREATE
diff --git a/mysql-test/suite/compat/oracle/r/sp.result b/mysql-test/suite/compat/oracle/r/sp.result
index 2e7b21b2d75..2e212530ae5 100644
--- a/mysql-test/suite/compat/oracle/r/sp.result
+++ b/mysql-test/suite/compat/oracle/r/sp.result
@@ -1286,7 +1286,7 @@ CALL p1();
a b
127 200
Warnings:
-Warning 1264 Out of range value for column 'a' at row 1
+Warning 1264 Out of range value for column 'a' at row 0
DROP PROCEDURE p1;
DROP TABLE t1;
#
@@ -1703,8 +1703,8 @@ t2 CREATE TABLE "t2" (
"t2" text DEFAULT NULL,
"t3" mediumtext DEFAULT NULL,
"t4" longtext DEFAULT NULL,
- "enum1" char(1) DEFAULT NULL,
- "set1" char(5) DEFAULT NULL,
+ "enum1" varchar(1) DEFAULT NULL,
+ "set1" varchar(5) DEFAULT NULL,
"blob1" tinyblob DEFAULT NULL,
"blob2" longblob DEFAULT NULL,
"blob3" mediumblob DEFAULT NULL,
@@ -1865,8 +1865,8 @@ t2 CREATE TABLE "t2" (
"t2" text DEFAULT NULL,
"t3" mediumtext DEFAULT NULL,
"t4" longtext DEFAULT NULL,
- "enum1" char(1) DEFAULT NULL,
- "set1" char(5) DEFAULT NULL,
+ "enum1" varchar(1) DEFAULT NULL,
+ "set1" varchar(5) DEFAULT NULL,
"blob1" tinyblob DEFAULT NULL,
"blob2" longblob DEFAULT NULL,
"blob3" mediumblob DEFAULT NULL,
@@ -2370,7 +2370,7 @@ t1 CREATE TABLE "t1" (
"a_flt0" float DEFAULT NULL,
"a_dbl0" double DEFAULT NULL,
"a_bit3" bit(3) DEFAULT NULL,
- "a_enum0" char(1) DEFAULT NULL,
+ "a_enum0" varchar(1) DEFAULT NULL,
"a_varchar10" varchar(10) DEFAULT NULL,
"a_text1" text DEFAULT NULL,
"a_tinytext1" tinytext DEFAULT NULL,
@@ -2388,7 +2388,7 @@ t1 CREATE TABLE "t1" (
"aa_flt0" float DEFAULT NULL,
"aa_dbl0" double DEFAULT NULL,
"aa_bit3" bit(3) DEFAULT NULL,
- "aa_enum0" char(1) DEFAULT NULL,
+ "aa_enum0" varchar(1) DEFAULT NULL,
"aa_varchar10" varchar(10) DEFAULT NULL,
"aa_text1" text DEFAULT NULL,
"aa_tinytext1" tinytext DEFAULT NULL,
diff --git a/mysql-test/suite/compat/oracle/t/sp-row.test b/mysql-test/suite/compat/oracle/t/sp-row.test
index ebd0a2a2137..c7658c76838 100644
--- a/mysql-test/suite/compat/oracle/t/sp-row.test
+++ b/mysql-test/suite/compat/oracle/t/sp-row.test
@@ -35,7 +35,7 @@ BEGIN
END;
$$
DELIMITER ;$$
---error ER_OPERAND_COLUMNS
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
SELECT f1(ROW(10,20));
DROP FUNCTION f1;
@@ -334,7 +334,7 @@ BEGIN
END;
$$
DELIMITER ;$$
---error ER_OPERAND_COLUMNS
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
CALL p1();
DROP PROCEDURE p1;
DROP FUNCTION f1;
@@ -355,7 +355,7 @@ BEGIN
END;
$$
DELIMITER ;$$
---error ER_OPERAND_COLUMNS
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
CALL p1();
DROP PROCEDURE p1;
DROP FUNCTION f1;
@@ -427,7 +427,7 @@ BEGIN
END;
$$
DELIMITER ;$$
---error ER_OPERAND_COLUMNS
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
SELECT f1(10);
DROP FUNCTION f1;
diff --git a/mysql-test/suite/encryption/r/bulk_insert.result b/mysql-test/suite/encryption/r/bulk_insert.result
new file mode 100644
index 00000000000..840cb0cd38b
--- /dev/null
+++ b/mysql-test/suite/encryption/r/bulk_insert.result
@@ -0,0 +1,7 @@
+SET UNIQUE_CHECKS=0, FOREIGN_KEY_CHECKS=0;
+CREATE TABLE t1 (
+`id` int(10) unsigned NOT NULL,
+UNIQUE KEY `id` (`id`)
+) ENGINE=InnoDB;
+INSERT INTO t1 SELECT seq FROM seq_1_to_65536;
+DROP TABLE t1;
diff --git a/mysql-test/suite/encryption/r/corrupted_during_recovery.result b/mysql-test/suite/encryption/r/corrupted_during_recovery.result
index 356dce64f8d..2b29bf260e1 100644
--- a/mysql-test/suite/encryption/r/corrupted_during_recovery.result
+++ b/mysql-test/suite/encryption/r/corrupted_during_recovery.result
@@ -9,7 +9,7 @@ INSERT INTO t2 VALUES(2);
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
SELECT * FROM t1;
-ERROR 42S02: Table 'test.t1' doesn't exist in engine
+ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate.
SELECT * FROM t2;
a
2
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change.result b/mysql-test/suite/encryption/r/innodb-bad-key-change.result
index 1ca9d784d57..e2034f14e31 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change.result
@@ -1,10 +1,10 @@
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
-call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` (has an unreadable root page|is corrupted)");
+call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` has an unreadable root page");
+call mtr.add_suppression("Table .*t[12].* is corrupted");
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[12]\\.ibd' cannot be decrypted; key_version=1");
call mtr.add_suppression("failed to read \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t1.ibd looks corrupted; key_version=1");
-call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` is corrupted");
call mtr.add_suppression("File '.*mysql-test.std_data.keysbad3\\.txt' not found");
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
# Start server with keys2.txt
@@ -46,29 +46,29 @@ INSERT INTO t2 VALUES ('foobar',1,2);
SELECT * FROM t2;
ERROR 42S02: Table 'test.t2' doesn't exist in engine
SELECT * FROM t2 where id = 1;
-ERROR 42S02: Table 'test.t2' doesn't exist in engine
+ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
SELECT * FROM t2 where b = 1;
-ERROR 42S02: Table 'test.t2' doesn't exist in engine
+ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
INSERT INTO t2 VALUES ('tmp',3,3);
-ERROR 42S02: Table 'test.t2' doesn't exist in engine
+ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
DELETE FROM t2 where b = 3;
-ERROR 42S02: Table 'test.t2' doesn't exist in engine
+ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
DELETE FROM t2 where id = 3;
-ERROR 42S02: Table 'test.t2' doesn't exist in engine
+ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
UPDATE t2 set b = b +1;
-ERROR 42S02: Table 'test.t2' doesn't exist in engine
+ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
OPTIMIZE TABLE t2;
Table Op Msg_type Msg_text
-test.t2 optimize Error Table 'test.t2' doesn't exist in engine
-test.t2 optimize status Operation failed
+test.t2 optimize Error Table test/t2 is corrupted. Please drop the table and recreate.
+test.t2 optimize error Corrupt
ALTER TABLE t2 ADD COLUMN d INT;
-ERROR 42S02: Table 'test.t2' doesn't exist in engine
+ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
-test.t2 analyze Error Table 'test.t2' doesn't exist in engine
-test.t2 analyze status Operation failed
+test.t2 analyze Error Table test/t2 is corrupted. Please drop the table and recreate.
+test.t2 analyze error Corrupt
TRUNCATE TABLE t2;
-ERROR 42S02: Table 'test.t2' doesn't exist in engine
+ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate.
DROP TABLE t2;
# Start server with keys2.txt
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change2.result b/mysql-test/suite/encryption/r/innodb-bad-key-change2.result
index 46df2d440c6..7e59ad4aec3 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change2.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change2.result
@@ -1,9 +1,9 @@
-call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|is corrupted|does not exist.*is trying to rename)");
+call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|does not exist.*is trying to rename)");
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1(new)?\\.ibd' cannot be decrypted; key_version=1");
call mtr.add_suppression("InnoDB: Recovery failed to read page");
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
call mtr.add_suppression("InnoDB: Tablespace for table \`test\`.\`t1\` is set as discarded\\.");
-call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted");
+call mtr.add_suppression("Table .*t1.* is corrupted");
call mtr.add_suppression("InnoDB: Cannot delete tablespace .* because it is not found in the tablespace memory cache");
call mtr.add_suppression("InnoDB: ALTER TABLE `test`\\.`t1` DISCARD TABLESPACE failed to find tablespace");
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
@@ -19,20 +19,20 @@ SHOW WARNINGS;
Level Code Message
Error 1932 Table 'test.t1' doesn't exist in engine
ALTER TABLE t1 ENGINE=InnoDB;
-ERROR 42S02: Table 'test.t1' doesn't exist in engine
+ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate.
SHOW WARNINGS;
Level Code Message
-Error 1932 Table 'test.t1' doesn't exist in engine
+Error 1877 Table test/t1 is corrupted. Please drop the table and recreate.
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
-test.t1 optimize Error Table 'test.t1' doesn't exist in engine
-test.t1 optimize status Operation failed
+test.t1 optimize Error Table test/t1 is corrupted. Please drop the table and recreate.
+test.t1 optimize error Corrupt
SHOW WARNINGS;
Level Code Message
CHECK TABLE t1;
Table Op Msg_type Msg_text
-test.t1 check Error Table 'test.t1' doesn't exist in engine
-test.t1 check status Operation failed
+test.t1 check Error Table test/t1 is corrupted. Please drop the table and recreate.
+test.t1 check error Corrupt
SHOW WARNINGS;
Level Code Message
# restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
@@ -65,5 +65,5 @@ t1 CREATE TABLE `t1` (
RENAME TABLE t1 TO t1new;
ERROR HY000: Error on rename of './test/t1' to './test/t1new' (errno: 155 "The table does not exist in the storage engine")
ALTER TABLE t1 RENAME TO t1new;
-ERROR 42S02: Table 'test.t1' doesn't exist in engine
+ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate.
DROP TABLE t1;
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change4.result b/mysql-test/suite/encryption/r/innodb-bad-key-change4.result
index 5a3e275dda9..e808d50b544 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change4.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change4.result
@@ -1,8 +1,8 @@
-call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|is corrupted)");
+call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page)");
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1\\.ibd' cannot be decrypted; key_version=1");
call mtr.add_suppression("InnoDB: Recovery failed to read page");
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
-call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted");
+call mtr.add_suppression("Table .*t1.* is corrupted");
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
# restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
SET GLOBAL innodb_file_per_table = ON;
@@ -18,8 +18,8 @@ SHOW WARNINGS;
Level Code Message
CHECK TABLE t1;
Table Op Msg_type Msg_text
-test.t1 check Error Table 'test.t1' doesn't exist in engine
-test.t1 check status Operation failed
+test.t1 check Error Table test/t1 is corrupted. Please drop the table and recreate.
+test.t1 check error Corrupt
SHOW WARNINGS;
Level Code Message
# restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
diff --git a/mysql-test/suite/encryption/r/innodb-missing-key.result b/mysql-test/suite/encryption/r/innodb-missing-key.result
index 6bacbfe78b2..d5c1e079e96 100644
--- a/mysql-test/suite/encryption/r/innodb-missing-key.result
+++ b/mysql-test/suite/encryption/r/innodb-missing-key.result
@@ -1,8 +1,8 @@
-call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|is corrupted)");
+call mtr.add_suppression("InnoDB: Table `test`\\.`t1` has an unreadable root page");
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
call mtr.add_suppression("InnoDB: Recovery failed to read page");
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file .*test.t[12].ibd looks corrupted; key_version=1");
-call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted");
+call mtr.add_suppression("Table .*t1.* is corrupted");
# Start server with keys2.txt
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
CREATE TABLE t1(a int not null primary key auto_increment, b varchar(128)) engine=innodb ENCRYPTED=YES ENCRYPTION_KEY_ID=19;
@@ -40,9 +40,9 @@ COUNT(1)
SELECT COUNT(1) FROM t2,t1 where t2.a = t1.a;
ERROR 42S02: Table 'test.t1' doesn't exist in engine
SELECT COUNT(1) FROM t1 where b = 'ab';
-ERROR 42S02: Table 'test.t1' doesn't exist in engine
+ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate.
SELECT COUNT(1) FROM t1;
-ERROR 42S02: Table 'test.t1' doesn't exist in engine
+ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate.
# Start server with keys2.txt
# restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
diff --git a/mysql-test/suite/encryption/t/bulk_insert.opt b/mysql-test/suite/encryption/t/bulk_insert.opt
new file mode 100644
index 00000000000..95455f5f75e
--- /dev/null
+++ b/mysql-test/suite/encryption/t/bulk_insert.opt
@@ -0,0 +1 @@
+--innodb_encrypt_log=1
diff --git a/mysql-test/suite/encryption/t/bulk_insert.test b/mysql-test/suite/encryption/t/bulk_insert.test
new file mode 100644
index 00000000000..ce7804cb4e0
--- /dev/null
+++ b/mysql-test/suite/encryption/t/bulk_insert.test
@@ -0,0 +1,11 @@
+--source include/have_innodb.inc
+--source include/have_sequence.inc
+--source include/have_file_key_management_plugin.inc
+
+SET UNIQUE_CHECKS=0, FOREIGN_KEY_CHECKS=0;
+CREATE TABLE t1 (
+ `id` int(10) unsigned NOT NULL,
+ UNIQUE KEY `id` (`id`)
+) ENGINE=InnoDB;
+INSERT INTO t1 SELECT seq FROM seq_1_to_65536;
+DROP TABLE t1;
diff --git a/mysql-test/suite/encryption/t/corrupted_during_recovery.test b/mysql-test/suite/encryption/t/corrupted_during_recovery.test
index bccac2bb182..e4a31a0b478 100644
--- a/mysql-test/suite/encryption/t/corrupted_during_recovery.test
+++ b/mysql-test/suite/encryption/t/corrupted_during_recovery.test
@@ -6,7 +6,7 @@ call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page");
-call mtr.add_suppression("InnoDB: Failed to read page [123] from file '.*test.t1\\.ibd': Table is encrypted but decrypt failed");
+call mtr.add_suppression("InnoDB: Failed to read page [123] from file '.*test.t1\\.ibd': Table is compressed or encrypted but uncompress or decrypt failed");
call mtr.add_suppression("InnoDB: The page \\[page id: space=\\d+, page number=3\\] in file '.*test.t1\\.ibd' cannot be decrypted");
call mtr.add_suppression("InnoDB: Table in tablespace \\d+ encrypted. However key management plugin or used key_version \\d+ is not found or used encryption algorithm or method does not match. Can't continue opening the table.");
call mtr.add_suppression("InnoDB: (Unable to apply log to|Discarding log for) corrupted page ");
@@ -55,12 +55,12 @@ EOF
SELECT * FROM t1;
--disable_query_log
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t[1].ibd looks corrupted; key_version=");
-call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted. Please drop the table and recreate.");
+call mtr.add_suppression("Table .*t1.* is corrupted. Please drop the table and recreate.");
--enable_query_log
let $restart_parameters=--innodb_force_recovery=1 --skip-innodb-buffer-pool-load-at-startup;
--source include/restart_mysqld.inc
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
SELECT * FROM t1;
SELECT * FROM t2;
CHECK TABLE t2;
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change.test b/mysql-test/suite/encryption/t/innodb-bad-key-change.test
index 30beff4bd85..05a3b5f4d06 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change.test
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change.test
@@ -10,11 +10,11 @@
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
-call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` (has an unreadable root page|is corrupted)");
+call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` has an unreadable root page");
+call mtr.add_suppression("Table .*t[12].* is corrupted");
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[12]\\.ibd' cannot be decrypted; key_version=1");
call mtr.add_suppression("failed to read \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t1.ibd looks corrupted; key_version=1");
-call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` is corrupted");
call mtr.add_suppression("File '.*mysql-test.std_data.keysbad3\\.txt' not found");
# for innodb_checksum_algorithm=full_crc32 only
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
@@ -75,32 +75,32 @@ INSERT INTO t2 VALUES ('foobar',1,2);
--error ER_NO_SUCH_TABLE_IN_ENGINE
SELECT * FROM t2;
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
SELECT * FROM t2 where id = 1;
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
SELECT * FROM t2 where b = 1;
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
INSERT INTO t2 VALUES ('tmp',3,3);
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
DELETE FROM t2 where b = 3;
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
DELETE FROM t2 where id = 3;
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
UPDATE t2 set b = b +1;
OPTIMIZE TABLE t2;
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
ALTER TABLE t2 ADD COLUMN d INT;
ANALYZE TABLE t2;
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
TRUNCATE TABLE t2;
DROP TABLE t2;
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change2.test b/mysql-test/suite/encryption/t/innodb-bad-key-change2.test
index ad252b6c92f..21a9ddb217d 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change2.test
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change2.test
@@ -8,13 +8,13 @@
# MDEV-8768: Server crash at file btr0btr.ic line 122 when checking encrypted table using incorrect keys
# MDEV-8727: Server/InnoDB hangs on shutdown after trying to read an encrypted table with a wrong key
#
-call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|is corrupted|does not exist.*is trying to rename)");
+call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|does not exist.*is trying to rename)");
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1(new)?\\.ibd' cannot be decrypted; key_version=1");
call mtr.add_suppression("InnoDB: Recovery failed to read page");
# Suppression for builds where file_key_management plugin is linked statically
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
call mtr.add_suppression("InnoDB: Tablespace for table \`test\`.\`t1\` is set as discarded\\.");
-call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted");
+call mtr.add_suppression("Table .*t1.* is corrupted");
call mtr.add_suppression("InnoDB: Cannot delete tablespace .* because it is not found in the tablespace memory cache");
call mtr.add_suppression("InnoDB: ALTER TABLE `test`\\.`t1` DISCARD TABLESPACE failed to find tablespace");
# for innodb_checksum_algorithm=full_crc32 only
@@ -36,7 +36,7 @@ INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
SELECT * FROM t1;
--replace_regex /key_id [1-9][0-9]*/\1 /
SHOW WARNINGS;
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
ALTER TABLE t1 ENGINE=InnoDB;
--replace_regex /key_id [1-9][0-9]*/\1 /
SHOW WARNINGS;
@@ -97,7 +97,7 @@ SHOW CREATE TABLE t1;
--error ER_ERROR_ON_RENAME
RENAME TABLE t1 TO t1new;
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
ALTER TABLE t1 RENAME TO t1new;
-# Drop should pass even with incorrect keys
+# Drop should succeed even with incorrect keys
DROP TABLE t1;
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change4.test b/mysql-test/suite/encryption/t/innodb-bad-key-change4.test
index 759f4e58280..c37eb365e7c 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change4.test
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change4.test
@@ -7,12 +7,12 @@
# MDEV-8768: Server crash at file btr0btr.ic line 122 when checking encrypted table using incorrect keys
#
-call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|is corrupted)");
+call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page)");
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1\\.ibd' cannot be decrypted; key_version=1");
call mtr.add_suppression("InnoDB: Recovery failed to read page");
# Suppression for builds where file_key_management plugin is linked statically
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
-call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted");
+call mtr.add_suppression("Table .*t1.* is corrupted");
# for innodb_checksum_algorithm=full_crc32 only
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
diff --git a/mysql-test/suite/encryption/t/innodb-missing-key.test b/mysql-test/suite/encryption/t/innodb-missing-key.test
index e5bee99fee2..53fc820a1c9 100644
--- a/mysql-test/suite/encryption/t/innodb-missing-key.test
+++ b/mysql-test/suite/encryption/t/innodb-missing-key.test
@@ -7,11 +7,11 @@
# MDEV-11004: Unable to start (Segfault or os error 2) when encryption key missing
#
-call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|is corrupted)");
+call mtr.add_suppression("InnoDB: Table `test`\\.`t1` has an unreadable root page");
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
call mtr.add_suppression("InnoDB: Recovery failed to read page");
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file .*test.t[12].ibd looks corrupted; key_version=1");
-call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted");
+call mtr.add_suppression("Table .*t1.* is corrupted");
--echo # Start server with keys2.txt
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
@@ -48,9 +48,9 @@ SELECT COUNT(1) FROM t3;
SELECT COUNT(1) FROM t2;
--error ER_NO_SUCH_TABLE_IN_ENGINE
SELECT COUNT(1) FROM t2,t1 where t2.a = t1.a;
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
SELECT COUNT(1) FROM t1 where b = 'ab';
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
SELECT COUNT(1) FROM t1;
--echo
diff --git a/mysql-test/suite/engines/funcs/r/rpl_switch_stm_row_mixed.result b/mysql-test/suite/engines/funcs/r/rpl_switch_stm_row_mixed.result
index 936f604be2e..71332034b15 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_switch_stm_row_mixed.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_switch_stm_row_mixed.result
@@ -41,16 +41,16 @@ select @@global.binlog_format, @@session.binlog_format;
@@global.binlog_format @@session.binlog_format
ROW ROW
CREATE TABLE t1 (a varchar(100));
-prepare stmt1 from 'insert into t1 select concat(UUID(),?)';
+prepare stmt1 from 'insert into t1 select concat(SYS_GUID(),?)';
set @string="emergency_1_";
insert into t1 values("work_2_");
execute stmt1 using @string;
deallocate prepare stmt1;
prepare stmt1 from 'insert into t1 select ?';
-insert into t1 values(concat(UUID(),"work_3_"));
+insert into t1 values(concat(SYS_GUID(),"work_3_"));
execute stmt1 using @string;
deallocate prepare stmt1;
-insert into t1 values(concat("for_4_",UUID()));
+insert into t1 values(concat("for_4_",SYS_GUID()));
insert into t1 select "yesterday_5_";
create temporary table tmp(a char(100));
insert into tmp values("see_6_");
@@ -116,43 +116,43 @@ set binlog_format=default;
select @@global.binlog_format, @@session.binlog_format;
@@global.binlog_format @@session.binlog_format
MIXED MIXED
-prepare stmt1 from 'insert into t1 select concat(UUID(),?)';
+prepare stmt1 from 'insert into t1 select concat(SYS_GUID(),?)';
set @string="emergency_17_";
insert into t1 values("work_18_");
execute stmt1 using @string;
deallocate prepare stmt1;
prepare stmt1 from 'insert into t1 select ?';
-insert into t1 values(concat(UUID(),"work_19_"));
+insert into t1 values(concat(SYS_GUID(),"work_19_"));
execute stmt1 using @string;
deallocate prepare stmt1;
-insert into t1 values(concat("for_20_",UUID()));
+insert into t1 values(concat("for_20_",SYS_GUID()));
insert into t1 select "yesterday_21_";
prepare stmt1 from 'insert into t1 select ?';
-insert into t1 values(concat(UUID(),"work_22_"));
+insert into t1 values(concat(SYS_GUID(),"work_22_"));
execute stmt1 using @string;
deallocate prepare stmt1;
-insert into t1 values(concat("for_23_",UUID()));
+insert into t1 values(concat("for_23_",SYS_GUID()));
insert into t1 select "yesterday_24_";
-create table t2 ENGINE=MyISAM select rpad(UUID(),100,' ');
-create table t3 select 1 union select UUID();
+create table t2 ENGINE=MyISAM select rpad(SYS_GUID(),100,' ');
+create table t3 select 1 union select SYS_GUID();
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
-create table t4 select * from t1 where 3 in (select 1 union select 2 union select UUID() union select 3);
+create table t4 select * from t1 where 3 in (select 1 union select 2 union select SYS_GUID() union select 3);
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3);
Warnings:
Warning 1292 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);
+insert ignore into t5 select SYS_GUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4);
create procedure foo()
begin
insert into t1 values("work_25_");
-insert into t1 values(concat("for_26_",UUID()));
+insert into t1 values(concat("for_26_",SYS_GUID()));
insert into t1 select "yesterday_27_";
end|
create procedure foo2()
begin
-insert into t1 values(concat("emergency_28_",UUID()));
+insert into t1 values(concat("emergency_28_",SYS_GUID()));
insert into t1 values("work_29_");
-insert into t1 values(concat("for_30_",UUID()));
+insert into t1 values(concat("for_30_",SYS_GUID()));
set session binlog_format=row; # accepted for stored procs
insert into t1 values("more work_31_");
set session binlog_format=mixed;
@@ -171,7 +171,7 @@ end|
call foo();
call foo2();
call foo4("hello");
-call foo4(UUID());
+call foo4(SYS_GUID());
call foo4("world");
select foo3();
ERROR HY000: Cannot change the binary logging format inside a stored function or trigger
@@ -207,7 +207,7 @@ foo4()
deallocate prepare stmt1;
create function foo5() returns bigint unsigned
begin
-insert into t2 select UUID();
+insert into t2 select SYS_GUID();
return 100;
end|
select foo5();
@@ -229,18 +229,18 @@ end|
select foo6("foo6_1_");
foo6("foo6_1_")
100
-select foo6(concat("foo6_2_",UUID()));
-foo6(concat("foo6_2_",UUID()))
+select foo6(concat("foo6_2_",SYS_GUID()));
+foo6(concat("foo6_2_",SYS_GUID()))
100
-prepare stmt1 from 'select foo6(concat("foo6_3_",UUID()))';
+prepare stmt1 from 'select foo6(concat("foo6_3_",SYS_GUID()))';
execute stmt1;
-foo6(concat("foo6_3_",UUID()))
+foo6(concat("foo6_3_",SYS_GUID()))
100
execute stmt1;
-foo6(concat("foo6_3_",UUID()))
+foo6(concat("foo6_3_",SYS_GUID()))
100
deallocate prepare stmt1;
-create view v1 as select uuid();
+create view v1 as select SYS_GUID();
create table t11 (data varchar(255));
insert into t11 select * from v1;
insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11');
@@ -250,11 +250,11 @@ execute stmt1;
deallocate prepare stmt1;
create trigger t11_bi before insert on t11 for each row
begin
-set NEW.data = concat(NEW.data,UUID());
+set NEW.data = concat(NEW.data,SYS_GUID());
end|
insert into t11 values("try_560_");
insert delayed into t2 values("delay_1_");
-insert delayed into t2 values(concat("delay_2_",UUID()));
+insert delayed into t2 values(concat("delay_2_",SYS_GUID()));
insert delayed into t2 values("delay_6_");
insert delayed into t2 values(rand());
set @a=2.345;
@@ -356,7 +356,7 @@ alter table t1 modify a int, drop primary key;
insert into t1 values(null,"try_57_");
connection slave;
connection master;
-CREATE TEMPORARY TABLE t15 SELECT UUID();
+CREATE TEMPORARY TABLE t15 SELECT SYS_GUID();
create table t16 like t15;
INSERT INTO t16 SELECT * FROM t15;
insert into t16 values("try_65_");
@@ -427,7 +427,7 @@ DROP TABLE IF EXISTS t12;
SET SESSION BINLOG_FORMAT=MIXED;
CREATE TABLE t12 (data LONG);
LOCK TABLES t12 WRITE;
-INSERT INTO t12 VALUES(UUID());
+INSERT INTO t12 VALUES(SYS_GUID());
UNLOCK TABLES;
connection slave;
connection master;
diff --git a/mysql-test/suite/engines/funcs/r/tc_partition_reorg_divide.result b/mysql-test/suite/engines/funcs/r/tc_partition_reorg_divide.result
index 8343df73110..b1d455e610a 100644
--- a/mysql-test/suite/engines/funcs/r/tc_partition_reorg_divide.result
+++ b/mysql-test/suite/engines/funcs/r/tc_partition_reorg_divide.result
@@ -51,7 +51,7 @@ t1 CREATE TABLE `t1` (
PARTITION `p2` VALUES LESS THAN (30) ENGINE = ENGINE,
PARTITION `p3` VALUES LESS THAN MAXVALUE ENGINE = ENGINE)
ALTER TABLE t1 DROP PARTITION s2;
-ERROR HY000: Error in list of partitions to DROP
+ERROR HY000: Wrong partition name or partition list
ALTER TABLE t1 DROP PARTITION s1;
SELECT * FROM t1 ORDER BY c1;
c1 c2
@@ -132,7 +132,7 @@ t1 CREATE TABLE `t1` (
PARTITION `p2` VALUES LESS THAN (30) ENGINE = ENGINE,
PARTITION `p3` VALUES LESS THAN MAXVALUE ENGINE = ENGINE)
ALTER TABLE t1 DROP PARTITION s2;
-ERROR HY000: Error in list of partitions to DROP
+ERROR HY000: Wrong partition name or partition list
ALTER TABLE t1 DROP PARTITION s1;
SELECT * FROM t1 ORDER BY c1;
c1 c2
@@ -213,7 +213,7 @@ t1 CREATE TABLE `t1` (
PARTITION `p2` VALUES LESS THAN (30) ENGINE = ENGINE,
PARTITION `p3` VALUES LESS THAN MAXVALUE ENGINE = ENGINE)
ALTER TABLE t1 DROP PARTITION s2;
-ERROR HY000: Error in list of partitions to DROP
+ERROR HY000: Wrong partition name or partition list
ALTER TABLE t1 DROP PARTITION s1;
SELECT * FROM t1 ORDER BY c1;
c1 c2
@@ -294,7 +294,7 @@ t1 CREATE TABLE `t1` (
PARTITION `p2` VALUES LESS THAN (30) ENGINE = ENGINE,
PARTITION `p3` VALUES LESS THAN MAXVALUE ENGINE = ENGINE)
ALTER TABLE t1 DROP PARTITION s2;
-ERROR HY000: Error in list of partitions to DROP
+ERROR HY000: Wrong partition name or partition list
ALTER TABLE t1 DROP PARTITION s1;
SELECT * FROM t1 ORDER BY c1;
c1 c2
@@ -375,7 +375,7 @@ t1 CREATE TABLE `t1` (
PARTITION `p2` VALUES LESS THAN (30) ENGINE = ENGINE,
PARTITION `p3` VALUES LESS THAN MAXVALUE ENGINE = ENGINE)
ALTER TABLE t1 DROP PARTITION s2;
-ERROR HY000: Error in list of partitions to DROP
+ERROR HY000: Wrong partition name or partition list
ALTER TABLE t1 DROP PARTITION s1;
SELECT * FROM t1 ORDER BY c1;
c1 c2
@@ -456,7 +456,7 @@ t1 CREATE TABLE `t1` (
PARTITION `p2` VALUES LESS THAN (30) ENGINE = ENGINE,
PARTITION `p3` VALUES LESS THAN MAXVALUE ENGINE = ENGINE)
ALTER TABLE t1 DROP PARTITION s2;
-ERROR HY000: Error in list of partitions to DROP
+ERROR HY000: Wrong partition name or partition list
ALTER TABLE t1 DROP PARTITION s1;
SELECT * FROM t1 ORDER BY c1;
c1 c2
diff --git a/mysql-test/suite/engines/funcs/r/tc_partition_reorg_merge.result b/mysql-test/suite/engines/funcs/r/tc_partition_reorg_merge.result
index 3804f883be0..494a9dfdcdb 100644
--- a/mysql-test/suite/engines/funcs/r/tc_partition_reorg_merge.result
+++ b/mysql-test/suite/engines/funcs/r/tc_partition_reorg_merge.result
@@ -46,7 +46,7 @@ t1 CREATE TABLE `t1` (
PARTITION `m0` VALUES LESS THAN (30) ENGINE = ENGINE,
PARTITION `p3` VALUES LESS THAN MAXVALUE ENGINE = ENGINE)
ALTER TABLE t1 DROP PARTITION m1;
-ERROR HY000: Error in list of partitions to DROP
+ERROR HY000: Wrong partition name or partition list
ALTER TABLE t1 DROP PARTITION m0;
SELECT * FROM t1 ORDER BY c1;
c1 c2
@@ -117,7 +117,7 @@ t1 CREATE TABLE `t1` (
PARTITION `m0` VALUES LESS THAN (30) ENGINE = ENGINE,
PARTITION `p3` VALUES LESS THAN MAXVALUE ENGINE = ENGINE)
ALTER TABLE t1 DROP PARTITION m1;
-ERROR HY000: Error in list of partitions to DROP
+ERROR HY000: Wrong partition name or partition list
ALTER TABLE t1 DROP PARTITION m0;
SELECT * FROM t1 ORDER BY c1;
c1 c2
@@ -188,7 +188,7 @@ t1 CREATE TABLE `t1` (
PARTITION `m0` VALUES LESS THAN (30) ENGINE = ENGINE,
PARTITION `p3` VALUES LESS THAN MAXVALUE ENGINE = ENGINE)
ALTER TABLE t1 DROP PARTITION m1;
-ERROR HY000: Error in list of partitions to DROP
+ERROR HY000: Wrong partition name or partition list
ALTER TABLE t1 DROP PARTITION m0;
SELECT * FROM t1 ORDER BY c1;
c1 c2
@@ -259,7 +259,7 @@ t1 CREATE TABLE `t1` (
PARTITION `m0` VALUES LESS THAN (30) ENGINE = ENGINE,
PARTITION `p3` VALUES LESS THAN MAXVALUE ENGINE = ENGINE)
ALTER TABLE t1 DROP PARTITION m1;
-ERROR HY000: Error in list of partitions to DROP
+ERROR HY000: Wrong partition name or partition list
ALTER TABLE t1 DROP PARTITION m0;
SELECT * FROM t1 ORDER BY c1;
c1 c2
@@ -330,7 +330,7 @@ t1 CREATE TABLE `t1` (
PARTITION `m0` VALUES LESS THAN (30) ENGINE = ENGINE,
PARTITION `p3` VALUES LESS THAN MAXVALUE ENGINE = ENGINE)
ALTER TABLE t1 DROP PARTITION m1;
-ERROR HY000: Error in list of partitions to DROP
+ERROR HY000: Wrong partition name or partition list
ALTER TABLE t1 DROP PARTITION m0;
SELECT * FROM t1 ORDER BY c1;
c1 c2
@@ -401,7 +401,7 @@ t1 CREATE TABLE `t1` (
PARTITION `m0` VALUES LESS THAN (30) ENGINE = ENGINE,
PARTITION `p3` VALUES LESS THAN MAXVALUE ENGINE = ENGINE)
ALTER TABLE t1 DROP PARTITION m1;
-ERROR HY000: Error in list of partitions to DROP
+ERROR HY000: Wrong partition name or partition list
ALTER TABLE t1 DROP PARTITION m0;
SELECT * FROM t1 ORDER BY c1;
c1 c2
diff --git a/mysql-test/suite/engines/funcs/t/tc_partition_reorg_divide.test b/mysql-test/suite/engines/funcs/t/tc_partition_reorg_divide.test
index 89a75bb06af..03f4ccb23df 100644
--- a/mysql-test/suite/engines/funcs/t/tc_partition_reorg_divide.test
+++ b/mysql-test/suite/engines/funcs/t/tc_partition_reorg_divide.test
@@ -21,7 +21,7 @@ SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
---error ER_DROP_PARTITION_NON_EXISTENT
+--error ER_PARTITION_DOES_NOT_EXIST
ALTER TABLE t1 DROP PARTITION s2;
ALTER TABLE t1 DROP PARTITION s1;
SELECT * FROM t1 ORDER BY c1;
@@ -52,7 +52,7 @@ SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
---error ER_DROP_PARTITION_NON_EXISTENT
+--error ER_PARTITION_DOES_NOT_EXIST
ALTER TABLE t1 DROP PARTITION s2;
ALTER TABLE t1 DROP PARTITION s1;
SELECT * FROM t1 ORDER BY c1;
@@ -83,7 +83,7 @@ SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
---error ER_DROP_PARTITION_NON_EXISTENT
+--error ER_PARTITION_DOES_NOT_EXIST
ALTER TABLE t1 DROP PARTITION s2;
ALTER TABLE t1 DROP PARTITION s1;
SELECT * FROM t1 ORDER BY c1;
@@ -114,7 +114,7 @@ SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
---error ER_DROP_PARTITION_NON_EXISTENT
+--error ER_PARTITION_DOES_NOT_EXIST
ALTER TABLE t1 DROP PARTITION s2;
ALTER TABLE t1 DROP PARTITION s1;
SELECT * FROM t1 ORDER BY c1;
@@ -145,7 +145,7 @@ SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
---error ER_DROP_PARTITION_NON_EXISTENT
+--error ER_PARTITION_DOES_NOT_EXIST
ALTER TABLE t1 DROP PARTITION s2;
ALTER TABLE t1 DROP PARTITION s1;
SELECT * FROM t1 ORDER BY c1;
@@ -176,7 +176,7 @@ SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
---error ER_DROP_PARTITION_NON_EXISTENT
+--error ER_PARTITION_DOES_NOT_EXIST
ALTER TABLE t1 DROP PARTITION s2;
ALTER TABLE t1 DROP PARTITION s1;
SELECT * FROM t1 ORDER BY c1;
diff --git a/mysql-test/suite/engines/funcs/t/tc_partition_reorg_merge.test b/mysql-test/suite/engines/funcs/t/tc_partition_reorg_merge.test
index fe9b0ba108f..e2059ff6336 100644
--- a/mysql-test/suite/engines/funcs/t/tc_partition_reorg_merge.test
+++ b/mysql-test/suite/engines/funcs/t/tc_partition_reorg_merge.test
@@ -18,7 +18,7 @@ SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
---error ER_DROP_PARTITION_NON_EXISTENT
+--error ER_PARTITION_DOES_NOT_EXIST
ALTER TABLE t1 DROP PARTITION m1;
ALTER TABLE t1 DROP PARTITION m0;
SELECT * FROM t1 ORDER BY c1;
@@ -46,7 +46,7 @@ SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
---error ER_DROP_PARTITION_NON_EXISTENT
+--error ER_PARTITION_DOES_NOT_EXIST
ALTER TABLE t1 DROP PARTITION m1;
ALTER TABLE t1 DROP PARTITION m0;
SELECT * FROM t1 ORDER BY c1;
@@ -74,7 +74,7 @@ SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
---error ER_DROP_PARTITION_NON_EXISTENT
+--error ER_PARTITION_DOES_NOT_EXIST
ALTER TABLE t1 DROP PARTITION m1;
ALTER TABLE t1 DROP PARTITION m0;
SELECT * FROM t1 ORDER BY c1;
@@ -102,7 +102,7 @@ SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
---error ER_DROP_PARTITION_NON_EXISTENT
+--error ER_PARTITION_DOES_NOT_EXIST
ALTER TABLE t1 DROP PARTITION m1;
ALTER TABLE t1 DROP PARTITION m0;
SELECT * FROM t1 ORDER BY c1;
@@ -130,7 +130,7 @@ SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
---error ER_DROP_PARTITION_NON_EXISTENT
+--error ER_PARTITION_DOES_NOT_EXIST
ALTER TABLE t1 DROP PARTITION m1;
ALTER TABLE t1 DROP PARTITION m0;
SELECT * FROM t1 ORDER BY c1;
@@ -158,7 +158,7 @@ SHOW TABLES;
let $ENGINE=`select variable_value from information_schema.global_variables where variable_name='STORAGE_ENGINE'`;
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
---error ER_DROP_PARTITION_NON_EXISTENT
+--error ER_PARTITION_DOES_NOT_EXIST
ALTER TABLE t1 DROP PARTITION m1;
ALTER TABLE t1 DROP PARTITION m0;
SELECT * FROM t1 ORDER BY c1;
diff --git a/mysql-test/suite/federated/error_row_number.result b/mysql-test/suite/federated/error_row_number.result
new file mode 100644
index 00000000000..a53f3a87a17
--- /dev/null
+++ b/mysql-test/suite/federated/error_row_number.result
@@ -0,0 +1,26 @@
+#
+# MDEV-26654 ROW_NUMBER is wrong upon INSERT into Federated table
+#
+connect master,127.0.0.1,root,,test,$MASTER_MYPORT,;
+connect slave,127.0.0.1,root,,test,$SLAVE_MYPORT,;
+connection master;
+CREATE DATABASE federated;
+connection slave;
+CREATE DATABASE federated;
+connection master;
+create table t (pk int primary key);
+create table tfed engine=FEDERATED connection='mysql://root@localhost:$MASTER_MYPORT/test/t';
+insert into tfed values (1),(2),(1);
+ERROR 23000: Can't write; duplicate key in table 'tfed'
+get diagnostics condition 1 @val = row_number;
+# federated is doing bulk insert here, the exact row number is unknown
+select @val;
+@val
+0
+drop table tfed, t;
+connection master;
+DROP TABLE IF EXISTS federated.t1;
+DROP DATABASE IF EXISTS federated;
+connection slave;
+DROP TABLE IF EXISTS federated.t1;
+DROP DATABASE IF EXISTS federated;
diff --git a/mysql-test/suite/federated/error_row_number.test b/mysql-test/suite/federated/error_row_number.test
new file mode 100644
index 00000000000..8d943589e07
--- /dev/null
+++ b/mysql-test/suite/federated/error_row_number.test
@@ -0,0 +1,18 @@
+--echo #
+--echo # MDEV-26654 ROW_NUMBER is wrong upon INSERT into Federated table
+--echo #
+
+--source suite/federated/have_federatedx.inc
+--source include/federated.inc
+--connection master
+
+create table t (pk int primary key);
+--evalp create table tfed engine=FEDERATED connection='mysql://root@localhost:$MASTER_MYPORT/test/t'
+--error ER_DUP_KEY
+insert into tfed values (1),(2),(1);
+get diagnostics condition 1 @val = row_number;
+--echo # federated is doing bulk insert here, the exact row number is unknown
+select @val;
+
+drop table tfed, t;
+--source include/federated_cleanup.inc
diff --git a/mysql-test/suite/funcs_1/r/innodb_func_view.result b/mysql-test/suite/funcs_1/r/innodb_func_view.result
index adf4c2bc10c..b603d36f5ec 100644
--- a/mysql-test/suite/funcs_1/r/innodb_func_view.result
+++ b/mysql-test/suite/funcs_1/r/innodb_func_view.result
@@ -3322,9 +3322,9 @@ NULL NULL 1
-3333.33 -3333.3333 30
Warnings:
Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
-Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 2
Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
-Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 3
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_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_0102.result b/mysql-test/suite/funcs_1/r/innodb_trig_0102.result
index 36115ecad83..b44ef1fdee2 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_0102.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_0102.result
@@ -55,9 +55,9 @@ f174 numeric (0),
f175 numeric (64)
) engine = <engine_to_be_used>;
Warnings:
-Note 1265 Data truncated for column 'f150' at row 1
-Note 1265 Data truncated for column 'f151' at row 1
-Note 1265 Data truncated for column 'f152' at row 1
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
Testcase: 3.5.1.1:
------------------
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03.result b/mysql-test/suite/funcs_1/r/innodb_trig_03.result
index f52585cfc45..051e0d1e125 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_03.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_03.result
@@ -56,9 +56,9 @@ f174 numeric (0),
f175 numeric (64)
) engine = <engine_to_be_used>;
Warnings:
-Note 1265 Data truncated for column 'f150' at row 1
-Note 1265 Data truncated for column 'f151' at row 1
-Note 1265 Data truncated for column 'f152' at row 1
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
Testcase 3.5.3:
---------------
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_0407.result b/mysql-test/suite/funcs_1/r/innodb_trig_0407.result
index fb5d105448f..d551575960e 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_0407.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_0407.result
@@ -57,9 +57,9 @@ f174 numeric (0),
f175 numeric (64)
) engine = <engine_to_be_used>;
Warnings:
-Note 1265 Data truncated for column 'f150' at row 1
-Note 1265 Data truncated for column 'f151' at row 1
-Note 1265 Data truncated for column 'f152' at row 1
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
Testcase: 3.5:
--------------
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_08.result b/mysql-test/suite/funcs_1/r/innodb_trig_08.result
index 98613a20b49..2a57496800e 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_08.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_08.result
@@ -57,9 +57,9 @@ f174 numeric (0),
f175 numeric (64)
) engine = <engine_to_be_used>;
Warnings:
-Note 1265 Data truncated for column 'f150' at row 1
-Note 1265 Data truncated for column 'f151' at row 1
-Note 1265 Data truncated for column 'f152' at row 1
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
Testcase: 3.5:
--------------
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_09.result b/mysql-test/suite/funcs_1/r/innodb_trig_09.result
index 6664994543b..89815594a7e 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_09.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_09.result
@@ -55,9 +55,9 @@ f174 numeric (0),
f175 numeric (64)
) engine = <engine_to_be_used>;
Warnings:
-Note 1265 Data truncated for column 'f150' at row 1
-Note 1265 Data truncated for column 'f151' at row 1
-Note 1265 Data truncated for column 'f152' at row 1
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb3.txt'
into table tb3;
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result b/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result
index de9b73c2bf5..9e09c50d968 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result
@@ -55,9 +55,9 @@ f174 numeric (0),
f175 numeric (64)
) engine = <engine_to_be_used>;
Warnings:
-Note 1265 Data truncated for column 'f150' at row 1
-Note 1265 Data truncated for column 'f151' at row 1
-Note 1265 Data truncated for column 'f152' at row 1
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb3.txt'
into table tb3;
diff --git a/mysql-test/suite/funcs_1/r/is_columns_innodb.result b/mysql-test/suite/funcs_1/r/is_columns_innodb.result
index fbca906a9fb..beb8ad88de1 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_innodb.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_innodb.result
@@ -63,19 +63,19 @@ f57 numeric (0) not null DEFAULT 99,
f58 numeric (64) not null DEFAULT 99
) engine = innodb;
Warnings:
-Note 1265 Data truncated for column 'f36' at row 1
-Note 1265 Data truncated for column 'f37' at row 1
-Note 1265 Data truncated for column 'f38' at row 1
-Note 1265 Data truncated for column 'f39' at row 1
-Note 1265 Data truncated for column 'f40' at row 1
-Note 1265 Data truncated for column 'f41' at row 1
-Note 1265 Data truncated for column 'f42' at row 1
-Note 1265 Data truncated for column 'f43' at row 1
-Note 1265 Data truncated for column 'f44' at row 1
-Note 1265 Data truncated for column 'f45' at row 1
-Note 1265 Data truncated for column 'f47' at row 1
-Note 1265 Data truncated for column 'f49' at row 1
-Note 1265 Data truncated for column 'f51' at row 1
+Note 1265 Data truncated for column 'f36' at row 0
+Note 1265 Data truncated for column 'f37' at row 0
+Note 1265 Data truncated for column 'f38' at row 0
+Note 1265 Data truncated for column 'f39' at row 0
+Note 1265 Data truncated for column 'f40' at row 0
+Note 1265 Data truncated for column 'f41' at row 0
+Note 1265 Data truncated for column 'f42' at row 0
+Note 1265 Data truncated for column 'f43' at row 0
+Note 1265 Data truncated for column 'f44' at row 0
+Note 1265 Data truncated for column 'f45' at row 0
+Note 1265 Data truncated for column 'f47' at row 0
+Note 1265 Data truncated for column 'f49' at row 0
+Note 1265 Data truncated for column 'f51' at row 0
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb1.txt'
into table tb1;
drop table if exists tb2 ;
@@ -198,9 +198,9 @@ f174 numeric (0),
f175 numeric (64)
) engine = innodb;
Warnings:
-Note 1265 Data truncated for column 'f150' at row 1
-Note 1265 Data truncated for column 'f151' at row 1
-Note 1265 Data truncated for column 'f152' at row 1
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb3.txt'
into table tb3;
drop table if exists tb4;
diff --git a/mysql-test/suite/funcs_1/r/is_columns_memory.result b/mysql-test/suite/funcs_1/r/is_columns_memory.result
index 5eaa5b08cc2..b33d6a28efb 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_memory.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_memory.result
@@ -56,22 +56,22 @@ f57 numeric (0) not null DEFAULT 99,
f58 numeric (64) not null DEFAULT 99
) engine = memory;
Warnings:
-Note 1265 Data truncated for column 'f33' at row 1
-Note 1265 Data truncated for column 'f34' at row 1
-Note 1265 Data truncated for column 'f35' at row 1
-Note 1265 Data truncated for column 'f36' at row 1
-Note 1265 Data truncated for column 'f37' at row 1
-Note 1265 Data truncated for column 'f38' at row 1
-Note 1265 Data truncated for column 'f39' at row 1
-Note 1265 Data truncated for column 'f40' at row 1
-Note 1265 Data truncated for column 'f41' at row 1
-Note 1265 Data truncated for column 'f42' at row 1
-Note 1265 Data truncated for column 'f43' at row 1
-Note 1265 Data truncated for column 'f44' at row 1
-Note 1265 Data truncated for column 'f45' at row 1
-Note 1265 Data truncated for column 'f47' at row 1
-Note 1265 Data truncated for column 'f49' at row 1
-Note 1265 Data truncated for column 'f51' at row 1
+Note 1265 Data truncated for column 'f33' at row 0
+Note 1265 Data truncated for column 'f34' at row 0
+Note 1265 Data truncated for column 'f35' at row 0
+Note 1265 Data truncated for column 'f36' at row 0
+Note 1265 Data truncated for column 'f37' at row 0
+Note 1265 Data truncated for column 'f38' at row 0
+Note 1265 Data truncated for column 'f39' at row 0
+Note 1265 Data truncated for column 'f40' at row 0
+Note 1265 Data truncated for column 'f41' at row 0
+Note 1265 Data truncated for column 'f42' at row 0
+Note 1265 Data truncated for column 'f43' at row 0
+Note 1265 Data truncated for column 'f44' at row 0
+Note 1265 Data truncated for column 'f45' at row 0
+Note 1265 Data truncated for column 'f47' at row 0
+Note 1265 Data truncated for column 'f49' at row 0
+Note 1265 Data truncated for column 'f51' at row 0
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb1.txt'
into table tb1;
drop table if exists tb2 ;
@@ -188,9 +188,9 @@ f174 numeric (0),
f175 numeric (64)
) engine = memory;
Warnings:
-Note 1265 Data truncated for column 'f150' at row 1
-Note 1265 Data truncated for column 'f151' at row 1
-Note 1265 Data truncated for column 'f152' at row 1
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb3.txt'
into table tb3;
drop table if exists tb4 ;
diff --git a/mysql-test/suite/funcs_1/r/is_columns_myisam.result b/mysql-test/suite/funcs_1/r/is_columns_myisam.result
index 4426583ac4c..e7a8a176188 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_myisam.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_myisam.result
@@ -64,22 +64,22 @@ f57 numeric (0) not null DEFAULT 99,
f58 numeric (64) not null DEFAULT 99
) engine = myisam;
Warnings:
-Note 1265 Data truncated for column 'f33' at row 1
-Note 1265 Data truncated for column 'f34' at row 1
-Note 1265 Data truncated for column 'f35' at row 1
-Note 1265 Data truncated for column 'f36' at row 1
-Note 1265 Data truncated for column 'f37' at row 1
-Note 1265 Data truncated for column 'f38' at row 1
-Note 1265 Data truncated for column 'f39' at row 1
-Note 1265 Data truncated for column 'f40' at row 1
-Note 1265 Data truncated for column 'f41' at row 1
-Note 1265 Data truncated for column 'f42' at row 1
-Note 1265 Data truncated for column 'f43' at row 1
-Note 1265 Data truncated for column 'f44' at row 1
-Note 1265 Data truncated for column 'f45' at row 1
-Note 1265 Data truncated for column 'f47' at row 1
-Note 1265 Data truncated for column 'f49' at row 1
-Note 1265 Data truncated for column 'f51' at row 1
+Note 1265 Data truncated for column 'f33' at row 0
+Note 1265 Data truncated for column 'f34' at row 0
+Note 1265 Data truncated for column 'f35' at row 0
+Note 1265 Data truncated for column 'f36' at row 0
+Note 1265 Data truncated for column 'f37' at row 0
+Note 1265 Data truncated for column 'f38' at row 0
+Note 1265 Data truncated for column 'f39' at row 0
+Note 1265 Data truncated for column 'f40' at row 0
+Note 1265 Data truncated for column 'f41' at row 0
+Note 1265 Data truncated for column 'f42' at row 0
+Note 1265 Data truncated for column 'f43' at row 0
+Note 1265 Data truncated for column 'f44' at row 0
+Note 1265 Data truncated for column 'f45' at row 0
+Note 1265 Data truncated for column 'f47' at row 0
+Note 1265 Data truncated for column 'f49' at row 0
+Note 1265 Data truncated for column 'f51' at row 0
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb1.txt'
into table tb1;
drop table if exists tb2 ;
@@ -210,9 +210,9 @@ f174 numeric (0),
f175 numeric (64)
) Engine = myisam;
Warnings:
-Note 1265 Data truncated for column 'f150' at row 1
-Note 1265 Data truncated for column 'f151' at row 1
-Note 1265 Data truncated for column 'f152' at row 1
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb3.txt'
into table tb3;
drop table if exists tb4 ;
diff --git a/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result
index 6faa8d7b51a..d44732f5dd5 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result
@@ -64,22 +64,22 @@ f57 numeric (0) not null DEFAULT 99,
f58 numeric (64) not null DEFAULT 99
) engine = myisam;
Warnings:
-Note 1265 Data truncated for column 'f33' at row 1
-Note 1265 Data truncated for column 'f34' at row 1
-Note 1265 Data truncated for column 'f35' at row 1
-Note 1265 Data truncated for column 'f36' at row 1
-Note 1265 Data truncated for column 'f37' at row 1
-Note 1265 Data truncated for column 'f38' at row 1
-Note 1265 Data truncated for column 'f39' at row 1
-Note 1265 Data truncated for column 'f40' at row 1
-Note 1265 Data truncated for column 'f41' at row 1
-Note 1265 Data truncated for column 'f42' at row 1
-Note 1265 Data truncated for column 'f43' at row 1
-Note 1265 Data truncated for column 'f44' at row 1
-Note 1265 Data truncated for column 'f45' at row 1
-Note 1265 Data truncated for column 'f47' at row 1
-Note 1265 Data truncated for column 'f49' at row 1
-Note 1265 Data truncated for column 'f51' at row 1
+Note 1265 Data truncated for column 'f33' at row 0
+Note 1265 Data truncated for column 'f34' at row 0
+Note 1265 Data truncated for column 'f35' at row 0
+Note 1265 Data truncated for column 'f36' at row 0
+Note 1265 Data truncated for column 'f37' at row 0
+Note 1265 Data truncated for column 'f38' at row 0
+Note 1265 Data truncated for column 'f39' at row 0
+Note 1265 Data truncated for column 'f40' at row 0
+Note 1265 Data truncated for column 'f41' at row 0
+Note 1265 Data truncated for column 'f42' at row 0
+Note 1265 Data truncated for column 'f43' at row 0
+Note 1265 Data truncated for column 'f44' at row 0
+Note 1265 Data truncated for column 'f45' at row 0
+Note 1265 Data truncated for column 'f47' at row 0
+Note 1265 Data truncated for column 'f49' at row 0
+Note 1265 Data truncated for column 'f51' at row 0
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb1.txt'
into table tb1;
drop table if exists tb2 ;
@@ -210,9 +210,9 @@ f174 numeric (0),
f175 numeric (64)
) Engine = myisam;
Warnings:
-Note 1265 Data truncated for column 'f150' at row 1
-Note 1265 Data truncated for column 'f151' at row 1
-Note 1265 Data truncated for column 'f152' at row 1
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb3.txt'
into table tb3;
drop table if exists tb4 ;
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 056a1fa7559..dba5e7f330e 100644
--- a/mysql-test/suite/funcs_1/r/is_routines_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_routines_embedded.result
@@ -197,7 +197,7 @@ 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 utf8mb3 utf8mb3_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' AND variable_name != 'THREAD_POOL_SIZE' 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') AND TRIGGER_SCHEMA != 'sys'; SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA != 'sys'; 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.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.global_priv; 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 utf8mb3 utf8mb3_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' AND variable_name != 'THREAD_POOL_SIZE' 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') AND TRIGGER_SCHEMA != 'sys'; SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA != 'sys'; 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.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.global_priv; SELECT * FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_STATUS != 'INACTIVE'; 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 utf8mb3 utf8mb3_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 utf8mb3 utf8mb3_general_ci latin1_swedish_ci
AddGeometryColumn def mysql AddGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin
set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci
@@ -213,7 +213,7 @@ 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 utf8mb3 utf8mb3_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' AND variable_name != 'THREAD_POOL_SIZE' 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') AND TRIGGER_SCHEMA != 'sys'; SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA != 'sys'; 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.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.global_priv; 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 utf8mb3 utf8mb3_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' AND variable_name != 'THREAD_POOL_SIZE' 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') AND TRIGGER_SCHEMA != 'sys'; SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA != 'sys'; 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.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.global_priv; SELECT * FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_STATUS != 'INACTIVE'; 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 utf8mb3 utf8mb3_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 utf8mb3 utf8mb3_general_ci latin1_swedish_ci
AddGeometryColumn def mysql AddGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin
set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci
@@ -229,7 +229,7 @@ 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 utf8mb3 utf8mb3_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' AND variable_name != 'THREAD_POOL_SIZE' 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') AND TRIGGER_SCHEMA != 'sys'; SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA != 'sys'; 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.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.global_priv; 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 utf8mb3 utf8mb3_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' AND variable_name != 'THREAD_POOL_SIZE' 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') AND TRIGGER_SCHEMA != 'sys'; SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA != 'sys'; 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.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.global_priv; SELECT * FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_STATUS != 'INACTIVE'; 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 utf8mb3 utf8mb3_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 utf8mb3 utf8mb3_general_ci latin1_swedish_ci
AddGeometryColumn def mysql AddGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin
set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci
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 a9b96d15d06..e9b88b9309a 100644
--- a/mysql-test/suite/funcs_1/r/memory_func_view.result
+++ b/mysql-test/suite/funcs_1/r/memory_func_view.result
@@ -3323,9 +3323,9 @@ NULL NULL 1
-3333.33 -3333.3333 30
Warnings:
Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
-Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 2
Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
-Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 3
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_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_0102.result b/mysql-test/suite/funcs_1/r/memory_trig_0102.result
index 4608fc8302a..975c014512f 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_0102.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_0102.result
@@ -56,9 +56,9 @@ f174 numeric (0),
f175 numeric (64)
) engine = <engine_to_be_used>;
Warnings:
-Note 1265 Data truncated for column 'f150' at row 1
-Note 1265 Data truncated for column 'f151' at row 1
-Note 1265 Data truncated for column 'f152' at row 1
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
Testcase: 3.5.1.1:
------------------
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03.result b/mysql-test/suite/funcs_1/r/memory_trig_03.result
index 8d24426ac75..b76e7d01f59 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_03.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_03.result
@@ -56,9 +56,9 @@ f174 numeric (0),
f175 numeric (64)
) engine = <engine_to_be_used>;
Warnings:
-Note 1265 Data truncated for column 'f150' at row 1
-Note 1265 Data truncated for column 'f151' at row 1
-Note 1265 Data truncated for column 'f152' at row 1
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
Testcase 3.5.3:
---------------
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_0407.result b/mysql-test/suite/funcs_1/r/memory_trig_0407.result
index 7228c4cffd9..ceae360946c 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_0407.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_0407.result
@@ -57,9 +57,9 @@ f174 numeric (0),
f175 numeric (64)
) engine = <engine_to_be_used>;
Warnings:
-Note 1265 Data truncated for column 'f150' at row 1
-Note 1265 Data truncated for column 'f151' at row 1
-Note 1265 Data truncated for column 'f152' at row 1
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
Testcase: 3.5:
--------------
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_08.result b/mysql-test/suite/funcs_1/r/memory_trig_08.result
index 32324600ad5..c9d6454dc5b 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_08.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_08.result
@@ -57,9 +57,9 @@ f174 numeric (0),
f175 numeric (64)
) engine = <engine_to_be_used>;
Warnings:
-Note 1265 Data truncated for column 'f150' at row 1
-Note 1265 Data truncated for column 'f151' at row 1
-Note 1265 Data truncated for column 'f152' at row 1
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
Testcase: 3.5:
--------------
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_09.result b/mysql-test/suite/funcs_1/r/memory_trig_09.result
index 7579418dc1f..b3e5e109b82 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_09.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_09.result
@@ -56,9 +56,9 @@ f174 numeric (0),
f175 numeric (64)
) engine = <engine_to_be_used>;
Warnings:
-Note 1265 Data truncated for column 'f150' at row 1
-Note 1265 Data truncated for column 'f151' at row 1
-Note 1265 Data truncated for column 'f152' at row 1
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb3.txt'
into table tb3;
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result b/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result
index 41904bf0afd..c1b697bd599 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result
@@ -56,9 +56,9 @@ f174 numeric (0),
f175 numeric (64)
) engine = <engine_to_be_used>;
Warnings:
-Note 1265 Data truncated for column 'f150' at row 1
-Note 1265 Data truncated for column 'f151' at row 1
-Note 1265 Data truncated for column 'f152' at row 1
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb3.txt'
into table tb3;
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 a9b96d15d06..e9b88b9309a 100644
--- a/mysql-test/suite/funcs_1/r/myisam_func_view.result
+++ b/mysql-test/suite/funcs_1/r/myisam_func_view.result
@@ -3323,9 +3323,9 @@ NULL NULL 1
-3333.33 -3333.3333 30
Warnings:
Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
-Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 2
Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
-Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 1
+Warning 1264 Out of range value for column 'CAST(my_double AS DECIMAL(37,2))' at row 3
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_double` as decimal(37,2)) AS `CAST(my_double AS DECIMAL(37,2))`,`t1_values`.`my_double` AS `my_double`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_0102.result b/mysql-test/suite/funcs_1/r/myisam_trig_0102.result
index 4608fc8302a..975c014512f 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_0102.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_0102.result
@@ -56,9 +56,9 @@ f174 numeric (0),
f175 numeric (64)
) engine = <engine_to_be_used>;
Warnings:
-Note 1265 Data truncated for column 'f150' at row 1
-Note 1265 Data truncated for column 'f151' at row 1
-Note 1265 Data truncated for column 'f152' at row 1
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
Testcase: 3.5.1.1:
------------------
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03.result b/mysql-test/suite/funcs_1/r/myisam_trig_03.result
index 8d24426ac75..b76e7d01f59 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_03.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_03.result
@@ -56,9 +56,9 @@ f174 numeric (0),
f175 numeric (64)
) engine = <engine_to_be_used>;
Warnings:
-Note 1265 Data truncated for column 'f150' at row 1
-Note 1265 Data truncated for column 'f151' at row 1
-Note 1265 Data truncated for column 'f152' at row 1
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
Testcase 3.5.3:
---------------
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_0407.result b/mysql-test/suite/funcs_1/r/myisam_trig_0407.result
index 7228c4cffd9..ceae360946c 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_0407.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_0407.result
@@ -57,9 +57,9 @@ f174 numeric (0),
f175 numeric (64)
) engine = <engine_to_be_used>;
Warnings:
-Note 1265 Data truncated for column 'f150' at row 1
-Note 1265 Data truncated for column 'f151' at row 1
-Note 1265 Data truncated for column 'f152' at row 1
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
Testcase: 3.5:
--------------
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_08.result b/mysql-test/suite/funcs_1/r/myisam_trig_08.result
index 32324600ad5..c9d6454dc5b 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_08.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_08.result
@@ -57,9 +57,9 @@ f174 numeric (0),
f175 numeric (64)
) engine = <engine_to_be_used>;
Warnings:
-Note 1265 Data truncated for column 'f150' at row 1
-Note 1265 Data truncated for column 'f151' at row 1
-Note 1265 Data truncated for column 'f152' at row 1
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
Testcase: 3.5:
--------------
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_09.result b/mysql-test/suite/funcs_1/r/myisam_trig_09.result
index 7579418dc1f..b3e5e109b82 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_09.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_09.result
@@ -56,9 +56,9 @@ f174 numeric (0),
f175 numeric (64)
) engine = <engine_to_be_used>;
Warnings:
-Note 1265 Data truncated for column 'f150' at row 1
-Note 1265 Data truncated for column 'f151' at row 1
-Note 1265 Data truncated for column 'f152' at row 1
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb3.txt'
into table tb3;
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result b/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result
index 8302c2bd0f9..cacef967ca9 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result
@@ -56,9 +56,9 @@ f174 numeric (0),
f175 numeric (64)
) engine = <engine_to_be_used>;
Warnings:
-Note 1265 Data truncated for column 'f150' at row 1
-Note 1265 Data truncated for column 'f151' at row 1
-Note 1265 Data truncated for column 'f152' at row 1
+Note 1265 Data truncated for column 'f150' at row 0
+Note 1265 Data truncated for column 'f151' at row 0
+Note 1265 Data truncated for column 'f152' at row 0
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb3.txt'
into table tb3;
diff --git a/mysql-test/suite/funcs_1/r/storedproc.result b/mysql-test/suite/funcs_1/r/storedproc.result
index c9f92d51210..efeb63ae616 100644
--- a/mysql-test/suite/funcs_1/r/storedproc.result
+++ b/mysql-test/suite/funcs_1/r/storedproc.result
@@ -106,7 +106,7 @@ CALL sp1( 34 );
@v1
3
Warnings:
-Warning 1265 Data truncated for column 'f1' at row 1
+Warning 1265 Data truncated for column 'f1' at row 0
SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
db_storedproc sp1 PROCEDURE root@localhost <modified> <created> INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci
@@ -1430,7 +1430,7 @@ f1
value1
Warnings:
Note 1291 Column 'f1' has duplicated value 'value1' in SET
-Warning 1265 Data truncated for column 'f1' at row 1
+Warning 1265 Data truncated for column 'f1' at row 0
SHOW PROCEDURE STATUS WHERE db = 'db_storedproc';
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
db_storedproc sp1 PROCEDURE root@localhost <modified> <created> INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci
@@ -7110,7 +7110,7 @@ CALL sp1();
x y z
000 000 000
Warnings:
-Warning 1264 Out of range value for column 'x' at row 1
+Warning 1264 Out of range value for column 'x' at row 0
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1( )
BEGIN
@@ -7148,7 +7148,7 @@ CALL sp1();
x y z
00000 00000 00000
Warnings:
-Warning 1264 Out of range value for column 'x' at row 1
+Warning 1264 Out of range value for column 'x' at row 0
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1( )
BEGIN
@@ -7186,7 +7186,7 @@ CALL sp1();
x y z
00000000 00000000 00000000
Warnings:
-Warning 1264 Out of range value for column 'x' at row 1
+Warning 1264 Out of range value for column 'x' at row 0
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1( )
BEGIN
@@ -7224,7 +7224,7 @@ CALL sp1();
x y z
0000000000 0000000000 0000000000
Warnings:
-Warning 1264 Out of range value for column 'x' at row 1
+Warning 1264 Out of range value for column 'x' at row 0
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1( )
BEGIN
@@ -7262,7 +7262,7 @@ CALL sp1();
x y z
00000000000000000000 00000000000000000000 00000000000000000000
Warnings:
-Warning 1264 Out of range value for column 'x' at row 1
+Warning 1264 Out of range value for column 'x' at row 0
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1( )
BEGIN
@@ -7282,7 +7282,7 @@ CALL sp1();
x y z
-9999999999 -9999999999 -9999999999
Warnings:
-Warning 1264 Out of range value for column 'x' at row 1
+Warning 1264 Out of range value for column 'x' at row 0
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1( )
BEGIN
@@ -7293,7 +7293,7 @@ CALL sp1();
x y z
0 0 0
Warnings:
-Note 1265 Data truncated for column 'x' at row 1
+Note 1265 Data truncated for column 'x' at row 0
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1( )
BEGIN
@@ -7304,7 +7304,7 @@ CALL sp1();
x y z
0000000000 0000000000 0000000000
Warnings:
-Warning 1264 Out of range value for column 'x' at row 1
+Warning 1264 Out of range value for column 'x' at row 0
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1( )
BEGIN
@@ -7315,7 +7315,7 @@ CALL sp1();
x y z
0000000000 0000000000 0000000000
Warnings:
-Note 1265 Data truncated for column 'x' at row 1
+Note 1265 Data truncated for column 'x' at row 0
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1( )
BEGIN
@@ -7326,7 +7326,7 @@ CALL sp1();
x y z
0 0 0
Warnings:
-Note 1265 Data truncated for column 'x' at row 1
+Note 1265 Data truncated for column 'x' at row 0
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1( )
BEGIN
@@ -7337,7 +7337,7 @@ CALL sp1();
x y z
0 0 0
Warnings:
-Note 1265 Data truncated for column 'x' at row 1
+Note 1265 Data truncated for column 'x' at row 0
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1( )
BEGIN
@@ -7348,7 +7348,7 @@ CALL sp1();
x y z
0000000000 0000000000 0000000000
Warnings:
-Note 1265 Data truncated for column 'x' at row 1
+Note 1265 Data truncated for column 'x' at row 0
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1( )
BEGIN
@@ -7359,7 +7359,7 @@ CALL sp1();
x y z
0000000000 0000000000 0000000000
Warnings:
-Note 1265 Data truncated for column 'x' at row 1
+Note 1265 Data truncated for column 'x' at row 0
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1( )
BEGIN
@@ -13769,7 +13769,7 @@ CALL sp1();
@xx
0
Warnings:
-Warning 1366 Incorrect integer value: 'asd' for column ``.``.`xx` at row 1
+Warning 1366 Incorrect integer value: 'asd' for column ``.``.`xx` at row 0
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
BEGIN
@@ -13797,7 +13797,7 @@ set @xx = xx;
END//
CALL sp1();
Warnings:
-Warning 1265 Data truncated for column 'xx' at row 1
+Warning 1265 Data truncated for column 'xx' at row 0
SELECT @xx;
@xx
t
@@ -13818,7 +13818,7 @@ CALL sp1();
xx
0
Warnings:
-Warning 1366 Incorrect double value: 'asd' for column ``.``.`xx` at row 1
+Warning 1366 Incorrect double value: 'asd' for column ``.``.`xx` at row 0
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
BEGIN
@@ -13846,7 +13846,7 @@ CALL sp1();
xx
0000-00-00 00:00:00
Warnings:
-Warning 1265 Data truncated for column 'xx' at row 1
+Warning 1265 Data truncated for column 'xx' at row 0
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
BEGIN
@@ -13890,7 +13890,7 @@ CALL sp1();
xx
0
Warnings:
-Warning 1366 Incorrect integer value: 'asd' for column ``.``.`xx` at row 1
+Warning 1366 Incorrect integer value: 'asd' for column ``.``.`xx` at row 0
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
BEGIN
@@ -17290,8 +17290,8 @@ CALL sp7(99999999999);
f1
9999999999
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp8;
CREATE PROCEDURE sp8( f1 decimal (0) unsigned zerofill)
BEGIN
@@ -17302,7 +17302,7 @@ CALL sp8(999999999);
f1
1000000000
Warnings:
-Note 1265 Data truncated for column 'f1' at row 1
+Note 1265 Data truncated for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp9;
CREATE PROCEDURE sp9( f1 decimal (0) zerofill)
BEGIN
@@ -17313,8 +17313,8 @@ CALL sp9(-1.00e+09);
f1
0000000010
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp10;
CREATE PROCEDURE sp10( f1 decimal (0, 0))
BEGIN
@@ -17334,8 +17334,8 @@ CALL sp11(99999999999);
f1
9999999999
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp12;
CREATE PROCEDURE sp12( f1 decimal (0, 0) unsigned zerofill)
BEGIN
@@ -17346,7 +17346,7 @@ CALL sp12(999999999);
f1
1000000000
Warnings:
-Note 1265 Data truncated for column 'f1' at row 1
+Note 1265 Data truncated for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp13;
CREATE PROCEDURE sp13( f1 decimal (0, 0) zerofill)
BEGIN
@@ -17357,8 +17357,8 @@ CALL sp13(-1.00e+09);
f1
0000000010
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp14;
CREATE PROCEDURE sp14( f1 decimal (63, 30))
BEGIN
@@ -17396,8 +17396,8 @@ CALL sp17(-1.00e+21);
f1
000000000000000000000000000000010.000000000000000000000000000000
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp18_d;
CREATE PROCEDURE sp18_d( f1 decimal (64))
BEGIN
@@ -17456,7 +17456,7 @@ CALL sp21(1.00e+00);
f1
0000000000000000000000000000000000000000000000000000000000000010
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp22;
CREATE PROCEDURE sp22( f1 decimal unsigned)
BEGIN
@@ -17467,7 +17467,7 @@ CALL sp22(1.00e+00);
f1
10
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp23;
CREATE PROCEDURE sp23( f1 decimal unsigned zerofill)
BEGIN
@@ -17478,7 +17478,7 @@ CALL sp23(1.00e+00);
f1
0000000010
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp24;
CREATE PROCEDURE sp24( f1 decimal zerofill)
BEGIN
@@ -17489,8 +17489,8 @@ CALL sp24(-1.00e+09);
f1
0000000010
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp25;
CREATE PROCEDURE sp25( f1 double)
BEGIN
@@ -17510,7 +17510,7 @@ CALL sp26(1.00e+00);
f1
10
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp27;
CREATE PROCEDURE sp27( f1 double unsigned zerofill)
BEGIN
@@ -17521,7 +17521,7 @@ CALL sp27(1.00e+00);
f1
0000000000000000000010
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp28;
CREATE PROCEDURE sp28( f1 double zerofill)
BEGIN
@@ -17532,7 +17532,7 @@ CALL sp28(1.00e+00);
f1
0000000000000000000010
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp29;
CREATE PROCEDURE sp29( f1 float)
BEGIN
@@ -17552,7 +17552,7 @@ CALL sp30(1.00e+00);
f1
10
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp31;
CREATE PROCEDURE sp31( f1 float unsigned zerofill)
BEGIN
@@ -17563,7 +17563,7 @@ CALL sp31(1.00e+00);
f1
000000000010
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp32;
CREATE PROCEDURE sp32( f1 float zerofill)
BEGIN
@@ -17574,7 +17574,7 @@ CALL sp32(1.00e+00);
f1
000000000010
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp33;
CREATE PROCEDURE sp33( f1 float(0))
BEGIN
@@ -17594,7 +17594,7 @@ CALL sp34(1.00e+00);
f1
10
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp35;
CREATE PROCEDURE sp35( f1 float(0) unsigned zerofill)
BEGIN
@@ -17605,7 +17605,7 @@ CALL sp35(1.00e+00);
f1
000000000010
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp36;
CREATE PROCEDURE sp36( f1 float(0) zerofill)
BEGIN
@@ -17616,7 +17616,7 @@ CALL sp36(1.00e+00);
f1
000000000010
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp37;
CREATE PROCEDURE sp37( f1 float(23))
BEGIN
@@ -17636,7 +17636,7 @@ CALL sp38(1.00e+00);
f1
10
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp39;
CREATE PROCEDURE sp39( f1 float(23) unsigned zerofill)
BEGIN
@@ -17647,7 +17647,7 @@ CALL sp39(1.00e+00);
f1
000000000010
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp40;
CREATE PROCEDURE sp40( f1 float(23) zerofill)
BEGIN
@@ -17658,7 +17658,7 @@ CALL sp40(1.00e+00);
f1
000000000010
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp41;
CREATE PROCEDURE sp41( f1 float(24))
BEGIN
@@ -17678,7 +17678,7 @@ CALL sp42(1.00e+00);
f1
10
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp43;
CREATE PROCEDURE sp43( f1 float(24) unsigned zerofill)
BEGIN
@@ -17689,7 +17689,7 @@ CALL sp43(1.00e+00);
f1
000000000010
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp44;
CREATE PROCEDURE sp44( f1 float(24) zerofill)
BEGIN
@@ -17700,7 +17700,7 @@ CALL sp44(1.00e+00);
f1
000000000010
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp45;
CREATE PROCEDURE sp45( f1 float(53))
BEGIN
@@ -17720,7 +17720,7 @@ CALL sp46(1.00e+00);
f1
10
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp47;
CREATE PROCEDURE sp47( f1 float(53) unsigned zerofill)
BEGIN
@@ -17731,7 +17731,7 @@ CALL sp47(1.00e+00);
f1
0000000000000000000010
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp48;
CREATE PROCEDURE sp48( f1 float(53) zerofill)
BEGIN
@@ -17742,7 +17742,7 @@ CALL sp48(1.00e+00);
f1
0000000000000000000010
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp49;
CREATE PROCEDURE sp49( f1 int)
BEGIN
@@ -17753,8 +17753,8 @@ CALL sp49(-2.15e+09);
f1
-2147483638
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp50;
CREATE PROCEDURE sp50( f1 int unsigned)
BEGIN
@@ -17792,7 +17792,7 @@ CALL sp53(-8388600);
f1
-8388598
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp54;
CREATE PROCEDURE sp54( f1 mediumint unsigned)
BEGIN
@@ -17829,7 +17829,7 @@ CALL sp57(-999999999);
f1
-1000000000
Warnings:
-Note 1265 Data truncated for column 'f1' at row 1
+Note 1265 Data truncated for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp58;
CREATE PROCEDURE sp58( f1 numeric (0))
BEGIN
@@ -17840,7 +17840,7 @@ CALL sp58(-999999999);
f1
-1000000000
Warnings:
-Note 1265 Data truncated for column 'f1' at row 1
+Note 1265 Data truncated for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp59;
CREATE PROCEDURE sp59( f1 numeric (0) unsigned)
BEGIN
@@ -17851,7 +17851,7 @@ CALL sp59(9999999999);
f1
9999999999
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp60;
CREATE PROCEDURE sp60( f1 numeric (0) unsigned zerofill)
BEGIN
@@ -17862,7 +17862,7 @@ CALL sp60(99999999);
f1
0100000000
Warnings:
-Note 1265 Data truncated for column 'f1' at row 1
+Note 1265 Data truncated for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp61;
CREATE PROCEDURE sp61( f1 numeric (0) zerofill)
BEGIN
@@ -17873,8 +17873,8 @@ CALL sp61(-99999999);
f1
0000000010
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp62;
CREATE PROCEDURE sp62( f1 numeric (0, 0))
BEGIN
@@ -17885,7 +17885,7 @@ CALL sp62(-999999999);
f1
-1000000000
Warnings:
-Note 1265 Data truncated for column 'f1' at row 1
+Note 1265 Data truncated for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp63;
CREATE PROCEDURE sp63( f1 numeric (0, 0) unsigned)
BEGIN
@@ -17896,7 +17896,7 @@ CALL sp63(9999999999);
f1
9999999999
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp64;
CREATE PROCEDURE sp64( f1 numeric (0, 0) unsigned zerofill)
BEGIN
@@ -17907,7 +17907,7 @@ CALL sp64(99999999);
f1
0100000000
Warnings:
-Note 1265 Data truncated for column 'f1' at row 1
+Note 1265 Data truncated for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp65;
CREATE PROCEDURE sp65( f1 numeric (0, 0) zerofill)
BEGIN
@@ -17918,8 +17918,8 @@ CALL sp65(-99999999);
f1
0000000010
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp66_n;
CREATE PROCEDURE sp66_n( f1 numeric (63, 30))
BEGIN
@@ -17930,14 +17930,14 @@ CALL sp66_n(-1e+36);
f1
-999999999999999999999999999999989.999999999999999999999999999999
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
CALL sp66_n( -1000000000000000000000000000000000000 );
f1
-999999999999999999999999999999989.999999999999999999999999999999
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp67_nu;
CREATE PROCEDURE sp67_nu( f1 numeric (63, 30) unsigned)
BEGIN
@@ -17948,14 +17948,14 @@ CALL sp67_nu(1e+36);
f1
999999999999999999999999999999999.999999999999999999999999999999
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
CALL sp67_nu( 1000000000000000000000000000000000000 );
f1
999999999999999999999999999999999.999999999999999999999999999999
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp68_nuz;
CREATE PROCEDURE sp68_nuz( f1 numeric (63, 30) unsigned zerofill)
BEGIN
@@ -17966,14 +17966,14 @@ CALL sp68_nuz(1e+36);
f1
999999999999999999999999999999999.999999999999999999999999999999
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
CALL sp68_nuz( 1000000000000000000000000000000000000 );
f1
999999999999999999999999999999999.999999999999999999999999999999
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp69_n_z;
CREATE PROCEDURE sp69_n_z( f1 numeric (63, 30) zerofill)
BEGIN
@@ -17984,14 +17984,14 @@ CALL sp69_n_z(-1e+36);
f1
000000000000000000000000000000010.000000000000000000000000000000
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
CALL sp69_n_z( -1000000000000000000000000000000000000 );
f1
000000000000000000000000000000010.000000000000000000000000000000
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp70_n;
CREATE PROCEDURE sp70_n( f1 numeric (64))
BEGIN
@@ -18050,7 +18050,7 @@ CALL sp74(999999999);
f1
1000000000
Warnings:
-Note 1265 Data truncated for column 'f1' at row 1
+Note 1265 Data truncated for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp75;
CREATE PROCEDURE sp75( f1 numeric unsigned zerofill)
BEGIN
@@ -18061,7 +18061,7 @@ CALL sp75(999999999);
f1
1000000000
Warnings:
-Note 1265 Data truncated for column 'f1' at row 1
+Note 1265 Data truncated for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp76;
CREATE PROCEDURE sp76( f1 numeric zerofill)
BEGIN
@@ -18072,8 +18072,8 @@ CALL sp76(-999999999);
f1
0000000010
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp77;
CREATE PROCEDURE sp77( f1 real)
BEGIN
@@ -18093,7 +18093,7 @@ CALL sp78(1.1);
f1
10
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp79;
CREATE PROCEDURE sp79( f1 real unsigned zerofill)
BEGIN
@@ -18104,7 +18104,7 @@ CALL sp79(1.1);
f1
0000000000000000000010
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp80;
CREATE PROCEDURE sp80( f1 real zerofill)
BEGIN
@@ -18115,7 +18115,7 @@ CALL sp80(1.1);
f1
0000000000000000000010
Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
+Warning 1264 Out of range value for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp81;
CREATE PROCEDURE sp81( f1 smallint)
BEGIN
@@ -18235,7 +18235,7 @@ CALL sp94( 'h');
f1
a
Warnings:
-Warning 1265 Data truncated for column 'f1' at row 1
+Warning 1265 Data truncated for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp95;
CREATE PROCEDURE sp95( f1 char ascii)
BEGIN
@@ -18246,7 +18246,7 @@ CALL sp95( 'h');
f1
a
Warnings:
-Warning 1265 Data truncated for column 'f1' at row 1
+Warning 1265 Data truncated for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp96;
CREATE PROCEDURE sp96( f1 char binary)
BEGIN
@@ -18257,7 +18257,7 @@ CALL sp96( 'h');
f1
a
Warnings:
-Warning 1265 Data truncated for column 'f1' at row 1
+Warning 1265 Data truncated for column 'f1' at row 0
DROP PROCEDURE IF EXISTS sp97;
CREATE PROCEDURE sp97( f1 longtext)
BEGIN
@@ -18358,7 +18358,7 @@ CALL sp107(2.00e+13);
f1
returned
Warnings:
-returned 1265 Data truncated for column 'f1' at row 1
+returned 1265 Data truncated for column 'f1' at row 0
USE db_storedproc;
DROP DATABASE db1;
DROP DATABASE IF EXISTS db1;
diff --git a/mysql-test/suite/galera/include/have_wsrep_replicate_myisam.inc b/mysql-test/suite/galera/include/have_wsrep_replicate_myisam.inc
deleted file mode 100644
index 726fc6e2b18..00000000000
--- a/mysql-test/suite/galera/include/have_wsrep_replicate_myisam.inc
+++ /dev/null
@@ -1,4 +0,0 @@
---require suite/galera/r/have_wsrep_replicate_myisam.require
-disable_query_log;
-SHOW VARIABLES LIKE 'wsrep_replicate_myisam';
-enable_query_log;
diff --git a/mysql-test/suite/galera/r/MDEV-27001.result b/mysql-test/suite/galera/r/MDEV-27001.result
new file mode 100644
index 00000000000..f2dc6a9a937
--- /dev/null
+++ b/mysql-test/suite/galera/r/MDEV-27001.result
@@ -0,0 +1,6 @@
+connection node_2;
+connection node_1;
+CREATE TABLE t3 (c INT) PARTITION BY RANGE (c) (PARTITION p1 VALUES LESS THAN (1000));
+CREATE TABLE tp2 (c INT);
+ALTER TABLE t3 CONVERT TABLE tp2 TO PARTITION p2 VALUES LESS THAN (2000);
+DROP TABLE t3;
diff --git a/mysql-test/suite/galera/r/MW-416.result b/mysql-test/suite/galera/r/MW-416.result
index ae95b832802..98a72c8d46b 100644
--- a/mysql-test/suite/galera/r/MW-416.result
+++ b/mysql-test/suite/galera/r/MW-416.result
@@ -10,16 +10,12 @@ ALTER EVENT ev1 RENAME TO ev2;
ERROR 42000: Access denied for user 'userMW416'@'localhost' to database 'test'
ALTER FUNCTION fun1 COMMENT 'foo';
ERROR 42000: alter routine command denied to user 'userMW416'@'localhost' for routine 'test.fun1'
-ALTER LOGFILE GROUP lfg ADD UNDOFILE 'file' ENGINE=InnoDB;
-Got one of the listed errors
ALTER PROCEDURE proc1 COMMENT 'foo';
Got one of the listed errors
ALTER SERVER srv OPTIONS (USER 'sally');
Got one of the listed errors
ALTER TABLE tbl DROP COLUMN col;
Got one of the listed errors
-ALTER TABLESPACE tblspc DROP DATAFILE 'file' ENGINE=innodb;
-Got one of the listed errors
ALTER VIEW vw AS SELECT 1;
Got one of the listed errors
CREATE DATABASE db;
@@ -34,14 +30,10 @@ CREATE PROCEDURE proc1() BEGIN END;
Got one of the listed errors
CREATE INDEX idx ON tbl(id);
Got one of the listed errors
-CREATE LOGFILE GROUP lfg ADD UNDOFILE 'undofile' ENGINE innodb;
-Got one of the listed errors
CREATE SERVER srv FOREIGN DATA WRAPPER 'fdw' OPTIONS (USER 'user');
Got one of the listed errors
CREATE TABLE t (i int);
Got one of the listed errors
-CREATE TABLESPACE tblspc ADD DATAFILE 'file' ENGINE=innodb;
-Got one of the listed errors
CREATE TRIGGER trg BEFORE UPDATE ON t FOR EACH ROW BEGIN END;
Got one of the listed errors
CREATE VIEW vw AS SELECT 1;
@@ -54,16 +46,12 @@ DROP FUNCTION fun1;
Got one of the listed errors
DROP INDEX idx ON t0;
Got one of the listed errors
-DROP LOGFILE GROUP lfg;
-Got one of the listed errors
DROP PROCEDURE proc1;
Got one of the listed errors
DROP SERVEr srv;
Got one of the listed errors
DROP TABLE t0;
Got one of the listed errors
-DROP TABLESPACE tblspc;
-Got one of the listed errors
DROP TRIGGER trg;
Got one of the listed errors
DROP VIEW vw;
diff --git a/mysql-test/suite/galera/r/galera_defaults.result b/mysql-test/suite/galera/r/galera_defaults.result
index bc9927b21d9..d6bbcbae680 100644
--- a/mysql-test/suite/galera/r/galera_defaults.result
+++ b/mysql-test/suite/galera/r/galera_defaults.result
@@ -1,9 +1,9 @@
connection node_2;
connection node_1;
# Correct Galera library found
-SELECT COUNT(*) `expect 51` FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep_%';
-expect 51
-51
+SELECT COUNT(*) `expect 50` FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep_%';
+expect 50
+49
SELECT VARIABLE_NAME, VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME LIKE 'wsrep_%'
@@ -47,7 +47,6 @@ WSREP_ON ON
WSREP_OSU_METHOD TOI
WSREP_RECOVER OFF
WSREP_REJECT_QUERIES NONE
-WSREP_REPLICATE_MYISAM OFF
WSREP_RESTART_SLAVE OFF
WSREP_RETRY_AUTOCOMMIT 1
WSREP_SLAVE_FK_CHECKS ON
@@ -58,7 +57,6 @@ WSREP_SST_AUTH
WSREP_SST_DONOR
WSREP_SST_DONOR_REJECTS_QUERIES OFF
WSREP_SST_METHOD rsync
-WSREP_STRICT_DDL OFF
WSREP_SYNC_WAIT 15
WSREP_TRX_FRAGMENT_SIZE 0
WSREP_TRX_FRAGMENT_UNIT bytes
diff --git a/mysql-test/suite/galera/r/galera_myisam_transactions.result b/mysql-test/suite/galera/r/galera_myisam_transactions.result
index 04f68c29305..6afcda47a23 100644
--- a/mysql-test/suite/galera/r/galera_myisam_transactions.result
+++ b/mysql-test/suite/galera/r/galera_myisam_transactions.result
@@ -38,9 +38,7 @@ COUNT(*) = 0
1
DROP TABLE t1, t2, t3;
SET SESSION lock_wait_timeout=2;
-SET GLOBAL wsrep_replicate_myisam= ON;
-Warnings:
-Warning 1287 '@@wsrep_replicate_myisam' is deprecated and will be removed in a future release. Please use '@@wsrep_mode=REPLICATE_MYISAM' instead
+SET GLOBAL wsrep_mode = REPLICATE_MYISAM;
CREATE TEMPORARY TABLE t1 (i INT, PRIMARY KEY pk (i)) ENGINE=MyISAM;
Warnings:
Warning 1280 Name 'pk' ignored for PRIMARY key.
@@ -49,6 +47,4 @@ INSERT INTO t1 VALUES(4);
DEALLOCATE PREPARE stmt;
COMMIT;
DROP TABLE t1;
-SET GLOBAL wsrep_replicate_myisam=OFF;
-Warnings:
-Warning 1287 '@@wsrep_replicate_myisam' is deprecated and will be removed in a future release. Please use '@@wsrep_mode=REPLICATE_MYISAM' instead
+SET GLOBAL wsrep_mode = DEFAULT;
diff --git a/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result b/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result
index 48625b3ba4a..a15b0c7df69 100644
--- a/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result
+++ b/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result
@@ -10,31 +10,31 @@ INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
connection node_2a;
SET SESSION wsrep_sync_wait=0;
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%committing%';
-COUNT(*) = 1
+SELECT COUNT(*) AS EXPECT_1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE (STATE LIKE '%committing%' or STATE = 'Waiting for certification');
+EXPECT_1
1
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Waiting for table metadata lock%';
-COUNT(*) = 1
-1
-SELECT COUNT(*) = 0 FROM t1;
-COUNT(*) = 0
-1
-SELECT COUNT(*) = 0 FROM t2;
-COUNT(*) = 0
+SELECT COUNT(*) AS EXPECT_1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Waiting for table metadata lock%';
+EXPECT_1
1
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
+EXPECT_0
+0
+SELECT COUNT(*) AS EXPECT_0 FROM t2;
+EXPECT_0
+0
connection node_2;
UNLOCK TABLES;
connection node_2a;
SET SESSION wsrep_sync_wait = 15;;
-SELECT COUNT(*) = 1 FROM t1;
-COUNT(*) = 1
-1
-SELECT COUNT(*) = 1 FROM t2;
-COUNT(*) = 1
+SELECT COUNT(*) AS EXPECT_1 FROM t1;
+EXPECT_1
1
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%committed%';
-COUNT(*) = 2
+SELECT COUNT(*) AS EXPECT_1 FROM t2;
+EXPECT_1
1
+SELECT COUNT(*) AS EXPECT_2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE (STATE LIKE '%committed%' or STATE = 'Waiting for certification');
+EXPECT_2
+2
SET GLOBAL wsrep_slave_threads = 1;;
DROP TABLE t1;
DROP TABLE t2;
diff --git a/mysql-test/suite/galera/r/galera_var_wsrep_strict_ddl.result b/mysql-test/suite/galera/r/galera_var_wsrep_strict_ddl.result
deleted file mode 100644
index d53708b3504..00000000000
--- a/mysql-test/suite/galera/r/galera_var_wsrep_strict_ddl.result
+++ /dev/null
@@ -1,26 +0,0 @@
-connection node_2;
-connection node_1;
-SELECT @@global.wsrep_mode;
-@@global.wsrep_mode
-
-SELECT @@global.wsrep_strict_ddl;
-@@global.wsrep_strict_ddl
-0
-SET @@global.wsrep_strict_ddl=ON;
-Warnings:
-Warning 1287 '@@wsrep_strict_ddl' is deprecated and will be removed in a future release. Please use '@@wsrep_mode=STRICT_REPLICATION' instead
-SELECT @@global.wsrep_mode;
-@@global.wsrep_mode
-STRICT_REPLICATION
-SELECT @@global.wsrep_strict_ddl;
-@@global.wsrep_strict_ddl
-1
-SET @@global.wsrep_strict_ddl=OFF;
-Warnings:
-Warning 1287 '@@wsrep_strict_ddl' is deprecated and will be removed in a future release. Please use '@@wsrep_mode=STRICT_REPLICATION' instead
-SELECT @@global.wsrep_mode;
-@@global.wsrep_mode
-
-SELECT @@global.wsrep_strict_ddl;
-@@global.wsrep_strict_ddl
-0
diff --git a/mysql-test/suite/galera/t/MDEV-27001.opt b/mysql-test/suite/galera/t/MDEV-27001.opt
new file mode 100644
index 00000000000..c62d74cb249
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-27001.opt
@@ -0,0 +1 @@
+--partition=ON \ No newline at end of file
diff --git a/mysql-test/suite/galera/t/MDEV-27001.test b/mysql-test/suite/galera/t/MDEV-27001.test
new file mode 100644
index 00000000000..fb5f57f53e5
--- /dev/null
+++ b/mysql-test/suite/galera/t/MDEV-27001.test
@@ -0,0 +1,7 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE t3 (c INT) PARTITION BY RANGE (c) (PARTITION p1 VALUES LESS THAN (1000));
+CREATE TABLE tp2 (c INT);
+ALTER TABLE t3 CONVERT TABLE tp2 TO PARTITION p2 VALUES LESS THAN (2000);
+DROP TABLE t3; \ No newline at end of file
diff --git a/mysql-test/suite/galera/t/MW-416.test b/mysql-test/suite/galera/t/MW-416.test
index f9a1b47e2ff..f86ffcbf512 100644
--- a/mysql-test/suite/galera/t/MW-416.test
+++ b/mysql-test/suite/galera/t/MW-416.test
@@ -19,16 +19,12 @@ ALTER EVENT ev1 RENAME TO ev2;
ALTER FUNCTION fun1 COMMENT 'foo';
#--error 1044,1227
#ALTER INSTANCE ROTATE INNODB MASTER KEY;
---error 1044,1227
-ALTER LOGFILE GROUP lfg ADD UNDOFILE 'file' ENGINE=InnoDB;
--error 1044,1227,1370
ALTER PROCEDURE proc1 COMMENT 'foo';
--error 1044,1227,1370
ALTER SERVER srv OPTIONS (USER 'sally');
--error 1044,1142,1227,1370
ALTER TABLE tbl DROP COLUMN col;
---error 1044,1227,1370
-ALTER TABLESPACE tblspc DROP DATAFILE 'file' ENGINE=innodb;
--error 1044,1142,1227,1370
ALTER VIEW vw AS SELECT 1;
@@ -45,14 +41,10 @@ CREATE PROCEDURE proc1() BEGIN END;
--error 1044,1142,1227,1370
CREATE INDEX idx ON tbl(id);
--error 1044,1142,1227,1370
-CREATE LOGFILE GROUP lfg ADD UNDOFILE 'undofile' ENGINE innodb;
---error 1044,1142,1227,1370
CREATE SERVER srv FOREIGN DATA WRAPPER 'fdw' OPTIONS (USER 'user');
--error 1044,1142,1227,1370
CREATE TABLE t (i int);
--error 1044,1142,1227,1370
-CREATE TABLESPACE tblspc ADD DATAFILE 'file' ENGINE=innodb;
---error 1044,1142,1227,1370
CREATE TRIGGER trg BEFORE UPDATE ON t FOR EACH ROW BEGIN END;
--error 1044,1142,1227,1370
CREATE VIEW vw AS SELECT 1;
@@ -67,16 +59,12 @@ DROP EVENT ev;
DROP FUNCTION fun1;
--error 1044,1142,1227,1370
DROP INDEX idx ON t0;
---error 1044,1142,1227,1370,1064
-DROP LOGFILE GROUP lfg;
--error 1044,1142,1227,1370
DROP PROCEDURE proc1;
--error 1044,1142,1227,1370
DROP SERVEr srv;
--error 1044,1142,1227,1370
DROP TABLE t0;
---error 1044,1142,1227,1370,1064
-DROP TABLESPACE tblspc;
--error 1044,1142,1227,1360,1370
DROP TRIGGER trg;
--error 1044,1142,1227,1370
diff --git a/mysql-test/suite/galera/t/galera_backup_stage.test b/mysql-test/suite/galera/t/galera_backup_stage.test
index 31d76816355..20ce6036d0d 100644
--- a/mysql-test/suite/galera/t/galera_backup_stage.test
+++ b/mysql-test/suite/galera/t/galera_backup_stage.test
@@ -56,7 +56,7 @@ ALTER TABLE t1 ADD COLUMN (f4 int(10));
# reach commit stage. In the unlikely case the interleaving is different, the
# result of the test should not change.
--connection node_1c
---let $wait_condition = SELECT COUNT(*)=1 FROM information_schema.processlist WHERE State='Commit' AND ID=$insert_id
+--let $wait_condition = SELECT COUNT(*)=1 FROM information_schema.processlist WHERE (State='Commit' OR State='Waiting for certification') AND ID=$insert_id
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*)=1 FROM information_schema.metadata_lock_info WHERE TABLE_NAME='t1' AND THREAD_ID=$insert_id
--source include/wait_condition.inc
@@ -83,11 +83,11 @@ ALTER TABLE t1 ADD COLUMN (f4 int(10));
# wait for insert to get blocked
--connection node_1c
---let $wait_condition = SELECT COUNT(*)=1 FROM information_schema.processlist WHERE State='Commit' AND ID=$insert_id
+--let $wait_condition = SELECT COUNT(*)=1 FROM information_schema.processlist WHERE (State='Commit' OR State='Waiting for certification') AND ID=$insert_id
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*)=1 FROM information_schema.metadata_lock_info WHERE TABLE_NAME='t1' AND THREAD_ID=$insert_id
--source include/wait_condition.inc
---let $wait_condition = SELECT COUNT(*)=2 FROM information_schema.processlist WHERE Info like 'INSERT INTO t1 (f1) values("node1%")' AND State = 'Commit'
+--let $wait_condition = SELECT COUNT(*)=2 FROM information_schema.processlist WHERE Info like 'INSERT INTO t1 (f1) values("node1%")' AND (State = 'Commit' OR State='Waiting for certification')
--source include/wait_condition.inc
# nothing after BLOCK_DDL is applied
diff --git a/mysql-test/suite/galera/t/galera_defaults.test b/mysql-test/suite/galera/t/galera_defaults.test
index 96389e44d3f..6b76473d6a6 100644
--- a/mysql-test/suite/galera/t/galera_defaults.test
+++ b/mysql-test/suite/galera/t/galera_defaults.test
@@ -18,7 +18,7 @@ source ../wsrep/include/check_galera_version.inc;
# Global Variables
-SELECT COUNT(*) `expect 51` FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep_%';
+SELECT COUNT(*) `expect 50` FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'wsrep_%';
SELECT VARIABLE_NAME, VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
diff --git a/mysql-test/suite/galera/t/galera_myisam_transactions.test b/mysql-test/suite/galera/t/galera_myisam_transactions.test
index 30677ddbe4d..808aebdcbe4 100644
--- a/mysql-test/suite/galera/t/galera_myisam_transactions.test
+++ b/mysql-test/suite/galera/t/galera_myisam_transactions.test
@@ -39,11 +39,11 @@ DROP TABLE t1, t2, t3;
# MDEV-25201 : Assertion `thd->wsrep_trx_meta.gtid.seqno == (-1)' failed in int wsrep_to_isolation_begin(THD*, const char*, const char*, const TABLE_LIST*, Alter_info*)
#
SET SESSION lock_wait_timeout=2;
-SET GLOBAL wsrep_replicate_myisam= ON;
+SET GLOBAL wsrep_mode = REPLICATE_MYISAM;
CREATE TEMPORARY TABLE t1 (i INT, PRIMARY KEY pk (i)) ENGINE=MyISAM;
PREPARE stmt FROM "INSERT INTO t1 (id) SELECT * FROM (SELECT 4 AS i) AS y";
INSERT INTO t1 VALUES(4);
DEALLOCATE PREPARE stmt;
COMMIT;
DROP TABLE t1;
-SET GLOBAL wsrep_replicate_myisam=OFF;
+SET GLOBAL wsrep_mode = DEFAULT;
diff --git a/mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test b/mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test
index 5a33c16c86e..2e9f05cb4af 100644
--- a/mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test
+++ b/mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test
@@ -32,19 +32,19 @@ INSERT INTO t2 VALUES (1);
--connection node_2a
--sleep 1
SET SESSION wsrep_sync_wait=0;
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%committing%';
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Waiting for table metadata lock%';
-SELECT COUNT(*) = 0 FROM t1;
-SELECT COUNT(*) = 0 FROM t2;
+SELECT COUNT(*) AS EXPECT_1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE (STATE LIKE '%committing%' or STATE = 'Waiting for certification');
+SELECT COUNT(*) AS EXPECT_1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Waiting for table metadata lock%';
+SELECT COUNT(*) AS EXPECT_0 FROM t1;
+SELECT COUNT(*) AS EXPECT_0 FROM t2;
--connection node_2
UNLOCK TABLES;
--connection node_2a
--eval SET SESSION wsrep_sync_wait = $wsrep_sync_wait_orig;
-SELECT COUNT(*) = 1 FROM t1;
-SELECT COUNT(*) = 1 FROM t2;
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%committed%';
+SELECT COUNT(*) AS EXPECT_1 FROM t1;
+SELECT COUNT(*) AS EXPECT_1 FROM t2;
+SELECT COUNT(*) AS EXPECT_2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE (STATE LIKE '%committed%' or STATE = 'Waiting for certification');
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_var_wsrep_strict_ddl.test b/mysql-test/suite/galera/t/galera_var_wsrep_strict_ddl.test
deleted file mode 100644
index 2aa76d46f82..00000000000
--- a/mysql-test/suite/galera/t/galera_var_wsrep_strict_ddl.test
+++ /dev/null
@@ -1,13 +0,0 @@
---source include/galera_cluster.inc
-
-SELECT @@global.wsrep_mode;
-SELECT @@global.wsrep_strict_ddl;
-
-SET @@global.wsrep_strict_ddl=ON;
-SELECT @@global.wsrep_mode;
-SELECT @@global.wsrep_strict_ddl;
-
-SET @@global.wsrep_strict_ddl=OFF;
-SELECT @@global.wsrep_mode;
-SELECT @@global.wsrep_strict_ddl;
-
diff --git a/mysql-test/suite/galera_3nodes/r/GCF-363.result b/mysql-test/suite/galera_3nodes/r/GCF-363.result
index d7078227ec3..fb235aceb77 100644
--- a/mysql-test/suite/galera_3nodes/r/GCF-363.result
+++ b/mysql-test/suite/galera_3nodes/r/GCF-363.result
@@ -1,8 +1,9 @@
connection node_2;
connection node_1;
-connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connection node_1;
connection node_2;
+connection node_3;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) ENGINE=InnoDB;
SET GLOBAL wsrep_on=OFF;
@@ -12,7 +13,6 @@ connection node_2;
SET GLOBAL wsrep_on=OFF;
INSERT INTO t1 VALUES (1, 'a');
SET GLOBAL wsrep_on=ON;
-connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connection node_3;
INSERT INTO t1 VALUES (1, 'b');
SET SESSION wsrep_sync_wait = 0;
diff --git a/mysql-test/suite/galera_3nodes/t/GCF-363.test b/mysql-test/suite/galera_3nodes/t/GCF-363.test
index 5867247e6ee..17c510e7c9c 100644
--- a/mysql-test/suite/galera_3nodes/t/GCF-363.test
+++ b/mysql-test/suite/galera_3nodes/t/GCF-363.test
@@ -5,10 +5,12 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
---connection node_1
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
+--let $node_3=node_3
--source ../galera/include/auto_increment_offset_save.inc
--connection node_1
@@ -26,7 +28,6 @@ SET GLOBAL wsrep_on=OFF;
INSERT INTO t1 VALUES (1, 'a');
SET GLOBAL wsrep_on=ON;
---connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connection node_3
INSERT INTO t1 VALUES (1, 'b');
SET SESSION wsrep_sync_wait = 0;
@@ -72,4 +73,3 @@ CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown");
--connection node_1
# Restore original auto_increment_offset values.
--source ../galera/include/auto_increment_offset_restore.inc
-
diff --git a/mysql-test/suite/gcol/inc/gcol_column_def_options.inc b/mysql-test/suite/gcol/inc/gcol_column_def_options.inc
index 31923f25f01..646dc1abc7b 100644
--- a/mysql-test/suite/gcol/inc/gcol_column_def_options.inc
+++ b/mysql-test/suite/gcol/inc/gcol_column_def_options.inc
@@ -150,7 +150,7 @@ drop table t2;
--echo FK options
create table t1(a int, b int as (a % 2), c int as (a) stored);
create table t2 (a int);
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
alter table t1 add constraint foreign key fk(d) references t2(a);
if ($support_virtual_foreign)
{
diff --git a/mysql-test/suite/gcol/r/gcol_keys_innodb.result b/mysql-test/suite/gcol/r/gcol_keys_innodb.result
index 06c2553a93c..0228f9be842 100644
--- a/mysql-test/suite/gcol/r/gcol_keys_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_keys_innodb.result
@@ -695,7 +695,7 @@ a b c
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
ALTER TABLE t ADD UNIQUE INDEX (c(1));
Warnings:
-Warning 1264 Out of range value for column 'b' at row 1
+Warning 1264 Out of range value for column 'b' at row 0
SELECT * FROM t WHERE c = '0';
a b c
1 127 0
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_index.result b/mysql-test/suite/gcol/r/innodb_virtual_index.result
index e63d47391c9..7e2f77e5d96 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_index.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_index.result
@@ -280,7 +280,7 @@ INSERT IGNORE INTO t1 (id, a) VALUES (NULL, -1);
Warnings:
Warning 1264 Out of range value for column 'va' at row 1
ALTER TABLE t1 FORCE;
-ERROR 22003: Out of range value for column 'va' at row 1
+ERROR 22003: Out of range value for column 'va' at row 0
DROP TABLE t1;
#
# MDEV-24713 Assertion `dict_table_is_comp(index->table)' failed
diff --git a/mysql-test/suite/innodb/include/have_innodb_bzip2.opt b/mysql-test/suite/innodb/include/have_innodb_bzip2.opt
new file mode 100644
index 00000000000..64680f7b988
--- /dev/null
+++ b/mysql-test/suite/innodb/include/have_innodb_bzip2.opt
@@ -0,0 +1 @@
+--plugin-load-add=$PROVIDER_BZIP2_SO
diff --git a/mysql-test/suite/innodb/include/have_innodb_lz4.opt b/mysql-test/suite/innodb/include/have_innodb_lz4.opt
new file mode 100644
index 00000000000..eac86deee3a
--- /dev/null
+++ b/mysql-test/suite/innodb/include/have_innodb_lz4.opt
@@ -0,0 +1,2 @@
+--plugin-load-add=$PROVIDER_LZ4_SO
+
diff --git a/mysql-test/suite/innodb/include/have_innodb_lzma.opt b/mysql-test/suite/innodb/include/have_innodb_lzma.opt
new file mode 100644
index 00000000000..ecb6bd7a614
--- /dev/null
+++ b/mysql-test/suite/innodb/include/have_innodb_lzma.opt
@@ -0,0 +1,2 @@
+--plugin-load-add=$PROVIDER_LZMA_SO
+
diff --git a/mysql-test/suite/innodb/include/have_innodb_lzo.opt b/mysql-test/suite/innodb/include/have_innodb_lzo.opt
new file mode 100644
index 00000000000..6033fc5d81c
--- /dev/null
+++ b/mysql-test/suite/innodb/include/have_innodb_lzo.opt
@@ -0,0 +1,2 @@
+--plugin-load-add=$PROVIDER_LZO_SO
+
diff --git a/mysql-test/suite/innodb/include/have_innodb_snappy.opt b/mysql-test/suite/innodb/include/have_innodb_snappy.opt
new file mode 100644
index 00000000000..80c3325a6aa
--- /dev/null
+++ b/mysql-test/suite/innodb/include/have_innodb_snappy.opt
@@ -0,0 +1,2 @@
+--plugin-load-add=$PROVIDER_SNAPPY_SO
+
diff --git a/mysql-test/suite/innodb/r/alter_kill.result b/mysql-test/suite/innodb/r/alter_kill.result
index 36b582c6d76..0283d1079e1 100644
--- a/mysql-test/suite/innodb/r/alter_kill.result
+++ b/mysql-test/suite/innodb/r/alter_kill.result
@@ -17,7 +17,7 @@ disconnect con1;
SELECT COUNT(*) FROM bug16720368;
ERROR 42S02: Table 'test.bug16720368' doesn't exist in engine
INSERT INTO bug16720368 VALUES(1);
-ERROR 42S02: Table 'test.bug16720368' doesn't exist in engine
+ERROR HY000: Table test/bug16720368 is corrupted. Please drop the table and recreate.
INSERT INTO bug16720368_1 VALUES(1);
# Shut down the server to uncorrupt the data.
# restart
diff --git a/mysql-test/suite/innodb/r/compression_providers_loaded,lz4.rdiff b/mysql-test/suite/innodb/r/compression_providers_loaded,lz4.rdiff
new file mode 100644
index 00000000000..b729890c354
--- /dev/null
+++ b/mysql-test/suite/innodb/r/compression_providers_loaded,lz4.rdiff
@@ -0,0 +1,19 @@
+--- suite/innodb/r/compression_providers_loaded.result
++++ suite/innodb/r/compression_providers_loaded.reject
+@@ -1,10 +1,10 @@
+ #
+-# Testing unloaded compression provider: bzip2
++# Testing unloaded compression provider: lz4
+ #
+-# Innodb_have_bzip2 reflects that the provider is loaded
+-SHOW GLOBAL STATUS WHERE Variable_name = "Innodb_have_bzip2";
++# Innodb_have_lz4 reflects that the provider is loaded
++SHOW GLOBAL STATUS WHERE Variable_name = "Innodb_have_lz4";
+ Variable_name Value
+-Innodb_have_bzip2 ON
+-# Innodb_compression_algorithm can be set to bzip2
+-SET GLOBAL Innodb_compression_algorithm = bzip2;
++Innodb_have_lz4 ON
++# Innodb_compression_algorithm can be set to lz4
++SET GLOBAL Innodb_compression_algorithm = lz4;
+ SET GLOBAL Innodb_compression_algorithm = zlib;
diff --git a/mysql-test/suite/innodb/r/compression_providers_loaded,lzma.rdiff b/mysql-test/suite/innodb/r/compression_providers_loaded,lzma.rdiff
new file mode 100644
index 00000000000..caba4283977
--- /dev/null
+++ b/mysql-test/suite/innodb/r/compression_providers_loaded,lzma.rdiff
@@ -0,0 +1,19 @@
+--- suite/innodb/r/compression_providers_loaded.result
++++ suite/innodb/r/compression_providers_loaded.reject
+@@ -1,10 +1,10 @@
+ #
+-# Testing unloaded compression provider: bzip2
++# Testing unloaded compression provider: lzma
+ #
+-# Innodb_have_bzip2 reflects that the provider is loaded
+-SHOW GLOBAL STATUS WHERE Variable_name = "Innodb_have_bzip2";
++# Innodb_have_lzma reflects that the provider is loaded
++SHOW GLOBAL STATUS WHERE Variable_name = "Innodb_have_lzma";
+ Variable_name Value
+-Innodb_have_bzip2 ON
+-# Innodb_compression_algorithm can be set to bzip2
+-SET GLOBAL Innodb_compression_algorithm = bzip2;
++Innodb_have_lzma ON
++# Innodb_compression_algorithm can be set to lzma
++SET GLOBAL Innodb_compression_algorithm = lzma;
+ SET GLOBAL Innodb_compression_algorithm = zlib;
diff --git a/mysql-test/suite/innodb/r/compression_providers_loaded,lzo.rdiff b/mysql-test/suite/innodb/r/compression_providers_loaded,lzo.rdiff
new file mode 100644
index 00000000000..8a1a5403fc2
--- /dev/null
+++ b/mysql-test/suite/innodb/r/compression_providers_loaded,lzo.rdiff
@@ -0,0 +1,19 @@
+--- suite/innodb/r/compression_providers_loaded.result
++++ suite/innodb/r/compression_providers_loaded.reject
+@@ -1,10 +1,10 @@
+ #
+-# Testing unloaded compression provider: bzip2
++# Testing unloaded compression provider: lzo
+ #
+-# Innodb_have_bzip2 reflects that the provider is loaded
+-SHOW GLOBAL STATUS WHERE Variable_name = "Innodb_have_bzip2";
++# Innodb_have_lzo reflects that the provider is loaded
++SHOW GLOBAL STATUS WHERE Variable_name = "Innodb_have_lzo";
+ Variable_name Value
+-Innodb_have_bzip2 ON
+-# Innodb_compression_algorithm can be set to bzip2
+-SET GLOBAL Innodb_compression_algorithm = bzip2;
++Innodb_have_lzo ON
++# Innodb_compression_algorithm can be set to lzo
++SET GLOBAL Innodb_compression_algorithm = lzo;
+ SET GLOBAL Innodb_compression_algorithm = zlib;
diff --git a/mysql-test/suite/innodb/r/compression_providers_loaded,snappy.rdiff b/mysql-test/suite/innodb/r/compression_providers_loaded,snappy.rdiff
new file mode 100644
index 00000000000..4a1261d45d2
--- /dev/null
+++ b/mysql-test/suite/innodb/r/compression_providers_loaded,snappy.rdiff
@@ -0,0 +1,19 @@
+--- suite/innodb/r/compression_providers_loaded.result
++++ suite/innodb/r/compression_providers_loaded.reject
+@@ -1,10 +1,10 @@
+ #
+-# Testing unloaded compression provider: bzip2
++# Testing unloaded compression provider: snappy
+ #
+-# Innodb_have_bzip2 reflects that the provider is loaded
+-SHOW GLOBAL STATUS WHERE Variable_name = "Innodb_have_bzip2";
++# Innodb_have_snappy reflects that the provider is loaded
++SHOW GLOBAL STATUS WHERE Variable_name = "Innodb_have_snappy";
+ Variable_name Value
+-Innodb_have_bzip2 ON
+-# Innodb_compression_algorithm can be set to bzip2
+-SET GLOBAL Innodb_compression_algorithm = bzip2;
++Innodb_have_snappy ON
++# Innodb_compression_algorithm can be set to snappy
++SET GLOBAL Innodb_compression_algorithm = snappy;
+ SET GLOBAL Innodb_compression_algorithm = zlib;
diff --git a/mysql-test/suite/innodb/r/compression_providers_loaded.result b/mysql-test/suite/innodb/r/compression_providers_loaded.result
new file mode 100644
index 00000000000..2d1700c2ae2
--- /dev/null
+++ b/mysql-test/suite/innodb/r/compression_providers_loaded.result
@@ -0,0 +1,10 @@
+#
+# Testing unloaded compression provider: bzip2
+#
+# Innodb_have_bzip2 reflects that the provider is loaded
+SHOW GLOBAL STATUS WHERE Variable_name = "Innodb_have_bzip2";
+Variable_name Value
+Innodb_have_bzip2 ON
+# Innodb_compression_algorithm can be set to bzip2
+SET GLOBAL Innodb_compression_algorithm = bzip2;
+SET GLOBAL Innodb_compression_algorithm = zlib;
diff --git a/mysql-test/suite/innodb/r/compression_providers_unloaded,lz4.rdiff b/mysql-test/suite/innodb/r/compression_providers_unloaded,lz4.rdiff
new file mode 100644
index 00000000000..e849fb5c474
--- /dev/null
+++ b/mysql-test/suite/innodb/r/compression_providers_unloaded,lz4.rdiff
@@ -0,0 +1,26 @@
+--- suite/innodb/r/compression_providers_unloaded.result
++++ suite/innodb/r/compression_providers_unloaded.reject
+@@ -1,14 +1,14 @@
+ #
+-# Testing unloaded compression provider: bzip2
++# Testing unloaded compression provider: lz4
+ #
+-# Innodb_have_bzip2 reflects that the provider is not loaded
+-SHOW GLOBAL STATUS WHERE Variable_name = "Innodb_have_bzip2";
++# Innodb_have_lz4 reflects that the provider is not loaded
++SHOW GLOBAL STATUS WHERE Variable_name = "Innodb_have_lz4";
+ Variable_name Value
+-Innodb_have_bzip2 OFF
+-# Innodb_compression_algorithm cannot be set to bzip2
+-SET GLOBAL Innodb_compression_algorithm = bzip2;
+-ERROR 42000: Variable 'innodb_compression_algorithm' can't be set to the value of 'bzip2'
++Innodb_have_lz4 OFF
++# Innodb_compression_algorithm cannot be set to lz4
++SET GLOBAL Innodb_compression_algorithm = lz4;
++ERROR 42000: Variable 'innodb_compression_algorithm' can't be set to the value of 'lz4'
+ show warnings;
+ Level Code Message
+-Warning 138 InnoDB: compression algorithm bzip2 (5) is not available. Please, load the corresponding provider plugin.
+-Error 1231 Variable 'innodb_compression_algorithm' can't be set to the value of 'bzip2'
++Warning 138 InnoDB: compression algorithm lz4 (2) is not available. Please, load the corresponding provider plugin.
++Error 1231 Variable 'innodb_compression_algorithm' can't be set to the value of 'lz4'
diff --git a/mysql-test/suite/innodb/r/compression_providers_unloaded,lzma.rdiff b/mysql-test/suite/innodb/r/compression_providers_unloaded,lzma.rdiff
new file mode 100644
index 00000000000..466fb37c3fb
--- /dev/null
+++ b/mysql-test/suite/innodb/r/compression_providers_unloaded,lzma.rdiff
@@ -0,0 +1,26 @@
+--- suite/innodb/r/compression_providers_unloaded.result
++++ suite/innodb/r/compression_providers_unloaded.reject
+@@ -1,14 +1,14 @@
+ #
+-# Testing unloaded compression provider: bzip2
++# Testing unloaded compression provider: lzma
+ #
+-# Innodb_have_bzip2 reflects that the provider is not loaded
+-SHOW GLOBAL STATUS WHERE Variable_name = "Innodb_have_bzip2";
++# Innodb_have_lzma reflects that the provider is not loaded
++SHOW GLOBAL STATUS WHERE Variable_name = "Innodb_have_lzma";
+ Variable_name Value
+-Innodb_have_bzip2 OFF
+-# Innodb_compression_algorithm cannot be set to bzip2
+-SET GLOBAL Innodb_compression_algorithm = bzip2;
+-ERROR 42000: Variable 'innodb_compression_algorithm' can't be set to the value of 'bzip2'
++Innodb_have_lzma OFF
++# Innodb_compression_algorithm cannot be set to lzma
++SET GLOBAL Innodb_compression_algorithm = lzma;
++ERROR 42000: Variable 'innodb_compression_algorithm' can't be set to the value of 'lzma'
+ show warnings;
+ Level Code Message
+-Warning 138 InnoDB: compression algorithm bzip2 (5) is not available. Please, load the corresponding provider plugin.
+-Error 1231 Variable 'innodb_compression_algorithm' can't be set to the value of 'bzip2'
++Warning 138 InnoDB: compression algorithm lzma (4) is not available. Please, load the corresponding provider plugin.
++Error 1231 Variable 'innodb_compression_algorithm' can't be set to the value of 'lzma'
diff --git a/mysql-test/suite/innodb/r/compression_providers_unloaded,lzo.rdiff b/mysql-test/suite/innodb/r/compression_providers_unloaded,lzo.rdiff
new file mode 100644
index 00000000000..dec0becf71e
--- /dev/null
+++ b/mysql-test/suite/innodb/r/compression_providers_unloaded,lzo.rdiff
@@ -0,0 +1,26 @@
+--- suite/innodb/r/compression_providers_unloaded.result
++++ suite/innodb/r/compression_providers_unloaded.reject
+@@ -1,14 +1,14 @@
+ #
+-# Testing unloaded compression provider: bzip2
++# Testing unloaded compression provider: lzo
+ #
+-# Innodb_have_bzip2 reflects that the provider is not loaded
+-SHOW GLOBAL STATUS WHERE Variable_name = "Innodb_have_bzip2";
++# Innodb_have_lzo reflects that the provider is not loaded
++SHOW GLOBAL STATUS WHERE Variable_name = "Innodb_have_lzo";
+ Variable_name Value
+-Innodb_have_bzip2 OFF
+-# Innodb_compression_algorithm cannot be set to bzip2
+-SET GLOBAL Innodb_compression_algorithm = bzip2;
+-ERROR 42000: Variable 'innodb_compression_algorithm' can't be set to the value of 'bzip2'
++Innodb_have_lzo OFF
++# Innodb_compression_algorithm cannot be set to lzo
++SET GLOBAL Innodb_compression_algorithm = lzo;
++ERROR 42000: Variable 'innodb_compression_algorithm' can't be set to the value of 'lzo'
+ show warnings;
+ Level Code Message
+-Warning 138 InnoDB: compression algorithm bzip2 (5) is not available. Please, load the corresponding provider plugin.
+-Error 1231 Variable 'innodb_compression_algorithm' can't be set to the value of 'bzip2'
++Warning 138 InnoDB: compression algorithm lzo (3) is not available. Please, load the corresponding provider plugin.
++Error 1231 Variable 'innodb_compression_algorithm' can't be set to the value of 'lzo'
diff --git a/mysql-test/suite/innodb/r/compression_providers_unloaded,snappy.rdiff b/mysql-test/suite/innodb/r/compression_providers_unloaded,snappy.rdiff
new file mode 100644
index 00000000000..273ff4e2131
--- /dev/null
+++ b/mysql-test/suite/innodb/r/compression_providers_unloaded,snappy.rdiff
@@ -0,0 +1,26 @@
+--- suite/innodb/r/compression_providers_unloaded.result
++++ suite/innodb/r/compression_providers_unloaded.reject
+@@ -1,14 +1,14 @@
+ #
+-# Testing unloaded compression provider: bzip2
++# Testing unloaded compression provider: snappy
+ #
+-# Innodb_have_bzip2 reflects that the provider is not loaded
+-SHOW GLOBAL STATUS WHERE Variable_name = "Innodb_have_bzip2";
++# Innodb_have_snappy reflects that the provider is not loaded
++SHOW GLOBAL STATUS WHERE Variable_name = "Innodb_have_snappy";
+ Variable_name Value
+-Innodb_have_bzip2 OFF
+-# Innodb_compression_algorithm cannot be set to bzip2
+-SET GLOBAL Innodb_compression_algorithm = bzip2;
+-ERROR 42000: Variable 'innodb_compression_algorithm' can't be set to the value of 'bzip2'
++Innodb_have_snappy OFF
++# Innodb_compression_algorithm cannot be set to snappy
++SET GLOBAL Innodb_compression_algorithm = snappy;
++ERROR 42000: Variable 'innodb_compression_algorithm' can't be set to the value of 'snappy'
+ show warnings;
+ Level Code Message
+-Warning 138 InnoDB: compression algorithm bzip2 (5) is not available. Please, load the corresponding provider plugin.
+-Error 1231 Variable 'innodb_compression_algorithm' can't be set to the value of 'bzip2'
++Warning 138 InnoDB: compression algorithm snappy (6) is not available. Please, load the corresponding provider plugin.
++Error 1231 Variable 'innodb_compression_algorithm' can't be set to the value of 'snappy'
diff --git a/mysql-test/suite/innodb/r/compression_providers_unloaded.result b/mysql-test/suite/innodb/r/compression_providers_unloaded.result
new file mode 100644
index 00000000000..d4ac9cdb41c
--- /dev/null
+++ b/mysql-test/suite/innodb/r/compression_providers_unloaded.result
@@ -0,0 +1,14 @@
+#
+# Testing unloaded compression provider: bzip2
+#
+# Innodb_have_bzip2 reflects that the provider is not loaded
+SHOW GLOBAL STATUS WHERE Variable_name = "Innodb_have_bzip2";
+Variable_name Value
+Innodb_have_bzip2 OFF
+# Innodb_compression_algorithm cannot be set to bzip2
+SET GLOBAL Innodb_compression_algorithm = bzip2;
+ERROR 42000: Variable 'innodb_compression_algorithm' can't be set to the value of 'bzip2'
+show warnings;
+Level Code Message
+Warning 138 InnoDB: compression algorithm bzip2 (5) is not available. Please, load the corresponding provider plugin.
+Error 1231 Variable 'innodb_compression_algorithm' can't be set to the value of 'bzip2'
diff --git a/mysql-test/suite/innodb/r/corrupted_during_recovery.result b/mysql-test/suite/innodb/r/corrupted_during_recovery.result
index 951233ced3c..d67dc8a63d8 100644
--- a/mysql-test/suite/innodb/r/corrupted_during_recovery.result
+++ b/mysql-test/suite/innodb/r/corrupted_during_recovery.result
@@ -9,7 +9,7 @@ INSERT INTO t2 VALUES(1);
SELECT * FROM t1;
ERROR 42000: Unknown storage engine 'InnoDB'
SELECT * FROM t1;
-ERROR 42S02: Table 'test.t1' doesn't exist in engine
+ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate.
SELECT * FROM t2;
a
1
diff --git a/mysql-test/suite/innodb/r/innodb-alter.result b/mysql-test/suite/innodb/r/innodb-alter.result
index 5bcb7cf963f..16c33ee02a2 100644
--- a/mysql-test/suite/innodb/r/innodb-alter.result
+++ b/mysql-test/suite/innodb/r/innodb-alter.result
@@ -1068,7 +1068,7 @@ ALTER TABLE t1 ADD b TIME NOT NULL DEFAULT if(unix_timestamp()>1,TIMESTAMP'2001-
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 1
Warnings:
-Note 1265 Data truncated for column 'b' at row 1
+Note 1265 Data truncated for column 'b' at row 0
SELECT * FROM t1;
a b
10 10:20:30
diff --git a/mysql-test/suite/innodb/r/innodb-online-alter-gis.result b/mysql-test/suite/innodb/r/innodb-online-alter-gis.result
index 9e0dbf49931..6a57be49ac5 100644
--- a/mysql-test/suite/innodb/r/innodb-online-alter-gis.result
+++ b/mysql-test/suite/innodb/r/innodb-online-alter-gis.result
@@ -42,7 +42,7 @@ drop table t1;
#
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
ALTER TABLE t1 ADD COLUMN b LINESTRING DEFAULT POINT(1,1);
-ERROR 22007: Incorrect LINESTRING value: 'POINT(1 1)' for column ``.``.`b` at row 1
+ERROR 22007: Incorrect LINESTRING value: 'POINT(1 1)' for column ``.``.`b` at row 0
DESCRIBE t1;
Field Type Null Key Default Extra
a int(11) YES NULL
diff --git a/mysql-test/suite/innodb/r/innodb_gis.result b/mysql-test/suite/innodb/r/innodb_gis.result
index b00c80643c0..4c89ad4b9fb 100644
--- a/mysql-test/suite/innodb/r/innodb_gis.result
+++ b/mysql-test/suite/innodb/r/innodb_gis.result
@@ -452,9 +452,9 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
drop table t1;
create table t1 (pk integer primary key auto_increment, fl geometry not null);
insert into t1 (fl) values (1);
-ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 (fl) values (1.11);
-ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
+ERROR HY000: Cannot cast 'decimal' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 (fl) values ("qwerty");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values (pointfromtext('point(1,1)'));
diff --git a/mysql-test/suite/innodb/r/insert_into_empty.result b/mysql-test/suite/innodb/r/insert_into_empty.result
index b35b508fa7f..29c5ef48da9 100644
--- a/mysql-test/suite/innodb/r/insert_into_empty.result
+++ b/mysql-test/suite/innodb/r/insert_into_empty.result
@@ -182,3 +182,135 @@ CREATE TABLE t (i INT) ENGINE=InnoDB PARTITION BY HASH (i) PARTITIONS 2;
INSERT INTO t VALUES (0);
INSERT INTO t VALUES (1),(0),(1);
DROP TABLE t;
+#
+# MDEV-26947 UNIQUE column checks fail in InnoDB resulting
+# in table corruption
+#
+CREATE TABLE t (c1 INT KEY,c2 INT UNIQUE) ENGINE=InnoDB;
+BEGIN;
+INSERT INTO t VALUES (1,0),(2,0);
+ERROR HY000: Got error 1 "Operation not permitted" during COMMIT
+CHECK TABLE t;
+Table Op Msg_type Msg_text
+test.t check status OK
+COMMIT;
+DROP TABLE t;
+CREATE TABLE t (i INT UNIQUE)ENGINE=InnoDB;
+INSERT INTO t VALUES (0),(0);
+ERROR HY000: Got error 1 "Operation not permitted" during COMMIT
+CHECK TABLE t;
+Table Op Msg_type Msg_text
+test.t check status OK
+DROP TABLE t;
+CREATE TABLE t (c INT PRIMARY KEY,c2 CHAR(1) UNIQUE)ENGINE=InnoDB;
+BEGIN;
+INSERT INTO t VALUES(1, ''),(2, '');
+ERROR HY000: Got error 1 "Operation not permitted" during COMMIT
+SELECT * FROM t;
+c c2
+DELETE FROM t;
+COMMIT;
+DROP TABLE t;
+#
+# MDEV-26956 LeakSanitizer/Valgrind errors in
+# trx_mod_table_time_t::start_bulk_insert
+# upon adding system versioning
+#
+CREATE TABLE t1(id INT, s DATE, e DATE, PERIOD FOR p(s,e),
+PRIMARY KEY(id, p WITHOUT OVERLAPS)) ENGINE=InnoDB;
+ALTER TABLE t1 ADD COLUMN row_start BIGINT UNSIGNED AS ROW START,
+ADD COLUMN row_end BIGINT UNSIGNED AS ROW END,
+ADD PERIOD FOR SYSTEM_TIME(row_start,row_end), WITH SYSTEM VERSIONING;
+DROP TABLE t1;
+#
+# MDEV-27316 Assertion `!(index)->is_spatial()' failed.
+#
+CREATE TABLE t (c POINT NOT NULL, SPATIAL INDEX(c)) ENGINE=InnoDB;
+INSERT INTO t VALUES (POINT(1, 1));
+SELECT COUNT(*) FROM t WHERE MBRWithin(t.c, POINT(1,1));
+COUNT(*)
+1
+DROP TABLE t;
+#
+# MDEV-27318 Assertion data_size < srv_sort_buf_size failed in row_merge_bulk_buf_add
+#
+CREATE TABLE t1(f1 MEDIUMTEXT)ENGINE=InnoDB;
+INSERT INTO t1 VALUES(REPEAT(1, 8459264));
+SELECT length(f1) FROM t1;
+length(f1)
+8459264
+DROP TABLE t1;
+#
+# MDEV-27858 Assertion `page_dir_get_n_heap(new_page) == 2U' failed in PageBulk::init
+#
+CREATE TABLE t1 (c INT) ENGINE=InnoDB;
+CREATE TABLE t2 (c INT) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1);
+LOCK TABLES t1 WRITE,t2 WRITE;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (1);
+DROP TABLE t2, t1;
+#
+# MDEV-28138 MariaDB Assertion Failed in mtr_buf_t::has_space
+#
+CREATE TABLE t1(
+f1 SERIAL,
+f2 LINESTRING NOT NULL DEFAULT LineFromText('LINESTRING(1 1,2 2,3 3)'),
+SPATIAL INDEX(f2))ENGINE=InnoDB;
+INSERT INTO t1(f1) VALUES(0), (1), (2);
+ERROR 23000: Duplicate entry '1' for key 'f1'
+DROP TABLE t1;
+#
+# MDEV-28237 Assertion `0' failed in row_upd_sec_index_entry on DELETE
+#
+CREATE TABLE t1 (c0 YEAR UNIQUE) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (0),(0),(0),(0),(0),(0),(0);
+ERROR HY000: Got error 1 "Operation not permitted" during COMMIT
+DELETE FROM t1;
+DROP TABLE t1;
+#
+# MDEV-28037 Assertion `trx->bulk_insert' failed in innodb_prepare_commit_versioned
+#
+CREATE TABLE t1 (c INT) ENGINE=InnoDB;
+CREATE TABLE t2 (c INT) ENGINE=InnoDB;
+CREATE TRIGGER tr AFTER INSERT ON t1 FOR EACH ROW UPDATE t2 SET c=1;
+INSERT INTO t1 VALUES (0);
+SELECT * FROM t1;
+c
+0
+SELECT * FROM t2;
+c
+DROP TABLE t2, t1;
+#
+# MDEV-28242 Assertion `!check_foreigns' failed in
+# trx_t::check_bulk_buffer
+#
+CREATE TABLE t1 (c INT)ENGINE=InnoDB;
+BEGIN;
+INSERT INTO t1 VALUES(1), (1);
+SET SESSION foreign_key_checks=TRUE;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+CREATE TABLE t2(d INT)ENGINE=InnoDB;
+DROP TABLE t2, t1;
+#
+# MDEV-28400 Leak in trx_mod_time_t::start_bulk_insert
+#
+SET SESSION foreign_key_checks=0;
+CREATE TABLE t1 (a INT) ENGINE=InnoDB PARTITION BY HASH(a) PARTITIONS 2;
+INSERT INTO t1 VALUES (1),(2);
+ALTER TABLE t1 REBUILD PARTITION p0;
+DROP TABLE t1;
+#
+# MDEV-29570 InnoDB fails to clean bulk buffer when server
+# does rollback operation
+#
+CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB
+PARTITION BY RANGE (pk) (
+PARTITION pn VALUES LESS THAN (20));
+INSERT INTO t1 VALUES (1),(21);
+ERROR HY000: Table has no partition for value 21
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/instant_alter.result b/mysql-test/suite/innodb/r/instant_alter.result
index 6744f0fe061..9cb5f9d2084 100644
--- a/mysql-test/suite/innodb/r/instant_alter.result
+++ b/mysql-test/suite/innodb/r/instant_alter.result
@@ -314,12 +314,12 @@ ALTER TABLE t3 ADD COLUMN c7 TIME NOT NULL DEFAULT current_timestamp();
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 1
Warnings:
-Note 1265 Data truncated for column 'c7' at row 1
+Note 1265 Data truncated for column 'c7' at row 0
ALTER TABLE t3 ADD COLUMN c8 DATE NOT NULL DEFAULT current_timestamp();
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 1
Warnings:
-Note 1265 Data truncated for column 'c8' at row 1
+Note 1265 Data truncated for column 'c8' at row 0
SELECT id, c2, ST_AsText(c3) c3, c4, c5, c6, c7, c8 FROM t3;
id c2 c3 c4 c5 c6 c7 c8
1 1 POLYGON((1 1,2 2,3 3,1 1)) 1970-01-01 03:00:42 1970-01-01 03:00:42 NULL 03:00:42 1970-01-01
@@ -1248,12 +1248,12 @@ ALTER TABLE t3 ADD COLUMN c7 TIME NOT NULL DEFAULT current_timestamp();
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 1
Warnings:
-Note 1265 Data truncated for column 'c7' at row 1
+Note 1265 Data truncated for column 'c7' at row 0
ALTER TABLE t3 ADD COLUMN c8 DATE NOT NULL DEFAULT current_timestamp();
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 1
Warnings:
-Note 1265 Data truncated for column 'c8' at row 1
+Note 1265 Data truncated for column 'c8' at row 0
SELECT id, c2, ST_AsText(c3) c3, c4, c5, c6, c7, c8 FROM t3;
id c2 c3 c4 c5 c6 c7 c8
1 1 POLYGON((1 1,2 2,3 3,1 1)) 1970-01-01 03:00:42 1970-01-01 03:00:42 NULL 03:00:42 1970-01-01
@@ -2182,12 +2182,12 @@ ALTER TABLE t3 ADD COLUMN c7 TIME NOT NULL DEFAULT current_timestamp();
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 1
Warnings:
-Note 1265 Data truncated for column 'c7' at row 1
+Note 1265 Data truncated for column 'c7' at row 0
ALTER TABLE t3 ADD COLUMN c8 DATE NOT NULL DEFAULT current_timestamp();
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 1
Warnings:
-Note 1265 Data truncated for column 'c8' at row 1
+Note 1265 Data truncated for column 'c8' at row 0
SELECT id, c2, ST_AsText(c3) c3, c4, c5, c6, c7, c8 FROM t3;
id c2 c3 c4 c5 c6 c7 c8
1 1 POLYGON((1 1,2 2,3 3,1 1)) 1970-01-01 03:00:42 1970-01-01 03:00:42 NULL 03:00:42 1970-01-01
diff --git a/mysql-test/suite/innodb/t/alter_kill.test b/mysql-test/suite/innodb/t/alter_kill.test
index a371a77971d..277d9b4e71b 100644
--- a/mysql-test/suite/innodb/t/alter_kill.test
+++ b/mysql-test/suite/innodb/t/alter_kill.test
@@ -15,11 +15,10 @@ call mtr.add_suppression("InnoDB: Operating system error.*in a file operation");
call mtr.add_suppression("InnoDB: \(The error means\|If you are\)");
call mtr.add_suppression("InnoDB: Ignoring tablespace `test/bug16720368` because it could not be opened");
call mtr.add_suppression("InnoDB: Tablespace .* was not found at.*bug16735660");
-call mtr.add_suppression("InnoDB: Set innodb_force_recovery=1 to ignore this and to permanently lose all changes to the tablespace.");
call mtr.add_suppression("InnoDB: Plugin initialization aborted*");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed.");
-call mtr.add_suppression("InnoDB: Table `test`\\.`bug16720368` is corrupted");
+call mtr.add_suppression("Table .*bug16720368.* is corrupted");
-- enable_query_log
-- echo #
@@ -79,7 +78,7 @@ EOF
--error ER_NO_SUCH_TABLE_IN_ENGINE
SELECT COUNT(*) FROM bug16720368;
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
INSERT INTO bug16720368 VALUES(1);
INSERT INTO bug16720368_1 VALUES(1);
diff --git a/mysql-test/suite/innodb/t/compression_providers_loaded.combinations b/mysql-test/suite/innodb/t/compression_providers_loaded.combinations
new file mode 100644
index 00000000000..d2a413f3902
--- /dev/null
+++ b/mysql-test/suite/innodb/t/compression_providers_loaded.combinations
@@ -0,0 +1,19 @@
+[bzip2]
+innodb
+plugin-load-add=$PROVIDER_BZIP2_SO
+
+[lz4]
+innodb
+plugin-load-add=$PROVIDER_LZ4_SO
+
+[lzma]
+innodb
+plugin-load-add=$PROVIDER_LZMA_SO
+
+[lzo]
+innodb
+plugin-load-add=$PROVIDER_LZO_SO
+
+[snappy]
+innodb
+plugin-load-add=$PROVIDER_SNAPPY_SO
diff --git a/mysql-test/suite/innodb/t/compression_providers_loaded.test b/mysql-test/suite/innodb/t/compression_providers_loaded.test
new file mode 100644
index 00000000000..1b6c348ccfa
--- /dev/null
+++ b/mysql-test/suite/innodb/t/compression_providers_loaded.test
@@ -0,0 +1,18 @@
+let $alg = $MTR_COMBINATIONS;
+
+if (`SELECT COUNT(*) = 0 FROM information_schema.plugins WHERE plugin_name = "provider_$alg" AND plugin_status = "active"`)
+{
+ skip Needs provider_$alg plugin;
+}
+
+--echo #
+--echo # Testing unloaded compression provider: $alg
+--echo #
+
+--echo # Innodb_have_$alg reflects that the provider is loaded
+eval SHOW GLOBAL STATUS WHERE Variable_name = "Innodb_have_$alg";
+
+--echo # Innodb_compression_algorithm can be set to $alg
+let $innodb_compression_algorithm_orig = `SELECT @@Innodb_compression_algorithm`;
+eval SET GLOBAL Innodb_compression_algorithm = $alg;
+eval SET GLOBAL Innodb_compression_algorithm = $innodb_compression_algorithm_orig;
diff --git a/mysql-test/suite/innodb/t/compression_providers_unloaded.combinations b/mysql-test/suite/innodb/t/compression_providers_unloaded.combinations
new file mode 100644
index 00000000000..20c49960390
--- /dev/null
+++ b/mysql-test/suite/innodb/t/compression_providers_unloaded.combinations
@@ -0,0 +1,14 @@
+[bzip2]
+innodb
+
+[lz4]
+innodb
+
+[lzma]
+innodb
+
+[lzo]
+innodb
+
+[snappy]
+innodb
diff --git a/mysql-test/suite/innodb/t/compression_providers_unloaded.test b/mysql-test/suite/innodb/t/compression_providers_unloaded.test
new file mode 100644
index 00000000000..84bcce59729
--- /dev/null
+++ b/mysql-test/suite/innodb/t/compression_providers_unloaded.test
@@ -0,0 +1,13 @@
+let $alg = $MTR_COMBINATIONS;
+
+--echo #
+--echo # Testing unloaded compression provider: $alg
+--echo #
+
+--echo # Innodb_have_$alg reflects that the provider is not loaded
+eval SHOW GLOBAL STATUS WHERE Variable_name = "Innodb_have_$alg";
+
+--echo # Innodb_compression_algorithm cannot be set to $alg
+error ER_WRONG_VALUE_FOR_VAR;
+eval SET GLOBAL Innodb_compression_algorithm = $alg;
+show warnings;
diff --git a/mysql-test/suite/innodb/t/corrupted_during_recovery.test b/mysql-test/suite/innodb/t/corrupted_during_recovery.test
index 31d353efa38..f383d9ab9b8 100644
--- a/mysql-test/suite/innodb/t/corrupted_during_recovery.test
+++ b/mysql-test/suite/innodb/t/corrupted_during_recovery.test
@@ -7,7 +7,7 @@ call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE faile
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t1\\.ibd' page");
call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test.t1\\.ibd': Page read from tablespace is corrupted.");
call mtr.add_suppression("InnoDB: (Unable to apply log to|Discarding log for) corrupted page .*, page number=3\\]");
-call mtr.add_suppression("InnoDB: Table `test`.`t1` is corrupted. Please drop the table and recreate.");
+call mtr.add_suppression("Table test/t1 is corrupted. Please drop the table and recreate\\.");
call mtr.add_suppression("InnoDB: File '.*test/t1\\.ibd' is corrupted");
call mtr.add_suppression("InnoDB: A long wait .* was observed for dict_sys");
--enable_query_log
@@ -59,7 +59,7 @@ SELECT * FROM t1;
let $restart_parameters=--innodb_force_recovery=1;
--source include/restart_mysqld.inc
---error ER_NO_SUCH_TABLE_IN_ENGINE
+--error ER_TABLE_CORRUPT
SELECT * FROM t1;
SELECT * FROM t2;
CHECK TABLE t2;
diff --git a/mysql-test/suite/innodb/t/innodb-alter.test b/mysql-test/suite/innodb/t/innodb-alter.test
index 60af7c9df80..78550763a9f 100644
--- a/mysql-test/suite/innodb/t/innodb-alter.test
+++ b/mysql-test/suite/innodb/t/innodb-alter.test
@@ -317,9 +317,9 @@ ALTER TABLE t1n CHANGE c2 c1 INT, CHANGE ct c2 INT, CHANGE c1 ct TEXT,
ALGORITHM=COPY;
SHOW CREATE TABLE t1n;
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=INPLACE;
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=COPY;
ALTER TABLE t1n ADD INDEX(c4), CHANGE c2 c4 INT, ALGORITHM=INPLACE;
SHOW CREATE TABLE t1n;
diff --git a/mysql-test/suite/innodb/t/innodb-index-online-fk.test b/mysql-test/suite/innodb/t/innodb-index-online-fk.test
index 5c8954064ce..5423516c4b5 100644
--- a/mysql-test/suite/innodb/t/innodb-index-online-fk.test
+++ b/mysql-test/suite/innodb/t/innodb-index-online-fk.test
@@ -245,7 +245,7 @@ CREATE INDEX tb ON child(a2);
SET foreign_key_checks = 0;
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
ALTER TABLE child CHANGE a2 a3 INT,
ADD CONSTRAINT fk_1 FOREIGN KEY (a2) REFERENCES parent(b)
ON DELETE SET NULL ON UPDATE CASCADE,
diff --git a/mysql-test/suite/innodb/t/innodb-index.test b/mysql-test/suite/innodb/t/innodb-index.test
index 9350672bee9..c7aa6250da5 100644
--- a/mysql-test/suite/innodb/t/innodb-index.test
+++ b/mysql-test/suite/innodb/t/innodb-index.test
@@ -666,7 +666,7 @@ SET GLOBAL innodb_monitor_reset = module_ddl;
--echo # Skip sort
--echo # Change PK from (f1,f2,f5,f6) to (f1,f2,f5)
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
alter table t1 drop column f6;
--enable_info
alter table t1 drop column f6, drop primary key, add primary key(f1,f2,f5);
@@ -692,7 +692,7 @@ SET GLOBAL innodb_monitor_reset = module_ddl;
--echo # Must sort
--echo # Change PK from (f1,f2,f5) to (f1,f5)
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
alter table t1 drop column f2;
--enable_info
alter table t1 drop column f2, drop primary key, add primary key(f1,f5);
@@ -908,9 +908,9 @@ drop table t1;
create table t1(f1 int not null, f2 int not null,
primary key (f1), unique key(f1, f2))engine=innodb;
insert into t1 values(1,3), (2,2);
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
alter table t1 drop column f1;
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
alter table t1 drop column f1, drop primary key;
# DROP PRIMARY KEY is implied for a single-column PRIMARY KEY
alter table t1 drop column f1, drop key f1;
@@ -1012,7 +1012,7 @@ drop table t1;
# pk(o1,o2,o3) to pk(o2,o3) by drop o1
create table t1(o1 int, o2 int, o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,2,2),(2,1,1);
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
alter table t1 drop o1, lock=none;
alter table t1 drop o1, drop primary key, add primary key(o2,o3), lock=none;
drop table t1;
@@ -1020,7 +1020,7 @@ drop table t1;
# pk(o1,o2,o3) to pk(o1,o3) by drop o2
create table t1(o1 int, o2 int, o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,1,2),(1,2,1);
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
alter table t1 drop o2, lock=none;
alter table t1 drop o2, drop primary key, add primary key(o1,o3), lock=none;
drop table t1;
@@ -1028,7 +1028,7 @@ drop table t1;
# pk(o1,o2,o3) to pk(o3) by drop o1,o2
create table t1(o1 int, o2 int, o3 int, primary key(o1,o2,o3)) engine = innodb;
insert into t1 values(1,2,2),(2,1,1);
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
alter table t1 drop o1, drop o2, lock=none;
alter table t1 drop o1, drop o2,drop primary key,add primary key(o3),lock=none;
drop table t1;
@@ -1196,7 +1196,6 @@ DROP TABLE t;
--disable_query_log
call mtr.add_suppression("InnoDB: Tablespace .* was not found at .*t[12].ibd.");
-call mtr.add_suppression("InnoDB: Set innodb_force_recovery=1 to ignore this and to permanently lose all changes to the tablespace");
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
call mtr.add_suppression("Plugin 'InnoDB' init function returned error");
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
diff --git a/mysql-test/suite/innodb/t/innodb-table-online.test b/mysql-test/suite/innodb/t/innodb-table-online.test
index 77b84fe79db..170ba5072f5 100644
--- a/mysql-test/suite/innodb/t/innodb-table-online.test
+++ b/mysql-test/suite/innodb/t/innodb-table-online.test
@@ -313,7 +313,7 @@ SELECT
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY c3p5(c3(5));
UPDATE t1 SET c3 = NULL WHERE c3 = '';
SET lock_wait_timeout = 1;
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
ALTER TABLE t1 DROP COLUMN c22f, ADD PRIMARY KEY c3p5(c3(5));
# NULL -> NOT NULL is only allowed INPLACE without IGNORE.
# Adding a PRIMARY KEY will add NOT NULL implicitly!
diff --git a/mysql-test/suite/innodb/t/innodb-wl5980-alter.test b/mysql-test/suite/innodb/t/innodb-wl5980-alter.test
index 8f58bc6ce48..09c54db644f 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5980-alter.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5980-alter.test
@@ -528,9 +528,9 @@ ALGORITHM=COPY;
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
SHOW CREATE TABLE t1n;
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=INPLACE;
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=COPY;
ALTER TABLE t1n ADD INDEX(c4), CHANGE c2 c4 INT, ALGORITHM=INPLACE;
diff --git a/mysql-test/suite/innodb/t/innodb_bug44571.test b/mysql-test/suite/innodb/t/innodb_bug44571.test
index e27ed0b9bf8..08f41ed8fd8 100644
--- a/mysql-test/suite/innodb/t/innodb_bug44571.test
+++ b/mysql-test/suite/innodb/t/innodb_bug44571.test
@@ -12,7 +12,7 @@ ALTER TABLE bug44571 CHANGE foo bar INT;
# because the CHANGE foo bar is successful. And
# the column name change would communicate to
# InnoDB with the fix from bug #47621
--- error ER_KEY_COLUMN_DOES_NOT_EXITS
+-- error ER_KEY_COLUMN_DOES_NOT_EXIST
ALTER TABLE bug44571 ADD INDEX bug44571b (foo);
# The following create indexes should succeed,
# indirectly confirm the CHANGE foo bar is successful.
diff --git a/mysql-test/suite/innodb/t/innodb_page_compressed.combinations b/mysql-test/suite/innodb/t/innodb_page_compressed.combinations
index f3caab14af3..498c85ee65c 100644
--- a/mysql-test/suite/innodb/t/innodb_page_compressed.combinations
+++ b/mysql-test/suite/innodb/t/innodb_page_compressed.combinations
@@ -1,6 +1,11 @@
[bzip2]
+plugin-load-add=$PROVIDER_BZIP2_SO
[lz4]
+plugin-load-add=$PROVIDER_LZ4_SO
[lzma]
+plugin-load-add=$PROVIDER_LZMA_SO
[lzo]
+plugin-load-add=$PROVIDER_LZO_SO
[snappy]
+plugin-load-add=$PROVIDER_SNAPPY_SO
[zlib]
diff --git a/mysql-test/suite/innodb/t/insert_into_empty.test b/mysql-test/suite/innodb/t/insert_into_empty.test
index 8b885cb5b4f..420af61c6de 100644
--- a/mysql-test/suite/innodb/t/insert_into_empty.test
+++ b/mysql-test/suite/innodb/t/insert_into_empty.test
@@ -1,4 +1,5 @@
--source include/have_innodb.inc
+
--source include/have_sequence.inc
--source include/maybe_debug.inc
--source include/have_partition.inc
@@ -193,3 +194,136 @@ CREATE TABLE t (i INT) ENGINE=InnoDB PARTITION BY HASH (i) PARTITIONS 2;
INSERT INTO t VALUES (0);
INSERT INTO t VALUES (1),(0),(1);
DROP TABLE t;
+
+--echo #
+--echo # MDEV-26947 UNIQUE column checks fail in InnoDB resulting
+--echo # in table corruption
+--echo #
+
+CREATE TABLE t (c1 INT KEY,c2 INT UNIQUE) ENGINE=InnoDB;
+BEGIN;
+--error ER_ERROR_DURING_COMMIT
+INSERT INTO t VALUES (1,0),(2,0);
+CHECK TABLE t;
+COMMIT;
+DROP TABLE t;
+
+CREATE TABLE t (i INT UNIQUE)ENGINE=InnoDB;
+--error ER_ERROR_DURING_COMMIT
+INSERT INTO t VALUES (0),(0);
+CHECK TABLE t;
+DROP TABLE t;
+
+CREATE TABLE t (c INT PRIMARY KEY,c2 CHAR(1) UNIQUE)ENGINE=InnoDB;
+BEGIN;
+--error ER_ERROR_DURING_COMMIT
+INSERT INTO t VALUES(1, ''),(2, '');
+SELECT * FROM t;
+DELETE FROM t;
+COMMIT;
+DROP TABLE t;
+
+--echo #
+--echo # MDEV-26956 LeakSanitizer/Valgrind errors in
+--echo # trx_mod_table_time_t::start_bulk_insert
+--echo # upon adding system versioning
+--echo #
+CREATE TABLE t1(id INT, s DATE, e DATE, PERIOD FOR p(s,e),
+ PRIMARY KEY(id, p WITHOUT OVERLAPS)) ENGINE=InnoDB;
+ALTER TABLE t1 ADD COLUMN row_start BIGINT UNSIGNED AS ROW START,
+ ADD COLUMN row_end BIGINT UNSIGNED AS ROW END,
+ ADD PERIOD FOR SYSTEM_TIME(row_start,row_end), WITH SYSTEM VERSIONING;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-27316 Assertion `!(index)->is_spatial()' failed.
+--echo #
+CREATE TABLE t (c POINT NOT NULL, SPATIAL INDEX(c)) ENGINE=InnoDB;
+INSERT INTO t VALUES (POINT(1, 1));
+SELECT COUNT(*) FROM t WHERE MBRWithin(t.c, POINT(1,1));
+DROP TABLE t;
+
+--echo #
+--echo # MDEV-27318 Assertion data_size < srv_sort_buf_size failed in row_merge_bulk_buf_add
+--echo #
+CREATE TABLE t1(f1 MEDIUMTEXT)ENGINE=InnoDB;
+INSERT INTO t1 VALUES(REPEAT(1, 8459264));
+SELECT length(f1) FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-27858 Assertion `page_dir_get_n_heap(new_page) == 2U' failed in PageBulk::init
+--echo #
+CREATE TABLE t1 (c INT) ENGINE=InnoDB;
+CREATE TABLE t2 (c INT) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1);
+LOCK TABLES t1 WRITE,t2 WRITE;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (1);
+DROP TABLE t2, t1;
+
+--echo #
+--echo # MDEV-28138 MariaDB Assertion Failed in mtr_buf_t::has_space
+--echo #
+CREATE TABLE t1(
+ f1 SERIAL,
+ f2 LINESTRING NOT NULL DEFAULT LineFromText('LINESTRING(1 1,2 2,3 3)'),
+SPATIAL INDEX(f2))ENGINE=InnoDB;
+--error ER_DUP_ENTRY
+INSERT INTO t1(f1) VALUES(0), (1), (2);
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-28237 Assertion `0' failed in row_upd_sec_index_entry on DELETE
+--echo #
+CREATE TABLE t1 (c0 YEAR UNIQUE) ENGINE=InnoDB;
+--error ER_ERROR_DURING_COMMIT
+INSERT INTO t1 VALUES (0),(0),(0),(0),(0),(0),(0);
+DELETE FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-28037 Assertion `trx->bulk_insert' failed in innodb_prepare_commit_versioned
+--echo #
+CREATE TABLE t1 (c INT) ENGINE=InnoDB;
+CREATE TABLE t2 (c INT) ENGINE=InnoDB;
+CREATE TRIGGER tr AFTER INSERT ON t1 FOR EACH ROW UPDATE t2 SET c=1;
+INSERT INTO t1 VALUES (0);
+SELECT * FROM t1;
+SELECT * FROM t2;
+DROP TABLE t2, t1;
+
+--echo #
+--echo # MDEV-28242 Assertion `!check_foreigns' failed in
+--echo # trx_t::check_bulk_buffer
+--echo #
+CREATE TABLE t1 (c INT)ENGINE=InnoDB;
+BEGIN;
+INSERT INTO t1 VALUES(1), (1);
+SET SESSION foreign_key_checks=TRUE;
+SHOW CREATE TABLE t1;
+CREATE TABLE t2(d INT)ENGINE=InnoDB;
+DROP TABLE t2, t1;
+
+--echo #
+--echo # MDEV-28400 Leak in trx_mod_time_t::start_bulk_insert
+--echo #
+
+SET SESSION foreign_key_checks=0;
+CREATE TABLE t1 (a INT) ENGINE=InnoDB PARTITION BY HASH(a) PARTITIONS 2;
+INSERT INTO t1 VALUES (1),(2);
+ALTER TABLE t1 REBUILD PARTITION p0;
+# Cleanup
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-29570 InnoDB fails to clean bulk buffer when server
+--echo # does rollback operation
+--echo #
+CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB
+ PARTITION BY RANGE (pk) (
+ PARTITION pn VALUES LESS THAN (20));
+--error ER_NO_PARTITION_FOR_GIVEN_VALUE
+INSERT INTO t1 VALUES (1),(21);
+# Cleanup
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/log_corruption.test b/mysql-test/suite/innodb/t/log_corruption.test
index 46f6384b3c9..f9a9e1dd231 100644
--- a/mysql-test/suite/innodb/t/log_corruption.test
+++ b/mysql-test/suite/innodb/t/log_corruption.test
@@ -17,7 +17,7 @@ call mtr.add_suppression("InnoDB: Log scan aborted at LSN");
call mtr.add_suppression("InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 42\\r?$");
call mtr.add_suppression("InnoDB: Obtaining redo log encryption key version 1 failed");
call mtr.add_suppression("InnoDB: Decrypting checkpoint failed");
-call mtr.add_suppression("InnoDB: Are you sure you are using the right ib_logfile0 to start up the database\\? Log sequence number in the ib_logfile0 is 1213964,");
+call mtr.add_suppression("InnoDB: Are you sure you are using the right ib_logfile0 to start up the database\\? The checkpoint is 1213964,");
call mtr.add_suppression("InnoDB: Log file .*ib_logfile1 is of different size 1048576 bytes than other log files 2097152 bytes!");
--enable_query_log
diff --git a/mysql-test/suite/innodb/t/log_file_name.test b/mysql-test/suite/innodb/t/log_file_name.test
index 89fe04bcdfb..df5b3e9ef97 100644
--- a/mysql-test/suite/innodb/t/log_file_name.test
+++ b/mysql-test/suite/innodb/t/log_file_name.test
@@ -152,7 +152,6 @@ call mtr.add_suppression("InnoDB: The file '.*t0\.ibd' already exists");
call mtr.add_suppression("InnoDB: Cannot open datafile for read-write: '.*t2\.ibd'");
# The following are for aborted startup without --innodb-force-recovery:
call mtr.add_suppression("InnoDB: Tablespace .* was not found at .*test");
-call mtr.add_suppression("InnoDB: Set innodb_force_recovery=1 to ignore this and to permanently lose all changes to the tablespace");
call mtr.add_suppression("InnoDB: Cannot read first page of '.*test.[tu]2.ibd': I/O error");
call mtr.add_suppression("InnoDB: Cannot apply log to \\[page id: space=[1-9][0-9]*, page number=3\\] of corrupted file './test/t2\\.ibd'");
call mtr.add_suppression("InnoDB: Datafile '.*test.*ibd' is corrupted");
diff --git a/mysql-test/suite/innodb_gis/r/0.result b/mysql-test/suite/innodb_gis/r/0.result
index c9864fad830..f05c7db24bd 100644
--- a/mysql-test/suite/innodb_gis/r/0.result
+++ b/mysql-test/suite/innodb_gis/r/0.result
@@ -452,9 +452,9 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
drop table t1;
create table t1 (pk integer primary key auto_increment, fl geometry not null);
insert into t1 (fl) values (1);
-ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 (fl) values (1.11);
-ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
+ERROR HY000: Cannot cast 'decimal' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 (fl) values ("qwerty");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values (pointfromtext('point(1,1)'));
diff --git a/mysql-test/suite/innodb_gis/r/1.result b/mysql-test/suite/innodb_gis/r/1.result
index b40c24b8fc6..35711a63a8a 100644
--- a/mysql-test/suite/innodb_gis/r/1.result
+++ b/mysql-test/suite/innodb_gis/r/1.result
@@ -660,9 +660,9 @@ object_id ST_geometrytype(geo) ST_ISSIMPLE(GEO) ST_ASTEXT(ST_centroid(geo))
drop table t1;
create table t1 (fl geometry not null);
insert into t1 values (1);
-ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 values (1.11);
-ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
+ERROR HY000: Cannot cast 'decimal' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 values ("qwerty");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 values (ST_pointfromtext('point(1,1)'));
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 d58cf0dfd18..ac4a9c7b1c4 100644
--- a/mysql-test/suite/innodb_gis/r/alter_spatial_index.result
+++ b/mysql-test/suite/innodb_gis/r/alter_spatial_index.result
@@ -779,7 +779,7 @@ SET timestamp=default;
create table t1 (p point not null default if(unix_timestamp()>10,POINT(1,1),LineString(Point(0,0),Point(1,1)))) ENGINE=innodb;
set timestamp=10;
alter table t1 add column i int;
-ERROR 22007: Incorrect POINT value: 'LINESTRING(0 0,1 1)' for column `test`.`t1`.`p` at row 1
+ERROR 22007: Incorrect POINT value: 'LINESTRING(0 0,1 1)' for column `test`.`t1`.`p` at row 0
drop table t1;
SET timestamp=default;
CREATE OR REPLACE TABLE t1 (a INT) ENGINE=InnoDB;
diff --git a/mysql-test/suite/innodb_gis/r/gis.result b/mysql-test/suite/innodb_gis/r/gis.result
index 36711c39050..ca37674b05f 100644
--- a/mysql-test/suite/innodb_gis/r/gis.result
+++ b/mysql-test/suite/innodb_gis/r/gis.result
@@ -661,9 +661,9 @@ object_id ST_geometrytype(geo) ST_ISSIMPLE(GEO) ST_ASTEXT(ST_centroid(geo))
drop table t1;
create table t1 (fl geometry not null);
insert into t1 values (1);
-ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
+ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 values (1.11);
-ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
+ERROR HY000: Cannot cast 'decimal' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 values ("qwerty");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 values (ST_pointfromtext('point(1,1)'));
diff --git a/mysql-test/suite/innodb_gis/t/1.test b/mysql-test/suite/innodb_gis/t/1.test
index 950db360794..99651842795 100644
--- a/mysql-test/suite/innodb_gis/t/1.test
+++ b/mysql-test/suite/innodb_gis/t/1.test
@@ -387,9 +387,9 @@ t1 where object_id=85984;
drop table t1;
create table t1 (fl geometry not null);
---error 1416
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
insert into t1 values (1);
---error 1416
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
insert into t1 values (1.11);
--error 1416
insert into t1 values ("qwerty");
diff --git a/mysql-test/suite/innodb_gis/t/gis.test b/mysql-test/suite/innodb_gis/t/gis.test
index 966aea7bc77..b27e1852d6e 100644
--- a/mysql-test/suite/innodb_gis/t/gis.test
+++ b/mysql-test/suite/innodb_gis/t/gis.test
@@ -380,9 +380,9 @@ t1 where object_id=85984;
drop table t1;
create table t1 (fl geometry not null);
---error 1416
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
insert into t1 values (1);
---error 1416
+--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
insert into t1 values (1.11);
--error 1416
insert into t1 values ("qwerty");
diff --git a/mysql-test/suite/json/r/type_json.result b/mysql-test/suite/json/r/type_json.result
index b9b70f24190..333e933eda9 100644
--- a/mysql-test/suite/json/r/type_json.result
+++ b/mysql-test/suite/json/r/type_json.result
@@ -113,7 +113,7 @@ def COALESCE(c0, c6) 254 30 1 Y 0 39 8
COALESCE(c0, c6)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(c0, c7) 254 30 1 Y 0 39 8
+def COALESCE(c0, c7) 253 30 1 Y 0 39 8
COALESCE(c0, c7)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
@@ -305,11 +305,11 @@ def COALESCE(c6, c6) 3 11 1 Y 32896 0 63
COALESCE(c6, c6)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(c6, c7) 254 11 1 Y 0 39 8
+def COALESCE(c6, c7) 253 11 1 Y 0 39 8
COALESCE(c6, c7)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(c7, c0) 254 30 1 Y 0 39 8
+def COALESCE(c7, c0) 253 30 1 Y 0 39 8
COALESCE(c7, c0)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
@@ -333,11 +333,11 @@ def COALESCE(c7, c5) 251 4294967295 1 Y 0 39 8
COALESCE(c7, c5)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(c7, c6) 254 11 1 Y 0 39 8
+def COALESCE(c7, c6) 253 11 1 Y 0 39 8
COALESCE(c7, c6)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(c7, c7) 254 1 1 Y 0 39 8
+def COALESCE(c7, c7) 253 1 1 Y 0 39 8
COALESCE(c7, c7)
1
CALL p1('t1', 'LEAST(colt1, colt2)');
@@ -370,7 +370,7 @@ def LEAST(c0, c6) 5 23 1 Y 32896 31 63
LEAST(c0, c6)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def LEAST(c0, c7) 254 30 1 Y 0 39 8
+def LEAST(c0, c7) 253 30 1 Y 0 39 8
LEAST(c0, c7)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
@@ -566,7 +566,7 @@ def LEAST(c6, c7) 5 17 1 Y 32896 0 63
LEAST(c6, c7)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def LEAST(c7, c0) 254 30 1 Y 0 39 8
+def LEAST(c7, c0) 253 30 1 Y 0 39 8
LEAST(c7, c0)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
@@ -594,7 +594,7 @@ def LEAST(c7, c6) 5 17 1 Y 32896 0 63
LEAST(c7, c6)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def LEAST(c7, c7) 254 1 1 Y 0 39 8
+def LEAST(c7, c7) 253 1 1 Y 0 39 8
LEAST(c7, c7)
1
CALL p1('t1', 'colt1+colt2');
@@ -884,7 +884,7 @@ def COALESCE(c0, c6) 254 30 1 Y 0 39 8
COALESCE(c0, c6)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(c0, c7) 254 30 1 Y 0 39 8
+def COALESCE(c0, c7) 253 30 1 Y 0 39 8
COALESCE(c0, c7)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
@@ -1076,11 +1076,11 @@ def COALESCE(c6, c6) 3 11 1 Y 32896 0 63
COALESCE(c6, c6)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(c6, c7) 254 11 1 Y 0 39 8
+def COALESCE(c6, c7) 253 11 1 Y 0 39 8
COALESCE(c6, c7)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(c7, c0) 254 30 1 Y 0 39 8
+def COALESCE(c7, c0) 253 30 1 Y 0 39 8
COALESCE(c7, c0)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
@@ -1104,11 +1104,11 @@ def COALESCE(c7, c5) 251 4294967295 1 Y 0 39 8
COALESCE(c7, c5)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(c7, c6) 254 11 1 Y 0 39 8
+def COALESCE(c7, c6) 253 11 1 Y 0 39 8
COALESCE(c7, c6)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(c7, c7) 254 1 1 Y 0 39 8
+def COALESCE(c7, c7) 253 1 1 Y 0 39 8
COALESCE(c7, c7)
1
CALL p1('t1c', 'LEAST(colt1, colt2)');
@@ -1141,7 +1141,7 @@ def LEAST(c0, c6) 5 23 1 Y 32896 31 63
LEAST(c0, c6)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def LEAST(c0, c7) 254 30 1 Y 0 39 8
+def LEAST(c0, c7) 253 30 1 Y 0 39 8
LEAST(c0, c7)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
@@ -1337,7 +1337,7 @@ def LEAST(c6, c7) 5 17 1 Y 32896 0 63
LEAST(c6, c7)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def LEAST(c7, c0) 254 30 1 Y 0 39 8
+def LEAST(c7, c0) 253 30 1 Y 0 39 8
LEAST(c7, c0)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
@@ -1365,7 +1365,7 @@ def LEAST(c7, c6) 5 17 1 Y 32896 0 63
LEAST(c7, c6)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def LEAST(c7, c7) 254 1 1 Y 0 39 8
+def LEAST(c7, c7) 253 1 1 Y 0 39 8
LEAST(c7, c7)
1
CALL p1('t1c', 'colt1+colt2');
@@ -1675,7 +1675,7 @@ def COALESCE(t1.c0, t2.c11) 254 30 1 Y 0 39 8
COALESCE(t1.c0, t2.c11)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(t1.c0, t2.c12) 254 30 1 Y 0 39 8
+def COALESCE(t1.c0, t2.c12) 253 30 1 Y 0 39 8
COALESCE(t1.c0, t2.c12)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
@@ -1987,11 +1987,11 @@ def COALESCE(t1.c6, t2.c11) 253 19 1 Y 0 39 8
COALESCE(t1.c6, t2.c11)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(t1.c6, t2.c12) 254 11 1 Y 0 39 8
+def COALESCE(t1.c6, t2.c12) 253 11 1 Y 0 39 8
COALESCE(t1.c6, t2.c12)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(t1.c7, t2.c0) 254 30 1 Y 0 39 8
+def COALESCE(t1.c7, t2.c0) 253 30 1 Y 0 39 8
COALESCE(t1.c7, t2.c0)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
@@ -2015,31 +2015,31 @@ def COALESCE(t1.c7, t2.c5) 251 4294967295 1 Y 0 39 8
COALESCE(t1.c7, t2.c5)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(t1.c7, t2.c6) 254 11 1 Y 0 39 8
+def COALESCE(t1.c7, t2.c6) 253 11 1 Y 0 39 8
COALESCE(t1.c7, t2.c6)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(t1.c7, t2.c7) 254 22 1 Y 0 39 8
+def COALESCE(t1.c7, t2.c7) 253 22 1 Y 0 39 8
COALESCE(t1.c7, t2.c7)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(t1.c7, t2.c8) 254 12 1 Y 0 39 8
+def COALESCE(t1.c7, t2.c8) 253 12 1 Y 0 39 8
COALESCE(t1.c7, t2.c8)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(t1.c7, t2.c9) 254 10 1 Y 0 39 8
+def COALESCE(t1.c7, t2.c9) 253 10 1 Y 0 39 8
COALESCE(t1.c7, t2.c9)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(t1.c7, t2.c10) 254 10 1 Y 0 39 8
+def COALESCE(t1.c7, t2.c10) 253 10 1 Y 0 39 8
COALESCE(t1.c7, t2.c10)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(t1.c7, t2.c11) 254 19 1 Y 0 39 8
+def COALESCE(t1.c7, t2.c11) 253 19 1 Y 0 39 8
COALESCE(t1.c7, t2.c11)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(t1.c7, t2.c12) 254 1 1 Y 0 39 8
+def COALESCE(t1.c7, t2.c12) 253 1 1 Y 0 39 8
COALESCE(t1.c7, t2.c12)
1
CALL p2('LEAST(t1.colt1, t2.colt2)');
@@ -2092,7 +2092,7 @@ def LEAST(t1.c0, t2.c11) 12 26 26 Y 128 6 63
LEAST(t1.c0, t2.c11)
0000-00-00 00:00:00.000000
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def LEAST(t1.c0, t2.c12) 254 30 1 Y 0 39 8
+def LEAST(t1.c0, t2.c12) 253 30 1 Y 0 39 8
LEAST(t1.c0, t2.c12)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
@@ -2408,7 +2408,7 @@ def LEAST(t1.c6, t2.c12) 5 17 1 Y 32896 0 63
LEAST(t1.c6, t2.c12)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def LEAST(t1.c7, t2.c0) 254 30 1 Y 0 39 8
+def LEAST(t1.c7, t2.c0) 253 30 1 Y 0 39 8
LEAST(t1.c7, t2.c0)
1
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
@@ -2456,7 +2456,7 @@ def LEAST(t1.c7, t2.c11) 12 19 19 Y 128 0 63
LEAST(t1.c7, t2.c11)
0000-00-00 00:00:00
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def LEAST(t1.c7, t2.c12) 254 1 1 Y 0 39 8
+def LEAST(t1.c7, t2.c12) 253 1 1 Y 0 39 8
LEAST(t1.c7, t2.c12)
1
CALL p2('t1.colt1+t2.colt2');
diff --git a/mysql-test/suite/mariabackup/compression_providers_loaded,lz4.rdiff b/mysql-test/suite/mariabackup/compression_providers_loaded,lz4.rdiff
new file mode 100644
index 00000000000..2202a51119e
--- /dev/null
+++ b/mysql-test/suite/mariabackup/compression_providers_loaded,lz4.rdiff
@@ -0,0 +1,13 @@
+--- suite/mariabackup/compression_providers_loaded.result
++++ suite/mariabackup/compression_providers_loaded.reject
+@@ -1,8 +1,8 @@
+ #
+-# Testing mariabackup with bzip2 compression
++# Testing mariabackup with lz4 compression
+ #
+ # Creating table
+-set global innodb_compression_algorithm = bzip2;
++set global innodb_compression_algorithm = lz4;
+ create table t1 (a int, b text ) engine = innodb page_compressed = 1;
+ insert t1 (a, b) values (0, repeat("abc", 100));
+ insert t1 (a, b) values (1, repeat("def", 1000));
diff --git a/mysql-test/suite/mariabackup/compression_providers_loaded,lzma.rdiff b/mysql-test/suite/mariabackup/compression_providers_loaded,lzma.rdiff
new file mode 100644
index 00000000000..e6b52d3ac07
--- /dev/null
+++ b/mysql-test/suite/mariabackup/compression_providers_loaded,lzma.rdiff
@@ -0,0 +1,13 @@
+--- suite/mariabackup/compression_providers_loaded.result
++++ suite/mariabackup/compression_providers_loaded.reject
+@@ -1,8 +1,8 @@
+ #
+-# Testing mariabackup with bzip2 compression
++# Testing mariabackup with lzma compression
+ #
+ # Creating table
+-set global innodb_compression_algorithm = bzip2;
++set global innodb_compression_algorithm = lzma;
+ create table t1 (a int, b text ) engine = innodb page_compressed = 1;
+ insert t1 (a, b) values (0, repeat("abc", 100));
+ insert t1 (a, b) values (1, repeat("def", 1000));
diff --git a/mysql-test/suite/mariabackup/compression_providers_loaded,lzo.rdiff b/mysql-test/suite/mariabackup/compression_providers_loaded,lzo.rdiff
new file mode 100644
index 00000000000..75e9519d680
--- /dev/null
+++ b/mysql-test/suite/mariabackup/compression_providers_loaded,lzo.rdiff
@@ -0,0 +1,13 @@
+--- suite/mariabackup/compression_providers_loaded.result
++++ suite/mariabackup/compression_providers_loaded.reject
+@@ -1,8 +1,8 @@
+ #
+-# Testing mariabackup with bzip2 compression
++# Testing mariabackup with lzo compression
+ #
+ # Creating table
+-set global innodb_compression_algorithm = bzip2;
++set global innodb_compression_algorithm = lzo;
+ create table t1 (a int, b text ) engine = innodb page_compressed = 1;
+ insert t1 (a, b) values (0, repeat("abc", 100));
+ insert t1 (a, b) values (1, repeat("def", 1000));
diff --git a/mysql-test/suite/mariabackup/compression_providers_loaded,snappy.rdiff b/mysql-test/suite/mariabackup/compression_providers_loaded,snappy.rdiff
new file mode 100644
index 00000000000..da281efffc4
--- /dev/null
+++ b/mysql-test/suite/mariabackup/compression_providers_loaded,snappy.rdiff
@@ -0,0 +1,13 @@
+--- suite/mariabackup/compression_providers_loaded.result
++++ suite/mariabackup/compression_providers_loaded.reject
+@@ -1,8 +1,8 @@
+ #
+-# Testing mariabackup with bzip2 compression
++# Testing mariabackup with snappy compression
+ #
+ # Creating table
+-set global innodb_compression_algorithm = bzip2;
++set global innodb_compression_algorithm = snappy;
+ create table t1 (a int, b text ) engine = innodb page_compressed = 1;
+ insert t1 (a, b) values (0, repeat("abc", 100));
+ insert t1 (a, b) values (1, repeat("def", 1000));
diff --git a/mysql-test/suite/mariabackup/compression_providers_loaded.combinations b/mysql-test/suite/mariabackup/compression_providers_loaded.combinations
new file mode 100644
index 00000000000..3287917fd5e
--- /dev/null
+++ b/mysql-test/suite/mariabackup/compression_providers_loaded.combinations
@@ -0,0 +1,14 @@
+[bzip2]
+plugin-load-add=$PROVIDER_BZIP2_SO
+
+[lz4]
+plugin-load-add=$PROVIDER_LZ4_SO
+
+[lzma]
+plugin-load-add=$PROVIDER_LZMA_SO
+
+[lzo]
+plugin-load-add=$PROVIDER_LZO_SO
+
+[snappy]
+plugin-load-add=$PROVIDER_SNAPPY_SO
diff --git a/mysql-test/suite/mariabackup/compression_providers_loaded.result b/mysql-test/suite/mariabackup/compression_providers_loaded.result
new file mode 100644
index 00000000000..6cd928b02f7
--- /dev/null
+++ b/mysql-test/suite/mariabackup/compression_providers_loaded.result
@@ -0,0 +1,27 @@
+#
+# Testing mariabackup with bzip2 compression
+#
+# Creating table
+set global innodb_compression_algorithm = bzip2;
+create table t1 (a int, b text ) engine = innodb page_compressed = 1;
+insert t1 (a, b) values (0, repeat("abc", 100));
+insert t1 (a, b) values (1, repeat("def", 1000));
+insert t1 (a, b) values (2, repeat("ghi", 10000));
+select a, left(b, 9), length(b) from t1;
+a left(b, 9) length(b)
+0 abcabcabc 300
+1 defdefdef 3000
+2 ghighighi 30000
+# restart
+# xtrabackup backup
+# xtrabackup prepare;
+# shutdown server
+# remove datadir
+# xtrabackup move back
+# restart
+select a, left(b, 9), length(b) from t1;
+a left(b, 9) length(b)
+0 abcabcabc 300
+1 defdefdef 3000
+2 ghighighi 30000
+drop table t1;
diff --git a/mysql-test/suite/mariabackup/compression_providers_loaded.test b/mysql-test/suite/mariabackup/compression_providers_loaded.test
new file mode 100644
index 00000000000..aad21ff01a4
--- /dev/null
+++ b/mysql-test/suite/mariabackup/compression_providers_loaded.test
@@ -0,0 +1,38 @@
+let $alg = $MTR_COMBINATIONS;
+
+if (`select count(*) = 0 from information_schema.plugins where plugin_name = 'provider_$alg' and plugin_status='active'`)
+{
+ skip "Needs provider_$alg plugin";
+}
+
+--echo #
+--echo # Testing mariabackup with $alg compression
+--echo #
+
+--echo # Creating table
+eval set global innodb_compression_algorithm = $alg;
+eval create table t1 (a int, b text $column_params) engine = innodb page_compressed = 1;
+insert t1 (a, b) values (0, repeat("abc", 100));
+insert t1 (a, b) values (1, repeat("def", 1000));
+insert t1 (a, b) values (2, repeat("ghi", 10000));
+select a, left(b, 9), length(b) from t1;
+
+--source include/restart_mysqld.inc
+
+--echo # xtrabackup backup
+let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
+
+disable_result_log;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+enable_result_log;
+
+--echo # xtrabackup prepare;
+disable_result_log;
+exec $XTRABACKUP --prepare --target-dir=$targetdir;
+source include/restart_and_restore.inc;
+enable_result_log;
+
+select a, left(b, 9), length(b) from t1;
+
+drop table t1;
+rmdir $targetdir;
diff --git a/mysql-test/suite/mariabackup/compression_providers_unloaded,lz4.rdiff b/mysql-test/suite/mariabackup/compression_providers_unloaded,lz4.rdiff
new file mode 100644
index 00000000000..4b874403830
--- /dev/null
+++ b/mysql-test/suite/mariabackup/compression_providers_unloaded,lz4.rdiff
@@ -0,0 +1,22 @@
+--- suite/mariabackup/compression_providers_unloaded.result
++++ suite/mariabackup/compression_providers_unloaded.reject
+@@ -1,8 +1,8 @@
+ #
+-# Testing mariabackup with bzip2 compression
++# Testing mariabackup with lz4 compression
+ #
+-# Create table with bzip2 compression
+-set global innodb_compression_algorithm = bzip2;
++# Create table with lz4 compression
++set global innodb_compression_algorithm = lz4;
+ create table t1 (a int, b text ) engine = innodb page_compressed = 1;
+ insert t1 (a, b) values (0, repeat("abc", 100));
+ insert t1 (a, b) values (1, repeat("def", 1000));
+@@ -14,6 +14,6 @@
+ 2 ghighighi 30000
+ # Restart server without plugin
+ call mtr.add_suppression("mariadbd: MariaDB tried to use the \\w+ compression, but its provider plugin is not loaded");
+-# restart: --disable-provider-bzip2
++# restart: --disable-provider-lz4
+ # xtrabackup backup
+ drop table t1;
diff --git a/mysql-test/suite/mariabackup/compression_providers_unloaded,lzma.rdiff b/mysql-test/suite/mariabackup/compression_providers_unloaded,lzma.rdiff
new file mode 100644
index 00000000000..ff57834f624
--- /dev/null
+++ b/mysql-test/suite/mariabackup/compression_providers_unloaded,lzma.rdiff
@@ -0,0 +1,22 @@
+--- suite/mariabackup/compression_providers_unloaded.result
++++ suite/mariabackup/compression_providers_unloaded.reject
+@@ -1,8 +1,8 @@
+ #
+-# Testing mariabackup with bzip2 compression
++# Testing mariabackup with lzma compression
+ #
+-# Create table with bzip2 compression
+-set global innodb_compression_algorithm = bzip2;
++# Create table with lzma compression
++set global innodb_compression_algorithm = lzma;
+ create table t1 (a int, b text ) engine = innodb page_compressed = 1;
+ insert t1 (a, b) values (0, repeat("abc", 100));
+ insert t1 (a, b) values (1, repeat("def", 1000));
+@@ -14,6 +14,6 @@
+ 2 ghighighi 30000
+ # Restart server without plugin
+ call mtr.add_suppression("mariadbd: MariaDB tried to use the \\w+ compression, but its provider plugin is not loaded");
+-# restart: --disable-provider-bzip2
++# restart: --disable-provider-lzma
+ # xtrabackup backup
+ drop table t1;
diff --git a/mysql-test/suite/mariabackup/compression_providers_unloaded,lzo.rdiff b/mysql-test/suite/mariabackup/compression_providers_unloaded,lzo.rdiff
new file mode 100644
index 00000000000..5308fc4333e
--- /dev/null
+++ b/mysql-test/suite/mariabackup/compression_providers_unloaded,lzo.rdiff
@@ -0,0 +1,22 @@
+--- suite/mariabackup/compression_providers_unloaded.result
++++ suite/mariabackup/compression_providers_unloaded.reject
+@@ -1,8 +1,8 @@
+ #
+-# Testing mariabackup with bzip2 compression
++# Testing mariabackup with lzo compression
+ #
+-# Create table with bzip2 compression
+-set global innodb_compression_algorithm = bzip2;
++# Create table with lzo compression
++set global innodb_compression_algorithm = lzo;
+ create table t1 (a int, b text ) engine = innodb page_compressed = 1;
+ insert t1 (a, b) values (0, repeat("abc", 100));
+ insert t1 (a, b) values (1, repeat("def", 1000));
+@@ -14,6 +14,6 @@
+ 2 ghighighi 30000
+ # Restart server without plugin
+ call mtr.add_suppression("mariadbd: MariaDB tried to use the \\w+ compression, but its provider plugin is not loaded");
+-# restart: --disable-provider-bzip2
++# restart: --disable-provider-lzo
+ # xtrabackup backup
+ drop table t1;
diff --git a/mysql-test/suite/mariabackup/compression_providers_unloaded,snappy.rdiff b/mysql-test/suite/mariabackup/compression_providers_unloaded,snappy.rdiff
new file mode 100644
index 00000000000..b7b5e2b51c2
--- /dev/null
+++ b/mysql-test/suite/mariabackup/compression_providers_unloaded,snappy.rdiff
@@ -0,0 +1,22 @@
+--- suite/mariabackup/compression_providers_unloaded.result
++++ suite/mariabackup/compression_providers_unloaded.reject
+@@ -1,8 +1,8 @@
+ #
+-# Testing mariabackup with bzip2 compression
++# Testing mariabackup with snappy compression
+ #
+-# Create table with bzip2 compression
+-set global innodb_compression_algorithm = bzip2;
++# Create table with snappy compression
++set global innodb_compression_algorithm = snappy;
+ create table t1 (a int, b text ) engine = innodb page_compressed = 1;
+ insert t1 (a, b) values (0, repeat("abc", 100));
+ insert t1 (a, b) values (1, repeat("def", 1000));
+@@ -14,6 +14,6 @@
+ 2 ghighighi 30000
+ # Restart server without plugin
+ call mtr.add_suppression("mariadbd: MariaDB tried to use the \\w+ compression, but its provider plugin is not loaded");
+-# restart: --disable-provider-bzip2
++# restart: --disable-provider-snappy
+ # xtrabackup backup
+ drop table t1;
diff --git a/mysql-test/suite/mariabackup/compression_providers_unloaded.combinations b/mysql-test/suite/mariabackup/compression_providers_unloaded.combinations
new file mode 100644
index 00000000000..3287917fd5e
--- /dev/null
+++ b/mysql-test/suite/mariabackup/compression_providers_unloaded.combinations
@@ -0,0 +1,14 @@
+[bzip2]
+plugin-load-add=$PROVIDER_BZIP2_SO
+
+[lz4]
+plugin-load-add=$PROVIDER_LZ4_SO
+
+[lzma]
+plugin-load-add=$PROVIDER_LZMA_SO
+
+[lzo]
+plugin-load-add=$PROVIDER_LZO_SO
+
+[snappy]
+plugin-load-add=$PROVIDER_SNAPPY_SO
diff --git a/mysql-test/suite/mariabackup/compression_providers_unloaded.result b/mysql-test/suite/mariabackup/compression_providers_unloaded.result
new file mode 100644
index 00000000000..ccf3e0355a4
--- /dev/null
+++ b/mysql-test/suite/mariabackup/compression_providers_unloaded.result
@@ -0,0 +1,22 @@
+call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
+call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
+call mtr.add_suppression("Refusing to load corrupted table");
+#
+# Testing mariabackup with bzip2 compression
+#
+# Create table with bzip2 compression
+set global innodb_compression_algorithm = bzip2;
+create table t1 (a int, b text ) engine = innodb page_compressed = 1;
+insert t1 (a, b) values (0, repeat("abc", 100));
+insert t1 (a, b) values (1, repeat("def", 1000));
+insert t1 (a, b) values (2, repeat("ghi", 10000));
+select a, left(b, 9), length(b) from t1;
+a left(b, 9) length(b)
+0 abcabcabc 300
+1 defdefdef 3000
+2 ghighighi 30000
+# Restart server without plugin
+call mtr.add_suppression("mariadbd: MariaDB tried to use the \\w+ compression, but its provider plugin is not loaded");
+# restart: --disable-provider-bzip2
+# xtrabackup backup
+drop table t1;
diff --git a/mysql-test/suite/mariabackup/compression_providers_unloaded.test b/mysql-test/suite/mariabackup/compression_providers_unloaded.test
new file mode 100644
index 00000000000..673c16d03cf
--- /dev/null
+++ b/mysql-test/suite/mariabackup/compression_providers_unloaded.test
@@ -0,0 +1,35 @@
+let $alg = $MTR_COMBINATIONS;
+call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
+call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
+call mtr.add_suppression("Refusing to load corrupted table");
+
+if (`select count(*) = 0 from information_schema.plugins where plugin_name = 'provider_$alg' and plugin_status='active'`)
+{
+ skip "Needs provider_$alg plugin";
+}
+
+--echo #
+--echo # Testing mariabackup with $alg compression
+--echo #
+
+--echo # Create table with $alg compression
+eval set global innodb_compression_algorithm = $alg;
+eval create table t1 (a int, b text $column_params) engine = innodb page_compressed = 1;
+insert t1 (a, b) values (0, repeat("abc", 100));
+insert t1 (a, b) values (1, repeat("def", 1000));
+insert t1 (a, b) values (2, repeat("ghi", 10000));
+select a, left(b, 9), length(b) from t1;
+
+--echo # Restart server without plugin
+call mtr.add_suppression("mariadbd: MariaDB tried to use the \\w+ compression, but its provider plugin is not loaded");
+let $restart_parameters = --disable-provider-$alg;
+source include/restart_mysqld.inc;
+
+--echo # xtrabackup backup
+let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
+
+error 1;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
+
+drop table t1;
+rmdir $targetdir;
diff --git a/mysql-test/suite/mariabackup/incremental_page_compressed.result b/mysql-test/suite/mariabackup/incremental_page_compressed.result
new file mode 100644
index 00000000000..eb059cdc769
--- /dev/null
+++ b/mysql-test/suite/mariabackup/incremental_page_compressed.result
@@ -0,0 +1,13 @@
+#
+# MDEV-26794 MariaBackup does not recognize added providers upon prepare of incremental backup
+#
+CREATE TABLE t (a INT) ENGINE=InnoDB;
+INSERT INTO t VALUES (1),(2);
+INSTALL SONAME 'provider_snappy';
+SET GLOBAL innodb_compression_algorithm= snappy;
+CREATE TABLE t_snappy (a INT) ENGINE=InnoDB page_compressed=1;
+INSERT INTO t_snappy VALUES (3),(4);
+# restart: --innodb_buffer_pool_load_at_startup=0
+# Prepare initial backup
+# Prepare incremental backup
+DROP TABLE t;
diff --git a/mysql-test/suite/mariabackup/incremental_page_compressed.test b/mysql-test/suite/mariabackup/incremental_page_compressed.test
new file mode 100644
index 00000000000..f6ec26cfb46
--- /dev/null
+++ b/mysql-test/suite/mariabackup/incremental_page_compressed.test
@@ -0,0 +1,38 @@
+--echo #
+--echo # MDEV-26794 MariaBackup does not recognize added providers upon prepare of incremental backup
+--echo #
+
+if (!$PROVIDER_SNAPPY_SO) {
+ skip "Needs provider_snappy plugin";
+}
+
+--source include/have_innodb.inc
+
+--let $targetdir=$MYSQLTEST_VARDIR/tmp/backup
+--let $incdir=$MYSQLTEST_VARDIR/tmp/inc
+
+CREATE TABLE t (a INT) ENGINE=InnoDB;
+INSERT INTO t VALUES (1),(2);
+
+--exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir
+
+INSTALL SONAME 'provider_snappy';
+
+SET GLOBAL innodb_compression_algorithm= snappy;
+
+CREATE TABLE t_snappy (a INT) ENGINE=InnoDB page_compressed=1;
+INSERT INTO t_snappy VALUES (3),(4);
+
+# disable buffer pool load to avoid MDEV-26794 warnings
+--let $restart_parameters= --innodb_buffer_pool_load_at_startup=0
+--source include/restart_mysqld.inc
+
+--exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --incremental-basedir=$targetdir --target-dir=$incdir
+
+--echo # Prepare initial backup
+--exec $XTRABACKUP --prepare --target-dir=$targetdir
+
+--echo # Prepare incremental backup
+--exec $XTRABACKUP --prepare --target-dir=$targetdir --incremental-dir=$incdir > $MYSQLTEST_VARDIR/prepare.log 2>&1
+
+DROP TABLE t;
diff --git a/mysql-test/suite/multi_source/change_master.result b/mysql-test/suite/multi_source/change_master.result
new file mode 100644
index 00000000000..9fd84e51364
--- /dev/null
+++ b/mysql-test/suite/multi_source/change_master.result
@@ -0,0 +1,8 @@
+RESET MASTER;
+connect slave,127.0.0.1,root,,,$SERVER_MYPORT_3;
+change master 'abc1' to relay_log_file='';
+ERROR HY000: Failed initializing relay log position: Could not find target log during relay log initialization
+change master 'abc1' to relay_log_file='';
+ERROR HY000: Failed initializing relay log position: Could not find target log during relay log initialization
+disconnect slave;
+connection default;
diff --git a/mysql-test/suite/multi_source/change_master.test b/mysql-test/suite/multi_source/change_master.test
new file mode 100644
index 00000000000..08e6909694f
--- /dev/null
+++ b/mysql-test/suite/multi_source/change_master.test
@@ -0,0 +1,13 @@
+--source include/not_embedded.inc
+
+RESET MASTER;
+
+--connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3)
+
+--error ER_RELAY_LOG_INIT
+change master 'abc1' to relay_log_file='';
+--error ER_RELAY_LOG_INIT
+change master 'abc1' to relay_log_file='';
+--disconnect slave
+--connection default
+
diff --git a/mysql-test/suite/multi_source/multisource_for_channel.result b/mysql-test/suite/multi_source/multisource_for_channel.result
new file mode 100644
index 00000000000..f96a5a93b97
--- /dev/null
+++ b/mysql-test/suite/multi_source/multisource_for_channel.result
@@ -0,0 +1,366 @@
+RESET MASTER;
+connect slave,127.0.0.1,root,,,$SERVER_MYPORT_3;
+change master to relay_log_file='' for channel 'abc1';
+ERROR HY000: Failed initializing relay log position: Could not find target log during relay log initialization
+change master to master_host='' for channel 'abc2';
+ERROR HY000: Incorrect arguments to MASTER_HOST
+change master to
+master_port=MYPORT_1,
+master_host='127.0.0.1',
+master_user='root'
+for channel 'master1';
+start slave for channel 'master1';
+set default_master_connection = 'master1';
+include/wait_for_slave_to_start.inc
+connect master1,127.0.0.1,root,,,$SERVER_MYPORT_1;
+connection slave;
+#
+# Checking SHOW SLAVE 'master1' STATUS
+#
+Master_Port = 'MYPORT_1'
+Relay_Log_File = 'mysqld-relay-bin-master1.000002'
+Slave_IO_Running = 'Yes'
+Slave_SQL_Running = 'Yes'
+Last_Errno = '0'
+Last_SQL_Errno = '0'
+#
+# Checking SHOW SLAVE STATUS
+#
+Master_Port = 'MYPORT_1'
+Relay_Log_File = 'mysqld-relay-bin-master1.000002'
+Slave_IO_Running = 'Yes'
+Slave_SQL_Running = 'Yes'
+Last_Errno = '0'
+Last_SQL_Errno = '0'
+#
+# Checking SHOW ALL SLAVES STATUS
+#
+Connection_name = 'master1'
+Master_Port = 'MYPORT_1'
+Relay_Log_File = 'mysqld-relay-bin-master1.000002'
+Slave_IO_Running = 'Yes'
+Slave_SQL_Running = 'Yes'
+Last_Errno = '0'
+Last_SQL_Errno = '0'
+Slave_heartbeat_period = '60.000'
+#
+connection master1;
+drop database if exists db1;
+create database db1;
+use db1;
+create table t1 (i int auto_increment, f1 varchar(16), primary key pk (i,f1)) engine=MyISAM;
+Warnings:
+Warning 1280 Name 'pk' ignored for PRIMARY key.
+insert into t1 (f1) values ('one'),('two');
+connection slave;
+select * from db1.t1;
+i f1
+1 one
+2 two
+# List of relay log files in the datadir
+mysqld-relay-bin-master1.000001
+mysqld-relay-bin-master1.000002
+mysqld-relay-bin-master1.index
+include/show_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+mysqld-relay-bin-master1.000001 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
+mysqld-relay-bin-master1.000001 # Rotate # # mysqld-relay-bin-master1.000002;pos=4
+include/show_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+mysqld-relay-bin-master1.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
+mysqld-relay-bin-master1.000002 # Rotate # # master-bin.000001;pos=POS
+mysqld-relay-bin-master1.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
+mysqld-relay-bin-master1.000002 # Gtid_list # # []
+mysqld-relay-bin-master1.000002 # Binlog_checkpoint # # master-bin.000001
+mysqld-relay-bin-master1.000002 # Gtid # # GTID #-#-#
+mysqld-relay-bin-master1.000002 # Query # # drop database if exists db1
+mysqld-relay-bin-master1.000002 # Gtid # # GTID #-#-#
+mysqld-relay-bin-master1.000002 # Query # # create database db1
+mysqld-relay-bin-master1.000002 # Gtid # # GTID #-#-#
+mysqld-relay-bin-master1.000002 # Query # # use `db1`; create table t1 (i int auto_increment, f1 varchar(16), primary key pk (i,f1)) engine=MyISAM
+mysqld-relay-bin-master1.000002 # Gtid # # BEGIN GTID #-#-#
+mysqld-relay-bin-master1.000002 # Intvar # # INSERT_ID=1
+mysqld-relay-bin-master1.000002 # Query # # use `db1`; insert into t1 (f1) values ('one'),('two')
+mysqld-relay-bin-master1.000002 # Query # # COMMIT
+change master to
+master_port=MYPORT_2,
+master_host='127.0.0.1',
+master_user='root'
+for channel 'master1';
+ERROR HY000: This operation cannot be performed as you have a running slave 'master1'; run STOP SLAVE 'master1' first
+change master to
+master_port=MYPORT_2,
+master_host='127.0.0.1',
+master_user='root';
+ERROR HY000: This operation cannot be performed as you have a running slave 'master1'; run STOP SLAVE 'master1' first
+change master to
+master_port=MYPORT_1,
+master_host='127.0.0.1',
+master_user='root' for channel 'master2';
+ERROR HY000: Connection 'master2' conflicts with existing connection 'master1'
+set default_master_connection = '';
+change master to
+master_port=MYPORT_2,
+master_host='127.0.0.1',
+master_user='root';
+start slave;
+include/wait_for_slave_to_start.inc
+#
+# Checking SHOW ALL SLAVES STATUS
+#
+Connection_name = ''
+Connection_name = 'master1'
+Master_Port = 'MYPORT_2'
+Master_Port = 'MYPORT_1'
+Relay_Log_File = 'mysqld-relay-bin.000002'
+Relay_Log_File = 'mysqld-relay-bin-master1.000002'
+Slave_IO_Running = 'Yes'
+Slave_IO_Running = 'Yes'
+Slave_SQL_Running = 'Yes'
+Slave_SQL_Running = 'Yes'
+Last_Errno = '0'
+Last_Errno = '0'
+Last_SQL_Errno = '0'
+Last_SQL_Errno = '0'
+Slave_heartbeat_period = '60.000'
+Slave_heartbeat_period = '60.000'
+#
+connection master1;
+insert into t1 (f1) values ('three');
+connect master2,127.0.0.1,root,,,$SERVER_MYPORT_2;
+drop database if exists db2;
+create database db2;
+use db2;
+create table t1 (pk int auto_increment primary key, f1 int) engine=InnoDB;
+begin;
+insert into t1 (f1) values (1),(2);
+connection slave;
+connection master2;
+connection slave;
+select * from db1.t1;
+i f1
+1 one
+2 two
+3 three
+select * from db2.t1;
+pk f1
+connection master2;
+commit;
+connection slave;
+select * from db2.t1;
+pk f1
+1 1
+2 2
+connection master1;
+flush logs;
+connection slave;
+connection master1;
+purge binary logs to 'master-bin.000002';
+show binary logs;
+Log_name File_size
+master-bin.000002 filesize
+insert into t1 (f1) values ('four');
+create table db1.t3 (f1 int) engine=InnoDB;
+connection slave;
+#
+# Checking SHOW ALL SLAVES STATUS
+#
+Connection_name = ''
+Connection_name = 'master1'
+Master_Port = 'MYPORT_2'
+Master_Port = 'MYPORT_1'
+Relay_Log_File = 'mysqld-relay-bin.000002'
+Relay_Log_File = 'mysqld-relay-bin-master1.000004'
+Slave_IO_Running = 'Yes'
+Slave_IO_Running = 'Yes'
+Slave_SQL_Running = 'Yes'
+Slave_SQL_Running = 'Yes'
+Last_Errno = '0'
+Last_Errno = '0'
+Last_SQL_Errno = '0'
+Last_SQL_Errno = '0'
+Slave_heartbeat_period = '60.000'
+Slave_heartbeat_period = '60.000'
+#
+#
+# MDEV:16437: merge 5.7 P_S replication instrumentation and tables
+#
+SELECT * FROM performance_schema.replication_applier_status_by_coordinator;
+CHANNEL_NAME master1
+THREAD_ID #
+SERVICE_STATE ON
+LAST_ERROR_NUMBER 0
+LAST_ERROR_MESSAGE
+LAST_ERROR_TIMESTAMP 0000-00-00 00:00:00
+LAST_SEEN_TRANSACTION 0-1-7
+LAST_TRANS_RETRY_COUNT 0
+CHANNEL_NAME
+THREAD_ID #
+SERVICE_STATE ON
+LAST_ERROR_NUMBER 0
+LAST_ERROR_MESSAGE
+LAST_ERROR_TIMESTAMP 0000-00-00 00:00:00
+LAST_SEEN_TRANSACTION 0-2-4
+LAST_TRANS_RETRY_COUNT 0
+select * from db1.t1;
+i f1
+1 one
+2 two
+3 three
+4 four
+include/show_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+mysqld-relay-bin.000001 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
+mysqld-relay-bin.000001 # Rotate # # mysqld-relay-bin.000002;pos=4
+include/show_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+mysqld-relay-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
+mysqld-relay-bin.000002 # Rotate # # master-bin.000001;pos=POS
+mysqld-relay-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
+mysqld-relay-bin.000002 # Gtid_list # # []
+mysqld-relay-bin.000002 # Binlog_checkpoint # # master-bin.000001
+mysqld-relay-bin.000002 # Gtid # # GTID #-#-#
+mysqld-relay-bin.000002 # Query # # drop database if exists db2
+mysqld-relay-bin.000002 # Gtid # # GTID #-#-#
+mysqld-relay-bin.000002 # Query # # create database db2
+mysqld-relay-bin.000002 # Gtid # # GTID #-#-#
+mysqld-relay-bin.000002 # Query # # use `db2`; create table t1 (pk int auto_increment primary key, f1 int) engine=InnoDB
+mysqld-relay-bin.000002 # Gtid # # BEGIN GTID #-#-#
+mysqld-relay-bin.000002 # Intvar # # INSERT_ID=1
+mysqld-relay-bin.000002 # Query # # use `db2`; insert into t1 (f1) values (1),(2)
+mysqld-relay-bin.000002 # Xid # # COMMIT /* XID */
+disconnect slave;
+connect slave,127.0.0.1,root,,,$SERVER_MYPORT_3;
+stop slave io_thread;
+show status like 'Slave_running';
+Variable_name Value
+Slave_running OFF
+set default_master_connection = 'master1';
+show status like 'Slave_running';
+Variable_name Value
+Slave_running ON
+
+#
+# syntax compatible test
+#
+
+#
+# show relaylog events
+#
+SHOW RELAYLOG EVENTS for channel 'master1';
+Log_name Pos Event_type Server_id End_log_pos Info
+mysqld-relay-bin-master1.000003 4 Format_desc 3 256 Server ver: Version
+mysqld-relay-bin-master1.000003 256 Rotate 1 1358 master-bin.000002;pos=4
+mysqld-relay-bin-master1.000003 304 Rotate 3 366 mysqld-relay-bin-master1.000004;pos=4
+
+show slave status for channel 'master1'
+Master_Port = 'MYPORT_1'
+Relay_Log_File = 'mysqld-relay-bin-master1.000004'
+Slave_IO_Running = 'Yes'
+Slave_SQL_Running = 'Yes'
+Last_Errno = '0'
+Last_SQL_Errno = '0'
+
+#
+# stop slave
+#
+STOP SLAVE for channel 'master1';
+
+show slave status for channel 'master1'
+Master_Port = 'MYPORT_1'
+Relay_Log_File = 'mysqld-relay-bin-master1.000004'
+Slave_IO_Running = 'No'
+Slave_SQL_Running = 'No'
+Last_Errno = '0'
+Last_SQL_Errno = '0'
+
+#
+# start slave
+#
+START SLAVE for channel 'master1';
+include/wait_for_slave_to_start.inc
+
+show slave status for channel 'master1'
+Master_Port = 'MYPORT_1'
+Relay_Log_File = 'mysqld-relay-bin-master1.000005'
+Slave_IO_Running = 'Yes'
+Slave_SQL_Running = 'Yes'
+Last_Errno = '0'
+Last_SQL_Errno = '0'
+
+#
+# flush relay logs
+#
+FLUSH RELAY LOGS for channel 'master1';
+
+show slave status for channel 'master1'
+Master_Port = 'MYPORT_1'
+Relay_Log_File = 'mysqld-relay-bin-master1.000006'
+Slave_IO_Running = 'Yes'
+Slave_SQL_Running = 'Yes'
+Last_Errno = '0'
+Last_SQL_Errno = '0'
+
+#
+# stop slave
+#
+STOP SLAVE for channel 'master1';
+
+show slave status for channel 'master1'
+Master_Port = 'MYPORT_1'
+Relay_Log_File = 'mysqld-relay-bin-master1.000006'
+Slave_IO_Running = 'No'
+Slave_SQL_Running = 'No'
+Last_Errno = '0'
+Last_SQL_Errno = '0'
+
+#
+# reset slave
+#
+RESET SLAVE for channel 'master1';
+
+show slave status for channel 'master1'
+Master_Port = 'MYPORT_1'
+Relay_Log_File = ''
+Slave_IO_Running = 'No'
+Slave_SQL_Running = 'No'
+Last_Errno = '0'
+Last_SQL_Errno = '0'
+
+#
+# show relaylog events after reset slave
+#
+SHOW RELAYLOG EVENTS for channel 'master1';
+Log_name Pos Event_type Server_id End_log_pos Info
+
+#
+# check error syntax
+#
+RESET SLAVE 'master1' for channel 'mmaster2';
+ERROR HY000: Incorrect arguments to CONNECTION_NAME AND FOR CHANNEL CAN NOT BE SPECIFIED AT THE SAME TIME)
+STOP SLAVE 'master1' for channel 'master2';
+ERROR HY000: Incorrect arguments to CONNECTION_NAME AND FOR CHANNEL CAN NOT BE SPECIFIED AT THE SAME TIME)
+FLUSH RELAY LOGS 'master1' for channel 'master2';
+ERROR HY000: Incorrect arguments to CONNECTION_NAME AND FOR CHANNEL CAN NOT BE SPECIFIED AT THE SAME TIME)
+START SLAVE 'master1' for channel 'master2';
+ERROR HY000: Incorrect arguments to CONNECTION_NAME AND FOR CHANNEL CAN NOT BE SPECIFIED AT THE SAME TIME)
+SHOW RELAYLOG 'master1' EVENTS for channel 'master2';
+ERROR HY000: Incorrect arguments to CONNECTION_NAME AND FOR CHANNEL CAN NOT BE SPECIFIED AT THE SAME TIME)
+SHOW SLAVE 'master1' STATUS for channel 'master2';
+ERROR HY000: Incorrect arguments to CONNECTION_NAME AND FOR CHANNEL CAN NOT BE SPECIFIED AT THE SAME TIME)
+
+drop database db1;
+drop database db2;
+include/reset_master_slave.inc
+disconnect slave;
+connection master1;
+drop database db1;
+include/reset_master_slave.inc
+disconnect master1;
+connection master2;
+drop database db2;
+include/reset_master_slave.inc
+disconnect master2;
+connection default;
+CREATE TABLE channel (channel int);
+DROP TABLE channel;
diff --git a/mysql-test/suite/multi_source/multisource_for_channel.test b/mysql-test/suite/multi_source/multisource_for_channel.test
new file mode 100644
index 00000000000..9b74ea97742
--- /dev/null
+++ b/mysql-test/suite/multi_source/multisource_for_channel.test
@@ -0,0 +1,429 @@
+#
+# This is the basic test of support mysql syntax "for channel" used for
+# multi-source replication
+#
+# Test basic replication functionality in multi-source setup
+#
+
+--source include/not_embedded.inc
+--source include/have_innodb.inc
+--source include/have_perfschema.inc
+--source include/binlog_start_pos.inc
+--let $rpl_server_count= 0
+
+RESET MASTER;
+
+--connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3)
+
+# MDEV-3984: crash/read of freed memory when changing master with named connection
+# This fails after adding the new master 'abc1', check we do not free twice.
+--error ER_RELAY_LOG_INIT
+change master to relay_log_file='' for channel 'abc1';
+# This fails before adding the new master, check that we do free it.
+--error ER_WRONG_ARGUMENTS
+change master to master_host='' for channel 'abc2';
+
+# Start replication from the first master
+
+--replace_result $SERVER_MYPORT_1 MYPORT_1
+eval change master to
+master_port=$SERVER_MYPORT_1,
+master_host='127.0.0.1',
+master_user='root'
+for channel 'master1';
+
+start slave for channel 'master1';
+set default_master_connection = 'master1';
+--source include/wait_for_slave_to_start.inc
+
+--connect (master1,127.0.0.1,root,,,$SERVER_MYPORT_1)
+--save_master_pos
+
+--connection slave
+--sync_with_master 0,'master1'
+
+# Here and further: add an extra check on SQL thread status
+# as the normal sync is not always enough
+--source include/wait_for_sql_thread_read_all.inc
+
+# each of the 3 commands should produce
+# 'master1' status
+
+let $wait_for_all= 1;
+let $show_statement= SHOW ALL SLAVES STATUS;
+let $field= Slave_IO_State;
+let $condition= = 'Waiting for master to send event';
+--source include/wait_show_condition.inc
+
+--echo #
+--echo # Checking SHOW SLAVE 'master1' STATUS
+--echo #
+--let $status_items= Master_Port, Relay_Log_File, Slave_IO_Running, Slave_SQL_Running, Last_Errno, Last_SQL_Errno
+--let $slave_field_result_replace= /$SERVER_MYPORT_1/MYPORT_1/
+--let $slave_name= 'master1'
+--let for_channel= 1
+--source include/show_slave_status.inc
+--let $slave_name=
+--let for_channel=
+
+--echo #
+--echo # Checking SHOW SLAVE STATUS
+--echo #
+--source include/show_slave_status.inc
+
+--echo #
+--echo # Checking SHOW ALL SLAVES STATUS
+--echo #
+--let $all_slaves_status= 1
+--let $status_items= Connection_name, Master_Port, Relay_Log_File, Slave_IO_Running, Slave_SQL_Running, Last_Errno, Last_SQL_Errno, Slave_heartbeat_period
+--source include/show_slave_status.inc
+--let $all_slaves_status=
+--echo #
+
+
+# Check that replication actually works
+
+--connection master1
+
+--disable_warnings
+drop database if exists db1;
+--enable_warnings
+create database db1;
+use db1;
+create table t1 (i int auto_increment, f1 varchar(16), primary key pk (i,f1)) engine=MyISAM;
+insert into t1 (f1) values ('one'),('two');
+--save_master_pos
+
+--connection slave
+--sync_with_master 0,'master1'
+
+--sorted_result
+select * from db1.t1;
+
+--let $datadir = `SELECT @@datadir`
+
+--echo # List of relay log files in the datadir
+--list_files $datadir mysqld-relay-bin-master1.*
+
+# Check that relay logs are recognizable
+
+let binlog_start=4;
+let binlog_file=;
+source include/show_relaylog_events.inc;
+let binlog_file= mysqld-relay-bin-master1.000002;
+source include/show_relaylog_events.inc;
+
+# Try to configure connection with the same name again,
+# should get an error because the slave is running
+
+--replace_result $SERVER_MYPORT_2 MYPORT_2
+--error ER_SLAVE_MUST_STOP
+eval change master to
+master_port=$SERVER_MYPORT_2,
+master_host='127.0.0.1',
+master_user='root'
+for channel 'master1';
+
+# Try to configure using the default connection name
+# (which is 'master1' at the moment),
+# again, should get an error
+
+--replace_result $SERVER_MYPORT_2 MYPORT_2
+--error ER_SLAVE_MUST_STOP
+eval change master to
+master_port=$SERVER_MYPORT_2,
+master_host='127.0.0.1',
+master_user='root';
+
+# Try to configure a connection with the same master
+# using a different name, should get a conflict
+
+--replace_result $SERVER_MYPORT_1 MYPORT_1
+--error ER_CONNECTION_ALREADY_EXISTS
+eval change master to
+master_port=$SERVER_MYPORT_1,
+master_host='127.0.0.1',
+master_user='root' for channel 'master2';
+
+
+# Set up a proper 'default' connection to master2
+
+set default_master_connection = '';
+
+--replace_result $SERVER_MYPORT_2 MYPORT_2
+eval change master to
+master_port=$SERVER_MYPORT_2,
+master_host='127.0.0.1',
+master_user='root';
+
+start slave;
+--source include/wait_for_slave_to_start.inc
+
+--source include/wait_for_sql_thread_read_all.inc
+
+# See both connections in the same status output
+
+let $wait_for_all= 1;
+let $show_statement= SHOW ALL SLAVES STATUS;
+let $field= Slave_IO_State;
+let $condition= = 'Waiting for master to send event';
+--source include/wait_show_condition.inc
+
+--echo #
+--echo # Checking SHOW ALL SLAVES STATUS
+--echo #
+--let $all_slaves_status= 1
+--let $status_items= Connection_name, Master_Port, Relay_Log_File, Slave_IO_Running, Slave_SQL_Running, Last_Errno, Last_SQL_Errno, Slave_heartbeat_period
+--let $slave_field_result_replace= /$SERVER_MYPORT_1/MYPORT_1/ /$SERVER_MYPORT_2/MYPORT_2/
+--source include/show_slave_status.inc
+--let $all_slaves_status=
+--echo #
+
+# Check that replication from two servers actually works
+
+--connection master1
+
+insert into t1 (f1) values ('three');
+--save_master_pos
+
+--connect (master2,127.0.0.1,root,,,$SERVER_MYPORT_2)
+
+--disable_warnings
+drop database if exists db2;
+--enable_warnings
+create database db2;
+use db2;
+create table t1 (pk int auto_increment primary key, f1 int) engine=InnoDB;
+begin;
+insert into t1 (f1) values (1),(2);
+
+--connection slave
+--sync_with_master 0,'master1'
+
+--connection master2
+--save_master_pos
+
+--connection slave
+--sync_with_master 0
+--sorted_result
+select * from db1.t1;
+select * from db2.t1;
+
+--connection master2
+commit;
+--save_master_pos
+
+--connection slave
+--sync_with_master 0
+--sorted_result
+select * from db2.t1;
+
+# Flush and purge logs on one master,
+# make sure slaves don't get confused
+
+--connection master1
+flush logs;
+--source include/wait_for_binlog_checkpoint.inc
+--save_master_pos
+--connection slave
+--sync_with_master 0, 'master1'
+
+--connection master1
+purge binary logs to 'master-bin.000002';
+# Additional events: 43 (Gtid_list) + 2 x 44 (Binlog_checkpoint) = 131
+let filesize=`select $binlog_start_pos+131`;
+--replace_result $filesize filesize
+show binary logs;
+insert into t1 (f1) values ('four');
+create table db1.t3 (f1 int) engine=InnoDB;
+--save_master_pos
+
+--connection slave
+--sync_with_master 0,'master1'
+
+--source include/wait_for_sql_thread_read_all.inc
+
+let $wait_for_all= 1;
+let $show_statement= SHOW ALL SLAVES STATUS;
+let $field= Slave_IO_State;
+let $condition= = 'Waiting for master to send event';
+--source include/wait_show_condition.inc
+
+--echo #
+--echo # Checking SHOW ALL SLAVES STATUS
+--echo #
+--let $all_slaves_status= 1
+--let $status_items= Connection_name, Master_Port, Relay_Log_File, Slave_IO_Running, Slave_SQL_Running, Last_Errno, Last_SQL_Errno, Slave_heartbeat_period
+--let $slave_field_result_replace= /$SERVER_MYPORT_1/MYPORT_1/ /$SERVER_MYPORT_2/MYPORT_2/
+--source include/show_slave_status.inc
+--let $all_slaves_status=
+--echo #
+
+--echo #
+--echo # MDEV:16437: merge 5.7 P_S replication instrumentation and tables
+--echo #
+--replace_column 2 #
+query_vertical SELECT * FROM performance_schema.replication_applier_status_by_coordinator;
+
+--sorted_result
+select * from db1.t1;
+
+# This should show relay log events for the default master
+# (the one with the empty name)
+let binlog_file=;
+source include/show_relaylog_events.inc;
+let binlog_file= mysqld-relay-bin.000002;
+source include/show_relaylog_events.inc;
+
+# Make sure we don't lose control over replication connections
+# after reconnecting to the slave
+
+--disconnect slave
+--connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3)
+
+stop slave io_thread;
+show status like 'Slave_running';
+set default_master_connection = 'master1';
+show status like 'Slave_running';
+
+--echo
+--echo #
+--echo # syntax compatible test
+--echo #
+--echo
+--echo #
+--echo # show relaylog events
+--echo #
+--replace_regex /Server ver:.*/Server ver: Version/
+SHOW RELAYLOG EVENTS for channel 'master1';
+
+--echo
+--echo show slave status for channel 'master1'
+--let $status_items= Master_Port, Relay_Log_File, Slave_IO_Running, Slave_SQL_Running, Last_Errno, Last_SQL_Errno
+--let $slave_field_result_replace= /$SERVER_MYPORT_1/MYPORT_1/
+--let $slave_name= 'master1'
+--let $for_channel= 1
+--source include/show_slave_status.inc
+
+--echo
+--echo #
+--echo # stop slave
+--echo #
+STOP SLAVE for channel 'master1';
+
+--echo
+--echo show slave status for channel 'master1'
+--let $status_items= Master_Port, Relay_Log_File, Slave_IO_Running, Slave_SQL_Running, Last_Errno, Last_SQL_Errno
+--let $slave_field_result_replace= /$SERVER_MYPORT_1/MYPORT_1/
+--let $slave_name= 'master1'
+--let $for_channel= 1
+--source include/show_slave_status.inc
+
+--echo
+--echo #
+--echo # start slave
+--echo #
+START SLAVE for channel 'master1';
+--source include/wait_for_slave_to_start.inc
+
+--echo
+--echo show slave status for channel 'master1'
+--let $status_items= Master_Port, Relay_Log_File, Slave_IO_Running, Slave_SQL_Running, Last_Errno, Last_SQL_Errno
+--let $slave_field_result_replace= /$SERVER_MYPORT_1/MYPORT_1/ /Preparing/Yes/
+--let $slave_name= 'master1'
+--let $for_channel= 1
+--source include/show_slave_status.inc
+
+--echo
+--echo #
+--echo # flush relay logs
+--echo #
+FLUSH RELAY LOGS for channel 'master1';
+--source include/wait_for_sql_thread_read_all.inc
+
+--echo
+--echo show slave status for channel 'master1'
+--let $status_items= Master_Port, Relay_Log_File, Slave_IO_Running, Slave_SQL_Running, Last_Errno, Last_SQL_Errno
+--let $slave_field_result_replace= /$SERVER_MYPORT_1/MYPORT_1/
+--let $slave_name= 'master1'
+--let $for_channel= 1
+--source include/show_slave_status.inc
+
+--echo
+--echo #
+--echo # stop slave
+--echo #
+STOP SLAVE for channel 'master1';
+
+--echo
+--echo show slave status for channel 'master1'
+--let $status_items= Master_Port, Relay_Log_File, Slave_IO_Running, Slave_SQL_Running, Last_Errno, Last_SQL_Errno
+--let $slave_field_result_replace= /$SERVER_MYPORT_1/MYPORT_1/
+--let $slave_name= 'master1'
+--let $for_channel= 1
+--source include/show_slave_status.inc
+
+--echo
+--echo #
+--echo # reset slave
+--echo #
+RESET SLAVE for channel 'master1';
+
+--echo
+--echo show slave status for channel 'master1'
+--let $status_items= Master_Port, Relay_Log_File, Slave_IO_Running, Slave_SQL_Running, Last_Errno, Last_SQL_Errno
+--let $slave_field_result_replace= /$SERVER_MYPORT_1/MYPORT_1/
+--let $slave_name= 'master1'
+--let $for_channel= 1
+--source include/show_slave_status.inc
+
+--echo
+--echo #
+--echo # show relaylog events after reset slave
+--echo #
+SHOW RELAYLOG EVENTS for channel 'master1';
+
+--let $slave_name=
+--let for_channel=
+
+--echo
+--echo #
+--echo # check error syntax
+--echo #
+--error ER_WRONG_ARGUMENTS
+RESET SLAVE 'master1' for channel 'mmaster2';
+--error ER_WRONG_ARGUMENTS
+STOP SLAVE 'master1' for channel 'master2';
+--error ER_WRONG_ARGUMENTS
+FLUSH RELAY LOGS 'master1' for channel 'master2';
+--error ER_WRONG_ARGUMENTS
+START SLAVE 'master1' for channel 'master2';
+--error ER_WRONG_ARGUMENTS
+SHOW RELAYLOG 'master1' EVENTS for channel 'master2';
+--error ER_WRONG_ARGUMENTS
+SHOW SLAVE 'master1' STATUS for channel 'master2';
+
+--echo
+# Cleanup
+drop database db1;
+drop database db2;
+
+--source include/reset_master_slave.inc
+--disconnect slave
+
+--connection master1
+drop database db1;
+--source include/reset_master_slave.inc
+--disconnect master1
+
+--connection master2
+drop database db2;
+--source include/reset_master_slave.inc
+--disconnect master2
+
+#
+# Check channel as a keyword
+#
+--connection default
+CREATE TABLE channel (channel int);
+DROP TABLE channel;
diff --git a/mysql-test/suite/parts/inc/engines.combinations b/mysql-test/suite/parts/inc/engines.combinations
new file mode 100644
index 00000000000..17e01265006
--- /dev/null
+++ b/mysql-test/suite/parts/inc/engines.combinations
@@ -0,0 +1,8 @@
+[innodb]
+default-storage-engine=innodb
+
+[myisam]
+default-storage-engine=myisam
+
+[aria]
+default-storage-engine=aria
diff --git a/mysql-test/suite/parts/inc/engines.inc b/mysql-test/suite/parts/inc/engines.inc
new file mode 100644
index 00000000000..b8995ef08ec
--- /dev/null
+++ b/mysql-test/suite/parts/inc/engines.inc
@@ -0,0 +1,4 @@
+--source include/have_innodb.inc
+
+let $engine= `select @@default_storage_engine`;
+
diff --git a/mysql-test/suite/parts/inc/partition.pre b/mysql-test/suite/parts/inc/partition.pre
index fba909687a0..3c9bbe9a6a6 100644
--- a/mysql-test/suite/parts/inc/partition.pre
+++ b/mysql-test/suite/parts/inc/partition.pre
@@ -51,7 +51,7 @@ let $ER_PARSE_ERROR= 1064;
let $ER_TOO_MANY_PARTITIONS_ERROR= 1499;
let $ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF= 1503;
let $ER_NO_PARTS_ERROR= 1504;
-let $ER_DROP_PARTITION_NON_EXISTENT= 1507;
+let $ER_PARTITION_DOES_NOT_EXIST= 1507;
let $ER_SAME_NAME_PARTITION= 1517;
let $ER_NO_PARTITION_FOR_GIVEN_VALUE= 1526;
diff --git a/mysql-test/suite/parts/inc/partition_alter_1.inc b/mysql-test/suite/parts/inc/partition_alter_1.inc
index b62efd24072..a348407ac60 100644
--- a/mysql-test/suite/parts/inc/partition_alter_1.inc
+++ b/mysql-test/suite/parts/inc/partition_alter_1.inc
@@ -40,7 +40,7 @@ eval $insert_first_half;
# 0
# 1030: ER_GET_ERRNO
# 1502: ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF
-# 1506: ER_DROP_PARTITION_NON_EXISTENT
+# 1506: ER_PARTITION_DOES_NOT_EXIST
--disable_abort_on_error
eval $alter;
--enable_abort_on_error
@@ -52,10 +52,10 @@ eval SET @my_errno = $mysql_errno;
let $run_test= `SELECT @my_errno = 0`;
if (`SELECT @my_errno NOT IN (0,$ER_GET_ERRNO,
$ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF,
- $ER_DROP_PARTITION_NON_EXISTENT)`);
+ $ER_PARTITION_DOES_NOT_EXIST)`);
{
--echo # The last command got an unexepected error response.
- --echo # Expected/handled SQL codes are 0,$ER_GET_ERRNO,$ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF,$ER_DROP_PARTITION_NON_EXISTENT
+ --echo # Expected/handled SQL codes are 0,$ER_GET_ERRNO,$ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF,$ER_PARTITION_DOES_NOT_EXIST
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
--echo # Sorry, have to abort.
--echo # Please check the error name to number mapping in inc/partition.pre.
diff --git a/mysql-test/suite/parts/inc/partition_fail.inc b/mysql-test/suite/parts/inc/partition_fail.inc
index dd79cdf1dc8..bbe5924e358 100644
--- a/mysql-test/suite/parts/inc/partition_fail.inc
+++ b/mysql-test/suite/parts/inc/partition_fail.inc
@@ -2,8 +2,10 @@
--eval $create_statement
--eval $insert_statement
---echo # State before failure
+--let $dbug_flag= `select @@session.debug_dbug`
+--echo # $dbug_flag: BEFORE failure
--replace_result #p# #P# #sp# #SP#
+--let $DATADIR= `select @@datadir`
--list_files $DATADIR/test
SHOW CREATE TABLE t1;
--sorted_result
@@ -11,7 +13,7 @@ SELECT * FROM t1;
--disable_abort_on_error
--eval $fail_statement
--enable_abort_on_error
---echo # State after failure
+--echo # $dbug_flag: AFTER failure
--replace_result #p# #P# #sp# #SP#
--list_files $DATADIR/test
SHOW CREATE TABLE t1;
@@ -19,10 +21,9 @@ SHOW CREATE TABLE t1;
SELECT * FROM t1;
DROP TABLE t1;
---echo # Same test under LOCK TABLE
--eval $create_statement
--eval $insert_statement
---echo # State before failure
+--echo # $dbug_flag: BEFORE failure (under LOCK TABLE)
--replace_result #p# #P# #sp# #SP#
--list_files $DATADIR/test
SHOW CREATE TABLE t1;
@@ -32,7 +33,7 @@ LOCK TABLE t1 WRITE;
--disable_abort_on_error
--eval $fail_statement
--enable_abort_on_error
---echo # State after failure
+--echo # $dbug_flag: AFTER failure (under LOCK TABLE)
--replace_result #p# #P# #sp# #SP#
--list_files $DATADIR/test
SHOW CREATE TABLE t1;
diff --git a/mysql-test/suite/parts/inc/partition_fail_t2.inc b/mysql-test/suite/parts/inc/partition_fail_t2.inc
index 492e6d5a71b..301fb005255 100644
--- a/mysql-test/suite/parts/inc/partition_fail_t2.inc
+++ b/mysql-test/suite/parts/inc/partition_fail_t2.inc
@@ -2,30 +2,40 @@
# To be used with WL#4445: EXCHANGE PARTITION WITH TABLE.
--eval $create_statement2
--eval $insert_statement2
-SHOW CREATE TABLE t2;
---sorted_result
-SELECT * FROM t2;
--eval $create_statement
--eval $insert_statement
---echo # State before failure
+--let $dbug_flag= `select @@session.debug_dbug`
+--echo # $dbug_flag: BEFORE failure
--replace_result #p# #P#
+if (!$DATADIR)
+{
+ --let $DATADIR= `SELECT @@datadir;`
+}
--list_files $DATADIR/test
SHOW CREATE TABLE t1;
--sorted_result
SELECT * FROM t1;
+SHOW CREATE TABLE t2;
+--sorted_result
+SELECT * FROM t2;
# accept all errors
--disable_abort_on_error
--replace_regex /#sql-exchange-[0-9a-f_\-]*/#sql-exchange/i
--eval $fail_statement
--enable_abort_on_error
---echo # State after failure
+--echo # $dbug_flag: AFTER failure
--replace_result #p# #P#
--list_files $DATADIR/test
SHOW CREATE TABLE t1;
--sorted_result
SELECT * FROM t1;
DROP TABLE t1;
+--error 0, ER_NO_SUCH_TABLE
SHOW CREATE TABLE t2;
--sorted_result
+--error 0, ER_NO_SUCH_TABLE
SELECT * FROM t2;
+# TODO: everything fails with ER_NO_SUCH_TABLE
+# but DROP TABLE fails with ER_BAD_TABLE_ERROR! Why?
+--error 0, ER_BAD_TABLE_ERROR
DROP TABLE t2;
diff --git a/mysql-test/suite/parts/r/alter_table,list.rdiff b/mysql-test/suite/parts/r/alter_table,list.rdiff
new file mode 100644
index 00000000000..391216bc47c
--- /dev/null
+++ b/mysql-test/suite/parts/r/alter_table,list.rdiff
@@ -0,0 +1,85 @@
+@@ -142,13 +142,13 @@
+ partition pn values less than maxvalue);
+ ERROR HY000: Partitioned tables do not support CREATE TEMPORARY TABLE
+ create or replace table t1 (x int)
+-partition by range(x) (
+-partition p1 values less than (10),
+-partition p2 values less than (20),
+-partition p3 values less than (30),
+-partition p4 values less than (40),
+-partition p5 values less than (50),
+-partition pn values less than maxvalue);
++partition by list(x) (
++partition p1 values in (2, 3, 4),
++partition p2 values in (12, 13, 14),
++partition p3 values in (22, 23, 24),
++partition p4 values in (32, 33, 34),
++partition p5 values in (42, 43, 44),
++partition pn values in (52, 53, 54));
+ insert into t1 values (2), (12), (22), (32), (42), (52);
+ create or replace table tp2 (y int);
+ insert tp2 values (88);
+@@ -188,12 +188,12 @@
+ t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+ ) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+- PARTITION BY RANGE (`x`)
+-(PARTITION `p1` VALUES LESS THAN (10) ENGINE = X,
+- PARTITION `p3` VALUES LESS THAN (30) ENGINE = X,
+- PARTITION `p4` VALUES LESS THAN (40) ENGINE = X,
+- PARTITION `p5` VALUES LESS THAN (50) ENGINE = X,
+- PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = X)
++ PARTITION BY LIST (`x`)
++(PARTITION `p1` VALUES IN (2,3,4) ENGINE = X,
++ PARTITION `p3` VALUES IN (22,23,24) ENGINE = X,
++ PARTITION `p4` VALUES IN (32,33,34) ENGINE = X,
++ PARTITION `p5` VALUES IN (42,43,44) ENGINE = X,
++ PARTITION `pn` VALUES IN (52,53,54) ENGINE = X)
+ select * from t1 order by x;
+ x
+ 2
+@@ -218,11 +218,11 @@
+ t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+ ) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+- PARTITION BY RANGE (`x`)
+-(PARTITION `p1` VALUES LESS THAN (10) ENGINE = X,
+- PARTITION `p4` VALUES LESS THAN (40) ENGINE = X,
+- PARTITION `p5` VALUES LESS THAN (50) ENGINE = X,
+- PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = X)
++ PARTITION BY LIST (`x`)
++(PARTITION `p1` VALUES IN (2,3,4) ENGINE = X,
++ PARTITION `p4` VALUES IN (32,33,34) ENGINE = X,
++ PARTITION `p5` VALUES IN (42,43,44) ENGINE = X,
++ PARTITION `pn` VALUES IN (52,53,54) ENGINE = X)
+ select * from t1 order by x;
+ x
+ 2
+@@ -248,10 +248,10 @@
+ t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+ ) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+- PARTITION BY RANGE (`x`)
+-(PARTITION `p1` VALUES LESS THAN (10) ENGINE = X,
+- PARTITION `p5` VALUES LESS THAN (50) ENGINE = X,
+- PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = X)
++ PARTITION BY LIST (`x`)
++(PARTITION `p1` VALUES IN (2,3,4) ENGINE = X,
++ PARTITION `p5` VALUES IN (42,43,44) ENGINE = X,
++ PARTITION `pn` VALUES IN (52,53,54) ENGINE = X)
+ select * from t1 order by x;
+ x
+ 2
+@@ -273,9 +273,9 @@
+ t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+ ) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+- PARTITION BY RANGE (`x`)
+-(PARTITION `p1` VALUES LESS THAN (10) ENGINE = X,
+- PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = X)
++ PARTITION BY LIST (`x`)
++(PARTITION `p1` VALUES IN (2,3,4) ENGINE = X,
++ PARTITION `pn` VALUES IN (52,53,54) ENGINE = X)
+ select * from t1 order by x;
+ x
+ 2
diff --git a/mysql-test/suite/parts/r/alter_table.result b/mysql-test/suite/parts/r/alter_table.result
index 0901584c6f8..b887cea36f0 100644
--- a/mysql-test/suite/parts/r/alter_table.result
+++ b/mysql-test/suite/parts/r/alter_table.result
@@ -28,3 +28,319 @@ ALTER TABLE v1 EXCHANGE PARTITION p2 WITH TABLE t2 ;
ERROR 42000: Can't open table
DROP VIEW v1;
DROP TABLE t1, t2;
+#
+# MDEV-22165 CONVERT PARTITION: move in partition from existing table
+#
+create or replace table tp1 (a int);
+create or replace table t1 (a int)
+partition by hash (a) partitions 2;
+alter table t1 convert table tp1 to partition p2;
+ERROR HY000: CONVERT TABLE TO PARTITION can only be used on RANGE/LIST partitions
+create or replace table t1 (a int)
+partition by range (a)
+(partition p0 values less than (0));
+alter table t1 convert table non_existent to partition p1 values less than (10);
+ERROR 42S02: Table 'test.non_existent' doesn't exist
+alter table t1 convert table tp1 to partition p1 values less than (10);
+show create table tp1;
+ERROR 42S02: Table 'test.tp1' doesn't exist
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`a`)
+(PARTITION `p0` VALUES LESS THAN (0) ENGINE = X,
+ PARTITION `p1` VALUES LESS THAN (10) ENGINE = X)
+create table tp2 (x int);
+alter table t1 convert table tp2 to partition p2 values less than (20);
+ERROR HY000: Tables have different definitions
+show create table tp2;
+Table Create Table
+tp2 CREATE TABLE `tp2` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`a`)
+(PARTITION `p0` VALUES LESS THAN (0) ENGINE = X,
+ PARTITION `p1` VALUES LESS THAN (10) ENGINE = X)
+create or replace table tp2 (a int);
+insert tp2 values (1), (15), (17);
+alter table t1 convert table tp2 to partition p2 values less than (20);
+ERROR HY000: Found a row that does not match the partition
+delete from tp2;
+insert tp2 values (15), (1), (17);
+alter table t1 convert table tp2 to partition p2 values less than (20);
+ERROR HY000: Found a row that does not match the partition
+delete from tp2;
+insert tp2 values (15), (17), (1);
+alter table t1 convert table tp2 to partition p2 values less than (20);
+ERROR HY000: Found a row that does not match the partition
+delete from tp2;
+insert tp2 values (15), (17);
+alter table t1 convert table tp2 to partition p2 values less than (20);
+show create table tp2;
+ERROR 42S02: Table 'test.tp2' doesn't exist
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`a`)
+(PARTITION `p0` VALUES LESS THAN (0) ENGINE = X,
+ PARTITION `p1` VALUES LESS THAN (10) ENGINE = X,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = X)
+select * from t1 partition (p2);
+a
+15
+17
+create or replace table t1 (a int)
+partition by range (a) (
+p0 values less than (0),
+pn values less than (30));
+insert into t1 values (1);
+create or replace table tp1 (a int);
+insert into tp1 values (2);
+alter table t1 convert table tp1 to partition p1 values less than (10);
+ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition
+drop tables t1, tp1;
+#
+# MDEV-22166 CONVERT PARTITION: move out partition into a table
+#
+create or replace table t1 (x int);
+alter table t1 convert partition p1 to table tp1;
+ERROR HY000: Partition management on a not partitioned table is not possible
+create or replace table t1 (x int)
+partition by hash(x) partitions 2;
+alter table t1 convert partition p1 to table tp1;
+ERROR HY000: CONVERT PARTITION can only be used on RANGE/LIST partitions
+create or replace table t1 (x int)
+partition by key(x) partitions 2;
+alter table t1 convert partition p1 to table tp1;
+ERROR HY000: CONVERT PARTITION can only be used on RANGE/LIST partitions
+create or replace table t1 (x int)
+partition by range(x)
+subpartition by hash(x) subpartitions 3 (
+partition p1 values less than (10),
+partition pn values less than maxvalue);
+alter table t1 convert partition p1 to table p1;
+ERROR HY000: Convert partition is not supported for subpartitioned table.
+alter table t1 convert partition p1sp0 to table p1;
+ERROR HY000: Wrong partition name or partition list
+create or replace table t1 (x int)
+partition by range(x) (
+partition p1 values less than (10));
+alter table t1 convert partition p1 to table tp1;
+ERROR HY000: Cannot remove all partitions, use DROP TABLE instead
+create or replace temporary table t1 (x int)
+partition by range(x) (
+partition p0 values less than (10),
+partition pn values less than maxvalue);
+ERROR HY000: Partitioned tables do not support CREATE TEMPORARY TABLE
+create or replace table t1 (x int)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+create or replace table tp2 (y int);
+insert tp2 values (88);
+alter table t1 convert partition p2 to table tp2, drop partition p3;
+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 ' drop partition p3' at line 1
+alter table t1 convert partition p00 to table tp00;
+ERROR HY000: Wrong partition name or partition list
+alter table t1 convert partition p00 to table tp2;
+ERROR 42S01: Table 'tp2' already exists
+alter table t1 convert partition p2 to table tp2;
+ERROR 42S01: Table 'tp2' already exists
+create trigger tr1 before update on t1 for each row
+begin
+alter table t1 convert partition p2 to table tp2;
+end$
+ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger
+create function f1() returns int
+begin
+alter table t1 convert partition p2 to table tp2;
+end$
+ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger
+select * from tp2;
+y
+88
+drop table tp2;
+alter table t1 convert partition p2 to table tp2;
+show create table tp2;
+Table Create Table
+tp2 CREATE TABLE `tp2` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+select * from tp2;
+x
+12
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = X,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = X,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = X,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = X,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = X)
+select * from t1 order by x;
+x
+2
+22
+32
+42
+52
+alter table t1 convert partition p3 to table inexistent.tp3;
+ERROR 42000: Unknown database 'inexistent'
+create database EXISTENT;
+alter table t1 convert partition p3 to table EXISTENT.TP3;
+show create table EXISTENT.TP3;
+Table Create Table
+TP3 CREATE TABLE `TP3`-ok (
+ `x` int(11) DEFAULT NULL
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+select * from EXISTENT.TP3 order by x;
+x
+22
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = X,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = X,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = X,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = X)
+select * from t1 order by x;
+x
+2
+32
+42
+52
+# LOCK TABLES
+lock tables t1 write;
+alter table t1 convert partition p4 to table tp4;
+show create table tp4;
+ERROR HY000: Table 'tp4' was not locked with LOCK TABLES
+unlock tables;
+show create table tp4;
+Table Create Table
+tp4 CREATE TABLE `tp4` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+select * from tp4;
+x
+32
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = X,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = X,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = X)
+select * from t1 order by x;
+x
+2
+42
+52
+# PS
+prepare stmt from 'alter table t1 convert partition p5 to table tp5';
+execute stmt;
+show create table tp5;
+Table Create Table
+tp5 CREATE TABLE `tp5` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+select * from tp5;
+x
+42
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = X,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = X)
+select * from t1 order by x;
+x
+2
+52
+drop table tp5;
+execute stmt;
+ERROR HY000: Wrong partition name or partition list
+execute stmt;
+ERROR HY000: Wrong partition name or partition list
+drop prepare stmt;
+# Privileges
+create user alan;
+grant usage on *.* to alan;
+grant create, insert, drop on test.* to alan;
+connect alan,localhost,alan,,test;
+show grants for current_user;
+Grants for alan@%
+GRANT USAGE ON *.* TO `alan`@`%`
+GRANT INSERT, CREATE, DROP ON `test`.* TO `alan`@`%`
+alter table t1 convert partition p1 to table tp1;
+ERROR 42000: ALTER command denied to user 'alan'@'localhost' for table `test`.`t1`
+connection default;
+revoke all on test.* from alan;
+grant create, insert, alter on test.* to alan;
+connection alan;
+use test;
+show grants for current_user;
+Grants for alan@%
+GRANT USAGE ON *.* TO `alan`@`%`
+GRANT INSERT, CREATE, ALTER ON `test`.* TO `alan`@`%`
+alter table t1 convert partition p1 to table tp1;
+ERROR 42000: DROP command denied to user 'alan'@'localhost' for table `test`.`t1`
+connection default;
+revoke all on test.* from alan;
+grant create, drop, alter on test.* to alan;
+connection alan;
+use test;
+show grants for current_user;
+Grants for alan@%
+GRANT USAGE ON *.* TO `alan`@`%`
+GRANT CREATE, DROP, ALTER ON `test`.* TO `alan`@`%`
+alter table t1 convert partition p1 to table tp1;
+ERROR 42000: INSERT command denied to user 'alan'@'localhost' for table `test`.`tp1`
+connection default;
+revoke all on test.* from alan;
+grant insert, drop, alter on test.* to alan;
+connection alan;
+use test;
+show grants for current_user;
+Grants for alan@%
+GRANT USAGE ON *.* TO `alan`@`%`
+GRANT INSERT, DROP, ALTER ON `test`.* TO `alan`@`%`
+alter table t1 convert partition p1 to table tp1;
+ERROR 42000: CREATE command denied to user 'alan'@'localhost' for table `test`.`tp1`
+connection default;
+grant create, insert, drop, alter on test.* to alan;
+connection alan;
+use test;
+show grants for current_user;
+Grants for alan@%
+GRANT USAGE ON *.* TO `alan`@`%`
+GRANT INSERT, CREATE, DROP, ALTER ON `test`.* TO `alan`@`%`
+alter table t1 convert partition p1 to table tp1;
+disconnect alan;
+connection default;
+drop database EXISTENT;
+drop user alan;
+drop tables t1, tp1, tp2, tp4;
diff --git a/mysql-test/suite/parts/r/debug_innodb_fail.result b/mysql-test/suite/parts/r/debug_innodb_fail.result
index 3d7b19a7f32..b57925eb073 100644
--- a/mysql-test/suite/parts/r/debug_innodb_fail.result
+++ b/mysql-test/suite/parts/r/debug_innodb_fail.result
@@ -19,7 +19,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_1: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -47,7 +47,7 @@ a b
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_1: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -73,14 +73,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_1: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -109,7 +108,7 @@ LOCK TABLE t1 WRITE;
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_1: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -144,7 +143,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_2: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -172,7 +171,7 @@ a b
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_2: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -198,14 +197,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_2: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -234,7 +232,7 @@ LOCK TABLE t1 WRITE;
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_2: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -269,7 +267,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_3: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -297,7 +295,7 @@ a b
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_3: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -323,14 +321,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_3: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -359,7 +356,7 @@ LOCK TABLE t1 WRITE;
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_3: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -394,7 +391,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_4: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -422,7 +419,7 @@ a b
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_4: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -448,14 +445,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_4: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -484,7 +480,7 @@ LOCK TABLE t1 WRITE;
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_4: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -519,7 +515,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_5: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -547,7 +543,7 @@ a b
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_5: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -573,14 +569,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_5: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -609,7 +604,7 @@ LOCK TABLE t1 WRITE;
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_5: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -644,7 +639,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_6: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -672,7 +667,7 @@ a b
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_6: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -698,14 +693,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_6: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -734,7 +728,7 @@ LOCK TABLE t1 WRITE;
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_6: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -769,7 +763,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_7: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -797,7 +791,7 @@ a b
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_7: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -823,14 +817,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_7: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -859,7 +852,7 @@ LOCK TABLE t1 WRITE;
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_7: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -894,7 +887,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_8: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -922,7 +915,7 @@ a b
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_8: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -950,14 +943,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_8: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -986,7 +978,7 @@ LOCK TABLE t1 WRITE;
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_8: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1023,7 +1015,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_9: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1051,7 +1043,7 @@ a b
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_9: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1079,14 +1071,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_9: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1115,7 +1106,7 @@ LOCK TABLE t1 WRITE;
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_9: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1152,7 +1143,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_10: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1180,7 +1171,7 @@ a b
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_10: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1208,14 +1199,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_10: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1244,7 +1234,7 @@ LOCK TABLE t1 WRITE;
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_10: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1283,7 +1273,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_1: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1310,7 +1300,7 @@ a b
4 Original from partition p0
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_1: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1336,14 +1326,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_1: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1371,7 +1360,7 @@ a b
LOCK TABLE t1 WRITE;
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_1: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1406,7 +1395,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_2: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1433,7 +1422,7 @@ a b
4 Original from partition p0
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_2: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1459,14 +1448,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_2: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1494,7 +1482,7 @@ a b
LOCK TABLE t1 WRITE;
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_2: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1529,7 +1517,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_3: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1556,7 +1544,7 @@ a b
4 Original from partition p0
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_3: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1582,14 +1570,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_3: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1617,7 +1604,7 @@ a b
LOCK TABLE t1 WRITE;
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_3: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1652,7 +1639,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_4: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1679,7 +1666,7 @@ a b
4 Original from partition p0
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_4: AFTER failure
db.opt
t1#P#p0.ibd
t1.frm
@@ -1699,14 +1686,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_4: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1734,7 +1720,7 @@ a b
LOCK TABLE t1 WRITE;
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_4: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1.frm
@@ -1763,7 +1749,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_5: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1790,7 +1776,7 @@ a b
4 Original from partition p0
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_5: AFTER failure
db.opt
t1#P#p0.ibd
t1.frm
@@ -1810,14 +1796,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_5: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1845,7 +1830,7 @@ a b
LOCK TABLE t1 WRITE;
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_5: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1.frm
@@ -1874,7 +1859,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_6: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1901,7 +1886,7 @@ a b
4 Original from partition p0
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_6: AFTER failure
db.opt
t1#P#p0.ibd
t1.frm
@@ -1921,14 +1906,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_6: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -1956,7 +1940,7 @@ a b
LOCK TABLE t1 WRITE;
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_6: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1.frm
@@ -1985,7 +1969,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_7: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2012,7 +1996,7 @@ a b
4 Original from partition p0
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_7: AFTER failure
db.opt
t1#P#p0.ibd
t1.frm
@@ -2032,14 +2016,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_7: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2067,7 +2050,7 @@ a b
LOCK TABLE t1 WRITE;
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_7: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1.frm
@@ -2096,7 +2079,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_8: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2123,7 +2106,7 @@ a b
4 Original from partition p0
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_8: AFTER failure
db.opt
t1#P#p0.ibd
t1.frm
@@ -2143,14 +2126,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_8: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2178,7 +2160,7 @@ a b
LOCK TABLE t1 WRITE;
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_8: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1.frm
@@ -2207,7 +2189,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_9: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2234,7 +2216,7 @@ a b
4 Original from partition p0
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_9: AFTER failure
db.opt
t1#P#p0.ibd
t1.frm
@@ -2254,14 +2236,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_9: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2289,7 +2270,7 @@ a b
LOCK TABLE t1 WRITE;
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_9: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1.frm
@@ -2321,7 +2302,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_1: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2350,7 +2331,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_1: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2376,14 +2357,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_1: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2413,7 +2393,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_1: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2448,7 +2428,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_2: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2477,7 +2457,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_2: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2503,14 +2483,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_2: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2540,7 +2519,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_2: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2575,7 +2554,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_3: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2604,7 +2583,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_3: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2630,14 +2609,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_3: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2667,7 +2645,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_3: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2702,7 +2680,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_4: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2731,7 +2709,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_4: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2757,14 +2735,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_4: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2794,7 +2771,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_4: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2829,7 +2806,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_5: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2858,7 +2835,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_5: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2884,14 +2861,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_5: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2921,7 +2897,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_5: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2956,7 +2932,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_6: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -2985,7 +2961,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_6: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3011,14 +2987,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_6: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3048,7 +3023,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_6: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3083,7 +3058,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_7: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3112,7 +3087,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_7: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3140,14 +3115,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_7: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3177,7 +3151,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_7: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3214,7 +3188,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_8: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3243,7 +3217,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_8: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3271,14 +3245,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_8: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3308,7 +3281,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_8: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3345,7 +3318,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_9: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3374,7 +3347,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_9: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3402,14 +3375,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_9: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3439,7 +3411,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_9: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3476,7 +3448,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_10: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3505,7 +3477,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_10: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3533,14 +3505,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_10: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3570,7 +3541,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_10: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3607,7 +3578,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_11: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3636,7 +3607,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_11: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3664,14 +3635,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_11: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3701,7 +3671,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_11: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3738,7 +3708,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_12: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3767,7 +3737,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_12: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3795,14 +3765,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_12: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
@@ -3832,7 +3801,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_12: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.ibd
t1#P#p10.ibd
diff --git a/mysql-test/suite/parts/r/debug_myisam_fail.result b/mysql-test/suite/parts/r/debug_myisam_fail.result
index 117f6ffbdac..708ce222826 100644
--- a/mysql-test/suite/parts/r/debug_myisam_fail.result
+++ b/mysql-test/suite/parts/r/debug_myisam_fail.result
@@ -16,7 +16,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_1: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -46,7 +46,7 @@ a b
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_1: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -74,14 +74,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_1: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -112,7 +111,7 @@ LOCK TABLE t1 WRITE;
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_1: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -149,7 +148,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_2: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -179,7 +178,7 @@ a b
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_2: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -207,14 +206,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_2: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -245,7 +243,7 @@ LOCK TABLE t1 WRITE;
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_2: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -282,7 +280,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_3: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -312,7 +310,7 @@ a b
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_3: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -340,14 +338,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_3: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -378,7 +375,7 @@ LOCK TABLE t1 WRITE;
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_3: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -415,7 +412,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_4: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -445,7 +442,7 @@ a b
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_4: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -473,14 +470,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_4: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -511,7 +507,7 @@ LOCK TABLE t1 WRITE;
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_4: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -548,7 +544,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_5: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -578,7 +574,7 @@ a b
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_5: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -606,14 +602,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_5: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -644,7 +639,7 @@ LOCK TABLE t1 WRITE;
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_5: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -681,7 +676,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_6: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -711,7 +706,7 @@ a b
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_6: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -739,14 +734,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_6: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -777,7 +771,7 @@ LOCK TABLE t1 WRITE;
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_6: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -814,7 +808,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_7: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -844,7 +838,7 @@ a b
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_7: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -872,14 +866,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_7: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -910,7 +903,7 @@ LOCK TABLE t1 WRITE;
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_7: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -947,7 +940,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_8: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -977,7 +970,7 @@ a b
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_8: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1008,14 +1001,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_8: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1046,7 +1038,7 @@ LOCK TABLE t1 WRITE;
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_8: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1086,7 +1078,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_9: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1116,7 +1108,7 @@ a b
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_9: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1147,14 +1139,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_9: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1185,7 +1176,7 @@ LOCK TABLE t1 WRITE;
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_9: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1225,7 +1216,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_10: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1255,7 +1246,7 @@ a b
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_10: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1286,14 +1277,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_add_partition_10: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1324,7 +1314,7 @@ LOCK TABLE t1 WRITE;
ALTER TABLE t1 ADD PARTITION
(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_add_partition_10: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1366,7 +1356,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_1: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1395,7 +1385,7 @@ a b
4 Original from partition p0
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_1: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1423,14 +1413,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_1: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1460,7 +1449,7 @@ a b
LOCK TABLE t1 WRITE;
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_1: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1497,7 +1486,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_2: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1526,7 +1515,7 @@ a b
4 Original from partition p0
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_2: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1554,14 +1543,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_2: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1591,7 +1579,7 @@ a b
LOCK TABLE t1 WRITE;
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_2: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1628,7 +1616,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_3: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1657,7 +1645,7 @@ a b
4 Original from partition p0
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_3: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1685,14 +1673,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_3: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1722,7 +1709,7 @@ a b
LOCK TABLE t1 WRITE;
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_3: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1759,7 +1746,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_4: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1788,7 +1775,7 @@ a b
4 Original from partition p0
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_4: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1809,14 +1796,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_4: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1846,7 +1832,7 @@ a b
LOCK TABLE t1 WRITE;
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_4: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1876,7 +1862,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_5: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1905,7 +1891,7 @@ a b
4 Original from partition p0
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_5: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1926,14 +1912,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_5: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1963,7 +1948,7 @@ a b
LOCK TABLE t1 WRITE;
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_5: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1993,7 +1978,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_6: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2022,7 +2007,7 @@ a b
4 Original from partition p0
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_6: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2043,14 +2028,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_6: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2080,7 +2064,7 @@ a b
LOCK TABLE t1 WRITE;
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_6: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2110,7 +2094,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_7: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2139,7 +2123,7 @@ a b
4 Original from partition p0
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_7: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2160,14 +2144,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_7: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2197,7 +2180,7 @@ a b
LOCK TABLE t1 WRITE;
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_7: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2227,7 +2210,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_8: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2256,7 +2239,7 @@ a b
4 Original from partition p0
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_8: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2277,14 +2260,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_8: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2314,7 +2296,7 @@ a b
LOCK TABLE t1 WRITE;
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_8: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2344,7 +2326,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_9: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2373,7 +2355,7 @@ a b
4 Original from partition p0
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_9: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2394,14 +2376,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_drop_partition_9: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2431,7 +2412,7 @@ a b
LOCK TABLE t1 WRITE;
ALTER TABLE t1 DROP PARTITION p10;
ERROR HY000: Unknown error
-# State after failure
+# d,fail_drop_partition_9: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2464,7 +2445,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_1: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2495,7 +2476,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_1: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2523,14 +2504,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_1: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2562,7 +2542,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_1: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2599,7 +2579,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_2: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2630,7 +2610,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_2: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2658,14 +2638,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_2: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2697,7 +2676,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_2: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2734,7 +2713,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_3: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2765,7 +2744,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_3: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2793,14 +2772,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_3: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2832,7 +2810,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_3: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2869,7 +2847,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_4: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2900,7 +2878,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_4: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2928,14 +2906,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_4: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -2967,7 +2944,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_4: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3004,7 +2981,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_5: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3035,7 +3012,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_5: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3063,14 +3040,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_5: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3102,7 +3078,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_5: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3139,7 +3115,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_6: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3170,7 +3146,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_6: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3198,14 +3174,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_6: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3237,7 +3212,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_6: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3274,7 +3249,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_7: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3305,7 +3280,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_7: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3336,14 +3311,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_7: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3375,7 +3349,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_7: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3415,7 +3389,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_8: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3446,7 +3420,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_8: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3477,14 +3451,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_8: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3516,7 +3489,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_8: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3556,7 +3529,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_9: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3587,7 +3560,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_9: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3618,14 +3591,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_9: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3657,7 +3629,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_9: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3697,7 +3669,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_10: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3728,7 +3700,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_10: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3759,14 +3731,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_10: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3798,7 +3769,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_10: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3838,7 +3809,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_11: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3869,7 +3840,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_11: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3900,14 +3871,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_11: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3939,7 +3909,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_11: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -3979,7 +3949,7 @@ PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_12: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -4010,7 +3980,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_12: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -4041,14 +4011,13 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
-# Same test under LOCK TABLE
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
PARTITION BY LIST (a)
(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9),
PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19));
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1");
-# State before failure
+# d,fail_change_partition_12: BEFORE failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -4080,7 +4049,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p10 INTO
(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19),
PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29));
ERROR HY000: Unknown error
-# State after failure
+# d,fail_change_partition_12: AFTER failure (under LOCK TABLE)
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
diff --git a/mysql-test/suite/parts/r/partition_alter4_innodb.result b/mysql-test/suite/parts/r/partition_alter4_innodb.result
index c9a80c6035b..aab121f2b23 100644
--- a/mysql-test/suite/parts/r/partition_alter4_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter4_innodb.result
@@ -7592,7 +7592,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -8052,7 +8052,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -8523,7 +8523,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -8995,7 +8995,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -9461,7 +9461,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -9933,7 +9933,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -10410,7 +10410,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -10885,7 +10885,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -11350,7 +11350,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -11810,7 +11810,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -12281,7 +12281,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -12753,7 +12753,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -13219,7 +13219,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -13691,7 +13691,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -14168,7 +14168,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -14643,7 +14643,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -26393,7 +26393,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -26853,7 +26853,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -27324,7 +27324,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -27796,7 +27796,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -28262,7 +28262,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -28734,7 +28734,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -29211,7 +29211,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -29686,7 +29686,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -30151,7 +30151,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -30611,7 +30611,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -31082,7 +31082,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -31554,7 +31554,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -32020,7 +32020,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -32492,7 +32492,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -32969,7 +32969,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -33444,7 +33444,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -45202,7 +45202,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -45662,7 +45662,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -46133,7 +46133,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -46605,7 +46605,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -47071,7 +47071,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -47543,7 +47543,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -48020,7 +48020,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -48495,7 +48495,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -48960,7 +48960,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -49420,7 +49420,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -49891,7 +49891,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -50363,7 +50363,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -50829,7 +50829,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -51301,7 +51301,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -51778,7 +51778,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -52253,7 +52253,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -63970,7 +63970,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -63985,7 +63985,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -64008,7 +64008,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -64029,7 +64029,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -64048,7 +64048,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -64071,7 +64071,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -64094,7 +64094,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -64113,7 +64113,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
# 4.4 ALTER ... REBUILD PARTITION part_1,part_1,part_1;
DROP TABLE IF EXISTS t1;
@@ -64130,7 +64130,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -64145,7 +64145,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -64168,7 +64168,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -64189,7 +64189,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -64208,7 +64208,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -64231,7 +64231,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -64254,7 +64254,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -64273,7 +64273,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
# 4.5 ALTER ... REBUILD PARTITION ALL;
DROP TABLE IF EXISTS t1;
@@ -75552,7 +75552,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -76012,7 +76012,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -76483,7 +76483,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -76955,7 +76955,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -77421,7 +77421,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -77893,7 +77893,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -78370,7 +78370,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -78845,7 +78845,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -79310,7 +79310,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -79770,7 +79770,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -80241,7 +80241,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -80713,7 +80713,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -81179,7 +81179,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -81651,7 +81651,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -82128,7 +82128,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -82603,7 +82603,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
diff --git a/mysql-test/suite/parts/r/partition_alter4_myisam.result b/mysql-test/suite/parts/r/partition_alter4_myisam.result
index 4e9e5c83248..c863d479fbb 100644
--- a/mysql-test/suite/parts/r/partition_alter4_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter4_myisam.result
@@ -7888,7 +7888,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -8357,7 +8357,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -8843,7 +8843,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -9336,7 +9336,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -9819,7 +9819,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -10312,7 +10312,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -10810,7 +10810,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -11306,7 +11306,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -11794,7 +11794,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -12263,7 +12263,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -12749,7 +12749,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -13242,7 +13242,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -13725,7 +13725,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -14218,7 +14218,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -14716,7 +14716,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -15212,7 +15212,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 analyze error Error in list of partitions to test.t1
+test.t1 analyze error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -27429,7 +27429,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -27898,7 +27898,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -28384,7 +28384,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -28877,7 +28877,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -29360,7 +29360,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -29853,7 +29853,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -30351,7 +30351,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -30847,7 +30847,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -31335,7 +31335,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -31804,7 +31804,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -32290,7 +32290,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -32783,7 +32783,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -33266,7 +33266,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -33759,7 +33759,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -34257,7 +34257,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -34753,7 +34753,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 check error Error in list of partitions to test.t1
+test.t1 check error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -46962,7 +46962,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -47431,7 +47431,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -47917,7 +47917,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -48410,7 +48410,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -48893,7 +48893,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -49386,7 +49386,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -49884,7 +49884,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -50380,7 +50380,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -50868,7 +50868,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -51337,7 +51337,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -51823,7 +51823,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -52316,7 +52316,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -52799,7 +52799,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -53292,7 +53292,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -53790,7 +53790,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -54286,7 +54286,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 optimize error Error in list of partitions to test.t1
+test.t1 optimize error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -66462,7 +66462,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -66477,7 +66477,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -66500,7 +66500,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -66521,7 +66521,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -66540,7 +66540,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -66563,7 +66563,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -66586,7 +66586,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -66605,7 +66605,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
# 4.4 ALTER ... REBUILD PARTITION part_1,part_1,part_1;
DROP TABLE IF EXISTS t1;
@@ -66622,7 +66622,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -66637,7 +66637,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -66660,7 +66660,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -66681,7 +66681,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -66700,7 +66700,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -66723,7 +66723,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -66746,7 +66746,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT 0,
@@ -66765,7 +66765,7 @@ INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
-ERROR HY000: Error in list of partitions to REBUILD
+ERROR HY000: Wrong partition name or partition list
DROP TABLE t1;
# 4.5 ALTER ... REBUILD PARTITION ALL;
DROP TABLE IF EXISTS t1;
@@ -78488,7 +78488,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -78957,7 +78957,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -79443,7 +79443,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -79936,7 +79936,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -80419,7 +80419,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -80912,7 +80912,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -81410,7 +81410,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -81906,7 +81906,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -82394,7 +82394,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -82863,7 +82863,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -83349,7 +83349,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -83842,7 +83842,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -84325,7 +84325,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -84818,7 +84818,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -85316,7 +85316,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -85812,7 +85812,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 repair error Error in list of partitions to test.t1
+test.t1 repair error Wrong partition name or partition list
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
diff --git a/mysql-test/suite/parts/r/partition_debug.result b/mysql-test/suite/parts/r/partition_debug.result
index b24ce29d028..5aae648dd1c 100644
--- a/mysql-test/suite/parts/r/partition_debug.result
+++ b/mysql-test/suite/parts/r/partition_debug.result
@@ -1025,23 +1025,11 @@ SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_1";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
-SHOW CREATE TABLE t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
-SELECT * FROM t2;
-a b
-5 Original from table t2
-6 Original from table t2
-7 Original from table t2
-8 Original from table t2
CREATE TABLE t1 (a INT, b VARCHAR(64)) PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (10),
PARTITION p1 VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
-# State before failure
+# d,exchange_partition_fail_1: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1075,9 +1063,21 @@ a b
24 Original from partition p1
3 Original from partition p0
4 Original from partition p0
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Error in DDL log
-# State after failure
+# d,exchange_partition_fail_1: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1129,23 +1129,11 @@ SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_2";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
-SHOW CREATE TABLE t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
-SELECT * FROM t2;
-a b
-5 Original from table t2
-6 Original from table t2
-7 Original from table t2
-8 Original from table t2
CREATE TABLE t1 (a INT, b VARCHAR(64)) PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (10),
PARTITION p1 VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
-# State before failure
+# d,exchange_partition_fail_2: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1179,9 +1167,21 @@ a b
24 Original from partition p1
3 Original from partition p0
4 Original from partition p0
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Error in DDL log
-# State after failure
+# d,exchange_partition_fail_2: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1233,23 +1233,11 @@ SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_3";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
-SHOW CREATE TABLE t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
-SELECT * FROM t2;
-a b
-5 Original from table t2
-6 Original from table t2
-7 Original from table t2
-8 Original from table t2
CREATE TABLE t1 (a INT, b VARCHAR(64)) PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (10),
PARTITION p1 VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
-# State before failure
+# d,exchange_partition_fail_3: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1283,9 +1271,21 @@ a b
24 Original from partition p1
3 Original from partition p0
4 Original from partition p0
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Error on rename of './test/t2' to './test/#sql-exchange' (errno: 0 "Internal error/check (Not system error)")
-# State after failure
+# d,exchange_partition_fail_3: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1337,23 +1337,11 @@ SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_4";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
-SHOW CREATE TABLE t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
-SELECT * FROM t2;
-a b
-5 Original from table t2
-6 Original from table t2
-7 Original from table t2
-8 Original from table t2
CREATE TABLE t1 (a INT, b VARCHAR(64)) PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (10),
PARTITION p1 VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
-# State before failure
+# d,exchange_partition_fail_4: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1387,9 +1375,21 @@ a b
24 Original from partition p1
3 Original from partition p0
4 Original from partition p0
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Error in DDL log
-# State after failure
+# d,exchange_partition_fail_4: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1441,23 +1441,11 @@ SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_5";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
-SHOW CREATE TABLE t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
-SELECT * FROM t2;
-a b
-5 Original from table t2
-6 Original from table t2
-7 Original from table t2
-8 Original from table t2
CREATE TABLE t1 (a INT, b VARCHAR(64)) PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (10),
PARTITION p1 VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
-# State before failure
+# d,exchange_partition_fail_5: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1491,9 +1479,21 @@ a b
24 Original from partition p1
3 Original from partition p0
4 Original from partition p0
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Error on rename of './test/t1#P#p0' to './test/t2' (errno: 0 "Internal error/check (Not system error)")
-# State after failure
+# d,exchange_partition_fail_5: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1545,23 +1545,11 @@ SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_6";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
-SHOW CREATE TABLE t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
-SELECT * FROM t2;
-a b
-5 Original from table t2
-6 Original from table t2
-7 Original from table t2
-8 Original from table t2
CREATE TABLE t1 (a INT, b VARCHAR(64)) PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (10),
PARTITION p1 VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
-# State before failure
+# d,exchange_partition_fail_6: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1595,9 +1583,21 @@ a b
24 Original from partition p1
3 Original from partition p0
4 Original from partition p0
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Error in DDL log
-# State after failure
+# d,exchange_partition_fail_6: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1649,23 +1649,11 @@ SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_7";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
-SHOW CREATE TABLE t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
-SELECT * FROM t2;
-a b
-5 Original from table t2
-6 Original from table t2
-7 Original from table t2
-8 Original from table t2
CREATE TABLE t1 (a INT, b VARCHAR(64)) PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (10),
PARTITION p1 VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
-# State before failure
+# d,exchange_partition_fail_7: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1699,9 +1687,21 @@ a b
24 Original from partition p1
3 Original from partition p0
4 Original from partition p0
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Error on rename of './test/#sql-exchange' to './test/t1#P#p0' (errno: 0 "Internal error/check (Not system error)")
-# State after failure
+# d,exchange_partition_fail_7: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1753,23 +1753,11 @@ SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_8";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
-SHOW CREATE TABLE t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
-SELECT * FROM t2;
-a b
-5 Original from table t2
-6 Original from table t2
-7 Original from table t2
-8 Original from table t2
CREATE TABLE t1 (a INT, b VARCHAR(64)) PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (10),
PARTITION p1 VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
-# State before failure
+# d,exchange_partition_fail_8: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1803,9 +1791,21 @@ a b
24 Original from partition p1
3 Original from partition p0
4 Original from partition p0
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Error in DDL log
-# State after failure
+# d,exchange_partition_fail_8: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1857,23 +1857,11 @@ SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_9";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
-SHOW CREATE TABLE t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
-SELECT * FROM t2;
-a b
-5 Original from table t2
-6 Original from table t2
-7 Original from table t2
-8 Original from table t2
CREATE TABLE t1 (a INT, b VARCHAR(64)) PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (10),
PARTITION p1 VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
-# State before failure
+# d,exchange_partition_fail_9: BEFORE failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1907,9 +1895,21 @@ a b
24 Original from partition p1
3 Original from partition p0
4 Original from partition p0
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Error in DDL log
-# State after failure
+# d,exchange_partition_fail_9: AFTER failure
db.opt
t1#P#p0.MYD
t1#P#p0.MYI
@@ -1958,3 +1958,3229 @@ a b
4 Original from partition p0
DROP TABLE t2;
SET SESSION debug_dbug=@save_dbug;
+#
+# MDEV-22165 CONVERT PARTITION: move in partition from existing table
+#
+set @save_dbug=@@debug_dbug;
+set session debug_dbug="+d,fail_convert_partition_1";
+create or replace table t2 (x int primary key);
+insert into t2 values (32), (42), (52);
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30));
+insert into t1 values (2), (12), (22);
+# d,fail_convert_partition_1: BEFORE failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1.frm
+t1.par
+t2.MYD
+t2.MYI
+t2.frm
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+x
+32
+42
+52
+alter table t1 convert table t2 to partition pn values less than maxvalue;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_1: AFTER failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1.frm
+t1.par
+t2.MYD
+t2.MYI
+t2.frm
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+x
+32
+42
+52
+DROP TABLE t2;
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_2";
+create or replace table t2 (x int primary key);
+insert into t2 values (32), (42), (52);
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30));
+insert into t1 values (2), (12), (22);
+# d,fail_convert_partition_2: BEFORE failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1.frm
+t1.par
+t2.MYD
+t2.MYI
+t2.frm
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+x
+32
+42
+52
+alter table t1 convert table t2 to partition pn values less than maxvalue;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_2: AFTER failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1.frm
+t1.par
+t2.MYD
+t2.MYI
+t2.frm
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+x
+32
+42
+52
+DROP TABLE t2;
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_3";
+create or replace table t2 (x int primary key);
+insert into t2 values (32), (42), (52);
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30));
+insert into t1 values (2), (12), (22);
+# d,fail_convert_partition_3: BEFORE failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1.frm
+t1.par
+t2.MYD
+t2.MYI
+t2.frm
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+x
+32
+42
+52
+alter table t1 convert table t2 to partition pn values less than maxvalue;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_3: AFTER failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1.frm
+t1.par
+t2.MYD
+t2.MYI
+t2.frm
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+x
+32
+42
+52
+DROP TABLE t2;
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_4";
+create or replace table t2 (x int primary key);
+insert into t2 values (32), (42), (52);
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30));
+insert into t1 values (2), (12), (22);
+# d,fail_convert_partition_4: BEFORE failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1.frm
+t1.par
+t2.MYD
+t2.MYI
+t2.frm
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+x
+32
+42
+52
+alter table t1 convert table t2 to partition pn values less than maxvalue;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_4: AFTER failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1.frm
+t1.par
+t2.MYD
+t2.MYI
+t2.frm
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+x
+32
+42
+52
+DROP TABLE t2;
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_5";
+create or replace table t2 (x int primary key);
+insert into t2 values (32), (42), (52);
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30));
+insert into t1 values (2), (12), (22);
+# d,fail_convert_partition_5: BEFORE failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1.frm
+t1.par
+t2.MYD
+t2.MYI
+t2.frm
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+x
+32
+42
+52
+alter table t1 convert table t2 to partition pn values less than maxvalue;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_5: AFTER failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1.frm
+t1.par
+t2.MYD
+t2.MYI
+t2.frm
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+x
+32
+42
+52
+DROP TABLE t2;
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_6";
+create or replace table t2 (x int primary key);
+insert into t2 values (32), (42), (52);
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30));
+insert into t1 values (2), (12), (22);
+# d,fail_convert_partition_6: BEFORE failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1.frm
+t1.par
+t2.MYD
+t2.MYI
+t2.frm
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+x
+32
+42
+52
+alter table t1 convert table t2 to partition pn values less than maxvalue;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_6: AFTER failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1.frm
+t1.par
+t2.MYD
+t2.MYI
+t2.frm
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+x
+32
+42
+52
+DROP TABLE t2;
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_7";
+create or replace table t2 (x int primary key);
+insert into t2 values (32), (42), (52);
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30));
+insert into t1 values (2), (12), (22);
+# d,fail_convert_partition_7: BEFORE failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1.frm
+t1.par
+t2.MYD
+t2.MYI
+t2.frm
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+x
+32
+42
+52
+alter table t1 convert table t2 to partition pn values less than maxvalue;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_7: AFTER failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1.frm
+t1.par
+t2.MYD
+t2.MYI
+t2.frm
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+x
+32
+42
+52
+DROP TABLE t2;
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_8";
+create or replace table t2 (x int primary key);
+insert into t2 values (32), (42), (52);
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30));
+insert into t1 values (2), (12), (22);
+# d,fail_convert_partition_8: BEFORE failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1.frm
+t1.par
+t2.MYD
+t2.MYI
+t2.frm
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+x
+32
+42
+52
+alter table t1 convert table t2 to partition pn values less than maxvalue;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_8: AFTER failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1.frm
+t1.par
+t2.MYD
+t2.MYI
+t2.frm
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+x
+32
+42
+52
+DROP TABLE t2;
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_9";
+create or replace table t2 (x int primary key);
+insert into t2 values (32), (42), (52);
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30));
+insert into t1 values (2), (12), (22);
+# d,fail_convert_partition_9: BEFORE failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1.frm
+t1.par
+t2.MYD
+t2.MYI
+t2.frm
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+x
+32
+42
+52
+alter table t1 convert table t2 to partition pn values less than maxvalue;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_9: AFTER failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1.frm
+t1.par
+t2.MYD
+t2.MYI
+t2.frm
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+x
+32
+42
+52
+DROP TABLE t2;
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_11";
+create or replace table t2 (x int primary key);
+insert into t2 values (32), (42), (52);
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30));
+insert into t1 values (2), (12), (22);
+# d,fail_convert_partition_11: BEFORE failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1.frm
+t1.par
+t2.MYD
+t2.MYI
+t2.frm
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+x
+32
+42
+52
+alter table t1 convert table t2 to partition pn values less than maxvalue;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_11: AFTER failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+SELECT * FROM t2;
+DROP TABLE t2;
+set session debug_dbug=@save_dbug;
+#
+# MDEV-22166 CONVERT PARTITION: move out partition into a table
+#
+set @save_dbug=@@debug_dbug;
+set session debug_dbug="+d,fail_create_before_create_frm";
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,fail_create_before_create_frm: BEFORE failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Unknown error
+# d,fail_create_before_create_frm: AFTER failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+DROP TABLE t1;
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,fail_create_before_create_frm: BEFORE failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+LOCK TABLE t1 WRITE;
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Unknown error
+# d,fail_create_before_create_frm: AFTER failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+UNLOCK TABLES;
+DROP TABLE t1;
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_alter_partition_after_write_frm";
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,fail_alter_partition_after_write_frm: BEFORE failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Unknown error
+# d,fail_alter_partition_after_write_frm: AFTER failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+DROP TABLE t1;
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,fail_alter_partition_after_write_frm: BEFORE failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+LOCK TABLE t1 WRITE;
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Unknown error
+# d,fail_alter_partition_after_write_frm: AFTER failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+UNLOCK TABLES;
+DROP TABLE t1;
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,error_convert_partition_00";
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,error_convert_partition_00: BEFORE failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Error on rename of './test/t1#P#p2' to './test/tp2' (errno: 137 "No more records (read after end of file)")
+# d,error_convert_partition_00: AFTER failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+DROP TABLE t1;
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,error_convert_partition_00: BEFORE failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+LOCK TABLE t1 WRITE;
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Error on rename of './test/t1#P#p2' to './test/tp2' (errno: 137 "No more records (read after end of file)")
+# d,error_convert_partition_00: AFTER failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+UNLOCK TABLES;
+DROP TABLE t1;
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_1";
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,fail_convert_partition_1: BEFORE failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_1: AFTER failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+DROP TABLE t1;
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,fail_convert_partition_1: BEFORE failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+LOCK TABLE t1 WRITE;
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_1: AFTER failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+UNLOCK TABLES;
+DROP TABLE t1;
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_2";
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,fail_convert_partition_2: BEFORE failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_2: AFTER failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+DROP TABLE t1;
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,fail_convert_partition_2: BEFORE failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+LOCK TABLE t1 WRITE;
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_2: AFTER failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+UNLOCK TABLES;
+DROP TABLE t1;
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_3";
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,fail_convert_partition_3: BEFORE failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_3: AFTER failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+DROP TABLE t1;
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,fail_convert_partition_3: BEFORE failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+LOCK TABLE t1 WRITE;
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_3: AFTER failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+UNLOCK TABLES;
+DROP TABLE t1;
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_4";
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,fail_convert_partition_4: BEFORE failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_4: AFTER failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+DROP TABLE t1;
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,fail_convert_partition_4: BEFORE failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+LOCK TABLE t1 WRITE;
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_4: AFTER failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+UNLOCK TABLES;
+DROP TABLE t1;
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_5";
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,fail_convert_partition_5: BEFORE failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_5: AFTER failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+DROP TABLE t1;
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,fail_convert_partition_5: BEFORE failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+LOCK TABLE t1 WRITE;
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_5: AFTER failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+UNLOCK TABLES;
+DROP TABLE t1;
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_6";
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,fail_convert_partition_6: BEFORE failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_6: AFTER failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+DROP TABLE t1;
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,fail_convert_partition_6: BEFORE failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+LOCK TABLE t1 WRITE;
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_6: AFTER failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+UNLOCK TABLES;
+DROP TABLE t1;
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_7";
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,fail_convert_partition_7: BEFORE failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_7: AFTER failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+DROP TABLE t1;
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,fail_convert_partition_7: BEFORE failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+LOCK TABLE t1 WRITE;
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_7: AFTER failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+UNLOCK TABLES;
+DROP TABLE t1;
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_8";
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,fail_convert_partition_8: BEFORE failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_8: AFTER failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+DROP TABLE t1;
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,fail_convert_partition_8: BEFORE failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+LOCK TABLE t1 WRITE;
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_8: AFTER failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+UNLOCK TABLES;
+DROP TABLE t1;
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_9";
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,fail_convert_partition_9: BEFORE failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_9: AFTER failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+DROP TABLE t1;
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,fail_convert_partition_9: BEFORE failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+LOCK TABLE t1 WRITE;
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_9: AFTER failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+UNLOCK TABLES;
+DROP TABLE t1;
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_11";
+# Already finished DDL logging, so tp2 now exists:
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,fail_convert_partition_11: BEFORE failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Unknown error
+# d,fail_convert_partition_11: AFTER failure
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+tp2.MYD
+tp2.MYI
+tp2.frm
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+2
+22
+32
+42
+52
+DROP TABLE t1;
+create or replace table t1 (x int primary key)
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+# d,fail_convert_partition_11: BEFORE failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+tp2.MYD
+tp2.MYI
+tp2.frm
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+LOCK TABLE t1 WRITE;
+alter table t1 convert partition p2 to table tp2;
+ERROR 42S01: Table 'tp2' already exists
+# d,fail_convert_partition_11: AFTER failure (under LOCK TABLE)
+db.opt
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1#P#p2.MYD
+t1#P#p2.MYI
+t1#P#p3.MYD
+t1#P#p3.MYI
+t1#P#p4.MYD
+t1#P#p4.MYI
+t1#P#p5.MYD
+t1#P#p5.MYI
+t1#P#pn.MYD
+t1#P#pn.MYI
+t1.frm
+t1.par
+tp2.MYD
+tp2.MYI
+tp2.frm
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = MyISAM,
+ PARTITION `p2` VALUES LESS THAN (20) ENGINE = MyISAM,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = MyISAM,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = MyISAM,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = MyISAM,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = MyISAM)
+SELECT * FROM t1;
+x
+12
+2
+22
+32
+42
+52
+UNLOCK TABLES;
+DROP TABLE t1;
+set session debug_dbug=@save_dbug;
+show create table tp2;
+Table Create Table
+tp2 CREATE TABLE `tp2` (
+ `x` int(11) NOT NULL,
+ PRIMARY KEY (`x`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+select * from tp2;
+x
+12
+drop table tp2;
diff --git a/mysql-test/suite/parts/r/partition_debug_innodb.result b/mysql-test/suite/parts/r/partition_debug_innodb.result
index d4ced5e6d6a..4d4538c168e 100644
--- a/mysql-test/suite/parts/r/partition_debug_innodb.result
+++ b/mysql-test/suite/parts/r/partition_debug_innodb.result
@@ -961,25 +961,13 @@ SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_1";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
-SHOW CREATE TABLE t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
-SELECT * FROM t2;
-a b
-5 Original from table t2
-6 Original from table t2
-7 Original from table t2
-8 Original from table t2
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = InnoDB
PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (10),
PARTITION p1 VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
-# State before failure
+# d,exchange_partition_fail_1: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p1.ibd
@@ -1010,9 +998,21 @@ a b
24 Original from partition p1
3 Original from partition p0
4 Original from partition p0
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Error in DDL log
-# State after failure
+# d,exchange_partition_fail_1: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p1.ibd
@@ -1061,25 +1061,13 @@ SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_2";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
-SHOW CREATE TABLE t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
-SELECT * FROM t2;
-a b
-5 Original from table t2
-6 Original from table t2
-7 Original from table t2
-8 Original from table t2
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = InnoDB
PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (10),
PARTITION p1 VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
-# State before failure
+# d,exchange_partition_fail_2: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p1.ibd
@@ -1110,9 +1098,21 @@ a b
24 Original from partition p1
3 Original from partition p0
4 Original from partition p0
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Error in DDL log
-# State after failure
+# d,exchange_partition_fail_2: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p1.ibd
@@ -1161,25 +1161,13 @@ SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_3";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
-SHOW CREATE TABLE t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
-SELECT * FROM t2;
-a b
-5 Original from table t2
-6 Original from table t2
-7 Original from table t2
-8 Original from table t2
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = InnoDB
PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (10),
PARTITION p1 VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
-# State before failure
+# d,exchange_partition_fail_3: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p1.ibd
@@ -1210,9 +1198,21 @@ a b
24 Original from partition p1
3 Original from partition p0
4 Original from partition p0
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Error on rename of './test/t2' to './test/#sql-exchange' (errno: 0 "Internal error/check (Not system error)")
-# State after failure
+# d,exchange_partition_fail_3: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p1.ibd
@@ -1261,25 +1261,13 @@ SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_4";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
-SHOW CREATE TABLE t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
-SELECT * FROM t2;
-a b
-5 Original from table t2
-6 Original from table t2
-7 Original from table t2
-8 Original from table t2
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = InnoDB
PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (10),
PARTITION p1 VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
-# State before failure
+# d,exchange_partition_fail_4: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p1.ibd
@@ -1310,9 +1298,21 @@ a b
24 Original from partition p1
3 Original from partition p0
4 Original from partition p0
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Error in DDL log
-# State after failure
+# d,exchange_partition_fail_4: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p1.ibd
@@ -1361,25 +1361,13 @@ SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_5";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
-SHOW CREATE TABLE t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
-SELECT * FROM t2;
-a b
-5 Original from table t2
-6 Original from table t2
-7 Original from table t2
-8 Original from table t2
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = InnoDB
PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (10),
PARTITION p1 VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
-# State before failure
+# d,exchange_partition_fail_5: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p1.ibd
@@ -1410,9 +1398,21 @@ a b
24 Original from partition p1
3 Original from partition p0
4 Original from partition p0
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Error on rename of './test/t1#P#p0' to './test/t2' (errno: 0 "Internal error/check (Not system error)")
-# State after failure
+# d,exchange_partition_fail_5: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p1.ibd
@@ -1461,25 +1461,13 @@ SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_6";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
-SHOW CREATE TABLE t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
-SELECT * FROM t2;
-a b
-5 Original from table t2
-6 Original from table t2
-7 Original from table t2
-8 Original from table t2
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = InnoDB
PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (10),
PARTITION p1 VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
-# State before failure
+# d,exchange_partition_fail_6: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p1.ibd
@@ -1510,9 +1498,21 @@ a b
24 Original from partition p1
3 Original from partition p0
4 Original from partition p0
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Error in DDL log
-# State after failure
+# d,exchange_partition_fail_6: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p1.ibd
@@ -1561,25 +1561,13 @@ SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_7";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
-SHOW CREATE TABLE t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
-SELECT * FROM t2;
-a b
-5 Original from table t2
-6 Original from table t2
-7 Original from table t2
-8 Original from table t2
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = InnoDB
PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (10),
PARTITION p1 VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
-# State before failure
+# d,exchange_partition_fail_7: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p1.ibd
@@ -1610,9 +1598,21 @@ a b
24 Original from partition p1
3 Original from partition p0
4 Original from partition p0
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Error on rename of './test/#sql-exchange' to './test/t1#P#p0' (errno: 0 "Internal error/check (Not system error)")
-# State after failure
+# d,exchange_partition_fail_7: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p1.ibd
@@ -1661,25 +1661,13 @@ SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_8";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
-SHOW CREATE TABLE t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
-SELECT * FROM t2;
-a b
-5 Original from table t2
-6 Original from table t2
-7 Original from table t2
-8 Original from table t2
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = InnoDB
PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (10),
PARTITION p1 VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
-# State before failure
+# d,exchange_partition_fail_8: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p1.ibd
@@ -1710,9 +1698,21 @@ a b
24 Original from partition p1
3 Original from partition p0
4 Original from partition p0
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Error in DDL log
-# State after failure
+# d,exchange_partition_fail_8: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p1.ibd
@@ -1761,25 +1761,13 @@ SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_9";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
-SHOW CREATE TABLE t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `a` int(11) DEFAULT NULL,
- `b` varchar(64) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
-SELECT * FROM t2;
-a b
-5 Original from table t2
-6 Original from table t2
-7 Original from table t2
-8 Original from table t2
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = InnoDB
PARTITION BY RANGE (a)
(PARTITION p0 VALUES LESS THAN (10),
PARTITION p1 VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
-# State before failure
+# d,exchange_partition_fail_9: BEFORE failure
db.opt
t1#P#p0.ibd
t1#P#p1.ibd
@@ -1810,9 +1798,21 @@ a b
24 Original from partition p1
3 Original from partition p0
4 Original from partition p0
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
ERROR HY000: Error in DDL log
-# State after failure
+# d,exchange_partition_fail_9: AFTER failure
db.opt
t1#P#p0.ibd
t1#P#p1.ibd
diff --git a/mysql-test/suite/parts/t/alter_table.combinations b/mysql-test/suite/parts/t/alter_table.combinations
new file mode 100644
index 00000000000..d4feae10f19
--- /dev/null
+++ b/mysql-test/suite/parts/t/alter_table.combinations
@@ -0,0 +1,2 @@
+[range]
+[list]
diff --git a/mysql-test/suite/parts/t/alter_table.test b/mysql-test/suite/parts/t/alter_table.test
index 53b61806acb..741a9450c8e 100644
--- a/mysql-test/suite/parts/t/alter_table.test
+++ b/mysql-test/suite/parts/t/alter_table.test
@@ -1,9 +1,8 @@
-#
-# General errors with ALTER TABLE and partitions that doesn't have to be run
-# on all engines
-#
-
+# Permissions don't work with embedded
+--source include/not_embedded.inc
--source include/have_partition.inc
+--source include/lcase_names.inc
+--source suite/parts/inc/engines.inc
#
# MDEV-22649 SIGSEGV in ha_partition::create_partitioning_metadata on ALTER
@@ -38,3 +37,267 @@ CREATE TABLE t2 (i INT);
ALTER TABLE v1 EXCHANGE PARTITION p2 WITH TABLE t2 ;
DROP VIEW v1;
DROP TABLE t1, t2;
+
+--echo #
+--echo # MDEV-22165 CONVERT PARTITION: move in partition from existing table
+--echo #
+create or replace table tp1 (a int);
+create or replace table t1 (a int)
+partition by hash (a) partitions 2;
+--error ER_ONLY_ON_RANGE_LIST_PARTITION
+alter table t1 convert table tp1 to partition p2;
+
+create or replace table t1 (a int)
+partition by range (a)
+(partition p0 values less than (0));
+
+--error ER_NO_SUCH_TABLE
+alter table t1 convert table non_existent to partition p1 values less than (10);
+alter table t1 convert table tp1 to partition p1 values less than (10);
+--error ER_NO_SUCH_TABLE
+show create table tp1;
+--replace_result $engine X ' PAGE_CHECKSUM=1' ''
+show create table t1;
+
+create table tp2 (x int);
+--error ER_TABLES_DIFFERENT_METADATA
+alter table t1 convert table tp2 to partition p2 values less than (20);
+--replace_result $engine X ' PAGE_CHECKSUM=1' ''
+show create table tp2;
+--replace_result $engine X ' PAGE_CHECKSUM=1' ''
+show create table t1;
+
+create or replace table tp2 (a int);
+insert tp2 values (1), (15), (17);
+--error ER_ROW_DOES_NOT_MATCH_PARTITION
+alter table t1 convert table tp2 to partition p2 values less than (20);
+delete from tp2;
+insert tp2 values (15), (1), (17);
+--error ER_ROW_DOES_NOT_MATCH_PARTITION
+alter table t1 convert table tp2 to partition p2 values less than (20);
+delete from tp2;
+insert tp2 values (15), (17), (1);
+--error ER_ROW_DOES_NOT_MATCH_PARTITION
+alter table t1 convert table tp2 to partition p2 values less than (20);
+delete from tp2;
+insert tp2 values (15), (17);
+alter table t1 convert table tp2 to partition p2 values less than (20);
+--error ER_NO_SUCH_TABLE
+show create table tp2;
+--replace_result $engine X ' PAGE_CHECKSUM=1' ''
+show create table t1;
+select * from t1 partition (p2);
+
+create or replace table t1 (a int)
+partition by range (a) (
+p0 values less than (0),
+pn values less than (30));
+insert into t1 values (1);
+create or replace table tp1 (a int);
+insert into tp1 values (2);
+# TODO: would be good to automatically detect order of partitions,
+# as well as move the data from succeeding partitions (ADD PARTITION FR).
+--error ER_RANGE_NOT_INCREASING_ERROR
+alter table t1 convert table tp1 to partition p1 values less than (10);
+
+drop tables t1, tp1;
+
+
+--echo #
+--echo # MDEV-22166 CONVERT PARTITION: move out partition into a table
+--echo #
+
+create or replace table t1 (x int);
+--error ER_PARTITION_MGMT_ON_NONPARTITIONED
+alter table t1 convert partition p1 to table tp1;
+
+create or replace table t1 (x int)
+partition by hash(x) partitions 2;
+--error ER_ONLY_ON_RANGE_LIST_PARTITION
+alter table t1 convert partition p1 to table tp1;
+
+create or replace table t1 (x int)
+partition by key(x) partitions 2;
+--error ER_ONLY_ON_RANGE_LIST_PARTITION
+alter table t1 convert partition p1 to table tp1;
+
+create or replace table t1 (x int)
+partition by range(x)
+subpartition by hash(x) subpartitions 3 (
+ partition p1 values less than (10),
+ partition pn values less than maxvalue);
+--error ER_PARTITION_CONVERT_SUBPARTITIONED
+alter table t1 convert partition p1 to table p1;
+--error ER_PARTITION_DOES_NOT_EXIST
+alter table t1 convert partition p1sp0 to table p1;
+
+create or replace table t1 (x int)
+partition by range(x) (
+ partition p1 values less than (10));
+--error ER_DROP_LAST_PARTITION
+alter table t1 convert partition p1 to table tp1;
+
+--error ER_FEATURE_NOT_SUPPORTED_WITH_PARTITIONING
+create or replace temporary table t1 (x int)
+partition by range(x) (
+ partition p0 values less than (10),
+ partition pn values less than maxvalue);
+
+if ($MTR_COMBINATION_RANGE)
+{
+ create or replace table t1 (x int)
+ partition by range(x) (
+ partition p1 values less than (10),
+ partition p2 values less than (20),
+ partition p3 values less than (30),
+ partition p4 values less than (40),
+ partition p5 values less than (50),
+ partition pn values less than maxvalue);
+}
+
+if ($MTR_COMBINATION_LIST)
+{
+ create or replace table t1 (x int)
+ partition by list(x) (
+ partition p1 values in (2, 3, 4),
+ partition p2 values in (12, 13, 14),
+ partition p3 values in (22, 23, 24),
+ partition p4 values in (32, 33, 34),
+ partition p5 values in (42, 43, 44),
+ partition pn values in (52, 53, 54));
+}
+
+insert into t1 values (2), (12), (22), (32), (42), (52);
+
+create or replace table tp2 (y int);
+insert tp2 values (88);
+# Multiple ALTER PARTITION statements are not possible
+--error ER_PARSE_ERROR
+alter table t1 convert partition p2 to table tp2, drop partition p3;
+# TODO: probably no need in such specific codes, should be ER_PARTITION_NON_EXISTENT
+--error ER_PARTITION_DOES_NOT_EXIST
+alter table t1 convert partition p00 to table tp00;
+# Better error here is ER_PARTITION_DOES_NOT_EXIST,
+# but mysql_alter_table() works checks new table before anything else.
+# So, looks like no big reason to change anything here.
+--error ER_TABLE_EXISTS_ERROR
+alter table t1 convert partition p00 to table tp2;
+--error ER_TABLE_EXISTS_ERROR
+alter table t1 convert partition p2 to table tp2;
+--delimiter $
+--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
+create trigger tr1 before update on t1 for each row
+begin
+ alter table t1 convert partition p2 to table tp2;
+end$
+--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
+create function f1() returns int
+begin
+ alter table t1 convert partition p2 to table tp2;
+end$
+--delimiter ;
+select * from tp2;
+drop table tp2;
+alter table t1 convert partition p2 to table tp2;
+
+--replace_result $engine X ' PAGE_CHECKSUM=1' ''
+show create table tp2;
+select * from tp2;
+--replace_result $engine X ' PAGE_CHECKSUM=1' ''
+show create table t1;
+select * from t1 order by x;
+
+--error ER_BAD_DB_ERROR
+alter table t1 convert partition p3 to table inexistent.tp3;
+create database EXISTENT;
+alter table t1 convert partition p3 to table EXISTENT.TP3;
+
+# The only way to put `` into var...
+--let $tp3=`select '`TP3`'`
+if ($MTR_COMBINATION_LCASE1)
+{
+ --let $tp3= `select '`tp3`'`
+}
+--replace_result $engine X ' PAGE_CHECKSUM=1' '' $tp3 `TP3`-ok
+show create table EXISTENT.TP3;
+select * from EXISTENT.TP3 order by x;
+--replace_result $engine X ' PAGE_CHECKSUM=1' ''
+show create table t1;
+select * from t1 order by x;
+
+--echo # LOCK TABLES
+lock tables t1 write;
+alter table t1 convert partition p4 to table tp4;
+# TODO: lock table tp4 in ALTER TABLE, otherwise there is no
+# guarantee in data consistency between t1 and tp4
+--error ER_TABLE_NOT_LOCKED
+show create table tp4;
+
+unlock tables;
+--replace_result $engine X ' PAGE_CHECKSUM=1' ''
+show create table tp4;
+select * from tp4;
+--replace_result $engine X ' PAGE_CHECKSUM=1' ''
+show create table t1;
+select * from t1 order by x;
+
+--echo # PS
+prepare stmt from 'alter table t1 convert partition p5 to table tp5';
+execute stmt;
+--replace_result $engine X ' PAGE_CHECKSUM=1' ''
+show create table tp5;
+select * from tp5;
+--replace_result $engine X ' PAGE_CHECKSUM=1' ''
+show create table t1;
+select * from t1 order by x;
+drop table tp5;
+--error ER_PARTITION_DOES_NOT_EXIST
+execute stmt;
+--error ER_PARTITION_DOES_NOT_EXIST
+execute stmt;
+drop prepare stmt;
+
+--echo # Privileges
+create user alan;
+grant usage on *.* to alan;
+grant create, insert, drop on test.* to alan;
+--connect alan,localhost,alan,,test
+show grants for current_user;
+--error ER_TABLEACCESS_DENIED_ERROR
+alter table t1 convert partition p1 to table tp1;
+--connection default
+revoke all on test.* from alan;
+grant create, insert, alter on test.* to alan;
+--connection alan
+use test;
+show grants for current_user;
+--error ER_TABLEACCESS_DENIED_ERROR
+alter table t1 convert partition p1 to table tp1;
+--connection default
+revoke all on test.* from alan;
+grant create, drop, alter on test.* to alan;
+--connection alan
+use test;
+show grants for current_user;
+--error ER_TABLEACCESS_DENIED_ERROR
+alter table t1 convert partition p1 to table tp1;
+--connection default
+revoke all on test.* from alan;
+grant insert, drop, alter on test.* to alan;
+--connection alan
+use test;
+show grants for current_user;
+--error ER_TABLEACCESS_DENIED_ERROR
+alter table t1 convert partition p1 to table tp1;
+--connection default
+grant create, insert, drop, alter on test.* to alan;
+--connection alan
+use test;
+show grants for current_user;
+alter table t1 convert partition p1 to table tp1;
+--disconnect alan
+--connection default
+
+drop database EXISTENT;
+drop user alan;
+drop tables t1, tp1, tp2, tp4;
diff --git a/mysql-test/suite/parts/t/partition_debug.test b/mysql-test/suite/parts/t/partition_debug.test
index 6d7cf3ae8b3..2f8994705f3 100644
--- a/mysql-test/suite/parts/t/partition_debug.test
+++ b/mysql-test/suite/parts/t/partition_debug.test
@@ -50,3 +50,114 @@ let $crash_statement= ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
--source suite/parts/inc/partition_crash_exchange.inc
let $fail_statement= $crash_statement;
--source suite/parts/inc/partition_fail_exchange.inc
+
+--echo #
+--echo # MDEV-22165 CONVERT PARTITION: move in partition from existing table
+--echo #
+let $create_statement= create or replace table t1 (x int primary key)
+ partition by range(x) (
+ partition p1 values less than (10),
+ partition p2 values less than (20),
+ partition p3 values less than (30));
+
+let $create_statement2= create or replace table t2 (x int primary key);
+let $insert_statement= insert into t1 values (2), (12), (22);
+let $insert_statement2= insert into t2 values (32), (42), (52);
+
+let $fail_statement= alter table t1 convert table t2 to partition pn values less than maxvalue;
+
+set @save_dbug=@@debug_dbug;
+set session debug_dbug="+d,fail_convert_partition_1";
+--source suite/parts/inc/partition_fail_t2.inc
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_2";
+--source suite/parts/inc/partition_fail_t2.inc
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_3";
+--source suite/parts/inc/partition_fail_t2.inc
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_4";
+--source suite/parts/inc/partition_fail_t2.inc
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_5";
+--source suite/parts/inc/partition_fail_t2.inc
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_6";
+--source suite/parts/inc/partition_fail_t2.inc
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_7";
+--source suite/parts/inc/partition_fail_t2.inc
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_8";
+--source suite/parts/inc/partition_fail_t2.inc
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_9";
+--source suite/parts/inc/partition_fail_t2.inc
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_11";
+--source suite/parts/inc/partition_fail_t2.inc
+set session debug_dbug=@save_dbug;
+
+
+--echo #
+--echo # MDEV-22166 CONVERT PARTITION: move out partition into a table
+--echo #
+let $create_statement= create or replace table t1 (x int primary key)
+ partition by range(x) (
+ partition p1 values less than (10),
+ partition p2 values less than (20),
+ partition p3 values less than (30),
+ partition p4 values less than (40),
+ partition p5 values less than (50),
+ partition pn values less than maxvalue);
+
+let $insert_statement= insert into t1 values (2), (12), (22), (32), (42), (52);
+let $fail_statement= alter table t1 convert partition p2 to table tp2;
+
+set @save_dbug=@@debug_dbug;
+set session debug_dbug="+d,fail_create_before_create_frm";
+--source suite/parts/inc/partition_fail.inc
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_alter_partition_after_write_frm";
+--source suite/parts/inc/partition_fail.inc
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,error_convert_partition_00";
+--source suite/parts/inc/partition_fail.inc
+#set session debug_dbug=@save_dbug;
+#set session debug_dbug="+d,fail_convert_partition_01";
+#--source suite/parts/inc/partition_fail.inc
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_1";
+--source suite/parts/inc/partition_fail.inc
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_2";
+--source suite/parts/inc/partition_fail.inc
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_3";
+--source suite/parts/inc/partition_fail.inc
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_4";
+--source suite/parts/inc/partition_fail.inc
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_5";
+--source suite/parts/inc/partition_fail.inc
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_6";
+--source suite/parts/inc/partition_fail.inc
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_7";
+--source suite/parts/inc/partition_fail.inc
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_8";
+--source suite/parts/inc/partition_fail.inc
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_9";
+--source suite/parts/inc/partition_fail.inc
+set session debug_dbug=@save_dbug;
+set session debug_dbug="+d,fail_convert_partition_11";
+--echo # Already finished DDL logging, so tp2 now exists:
+--source suite/parts/inc/partition_fail.inc
+set session debug_dbug=@save_dbug;
+show create table tp2;
+select * from tp2;
+drop table tp2;
diff --git a/mysql-test/suite/perfschema/r/digest_view.result b/mysql-test/suite/perfschema/r/digest_view.result
index d3988f99727..a5996cc0083 100644
--- a/mysql-test/suite/perfschema/r/digest_view.result
+++ b/mysql-test/suite/perfschema/r/digest_view.result
@@ -191,17 +191,17 @@ SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR
FROM performance_schema.events_statements_summary_by_digest
ORDER BY DIGEST_TEXT;
SCHEMA_NAME DIGEST DIGEST_TEXT COUNT_STAR
-test 3bcc75e0f4658692e16837ead0c455ca EXPLAIN SELECT * FROM `test` . `v1` 1
-test cc55af8221ef0bc8873e75cc704489ba EXPLAIN SELECT * FROM `test` . `v1` WHERE `a` = ? 1
-test bc0498551a492bd7c0ca92906bf86fb4 EXPLAIN SELECT * FROM `test` . `v1` WHERE `b` > ? 1
-test 76923336b6f4ffffd0d5854761ae1aec EXPLAIN SELECT `a` , `b` FROM `test` . `v1` 1
-test a65d479062ffbfe374b4cd823016a260 EXPLAIN SELECT `b` , `a` FROM `test` . `v1` 1
-test d44b1e50ebfd05accacef4167534ad65 SELECT * FROM `test` . `v1` 1
-test 0608cde507ef8fe35d1f68730e78f1e4 SELECT * FROM `test` . `v1` WHERE `a` = ? 1
-test 5e241fdb866faef138cc81b26203ddff SELECT * FROM `test` . `v1` WHERE `b` > ? 1
-test 74fa770ce44994b3fe7b534d504f2d6d SELECT `a` , `b` FROM `test` . `v1` 1
-test 45ca2a985d179d98395b238cf253bbe2 SELECT `b` , `a` FROM `test` . `v1` 1
-test 1cfa171590aa40ba23e14c92d6940ffc TRUNCATE TABLE `performance_schema` . `events_statements_summary_by_digest` 1
+test 27a9ab161a63050c84a63c6f77ebeb33 EXPLAIN SELECT * FROM `test` . `v1` 1
+test ab0ab27c04f3a294feb86bede4331f86 EXPLAIN SELECT * FROM `test` . `v1` WHERE `a` = ? 1
+test 2e722346a5c2ef820946bcd04ccac208 EXPLAIN SELECT * FROM `test` . `v1` WHERE `b` > ? 1
+test 07baf2264db30b6b25302603436ebe82 EXPLAIN SELECT `a` , `b` FROM `test` . `v1` 1
+test 3a7dbc963635ab0de6e160e0a4212bce EXPLAIN SELECT `b` , `a` FROM `test` . `v1` 1
+test 6b845c2e3a7421997e3b610d14b5c842 SELECT * FROM `test` . `v1` 1
+test cb2ee099edbf6e0e5ee6ae14f3b1498a SELECT * FROM `test` . `v1` WHERE `a` = ? 1
+test e2dc5a300d2ba54ebb987a2ca6b90d93 SELECT * FROM `test` . `v1` WHERE `b` > ? 1
+test c68e0f99323f7bb7732c7b5cf32c0ec2 SELECT `a` , `b` FROM `test` . `v1` 1
+test 43c5de955c9a72d2bb6f49db5c0ad3e7 SELECT `b` , `a` FROM `test` . `v1` 1
+test 1678258ba15f7ccc63fd7b833763914a TRUNCATE TABLE `performance_schema` . `events_statements_summary_by_digest` 1
DROP TABLE test.v1;
CREATE VIEW test.v1 AS SELECT * FROM test.t1;
EXPLAIN SELECT * from test.v1;
@@ -248,19 +248,19 @@ SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR
FROM performance_schema.events_statements_summary_by_digest
ORDER BY DIGEST_TEXT;
SCHEMA_NAME DIGEST DIGEST_TEXT COUNT_STAR
-test 630a0b16be33fcf549f4f467de557940 CREATE VIEW `test` . `v1` AS SELECT * FROM `test` . `t1` 1
-test efa438aa8b4ddbf4c19f9e4b345781b5 DROP TABLE `test` . `v1` 1
-test 3bcc75e0f4658692e16837ead0c455ca EXPLAIN SELECT * FROM `test` . `v1` 2
-test cc55af8221ef0bc8873e75cc704489ba EXPLAIN SELECT * FROM `test` . `v1` WHERE `a` = ? 2
-test bc0498551a492bd7c0ca92906bf86fb4 EXPLAIN SELECT * FROM `test` . `v1` WHERE `b` > ? 2
-test 76923336b6f4ffffd0d5854761ae1aec EXPLAIN SELECT `a` , `b` FROM `test` . `v1` 2
-test a65d479062ffbfe374b4cd823016a260 EXPLAIN SELECT `b` , `a` FROM `test` . `v1` 2
-test d44b1e50ebfd05accacef4167534ad65 SELECT * FROM `test` . `v1` 2
-test 0608cde507ef8fe35d1f68730e78f1e4 SELECT * FROM `test` . `v1` WHERE `a` = ? 2
-test 5e241fdb866faef138cc81b26203ddff SELECT * FROM `test` . `v1` WHERE `b` > ? 2
-test a3788cc4bc96d260cfb5c3ebdfc65c6d SELECT SCHEMA_NAME , `DIGEST` , `DIGEST_TEXT` , `COUNT_STAR` FROM `performance_schema` . `events_statements_summary_by_digest` ORDER BY `DIGEST_TEXT` 1
-test 74fa770ce44994b3fe7b534d504f2d6d SELECT `a` , `b` FROM `test` . `v1` 2
-test 45ca2a985d179d98395b238cf253bbe2 SELECT `b` , `a` FROM `test` . `v1` 2
-test 1cfa171590aa40ba23e14c92d6940ffc TRUNCATE TABLE `performance_schema` . `events_statements_summary_by_digest` 1
+test 342cd5e41944d5f857f92b1e374857de CREATE VIEW `test` . `v1` AS SELECT * FROM `test` . `t1` 1
+test 2653f30030efcb6125121daa8eadf418 DROP TABLE `test` . `v1` 1
+test 27a9ab161a63050c84a63c6f77ebeb33 EXPLAIN SELECT * FROM `test` . `v1` 2
+test ab0ab27c04f3a294feb86bede4331f86 EXPLAIN SELECT * FROM `test` . `v1` WHERE `a` = ? 2
+test 2e722346a5c2ef820946bcd04ccac208 EXPLAIN SELECT * FROM `test` . `v1` WHERE `b` > ? 2
+test 07baf2264db30b6b25302603436ebe82 EXPLAIN SELECT `a` , `b` FROM `test` . `v1` 2
+test 3a7dbc963635ab0de6e160e0a4212bce EXPLAIN SELECT `b` , `a` FROM `test` . `v1` 2
+test 6b845c2e3a7421997e3b610d14b5c842 SELECT * FROM `test` . `v1` 2
+test cb2ee099edbf6e0e5ee6ae14f3b1498a SELECT * FROM `test` . `v1` WHERE `a` = ? 2
+test e2dc5a300d2ba54ebb987a2ca6b90d93 SELECT * FROM `test` . `v1` WHERE `b` > ? 2
+test a13cfeda6d474d29546719d76dcfa831 SELECT SCHEMA_NAME , `DIGEST` , `DIGEST_TEXT` , `COUNT_STAR` FROM `performance_schema` . `events_statements_summary_by_digest` ORDER BY `DIGEST_TEXT` 1
+test c68e0f99323f7bb7732c7b5cf32c0ec2 SELECT `a` , `b` FROM `test` . `v1` 2
+test 43c5de955c9a72d2bb6f49db5c0ad3e7 SELECT `b` , `a` FROM `test` . `v1` 2
+test 1678258ba15f7ccc63fd7b833763914a TRUNCATE TABLE `performance_schema` . `events_statements_summary_by_digest` 1
DROP VIEW test.v1;
DROP TABLE test.t1;
diff --git a/mysql-test/suite/perfschema/r/max_program_zero.result b/mysql-test/suite/perfschema/r/max_program_zero.result
index 5435efb34ae..f236f149a77 100644
--- a/mysql-test/suite/perfschema/r/max_program_zero.result
+++ b/mysql-test/suite/perfschema/r/max_program_zero.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 1
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/misc.result b/mysql-test/suite/perfschema/r/misc.result
index df9942a170f..2258cbceea4 100644
--- a/mysql-test/suite/perfschema/r/misc.result
+++ b/mysql-test/suite/perfschema/r/misc.result
@@ -174,3 +174,16 @@ select object_type, object_schema, object_name
from performance_schema.objects_summary_global_by_type
where object_schema="test";
object_type object_schema object_name
+#
+# MDEV-28344: sys.ps_setup_save and dependent procedures fail
+# with ER_ILLEGAL_HA_CREATE_OPTION
+#
+CREATE TEMPORARY TABLE t1 (t int) ENGINE = PERFORMANCE_SCHEMA;
+ERROR HY000: Table storage engine 'PERFORMANCE_SCHEMA' does not support the create option 'TEMPORARY'
+CREATE TEMPORARY TABLE t1 LIKE performance_schema.setup_actors;
+ERROR HY000: Table storage engine 'PERFORMANCE_SCHEMA' does not support the create option 'TEMPORARY'
+SET @default_storage_engine_old = @@default_storage_engine;
+SET default_storage_engine = performance_schema;
+CREATE TEMPORARY TABLE t1 (t int);
+ERROR HY000: Table storage engine 'PERFORMANCE_SCHEMA' does not support the create option 'TEMPORARY'
+SET @@default_storage_engine = @default_storage_engine_old;
diff --git a/mysql-test/suite/perfschema/r/ortho_iter.result b/mysql-test/suite/perfschema/r/ortho_iter.result
index 9489c1049e5..4224c3e520d 100644
--- a/mysql-test/suite/perfschema/r/ortho_iter.result
+++ b/mysql-test/suite/perfschema/r/ortho_iter.result
@@ -255,7 +255,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/privilege_table_io.result b/mysql-test/suite/perfschema/r/privilege_table_io.result
index 94cc2b33b49..ab0d18e3227 100644
--- a/mysql-test/suite/perfschema/r/privilege_table_io.result
+++ b/mysql-test/suite/perfschema/r/privilege_table_io.result
@@ -57,7 +57,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_idle.result b/mysql-test/suite/perfschema/r/start_server_disable_idle.result
index bfc49fd3480..fda05bf6df5 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_idle.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_idle.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_stages.result b/mysql-test/suite/perfschema/r/start_server_disable_stages.result
index e9f20398467..7db242f237f 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_stages.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_stages.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_statements.result b/mysql-test/suite/perfschema/r/start_server_disable_statements.result
index ffb45f4f55f..31ddb4eb3cd 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_statements.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_statements.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_transactions.result b/mysql-test/suite/perfschema/r/start_server_disable_transactions.result
index e271d5a10e6..2a2d42f4d51 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_transactions.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_transactions.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_waits.result b/mysql-test/suite/perfschema/r/start_server_disable_waits.result
index 833da22583e..2115c747755 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_waits.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_waits.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_innodb.result b/mysql-test/suite/perfschema/r/start_server_innodb.result
index e3ff0f514a7..25b8a7b9c1f 100644
--- a/mysql-test/suite/perfschema/r/start_server_innodb.result
+++ b/mysql-test/suite/perfschema/r/start_server_innodb.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_low_digest_sql_length.result b/mysql-test/suite/perfschema/r/start_server_low_digest_sql_length.result
index a2d84753331..13b51569b60 100644
--- a/mysql-test/suite/perfschema/r/start_server_low_digest_sql_length.result
+++ b/mysql-test/suite/perfschema/r/start_server_low_digest_sql_length.result
@@ -8,5 +8,5 @@ SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1
####################################
SELECT event_name, digest, digest_text, sql_text FROM events_statements_history_long;
event_name digest digest_text sql_text
-statement/sql/select 70a97f8223477a66e716cfcc317193e2 SELECT ? + ? + SELECT ...
-statement/sql/truncate ac4c7fc23914b333e9f40ce317816b8e TRUNCATE TABLE truncat...
+statement/sql/select 1fd0cdb6b5aa22bd0809a39b2dc2ac70 SELECT ? + ? + SELECT ...
+statement/sql/truncate 0a9c405cebde6df4be315dae86ff398a TRUNCATE TABLE truncat...
diff --git a/mysql-test/suite/perfschema/r/start_server_low_index.result b/mysql-test/suite/perfschema/r/start_server_low_index.result
index ffdf9d65b87..b34f86da89f 100644
--- a/mysql-test/suite/perfschema/r/start_server_low_index.result
+++ b/mysql-test/suite/perfschema/r/start_server_low_index.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_low_table_lock.result b/mysql-test/suite/perfschema/r/start_server_low_table_lock.result
index dbb404f6129..e8bf9f48da8 100644
--- a/mysql-test/suite/perfschema/r/start_server_low_table_lock.result
+++ b/mysql-test/suite/perfschema/r/start_server_low_table_lock.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_account.result b/mysql-test/suite/perfschema/r/start_server_no_account.result
index f92b0e6bec6..021ff9f9e3d 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_account.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_account.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_cond_class.result b/mysql-test/suite/perfschema/r/start_server_no_cond_class.result
index fefad55c209..0a7f1c601ef 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_cond_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_cond_class.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result b/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
index 0c2f65f6ac9..de4ff2f5a72 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_file_class.result b/mysql-test/suite/perfschema/r/start_server_no_file_class.result
index c3f06b53425..997220d3169 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_file_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_file_class.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_file_inst.result b/mysql-test/suite/perfschema/r/start_server_no_file_inst.result
index fd39807d567..de81943afe8 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_file_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_file_inst.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_host.result b/mysql-test/suite/perfschema/r/start_server_no_host.result
index 43111c5ec40..ce156302b22 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_host.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_host.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_index.result b/mysql-test/suite/perfschema/r/start_server_no_index.result
index 15d1184bcbe..d46095841c2 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_index.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_index.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_mdl.result b/mysql-test/suite/perfschema/r/start_server_no_mdl.result
index b8de90453ce..c1f7e656dc6 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_mdl.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_mdl.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_memory_class.result b/mysql-test/suite/perfschema/r/start_server_no_memory_class.result
index 60066264c90..94c8a7da85a 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_memory_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_memory_class.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result b/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
index 3353b46bbcb..e44307fdbe6 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result b/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
index d41da361733..6647def50c1 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result b/mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result
index 4919de6bb6c..9b5ad931858 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result b/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
index 02a119bdc68..fdd3fe48bf3 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result b/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
index ead01ce2d0e..09faadaa4ce 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result b/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
index a99f1c0f9be..2d93be52186 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result b/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
index 7c148889412..e9eff67712f 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_socket_class.result b/mysql-test/suite/perfschema/r/start_server_no_socket_class.result
index dec0680c511..f5b00a114dd 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_socket_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_socket_class.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 0
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result b/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result
index 20adf1a9f64..d1b3e14d349 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 0
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_stage_class.result b/mysql-test/suite/perfschema/r/start_server_no_stage_class.result
index 044f9475041..136c54885bf 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_stage_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_stage_class.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 0
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_stages_history.result b/mysql-test/suite/perfschema/r/start_server_no_stages_history.result
index 350f2c6637d..3e2d7acf4ec 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_stages_history.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_stages_history.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result
index d2d7063c32f..5db6987834b 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_statements_history.result b/mysql-test/suite/perfschema/r/start_server_no_statements_history.result
index 8bcb3c56a00..69a69986a72 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_statements_history.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_statements_history.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result
index 2a2bf5d3f7c..2f68483cfae 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result b/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
index ec6e40acc00..3d131f1a2e0 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 0
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_table_inst.result b/mysql-test/suite/perfschema/r/start_server_no_table_inst.result
index b3f1e4cbcf2..95f8f226c41 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_table_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_table_inst.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 0
diff --git a/mysql-test/suite/perfschema/r/start_server_no_table_lock.result b/mysql-test/suite/perfschema/r/start_server_no_table_lock.result
index baf9f761358..b54d6c762e1 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_table_lock.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_table_lock.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_thread_class.result b/mysql-test/suite/perfschema/r/start_server_no_thread_class.result
index cd204f3d811..9182677d8b8 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_thread_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_thread_class.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result b/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
index d083484cd7c..ff90c471599 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_transactions_history.result b/mysql-test/suite/perfschema/r/start_server_no_transactions_history.result
index f5a12e5473d..4535bcd02ed 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_transactions_history.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_transactions_history.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result
index 76ae9d5fa4e..f3eefb98a43 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_user.result b/mysql-test/suite/perfschema/r/start_server_no_user.result
index 4bd472a22a9..9ca79837845 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_user.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_user.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_waits_history.result b/mysql-test/suite/perfschema/r/start_server_no_waits_history.result
index f59b156ce1e..ee22d5b5bed 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_waits_history.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_waits_history.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result
index cc70572c7ef..adbad8d166f 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_off.result b/mysql-test/suite/perfschema/r/start_server_off.result
index a53d591938c..022f7d1096e 100644
--- a/mysql-test/suite/perfschema/r/start_server_off.result
+++ b/mysql-test/suite/perfschema/r/start_server_off.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_on.result b/mysql-test/suite/perfschema/r/start_server_on.result
index e3ff0f514a7..25b8a7b9c1f 100644
--- a/mysql-test/suite/perfschema/r/start_server_on.result
+++ b/mysql-test/suite/perfschema/r/start_server_on.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/start_server_variables.result b/mysql-test/suite/perfschema/r/start_server_variables.result
index 7d1d1e05375..65d3a7b55b5 100644
--- a/mysql-test/suite/perfschema/r/start_server_variables.result
+++ b/mysql-test/suite/perfschema/r/start_server_variables.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 10
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/r/statement_program_lost_inst.result b/mysql-test/suite/perfschema/r/statement_program_lost_inst.result
index 05ec7b0b2b5..264778c06e4 100644
--- a/mysql-test/suite/perfschema/r/statement_program_lost_inst.result
+++ b/mysql-test/suite/perfschema/r/statement_program_lost_inst.result
@@ -135,7 +135,7 @@ performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_sql_text_length 1024
performance_schema_max_stage_classes 160
-performance_schema_max_statement_classes 222
+performance_schema_max_statement_classes 221
performance_schema_max_statement_stack 2
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
diff --git a/mysql-test/suite/perfschema/t/misc.test b/mysql-test/suite/perfschema/t/misc.test
index 848be3beea1..79c23c65616 100644
--- a/mysql-test/suite/perfschema/t/misc.test
+++ b/mysql-test/suite/perfschema/t/misc.test
@@ -298,3 +298,23 @@ drop tables t1;
select object_type, object_schema, object_name
from performance_schema.objects_summary_global_by_type
where object_schema="test";
+
+--echo #
+--echo # MDEV-28344: sys.ps_setup_save and dependent procedures fail
+--echo # with ER_ILLEGAL_HA_CREATE_OPTION
+--echo #
+
+# It is not allowed to create temporary tables with performance schema
+--error ER_ILLEGAL_HA_CREATE_OPTION
+CREATE TEMPORARY TABLE t1 (t int) ENGINE = PERFORMANCE_SCHEMA;
+
+--error ER_ILLEGAL_HA_CREATE_OPTION
+CREATE TEMPORARY TABLE t1 LIKE performance_schema.setup_actors;
+
+SET @default_storage_engine_old = @@default_storage_engine;
+SET default_storage_engine = performance_schema;
+
+--error ER_ILLEGAL_HA_CREATE_OPTION
+CREATE TEMPORARY TABLE t1 (t int);
+
+SET @@default_storage_engine = @default_storage_engine_old; \ No newline at end of file
diff --git a/mysql-test/suite/plugins/r/auth_ed25519.result b/mysql-test/suite/plugins/r/auth_ed25519.result
index 6769d867167..f5d1ce2497d 100644
--- a/mysql-test/suite/plugins/r/auth_ed25519.result
+++ b/mysql-test/suite/plugins/r/auth_ed25519.result
@@ -27,7 +27,7 @@ PLUGIN_STATUS ACTIVE
PLUGIN_TYPE AUTHENTICATION
PLUGIN_TYPE_VERSION 2.2
PLUGIN_LIBRARY auth_ed25519.so
-PLUGIN_LIBRARY_VERSION 1.14
+PLUGIN_LIBRARY_VERSION 1.15
PLUGIN_AUTHOR Sergei Golubchik
PLUGIN_DESCRIPTION Elliptic curve ED25519 based authentication
PLUGIN_LICENSE GPL
diff --git a/mysql-test/suite/plugins/r/compression,innodb-lz4.rdiff b/mysql-test/suite/plugins/r/compression,innodb-lz4.rdiff
new file mode 100644
index 00000000000..06fdb0bd4f0
--- /dev/null
+++ b/mysql-test/suite/plugins/r/compression,innodb-lz4.rdiff
@@ -0,0 +1,24 @@
+--- suite/plugins/r/compression.result
++++ suite/plugins/r/compression.reject
+@@ -1,8 +1,8 @@
+ #
+-# Testing bzip2 compression provider with innodb
++# Testing lz4 compression provider with innodb
+ #
+ call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded");
+-set global innodb_compression_algorithm = bzip2;
++set global innodb_compression_algorithm = lz4;
+ call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
+ call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
+ call mtr.add_suppression("Table .*t1.* is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
+@@ -15,8 +15,8 @@
+ 0 abcabcabc 300
+ 1 defdefdef 3000
+ 2 ghighighi 30000
+-# restart: --disable-provider-bzip2
++# restart: --disable-provider-lz4
+ select a, left(b, 9), length(b) from t1;
+-ERROR HY000: Table test/t1 is compressed with bzip2, which is not currently loaded. Please load the bzip2 provider plugin to open the table
++ERROR HY000: Table test/t1 is compressed with lz4, which is not currently loaded. Please load the lz4 provider plugin to open the table
+ drop table t1;
+ # restart
diff --git a/mysql-test/suite/plugins/r/compression,innodb-lzma.rdiff b/mysql-test/suite/plugins/r/compression,innodb-lzma.rdiff
new file mode 100644
index 00000000000..ee348934a54
--- /dev/null
+++ b/mysql-test/suite/plugins/r/compression,innodb-lzma.rdiff
@@ -0,0 +1,24 @@
+--- suite/plugins/r/compression.result
++++ suite/plugins/r/compression.reject
+@@ -1,8 +1,8 @@
+ #
+-# Testing bzip2 compression provider with innodb
++# Testing lzma compression provider with innodb
+ #
+ call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded");
+-set global innodb_compression_algorithm = bzip2;
++set global innodb_compression_algorithm = lzma;
+ call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
+ call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
+ call mtr.add_suppression("Table .*t1.* is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
+@@ -15,8 +15,8 @@
+ 0 abcabcabc 300
+ 1 defdefdef 3000
+ 2 ghighighi 30000
+-# restart: --disable-provider-bzip2
++# restart: --disable-provider-lzma
+ select a, left(b, 9), length(b) from t1;
+-ERROR HY000: Table test/t1 is compressed with bzip2, which is not currently loaded. Please load the bzip2 provider plugin to open the table
++ERROR HY000: Table test/t1 is compressed with lzma, which is not currently loaded. Please load the lzma provider plugin to open the table
+ drop table t1;
+ # restart
diff --git a/mysql-test/suite/plugins/r/compression,innodb-lzo.rdiff b/mysql-test/suite/plugins/r/compression,innodb-lzo.rdiff
new file mode 100644
index 00000000000..d7cdc41092a
--- /dev/null
+++ b/mysql-test/suite/plugins/r/compression,innodb-lzo.rdiff
@@ -0,0 +1,24 @@
+--- suite/plugins/r/compression.result
++++ suite/plugins/r/compression.reject
+@@ -1,8 +1,8 @@
+ #
+-# Testing bzip2 compression provider with innodb
++# Testing lzo compression provider with innodb
+ #
+ call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded");
+-set global innodb_compression_algorithm = bzip2;
++set global innodb_compression_algorithm = lzo;
+ call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
+ call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
+ call mtr.add_suppression("Table .*t1.* is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
+@@ -15,8 +15,8 @@
+ 0 abcabcabc 300
+ 1 defdefdef 3000
+ 2 ghighighi 30000
+-# restart: --disable-provider-bzip2
++# restart: --disable-provider-lzo
+ select a, left(b, 9), length(b) from t1;
+-ERROR HY000: Table test/t1 is compressed with bzip2, which is not currently loaded. Please load the bzip2 provider plugin to open the table
++ERROR HY000: Table test/t1 is compressed with lzo, which is not currently loaded. Please load the lzo provider plugin to open the table
+ drop table t1;
+ # restart
diff --git a/mysql-test/suite/plugins/r/compression,innodb-snappy.rdiff b/mysql-test/suite/plugins/r/compression,innodb-snappy.rdiff
new file mode 100644
index 00000000000..e9c7485d118
--- /dev/null
+++ b/mysql-test/suite/plugins/r/compression,innodb-snappy.rdiff
@@ -0,0 +1,24 @@
+--- suite/plugins/r/compression.result
++++ suite/plugins/r/compression.reject
+@@ -1,8 +1,8 @@
+ #
+-# Testing bzip2 compression provider with innodb
++# Testing snappy compression provider with innodb
+ #
+ call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded");
+-set global innodb_compression_algorithm = bzip2;
++set global innodb_compression_algorithm = snappy;
+ call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
+ call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
+ call mtr.add_suppression("Table .*t1.* is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
+@@ -15,8 +15,8 @@
+ 0 abcabcabc 300
+ 1 defdefdef 3000
+ 2 ghighighi 30000
+-# restart: --disable-provider-bzip2
++# restart: --disable-provider-snappy
+ select a, left(b, 9), length(b) from t1;
+-ERROR HY000: Table test/t1 is compressed with bzip2, which is not currently loaded. Please load the bzip2 provider plugin to open the table
++ERROR HY000: Table test/t1 is compressed with snappy, which is not currently loaded. Please load the snappy provider plugin to open the table
+ drop table t1;
+ # restart
diff --git a/mysql-test/suite/plugins/r/compression,mroonga-lz4.rdiff b/mysql-test/suite/plugins/r/compression,mroonga-lz4.rdiff
new file mode 100644
index 00000000000..9b155ff3a1d
--- /dev/null
+++ b/mysql-test/suite/plugins/r/compression,mroonga-lz4.rdiff
@@ -0,0 +1,40 @@
+--- suite/plugins/r/compression.result
++++ suite/plugins/r/compression.reject
+@@ -1,12 +1,8 @@
+ #
+-# Testing bzip2 compression provider with innodb
++# Testing lz4 compression provider with mroonga
+ #
+ call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded");
+-set global innodb_compression_algorithm = bzip2;
+-call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
+-call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
+-call mtr.add_suppression("Table .*t1.* is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
+-create table t1 (a int, b text ) engine = innodb page_compressed = 1;
++create table t1 (a int, b text COMMENT 'FLAGS "COLUMN_SCALAR|COMPRESS_LZ4"') engine = mroonga charset = utf8;
+ insert t1 (a, b) values (0, repeat("abc", 100));
+ insert t1 (a, b) values (1, repeat("def", 1000));
+ insert t1 (a, b) values (2, repeat("ghi", 10000));
+@@ -14,8 +11,20 @@
+ 0 abcabcabc 300
+ 1 defdefdef 3000
+ 2 ghighighi 30000
+-# restart: --disable-provider-bzip2
++# restart: --disable-provider-lz4
+ select a, left(b, 9), length(b) from t1;
+-ERROR HY000: Table test/t1 is compressed with bzip2, which is not currently loaded. Please load the bzip2 provider plugin to open the table
++a left(b, 9) length(b)
++0 0
++1 0
++2 0
++Warnings:
++Warning 4185 MariaDB tried to use the LZ4 compression, but its provider plugin is not loaded
++select a, left(b, 9), length(b) from t1;
++a left(b, 9) length(b)
++0 0
++1 0
++2 0
++Warnings:
++Warning 4185 MariaDB tried to use the LZ4 compression, but its provider plugin is not loaded
+ drop table t1;
+ # restart
diff --git a/mysql-test/suite/plugins/r/compression.result b/mysql-test/suite/plugins/r/compression.result
new file mode 100644
index 00000000000..dd267f282c5
--- /dev/null
+++ b/mysql-test/suite/plugins/r/compression.result
@@ -0,0 +1,22 @@
+#
+# Testing bzip2 compression provider with innodb
+#
+call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded");
+set global innodb_compression_algorithm = bzip2;
+call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
+call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
+call mtr.add_suppression("Table .*t1.* is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
+create table t1 (a int, b text ) engine = innodb page_compressed = 1;
+insert t1 (a, b) values (0, repeat("abc", 100));
+insert t1 (a, b) values (1, repeat("def", 1000));
+insert t1 (a, b) values (2, repeat("ghi", 10000));
+select a, left(b, 9), length(b) from t1;
+a left(b, 9) length(b)
+0 abcabcabc 300
+1 defdefdef 3000
+2 ghighighi 30000
+# restart: --disable-provider-bzip2
+select a, left(b, 9), length(b) from t1;
+ERROR HY000: Table test/t1 is compressed with bzip2, which is not currently loaded. Please load the bzip2 provider plugin to open the table
+drop table t1;
+# restart
diff --git a/mysql-test/suite/plugins/r/compression_load.result b/mysql-test/suite/plugins/r/compression_load.result
new file mode 100644
index 00000000000..a23037edc17
--- /dev/null
+++ b/mysql-test/suite/plugins/r/compression_load.result
@@ -0,0 +1,33 @@
+select plugin_name, plugin_status from information_schema.plugins where plugin_name='provider_lz4';
+plugin_name plugin_status
+set global innodb_compression_algorithm = lz4;
+ERROR 42000: Variable 'innodb_compression_algorithm' can't be set to the value of 'lz4'
+install plugin provider_lz4 soname 'provider_lz4';
+select plugin_name, plugin_status from information_schema.plugins where plugin_name='provider_lz4';
+plugin_name plugin_status
+provider_lz4 ACTIVE
+set global innodb_compression_algorithm = lz4;
+create table t1 (a int, b text) engine=innodb page_compressed=1;
+insert t1 (a, b) values (0, repeat("abc", 100));
+insert t1 (a, b) values (1, repeat("def", 1000));
+insert t1 (a, b) values (2, repeat("ghi", 10000));
+select a, left(b, 9), length(b) from t1;
+a left(b, 9) length(b)
+0 abcabcabc 300
+1 defdefdef 3000
+2 ghighighi 30000
+uninstall plugin provider_lz4;
+Warnings:
+Warning 1620 Plugin is busy and will be uninstalled on shutdown
+select plugin_name, plugin_status from information_schema.plugins where plugin_name='provider_lz4';
+plugin_name plugin_status
+provider_lz4 INACTIVE
+set global innodb_compression_algorithm = default;
+set global innodb_compression_algorithm = lz4;
+set global innodb_compression_algorithm = default;
+select a, left(b, 9), length(b) from t1;
+a left(b, 9) length(b)
+0 abcabcabc 300
+1 defdefdef 3000
+2 ghighighi 30000
+drop table t1;
diff --git a/mysql-test/suite/plugins/r/cracklib_password_check.result b/mysql-test/suite/plugins/r/cracklib_password_check.result
index 218d12fb884..192d41d2ccf 100644
--- a/mysql-test/suite/plugins/r/cracklib_password_check.result
+++ b/mysql-test/suite/plugins/r/cracklib_password_check.result
@@ -4,9 +4,9 @@ PLUGIN_NAME cracklib_password_check
PLUGIN_VERSION 1.0
PLUGIN_STATUS ACTIVE
PLUGIN_TYPE PASSWORD VALIDATION
-PLUGIN_TYPE_VERSION 1.0
+PLUGIN_TYPE_VERSION 1.1
PLUGIN_LIBRARY cracklib_password_check.so
-PLUGIN_LIBRARY_VERSION 1.14
+PLUGIN_LIBRARY_VERSION 1.15
PLUGIN_AUTHOR Sergei Golubchik
PLUGIN_DESCRIPTION Password validation via CrackLib
PLUGIN_LICENSE GPL
@@ -37,6 +37,18 @@ show warnings;
Level Code Message
Warning 1819 cracklib: it is based on a dictionary word
Error 1819 Your password does not satisfy the current policy requirements (cracklib_password_check)
+grant select on *.* to foocar@localhost identified by 'localhost';
+ERROR HY000: Your password does not satisfy the current policy requirements (cracklib_password_check)
+show warnings;
+Level Code Message
+Warning 1819 cracklib: it is based upon your password entry
+Error 1819 Your password does not satisfy the current policy requirements (cracklib_password_check)
+grant select on *.* to foocar@localhost identified by 'foocar@localhost';
+ERROR HY000: Your password does not satisfy the current policy requirements (cracklib_password_check)
+show warnings;
+Level Code Message
+Warning 1819 cracklib: it is derived from your password entry
+Error 1819 Your password does not satisfy the current policy requirements (cracklib_password_check)
grant select on *.* to foobar identified by 'q$%^&*rty';
drop user foobar;
#
diff --git a/mysql-test/suite/plugins/r/password_reuse_check.result b/mysql-test/suite/plugins/r/password_reuse_check.result
new file mode 100644
index 00000000000..72f3dd5364b
--- /dev/null
+++ b/mysql-test/suite/plugins/r/password_reuse_check.result
@@ -0,0 +1,94 @@
+install soname "password_reuse_check";
+set global password_reuse_check_interval= 0;
+# Default value (sould be unlimited i.e. 0)
+SHOW GLOBAL VARIABLES like "password_reuse_check%";
+Variable_name Value
+password_reuse_check_interval 0
+# insert user
+grant select on *.* to user_name@localhost identified by 'test_pwd';
+grant select on *.* to user_name@localhost identified by 'test_pwd';
+ERROR HY000: Your password does not satisfy the current policy requirements (password_reuse_check)
+show warnings;
+Level Code Message
+Warning 1819 password_reuse_check: The password was already used
+Error 1819 Your password does not satisfy the current policy requirements (password_reuse_check)
+alter user user_name@localhost identified by 'test_pwd';
+ERROR HY000: Operation ALTER USER failed for 'user_name'@'localhost'
+show warnings;
+Level Code Message
+Warning 1819 password_reuse_check: The password was already used
+Error 1819 Your password does not satisfy the current policy requirements (password_reuse_check)
+Error 1396 Operation ALTER USER failed for 'user_name'@'localhost'
+# check exparation
+set global password_reuse_check_interval= 10;
+alter user user_name@localhost identified by 'test_pwd';
+ERROR HY000: Operation ALTER USER failed for 'user_name'@'localhost'
+show warnings;
+Level Code Message
+Warning 1819 password_reuse_check: The password was already used
+Error 1819 Your password does not satisfy the current policy requirements (password_reuse_check)
+Error 1396 Operation ALTER USER failed for 'user_name'@'localhost'
+select hex(hash) from mysql.password_reuse_check_history;
+hex(hash)
+B9F970DE4DA0145F842526C1BC9DBBBDB3EF80FDD7BE98061DAE3D18F492AA37668C07322DD21650C66B48FC78F0EAF6CB08245CC895BFDC43BE6921B07E5240
+# emulate old password
+update mysql.password_reuse_check_history set time= date_sub(now(), interval
+11 day);
+alter user user_name@localhost identified by 'test_pwd';
+show warnings;
+Level Code Message
+drop user user_name@localhost;
+show create table mysql.password_reuse_check_history;
+Table Create Table
+password_reuse_check_history CREATE TABLE `password_reuse_check_history` (
+ `hash` binary(64) NOT NULL,
+ `time` timestamp NOT NULL DEFAULT current_timestamp(),
+ PRIMARY KEY (`hash`),
+ KEY `tm` (`time`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=1
+select count(*) from mysql.password_reuse_check_history;
+count(*)
+1
+drop table mysql.password_reuse_check_history;
+# test error messages
+set global password_reuse_check_interval= 0;
+drop table if exists mysql.password_reuse_check_history;
+Warnings:
+Note 1051 Unknown table 'mysql.password_reuse_check_history'
+# test error messages
+create table mysql.password_reuse_check_history (wrong_structure int);
+grant select on *.* to user_name@localhost identified by 'test_pwd';
+ERROR HY000: Your password does not satisfy the current policy requirements (password_reuse_check)
+show warnings;
+Level Code Message
+Warning 1105 password_reuse_check:[1054] Unknown column 'hash' in 'field list'
+Error 1819 Your password does not satisfy the current policy requirements (password_reuse_check)
+set global password_reuse_check_interval= 10;
+grant select on *.* to user_name@localhost identified by 'test_pwd';
+ERROR HY000: Your password does not satisfy the current policy requirements (password_reuse_check)
+show warnings;
+Level Code Message
+Warning 1105 password_reuse_check:[1054] Unknown column 'time' in 'where clause'
+Error 1819 Your password does not satisfy the current policy requirements (password_reuse_check)
+drop table mysql.password_reuse_check_history;
+#
+# MDEV-28838: password_reuse_check plugin mixes username and password
+#
+grant select on *.* to user_name@localhost identified by 'test_pwd';
+grant select on *.* to user_nam@localhost identified by 'etest_pwd';
+show warnings;
+Level Code Message
+drop user user_name@localhost;
+drop user user_nam@localhost;
+drop table mysql.password_reuse_check_history;
+grant select on *.* to user_name@localhost identified by 'test_pwd';
+grant select on *.* to tuser_name@localhos identified by 'test_pwd';
+show warnings;
+Level Code Message
+drop user user_name@localhost;
+drop user tuser_name@localhos;
+#
+# End of 10.7 tests
+#
+drop table mysql.password_reuse_check_history;
+uninstall plugin password_reuse_check;
diff --git a/mysql-test/suite/plugins/r/show_all_plugins.result b/mysql-test/suite/plugins/r/show_all_plugins.result
index 3bdaf39d0d0..ebd5b6cc198 100644
--- a/mysql-test/suite/plugins/r/show_all_plugins.result
+++ b/mysql-test/suite/plugins/r/show_all_plugins.result
@@ -4,8 +4,8 @@ Variable_name Value
Opened_plugin_libraries 0
select * from information_schema.all_plugins where plugin_library='ha_example.so';
PLUGIN_NAME PLUGIN_VERSION PLUGIN_STATUS PLUGIN_TYPE PLUGIN_TYPE_VERSION PLUGIN_LIBRARY PLUGIN_LIBRARY_VERSION PLUGIN_AUTHOR PLUGIN_DESCRIPTION PLUGIN_LICENSE LOAD_OPTION PLUGIN_MATURITY PLUGIN_AUTH_VERSION
-EXAMPLE 0.1 NOT INSTALLED STORAGE ENGINE MYSQL_VERSION_ID ha_example.so 1.14 Brian Aker, MySQL AB Example storage engine GPL OFF Experimental 0.1
-UNUSABLE 3.14 NOT INSTALLED DAEMON MYSQL_VERSION_ID ha_example.so 1.14 Sergei Golubchik Unusable Daemon GPL OFF Experimental 3.14.15.926
+EXAMPLE 0.1 NOT INSTALLED STORAGE ENGINE MYSQL_VERSION_ID ha_example.so 1.15 Brian Aker, MySQL AB Example storage engine GPL OFF Experimental 0.1
+UNUSABLE 3.14 NOT INSTALLED DAEMON MYSQL_VERSION_ID ha_example.so 1.15 Sergei Golubchik Unusable Daemon GPL OFF Experimental 3.14.15.926
show status like '%libraries%';
Variable_name Value
Opened_plugin_libraries 1
diff --git a/mysql-test/suite/plugins/r/simple_password_check.result b/mysql-test/suite/plugins/r/simple_password_check.result
index ab6988ed002..30f68ba8193 100644
--- a/mysql-test/suite/plugins/r/simple_password_check.result
+++ b/mysql-test/suite/plugins/r/simple_password_check.result
@@ -4,9 +4,9 @@ PLUGIN_NAME simple_password_check
PLUGIN_VERSION 1.0
PLUGIN_STATUS ACTIVE
PLUGIN_TYPE PASSWORD VALIDATION
-PLUGIN_TYPE_VERSION 1.0
+PLUGIN_TYPE_VERSION 1.1
PLUGIN_LIBRARY simple_password_check.so
-PLUGIN_LIBRARY_VERSION 1.14
+PLUGIN_LIBRARY_VERSION 1.15
PLUGIN_AUTHOR Sergei Golubchik
PLUGIN_DESCRIPTION Simple password strength checks
PLUGIN_LICENSE GPL
diff --git a/mysql-test/suite/plugins/r/test_sql_service.result b/mysql-test/suite/plugins/r/test_sql_service.result
index af414d6c6e7..ca7326de51c 100644
--- a/mysql-test/suite/plugins/r/test_sql_service.result
+++ b/mysql-test/suite/plugins/r/test_sql_service.result
@@ -1,8 +1,99 @@
install plugin test_sql_service soname 'test_sql_service';
+show status like 'test_sql_service_passed';
+Variable_name Value
+Test_sql_service_passed 1
+set global test_sql_service_execute_sql_global= 'create table test.t1 select 1 as a, @@SQL_LOG_BIN';
+set global test_sql_service_execute_sql_local= 'insert into test.t1 select 2 as a, @@SQL_LOG_BIN';
+set global test_sql_service_execute_sql_global= 'SET SQL_LOG_BIN=1';
+set global test_sql_service_execute_sql_global= 'insert into test.t1 select 3 as a, @@SQL_LOG_BIN';
+set global test_sql_service_execute_sql_global= 'SET SQL_LOG_BIN=0';
+set global test_sql_service_execute_sql_global= 'insert into test.t1 select 4 as a, @@SQL_LOG_BIN';
+set global test_sql_service_execute_sql_global= 'SET sql_auto_is_null=1';
+set global test_sql_service_execute_sql_global= 'insert into test.t1 select 5 as a, @@sql_auto_is_null';
+set global test_sql_service_execute_sql_global= 'SET sql_auto_is_null=0';
+set global test_sql_service_execute_sql_global= 'insert into test.t1 select 6 as a, @@sql_auto_is_null';
+select * from t1 order by a;
+a @@SQL_LOG_BIN
+1 0
+2 0
+3 1
+4 0
+5 1
+6 0
+drop table t1;
+SET SQL_LOG_BIN=0;
set global test_sql_service_run_test= 1;
-show status like 'test_sql_service%';
+show status like 'test_sql_service_passed';
+Variable_name Value
+Test_sql_service_passed 1
+set global test_sql_service_execute_sql_local= 'create table test.t1(id int)';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Query affected 0 rows.
+set global test_sql_service_execute_sql_local= 'insert into test.t1 values (1), (2)';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Query affected 2 rows.
+set global test_sql_service_execute_sql_local= 'select * from test.t1';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Query returned 2 rows.
+set global test_sql_service_execute_sql_local= 'drop table test.t1';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Query affected 0 rows.
+set global test_sql_service_execute_sql_local= 'drop table test.t1';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Error 1051 returned. Unknown table 'test.t1'
+set global test_sql_service_execute_sql_global= 'create table test.t1(id int)';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Query affected 0 rows.
+set global test_sql_service_execute_sql_global= 'insert into test.t1 values (1), (2)';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Query affected 2 rows.
+set global test_sql_service_execute_sql_global= 'select * from test.t1';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Query returned 2 rows.
+set global test_sql_service_execute_sql_global= 'drop table test.t1';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Query affected 0 rows.
+set global test_sql_service_execute_sql_global= 'drop table test.t1';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Error 1051 returned. Unknown table 'test.t1'
+create table t1 (id int, time timestamp);
+insert into t1 values (1, NULL), (2, NULL), (3, NULL), (4, NULL), (5, NULL);
+set global test_sql_service_execute_sql_global= 'select * FROM test.t1 WHERE time < DATE_SUB(NOW(), interval 5 minute)';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Query returned 0 rows.
+set global test_sql_service_execute_sql_global= 'select * FROM test.t1 WHERE time <= NOW()';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Query returned 5 rows.
+set global test_sql_service_execute_sql_local= 'select * FROM test.t1 WHERE time < DATE_SUB(NOW(), interval 5 minute)';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Query returned 0 rows.
+set global test_sql_service_execute_sql_local= 'select * FROM test.t1 WHERE time <= NOW()';
+show status like 'test_sql_query_result';
Variable_name Value
-Test_sql_service_passed 0
+Test_sql_query_result Query returned 5 rows.
+drop table t1;
uninstall plugin test_sql_service;
Warnings:
Warning 1620 Plugin is busy and will be uninstalled on shutdown
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Annotate_rows # # insert into test.t1 select 3 as a, @@SQL_LOG_BIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
diff --git a/mysql-test/suite/plugins/t/compression.combinations b/mysql-test/suite/plugins/t/compression.combinations
new file mode 100644
index 00000000000..645ca60e5f0
--- /dev/null
+++ b/mysql-test/suite/plugins/t/compression.combinations
@@ -0,0 +1,29 @@
+[innodb-bzip2]
+innodb
+plugin-load-add=$PROVIDER_BZIP2_SO
+loose-provider-bzip2
+
+[innodb-lz4]
+innodb
+plugin-load-add=$PROVIDER_LZ4_SO
+loose-provider-lz4
+
+[innodb-lzma]
+innodb
+plugin-load-add=$PROVIDER_LZMA_SO
+loose-provider-lzma
+
+[innodb-lzo]
+innodb
+plugin-load-add=$PROVIDER_LZO_SO
+loose-provider-lzo
+
+[innodb-snappy]
+innodb
+plugin-load-add=$PROVIDER_SNAPPY_SO
+loose-provider-snappy
+
+[mroonga-lz4]
+plugin-load-add=$HA_MROONGA_SO
+plugin-load-add=$PROVIDER_LZ4_SO
+loose-provider-lz4
diff --git a/mysql-test/suite/plugins/t/compression.test b/mysql-test/suite/plugins/t/compression.test
new file mode 100644
index 00000000000..c97c5725e1d
--- /dev/null
+++ b/mysql-test/suite/plugins/t/compression.test
@@ -0,0 +1,52 @@
+let $engine=`select regexp_replace('$MTR_COMBINATIONS', '-.*', '')`;
+let $alg=`select regexp_replace('$MTR_COMBINATIONS', '.*-', '')`;
+
+if (`select count(*) = 0 from information_schema.plugins where plugin_name = '$engine' and plugin_status='active'`)
+{
+ skip Needs $engine engine;
+}
+
+if (`select count(*) = 0 from information_schema.plugins where plugin_name = 'provider_$alg' and plugin_status='active'`)
+{
+ skip Needs provider_$alg plugin;
+}
+
+--echo #
+--echo # Testing $alg compression provider with $engine
+--echo #
+
+call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded");
+if ($engine == "innodb") {
+ eval set global innodb_compression_algorithm = $alg;
+ let $table_params = page_compressed = 1;
+ call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
+ call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
+ call mtr.add_suppression("Table .*t1.* is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
+}
+if ($engine == "mroonga") {
+ let $column_params = `select upper('COMMENT \'flags "COLUMN_SCALAR|COMPRESS_$alg"\'')`;
+ let $table_params = charset = utf8;
+}
+
+eval create table t1 (a int, b text $column_params) engine = $engine $table_params;
+
+insert t1 (a, b) values (0, repeat("abc", 100));
+insert t1 (a, b) values (1, repeat("def", 1000));
+insert t1 (a, b) values (2, repeat("ghi", 10000));
+select a, left(b, 9), length(b) from t1;
+
+let $restart_parameters = --disable-provider-$alg;
+source include/restart_mysqld.inc;
+
+if ($engine == "innodb") {
+ error ER_PROVIDER_NOT_LOADED;
+ select a, left(b, 9), length(b) from t1;
+}
+if ($engine == "mroonga"){
+ select a, left(b, 9), length(b) from t1;
+ select a, left(b, 9), length(b) from t1; # a warning once per statement
+}
+drop table t1;
+
+let $restart_parameters =;
+source include/restart_mysqld.inc;
diff --git a/mysql-test/suite/plugins/t/compression_load.test b/mysql-test/suite/plugins/t/compression_load.test
new file mode 100644
index 00000000000..d67c204e75f
--- /dev/null
+++ b/mysql-test/suite/plugins/t/compression_load.test
@@ -0,0 +1,24 @@
+source include/have_innodb.inc;
+
+if (!$PROVIDER_LZ4_SO) {
+ skip Requires provider_lz4 plugin;
+}
+
+select plugin_name, plugin_status from information_schema.plugins where plugin_name='provider_lz4';
+--error ER_WRONG_VALUE_FOR_VAR
+set global innodb_compression_algorithm = lz4;
+install plugin provider_lz4 soname 'provider_lz4';
+select plugin_name, plugin_status from information_schema.plugins where plugin_name='provider_lz4';
+set global innodb_compression_algorithm = lz4;
+create table t1 (a int, b text) engine=innodb page_compressed=1;
+insert t1 (a, b) values (0, repeat("abc", 100));
+insert t1 (a, b) values (1, repeat("def", 1000));
+insert t1 (a, b) values (2, repeat("ghi", 10000));
+select a, left(b, 9), length(b) from t1;
+uninstall plugin provider_lz4;
+select plugin_name, plugin_status from information_schema.plugins where plugin_name='provider_lz4';
+set global innodb_compression_algorithm = default;
+set global innodb_compression_algorithm = lz4;
+set global innodb_compression_algorithm = default;
+select a, left(b, 9), length(b) from t1;
+drop table t1;
diff --git a/mysql-test/suite/plugins/t/cracklib_password_check.test b/mysql-test/suite/plugins/t/cracklib_password_check.test
index 89b53b656d6..0fbef757e30 100644
--- a/mysql-test/suite/plugins/t/cracklib_password_check.test
+++ b/mysql-test/suite/plugins/t/cracklib_password_check.test
@@ -27,6 +27,14 @@ show warnings;
grant select on *.* to foobar identified by 'qwerty';
show warnings;
+--error ER_NOT_VALID_PASSWORD
+grant select on *.* to foocar@localhost identified by 'localhost';
+show warnings;
+
+--error ER_NOT_VALID_PASSWORD
+grant select on *.* to foocar@localhost identified by 'foocar@localhost';
+show warnings;
+
grant select on *.* to foobar identified by 'q$%^&*rty';
drop user foobar;
diff --git a/mysql-test/suite/plugins/t/password_reuse_check.test b/mysql-test/suite/plugins/t/password_reuse_check.test
new file mode 100644
index 00000000000..16ff21dc454
--- /dev/null
+++ b/mysql-test/suite/plugins/t/password_reuse_check.test
@@ -0,0 +1,100 @@
+--source include/not_embedded.inc
+
+if (!$PASSWORD_REUSE_CHECK_SO) {
+ skip No PASSWORD_REUSE_CHECK plugin;
+}
+
+install soname "password_reuse_check";
+
+set global password_reuse_check_interval= 0;
+
+--echo # Default value (sould be unlimited i.e. 0)
+SHOW GLOBAL VARIABLES like "password_reuse_check%";
+
+--echo # insert user
+grant select on *.* to user_name@localhost identified by 'test_pwd';
+
+--error ER_NOT_VALID_PASSWORD
+grant select on *.* to user_name@localhost identified by 'test_pwd';
+show warnings;
+
+--error ER_CANNOT_USER
+alter user user_name@localhost identified by 'test_pwd';
+show warnings;
+
+# Plugin does not work for it
+#--error ER_NOT_VALID_PASSWORD
+#SET PASSWORD FOR user_name@localhost = PASSWORD('test_pwd');
+
+--echo # check exparation
+
+set global password_reuse_check_interval= 10;
+
+--error ER_CANNOT_USER
+alter user user_name@localhost identified by 'test_pwd';
+show warnings;
+select hex(hash) from mysql.password_reuse_check_history;
+
+--echo # emulate old password
+update mysql.password_reuse_check_history set time= date_sub(now(), interval
+11 day);
+
+alter user user_name@localhost identified by 'test_pwd';
+show warnings;
+
+drop user user_name@localhost;
+
+show create table mysql.password_reuse_check_history;
+select count(*) from mysql.password_reuse_check_history;
+
+drop table mysql.password_reuse_check_history;
+
+--echo # test error messages
+
+set global password_reuse_check_interval= 0;
+
+drop table if exists mysql.password_reuse_check_history;
+
+--echo # test error messages
+
+create table mysql.password_reuse_check_history (wrong_structure int);
+
+--error ER_NOT_VALID_PASSWORD
+grant select on *.* to user_name@localhost identified by 'test_pwd';
+show warnings;
+
+set global password_reuse_check_interval= 10;
+
+--error ER_NOT_VALID_PASSWORD
+grant select on *.* to user_name@localhost identified by 'test_pwd';
+show warnings;
+
+drop table mysql.password_reuse_check_history;
+
+--echo #
+--echo # MDEV-28838: password_reuse_check plugin mixes username and password
+--echo #
+
+grant select on *.* to user_name@localhost identified by 'test_pwd';
+
+grant select on *.* to user_nam@localhost identified by 'etest_pwd';
+show warnings;
+
+drop user user_name@localhost;
+drop user user_nam@localhost;
+drop table mysql.password_reuse_check_history;
+
+grant select on *.* to user_name@localhost identified by 'test_pwd';
+
+grant select on *.* to tuser_name@localhos identified by 'test_pwd';
+show warnings;
+
+drop user user_name@localhost;
+drop user tuser_name@localhos;
+
+--echo #
+--echo # End of 10.7 tests
+--echo #
+
+drop table mysql.password_reuse_check_history;
+uninstall plugin password_reuse_check;
diff --git a/mysql-test/suite/plugins/t/test_sql_service.test b/mysql-test/suite/plugins/t/test_sql_service.test
index 9b9e29c6913..3f2aaa81c4c 100644
--- a/mysql-test/suite/plugins/t/test_sql_service.test
+++ b/mysql-test/suite/plugins/t/test_sql_service.test
@@ -1,4 +1,5 @@
--source include/not_embedded.inc
+--source include/have_log_bin.inc
if (!$TEST_SQL_SERVICE_SO) {
skip No TEST_SQL_SERVICE plugin;
@@ -9,9 +10,72 @@ let count_sessions= 1;
source include/wait_until_count_sessions.inc;
install plugin test_sql_service soname 'test_sql_service';
+show status like 'test_sql_service_passed';
+
+set global test_sql_service_execute_sql_global= 'create table test.t1 select 1 as a, @@SQL_LOG_BIN';
+set global test_sql_service_execute_sql_local= 'insert into test.t1 select 2 as a, @@SQL_LOG_BIN';
+set global test_sql_service_execute_sql_global= 'SET SQL_LOG_BIN=1';
+set global test_sql_service_execute_sql_global= 'insert into test.t1 select 3 as a, @@SQL_LOG_BIN';
+set global test_sql_service_execute_sql_global= 'SET SQL_LOG_BIN=0';
+set global test_sql_service_execute_sql_global= 'insert into test.t1 select 4 as a, @@SQL_LOG_BIN';
+set global test_sql_service_execute_sql_global= 'SET sql_auto_is_null=1';
+set global test_sql_service_execute_sql_global= 'insert into test.t1 select 5 as a, @@sql_auto_is_null';
+set global test_sql_service_execute_sql_global= 'SET sql_auto_is_null=0';
+set global test_sql_service_execute_sql_global= 'insert into test.t1 select 6 as a, @@sql_auto_is_null';
+select * from t1 order by a;
+drop table t1;
+SET SQL_LOG_BIN=0;
set global test_sql_service_run_test= 1;
-show status like 'test_sql_service%';
+show status like 'test_sql_service_passed';
+
+set global test_sql_service_execute_sql_local= 'create table test.t1(id int)';
+show status like 'test_sql_query_result';
+
+set global test_sql_service_execute_sql_local= 'insert into test.t1 values (1), (2)';
+show status like 'test_sql_query_result';
+
+set global test_sql_service_execute_sql_local= 'select * from test.t1';
+show status like 'test_sql_query_result';
+
+set global test_sql_service_execute_sql_local= 'drop table test.t1';
+show status like 'test_sql_query_result';
+
+set global test_sql_service_execute_sql_local= 'drop table test.t1';
+show status like 'test_sql_query_result';
+
+set global test_sql_service_execute_sql_global= 'create table test.t1(id int)';
+show status like 'test_sql_query_result';
+
+set global test_sql_service_execute_sql_global= 'insert into test.t1 values (1), (2)';
+show status like 'test_sql_query_result';
+
+set global test_sql_service_execute_sql_global= 'select * from test.t1';
+show status like 'test_sql_query_result';
+
+set global test_sql_service_execute_sql_global= 'drop table test.t1';
+show status like 'test_sql_query_result';
+
+set global test_sql_service_execute_sql_global= 'drop table test.t1';
+show status like 'test_sql_query_result';
+
+create table t1 (id int, time timestamp);
+insert into t1 values (1, NULL), (2, NULL), (3, NULL), (4, NULL), (5, NULL);
+set global test_sql_service_execute_sql_global= 'select * FROM test.t1 WHERE time < DATE_SUB(NOW(), interval 5 minute)';
+show status like 'test_sql_query_result';
+set global test_sql_service_execute_sql_global= 'select * FROM test.t1 WHERE time <= NOW()';
+show status like 'test_sql_query_result';
+set global test_sql_service_execute_sql_local= 'select * FROM test.t1 WHERE time < DATE_SUB(NOW(), interval 5 minute)';
+show status like 'test_sql_query_result';
+set global test_sql_service_execute_sql_local= 'select * FROM test.t1 WHERE time <= NOW()';
+show status like 'test_sql_query_result';
+drop table t1;
uninstall plugin test_sql_service;
+# Check that statements were executed/binlogged in correct order.
+source include/show_binlog_events.inc;
+# --replace_column 2 # 5 #
+# --replace_regex /xid=[0-9]+/xid=XX/ /GTID [0-9]+-[0-9]+-[0-9]+/GTID #-#-#/
+# SHOW BINLOG EVENTS LIMIT 3,100;
+
diff --git a/mysql-test/suite/roles/definer.result b/mysql-test/suite/roles/definer.result
index 249fb8198a7..8b5e36d8b3c 100644
--- a/mysql-test/suite/roles/definer.result
+++ b/mysql-test/suite/roles/definer.result
@@ -321,7 +321,9 @@ CREATE TABLE `t1` (
`c` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t1` VALUES (1,10,100),(2,20,200);
+INSERT INTO `t1` VALUES
+(1,10,100),
+(2,20,200);
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t2` (
@@ -330,7 +332,8 @@ CREATE TABLE `t2` (
`c` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t2` VALUES (2,20,200);
+INSERT INTO `t2` VALUES
+(2,20,200);
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
diff --git a/mysql-test/suite/rpl/include/rpl_extra_col_master.test b/mysql-test/suite/rpl/include/rpl_extra_col_master.test
index 02645a577f5..0d397b7e3ba 100644
--- a/mysql-test/suite/rpl/include/rpl_extra_col_master.test
+++ b/mysql-test/suite/rpl/include/rpl_extra_col_master.test
@@ -825,7 +825,7 @@ SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1;
--echo *****************
--echo
connection slave;
-# 1072 = ER_KEY_COLUMN_DOES_NOT_EXITS
+# 1072 = ER_KEY_COLUMN_DOES_NOT_EXIST
--let $slave_sql_errno= 1072
--let $show_slave_sql_error= 1
--source include/wait_for_slave_sql_error.inc
diff --git a/mysql-test/suite/rpl/include/rpl_mixed_dml.inc b/mysql-test/suite/rpl/include/rpl_mixed_dml.inc
index bb1a2c173de..e9e1fd512b4 100644
--- a/mysql-test/suite/rpl/include/rpl_mixed_dml.inc
+++ b/mysql-test/suite/rpl/include/rpl_mixed_dml.inc
@@ -29,7 +29,7 @@ INSERT INTO t2 VALUES(1, 't2, text 1');
--echo
--echo ******************** DELETE ********************
DELETE FROM t1 WHERE a = 1;
-DELETE FROM t2 WHERE b <> UUID();
+DELETE FROM t2 WHERE b <> SYS_GUID();
--source suite/rpl/include/rpl_mixed_check_select.inc
--source suite/rpl/include/rpl_mixed_clear_tables.inc
@@ -37,7 +37,7 @@ DELETE FROM t2 WHERE b <> UUID();
--echo
--echo ******************** INSERT ********************
INSERT INTO t1 VALUES(1, 't1, text 1');
-INSERT INTO t1 VALUES(2, UUID());
+INSERT INTO t1 VALUES(2, SYS_GUID());
INSERT INTO t2 SELECT * FROM t1;
INSERT INTO t2 VALUES (1, 't1, text 1') ON DUPLICATE KEY UPDATE b = 't2, text 1';
DELETE FROM t1 WHERE a = 2;
@@ -60,7 +60,7 @@ INSERT INTO t1 VALUES(1, 't1, text 1');
INSERT INTO t1 VALUES(2, 't1, text 2');
INSERT INTO t1 VALUES(3, 't1, text 3');
REPLACE INTO t1 VALUES(1, 't1, text 11');
-REPLACE INTO t1 VALUES(2, UUID());
+REPLACE INTO t1 VALUES(2, SYS_GUID());
REPLACE INTO t1 SET a=3, b='t1, text 33';
DELETE FROM t1 WHERE a = 2;
--source suite/rpl/include/rpl_mixed_check_select.inc
@@ -70,7 +70,7 @@ DELETE FROM t1 WHERE a = 2;
--echo
--echo ******************** SELECT ********************
INSERT INTO t1 VALUES(1, 't1, text 1');
-SELECT * FROM t1 WHERE b <> UUID() ORDER BY a;
+SELECT * FROM t1 WHERE b <> SYS_GUID() ORDER BY a;
--source suite/rpl/include/rpl_mixed_clear_tables.inc
# JOIN
@@ -89,7 +89,7 @@ SELECT * FROM t1 INNER JOIN t2 ON t1.b = t2.b ORDER BY t1.a,t2.a;
--echo ******************** UNION ********************
INSERT INTO t1 VALUES(1, 't1, text 1');
INSERT INTO t2 VALUES(1, 't2, text 1');
-SELECT * FROM t1 UNION SELECT * FROM t2 WHERE t2.b <> UUID();
+SELECT * FROM t1 UNION SELECT * FROM t2 WHERE t2.b <> SYS_GUID();
--source suite/rpl/include/rpl_mixed_clear_tables.inc
# TRUNCATE
@@ -144,7 +144,7 @@ START TRANSACTION;
INSERT INTO t1 VALUES (5, 'before savepoint s2');
SAVEPOINT s2;
INSERT INTO t1 VALUES (6, 'after savepoint s2');
-INSERT INTO t1 VALUES (7, CONCAT('with UUID() ',UUID()));
+INSERT INTO t1 VALUES (7, CONCAT('with SYS_GUID() ',SYS_GUID()));
RELEASE SAVEPOINT s2;
COMMIT;
DELETE FROM t1 WHERE a = 7;
@@ -257,7 +257,7 @@ BEGIN
END|
CREATE PROCEDURE p2 ()
BEGIN
- UPDATE t1 SET b = UUID() WHERE a = 202;
+ UPDATE t1 SET b = SYS_GUID() WHERE a = 202;
END|
DELIMITER ;|
INSERT INTO t1 VALUES(201, 'test 201');
@@ -309,7 +309,7 @@ DROP EVENT e2;
INSERT INTO t1 VALUES(1, 'test1');
INSERT INTO t1 VALUES(2, 'test2');
CREATE VIEW v1 AS SELECT * FROM t1 WHERE a = 1;
-CREATE VIEW v2 AS SELECT * FROM t1 WHERE b <> UUID();
+CREATE VIEW v2 AS SELECT * FROM t1 WHERE b <> SYS_GUID();
--source suite/rpl/include/rpl_mixed_check_view.inc
ALTER VIEW v1 AS SELECT * FROM t1 WHERE a = 2;
--source suite/rpl/include/rpl_mixed_check_view.inc
@@ -323,7 +323,7 @@ DROP VIEW v2;
--echo ******************** SHOW BINLOG EVENTS ********************
--source include/show_binlog_events.inc
sync_slave_with_master;
-# as we're using UUID we don't SELECT but use "diff" like in rpl_row_UUID
+# as we're using SYS_GUID we don't SELECT but use "diff" like in rpl_row_SYS_GUID
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test_rpl > $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql
--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test_rpl > $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql
diff --git a/mysql-test/suite/rpl/include/rpl_switch_stm_row_mixed.inc b/mysql-test/suite/rpl/include/rpl_switch_stm_row_mixed.inc
index 31b80732c60..d814a257711 100644
--- a/mysql-test/suite/rpl/include/rpl_switch_stm_row_mixed.inc
+++ b/mysql-test/suite/rpl/include/rpl_switch_stm_row_mixed.inc
@@ -10,7 +10,7 @@
# - Master is switching explicitly between STATEMENT, ROW, and MIXED
# binlog format showing when it is possible and when not.
# - Master switching from MIXED to RBR implicitly listing all use
-# cases, e.g a query invokes UUID(), thereafter to serve as the
+# cases, e.g a query invokes SYS_GUID(), thereafter to serve as the
# definition of MIXED binlog format
# - correctness of execution
@@ -56,18 +56,18 @@ select @@global.binlog_format, @@session.binlog_format;
CREATE TABLE t1 (a varchar(100));
-prepare stmt1 from 'insert into t1 select concat(UUID(),?)';
+prepare stmt1 from 'insert into t1 select concat(SYS_GUID(),?)';
set @string="emergency_1_";
insert into t1 values("work_2_");
execute stmt1 using @string;
deallocate prepare stmt1;
prepare stmt1 from 'insert into t1 select ?';
-insert into t1 values(concat(UUID(),"work_3_"));
+insert into t1 values(concat(SYS_GUID(),"work_3_"));
execute stmt1 using @string;
deallocate prepare stmt1;
-insert into t1 values(concat("for_4_",UUID()));
+insert into t1 values(concat("for_4_",SYS_GUID()));
insert into t1 select "yesterday_5_";
# verify that temp tables prevent a switch to SBR
@@ -129,41 +129,41 @@ select @@global.binlog_format, @@session.binlog_format;
set binlog_format=default;
select @@global.binlog_format, @@session.binlog_format;
-prepare stmt1 from 'insert into t1 select concat(UUID(),?)';
+prepare stmt1 from 'insert into t1 select concat(SYS_GUID(),?)';
set @string="emergency_17_";
insert into t1 values("work_18_");
execute stmt1 using @string;
deallocate prepare stmt1;
prepare stmt1 from 'insert into t1 select ?';
-insert into t1 values(concat(UUID(),"work_19_"));
+insert into t1 values(concat(SYS_GUID(),"work_19_"));
execute stmt1 using @string;
deallocate prepare stmt1;
-insert into t1 values(concat("for_20_",UUID()));
+insert into t1 values(concat("for_20_",SYS_GUID()));
insert into t1 select "yesterday_21_";
prepare stmt1 from 'insert into t1 select ?';
-insert into t1 values(concat(UUID(),"work_22_"));
+insert into t1 values(concat(SYS_GUID(),"work_22_"));
execute stmt1 using @string;
deallocate prepare stmt1;
-insert into t1 values(concat("for_23_",UUID()));
+insert into t1 values(concat("for_23_",SYS_GUID()));
insert into t1 select "yesterday_24_";
# Test of CREATE TABLE SELECT
-create table t2 ENGINE=MyISAM select rpad(UUID(),100,' ');
-create table t3 select 1 union select UUID();
+create table t2 ENGINE=MyISAM select rpad(SYS_GUID(),100,' ');
+create table t3 select 1 union select SYS_GUID();
--disable_warnings
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
-create table t4 select * from t1 where 3 in (select 1 union select 2 union select UUID() union select 3);
+create table t4 select * from t1 where 3 in (select 1 union select 2 union select SYS_GUID() union select 3);
--enable_warnings
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3);
-# what if UUID() is first:
+# what if SYS_GUID() is first:
--disable_warnings
-insert ignore into t5 select UUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4);
+insert ignore into t5 select SYS_GUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4);
--enable_warnings
# inside a stored procedure
@@ -172,14 +172,14 @@ delimiter |;
create procedure foo()
begin
insert into t1 values("work_25_");
-insert into t1 values(concat("for_26_",UUID()));
+insert into t1 values(concat("for_26_",SYS_GUID()));
insert into t1 select "yesterday_27_";
end|
create procedure foo2()
begin
-insert into t1 values(concat("emergency_28_",UUID()));
+insert into t1 values(concat("emergency_28_",SYS_GUID()));
insert into t1 values("work_29_");
-insert into t1 values(concat("for_30_",UUID()));
+insert into t1 values(concat("for_30_",SYS_GUID()));
set session binlog_format=row; # accepted for stored procs
insert into t1 values("more work_31_");
set session binlog_format=mixed;
@@ -199,7 +199,7 @@ delimiter ;|
call foo();
call foo2();
call foo4("hello");
-call foo4(UUID());
+call foo4(SYS_GUID());
call foo4("world");
# test that can't SET in a stored function
@@ -249,7 +249,7 @@ deallocate prepare stmt1;
delimiter |;
create function foo5() returns bigint unsigned
begin
- insert into t2 select UUID();
+ insert into t2 select SYS_GUID();
return 100;
end|
delimiter ;|
@@ -260,7 +260,7 @@ execute stmt1;
execute stmt1;
deallocate prepare stmt1;
-# A simple stored function where UUID() is in the argument
+# A simple stored function where SYS_GUID() is in the argument
delimiter |;
create function foo6(x varchar(100)) returns bigint unsigned
begin
@@ -269,17 +269,17 @@ begin
end|
delimiter ;|
select foo6("foo6_1_");
-select foo6(concat("foo6_2_",UUID()));
+select foo6(concat("foo6_2_",SYS_GUID()));
-prepare stmt1 from 'select foo6(concat("foo6_3_",UUID()))';
+prepare stmt1 from 'select foo6(concat("foo6_3_",SYS_GUID()))';
execute stmt1;
execute stmt1;
deallocate prepare stmt1;
-# Test of views using UUID()
+# Test of views using SYS_GUID()
-create view v1 as select uuid();
+create view v1 as select SYS_GUID();
create table t11 (data varchar(255));
insert into t11 select * from v1;
# Test of querying INFORMATION_SCHEMA which parses the view's body,
@@ -291,18 +291,18 @@ execute stmt1;
execute stmt1;
deallocate prepare stmt1;
-# Test of triggers with UUID()
+# Test of triggers with SYS_GUID()
delimiter |;
create trigger t11_bi before insert on t11 for each row
begin
- set NEW.data = concat(NEW.data,UUID());
+ set NEW.data = concat(NEW.data,SYS_GUID());
end|
delimiter ;|
insert into t11 values("try_560_");
# Test that INSERT DELAYED works in mixed mode (BUG#20649)
insert delayed into t2 values("delay_1_");
-insert delayed into t2 values(concat("delay_2_",UUID()));
+insert delayed into t2 values(concat("delay_2_",SYS_GUID()));
insert delayed into t2 values("delay_6_");
# Test for BUG#20633 (INSERT DELAYED RAND()/user_variable does not
@@ -482,7 +482,7 @@ sync_slave_with_master;
# Test for BUG#20499 "mixed mode with temporary table breaks binlog"
# Slave used to have only 2 rows instead of 3.
connection master;
-CREATE TEMPORARY TABLE t15 SELECT UUID();
+CREATE TEMPORARY TABLE t15 SELECT SYS_GUID();
create table t16 like t15;
INSERT INTO t16 SELECT * FROM t15;
# we'll verify that this one is done RBB
@@ -546,7 +546,7 @@ DROP TABLE IF EXISTS t12;
SET SESSION BINLOG_FORMAT=MIXED;
CREATE TABLE t12 (data LONG);
LOCK TABLES t12 WRITE;
-INSERT INTO t12 VALUES(UUID());
+INSERT INTO t12 VALUES(SYS_GUID());
UNLOCK TABLES;
sync_slave_with_master;
@@ -587,7 +587,7 @@ INSERT INTO t13 VALUES (my_current_user());
sync_slave_with_master;
-# as we're using UUID we don't SELECT but use "diff" like in rpl_row_UUID
+# as we're using SYS_GUID we don't SELECT but use "diff" like in rpl_row_UUID
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info mysqltest1 > $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql
--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info mysqltest1 > $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql
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 7dd3907f102..513bc26a1cc 100644
--- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
+++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
@@ -33,7 +33,7 @@ INSERT INTO t2 VALUES(1, 't2, text 1');
******************** DELETE ********************
DELETE FROM t1 WHERE a = 1;
-DELETE FROM t2 WHERE b <> UUID();
+DELETE FROM t2 WHERE b <> SYS_GUID();
SELECT COUNT(*) FROM t1;
COUNT(*)
1
@@ -64,7 +64,7 @@ DELETE FROM t2;
******************** INSERT ********************
INSERT INTO t1 VALUES(1, 't1, text 1');
-INSERT INTO t1 VALUES(2, UUID());
+INSERT INTO t1 VALUES(2, SYS_GUID());
INSERT INTO t2 SELECT * FROM t1;
INSERT INTO t2 VALUES (1, 't1, text 1') ON DUPLICATE KEY UPDATE b = 't2, text 1';
DELETE FROM t1 WHERE a = 2;
@@ -143,7 +143,7 @@ INSERT INTO t1 VALUES(1, 't1, text 1');
INSERT INTO t1 VALUES(2, 't1, text 2');
INSERT INTO t1 VALUES(3, 't1, text 3');
REPLACE INTO t1 VALUES(1, 't1, text 11');
-REPLACE INTO t1 VALUES(2, UUID());
+REPLACE INTO t1 VALUES(2, SYS_GUID());
REPLACE INTO t1 SET a=3, b='t1, text 33';
DELETE FROM t1 WHERE a = 2;
SELECT COUNT(*) FROM t1;
@@ -178,7 +178,7 @@ DELETE FROM t2;
******************** SELECT ********************
INSERT INTO t1 VALUES(1, 't1, text 1');
-SELECT * FROM t1 WHERE b <> UUID() ORDER BY a;
+SELECT * FROM t1 WHERE b <> SYS_GUID() ORDER BY a;
a b
1 t1, text 1
DELETE FROM t1;
@@ -203,7 +203,7 @@ DELETE FROM t2;
******************** UNION ********************
INSERT INTO t1 VALUES(1, 't1, text 1');
INSERT INTO t2 VALUES(1, 't2, text 1');
-SELECT * FROM t1 UNION SELECT * FROM t2 WHERE t2.b <> UUID();
+SELECT * FROM t1 UNION SELECT * FROM t2 WHERE t2.b <> SYS_GUID();
a b
1 t1, text 1
1 t2, text 1
@@ -430,7 +430,7 @@ START TRANSACTION;
INSERT INTO t1 VALUES (5, 'before savepoint s2');
SAVEPOINT s2;
INSERT INTO t1 VALUES (6, 'after savepoint s2');
-INSERT INTO t1 VALUES (7, CONCAT('with UUID() ',UUID()));
+INSERT INTO t1 VALUES (7, CONCAT('with SYS_GUID() ',SYS_GUID()));
RELEASE SAVEPOINT s2;
COMMIT;
DELETE FROM t1 WHERE a = 7;
@@ -598,7 +598,7 @@ UPDATE t1 SET b = 'test' WHERE a = 201;
END|
CREATE PROCEDURE p2 ()
BEGIN
-UPDATE t1 SET b = UUID() WHERE a = 202;
+UPDATE t1 SET b = SYS_GUID() WHERE a = 202;
END|
INSERT INTO t1 VALUES(201, 'test 201');
CALL p1();
@@ -790,7 +790,7 @@ DELETE FROM t2;
INSERT INTO t1 VALUES(1, 'test1');
INSERT INTO t1 VALUES(2, 'test2');
CREATE VIEW v1 AS SELECT * FROM t1 WHERE a = 1;
-CREATE VIEW v2 AS SELECT * FROM t1 WHERE b <> UUID();
+CREATE VIEW v2 AS SELECT * FROM t1 WHERE b <> SYS_GUID();
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where `t1`.`a` = 1 latin1 latin1_swedish_ci
@@ -850,7 +850,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 WHERE a = 1
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Annotate_rows # # DELETE FROM t2 WHERE b <> UUID()
+master-bin.000001 # Annotate_rows # # DELETE FROM t2 WHERE b <> SYS_GUID()
master-bin.000001 # Table_map # # table_id: # (test_rpl.t2)
master-bin.000001 # Delete_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
@@ -864,7 +864,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES(2, UUID())
+master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES(2, SYS_GUID())
master-bin.000001 # Table_map # # table_id: # (test_rpl.t1)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
@@ -912,7 +912,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; REPLACE INTO t1 VALUES(1, 't1, text 11')
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Annotate_rows # # REPLACE INTO t1 VALUES(2, UUID())
+master-bin.000001 # Annotate_rows # # REPLACE INTO t1 VALUES(2, SYS_GUID())
master-bin.000001 # Table_map # # table_id: # (test_rpl.t1)
master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
@@ -1007,7 +1007,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES (5, 'before savepoint s2')
master-bin.000001 # Query # # SAVEPOINT `s2`
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES (6, 'after savepoint s2')
-master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (7, CONCAT('with UUID() ',UUID()))
+master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (7, CONCAT('with SYS_GUID() ',SYS_GUID()))
master-bin.000001 # Table_map # # table_id: # (test_rpl.t1)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
@@ -1049,7 +1049,7 @@ END
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; CREATE DEFINER=`root`@`localhost` PROCEDURE `p2`()
BEGIN
-UPDATE t1 SET b = UUID() WHERE a = 202;
+UPDATE t1 SET b = SYS_GUID() WHERE a = 202;
END
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(201, 'test 201')
@@ -1061,7 +1061,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(202, 'test 202')
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Annotate_rows # # UPDATE t1 SET b = UUID() WHERE a = 202
+master-bin.000001 # Annotate_rows # # UPDATE t1 SET b = SYS_GUID() WHERE a = 202
master-bin.000001 # Table_map # # table_id: # (test_rpl.t1)
master-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
@@ -1124,7 +1124,7 @@ master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS SELECT * FROM t1 WHERE a = 1
master-bin.000001 # Gtid # # GTID #-#-#
-master-bin.000001 # Query # # use `test_rpl`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS SELECT * FROM t1 WHERE b <> UUID()
+master-bin.000001 # Query # # use `test_rpl`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS SELECT * FROM t1 WHERE b <> SYS_GUID()
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test_rpl`; ALTER ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS SELECT * FROM t1 WHERE a = 2
master-bin.000001 # Gtid # # GTID #-#-#
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 936f604be2e..71332034b15 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
@@ -41,16 +41,16 @@ select @@global.binlog_format, @@session.binlog_format;
@@global.binlog_format @@session.binlog_format
ROW ROW
CREATE TABLE t1 (a varchar(100));
-prepare stmt1 from 'insert into t1 select concat(UUID(),?)';
+prepare stmt1 from 'insert into t1 select concat(SYS_GUID(),?)';
set @string="emergency_1_";
insert into t1 values("work_2_");
execute stmt1 using @string;
deallocate prepare stmt1;
prepare stmt1 from 'insert into t1 select ?';
-insert into t1 values(concat(UUID(),"work_3_"));
+insert into t1 values(concat(SYS_GUID(),"work_3_"));
execute stmt1 using @string;
deallocate prepare stmt1;
-insert into t1 values(concat("for_4_",UUID()));
+insert into t1 values(concat("for_4_",SYS_GUID()));
insert into t1 select "yesterday_5_";
create temporary table tmp(a char(100));
insert into tmp values("see_6_");
@@ -116,43 +116,43 @@ set binlog_format=default;
select @@global.binlog_format, @@session.binlog_format;
@@global.binlog_format @@session.binlog_format
MIXED MIXED
-prepare stmt1 from 'insert into t1 select concat(UUID(),?)';
+prepare stmt1 from 'insert into t1 select concat(SYS_GUID(),?)';
set @string="emergency_17_";
insert into t1 values("work_18_");
execute stmt1 using @string;
deallocate prepare stmt1;
prepare stmt1 from 'insert into t1 select ?';
-insert into t1 values(concat(UUID(),"work_19_"));
+insert into t1 values(concat(SYS_GUID(),"work_19_"));
execute stmt1 using @string;
deallocate prepare stmt1;
-insert into t1 values(concat("for_20_",UUID()));
+insert into t1 values(concat("for_20_",SYS_GUID()));
insert into t1 select "yesterday_21_";
prepare stmt1 from 'insert into t1 select ?';
-insert into t1 values(concat(UUID(),"work_22_"));
+insert into t1 values(concat(SYS_GUID(),"work_22_"));
execute stmt1 using @string;
deallocate prepare stmt1;
-insert into t1 values(concat("for_23_",UUID()));
+insert into t1 values(concat("for_23_",SYS_GUID()));
insert into t1 select "yesterday_24_";
-create table t2 ENGINE=MyISAM select rpad(UUID(),100,' ');
-create table t3 select 1 union select UUID();
+create table t2 ENGINE=MyISAM select rpad(SYS_GUID(),100,' ');
+create table t3 select 1 union select SYS_GUID();
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
-create table t4 select * from t1 where 3 in (select 1 union select 2 union select UUID() union select 3);
+create table t4 select * from t1 where 3 in (select 1 union select 2 union select SYS_GUID() union select 3);
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3);
Warnings:
Warning 1292 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);
+insert ignore into t5 select SYS_GUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4);
create procedure foo()
begin
insert into t1 values("work_25_");
-insert into t1 values(concat("for_26_",UUID()));
+insert into t1 values(concat("for_26_",SYS_GUID()));
insert into t1 select "yesterday_27_";
end|
create procedure foo2()
begin
-insert into t1 values(concat("emergency_28_",UUID()));
+insert into t1 values(concat("emergency_28_",SYS_GUID()));
insert into t1 values("work_29_");
-insert into t1 values(concat("for_30_",UUID()));
+insert into t1 values(concat("for_30_",SYS_GUID()));
set session binlog_format=row; # accepted for stored procs
insert into t1 values("more work_31_");
set session binlog_format=mixed;
@@ -171,7 +171,7 @@ end|
call foo();
call foo2();
call foo4("hello");
-call foo4(UUID());
+call foo4(SYS_GUID());
call foo4("world");
select foo3();
ERROR HY000: Cannot change the binary logging format inside a stored function or trigger
@@ -207,7 +207,7 @@ foo4()
deallocate prepare stmt1;
create function foo5() returns bigint unsigned
begin
-insert into t2 select UUID();
+insert into t2 select SYS_GUID();
return 100;
end|
select foo5();
@@ -229,18 +229,18 @@ end|
select foo6("foo6_1_");
foo6("foo6_1_")
100
-select foo6(concat("foo6_2_",UUID()));
-foo6(concat("foo6_2_",UUID()))
+select foo6(concat("foo6_2_",SYS_GUID()));
+foo6(concat("foo6_2_",SYS_GUID()))
100
-prepare stmt1 from 'select foo6(concat("foo6_3_",UUID()))';
+prepare stmt1 from 'select foo6(concat("foo6_3_",SYS_GUID()))';
execute stmt1;
-foo6(concat("foo6_3_",UUID()))
+foo6(concat("foo6_3_",SYS_GUID()))
100
execute stmt1;
-foo6(concat("foo6_3_",UUID()))
+foo6(concat("foo6_3_",SYS_GUID()))
100
deallocate prepare stmt1;
-create view v1 as select uuid();
+create view v1 as select SYS_GUID();
create table t11 (data varchar(255));
insert into t11 select * from v1;
insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11');
@@ -250,11 +250,11 @@ execute stmt1;
deallocate prepare stmt1;
create trigger t11_bi before insert on t11 for each row
begin
-set NEW.data = concat(NEW.data,UUID());
+set NEW.data = concat(NEW.data,SYS_GUID());
end|
insert into t11 values("try_560_");
insert delayed into t2 values("delay_1_");
-insert delayed into t2 values(concat("delay_2_",UUID()));
+insert delayed into t2 values(concat("delay_2_",SYS_GUID()));
insert delayed into t2 values("delay_6_");
insert delayed into t2 values(rand());
set @a=2.345;
@@ -356,7 +356,7 @@ alter table t1 modify a int, drop primary key;
insert into t1 values(null,"try_57_");
connection slave;
connection master;
-CREATE TEMPORARY TABLE t15 SELECT UUID();
+CREATE TEMPORARY TABLE t15 SELECT SYS_GUID();
create table t16 like t15;
INSERT INTO t16 SELECT * FROM t15;
insert into t16 values("try_65_");
@@ -427,7 +427,7 @@ DROP TABLE IF EXISTS t12;
SET SESSION BINLOG_FORMAT=MIXED;
CREATE TABLE t12 (data LONG);
LOCK TABLES t12 WRITE;
-INSERT INTO t12 VALUES(UUID());
+INSERT INTO t12 VALUES(SYS_GUID());
UNLOCK TABLES;
connection slave;
connection master;
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 b9c636fa582..639b107abd6 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
@@ -4,7 +4,7 @@ include/master-slave.inc
connection master;
CREATE TABLE t1 (a CHAR(48));
CREATE TEMPORARY TABLE t1_tmp1(a INT);
-INSERT INTO t1 VALUES (UUID());
+INSERT INTO t1 VALUES (SYS_GUID());
connection slave;
==== Verify results on slave ====
SHOW STATUS LIKE "Slave_open_temp_tables";
@@ -121,12 +121,12 @@ master-bin.000001 # Query # # COMMIT
BEGIN;
DROP TEMPORARY TABLE t1;
# The rows event will binlogged after 'INSERT INTO t1 VALUES(1)'
-INSERT IGNORE INTO t1 VALUES(uuid()+0);
+INSERT IGNORE INTO t1 VALUES(SYS_GUID()+0);
COMMIT;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Annotate_rows # # INSERT IGNORE INTO t1 VALUES(uuid()+0)
+master-bin.000001 # Annotate_rows # # INSERT IGNORE INTO t1 VALUES(SYS_GUID()+0)
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
diff --git a/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test b/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test
index d864e615f7a..766acb14c3d 100644
--- a/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test
+++ b/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test
@@ -4,7 +4,7 @@
# This test case will test the condition of the bug#40013.
# The test step is:
# 1: create temp table on connection 'master';
-# 2: switch to ROW format using 'INSERT INTO t1 VALUES (UUID());'
+# 2: switch to ROW format using 'INSERT INTO t1 VALUES (SYS_GUID());'
# 3: disconnect 'master' and connect to a new connection 'master1';
# 4: sync to slave and check the number of temp tables on slave.
#
@@ -19,7 +19,7 @@ source include/master-slave.inc;
CREATE TABLE t1 (a CHAR(48));
CREATE TEMPORARY TABLE t1_tmp1(a INT);
-INSERT INTO t1 VALUES (UUID());
+INSERT INTO t1 VALUES (SYS_GUID());
sync_slave_with_master;
@@ -188,7 +188,7 @@ DROP TEMPORARY TABLE t1;
--echo # The rows event will binlogged after 'INSERT INTO t1 VALUES(1)'
--disable_warnings
-INSERT IGNORE INTO t1 VALUES(uuid()+0);
+INSERT IGNORE INTO t1 VALUES(SYS_GUID()+0);
--enable_warnings
COMMIT;
diff --git a/mysql-test/suite/s3/mysqldump.result b/mysql-test/suite/s3/mysqldump.result
index 5efde8415fb..3f4c2081388 100644
--- a/mysql-test/suite/s3/mysqldump.result
+++ b/mysql-test/suite/s3/mysqldump.result
@@ -23,7 +23,11 @@ CREATE TABLE `t1` (
PRIMARY KEY (`pk`)
) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=1;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t1` VALUES (1,1),(2,2),(3,3),(4,4);
+INSERT INTO `t1` VALUES
+(1,1),
+(2,2),
+(3,3),
+(4,4);
ALTER TABLE `t1` ENGINE=S3;
#####
# mysqldump with --copy-s3-tables=1 XML
diff --git a/mysql-test/suite/sql_sequence/mysqldump.result b/mysql-test/suite/sql_sequence/mysqldump.result
index 47b93eff7d1..0199bb7162f 100644
--- a/mysql-test/suite/sql_sequence/mysqldump.result
+++ b/mysql-test/suite/sql_sequence/mysqldump.result
@@ -14,7 +14,9 @@ CREATE TABLE `t1` (
KEY `a` (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci KEY_BLOCK_SIZE=1024;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t1` VALUES (1),(2);
+INSERT INTO `t1` VALUES
+(1),
+(2);
# dump by tables order 1
CREATE SEQUENCE `a1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=Aria;
SELECT SETVAL(`a1`, 1, 0);
@@ -27,7 +29,9 @@ CREATE TABLE `t1` (
KEY `a` (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci KEY_BLOCK_SIZE=1024;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t1` VALUES (1),(2);
+INSERT INTO `t1` VALUES
+(1),
+(2);
# dump by tables order 2
CREATE SEQUENCE `a1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=Aria;
SELECT SETVAL(`a1`, 1, 0);
@@ -40,7 +44,9 @@ CREATE TABLE `t1` (
KEY `a` (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci KEY_BLOCK_SIZE=1024;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t1` VALUES (1),(2);
+INSERT INTO `t1` VALUES
+(1),
+(2);
# dump by tables only tables
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
@@ -49,7 +55,9 @@ CREATE TABLE `t1` (
KEY `a` (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci KEY_BLOCK_SIZE=1024;
/*!40101 SET character_set_client = @saved_cs_client */;
-INSERT INTO `t1` VALUES (1),(2);
+INSERT INTO `t1` VALUES
+(1),
+(2);
# dump by tables only sequences
CREATE SEQUENCE `a1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=Aria;
SELECT SETVAL(`a1`, 1, 0);
diff --git a/mysql-test/suite/sys_vars/r/default_tmp_storage_engine_rocksdb.result b/mysql-test/suite/sys_vars/r/default_tmp_storage_engine_rocksdb.result
new file mode 100644
index 00000000000..19fae14579d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/default_tmp_storage_engine_rocksdb.result
@@ -0,0 +1,102 @@
+#
+# MDEV-12914: Engine for temporary tables which are implicitly
+# created as RocksDB is substitued siliently with MyIsam
+SET default_tmp_storage_engine = engine_doesnt_exist;
+ERROR 42000: Unknown storage engine 'engine_doesnt_exist'
+SET default_tmp_storage_engine = rocksdb;
+ERROR HY000: Table storage engine 'ROCKSDB' does not support the create option 'TEMPORARY'
+SET default_tmp_storage_engine = CONCAT('rocks','db');
+ERROR HY000: Table storage engine 'ROCKSDB' does not support the create option 'TEMPORARY'
+CREATE TABLE t1 (i int) ENGINE = RocksDB;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL
+) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+CREATE TEMPORARY TABLE t2 LIKE t1;
+ERROR HY000: Table storage engine 'ROCKSDB' does not support the create option 'TEMPORARY'
+DROP TABLE t1;
+SET default_storage_engine = DEFAULT;
+SET default_tmp_storage_engine = DEFAULT;
+CREATE TABLE t1 (t int);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `t` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+CREATE TEMPORARY TABLE t2 LIKE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TEMPORARY TABLE `t2` (
+ `t` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+DROP TABLE t1, t2;
+SET default_storage_engine = rocksdb;
+SET default_tmp_storage_engine = default;
+CREATE TABLE t1 (t int);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `t` int(11) DEFAULT NULL
+) ENGINE=ROCKSDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+CREATE TEMPORARY TABLE t2 LIKE t1;
+ERROR HY000: Table storage engine 'ROCKSDB' does not support the create option 'TEMPORARY'
+CREATE TEMPORARY TABLE t2 (t int);
+ERROR HY000: Table storage engine 'ROCKSDB' does not support the create option 'TEMPORARY'
+SET default_tmp_storage_engine = aria;
+CREATE TEMPORARY TABLE t2 (t int);
+DROP TABLE t2;
+CREATE TEMPORARY TABLE t2 LIKE t1;
+ERROR HY000: Table storage engine 'ROCKSDB' does not support the create option 'TEMPORARY'
+DROP TABLE t1;
+#
+# MDEV-26242: Assertion `i >= 0' failed on setting
+# default_tmp_storage_engine to 'DEFAULT' in 10.7
+#
+SHOW VARIABLES like '%storage_engine';
+Variable_name Value
+default_storage_engine ROCKSDB
+default_tmp_storage_engine Aria
+enforce_storage_engine
+storage_engine ROCKSDB
+SELECT @@GLOBAL.default_tmp_storage_engine, @@GLOBAL.default_storage_engine, @@GLOBAL.storage_engine, @@SESSION.default_tmp_storage_engine, @@SESSION.default_storage_engine, @@SESSION.storage_engine;
+@@GLOBAL.default_tmp_storage_engine @@GLOBAL.default_storage_engine @@GLOBAL.storage_engine @@SESSION.default_tmp_storage_engine @@SESSION.default_storage_engine @@SESSION.storage_engine
+NULL MyISAM MyISAM Aria ROCKSDB ROCKSDB
+SELECT @@GLOBAL.table_type;
+ERROR HY000: Unknown system variable 'table_type'
+SET default_storage_engine=DEFAULT;
+SET default_tmp_storage_engine=innodb;
+SELECT @@GLOBAL.default_tmp_storage_engine, @@GLOBAL.default_storage_engine, @@GLOBAL.storage_engine, @@SESSION.default_tmp_storage_engine, @@SESSION.default_storage_engine, @@SESSION.storage_engine;
+@@GLOBAL.default_tmp_storage_engine @@GLOBAL.default_storage_engine @@GLOBAL.storage_engine @@SESSION.default_tmp_storage_engine @@SESSION.default_storage_engine @@SESSION.storage_engine
+NULL MyISAM MyISAM InnoDB MyISAM MyISAM
+CREATE TABLE t (t int);
+CREATE TEMPORARY TABLE t1 (t int);
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `t` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `t` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+DROP TABLE t1, t;
+SET GLOBAL default_tmp_storage_engine='default';
+SELECT @@GLOBAL.default_tmp_storage_engine, @@GLOBAL.default_storage_engine, @@GLOBAL.storage_engine, @@SESSION.default_tmp_storage_engine, @@SESSION.default_storage_engine, @@SESSION.storage_engine;
+@@GLOBAL.default_tmp_storage_engine @@GLOBAL.default_storage_engine @@GLOBAL.storage_engine @@SESSION.default_tmp_storage_engine @@SESSION.default_storage_engine @@SESSION.storage_engine
+MyISAM MyISAM MyISAM InnoDB MyISAM MyISAM
+CREATE TABLE t (t int);
+CREATE TEMPORARY TABLE t1 (t int);
+SHOW CREATE TABLE t;
+Table Create Table
+t CREATE TABLE `t` (
+ `t` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `t` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
+DROP TABLE t1, t;
+SET GLOBAL default_tmp_storage_engine=NULL;
diff --git a/mysql-test/suite/sys_vars/r/innodb_purge_threads_basic.result b/mysql-test/suite/sys_vars/r/innodb_purge_threads_basic.result
index 2cb697acb6d..68d3d40091a 100644
--- a/mysql-test/suite/sys_vars/r/innodb_purge_threads_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_purge_threads_basic.result
@@ -6,9 +6,27 @@ SELECT COUNT(@@innodb_purge_threads);
COUNT(@@innodb_purge_threads)
1
1 Expected
+SET @save_threads = @@GLOBAL.innodb_purge_threads;
+SET @@GLOBAL.innodb_purge_threads=-1;
+Warnings:
+Warning 1292 Truncated incorrect innodb_purge_threads value: '-1'
+SELECT @@GLOBAL.innodb_purge_threads;
+@@GLOBAL.innodb_purge_threads
+1
+SET @@GLOBAL.innodb_purge_threads=0;
+Warnings:
+Warning 1292 Truncated incorrect innodb_purge_threads value: '0'
+SELECT @@GLOBAL.innodb_purge_threads;
+@@GLOBAL.innodb_purge_threads
+1
+SET @@GLOBAL.innodb_purge_threads=33;
+Warnings:
+Warning 1292 Truncated incorrect innodb_purge_threads value: '33'
+SELECT @@GLOBAL.innodb_purge_threads;
+@@GLOBAL.innodb_purge_threads
+32
SET @@GLOBAL.innodb_purge_threads=1;
-ERROR HY000: Variable 'innodb_purge_threads' is a read only variable
-Expected error 'Read-only variable'
+SET @@GLOBAL.innodb_purge_threads=32;
SELECT innodb_purge_threads = @@SESSION.innodb_purge_threads;
ERROR 42S22: Unknown column 'innodb_purge_threads' in 'field list'
Expected error 'Read-only variable'
@@ -38,4 +56,5 @@ SELECT VARIABLE_NAME, VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME = 'innodb_purge_threads';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_PURGE_THREADS 4
+INNODB_PURGE_THREADS 32
+SET GLOBAL innodb_purge_threads = @save_threads;
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 7a524ba2c16..2a7bd72a700 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff
@@ -354,12 +354,3 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -1729,7 +1729,7 @@
- SESSION_VALUE NULL
- DEFAULT_VALUE 0
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Number of undo tablespaces to use.
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 127
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
index 8727d66f59b..5a52b2e4251 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
@@ -1325,7 +1325,7 @@ NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 32
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
-READ_ONLY YES
+READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_RANDOM_READ_AHEAD
SESSION_VALUE NULL
@@ -1679,7 +1679,7 @@ VARIABLE_NAME INNODB_UNDO_TABLESPACES
SESSION_VALUE NULL
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Number of undo tablespaces to use.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 127
diff --git a/mysql-test/suite/sys_vars/r/sysvars_wsrep.result b/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
index 6bea1a88caa..bc1f49195b5 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
@@ -526,21 +526,6 @@ ENUM_VALUE_LIST NONE,ALL,ALL_KILL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
GLOBAL_VALUE_PATH NULL
-VARIABLE_NAME WSREP_REPLICATE_MYISAM
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT To enable myisam replication
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST OFF,ON
-READ_ONLY NO
-COMMAND_LINE_ARGUMENT OPTIONAL
-GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_RESTART_SLAVE
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -721,21 +706,6 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
GLOBAL_VALUE_PATH NULL
-VARIABLE_NAME WSREP_STRICT_DDL
-SESSION_VALUE NULL
-GLOBAL_VALUE OFF
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT If set, reject DDL on affected tables not supporting Galera replication
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST OFF,ON
-READ_ONLY NO
-COMMAND_LINE_ARGUMENT OPTIONAL
-GLOBAL_VALUE_PATH NULL
VARIABLE_NAME WSREP_SYNC_WAIT
SESSION_VALUE 0
GLOBAL_VALUE 0
diff --git a/mysql-test/suite/sys_vars/t/default_tmp_storage_engine_rocksdb.test b/mysql-test/suite/sys_vars/t/default_tmp_storage_engine_rocksdb.test
new file mode 100644
index 00000000000..3454e5d6fc4
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/default_tmp_storage_engine_rocksdb.test
@@ -0,0 +1,86 @@
+--echo #
+--echo # MDEV-12914: Engine for temporary tables which are implicitly
+--echo # created as RocksDB is substitued siliently with MyIsam
+
+--source include/have_rocksdb.inc
+--source include/not_embedded.inc
+--source include/have_innodb.inc
+
+--error ER_UNKNOWN_STORAGE_ENGINE
+SET default_tmp_storage_engine = engine_doesnt_exist;
+--error ER_ILLEGAL_HA_CREATE_OPTION
+SET default_tmp_storage_engine = rocksdb;
+--error ER_ILLEGAL_HA_CREATE_OPTION
+SET default_tmp_storage_engine = CONCAT('rocks','db');
+
+CREATE TABLE t1 (i int) ENGINE = RocksDB;
+SHOW CREATE TABLE t1;
+
+--error ER_ILLEGAL_HA_CREATE_OPTION
+CREATE TEMPORARY TABLE t2 LIKE t1;
+
+DROP TABLE t1;
+
+SET default_storage_engine = DEFAULT;
+SET default_tmp_storage_engine = DEFAULT;
+
+CREATE TABLE t1 (t int);
+SHOW CREATE TABLE t1;
+CREATE TEMPORARY TABLE t2 LIKE t1;
+SHOW CREATE TABLE t2;
+
+DROP TABLE t1, t2;
+
+SET default_storage_engine = rocksdb;
+# setting default or null for tmp SE should use default SE
+SET default_tmp_storage_engine = default;
+
+CREATE TABLE t1 (t int);
+SHOW CREATE TABLE t1;
+
+--error ER_ILLEGAL_HA_CREATE_OPTION
+CREATE TEMPORARY TABLE t2 LIKE t1;
+
+--error ER_ILLEGAL_HA_CREATE_OPTION
+CREATE TEMPORARY TABLE t2 (t int);
+
+SET default_tmp_storage_engine = aria;
+CREATE TEMPORARY TABLE t2 (t int);
+DROP TABLE t2;
+
+--error ER_ILLEGAL_HA_CREATE_OPTION
+CREATE TEMPORARY TABLE t2 LIKE t1;
+
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-26242: Assertion `i >= 0' failed on setting
+--echo # default_tmp_storage_engine to 'DEFAULT' in 10.7
+--echo #
+
+
+SHOW VARIABLES like '%storage_engine';
+SELECT @@GLOBAL.default_tmp_storage_engine, @@GLOBAL.default_storage_engine, @@GLOBAL.storage_engine, @@SESSION.default_tmp_storage_engine, @@SESSION.default_storage_engine, @@SESSION.storage_engine;
+--error ER_UNKNOWN_SYSTEM_VARIABLE
+SELECT @@GLOBAL.table_type;
+
+SET default_storage_engine=DEFAULT;
+SET default_tmp_storage_engine=innodb;
+SELECT @@GLOBAL.default_tmp_storage_engine, @@GLOBAL.default_storage_engine, @@GLOBAL.storage_engine, @@SESSION.default_tmp_storage_engine, @@SESSION.default_storage_engine, @@SESSION.storage_engine;
+
+CREATE TABLE t (t int);
+CREATE TEMPORARY TABLE t1 (t int);
+SHOW CREATE TABLE t;
+SHOW CREATE TABLE t1;
+DROP TABLE t1, t;
+
+SET GLOBAL default_tmp_storage_engine='default';
+SELECT @@GLOBAL.default_tmp_storage_engine, @@GLOBAL.default_storage_engine, @@GLOBAL.storage_engine, @@SESSION.default_tmp_storage_engine, @@SESSION.default_storage_engine, @@SESSION.storage_engine;
+
+CREATE TABLE t (t int);
+CREATE TEMPORARY TABLE t1 (t int);
+SHOW CREATE TABLE t;
+SHOW CREATE TABLE t1;
+DROP TABLE t1, t;
+
+SET GLOBAL default_tmp_storage_engine=NULL; \ No newline at end of file
diff --git a/mysql-test/suite/sys_vars/t/innodb_purge_threads_basic.test b/mysql-test/suite/sys_vars/t/innodb_purge_threads_basic.test
index 4d039601e40..1156fa40a4a 100644
--- a/mysql-test/suite/sys_vars/t/innodb_purge_threads_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_purge_threads_basic.test
@@ -11,9 +11,17 @@ SELECT COUNT(@@GLOBAL.innodb_purge_threads);
SELECT COUNT(@@innodb_purge_threads);
--echo 1 Expected
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET @save_threads = @@GLOBAL.innodb_purge_threads;
+
+SET @@GLOBAL.innodb_purge_threads=-1;
+SELECT @@GLOBAL.innodb_purge_threads;
+SET @@GLOBAL.innodb_purge_threads=0;
+SELECT @@GLOBAL.innodb_purge_threads;
+SET @@GLOBAL.innodb_purge_threads=33;
+SELECT @@GLOBAL.innodb_purge_threads;
+
SET @@GLOBAL.innodb_purge_threads=1;
---echo Expected error 'Read-only variable'
+SET @@GLOBAL.innodb_purge_threads=32;
--Error ER_BAD_FIELD_ERROR
SELECT innodb_purge_threads = @@SESSION.innodb_purge_threads;
@@ -51,3 +59,5 @@ FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME = 'innodb_purge_threads';
--enable_warnings
+
+SET GLOBAL innodb_purge_threads = @save_threads;
diff --git a/mysql-test/suite/sysschema/r/pr_statement_performance_analyzer.result b/mysql-test/suite/sysschema/r/pr_statement_performance_analyzer.result
index df084f8c1a5..c7bb029da39 100644
--- a/mysql-test/suite/sysschema/r/pr_statement_performance_analyzer.result
+++ b/mysql-test/suite/sysschema/r/pr_statement_performance_analyzer.result
@@ -131,7 +131,7 @@ CALL sys.statement_performance_analyzer('do magic', NULL, NULL);
ERROR 45000: Unknown action. Supported actions are: cleanup, create_table, create_tmp, delta, overall, save, snapshot
SET SESSION sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
CALL sys.statement_performance_analyzer('do magic', NULL, NULL);
-ERROR 01000: Data truncated for column 'in_action' at row 1
+ERROR 01000: Data truncated for column 'in_action' at row 0
CALL sys.statement_performance_analyzer('create_tmp', 'sys.tmp_digests', NULL);
ERROR 45000: Invalid value for in_table: `sys`.`tmp_digests` is reserved table name.
CALL sys.statement_performance_analyzer('create_tmp', 'sys.tmp_digests_delta', NULL);
@@ -187,7 +187,7 @@ DROP TEMPORARY TABLE sys.tmp_digests_delta;
ERROR 42S02: Unknown table 'sys.tmp_digests_delta'
SET @identifier := REPEAT('a', 65);
CALL sys.statement_performance_analyzer('snapshot', CONCAT(@identifier, '.', @identifier), NULL);
-ERROR 22001: Data too long for column 'in_table' at row 1
+ERROR 22001: Data too long for column 'in_table' at row 0
DROP TEMPORARY TABLE test.tmp_digests_ini;
DROP TEMPORARY TABLE test.tmp_digests;
DROP TABLE test.tmp_unsupported;
diff --git a/mysql-test/suite/sysschema/r/pr_table_exists.result b/mysql-test/suite/sysschema/r/pr_table_exists.result
index 88917418f67..76085bd72dd 100644
--- a/mysql-test/suite/sysschema/r/pr_table_exists.result
+++ b/mysql-test/suite/sysschema/r/pr_table_exists.result
@@ -40,7 +40,7 @@ SET @identifier := REPEAT('a', 65);
CALL sys.table_exists(@identifier, 't1', @exists);
ERROR 22001: Data too long for column 'in_db' at row 1
CALL sys.table_exists('test', @identifier, @exists);
-ERROR 22001: Data too long for column 'in_table' at row 1
+ERROR 22001: Data too long for column 'in_table' at row 0
SET @identifier := NULL;
#
# MDEV-28391: table_exists procedure fails with
diff --git a/mysql-test/suite/vcol/r/binlog.result b/mysql-test/suite/vcol/r/binlog.result
index 9fd1f9e5b9d..1f66a632697 100644
--- a/mysql-test/suite/vcol/r/binlog.result
+++ b/mysql-test/suite/vcol/r/binlog.result
@@ -88,7 +88,7 @@ CREATE TEMPORARY TABLE t1 SELECT UUID();
show create table t1;
Table Create Table
t1 CREATE TEMPORARY TABLE `t1` (
- `UUID()` varchar(36) DEFAULT NULL
+ `UUID()` uuid DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
CREATE TABLE t2 (a INT PRIMARY KEY, b TEXT, c INT GENERATED ALWAYS AS(b));
INSERT INTO t2 (a,b) VALUES (1,1);
diff --git a/mysql-test/suite/versioning/r/data.result b/mysql-test/suite/versioning/r/data.result
new file mode 100644
index 00000000000..88ba4156afe
--- /dev/null
+++ b/mysql-test/suite/versioning/r/data.result
@@ -0,0 +1,59 @@
+#
+# MDEV-16355 Add option for mysqldump to read data as of specific timestamp from system-versioned tables
+#
+create or replace table t1 (x int) with system versioning;
+set timestamp=unix_timestamp('1990-01-01 00:00');
+insert t1 (x) values (1),(2),(3);
+set timestamp=unix_timestamp('1990-08-03 00:00');
+delete from t1 where x=1;
+set timestamp=unix_timestamp('1991-01-02 00:00');
+delete from t1 where x=2;
+set timestamp=default;
+#MYSQL_DUMP --compact test
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING;
+/*!40101 SET character_set_client = @saved_cs_client */;
+INSERT INTO `t1` VALUES
+(3);
+#MYSQL_DUMP --compact --as-of="1990-01-02 00:00" test
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING;
+/*!40101 SET character_set_client = @saved_cs_client */;
+INSERT INTO `t1` VALUES
+(1),
+(2),
+(3);
+#MYSQL_DUMP --compact --as-of="1990-08-02 00:00" --databases test
+
+CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci */;
+
+USE `test`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING;
+/*!40101 SET character_set_client = @saved_cs_client */;
+INSERT INTO `t1` VALUES
+(1),
+(2),
+(3);
+#MYSQL_DUMP --compact --as-of="1990-08-04 00:00" test t1
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING;
+/*!40101 SET character_set_client = @saved_cs_client */;
+INSERT INTO `t1` VALUES
+(2),
+(3);
+#MYSQL_DUMP --compact --as-of="1990-08-04 00:00' where 'abc" test 2>&1
+mysqldump: Incorrect DATETIME value: '1990-08-04 00:00' where 'abc'
+drop tables t1;
diff --git a/mysql-test/suite/versioning/r/partition,heap.rdiff b/mysql-test/suite/versioning/r/partition,heap.rdiff
new file mode 100644
index 00000000000..361a74a4271
--- /dev/null
+++ b/mysql-test/suite/versioning/r/partition,heap.rdiff
@@ -0,0 +1,86 @@
+@@ -1969,85 +1969,6 @@
+ (PARTITION `p0` HISTORY ENGINE = X,
+ PARTITION `pn` CURRENT ENGINE = X)
+ drop tables t1, tp1;
+-# Complex table
+-create or replace table t1 (
+-x int primary key auto_increment,
+-t timestamp(6) default '2001-11-11 11:11:11',
+-b blob(4096) compressed null,
+-c varchar(1033) character set utf8 not null,
+-u int,
+-unique key (x, u),
+-m enum('a', 'b', 'c') not null default 'a' comment 'absolute',
+-i1 tinyint, i2 smallint, i3 bigint,
+-index three(i1, i2, i3),
+-v1 timestamp(6) generated always as (t + interval 1 day),
+-v2 timestamp(6) generated always as (t + interval 1 month) stored,
+-s timestamp(6) as row start,
+-e timestamp(6) as row end,
+-period for system_time (s, e),
+-ps date, pe date,
+-period for app_time (ps, pe),
+-constraint check_constr check (u > -1))
+-with system versioning default charset=ucs2
+-partition by range(x) (
+-partition p0 values less than (10),
+-partition p1 values less than (20),
+-partition pn values less than maxvalue);
+-alter table t1 convert partition p1 to table tp1;
+-show create table tp1;
+-Table Create Table
+-tp1 CREATE TABLE `tp1` (
+- `x` int(11) NOT NULL AUTO_INCREMENT,
+- `t` timestamp(6) NOT NULL DEFAULT '2001-11-11 11:11:11.000000',
+- `b` blob /*!100301 COMPRESSED*/ DEFAULT NULL,
+- `c` varchar(1033) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
+- `u` int(11) DEFAULT NULL,
+- `m` enum('a','b','c') NOT NULL DEFAULT 'a' COMMENT 'absolute',
+- `i1` tinyint(4) DEFAULT NULL,
+- `i2` smallint(6) DEFAULT NULL,
+- `i3` bigint(20) DEFAULT NULL,
+- `v1` timestamp(6) GENERATED ALWAYS AS (`t` + interval 1 day) VIRTUAL,
+- `v2` timestamp(6) GENERATED ALWAYS AS (`t` + interval 1 month) STORED,
+- `s` timestamp(6) GENERATED ALWAYS AS ROW START,
+- `e` timestamp(6) GENERATED ALWAYS AS ROW END,
+- `ps` date NOT NULL,
+- `pe` date NOT NULL,
+- PERIOD FOR `app_time` (`ps`, `pe`),
+- PRIMARY KEY (`x`,`e`),
+- UNIQUE KEY `x` (`x`,`u`,`e`),
+- KEY `three` (`i1`,`i2`,`i3`),
+- PERIOD FOR SYSTEM_TIME (`s`, `e`),
+- CONSTRAINT `check_constr` CHECK (`u` > -1)
+-) ENGINE=X DEFAULT CHARSET=ucs2 COLLATE=ucs2_general_ci WITH SYSTEM VERSIONING
+-show create table t1;
+-Table Create Table
+-t1 CREATE TABLE `t1` (
+- `x` int(11) NOT NULL AUTO_INCREMENT,
+- `t` timestamp(6) NOT NULL DEFAULT '2001-11-11 11:11:11.000000',
+- `b` blob /*!100301 COMPRESSED*/ DEFAULT NULL,
+- `c` varchar(1033) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
+- `u` int(11) DEFAULT NULL,
+- `m` enum('a','b','c') NOT NULL DEFAULT 'a' COMMENT 'absolute',
+- `i1` tinyint(4) DEFAULT NULL,
+- `i2` smallint(6) DEFAULT NULL,
+- `i3` bigint(20) DEFAULT NULL,
+- `v1` timestamp(6) GENERATED ALWAYS AS (`t` + interval 1 day) VIRTUAL,
+- `v2` timestamp(6) GENERATED ALWAYS AS (`t` + interval 1 month) STORED,
+- `s` timestamp(6) GENERATED ALWAYS AS ROW START,
+- `e` timestamp(6) GENERATED ALWAYS AS ROW END,
+- `ps` date NOT NULL,
+- `pe` date NOT NULL,
+- PERIOD FOR `app_time` (`ps`, `pe`),
+- PRIMARY KEY (`x`,`e`),
+- UNIQUE KEY `x` (`x`,`u`,`e`),
+- KEY `three` (`i1`,`i2`,`i3`),
+- PERIOD FOR SYSTEM_TIME (`s`, `e`),
+- CONSTRAINT `check_constr` CHECK (`u` > -1)
+-) ENGINE=X DEFAULT CHARSET=ucs2 COLLATE=ucs2_general_ci WITH SYSTEM VERSIONING
+- PARTITION BY RANGE (`x`)
+-(PARTITION `p0` VALUES LESS THAN (10) ENGINE = X,
+- PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = X)
+-drop tables t1, tp1;
+ #
+ # End of 10.7 tests
+ #
diff --git a/mysql-test/suite/versioning/r/partition.result b/mysql-test/suite/versioning/r/partition.result
index 91b3e93bc86..3c20aff4f7f 100644
--- a/mysql-test/suite/versioning/r/partition.result
+++ b/mysql-test/suite/versioning/r/partition.result
@@ -253,7 +253,7 @@ t1 CREATE TABLE `t1` (
PARTITION BY SYSTEM_TIME LIMIT 2
PARTITIONS 3
alter table t1 drop partition non_existent;
-ERROR HY000: Error in list of partitions to DROP
+ERROR HY000: Wrong partition name or partition list
insert into t1 values (1), (2), (3), (4), (5), (6);
select * from t1 partition (pn);
x
@@ -1639,6 +1639,7 @@ drop tables t1;
#
# MDEV-22155 ALTER add default history partitions name clash on non-default partitions
#
+set timestamp= default;
create or replace table t1 (x int) with system versioning
partition by system_time limit 1
(partition p2 history, partition p8 history, partition pn current);
@@ -1681,4 +1682,373 @@ drop tables t1;
#
# End of 10.5 tests
#
+#
+# MDEV-22166 MIGRATE PARTITION: move out partition into a table
+#
+create or replace table t1 (x int)
+with system versioning
+partition by range(x) (
+partition p1 values less than (10),
+partition p2 values less than (20),
+partition p3 values less than (30),
+partition p4 values less than (40),
+partition p5 values less than (50),
+partition pn values less than maxvalue);
+insert into t1 values (2), (12), (22), (32), (42), (52);
+update t1 set x= x + 1;
+alter table t1 convert partition p2 to table tp2;
+show create table tp2;
+Table Create Table
+tp2 CREATE TABLE `tp2` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+select * from tp2;
+x
+13
+select * from tp2 for system_time all order by x;
+x
+12
+13
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = X,
+ PARTITION `p3` VALUES LESS THAN (30) ENGINE = X,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = X,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = X,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = X)
+select * from t1 order by x;
+x
+3
+23
+33
+43
+53
+select * from t1 for system_time all order by x;
+x
+2
+3
+22
+23
+32
+33
+42
+43
+52
+53
+# SP
+create or replace procedure sp()
+alter table t1 convert partition p3 to table tp3;
+call sp;
+show create table tp3;
+Table Create Table
+tp3 CREATE TABLE `tp3` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+select * from tp3;
+x
+23
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = X,
+ PARTITION `p4` VALUES LESS THAN (40) ENGINE = X,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = X,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = X)
+select * from t1 order by x;
+x
+3
+33
+43
+53
+drop table tp3;
+call sp;
+ERROR HY000: Wrong partition name or partition list
+call sp;
+ERROR HY000: Wrong partition name or partition list
+drop procedure sp;
+# LOCK TABLES, PS, SP
+create or replace procedure sp()
+alter table t1 convert partition p4 to table tp4;
+lock tables t1 write;
+prepare stmt from 'call sp';
+execute stmt;
+unlock tables;
+show create table tp4;
+Table Create Table
+tp4 CREATE TABLE `tp4` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+select * from tp4;
+x
+33
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p1` VALUES LESS THAN (10) ENGINE = X,
+ PARTITION `p5` VALUES LESS THAN (50) ENGINE = X,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = X)
+select * from t1 order by x;
+x
+3
+43
+53
+drop table tp4;
+lock tables t1 write;
+execute stmt;
+ERROR HY000: Wrong partition name or partition list
+call sp;
+ERROR HY000: Wrong partition name or partition list
+drop prepare stmt;
+unlock tables;
+drop procedure sp;
+unlock tables;
+drop tables t1, tp2;
+# System-versioned tables (SYSTEM_TIME LIMIT)
+create or replace table t1 (
+x int,
+row_start timestamp(6) as row start invisible,
+row_end timestamp(6) as row end invisible,
+period for system_time(row_start, row_end)
+) with system versioning
+partition by system_time limit 1 partitions 4;
+insert into t1 values (2), (12), (22);
+update t1 set x= x + 1 where x = 2;
+update t1 set x= x + 1 where x = 12;
+update t1 set x= x + 1 where x = 22;
+Warnings:
+Warning 4114 Versioned table `test`.`t1`: last HISTORY partition (`p2`) is out of LIMIT, need more HISTORY partitions
+select * from t1 partition (p1);
+x
+12
+alter table t1 convert partition pn to table tp1;
+ERROR HY000: Wrong partitions for `t1`: must have at least one HISTORY and exactly one last CURRENT
+alter table t1 convert partition p1 to table tp1;
+show create table tp1;
+Table Create Table
+tp1 CREATE TABLE `tp1` (
+ `x` int(11) DEFAULT NULL,
+ `row_start` timestamp(6) GENERATED ALWAYS AS ROW START INVISIBLE,
+ `row_end` timestamp(6) GENERATED ALWAYS AS ROW END INVISIBLE,
+ PERIOD FOR SYSTEM_TIME (`row_start`, `row_end`)
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+select * from tp1;
+x
+select * from tp1 for system_time all;
+x
+12
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL,
+ `row_start` timestamp(6) GENERATED ALWAYS AS ROW START INVISIBLE,
+ `row_end` timestamp(6) GENERATED ALWAYS AS ROW END INVISIBLE,
+ PERIOD FOR SYSTEM_TIME (`row_start`, `row_end`)
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME LIMIT 1
+(PARTITION `p0` HISTORY ENGINE = X,
+ PARTITION `p2` HISTORY ENGINE = X,
+ PARTITION `pn` CURRENT ENGINE = X)
+select * from t1 order by x;
+x
+3
+13
+23
+select * from t1 for system_time all order by x;
+x
+2
+3
+13
+22
+23
+drop tables t1, tp1;
+# System-versioned tables (SYSTEM_TIME INTERVAL)
+set timestamp= unix_timestamp('2000-01-01 00:00:00');
+create or replace table t1 (
+x int,
+row_start timestamp(6) as row start invisible,
+row_end timestamp(6) as row end invisible,
+period for system_time(row_start, row_end)
+) with system versioning
+partition by system_time interval 1 hour partitions 4;
+insert into t1 values (2), (12), (22);
+set timestamp= unix_timestamp('2000-01-01 00:00:01');
+update t1 set x= x + 1 where x = 2;
+set timestamp= unix_timestamp('2000-01-01 01:00:00');
+update t1 set x= x + 1 where x = 12;
+set timestamp= unix_timestamp('2000-01-01 02:00:00');
+update t1 set x= x + 1 where x = 22;
+select * from t1 partition (p0);
+x
+2
+select * from t1 partition (p1);
+x
+12
+select * from t1 partition (p2);
+x
+22
+alter table t1 convert partition p1 to table tp1;
+ERROR HY000: Can only drop oldest partitions when rotating by INTERVAL
+alter table t1 convert partition p0 to table tp0;
+alter table t1 convert partition p1 to table tp1;
+alter table t1 convert partition p2 to table tp2;
+ERROR HY000: Wrong partitions for `t1`: must have at least one HISTORY and exactly one last CURRENT
+show create table tp0;
+Table Create Table
+tp0 CREATE TABLE `tp0` (
+ `x` int(11) DEFAULT NULL,
+ `row_start` timestamp(6) GENERATED ALWAYS AS ROW START INVISIBLE,
+ `row_end` timestamp(6) GENERATED ALWAYS AS ROW END INVISIBLE,
+ PERIOD FOR SYSTEM_TIME (`row_start`, `row_end`)
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+show create table tp1;
+Table Create Table
+tp1 CREATE TABLE `tp1` (
+ `x` int(11) DEFAULT NULL,
+ `row_start` timestamp(6) GENERATED ALWAYS AS ROW START INVISIBLE,
+ `row_end` timestamp(6) GENERATED ALWAYS AS ROW END INVISIBLE,
+ PERIOD FOR SYSTEM_TIME (`row_start`, `row_end`)
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+select * from tp0;
+x
+select * from tp1;
+x
+select * from tp0 for system_time all;
+x
+2
+select * from tp1 for system_time all;
+x
+12
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL,
+ `row_start` timestamp(6) GENERATED ALWAYS AS ROW START INVISIBLE,
+ `row_end` timestamp(6) GENERATED ALWAYS AS ROW END INVISIBLE,
+ PERIOD FOR SYSTEM_TIME (`row_start`, `row_end`)
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME INTERVAL 1 HOUR STARTS TIMESTAMP'2000-01-01 02:00:00'
+(PARTITION `p2` HISTORY ENGINE = X,
+ PARTITION `pn` CURRENT ENGINE = X)
+select * from t1;
+x
+3
+13
+23
+select * from t1 for system_time all order by x;
+x
+3
+13
+22
+23
+drop tables t1, tp0, tp1;
+# System-versioned tables (implicit)
+create or replace table t1(x int) with system versioning
+partition by system_time limit 1 partitions 3;
+alter table t1 convert partition p1 to table tp1;
+show create table tp1;
+Table Create Table
+tp1 CREATE TABLE `tp1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) DEFAULT NULL
+) ENGINE=X DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
+ PARTITION BY SYSTEM_TIME LIMIT 1
+(PARTITION `p0` HISTORY ENGINE = X,
+ PARTITION `pn` CURRENT ENGINE = X)
+drop tables t1, tp1;
+# Complex table
+create or replace table t1 (
+x int primary key auto_increment,
+t timestamp(6) default '2001-11-11 11:11:11',
+b blob(4096) compressed null,
+c varchar(1033) character set utf8 not null,
+u int,
+unique key (x, u),
+m enum('a', 'b', 'c') not null default 'a' comment 'absolute',
+i1 tinyint, i2 smallint, i3 bigint,
+index three(i1, i2, i3),
+v1 timestamp(6) generated always as (t + interval 1 day),
+v2 timestamp(6) generated always as (t + interval 1 month) stored,
+s timestamp(6) as row start,
+e timestamp(6) as row end,
+period for system_time (s, e),
+ps date, pe date,
+period for app_time (ps, pe),
+constraint check_constr check (u > -1))
+with system versioning default charset=ucs2
+partition by range(x) (
+partition p0 values less than (10),
+partition p1 values less than (20),
+partition pn values less than maxvalue);
+alter table t1 convert partition p1 to table tp1;
+show create table tp1;
+Table Create Table
+tp1 CREATE TABLE `tp1` (
+ `x` int(11) NOT NULL AUTO_INCREMENT,
+ `t` timestamp(6) NOT NULL DEFAULT '2001-11-11 11:11:11.000000',
+ `b` blob /*!100301 COMPRESSED*/ DEFAULT NULL,
+ `c` varchar(1033) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
+ `u` int(11) DEFAULT NULL,
+ `m` enum('a','b','c') NOT NULL DEFAULT 'a' COMMENT 'absolute',
+ `i1` tinyint(4) DEFAULT NULL,
+ `i2` smallint(6) DEFAULT NULL,
+ `i3` bigint(20) DEFAULT NULL,
+ `v1` timestamp(6) GENERATED ALWAYS AS (`t` + interval 1 day) VIRTUAL,
+ `v2` timestamp(6) GENERATED ALWAYS AS (`t` + interval 1 month) STORED,
+ `s` timestamp(6) GENERATED ALWAYS AS ROW START,
+ `e` timestamp(6) GENERATED ALWAYS AS ROW END,
+ `ps` date NOT NULL,
+ `pe` date NOT NULL,
+ PERIOD FOR `app_time` (`ps`, `pe`),
+ PRIMARY KEY (`x`,`e`),
+ UNIQUE KEY `x` (`x`,`u`,`e`),
+ KEY `three` (`i1`,`i2`,`i3`),
+ PERIOD FOR SYSTEM_TIME (`s`, `e`),
+ CONSTRAINT `check_constr` CHECK (`u` > -1)
+) ENGINE=X DEFAULT CHARSET=ucs2 COLLATE=ucs2_general_ci WITH SYSTEM VERSIONING
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `x` int(11) NOT NULL AUTO_INCREMENT,
+ `t` timestamp(6) NOT NULL DEFAULT '2001-11-11 11:11:11.000000',
+ `b` blob /*!100301 COMPRESSED*/ DEFAULT NULL,
+ `c` varchar(1033) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
+ `u` int(11) DEFAULT NULL,
+ `m` enum('a','b','c') NOT NULL DEFAULT 'a' COMMENT 'absolute',
+ `i1` tinyint(4) DEFAULT NULL,
+ `i2` smallint(6) DEFAULT NULL,
+ `i3` bigint(20) DEFAULT NULL,
+ `v1` timestamp(6) GENERATED ALWAYS AS (`t` + interval 1 day) VIRTUAL,
+ `v2` timestamp(6) GENERATED ALWAYS AS (`t` + interval 1 month) STORED,
+ `s` timestamp(6) GENERATED ALWAYS AS ROW START,
+ `e` timestamp(6) GENERATED ALWAYS AS ROW END,
+ `ps` date NOT NULL,
+ `pe` date NOT NULL,
+ PERIOD FOR `app_time` (`ps`, `pe`),
+ PRIMARY KEY (`x`,`e`),
+ UNIQUE KEY `x` (`x`,`u`,`e`),
+ KEY `three` (`i1`,`i2`,`i3`),
+ PERIOD FOR SYSTEM_TIME (`s`, `e`),
+ CONSTRAINT `check_constr` CHECK (`u` > -1)
+) ENGINE=X DEFAULT CHARSET=ucs2 COLLATE=ucs2_general_ci WITH SYSTEM VERSIONING
+ PARTITION BY RANGE (`x`)
+(PARTITION `p0` VALUES LESS THAN (10) ENGINE = X,
+ PARTITION `pn` VALUES LESS THAN MAXVALUE ENGINE = X)
+drop tables t1, tp1;
+#
+# End of 10.7 tests
+#
set global innodb_stats_persistent= @save_persistent;
diff --git a/mysql-test/suite/versioning/t/alter.test b/mysql-test/suite/versioning/t/alter.test
index 0ec2f887950..76185afd523 100644
--- a/mysql-test/suite/versioning/t/alter.test
+++ b/mysql-test/suite/versioning/t/alter.test
@@ -609,7 +609,7 @@ create or replace table t1 (
period for system_time(row_start, row_end)
) with system versioning;
show create table t1;
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
alter table t1 drop column b;
create or replace table t1 (
@@ -619,7 +619,7 @@ a int, b int primary key,
period for system_time(row_start, row_end)
) with system versioning;
show create table t1;
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
alter table t1 drop column b;
# cleanup
diff --git a/mysql-test/suite/versioning/t/create.test b/mysql-test/suite/versioning/t/create.test
index 87cafdc7d32..6f5153b4ec1 100644
--- a/mysql-test/suite/versioning/t/create.test
+++ b/mysql-test/suite/versioning/t/create.test
@@ -412,11 +412,11 @@ drop tables t0, t1, t2, t3;
--echo #
--echo # MDEV-23968 CREATE TEMPORARY TABLE .. LIKE (system versioned table) returns error if unique index is defined in the table
--echo #
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
create table t1 (id int primary key, index(row_start)) with system versioning;
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
create table t1 (id int primary key, index(row_end)) with system versioning;
---error ER_KEY_COLUMN_DOES_NOT_EXITS
+--error ER_KEY_COLUMN_DOES_NOT_EXIST
create table t1 (id int, primary key(id, row_end, row_end)) with system versioning;
create table t1 (id int primary key) with system versioning;
create temporary table t2 like t1;
diff --git a/mysql-test/suite/versioning/t/data.test b/mysql-test/suite/versioning/t/data.test
new file mode 100644
index 00000000000..4046ec609dd
--- /dev/null
+++ b/mysql-test/suite/versioning/t/data.test
@@ -0,0 +1,32 @@
+--source include/not_embedded.inc
+--source suite/versioning/common.inc
+
+--echo #
+--echo # MDEV-16355 Add option for mysqldump to read data as of specific timestamp from system-versioned tables
+--echo #
+create or replace table t1 (x int) with system versioning;
+set timestamp=unix_timestamp('1990-01-01 00:00');
+insert t1 (x) values (1),(2),(3);
+set timestamp=unix_timestamp('1990-08-03 00:00');
+delete from t1 where x=1;
+set timestamp=unix_timestamp('1991-01-02 00:00');
+delete from t1 where x=2;
+set timestamp=default;
+
+--echo #MYSQL_DUMP --compact test
+--exec $MYSQL_DUMP --compact test
+--echo #MYSQL_DUMP --compact --as-of="1990-01-02 00:00" test
+--exec $MYSQL_DUMP --compact --as-of="1990-01-02 00:00" test
+--echo #MYSQL_DUMP --compact --as-of="1990-08-02 00:00" --databases test
+--exec $MYSQL_DUMP --compact --as-of="1990-08-02 00:00" --databases test
+--echo #MYSQL_DUMP --compact --as-of="1990-08-04 00:00" test t1
+--exec $MYSQL_DUMP --compact --as-of="1990-08-04 00:00" test t1
+## Forged query protection
+--echo #MYSQL_DUMP --compact --as-of="1990-08-04 00:00' where 'abc" test 2>&1
+--replace_result mysqldump.exe mysqldump
+--error 1
+--exec $MYSQL_DUMP --compact --as-of="1990-08-04 00:00' where 'abc" test 2>&1
+
+drop tables t1;
+
+--source suite/versioning/common_finish.inc
diff --git a/mysql-test/suite/versioning/t/partition.test b/mysql-test/suite/versioning/t/partition.test
index 59fe672a98e..de00bdce524 100644
--- a/mysql-test/suite/versioning/t/partition.test
+++ b/mysql-test/suite/versioning/t/partition.test
@@ -232,7 +232,7 @@ partition by system_time limit 2 partitions 3;
--replace_result $default_engine DEFAULT_ENGINE
show create table t1;
---error ER_DROP_PARTITION_NON_EXISTENT
+--error ER_PARTITION_DOES_NOT_EXIST
alter table t1 drop partition non_existent;
insert into t1 values (1), (2), (3), (4), (5), (6);
@@ -1458,6 +1458,7 @@ drop tables t1;
--echo #
--echo # MDEV-22155 ALTER add default history partitions name clash on non-default partitions
--echo #
+set timestamp= default;
create or replace table t1 (x int) with system versioning
partition by system_time limit 1
(partition p2 history, partition p8 history, partition pn current);
@@ -1477,6 +1478,209 @@ drop tables t1;
--echo # End of 10.5 tests
--echo #
+--echo #
+--echo # MDEV-22166 MIGRATE PARTITION: move out partition into a table
+--echo #
+create or replace table t1 (x int)
+with system versioning
+partition by range(x) (
+ partition p1 values less than (10),
+ partition p2 values less than (20),
+ partition p3 values less than (30),
+ partition p4 values less than (40),
+ partition p5 values less than (50),
+ partition pn values less than maxvalue);
+
+insert into t1 values (2), (12), (22), (32), (42), (52);
+update t1 set x= x + 1;
+
+alter table t1 convert partition p2 to table tp2;
+--replace_result $default_engine X ' PAGE_CHECKSUM=1' ''
+show create table tp2;
+select * from tp2;
+select * from tp2 for system_time all order by x;
+
+--replace_result $default_engine X ' PAGE_CHECKSUM=1' ''
+show create table t1;
+select * from t1 order by x;
+select * from t1 for system_time all order by x;
+
+--echo # SP
+create or replace procedure sp()
+alter table t1 convert partition p3 to table tp3;
+call sp;
+--replace_result $default_engine X ' PAGE_CHECKSUM=1' ''
+show create table tp3;
+select * from tp3;
+--replace_result $default_engine X ' PAGE_CHECKSUM=1' ''
+show create table t1;
+select * from t1 order by x;
+drop table tp3;
+--error ER_PARTITION_DOES_NOT_EXIST
+call sp;
+--error ER_PARTITION_DOES_NOT_EXIST
+call sp;
+drop procedure sp;
+
+--echo # LOCK TABLES, PS, SP
+create or replace procedure sp()
+alter table t1 convert partition p4 to table tp4;
+lock tables t1 write;
+prepare stmt from 'call sp';
+execute stmt;
+
+# TODO: don't unlock here (see above TODO)
+unlock tables;
+--replace_result $default_engine X ' PAGE_CHECKSUM=1' ''
+show create table tp4;
+select * from tp4;
+--replace_result $default_engine X ' PAGE_CHECKSUM=1' ''
+show create table t1;
+select * from t1 order by x;
+drop table tp4;
+lock tables t1 write;
+--error ER_PARTITION_DOES_NOT_EXIST
+execute stmt;
+--error ER_PARTITION_DOES_NOT_EXIST
+call sp;
+drop prepare stmt;
+unlock tables;
+drop procedure sp;
+unlock tables;
+
+drop tables t1, tp2;
+
+--echo # System-versioned tables (SYSTEM_TIME LIMIT)
+
+create or replace table t1 (
+ x int,
+ row_start timestamp(6) as row start invisible,
+ row_end timestamp(6) as row end invisible,
+ period for system_time(row_start, row_end)
+) with system versioning
+partition by system_time limit 1 partitions 4;
+
+insert into t1 values (2), (12), (22);
+update t1 set x= x + 1 where x = 2;
+update t1 set x= x + 1 where x = 12;
+update t1 set x= x + 1 where x = 22;
+
+select * from t1 partition (p1);
+--error ER_VERS_WRONG_PARTS
+alter table t1 convert partition pn to table tp1;
+alter table t1 convert partition p1 to table tp1;
+
+--replace_result $default_engine X ' PAGE_CHECKSUM=1' ''
+show create table tp1;
+select * from tp1;
+select * from tp1 for system_time all;
+
+--replace_result $default_engine X ' PAGE_CHECKSUM=1' ''
+show create table t1;
+select * from t1 order by x;
+select * from t1 for system_time all order by x;
+
+drop tables t1, tp1;
+
+--echo # System-versioned tables (SYSTEM_TIME INTERVAL)
+
+set timestamp= unix_timestamp('2000-01-01 00:00:00');
+create or replace table t1 (
+ x int,
+ row_start timestamp(6) as row start invisible,
+ row_end timestamp(6) as row end invisible,
+ period for system_time(row_start, row_end)
+) with system versioning
+partition by system_time interval 1 hour partitions 4;
+
+insert into t1 values (2), (12), (22);
+set timestamp= unix_timestamp('2000-01-01 00:00:01');
+update t1 set x= x + 1 where x = 2;
+set timestamp= unix_timestamp('2000-01-01 01:00:00');
+update t1 set x= x + 1 where x = 12;
+set timestamp= unix_timestamp('2000-01-01 02:00:00');
+update t1 set x= x + 1 where x = 22;
+
+select * from t1 partition (p0);
+select * from t1 partition (p1);
+select * from t1 partition (p2);
+--error ER_VERS_DROP_PARTITION_INTERVAL
+alter table t1 convert partition p1 to table tp1;
+alter table t1 convert partition p0 to table tp0;
+alter table t1 convert partition p1 to table tp1;
+--error ER_VERS_WRONG_PARTS
+alter table t1 convert partition p2 to table tp2;
+
+--replace_result $default_engine X ' PAGE_CHECKSUM=1' ''
+show create table tp0;
+--replace_result $default_engine X ' PAGE_CHECKSUM=1' ''
+show create table tp1;
+select * from tp0;
+select * from tp1;
+select * from tp0 for system_time all;
+select * from tp1 for system_time all;
+
+--replace_result $default_engine X ' PAGE_CHECKSUM=1' ''
+show create table t1;
+select * from t1;
+select * from t1 for system_time all order by x;
+
+drop tables t1, tp0, tp1;
+
+--echo # System-versioned tables (implicit)
+
+create or replace table t1(x int) with system versioning
+partition by system_time limit 1 partitions 3;
+
+alter table t1 convert partition p1 to table tp1;
+--replace_result $default_engine X ' PAGE_CHECKSUM=1' ''
+show create table tp1;
+--replace_result $default_engine X ' PAGE_CHECKSUM=1' ''
+show create table t1;
+
+drop tables t1, tp1;
+
+if (!$MTR_COMBINATION_HEAP)
+{
+--echo # Complex table
+create or replace table t1 (
+ x int primary key auto_increment,
+ t timestamp(6) default '2001-11-11 11:11:11',
+ b blob(4096) compressed null,
+ c varchar(1033) character set utf8 not null,
+ u int,
+ unique key (x, u),
+ m enum('a', 'b', 'c') not null default 'a' comment 'absolute',
+ i1 tinyint, i2 smallint, i3 bigint,
+ index three(i1, i2, i3),
+ v1 timestamp(6) generated always as (t + interval 1 day),
+ v2 timestamp(6) generated always as (t + interval 1 month) stored,
+ s timestamp(6) as row start,
+ e timestamp(6) as row end,
+ period for system_time (s, e),
+ ps date, pe date,
+ period for app_time (ps, pe),
+ constraint check_constr check (u > -1))
+with system versioning default charset=ucs2
+partition by range(x) (
+ partition p0 values less than (10),
+ partition p1 values less than (20),
+ partition pn values less than maxvalue);
+
+alter table t1 convert partition p1 to table tp1;
+
+--replace_result $default_engine X ' PAGE_CHECKSUM=1' ''
+show create table tp1;
+--replace_result $default_engine X ' PAGE_CHECKSUM=1' ''
+show create table t1;
+
+drop tables t1, tp1;
+}
+
+--echo #
+--echo # End of 10.7 tests
+--echo #
+
set global innodb_stats_persistent= @save_persistent;
--source suite/versioning/common_finish.inc
diff --git a/mysql-test/suite/wsrep/r/variables.result b/mysql-test/suite/wsrep/r/variables.result
index 82c480917f1..8e1af35fd62 100644
--- a/mysql-test/suite/wsrep/r/variables.result
+++ b/mysql-test/suite/wsrep/r/variables.result
@@ -105,8 +105,6 @@ WSREP_FORCED_BINLOG_FORMAT
WSREP_GTID_DOMAIN_ID
WSREP_GTID_MODE
WSREP_GTID_SEQ_NO
-WSREP_MODE
-WSREP_STRICT_DDL
WSREP_IGNORE_APPLY_ERRORS
WSREP_LOAD_DATA_SPLITTING
WSREP_LOG_CONFLICTS
@@ -125,7 +123,6 @@ WSREP_PROVIDER
WSREP_PROVIDER_OPTIONS
WSREP_RECOVER
WSREP_REJECT_QUERIES
-WSREP_REPLICATE_MYISAM
WSREP_RESTART_SLAVE
WSREP_RETRY_AUTOCOMMIT
WSREP_SLAVE_FK_CHECKS
@@ -138,7 +135,6 @@ WSREP_SST_DONOR_REJECTS_QUERIES
WSREP_SST_METHOD
WSREP_SST_RECEIVE_ADDRESS
WSREP_START_POSITION
-WSREP_STRICT_DDL
WSREP_SYNC_WAIT
WSREP_TRX_FRAGMENT_SIZE
WSREP_TRX_FRAGMENT_UNIT
diff --git a/mysql-test/suite/wsrep/r/variables_debug.result b/mysql-test/suite/wsrep/r/variables_debug.result
index fe2bffb3f08..0690f540a37 100644
--- a/mysql-test/suite/wsrep/r/variables_debug.result
+++ b/mysql-test/suite/wsrep/r/variables_debug.result
@@ -105,11 +105,13 @@ WSREP_DRUPAL_282555_WORKAROUND
WSREP_FORCED_BINLOG_FORMAT
WSREP_GTID_DOMAIN_ID
WSREP_GTID_MODE
+WSREP_GTID_SEQ_NO
WSREP_IGNORE_APPLY_ERRORS
WSREP_LOAD_DATA_SPLITTING
WSREP_LOG_CONFLICTS
WSREP_MAX_WS_ROWS
WSREP_MAX_WS_SIZE
+WSREP_MODE
WSREP_MYSQL_REPLICATION_BUNDLE
WSREP_NODE_ADDRESS
WSREP_NODE_INCOMING_ADDRESS
@@ -122,7 +124,6 @@ WSREP_PROVIDER
WSREP_PROVIDER_OPTIONS
WSREP_RECOVER
WSREP_REJECT_QUERIES
-WSREP_REPLICATE_MYISAM
WSREP_RESTART_SLAVE
WSREP_RETRY_AUTOCOMMIT
WSREP_SLAVE_FK_CHECKS