summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2010-08-02 12:01:24 +0300
committerMichael Widenius <monty@askmonty.org>2010-08-02 12:01:24 +0300
commite0a6b02c5d0a311e7167295494786077009743d1 (patch)
tree72c934fe42261ad5de3139961e092f57e9d147df /mysql-test
parentd2f8b7d04503478ab6b6998194a2070891f0c2bb (diff)
parent6ad06b15222300e4eed4fe3972d1ad249c4c42a2 (diff)
downloadmariadb-git-e0a6b02c5d0a311e7167295494786077009743d1.tar.gz
Merge with MySQL 5.1.49
Fixed Bug#52005 'JOIN_TAB->dependent' may be incorrectly propageted for multilevel outer joins' in a better way (patch from Sergey Petrunya)
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/Makefile.am1
-rw-r--r--mysql-test/collections/default.experimental5
-rw-r--r--mysql-test/extra/binlog_tests/binlog.test25
-rw-r--r--mysql-test/extra/binlog_tests/blackhole.test24
-rw-r--r--mysql-test/extra/binlog_tests/mix_innodb_myisam_side_effects.test2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_deadlock.test7
-rw-r--r--mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test67
-rw-r--r--mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test118
-rw-r--r--mysql-test/extra/rpl_tests/rpl_flsh_tbls.test12
-rw-r--r--mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test20
-rw-r--r--mysql-test/extra/rpl_tests/rpl_insert_delayed.test17
-rw-r--r--mysql-test/extra/rpl_tests/rpl_log.test57
-rw-r--r--mysql-test/extra/rpl_tests/rpl_max_relay_size.test19
-rw-r--r--mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test38
-rw-r--r--mysql-test/extra/rpl_tests/rpl_record_compare.test68
-rw-r--r--mysql-test/extra/rpl_tests/rpl_reset_slave.test59
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_basic.test32
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_tabledefs.test38
-rw-r--r--mysql-test/include/check_concurrent_insert.inc96
-rw-r--r--mysql-test/include/check_no_concurrent_insert.inc81
-rw-r--r--mysql-test/include/check_no_row_lock.inc71
-rw-r--r--mysql-test/include/check_shared_row_lock.inc61
-rw-r--r--mysql-test/include/check_slave_is_running.inc18
-rw-r--r--mysql-test/include/check_slave_no_error.inc17
-rw-r--r--mysql-test/include/check_slave_param.inc16
-rw-r--r--mysql-test/include/get_relay_log_pos.inc70
-rw-r--r--mysql-test/include/mysqlhotcopy.inc121
-rw-r--r--mysql-test/include/rpl_stmt_seq.inc30
-rw-r--r--mysql-test/include/show_binlog_events.inc41
-rw-r--r--mysql-test/include/show_rpl_debug_info.inc2
-rw-r--r--mysql-test/include/show_slave_status.inc25
-rw-r--r--mysql-test/include/show_slave_status2.inc8
-rw-r--r--mysql-test/include/test_fieldsize.inc7
-rw-r--r--mysql-test/include/wait_for_binlog_event.inc2
-rw-r--r--mysql-test/include/wait_for_slave_io_error.inc48
-rw-r--r--mysql-test/include/wait_for_slave_param.inc2
-rw-r--r--mysql-test/include/wait_for_slave_sql_error.inc17
-rw-r--r--mysql-test/include/wait_for_slave_sql_error_and_skip.inc27
-rw-r--r--mysql-test/include/wait_for_status_var.inc4
-rw-r--r--mysql-test/include/wait_until_count_sessions.inc1
-rw-r--r--mysql-test/lib/mtr_cases.pm6
-rw-r--r--mysql-test/lib/mtr_misc.pl22
-rw-r--r--mysql-test/lib/v1/mtr_process.pl3
-rwxr-xr-xmysql-test/mysql-test-run.pl11
-rw-r--r--mysql-test/r/alter_table-big.result32
-rw-r--r--mysql-test/r/bug39022.result6
-rw-r--r--mysql-test/r/create-big.result54
-rw-r--r--mysql-test/r/ctype_cp932_binlog_stm.result12
-rw-r--r--mysql-test/r/delete.result9
-rw-r--r--mysql-test/r/error_simulation.result44
-rw-r--r--mysql-test/r/events_scheduling.result19
-rw-r--r--mysql-test/r/explain.result13
-rw-r--r--mysql-test/r/flush_block_commit_notembedded.result10
-rw-r--r--mysql-test/r/func_in.result20
-rw-r--r--mysql-test/r/func_isnull.result14
-rw-r--r--mysql-test/r/func_like.result14
-rw-r--r--mysql-test/r/group_by.result20
-rw-r--r--mysql-test/r/group_min_max.result13
-rw-r--r--mysql-test/r/handler_myisam.result93
-rw-r--r--mysql-test/r/information_schema.result10
-rw-r--r--mysql-test/r/innodb_mysql_lock2.result601
-rw-r--r--mysql-test/r/join_outer.result89
-rw-r--r--mysql-test/r/loaddata.result7
-rw-r--r--mysql-test/r/lock_sync.result631
-rw-r--r--mysql-test/r/log_state.result33
-rw-r--r--mysql-test/r/multi_update.result6
-rw-r--r--mysql-test/r/mysqldump.result15
-rw-r--r--mysql-test/r/mysqlhotcopy_archive.result118
-rw-r--r--mysql-test/r/mysqlhotcopy_myisam.result164
-rw-r--r--mysql-test/r/outfile_loaddata.result20
-rw-r--r--mysql-test/r/partition_error.result24
-rw-r--r--mysql-test/r/range.result44
-rw-r--r--mysql-test/r/renamedb.result2
-rw-r--r--mysql-test/r/schema.result19
-rw-r--r--mysql-test/r/select.result15
-rw-r--r--mysql-test/r/sp_trans_log.result12
-rw-r--r--mysql-test/r/subselect.result17
-rw-r--r--mysql-test/r/type_time.result10
-rw-r--r--mysql-test/r/upgrade.result28
-rw-r--r--mysql-test/r/variables.result9
-rw-r--r--mysql-test/r/variables_debug.result2
-rw-r--r--mysql-test/std_data/intersect-bug50389.tsv441
-rw-r--r--mysql-test/suite/binlog/r/binlog_base64_flag.result11
-rw-r--r--mysql-test/suite/binlog/r/binlog_innodb.result12
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_binlog.result2069
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result4
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_binlog.result1070
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_blackhole.result12
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result5
-rw-r--r--mysql-test/suite/binlog/t/binlog_base64_flag.test13
-rw-r--r--mysql-test/suite/binlog/t/binlog_innodb.test6
-rw-r--r--mysql-test/suite/binlog/t/binlog_killed.test2
-rw-r--r--mysql-test/suite/binlog/t/binlog_stm_binlog.test3
-rw-r--r--mysql-test/suite/bugs/r/rpl_bug12691.result9
-rw-r--r--mysql-test/suite/bugs/r/rpl_bug36391.result3
-rw-r--r--mysql-test/suite/bugs/t/rpl_bug12691.test4
-rw-r--r--mysql-test/suite/bugs/t/rpl_bug36391.test4
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_000015.result143
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_REDIRECT.result3
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_change_master.result6
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_empty_master_crash.result2
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_flushlog_loop.result41
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_loaddata_s.result2
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_log_pos.result28
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_rbr_to_sbr.result51
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_row_drop.result9
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_row_inexist_tbl.result40
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_row_max_relay_size.result239
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_row_reset_slave.result179
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_row_until.result188
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_server_id1.result4
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_server_id2.result3
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_slave_status.result39
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_stm_max_relay_size.result239
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_stm_reset_slave.result179
-rw-r--r--mysql-test/suite/engines/funcs/r/rpl_switch_stm_row_mixed.result4
-rw-r--r--mysql-test/suite/engines/funcs/t/rpl_000015.test26
-rw-r--r--mysql-test/suite/engines/funcs/t/rpl_REDIRECT.test12
-rw-r--r--mysql-test/suite/engines/funcs/t/rpl_change_master.test25
-rw-r--r--mysql-test/suite/engines/funcs/t/rpl_empty_master_crash.test3
-rw-r--r--mysql-test/suite/engines/funcs/t/rpl_flushlog_loop.test7
-rw-r--r--mysql-test/suite/engines/funcs/t/rpl_loaddata_s.test4
-rw-r--r--mysql-test/suite/engines/funcs/t/rpl_log_pos.test45
-rw-r--r--mysql-test/suite/engines/funcs/t/rpl_rbr_to_sbr.test16
-rw-r--r--mysql-test/suite/engines/funcs/t/rpl_row_drop.test5
-rw-r--r--mysql-test/suite/engines/funcs/t/rpl_row_inexist_tbl.test10
-rw-r--r--mysql-test/suite/engines/funcs/t/rpl_row_until.test49
-rw-r--r--mysql-test/suite/engines/funcs/t/rpl_server_id1.test9
-rw-r--r--mysql-test/suite/engines/funcs/t/rpl_server_id2.test3
-rw-r--r--mysql-test/suite/engines/funcs/t/rpl_slave_status.test12
-rw-r--r--mysql-test/suite/engines/funcs/t/rpl_switch_stm_row_mixed.test8
-rw-r--r--mysql-test/suite/innodb/r/innodb-autoinc-optimize.result (renamed from mysql-test/r/innodb-autoinc-optimize.result)0
-rw-r--r--mysql-test/suite/innodb/r/innodb-ucs2.result (renamed from mysql-test/r/innodb-ucs2.result)0
-rw-r--r--mysql-test/suite/innodb/r/innodb.result2353
-rw-r--r--mysql-test/suite/innodb/r/innodb_autoinc_lock_mode_zero.result (renamed from mysql-test/r/innodb_autoinc_lock_mode_zero.result)0
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug30919.result (renamed from mysql-test/r/innodb_bug30919.result)0
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug42419.result (renamed from mysql-test/r/innodb_bug42419.result)0
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug48024.result10
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug49164.result42
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug53674.result11
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug54044.result3
-rw-r--r--mysql-test/suite/innodb/r/innodb_gis.result (renamed from mysql-test/r/innodb_gis.result)0
-rw-r--r--mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result (renamed from mysql-test/r/innodb_lock_wait_timeout_1.result)0
-rw-r--r--mysql-test/suite/innodb/r/innodb_multi_update.result76
-rw-r--r--mysql-test/suite/innodb/r/innodb_mysql.result2510
-rw-r--r--mysql-test/suite/innodb/r/innodb_mysql_rbk.result (renamed from mysql-test/r/innodb_mysql_rbk.result)0
-rw-r--r--mysql-test/suite/innodb/r/innodb_notembedded.result (renamed from mysql-test/r/innodb_notembedded.result)0
-rw-r--r--mysql-test/suite/innodb/r/innodb_timeout_rollback.result (renamed from mysql-test/r/innodb_timeout_rollback.result)0
-rw-r--r--mysql-test/suite/innodb/t/disabled.def2
-rw-r--r--mysql-test/suite/innodb/t/innodb-autoinc-optimize.test (renamed from mysql-test/t/innodb-autoinc-optimize.test)0
-rw-r--r--mysql-test/suite/innodb/t/innodb-ucs2.test (renamed from mysql-test/t/innodb-ucs2.test)0
-rw-r--r--mysql-test/suite/innodb/t/innodb.test1387
-rw-r--r--mysql-test/suite/innodb/t/innodb_autoinc_lock_mode_zero-master.opt (renamed from mysql-test/t/innodb_autoinc_lock_mode_zero-master.opt)0
-rw-r--r--mysql-test/suite/innodb/t/innodb_autoinc_lock_mode_zero.test (renamed from mysql-test/t/innodb_autoinc_lock_mode_zero.test)0
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug30919-master.opt (renamed from mysql-test/t/innodb_bug30919-master.opt)0
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug30919.test (renamed from mysql-test/t/innodb_bug30919.test)0
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug42419.test (renamed from mysql-test/t/innodb_bug42419.test)0
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug48024.test22
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug49164.test47
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug53674-master.opt1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug53674.test8
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug54044.test11
-rw-r--r--mysql-test/suite/innodb/t/innodb_gis.test (renamed from mysql-test/t/innodb_gis.test)0
-rw-r--r--mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1-master.opt (renamed from mysql-test/t/innodb_lock_wait_timeout_1-master.opt)0
-rw-r--r--mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test (renamed from mysql-test/t/innodb_lock_wait_timeout_1.test)0
-rw-r--r--mysql-test/suite/innodb/t/innodb_multi_update.test29
-rw-r--r--mysql-test/suite/innodb/t/innodb_mysql-master.opt (renamed from mysql-test/t/innodb_mysql-master.opt)0
-rw-r--r--mysql-test/suite/innodb/t/innodb_mysql.test755
-rw-r--r--mysql-test/suite/innodb/t/innodb_mysql_rbk-master.opt (renamed from mysql-test/t/innodb_mysql_rbk-master.opt)0
-rw-r--r--mysql-test/suite/innodb/t/innodb_mysql_rbk.test (renamed from mysql-test/t/innodb_mysql_rbk.test)0
-rw-r--r--mysql-test/suite/innodb/t/innodb_notembedded.test (renamed from mysql-test/t/innodb_notembedded.test)0
-rw-r--r--mysql-test/suite/innodb/t/innodb_timeout_rollback-master.opt (renamed from mysql-test/t/innodb_timeout_rollback-master.opt)0
-rw-r--r--mysql-test/suite/innodb/t/innodb_timeout_rollback.test (renamed from mysql-test/t/innodb_timeout_rollback.test)0
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb-autoinc-optimize.result9
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb-ucs2.result314
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb.result80
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_autoinc_lock_mode_zero.result39
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_bug30919.result1043
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_bug42419.result17
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_bug48024.result10
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_bug49164.result42
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_bug53290.result17
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_bug53591.result16
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_bug53592.result26
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_bug53674.result11
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_bug54044.result3
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_bug54679.result91
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_gis.result589
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_lock_wait_timeout_1.result375
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_multi_update.result76
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_mysql.result (renamed from mysql-test/r/innodb_mysql.result)64
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_mysql_rbk.result21
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_notembedded.result23
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_timeout_rollback.result36
-rw-r--r--mysql-test/suite/innodb_plugin/t/disabled.def11
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb-autoinc-optimize.test19
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb-ucs2.test230
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb.test27
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_autoinc_lock_mode_zero-master.opt1
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_autoinc_lock_mode_zero.test44
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_bug30919-master.opt1
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_bug30919.test68
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_bug42419.test78
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_bug48024.test22
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_bug49164.test47
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_bug53290.test22
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_bug53591.test22
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_bug53592.test59
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_bug53674-master.opt1
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_bug53674.test8
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_bug54044.test11
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_bug54679.test97
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_gis.test10
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_lock_wait_timeout_1-master.opt1
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_lock_wait_timeout_1.test264
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_multi_update.test29
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_mysql-master.opt1
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_mysql.test (renamed from mysql-test/t/innodb_mysql.test)65
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_mysql_rbk-master.opt1
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_mysql_rbk.test35
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_notembedded.test50
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_timeout_rollback-master.opt1
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_timeout_rollback.test5
-rw-r--r--mysql-test/suite/manual/r/rpl_replication_delay.result117
-rw-r--r--mysql-test/suite/manual/t/rpl_replication_delay.test16
-rw-r--r--mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result612
-rw-r--r--mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result22
-rw-r--r--mysql-test/suite/parts/r/partition_debug_sync_innodb.result61
-rw-r--r--mysql-test/suite/parts/r/rpl_partition.result40
-rw-r--r--mysql-test/suite/parts/t/partition_debug_sync_innodb-master.opt1
-rw-r--r--mysql-test/suite/parts/t/partition_debug_sync_innodb.test44
-rw-r--r--mysql-test/suite/parts/t/rpl_partition.test4
-rw-r--r--mysql-test/suite/rpl/include/rpl_mixed_ddl.inc4
-rw-r--r--mysql-test/suite/rpl/include/rpl_mixed_dml.inc5
-rw-r--r--mysql-test/suite/rpl/r/rpl_000015.result141
-rw-r--r--mysql-test/suite/rpl/r/rpl_binlog_grant.result24
-rw-r--r--mysql-test/suite/rpl/r/rpl_bug33931.result40
-rw-r--r--mysql-test/suite/rpl/r/rpl_change_master.result80
-rw-r--r--mysql-test/suite/rpl/r/rpl_deadlock_innodb.result122
-rw-r--r--mysql-test/suite/rpl/r/rpl_do_grant.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_dual_pos_advance.result14
-rw-r--r--mysql-test/suite/rpl/r/rpl_empty_master_crash.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_extraCol_innodb.result409
-rw-r--r--mysql-test/suite/rpl/r/rpl_extraCol_myisam.result409
-rw-r--r--mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result906
-rw-r--r--mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result906
-rw-r--r--mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result32
-rw-r--r--mysql-test/suite/rpl/r/rpl_flushlog_loop.result44
-rw-r--r--mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result5
-rw-r--r--mysql-test/suite/rpl/r/rpl_grant.result39
-rw-r--r--mysql-test/suite/rpl/r/rpl_incident.result80
-rw-r--r--mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result39
-rw-r--r--mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result527
-rw-r--r--mysql-test/suite/rpl/r/rpl_known_bugs_detection.result84
-rw-r--r--mysql-test/suite/rpl/r/rpl_loaddata_fatal.result82
-rw-r--r--mysql-test/suite/rpl/r/rpl_log_pos.result84
-rw-r--r--mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result69
-rw-r--r--mysql-test/suite/rpl/r/rpl_replicate_do.result38
-rw-r--r--mysql-test/suite/rpl/r/rpl_rotate_logs.result114
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result13
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result12
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result12
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_colSize.result520
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_create_table.result151
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_drop.result9
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_find_row.result (renamed from mysql-test/suite/rpl/r/rpl_row_disabled_slave_key.result)12
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_log.result138
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_log_innodb.result138
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_max_relay_size.result239
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result46
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result60
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_reset_slave.result179
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result215
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result215
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_until.result166
-rw-r--r--mysql-test/suite/rpl/r/rpl_skip_error.result80
-rw-r--r--mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result39
-rw-r--r--mysql-test/suite/rpl/r/rpl_slave_skip.result82
-rw-r--r--mysql-test/suite/rpl/r/rpl_sp.result178
-rw-r--r--mysql-test/suite/rpl/r/rpl_ssl.result74
-rw-r--r--mysql-test/suite/rpl/r/rpl_ssl1.result111
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result22
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_log.result110
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result239
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result21
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_reset_slave.result179
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_until.result174
-rw-r--r--mysql-test/suite/rpl/r/rpl_temporary_errors.result97
-rw-r--r--mysql-test/suite/rpl/t/rpl_000015-slave.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_000015.cnf2
-rw-r--r--mysql-test/suite/rpl/t/rpl_000015.test40
-rw-r--r--mysql-test/suite/rpl/t/rpl_binlog_grant.test10
-rw-r--r--mysql-test/suite/rpl/t/rpl_bug33931.test7
-rw-r--r--mysql-test/suite/rpl/t/rpl_change_master.test22
-rw-r--r--mysql-test/suite/rpl/t/rpl_critical_errors.test12
-rw-r--r--mysql-test/suite/rpl/t/rpl_do_grant.test23
-rw-r--r--mysql-test/suite/rpl/t/rpl_dual_pos_advance.test54
-rw-r--r--mysql-test/suite/rpl/t/rpl_empty_master_crash.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_flushlog_loop.test26
-rw-r--r--mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test10
-rw-r--r--mysql-test/suite/rpl/t/rpl_grant.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_incident.test9
-rw-r--r--mysql-test/suite/rpl/t/rpl_known_bugs_detection.test14
-rw-r--r--mysql-test/suite/rpl/t/rpl_loaddata_fatal.test10
-rw-r--r--mysql-test/suite/rpl/t/rpl_log_pos.test11
-rw-r--r--mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test14
-rw-r--r--mysql-test/suite/rpl/t/rpl_replicate_do.test6
-rw-r--r--mysql-test/suite/rpl/t/rpl_rotate_logs.test10
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_create_table.test32
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_drop.test5
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_find_row.test (renamed from mysql-test/suite/rpl/t/rpl_row_disabled_slave_key.test)31
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test10
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test31
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_until.test41
-rw-r--r--mysql-test/suite/rpl/t/rpl_skip_error.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test9
-rw-r--r--mysql-test/suite/rpl/t/rpl_slave_skip.test19
-rw-r--r--mysql-test/suite/rpl/t/rpl_sp.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_ssl.test11
-rw-r--r--mysql-test/suite/rpl/t/rpl_ssl1.test17
-rw-r--r--mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test38
-rw-r--r--mysql-test/suite/rpl/t/rpl_stm_until.test42
-rw-r--r--mysql-test/suite/rpl/t/rpl_temporary_errors.test42
-rw-r--r--mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test1
-rw-r--r--mysql-test/suite/rpl_ndb/my.cnf4
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result40
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result80
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result80
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result409
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result11
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result162
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result29
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result286
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result4
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result23
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result40
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result12
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result70
-rw-r--r--mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test9
-rw-r--r--mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test16
-rw-r--r--mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test12
-rw-r--r--mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test14
-rw-r--r--mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test23
-rw-r--r--mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-master.opt1
-rw-r--r--mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-slave.opt1
-rw-r--r--mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test349
-rw-r--r--mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test2
-rw-r--r--mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test4
-rw-r--r--mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test6
-rw-r--r--mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test9
-rw-r--r--mysql-test/suite/sys_vars/r/slow_query_log_func.result73
-rw-r--r--mysql-test/suite/sys_vars/r/tx_isolation_func.result25
-rw-r--r--mysql-test/suite/sys_vars/t/slow_query_log_func.test87
-rw-r--r--mysql-test/suite/sys_vars/t/tx_isolation_func.test3
-rw-r--r--mysql-test/t/alter_table-big.test8
-rw-r--r--mysql-test/t/bug39022.test6
-rw-r--r--mysql-test/t/create-big.test12
-rw-r--r--mysql-test/t/ctype_cp932_binlog_stm.test3
-rw-r--r--mysql-test/t/delete.test12
-rw-r--r--mysql-test/t/disabled.def5
-rw-r--r--mysql-test/t/error_simulation.test43
-rw-r--r--mysql-test/t/events_scheduling.test26
-rw-r--r--mysql-test/t/explain.test15
-rw-r--r--mysql-test/t/flush_block_commit_notembedded.test4
-rw-r--r--mysql-test/t/func_in.test15
-rw-r--r--mysql-test/t/func_isnull.test15
-rw-r--r--mysql-test/t/func_like.test18
-rw-r--r--mysql-test/t/group_by.test15
-rw-r--r--mysql-test/t/group_min_max.test15
-rw-r--r--mysql-test/t/handler_myisam.test49
-rw-r--r--mysql-test/t/information_schema.test9
-rw-r--r--mysql-test/t/innodb_mysql_lock2.test803
-rw-r--r--mysql-test/t/join_outer.test68
-rw-r--r--mysql-test/t/loaddata.test20
-rw-r--r--mysql-test/t/lock_sync.test867
-rw-r--r--mysql-test/t/log_state.test38
-rw-r--r--mysql-test/t/multi_update.test6
-rw-r--r--mysql-test/t/mysqldump.test29
-rw-r--r--mysql-test/t/mysqlhotcopy_archive.test8
-rw-r--r--mysql-test/t/mysqlhotcopy_myisam.test7
-rw-r--r--mysql-test/t/outfile_loaddata.test34
-rw-r--r--mysql-test/t/partition_error.test32
-rw-r--r--mysql-test/t/range.test41
-rw-r--r--mysql-test/t/renamedb.test2
-rw-r--r--mysql-test/t/schema.test47
-rw-r--r--mysql-test/t/select.test11
-rw-r--r--mysql-test/t/sp_trans_log.test4
-rw-r--r--mysql-test/t/subselect.test25
-rw-r--r--mysql-test/t/type_time.test12
-rw-r--r--mysql-test/t/upgrade.test34
-rw-r--r--mysql-test/t/variables.test17
-rw-r--r--mysql-test/t/variables_debug.test3
-rw-r--r--mysql-test/valgrind.supp6
397 files changed, 21771 insertions, 12260 deletions
diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am
index 489785e553d..8dce3ab2df5 100644
--- a/mysql-test/Makefile.am
+++ b/mysql-test/Makefile.am
@@ -103,6 +103,7 @@ TEST_DIRS = t r include std_data std_data/parts collections \
suite/parts suite/parts/t suite/parts/r suite/parts/inc \
suite/pbxt/t suite/pbxt/r \
suite/innodb suite/innodb/t suite/innodb/r suite/innodb/include \
+ suite/innodb_plugin suite/innodb_plugin/t suite/innodb_plugin/r suite/innodb_plugin/include \
suite/engines suite/engines/funcs suite/engines/iuds suite/engines/rr_trx \
suite/engines/funcs/r suite/engines/funcs/t suite/engines/iuds/r \
suite/engines/iuds/t suite/engines/rr_trx/include suite/engines/rr_trx/r \
diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental
index d791686cd62..f84337660ea 100644
--- a/mysql-test/collections/default.experimental
+++ b/mysql-test/collections/default.experimental
@@ -13,12 +13,15 @@ funcs_1.ndb* # joro : NDB tests marked as experiment
funcs_2.ndb_charset # joro : NDB tests marked as experimental as agreed with bochklin
main.ctype_gbk_binlog @solaris # Bug#46010: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists
+main.func_str @solaris # joro: Bug#40928
main.plugin_load @solaris # Bug#42144
+main.sp @solaris # joro : Bug#54138
main.outfile_loaddata @solaris # joro : Bug #46895
ndb.* # joro : NDB tests marked as experimental as agreed with bochklin
rpl.rpl_innodb_bug28430* @solaris # Bug#46029
+rpl.rpl_row_sp011 @solaris # Joro : Bug #54138
rpl_ndb.* # joro : NDB tests marked as experimental as agreed with bochklin
rpl_ndb.rpl_ndb_log # Bug#38998
@@ -39,3 +42,5 @@ parts.partition_mgm_lc1_ndb # joro : NDB tests marked as experiment
parts.partition_mgm_lc2_ndb # joro : NDB tests marked as experimental as agreed with bochklin
parts.partition_syntax_ndb # joro : NDB tests marked as experimental as agreed with bochklin
parts.partition_value_ndb # joro : NDB tests marked as experimental as agreed with bochklin
+main.mysqlhotcopy_myisam # horst: due to bug#54129
+main.mysqlhotcopy_archive # horst: due to bug#54129
diff --git a/mysql-test/extra/binlog_tests/binlog.test b/mysql-test/extra/binlog_tests/binlog.test
index b819996acb0..7f48341077e 100644
--- a/mysql-test/extra/binlog_tests/binlog.test
+++ b/mysql-test/extra/binlog_tests/binlog.test
@@ -41,13 +41,10 @@ while ($1)
--enable_query_log
commit;
drop table t1;
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events in 'master-bin.000001' from 106;
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
-show binlog events in 'master-bin.000002' from 106;
-
+--source include/show_binlog_events.inc
+--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+--source include/show_binlog_events.inc
+--let $binlog_file=
#
# Bug#22540 - Incorrect value in column End_log_pos of
@@ -77,8 +74,7 @@ insert into t1 values (2);
insert into t1 values (3);
commit;
drop table t1;
---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
-show binlog events from 0;
+--source include/show_binlog_events.inc
# now show that nothing breaks if we need to read from the cache more
# than once, resulting in split event-headers
@@ -100,8 +96,7 @@ while ($1)
commit;
enable_query_log;
---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
-show binlog events from 0;
+--source include/show_binlog_events.inc
drop table t1;
@@ -122,8 +117,7 @@ set @b= 14632475938453979136;
execute stmt using @a, @b;
deallocate prepare stmt;
drop table t1;
---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
-show binlog events from 0;
+--source include/show_binlog_events.inc
#
@@ -249,14 +243,15 @@ reset master;
drop table if exists t3;
--enable_warnings
create table t3 (a int(11) NOT NULL AUTO_INCREMENT, b text, PRIMARY KEY (a) ) engine=innodb;
-show master status;
+source include/show_master_status.inc;
let $it=4;
while ($it)
{
insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
dec $it;
}
-show master status /* must show new binlog index after rotating */;
+# must show new binlog index after rotating;
+source include/show_master_status.inc;
drop table t3;
--echo #
diff --git a/mysql-test/extra/binlog_tests/blackhole.test b/mysql-test/extra/binlog_tests/blackhole.test
index 14c15a58e18..da63a7a8619 100644
--- a/mysql-test/extra/binlog_tests/blackhole.test
+++ b/mysql-test/extra/binlog_tests/blackhole.test
@@ -125,12 +125,7 @@ select * from t1;
select * from t2;
select * from t3;
-let $VERSION=`select version()`;
---replace_result $VERSION VERSION
---replace_column 2 # 4 # 5 #
---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
---replace_regex /file_id=[0-9]+/file_id=#/
-show binlog events;
+--source include/show_binlog_events.inc
drop table t1,t2,t3;
@@ -168,18 +163,21 @@ set autocommit=0;
start transaction;
insert into t1 values(1);
commit;
+
+let $master_log_pos_1= query_get_value(SHOW MASTER STATUS, Position, 1);
+
start transaction;
insert into t1 values(2);
rollback;
-set autocommit=1;
-let $VERSION=`select version()`;
---replace_result $VERSION VERSION
---replace_column 2 # 4 # 5 #
---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
---replace_regex /file_id=[0-9]+/file_id=#/
-show binlog events;
+let $master_log_pos_2= query_get_value(SHOW MASTER STATUS, Position, 1);
+if (`SELECT $master_log_pos_2 <> $master_log_pos_1`)
+{
+ echo $master_log_pos_1 $master_log_pos_2;
+ die Rollbacked transaction has been binlogged;
+}
+set autocommit=1;
drop table if exists t1;
#
diff --git a/mysql-test/extra/binlog_tests/mix_innodb_myisam_side_effects.test b/mysql-test/extra/binlog_tests/mix_innodb_myisam_side_effects.test
index 26a70c4319e..68aa949a7c7 100644
--- a/mysql-test/extra/binlog_tests/mix_innodb_myisam_side_effects.test
+++ b/mysql-test/extra/binlog_tests/mix_innodb_myisam_side_effects.test
@@ -214,7 +214,7 @@ CREATE TABLE t5 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
# execute
--error ER_DUP_ENTRY
- UPDATE t3,t4 SET t3.a=t4.a + bug27417(1);
+ UPDATE t3,t4 SET t3.a = t4.a + bug27417(1) where t3.a = 1;
# check
select count(*) from t1 /* must be 1 */;
diff --git a/mysql-test/extra/rpl_tests/rpl_deadlock.test b/mysql-test/extra/rpl_tests/rpl_deadlock.test
index 1b331cc948b..607348ae97b 100644
--- a/mysql-test/extra/rpl_tests/rpl_deadlock.test
+++ b/mysql-test/extra/rpl_tests/rpl_deadlock.test
@@ -61,7 +61,7 @@ sync_with_master;
SELECT * FROM t1;
SELECT * FROM t3;
# Check that no error is reported
---source include/show_slave_status2.inc
+source include/check_slave_is_running.inc;
--echo
# 2) Test lock wait timeout
@@ -89,7 +89,7 @@ sync_with_master;
SELECT * FROM t1;
SELECT * FROM t3;
# Check that no error is reported
---source include/show_slave_status2.inc
+source include/check_slave_is_running.inc;
--echo
# 3) Test lock wait timeout and purged relay log
@@ -103,6 +103,7 @@ SET global max_relay_log_size=0;
--source include/stop_slave.inc
DELETE FROM t2;
# Set slave position to the BEGIN log event
+--replace_result $master_pos_begin MASTER_POS_BEGIN
eval CHANGE MASTER TO MASTER_LOG_POS=$master_pos_begin;
BEGIN;
# Hold lock
@@ -119,7 +120,7 @@ sync_with_master;
SELECT * FROM t1;
SELECT * FROM t3;
# Check that no error is reported
---source include/show_slave_status2.inc
+source include/check_slave_is_running.inc;
--echo
# Clean up
diff --git a/mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test b/mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
index c426ac1fae8..16c4bc8e2da 100644
--- a/mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
+++ b/mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
@@ -146,12 +146,7 @@ SELECT COUNT(*) FROM t1;
--echo
SELECT * FROM t1 ORDER BY f3 LIMIT 20;
---echo
---echo * Show Slave Status *
---echo
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
---query_vertical show slave status;
---echo
+--source include/check_slave_is_running.inc
### Altering table def scenario
--echo
@@ -431,16 +426,14 @@ connection master;
delete from t4;
delete from t31;
---echo
---echo ** Check slave status **
---echo
#connection slave;
sync_slave_with_master;
select * from t31;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
---query_vertical show slave status;
+--echo
+--echo ** Check slave status **
+--echo
+--source include/check_slave_is_running.inc
#### Clean Up ####
@@ -493,16 +486,15 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
--echo
--echo ********************************************
---echo *** Expect slave to fail with Error 1523 ***
+--echo *** Expect slave to fail with Error 1535 ***
--echo ********************************************
--echo
connection slave;
-source include/wait_for_slave_sql_to_stop.inc;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
---query_vertical SHOW SLAVE STATUS
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+# 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF
+--let $slave_sql_errno= 1535
+--let $slave_skip_counter= 2
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error_and_skip.inc
--echo
--echo *** Drop t10 ***
@@ -550,16 +542,15 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
--echo
--echo ********************************************
---echo *** Expect slave to fail with Error 1523 ***
+--echo *** Expect slave to fail with Error 1535 ***
--echo ********************************************
--echo
connection slave;
-source include/wait_for_slave_sql_to_stop.inc;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
---query_vertical SHOW SLAVE STATUS
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+# 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF
+--let $slave_sql_errno= 1535
+--let $slave_skip_counter= 2
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error_and_skip.inc
--echo
--echo *** Drop t11 ***
@@ -697,10 +688,10 @@ SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1;
# Remove below once fixed
#***************************
connection slave;
-source include/wait_for_slave_sql_to_stop.inc;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
---query_vertical SHOW SLAVE STATUS
+# 1091 = ER_CANT_DROP_FIELD_OR_KEY
+--let $slave_sql_errno= 1091
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error.inc
#***************************
STOP SLAVE;
@@ -763,10 +754,10 @@ SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1;
--echo ********************************************
--echo
connection slave;
-source include/wait_for_slave_sql_to_stop.inc;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
---query_vertical SHOW SLAVE STATUS
+# 1054 = ER_BAD_FIELD_ERROR
+--let $slave_sql_errno= 1054
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error.inc
STOP SLAVE;
RESET SLAVE;
@@ -840,10 +831,10 @@ SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1;
--echo *****************
--echo
connection slave;
-source include/wait_for_slave_sql_to_stop.inc;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
---query_vertical SHOW SLAVE STATUS
+# 1072 = ER_KEY_COLUMN_DOES_NOT_EXITS
+--let $slave_sql_errno= 1072
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error.inc
STOP SLAVE;
RESET SLAVE;
diff --git a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test b/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test
index 46168d6b97a..3b8e7663ec7 100644
--- a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test
+++ b/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test
@@ -96,10 +96,9 @@ SELECT * FROM t2 ORDER BY a;
--echo *** Start Slave ***
connection slave;
START SLAVE;
-source include/wait_for_slave_sql_to_stop.inc;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
---query_vertical SHOW SLAVE STATUS
+--let $slave_sql_errno= 1535
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error.inc
STOP SLAVE;
RESET SLAVE;
SELECT * FROM t2 ORDER BY a;
@@ -146,15 +145,13 @@ set @b1 = concat(@b1,@b1);
INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TESTING');
--echo ********************************************
---echo *** Expect slave to fail with Error 1522 ***
+--echo *** Expect slave to fail with Error 1535 ***
--echo ********************************************
connection slave;
---source include/wait_for_slave_sql_to_stop.inc
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
---query_vertical SHOW SLAVE STATUS
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--let $slave_sql_errno= 1535
+--let $slave_skip_counter= 2
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error_and_skip.inc
--echo *** Drop t3 ***
connection master;
@@ -191,15 +188,13 @@ INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'),
(30000.22,4,'QA TESTING');
--echo ********************************************
---echo *** Expect slave to fail with Error 1522 ***
+--echo *** Expect slave to fail with Error 1535 ***
--echo ********************************************
connection slave;
---source include/wait_for_slave_sql_to_stop.inc
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
---query_vertical SHOW SLAVE STATUS
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--let $slave_sql_errno= 1535
+--let $slave_skip_counter= 2
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error_and_skip.inc
--echo *** Drop t4 ***
connection master;
@@ -236,15 +231,13 @@ INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098),
(2,'JOE',300.01,0,'b2b2',1.0000009);
--echo ********************************************
---echo *** Expect slave to fail with Error 1522 ***
+--echo *** Expect slave to fail with Error 1535 ***
--echo ********************************************
connection slave;
---source include/wait_for_slave_sql_to_stop.inc
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
---query_vertical SHOW SLAVE STATUS
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--let $slave_sql_errno= 1535
+--let $slave_skip_counter= 2
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error_and_skip.inc
--echo *** Drop t5 ***
connection master;
@@ -282,13 +275,12 @@ INSERT INTO t6 () VALUES(1,'Kyle',200.23,1),
(2,'JOE',300.01,0);
--echo ********************************************
---echo *** Expect slave to fail with Error 1522 ***
+--echo *** Expect slave to fail with Error 1535 ***
--echo ********************************************
connection slave;
---source include/wait_for_slave_sql_to_stop.inc
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
---query_vertical SHOW SLAVE STATUS
+--let $slave_sql_errno= 1535
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error.inc
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
#START SLAVE;
@@ -387,12 +379,10 @@ INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
### Uncomment once bug is fixed
#connection slave;
-#wait_for_slave_to_stop;
-#--replace_result $MASTER_MYPORT MASTER_PORT
-#--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
-#--query_vertical SHOW SLAVE STATUS
-#SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-#START SLAVE;
+#--let $slave_sql_errno= SOMETHING
+#--let $slave_skip_counter= 2
+#--let $show_slave_sql_error= 1
+#--source include/wait_for_slave_sql_error_and_skip.inc
--echo *** Drop t8 ***
connection master;
@@ -451,12 +441,10 @@ if (`SELECT $engine_type != 'NDB'`)
# todo: fix Bug #43992 slave sql thread can't tune own sql_mode ...
# and add/restore waiting for stop test
- #--source include/wait_for_slave_sql_to_stop.inc
- #--replace_result $MASTER_MYPORT MASTER_PORT
- #--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
- #--query_vertical SHOW SLAVE STATUS
- #SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
- #START SLAVE;
+ #--let $slave_sql_errno= SOMETHING
+ #--let $slave_skip_counter= 2
+ #--let $show_slave_sql_error= 1
+ #--source include/wait_for_slave_sql_error_and_skip.inc
}
#--echo *** Drop t9 ***
@@ -491,15 +479,13 @@ set @b1 = concat(@b1,@b1);
INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
--echo ********************************************
---echo *** Expect slave to fail with Error 1522 ***
+--echo *** Expect slave to fail with Error 1535 ***
--echo ********************************************
connection slave;
---source include/wait_for_slave_sql_to_stop.inc
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
---query_vertical SHOW SLAVE STATUS
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--let $slave_sql_errno= 1535
+--let $slave_skip_counter= 2
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error_and_skip.inc
--echo *** Drop t10 ***
connection master;
@@ -535,15 +521,13 @@ set @b1 = concat(@b1,@b1);
INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
--echo ********************************************
---echo *** Expect slave to fail with Error 1522 ***
+--echo *** Expect slave to fail with Error 1535 ***
--echo ********************************************
connection slave;
---source include/wait_for_slave_sql_to_stop.inc
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
---query_vertical SHOW SLAVE STATUS
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--let $slave_sql_errno= 1535
+--let $slave_skip_counter= 2
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error_and_skip.inc
--echo *** Drop t11 ***
connection master;
@@ -810,12 +794,10 @@ ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5;
--echo *** Expect slave to fail with Error 1060 ***
--echo ********************************************
connection slave;
---source include/wait_for_slave_sql_to_stop.inc
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
---query_vertical SHOW SLAVE STATUS
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
-START SLAVE;
+--let $slave_sql_errno= 1060
+--let $slave_skip_counter= 1
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error_and_skip.inc
--echo *** Try to insert in master ****
connection master;
@@ -918,15 +900,13 @@ connection master;
INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX');
--echo ********************************************
---echo *** Expect slave to fail with Error 1522 ***
+--echo *** Expect slave to fail with Error 1535 ***
--echo ********************************************
connection slave;
---source include/wait_for_slave_sql_to_stop.inc
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
---query_vertical SHOW SLAVE STATUS
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--let $slave_sql_errno= 1535
+--let $slave_skip_counter= 2
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error_and_skip.inc
--echo ** DROP table t17 ***
connection master;
diff --git a/mysql-test/extra/rpl_tests/rpl_flsh_tbls.test b/mysql-test/extra/rpl_tests/rpl_flsh_tbls.test
index 5ed2f1ac2b8..fd51601176e 100644
--- a/mysql-test/extra/rpl_tests/rpl_flsh_tbls.test
+++ b/mysql-test/extra/rpl_tests/rpl_flsh_tbls.test
@@ -20,19 +20,15 @@ rename table t1 to t5, t2 to t1;
# first don't write it to the binlog, to test the NO_WRITE_TO_BINLOG keyword.
flush no_write_to_binlog tables;
# Check that it's not in the binlog.
---replace_result $SERVER_VERSION SERVER_VERSION
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/
-eval SHOW BINLOG EVENTS FROM $rename_event_pos ;
+let $binlog_start= $rename_event_pos;
+source include/show_binlog_events.inc;
# Check that the master is not confused.
select * from t3;
# This FLUSH should go into the binlog to not confuse the slave.
flush tables;
# Check that it's in the binlog.
---replace_result $SERVER_VERSION SERVER_VERSION
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/
-eval SHOW BINLOG EVENTS FROM $rename_event_pos ;
+let $wait_binlog_event= flush tables;
+source include/wait_for_binlog_event.inc;
sync_slave_with_master;
# Check that the slave is not confused.
diff --git a/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test b/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test
index c392686454d..66bd61a8ea9 100644
--- a/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test
+++ b/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test
@@ -68,19 +68,15 @@ eval SET DEBUG_SYNC=$debug_sync_action;
# Show slave last IO errno
connection slave;
-source include/wait_for_slave_io_error.inc;
-let $last_io_errno= query_get_value("show slave status", Last_IO_Errno, 1);
--echo Check network error happened here
-if (`SELECT '$last_io_errno' = '2013' || # CR_SERVER_LOST
- '$last_io_errno' = '2003' || # CR_CONN_HOST_ERROR
- '$last_io_errno' = '2002' || # CR_CONNECTION_ERROR
- '$last_io_errno' = '2006' || # CR_SERVER_GONE_ERROR
- '$last_io_errno' = '1040' || # ER_CON_COUNT_ERROR
- '$last_io_errno' = '1053' # ER_SERVER_SHUTDOWN
- `)
-{
- --echo NETWORK ERROR
-}
+# '2013' CR_SERVER_LOST
+# '2003' CR_CONN_HOST_ERROR
+# '2002' CR_CONNECTION_ERROR
+# '2006' CR_SERVER_GONE_ERROR
+# '1040' ER_CON_COUNT_ERROR
+# '1053' ER_SERVER_SHUTDOWN
+let $slave_io_errno= 1040, 1053, 2002, 2003, 2006, 2013;
+source include/wait_for_slave_io_error.inc;
# deactivate the sync point of get_master_version_and_clock()
# now to avoid restarting IO-thread to re-enter it.
diff --git a/mysql-test/extra/rpl_tests/rpl_insert_delayed.test b/mysql-test/extra/rpl_tests/rpl_insert_delayed.test
index 16e6bb3c960..4d611c15acf 100644
--- a/mysql-test/extra/rpl_tests/rpl_insert_delayed.test
+++ b/mysql-test/extra/rpl_tests/rpl_insert_delayed.test
@@ -90,7 +90,7 @@ connection master;
# Bug #29571: INSERT DELAYED IGNORE written to binary log on the master but
# on the slave
#
-if (`SELECT @@global.binlog_format != 'ROW'`)
+if ($binlog_format_statement)
{
#flush the logs before the test
connection slave;
@@ -103,22 +103,23 @@ CREATE TABLE t1(a int, UNIQUE(a));
INSERT DELAYED IGNORE INTO t1 VALUES(1);
INSERT DELAYED IGNORE INTO t1 VALUES(1);
flush table t1; # to wait for INSERT DELAYED to be done
-
-if (`SELECT @@global.binlog_format != 'ROW'`)
+if ($binlog_format_statement)
{
#must show two INSERT DELAYED
- --replace_column 1 x 2 x 3 x 4 x 5 x
- show binlog events in 'master-bin.000002' LIMIT 2,2;
+ --let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+ --let $binlog_limit= 1,2
+ --source include/show_binlog_events.inc
}
select * from t1;
sync_slave_with_master;
echo On slave;
-if (`SELECT @@global.binlog_format != 'ROW'`)
+if ($binlog_format_statement)
{
#must show two INSERT DELAYED
- --replace_column 1 x 2 x 3 x 4 x 5 x
- show binlog events in 'slave-bin.000002' LIMIT 2,2;
+ --let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
+ --let $binlog_limit= 1,2
+ --source include/show_binlog_events.inc
}
select * from t1;
diff --git a/mysql-test/extra/rpl_tests/rpl_log.test b/mysql-test/extra/rpl_tests/rpl_log.test
index e4ebfd68761..e714d84a51b 100644
--- a/mysql-test/extra/rpl_tests/rpl_log.test
+++ b/mysql-test/extra/rpl_tests/rpl_log.test
@@ -11,11 +11,9 @@
# (otherwise RESET MASTER may come too early).
sync_slave_with_master;
source include/stop_slave.inc;
---source include/wait_for_slave_to_stop.inc
reset master;
reset slave;
-start slave;
---source include/wait_for_slave_to_start.inc
+source include/start_slave.inc;
let $VERSION=`select version()`;
@@ -31,19 +29,17 @@ eval create table t1 (word char(20) not null)ENGINE=$engine_type;
--replace_result $LOAD_FILE LOAD_FILE
eval load data infile '$LOAD_FILE' into table t1 ignore 1 lines;
select count(*) from t1;
---replace_result $VERSION VERSION
---replace_column 2 # 5 #
---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-show binlog events;
---replace_column 2 # 5 #
---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-show binlog events from 106 limit 1;
---replace_column 2 # 5 #
---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-show binlog events from 106 limit 2;
---replace_column 2 # 5 #
---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-show binlog events from 106 limit 2,1;
+source include/show_binlog_events.inc;
+
+let $binlog_limit= 1;
+source include/show_binlog_events.inc;
+
+let $binlog_limit= 2;
+source include/show_binlog_events.inc;
+
+let $binlog_limit= 2,1;
+source include/show_binlog_events.inc;
+let $binlog_limit=;
flush logs;
# We need an extra update before doing save_master_pos.
@@ -84,27 +80,24 @@ connection master;
eval create table t2 (n int)ENGINE=$engine_type;
insert into t2 values (1);
source include/show_binlog_events.inc;
---replace_result $VERSION VERSION
---replace_regex /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/ /infile '.+'/infile 'words.dat'/
---replace_column 2 # 5 #
---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-show binlog events in 'master-bin.000002';
+
+let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
+source include/show_binlog_events.inc;
+
--replace_column 2 #
show binary logs;
sync_slave_with_master;
---source include/wait_for_slave_to_start.inc
--replace_column 2 #
show binary logs;
---replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION
---replace_column 2 # 5 #
---replace_regex /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/ /INFILE '.+'/INFILE 'words.dat'/
---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-show binlog events in 'slave-bin.000001' from 4;
---replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION
---replace_column 2 # 5 #
---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-show binlog events in 'slave-bin.000002' from 4;
-source include/show_slave_status.inc;
+
+let $binlog_file=;
+source include/show_binlog_events.inc;
+
+let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1);
+source include/show_binlog_events.inc;
+let $binlog_file=;
+
+source include/check_slave_is_running.inc;
# Need to recode the following
diff --git a/mysql-test/extra/rpl_tests/rpl_max_relay_size.test b/mysql-test/extra/rpl_tests/rpl_max_relay_size.test
index 5b546bbd891..8415522ec92 100644
--- a/mysql-test/extra/rpl_tests/rpl_max_relay_size.test
+++ b/mysql-test/extra/rpl_tests/rpl_max_relay_size.test
@@ -43,7 +43,7 @@ set global max_relay_log_size=8192-1; # mapped to 4096
select @@global.max_relay_log_size;
start slave;
sync_with_master;
-source include/show_slave_status2.inc;
+--source include/check_slave_is_running.inc
--echo #
--echo # Test 2
@@ -55,7 +55,7 @@ set global max_relay_log_size=(5*4096);
query_vertical select @@global.max_relay_log_size;
start slave;
sync_with_master;
-source include/show_slave_status2.inc;
+--source include/check_slave_is_running.inc
--echo #
--echo # Test 3: max_relay_log_size = 0
@@ -67,7 +67,7 @@ set global max_relay_log_size=0;
query_vertical select @@global.max_relay_log_size;
start slave;
sync_with_master;
-source include/show_slave_status2.inc;
+--source include/check_slave_is_running.inc
--echo #
--echo # Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
@@ -78,7 +78,6 @@ reset slave;
# test of relay log rotation when the slave is stopped
# (to make sure it does not crash).
flush logs;
-source include/show_slave_status2.inc;
--echo #
--echo # Test 5
@@ -93,10 +92,8 @@ flush logs;
# log we just closed. But a trick to achieve this is do an update on the master.
connection master;
create table t1 (a int);
-save_master_pos;
-connection slave;
-sync_with_master;
-source include/show_slave_status2.inc;
+sync_slave_with_master;
+--source include/check_slave_is_running.inc
--echo #
--echo # Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
@@ -105,10 +102,8 @@ source include/show_slave_status2.inc;
flush logs;
connection master;
drop table t1;
-save_master_pos;
-connection slave;
-sync_with_master;
-source include/show_slave_status2.inc;
+sync_slave_with_master;
+--source include/check_slave_is_running.inc
connection master;
# test that the absence of relay logs does not make a master crash
diff --git a/mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test b/mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test
index 4677f6da25d..3de1d42c34f 100644
--- a/mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test
+++ b/mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test
@@ -56,24 +56,23 @@ connection master;
--echo # since insert is done with transactional engine, expect a BEGIN
--echo # at <start_pos>
--echo
---replace_result $start_pos <start_pos>
---replace_column 5 #
---eval show binlog events from $start_pos limit 1
+--let $binlog_start= $start_pos
+--let $binlog_limit= 1
+--source include/show_binlog_events.inc
--echo
--echo # Now the insert, one step after
--echo
---replace_result $start_pos <start_pos>
---replace_column 2 # 5 #
---eval show binlog events from $start_pos limit 1,1
+--let $binlog_start= $start_pos
+--let $binlog_limit= 1,1
+--source include/show_binlog_events.inc
--echo
--echo # and the COMMIT should be at <end_pos>
--echo
---replace_result $start_pos <start_pos> $end_pos <end_pos>
---replace_column 2 #
---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
---eval show binlog events from $start_pos limit 2,1
+--let $binlog_start= $start_pos
+--let $binlog_limit= 2,1
+--source include/show_binlog_events.inc
--echo
@@ -89,18 +88,17 @@ commit;
--source include/select_ndb_apply_status.inc
connection master;
---replace_result $start_pos <start_pos>
---replace_column 5 #
---eval show binlog events from $start_pos limit 1
+--let $binlog_start= $start_pos
+--let $binlog_limit= 1
+--source include/show_binlog_events.inc
--echo
---replace_result $start_pos <start_pos>
---replace_column 2 # 4 # 5 #
---eval show binlog events from $start_pos limit 1,2
+--let $binlog_start= $start_pos
+--let $binlog_limit= 1,2
+--source include/show_binlog_events.inc
--echo
---replace_result $start_pos <start_pos> $end_pos <end_pos>
---replace_column 2 #
---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
---eval show binlog events from $start_pos limit 3,1
+--let $binlog_start= $start_pos
+--let $binlog_limit= 3,1
+--source include/show_binlog_events.inc
--echo
diff --git a/mysql-test/extra/rpl_tests/rpl_record_compare.test b/mysql-test/extra/rpl_tests/rpl_record_compare.test
new file mode 100644
index 00000000000..dc27dcb1f9d
--- /dev/null
+++ b/mysql-test/extra/rpl_tests/rpl_record_compare.test
@@ -0,0 +1,68 @@
+
+#
+# BUG#52868: Wrong handling of NULL value during update, replication out of sync
+#
+-- echo ## case #1 - last_null_bit_pos==0 in record_compare without X bit
+
+-- source include/master-slave-reset.inc
+-- connection master
+
+-- eval CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=$engine DEFAULT CHARSET=latin1
+
+INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 );
+INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 );
+-- disable_warnings
+UPDATE t1 SET c5 = 'a';
+-- enable_warnings
+-- sync_slave_with_master
+
+-- let $diff_table_1= master:test.t1
+-- let $diff_table_2= slave:test.t1
+-- source include/diff_tables.inc
+
+--connection master
+DROP TABLE t1;
+-- sync_slave_with_master
+
+-- echo ## case #1.1 - last_null_bit_pos==0 in record_compare with X bit
+-- echo ## (1 column less and no varchar)
+-- source include/master-slave-reset.inc
+-- connection master
+
+-- eval CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 bigint(20) DEFAULT 0, c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0) ENGINE=$engine DEFAULT CHARSET=latin1
+
+INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 );
+INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 );
+-- disable_warnings
+UPDATE t1 SET c5 = 'a';
+-- enable_warnings
+-- sync_slave_with_master
+
+-- let $diff_table_1= master:test.t1
+-- let $diff_table_2= slave:test.t1
+-- source include/diff_tables.inc
+
+--connection master
+DROP TABLE t1;
+-- sync_slave_with_master
+
+-- echo ## case #2 - X bit is wrongly set.
+
+-- source include/master-slave-reset.inc
+-- connection master
+
+-- eval CREATE TABLE t1 (c1 int, c2 varchar(1) default '') ENGINE=$engine DEFAULT CHARSET= latin1
+INSERT INTO t1(c1) VALUES (10);
+INSERT INTO t1(c1) VALUES (NULL);
+UPDATE t1 SET c1= 0;
+-- sync_slave_with_master
+
+-- let $diff_table_1= master:test.t1
+-- let $diff_table_2= slave:test.t1
+-- source include/diff_tables.inc
+
+-- connection master
+DROP TABLE t1;
+-- sync_slave_with_master
+
+
diff --git a/mysql-test/extra/rpl_tests/rpl_reset_slave.test b/mysql-test/extra/rpl_tests/rpl_reset_slave.test
index 1f88c792fce..5c7d33d519e 100644
--- a/mysql-test/extra/rpl_tests/rpl_reset_slave.test
+++ b/mysql-test/extra/rpl_tests/rpl_reset_slave.test
@@ -9,36 +9,32 @@
# RESET SLAVE.
-- source include/master-slave.inc
-connection master;
-save_master_pos;
-connection slave;
-sync_with_master;
-source include/show_slave_status2.inc;
+sync_slave_with_master;
+let $status_items= Master_User, Master_Host;
+source include/show_slave_status.inc;
-stop slave;
+source include/stop_slave.inc;
change master to master_user='test';
-source include/show_slave_status2.inc;
+source include/show_slave_status.inc;
reset slave;
-source include/show_slave_status2.inc;
+source include/show_slave_status.inc;
-start slave;
+source include/start_slave.inc;
sync_with_master;
-source include/show_slave_status2.inc;
+source include/show_slave_status.inc;
# test of crash with temp tables & RESET SLAVE
# (test to see if RESET SLAVE clears temp tables in memory and disk)
-stop slave;
+source include/stop_slave.inc;
reset slave;
-start slave;
+source include/start_slave.inc;
connection master;
create temporary table t1 (a int);
-save_master_pos;
-connection slave;
-sync_with_master;
-stop slave;
+sync_slave_with_master;
+source include/stop_slave.inc;
reset slave;
-start slave;
+source include/start_slave.inc;
sync_with_master;
show status like 'slave_open_temp_tables';
@@ -47,10 +43,9 @@ show status like 'slave_open_temp_tables';
#
# clearing the status
-stop slave;
+source include/stop_slave.inc;
reset slave;
-let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
-echo *** errno must be zero: $last_io_errno ***;
+source include/check_slave_no_error.inc;
#
# verifying start slave resets Last_IO_Error and Last_IO_Errno.
@@ -58,19 +53,13 @@ echo *** errno must be zero: $last_io_errno ***;
change master to master_user='impossible_user_name';
start slave;
+let $slave_io_errno= 1045;
source include/wait_for_slave_io_error.inc;
-let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
---disable_query_log
-eval SELECT $last_io_errno > 0 as ONE;
---enable_query_log
source include/stop_slave.inc;
change master to master_user='root';
source include/start_slave.inc;
-let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
-let $last_io_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1);
---echo *** last errno must be zero: $last_io_errno ***
---echo *** last error must be blank: $last_io_error ***
+source include/check_slave_no_error.inc;
#
# verifying reset slave resets Last_{IO,SQL}_Err{or,no}
@@ -79,19 +68,9 @@ let $last_io_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1);
source include/stop_slave.inc;
change master to master_user='impossible_user_name';
start slave;
+let $slave_io_errno= 1045;
source include/wait_for_slave_io_error.inc;
-let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
---disable_query_log
-eval SELECT $last_io_errno > 0 as ONE;
---enable_query_log
source include/stop_slave.inc;
reset slave;
-let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
-let $last_io_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1);
-let $last_sql_errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
-let $last_sql_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
---echo *** io last errno must be zero: $last_io_errno ***
---echo *** io last error must be blank: $last_io_error ***
---echo *** sql last errno must be zero: $last_sql_errno ***
---echo *** sql last error must be blank: $last_sql_error ***
+source include/check_slave_no_error.inc;
diff --git a/mysql-test/extra/rpl_tests/rpl_row_basic.test b/mysql-test/extra/rpl_tests/rpl_row_basic.test
index 0ba27c69a55..84f7b79e733 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_basic.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_basic.test
@@ -259,10 +259,7 @@ DELETE FROM t1;
query_vertical SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
sync_slave_with_master;
set @@global.slave_exec_mode= default;
-let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
-disable_query_log;
-eval SELECT "$last_error" AS Last_SQL_Error;
-enable_query_log;
+source include/check_slave_is_running.inc;
query_vertical SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
# BUG#37076: TIMESTAMP/DATETIME values are not replicated correctly
@@ -376,11 +373,10 @@ INSERT INTO t3 VALUES (1, "", 1);
INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2);
connection slave;
-source include/wait_for_slave_sql_to_stop.inc;
-let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
-disable_query_log;
-eval SELECT "$last_error" AS Last_SQL_Error;
-enable_query_log;
+# 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF
+--let $slave_sql_errno= 1535
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error.inc
connection master;
RESET MASTER;
connection slave;
@@ -405,11 +401,10 @@ INSERT INTO t5 VALUES (1, "", 1);
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
connection slave;
-source include/wait_for_slave_sql_to_stop.inc;
-let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
-disable_query_log;
-eval SELECT "$last_error" AS Last_SQL_Error;
-enable_query_log;
+# 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF
+--let $slave_sql_errno= 1535
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error.inc
connection master;
RESET MASTER;
connection slave;
@@ -424,11 +419,10 @@ INSERT INTO t6 VALUES (1, "", 1);
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
connection slave;
-source include/wait_for_slave_sql_to_stop.inc;
-let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
-disable_query_log;
-eval SELECT "$last_error" AS Last_SQL_Error;
-enable_query_log;
+# 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF
+--let $slave_sql_errno= 1535
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error.inc
connection master;
RESET MASTER;
connection slave;
diff --git a/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test b/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test
index 083088f12ff..ee6205c79d8 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test
@@ -138,9 +138,7 @@ SELECT * FROM t2;
sync_slave_with_master;
--echo **** On Slave ****
SELECT * FROM t2;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
---query_vertical SHOW SLAVE STATUS
+--source include/check_slave_is_running.inc
connection master;
INSERT INTO t9 VALUES (4);
@@ -149,12 +147,10 @@ sync_slave_with_master;
connection master;
INSERT INTO t4 VALUES (4);
connection slave;
---source include/wait_for_slave_sql_to_stop.inc
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
---query_vertical SHOW SLAVE STATUS
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--let $slave_skip_counter= 2
+--let $slave_sql_errno= 1535
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error_and_skip.inc
connection master;
INSERT INTO t9 VALUES (5);
@@ -163,12 +159,10 @@ sync_slave_with_master;
connection master;
INSERT INTO t5 VALUES (5,10,25);
connection slave;
---source include/wait_for_slave_sql_to_stop.inc
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
---query_vertical SHOW SLAVE STATUS
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--let $slave_skip_counter= 2
+--let $slave_sql_errno= 1535
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error_and_skip.inc
connection master;
INSERT INTO t9 VALUES (6);
@@ -177,19 +171,15 @@ sync_slave_with_master;
connection master;
INSERT INTO t6 VALUES (6,12,36);
connection slave;
---source include/wait_for_slave_sql_to_stop.inc
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
---query_vertical SHOW SLAVE STATUS
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--let $slave_skip_counter= 2
+--let $slave_sql_errno= 1535
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error_and_skip.inc
connection master;
INSERT INTO t9 VALUES (6);
sync_slave_with_master;
---replace_result $SLAVE_MYPORT SLAVE_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
---query_vertical SHOW SLAVE STATUS
+--source include/check_slave_is_running.inc
# Testing some tables extra field that can be null and cannot be null
# (but have default values)
diff --git a/mysql-test/include/check_concurrent_insert.inc b/mysql-test/include/check_concurrent_insert.inc
new file mode 100644
index 00000000000..f4bec3c9cdb
--- /dev/null
+++ b/mysql-test/include/check_concurrent_insert.inc
@@ -0,0 +1,96 @@
+#
+# SUMMARY
+# Check if statement reading table '$table' allows concurrent
+# inserts in it.
+#
+# PARAMETERS
+# $table Table in which concurrent inserts should be allowed.
+# $con_aux1 Name of the first auxiliary connection to be used by this
+# script.
+# $con_aux2 Name of the second auxiliary connection to be used by this
+# script.
+# $statement Statement to be checked.
+# $restore_table Table which might be modified by statement to be checked
+# and thus needs backing up before its execution and
+# restoring after it (can be empty).
+#
+# EXAMPLE
+# lock_sync.test
+#
+--disable_result_log
+--disable_query_log
+
+# Reset DEBUG_SYNC facility for safety.
+set debug_sync= "RESET";
+
+if (`SELECT '$restore_table' <> ''`)
+{
+--eval create temporary table t_backup select * from $restore_table;
+}
+
+connection $con_aux1;
+set debug_sync='after_lock_tables_takes_lock SIGNAL parked WAIT_FOR go';
+--send_eval $statement;
+
+connection $con_aux2;
+set debug_sync='now WAIT_FOR parked';
+--send_eval insert into $table (i) values (0);
+
+--enable_result_log
+--enable_query_log
+connection default;
+# Wait until concurrent insert is successfully executed while
+# statement being checked has its tables locked.
+# We use wait_condition.inc instead of simply reaping
+# concurrent insert here in order to avoid deadlocks if test
+# fails and to time out gracefully instead.
+let $wait_condition=
+ select count(*) = 0 from information_schema.processlist
+ where info = "insert into $table (i) values (0)";
+--source include/wait_condition.inc
+
+--disable_result_log
+--disable_query_log
+
+if ($success)
+{
+# Apparently concurrent insert was successfully executed.
+# To be safe against wait_condition.inc succeeding due to
+# races let us first reap concurrent insert to ensure that
+# it has really been successfully executed.
+connection $con_aux2;
+--reap
+connection default;
+set debug_sync= 'now SIGNAL go';
+connection $con_aux1;
+--reap
+connection default;
+--echo Success: '$statement' allows concurrent inserts into '$table'.
+}
+if (!$success)
+{
+# Waiting has timed out. Apparently concurrent insert was blocked.
+# So to be able to continue we need to end our statement first.
+set debug_sync= 'now SIGNAL go';
+connection $con_aux1;
+--reap
+connection $con_aux2;
+--reap
+connection default;
+--echo Error: '$statement' doesn't allow concurrent inserts into '$table'!
+}
+
+--eval delete from $table where i = 0;
+
+if (`SELECT '$restore_table' <> ''`)
+{
+--eval truncate table $restore_table;
+--eval insert into $restore_table select * from t_backup;
+drop temporary table t_backup;
+}
+
+# Clean-up. Reset DEBUG_SYNC facility after use.
+set debug_sync= "RESET";
+
+--enable_result_log
+--enable_query_log
diff --git a/mysql-test/include/check_no_concurrent_insert.inc b/mysql-test/include/check_no_concurrent_insert.inc
new file mode 100644
index 00000000000..f60401bcad1
--- /dev/null
+++ b/mysql-test/include/check_no_concurrent_insert.inc
@@ -0,0 +1,81 @@
+#
+# SUMMARY
+# Check that statement reading table '$table' doesn't allow concurrent
+# inserts in it.
+#
+# PARAMETERS
+# $table Table in which concurrent inserts should be disallowed.
+# $con_aux1 Name of the first auxiliary connection to be used by this
+# script.
+# $con_aux2 Name of the second auxiliary connection to be used by this
+# script.
+# $statement Statement to be checked.
+# $restore_table Table which might be modified by statement to be checked
+# and thus needs backing up before its execution and
+# restoring after it (can be empty).
+#
+# EXAMPLE
+# lock_sync.test
+#
+--disable_result_log
+--disable_query_log
+
+# Reset DEBUG_SYNC facility for safety.
+set debug_sync= "RESET";
+
+if (`SELECT '$restore_table' <> ''`)
+{
+--eval create temporary table t_backup select * from $restore_table;
+}
+
+connection $con_aux1;
+set debug_sync='after_lock_tables_takes_lock SIGNAL parked WAIT_FOR go';
+--send_eval $statement;
+
+connection $con_aux2;
+set debug_sync='now WAIT_FOR parked';
+--send_eval insert into $table (i) values (0);
+
+--enable_result_log
+--enable_query_log
+connection default;
+# Wait until concurrent insert is successfully blocked because
+# of our statement.
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Locked" and info = "insert into $table (i) values (0)";
+--source include/wait_condition.inc
+
+--disable_result_log
+--disable_query_log
+
+set debug_sync= 'now SIGNAL go';
+connection $con_aux1;
+--reap
+connection $con_aux2;
+--reap
+connection default;
+
+if ($success)
+{
+--echo Success: '$statement' doesn't allow concurrent inserts into '$table'.
+}
+if (!$success)
+{
+--echo Error: '$statement' allows concurrent inserts into '$table'!
+}
+
+--eval delete from $table where i = 0;
+
+if (`SELECT '$restore_table' <> ''`)
+{
+--eval truncate table $restore_table;
+--eval insert into $restore_table select * from t_backup;
+drop temporary table t_backup;
+}
+
+# Clean-up. Reset DEBUG_SYNC facility after use.
+set debug_sync= "RESET";
+
+--enable_result_log
+--enable_query_log
diff --git a/mysql-test/include/check_no_row_lock.inc b/mysql-test/include/check_no_row_lock.inc
new file mode 100644
index 00000000000..c08e7f35b10
--- /dev/null
+++ b/mysql-test/include/check_no_row_lock.inc
@@ -0,0 +1,71 @@
+#
+# SUMMARY
+# Check if statement affecting or reading table '$table' doesn't
+# take any kind of locks on its rows.
+#
+# PARAMETERS
+# $table Table for which presence of row locks should be checked.
+# $con_aux Name of auxiliary connection to be used by this script.
+# $statement Statement to be checked.
+#
+# EXAMPLE
+# innodb_mysql_lock2.test
+#
+--disable_result_log
+--disable_query_log
+
+connection default;
+begin;
+--eval select * from $table for update;
+
+connection $con_aux;
+begin;
+--send_eval $statement;
+
+--enable_result_log
+--enable_query_log
+
+connection default;
+# Wait until statement is successfully executed while
+# all rows in table are X-locked. This means that it
+# does not acquire any row locks.
+# We use wait_condition.inc instead of simply reaping
+# statement here in order to avoid deadlocks if test
+# fails and to time out gracefully instead.
+let $wait_condition=
+ select count(*) = 0 from information_schema.processlist
+ where info = "$statement";
+--source include/wait_condition.inc
+
+--disable_result_log
+--disable_query_log
+
+if ($success)
+{
+# Apparently statement was successfully executed and thus it
+# has not required any row locks.
+# To be safe against wait_condition.inc succeeding due to
+# races let us first reap the statement being checked to
+# ensure that it has been successfully executed.
+connection $con_aux;
+--reap
+rollback;
+connection default;
+rollback;
+--echo Success: '$statement' doesn't take row locks on '$table'.
+}
+if (!$success)
+{
+# Waiting has timed out. Apparently statement was blocked on
+# some row lock. So to be able to continue we need to unlock
+# rows first.
+rollback;
+connection $con_aux;
+--reap
+rollback;
+connection default;
+--echo Error: '$statement' takes some row locks on '$table'!
+}
+
+--enable_result_log
+--enable_query_log
diff --git a/mysql-test/include/check_shared_row_lock.inc b/mysql-test/include/check_shared_row_lock.inc
new file mode 100644
index 00000000000..efc7e13b3aa
--- /dev/null
+++ b/mysql-test/include/check_shared_row_lock.inc
@@ -0,0 +1,61 @@
+#
+# SUMMARY
+# Check if statement reading table '$table' takes shared locks
+# on some of its rows.
+#
+# PARAMETERS
+# $table Table for which presence of row locks should be checked.
+# $con_aux Name of auxiliary connection to be used by this script.
+# $statement Statement to be checked.
+# $wait_statement Sub-statement which is supposed to acquire locks (should
+# be the same as $statement for ordinary statements).
+#
+# EXAMPLE
+# innodb_mysql_lock2.test
+#
+--disable_result_log
+--disable_query_log
+
+connection default;
+begin;
+--eval select * from $table for update;
+
+connection $con_aux;
+begin;
+--send_eval $statement;
+
+--enable_result_log
+--enable_query_log
+
+connection default;
+# Wait until statement is successfully blocked because
+# all rows in table are X-locked. This means that at
+# least it acquires S-locks on some of rows.
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state in ("Sending data","statistics", "preparing") and
+ info = "$wait_statement";
+--source include/wait_condition.inc
+
+--disable_result_log
+--disable_query_log
+
+rollback;
+
+connection $con_aux;
+--reap
+rollback;
+
+connection default;
+--enable_result_log
+--enable_query_log
+
+if ($success)
+{
+--echo Success: '$statement' takes shared row locks on '$table'.
+}
+
+if (!$success)
+{
+--echo Error: '$statement' hasn't taken shared row locks on '$table'!
+}
diff --git a/mysql-test/include/check_slave_is_running.inc b/mysql-test/include/check_slave_is_running.inc
new file mode 100644
index 00000000000..5fbbe0d684c
--- /dev/null
+++ b/mysql-test/include/check_slave_is_running.inc
@@ -0,0 +1,18 @@
+# ==== Purpose ====
+#
+# Assert that the slave threads are running and don't have any errors.
+#
+# ==== Usage ====
+#
+# --source include/check_slave_running.inc
+
+--echo Checking that both slave threads are running.
+
+--let $slave_sql_running = query_get_value(SHOW SLAVE STATUS, Slave_SQL_Running, 1)
+--let $slave_io_running = query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1)
+
+if (`SELECT '$slave_sql_running' != 'Yes' OR '$slave_io_running' != 'Yes'`) {
+ --echo Slave not running: Slave_SQL_Running = $slave_sql_running Slave_IO_Running = $slave_io_running
+ --source include/show_rpl_debug_info.inc
+ --die Expected slave to be running, but it was not running.
+}
diff --git a/mysql-test/include/check_slave_no_error.inc b/mysql-test/include/check_slave_no_error.inc
new file mode 100644
index 00000000000..371db5ed6a0
--- /dev/null
+++ b/mysql-test/include/check_slave_no_error.inc
@@ -0,0 +1,17 @@
+# ==== Purpose ====
+#
+# Assert that Slave_SQL_Error and Slave_IO_Error are empty.
+#
+# ==== Usage ====
+#
+# --let $slave_param= Exec_Master_Log_Pos
+# --let $slave_param_value= 4711
+# --source include/check_slave_running.inc
+
+--let $slave_param= Last_SQL_Errno
+--let $slave_param_value= 0
+--source include/check_slave_param.inc
+
+--let $slave_param= Last_IO_Errno
+--let $slave_param_value= 0
+--source include/check_slave_param.inc
diff --git a/mysql-test/include/check_slave_param.inc b/mysql-test/include/check_slave_param.inc
new file mode 100644
index 00000000000..d82c26851ea
--- /dev/null
+++ b/mysql-test/include/check_slave_param.inc
@@ -0,0 +1,16 @@
+# ==== Purpose ====
+#
+# Assert that a given column in SHOW SLAVE STATUS has a given value.
+#
+# ==== Usage ====
+#
+# --let $slave_param= Exec_Master_Log_Pos
+# --let $slave_param_value= 4711
+# --source include/check_slave_param.inc
+
+--let $_param_value= query_get_value(SHOW SLAVE STATUS, $slave_param, 1)
+if (`SELECT '$_param_value' != '$slave_param_value'`) {
+ --echo Wrong value for $slave_param. Expected '$slave_param_value', got '$_param_value'
+ --source include/show_rpl_debug_info.inc
+ --die Wrong value for slave parameter
+}
diff --git a/mysql-test/include/get_relay_log_pos.inc b/mysql-test/include/get_relay_log_pos.inc
new file mode 100644
index 00000000000..7ce36fd3c50
--- /dev/null
+++ b/mysql-test/include/get_relay_log_pos.inc
@@ -0,0 +1,70 @@
+# For a given event which is at position $master_log_pos in the the master's
+# binary log, returns its position in the slave's relay log file
+# $relay_log_file.
+# The position is stored in the variable $relay_log_pos.
+
+# Usage:
+# let $relay_log_file= 'relay-log-bin.000001';
+# let $master_log_pos= 106;
+# source include/get_relay_log_pos.inc;
+# # at this point, get_relay_log_pos.inc sets $relay_log_pos. echo position
+# # in $relay_log_file: $relay_log_pos.
+
+if (`SELECT '$relay_log_file' = ''`)
+{
+ --die 'variable $relay_log_file is null'
+}
+
+if (`SELECT '$master_log_pos' = ''`)
+{
+ --die 'variable $master_log_pos is null'
+}
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+let $_suffix= `SELECT UUID()`;
+let $_tmp_file= $MYSQLTEST_VARDIR/tmp/mysqlbinlog.$_suffix;
+--exec $MYSQL_BINLOG $MYSQLD_DATADIR/$relay_log_file > $_tmp_file
+
+# All queries in this file should not be logged.
+--disable_query_log
+
+--disable_warnings
+DROP TEMPORARY TABLE IF EXISTS mysqlbinlog_events;
+DROP TEMPORARY TABLE IF EXISTS events_at;
+DROP TEMPORARY TABLE IF EXISTS events_pos;
+CREATE TEMPORARY TABLE mysqlbinlog_events(c1 INT AUTO_INCREMENT KEY, c2 varchar(256));
+
+# Event position is in the comments output by mysqlbinlog, we load this
+# comments into the table
+# '# at 106'
+# '# .... end_log_pos 46'
+eval LOAD DATA LOCAL INFILE '$_tmp_file' INTO TABLE mysqlbinlog_events
+ LINES STARTING BY '#' (c2) SET c1 = NULL;
+--enable_warnings
+
+# Event pos in relay log file is inserted into table events_at
+CREATE TEMPORARY TABLE events_at(c1 INT AUTO_INCREMENT KEY, c2 varchar(256))
+ SELECT c2 FROM mysqlbinlog_events WHERE c2 LIKE ' at%' ORDER BY c1;
+
+# Event pos in master log file is inserted into table events_pos
+CREATE TEMPORARY TABLE events_pos(c1 INT AUTO_INCREMENT KEY, c2 varchar(256))
+ SELECT c2 FROM mysqlbinlog_events WHERE c2 LIKE '% end_log_pos %' ORDER BY c1;
+
+# events_at events_pos
+# c1------c2-------------------------- c1------c2------------------------
+# 1 ev1's begin pos in relay log 1 ev1's end pos in master log
+# 2 ev2's begin pos in relay log 2 ev2's end pos in master log
+# 3 ev3's begin pos in relay log 3 ev3's end pos in master log
+# events always keep the same sequence.
+# Because event[N]'s end pos is equal to event[N+1]'s begin pos we want to
+# find event's end pos in relay log, we can find the right relay_log_pos
+# using the relationship that 'events_pos.c1 = events_at.c1 + 1'
+#
+# There is a fault that we can't get the relay log position of the last event,
+# as it is not output by mysqlbinlog
+let $relay_log_pos= `SELECT SUBSTRING(a.c2, 5)
+ FROM events_at a, events_pos b
+ WHERE a.c1=b.c1+1 and b.c2 LIKE '% $master_log_pos%'`;
+DROP TEMPORARY TABLE mysqlbinlog_events, events_at, events_pos;
+--remove_file $_tmp_file
+--enable_query_log
diff --git a/mysql-test/include/mysqlhotcopy.inc b/mysql-test/include/mysqlhotcopy.inc
new file mode 100644
index 00000000000..b3fd5e47179
--- /dev/null
+++ b/mysql-test/include/mysqlhotcopy.inc
@@ -0,0 +1,121 @@
+# Test of mysqlhotcopy (perl script)
+# Author: Horst Hunger
+# Created: 2010-05-10
+
+--source include/not_windows.inc
+--source include/not_embedded.inc
+
+if ($MYSQLHOTCOPY)
+{
+ die due to missing mysqlhotcopy tool;
+}
+
+let $MYSQLD_DATADIR= `SELECT @@datadir`;
+--disable_warnings
+DROP DATABASE IF EXISTS hotcopy_test;
+--enable_warnings
+CREATE DATABASE hotcopy_test;
+USE hotcopy_test;
+eval CREATE TABLE t1 (c1 int, c2 varchar(20)) ENGINE=$engine;
+eval CREATE TABLE t2 (c1 int, c2 varchar(20)) ENGINE=$engine;
+eval CREATE TABLE t3 (c1 int, c2 varchar(20)) ENGINE=$engine;
+
+INSERT INTO t1 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
+INSERT INTO t2 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
+INSERT INTO t3 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
+
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+--list_files $MYSQLD_DATADIR/hotcopy_test
+
+# backup into another database in the same directory
+--replace_result $MASTER_MYSOCK MASTER_MYSOCK
+--exec $MYSQLHOTCOPY --quiet -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
+
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+--list_files $MYSQLD_DATADIR/hotcopy_save
+
+USE hotcopy_save;
+SELECT * FROM t1;
+SELECT * FROM t2;
+SELECT * FROM t3;
+
+# restore data into the original database with mysqlhotcopy
+if(`SELECT engine= 'MyISAM' FROM information_schema.tables WHERE table_name='t1'`)
+{
+USE hotcopy_test;
+DELETE FROM t1;
+SELECT * FROM t1;
+
+--replace_result $MASTER_MYSOCK MASTER_MYSOCK
+--exec $MYSQLHOTCOPY --quiet --addtodest -S $MASTER_MYSOCK -u root hotcopy_save hotcopy_test
+
+USE hotcopy_save;
+SELECT * FROM t1;
+SELECT * FROM t2;
+SELECT * FROM t3;
+}
+
+USE hotcopy_test;
+DROP TABLE t2;
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+--list_files $MYSQLD_DATADIR/hotcopy_test
+
+--replace_result $MASTER_MYSOCK MASTER_MYSOCK
+--exec $MYSQLHOTCOPY --quiet --addtodest -S $MASTER_MYSOCK -u root hotcopy_save hotcopy_test
+
+FLUSH TABLES;
+SELECT * FROM t1;
+SELECT * FROM t2;
+SELECT * FROM t3;
+
+# backup of db into a directory
+USE hotcopy_test;
+--replace_result $MASTER_MYSOCK MASTER_MYSOCK $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--exec $MYSQLHOTCOPY --quiet -S $MASTER_MYSOCK -u root hotcopy_test $MYSQLTEST_VARDIR/tmp
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--list_files $MYSQLTEST_VARDIR/tmp/hotcopy_test
+#--exec rm -rf $MYSQLTEST_VARDIR/tmp/hotcopy_test
+--remove_files_wildcard $MYSQLTEST_VARDIR/tmp/hotcopy_test *
+--rmdir $MYSQLTEST_VARDIR/tmp/hotcopy_test
+
+# backup without full index files
+# reproduction of bug#53556, "--list_files" shows MYI files, which is wrong.
+DROP DATABASE hotcopy_save;
+--replace_result $MASTER_MYSOCK MASTER_MYSOCK
+--exec $MYSQLHOTCOPY --quiet --noindices -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+--list_files $MYSQLD_DATADIR/hotcopy_save
+
+# test of option "allowold"
+DROP DATABASE hotcopy_save;
+--replace_result $MASTER_MYSOCK MASTER_MYSOCK
+--exec $MYSQLHOTCOPY --quiet -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+--list_files $MYSQLD_DATADIR/hotcopy_save
+--replace_result $MASTER_MYSOCK MASTER_MYSOCK
+--error 9,2304
+--exec $MYSQLHOTCOPY --quiet -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
+--replace_result $MASTER_MYSOCK MASTER_MYSOCK
+--exec $MYSQLHOTCOPY --quiet --allowold -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+--list_files $MYSQLD_DATADIR/hotcopy_save
+
+# test of option "keepold"
+--replace_result $MASTER_MYSOCK MASTER_MYSOCK
+--exec $MYSQLHOTCOPY --quiet --keepold -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+--list_files $MYSQLD_DATADIR/hotcopy_save_old
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+--list_files $MYSQLD_DATADIR/hotcopy_save
+
+# test of option "suffix"
+--replace_result $MASTER_MYSOCK MASTER_MYSOCK
+--exec $MYSQLHOTCOPY --quiet --suffix=_cpy -S $MASTER_MYSOCK -u root hotcopy_test
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+--list_files $MYSQLD_DATADIR/hotcopy_test_cpy
+DROP DATABASE hotcopy_test_cpy;
+
+DROP DATABASE hotcopy_test;
+DROP DATABASE hotcopy_save;
+DROP DATABASE hotcopy_save_old;
+
diff --git a/mysql-test/include/rpl_stmt_seq.inc b/mysql-test/include/rpl_stmt_seq.inc
index 6c944dc4729..08f6e44aba0 100644
--- a/mysql-test/include/rpl_stmt_seq.inc
+++ b/mysql-test/include/rpl_stmt_seq.inc
@@ -80,9 +80,8 @@ eval INSERT INTO t1 SET f1= $MAX + 1;
SELECT MAX(f1) FROM t1;
if ($show_binlog)
{
---replace_result $VERSION VERSION
---replace_column 2 # 5 #
-eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s';
+ --let $binlog_file= master-bin.$_log_num_s
+ --source include/show_binlog_events.inc
}
sync_slave_with_master;
@@ -93,9 +92,8 @@ connection slave;
SELECT MAX(f1) FROM t1;
if ($show_binlog)
{
---replace_result $VERSION VERSION
---replace_column 2 # 5 #
-eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s';
+ --let $binlog_file= slave-bin.$_log_num_s
+ --source include/show_binlog_events.inc
}
###############################################################
@@ -111,9 +109,8 @@ let $my_stmt= ERROR: YOU FORGOT TO FILL IN THE STATEMENT;
SELECT MAX(f1) FROM t1;
if ($show_binlog)
{
---replace_result $VERSION VERSION
---replace_column 2 # 5 #
-eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s';
+ --let $binlog_file= master-bin.$_log_num_s
+ --source include/show_binlog_events.inc
}
sync_slave_with_master;
@@ -124,9 +121,8 @@ connection slave;
SELECT MAX(f1) FROM t1;
if ($show_binlog)
{
---replace_result $VERSION VERSION
---replace_column 2 # 5 #
-eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s';
+ --let $binlog_file= slave-bin.$_log_num_s
+ --source include/show_binlog_events.inc
}
###############################################################
@@ -150,9 +146,8 @@ eval SELECT CONCAT(CONCAT('TEST-INFO: MASTER: The INSERT is ',
--enable_query_log
if ($show_binlog)
{
---replace_result $VERSION VERSION
---replace_column 2 # 5 #
-eval SHOW BINLOG EVENTS IN 'master-bin.$_log_num_s';
+ --let $binlog_file= master-bin.$_log_num_s
+ --source include/show_binlog_events.inc
}
sync_slave_with_master;
@@ -171,9 +166,8 @@ eval SELECT CONCAT(CONCAT('TEST-INFO: SLAVE: The INSERT is ',
--enable_query_log
if ($show_binlog)
{
---replace_result $VERSION VERSION
---replace_column 2 # 5 #
-eval SHOW BINLOG EVENTS IN 'slave-bin.$_log_num_s';
+ --let $binlog_file= slave-bin.$_log_num_s
+ --source include/show_binlog_events.inc
}
###############################################################
diff --git a/mysql-test/include/show_binlog_events.inc b/mysql-test/include/show_binlog_events.inc
index 68f913a16a3..8649f31ad9f 100644
--- a/mysql-test/include/show_binlog_events.inc
+++ b/mysql-test/include/show_binlog_events.inc
@@ -1,10 +1,45 @@
-# $binlog_start can be set by caller or take a default value
+##############################################################################
+# Show binary log events
+#
+# Useage:
+# let $binlog_file= master-bin.000002;
+# let $binlog_start= 106;
+# let $binlog_limit= 1, 3;
+# source include/show_binlog_events.inc;
+#
+# It shows the first binary log file if $binlog_file is not given.
+#
+# It shows events from the end position of the description event if
+# $binlog_start is not given.
+#
+# It shows all of the events if $binlog_limit is not given.
+# $binlog_format has the same semantic with 'LIMIT' option.
+#
+##############################################################################
if (!$binlog_start)
{
- let $binlog_start=106;
+ # If $binlog_start is not set, we will set it as the second event's position.
+ # The first event(Description Event) is always ignored. For description
+ # event's length might be changed because of adding new events, 'SHOW BINLOG
+ # EVENTS LIMIT 1' is used to get the right value.
+ --let $binlog_start= query_get_value(SHOW BINLOG EVENTS LIMIT 1, End_log_pos, 1)
}
+
+--let $_statement=show binlog events
+if (`SELECT '$binlog_file' <> ''`)
+{
+ --let $_statement= $_statement in '$binlog_file'
+}
+
+--let $_statement= $_statement from $binlog_start
+
+if (`SELECT '$binlog_limit' <> ''`)
+{
+ --let $_statement= $_statement limit $binlog_limit
+}
+
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $binlog_start <binlog_start>
--replace_column 2 # 4 # 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/
---eval show binlog events from $binlog_start
+--eval $_statement
diff --git a/mysql-test/include/show_rpl_debug_info.inc b/mysql-test/include/show_rpl_debug_info.inc
index 252d63f1bf4..148d11f3b02 100644
--- a/mysql-test/include/show_rpl_debug_info.inc
+++ b/mysql-test/include/show_rpl_debug_info.inc
@@ -36,6 +36,7 @@ let $_con= $CURRENT_CONNECTION;
--echo
--echo [on $_con]
--echo
+SELECT NOW();
--echo **** SHOW SLAVE STATUS on $_con ****
query_vertical SHOW SLAVE STATUS;
--echo
@@ -70,6 +71,7 @@ if (`SELECT '$_master_con' != ''`)
--echo [on $_master_con]
connection $_master_con;
--echo
+ SELECT NOW();
--echo **** SHOW MASTER STATUS on $_master_con ****
query_vertical SHOW MASTER STATUS;
--echo
diff --git a/mysql-test/include/show_slave_status.inc b/mysql-test/include/show_slave_status.inc
index b315b9e45ca..d66c068e19b 100644
--- a/mysql-test/include/show_slave_status.inc
+++ b/mysql-test/include/show_slave_status.inc
@@ -1,6 +1,25 @@
# Include file to show the slave status, masking out some information
# that varies depending on where the test is executed.
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
-query_vertical SHOW SLAVE STATUS;
+--let $_items=$status_items
+if (`SELECT "XX$status_items" = "XX"`)
+{
+ --die 'Variable status_items is NULL'
+}
+
+--disable_query_log
+--vertical_results
+
+while (`SELECT "XX$_items" <> "XX"`)
+{
+ --let $_name= `SELECT SUBSTRING_INDEX('$_items', ',', 1)`
+ --let $_items= `SELECT LTRIM(SUBSTRING('$_items', LENGTH('$_name') + 2))`
+
+ --let $_value= query_get_value(SHOW SLAVE STATUS, $_name, 1)
+
+ --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
+ --eval SELECT "$_value" AS $_name
+}
+
+--horizontal_results
+--enable_query_log
diff --git a/mysql-test/include/show_slave_status2.inc b/mysql-test/include/show_slave_status2.inc
deleted file mode 100644
index 9c4e14c62c2..00000000000
--- a/mysql-test/include/show_slave_status2.inc
+++ /dev/null
@@ -1,8 +0,0 @@
-# Include file to show the slave status, masking out some information
-# that varies depending on where the test is executed.
-
-# masked out log positions
-
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
-query_vertical SHOW SLAVE STATUS;
diff --git a/mysql-test/include/test_fieldsize.inc b/mysql-test/include/test_fieldsize.inc
index 606bc63779d..57dba4d1cc0 100644
--- a/mysql-test/include/test_fieldsize.inc
+++ b/mysql-test/include/test_fieldsize.inc
@@ -22,10 +22,9 @@ eval $test_insert;
connection slave;
START SLAVE;
---source include/wait_for_slave_sql_to_stop.inc
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
---query_vertical SHOW SLAVE STATUS
+--let $slave_sql_errno= 1535
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error.inc
# The following should be 0
SELECT COUNT(*) FROM t1;
diff --git a/mysql-test/include/wait_for_binlog_event.inc b/mysql-test/include/wait_for_binlog_event.inc
index 2a57c191413..7a55c8c2182 100644
--- a/mysql-test/include/wait_for_binlog_event.inc
+++ b/mysql-test/include/wait_for_binlog_event.inc
@@ -18,7 +18,7 @@ while (`SELECT INSTR("$_last_event","$wait_binlog_event") = 0`)
dec $_loop_count;
if (!$_loop_count)
{
- SHOW BINLOG EVENTS;
+ --source include/show_rpl_debug_info.inc
--die ERROR: failed while waiting for $wait_binlog_event in binlog
}
real_sleep 0.1;
diff --git a/mysql-test/include/wait_for_slave_io_error.inc b/mysql-test/include/wait_for_slave_io_error.inc
index 094406e02b2..34cbf20a73b 100644
--- a/mysql-test/include/wait_for_slave_io_error.inc
+++ b/mysql-test/include/wait_for_slave_io_error.inc
@@ -1,23 +1,59 @@
# ==== Purpose ====
#
# Waits until the IO thread of the current connection has got an
-# error, or until a timeout is reached.
+# error, or until a timeout is reached. Also waits until the IO
+# thread has completely stopped.
#
# ==== Usage ====
#
+# # Wait several errors.
+# let $slave_io_errno= 1, 2, 3;
# source include/wait_for_slave_io_error.inc;
#
-# Parameters to this macro are $slave_timeout and
-# $slave_keep_connection. See wait_for_slave_param.inc for
-# descriptions.
+# # Print error message
+# let $slave_io_errno= 1;
+# let $show_slave_io_error= 1;
+# source include/wait_for_slave_io_error.inc;
+#
+# Parameters:
+#
+# $slave_io_errno
+# The expected IO error numbers. This is required.
+# (After BUG#41956 has been fixed, this will be required to be a
+# symbolic name instead of a numbers.)
+#
+# $show_slave_io_error
+# If set, will print the error to the query log.
+#
+# $slave_timeout
+# See wait_for_slave_param.inc for description.
+#
+# $master_connection
+# See wait_for_slave_param.inc for description.
-let $old_slave_param_comparison= $slave_param_comparison;
+if (`SELECT '$slave_io_errno' = ''`) {
+ --die !!!ERROR IN TEST: you must set \$slave_io_errno before sourcing wait_for_slave_io_error.inc
+}
+let $old_slave_param_comparison= $slave_param_comparison;
let $slave_param= Last_IO_Errno;
let $slave_param_comparison= !=;
let $slave_param_value= 0;
let $slave_error_message= Failed while waiting for slave to produce an error in its sql thread;
source include/wait_for_slave_param.inc;
let $slave_error_message= ;
-
let $slave_param_comparison= $old_slave_param_comparison;
+
+let $_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
+if (`SELECT $_error NOT IN ($slave_io_errno)`) {
+ --echo **** Slave stopped with wrong error code: $_error (expected $slave_io_errno) ****
+ source include/show_rpl_debug_info.inc;
+ --echo **** Slave stopped with wrong error code: $_error (expected $slave_io_errno) ****
+ --die Slave stopped with wrong error code
+}
+
+if ($show_slave_io_error)
+{
+ let $error= query_get_value("SHOW SLAVE STATUS", Last_IO_Error, 1);
+ echo Last_IO_Error = $error;
+}
diff --git a/mysql-test/include/wait_for_slave_param.inc b/mysql-test/include/wait_for_slave_param.inc
index 82e57922913..ef864f9245e 100644
--- a/mysql-test/include/wait_for_slave_param.inc
+++ b/mysql-test/include/wait_for_slave_param.inc
@@ -78,5 +78,5 @@ if (!$_slave_timeout_counter)
--echo Current connection is '$CURRENT_CONNECTION'
echo Note: the following output may have changed since the failure was detected;
source include/show_rpl_debug_info.inc;
- exit;
+ die;
}
diff --git a/mysql-test/include/wait_for_slave_sql_error.inc b/mysql-test/include/wait_for_slave_sql_error.inc
index ad1d7a9e639..aab04036eea 100644
--- a/mysql-test/include/wait_for_slave_sql_error.inc
+++ b/mysql-test/include/wait_for_slave_sql_error.inc
@@ -14,6 +14,9 @@
# The expected SQL error number. This is required.
# (After BUG#41956 has been fixed, this will be required to be a
# symbolic name instead of a number.)
+#
+# $show_slave_sql_error
+# If set, will print the error to the query log.
#
# $slave_timeout
# See wait_for_slave_param.inc for description.
@@ -22,8 +25,7 @@
# See wait_for_slave_param.inc for description.
if (`SELECT '$slave_sql_errno' = ''`) {
- --echo !!!ERROR IN TEST: you must set \$slave_sql_errno before sourcing wait_fro_slave_sql_error.inc
- exit;
+ --die !!!ERROR IN TEST: you must set \$slave_sql_errno before sourcing wait_for_slave_sql_error.inc
}
let $slave_param= Slave_SQL_Running;
@@ -33,7 +35,14 @@ source include/wait_for_slave_param.inc;
let $_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
if (`SELECT '$_error' != '$slave_sql_errno'`) {
- --echo Slave stopped with wrong error code: $_error (expected $slave_sql_errno)
+ --echo **** Slave stopped with wrong error code: $_error (expected $slave_sql_errno) ****
source include/show_rpl_debug_info.inc;
- exit;
+ --echo **** Slave stopped with wrong error code: $_error (expected $slave_sql_errno) ****
+ --die Slave stopped with wrong error code
+}
+
+if ($show_slave_sql_error)
+{
+ let $error= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
+ echo Last_SQL_Error = $error;
}
diff --git a/mysql-test/include/wait_for_slave_sql_error_and_skip.inc b/mysql-test/include/wait_for_slave_sql_error_and_skip.inc
index 247de3a41a1..11c02c0b490 100644
--- a/mysql-test/include/wait_for_slave_sql_error_and_skip.inc
+++ b/mysql-test/include/wait_for_slave_sql_error_and_skip.inc
@@ -22,17 +22,30 @@
#
# $master_connection
# See wait_for_slave_param.inc for description.
+#
+# $slave_skip_counter
+# If set, skip this number of events. If not set, skip one event.
+#
+# $not_switch_connection If set, don't switch to slave and don't switch back
+# master.
+#
echo --source include/wait_for_slave_sql_error_and_skip.inc;
-connection slave;
-source include/wait_for_slave_sql_error.inc;
-if ($show_sql_error)
+if (!$not_switch_connection)
{
- let $error= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
- echo Last_SQL_Error = $error;
+ connection slave;
}
+source include/wait_for_slave_sql_error.inc;
# skip the erroneous statement
-set global sql_slave_skip_counter=1;
+if ($slave_skip_counter) {
+ eval SET GLOBAL SQL_SLAVE_SKIP_COUNTER= $slave_skip_counter;
+}
+if (!$slave_skip_counter) {
+ SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
+}
source include/start_slave.inc;
-connection master;
+if (!$not_switch_connection)
+{
+ connection master;
+}
diff --git a/mysql-test/include/wait_for_status_var.inc b/mysql-test/include/wait_for_status_var.inc
index 6ba632ce46b..b8b4fa20b86 100644
--- a/mysql-test/include/wait_for_status_var.inc
+++ b/mysql-test/include/wait_for_status_var.inc
@@ -35,7 +35,7 @@
if (`SELECT STRCMP('$status_type', '') * STRCMP(UPPER('$status_type'), 'SESSION') * STRCMP(UPPER('$status_type'), 'GLOBAL')`)
{
--echo **** ERROR: Unknown type of variable status_type: allowed values are: SESSION or GLOBAL ****
- exit;
+ die;
}
let $_status_timeout_counter= $status_timeout;
@@ -61,7 +61,7 @@ while (`SELECT NOT('$_show_status_value' $_status_var_comparsion '$status_var_va
--echo **** Showing STATUS, PROCESSLIST ****
eval SHOW $status_type STATUS LIKE '$status_var';
SHOW PROCESSLIST;
- exit;
+ die;
}
dec $_status_timeout_counter;
sleep 0.1;
diff --git a/mysql-test/include/wait_until_count_sessions.inc b/mysql-test/include/wait_until_count_sessions.inc
index de4f0eeb652..26b0d8f2633 100644
--- a/mysql-test/include/wait_until_count_sessions.inc
+++ b/mysql-test/include/wait_until_count_sessions.inc
@@ -122,5 +122,6 @@ if (!$success)
--echo # Timeout in wait_until_count_sessions.inc
--echo # Number of sessions expected: <= $count_sessions found: $current_sessions
SHOW PROCESSLIST;
+ --die Timeout in wait_until_count_sessions.inc
}
diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm
index 9a8ef04a96b..d794de2e92d 100644
--- a/mysql-test/lib/mtr_cases.pm
+++ b/mysql-test/lib/mtr_cases.pm
@@ -775,11 +775,13 @@ sub collect_one_test_case {
# Check for disabled tests
# ----------------------------------------------------------------------
my $marked_as_disabled= 0;
- if ( $disabled->{$tname} )
+ if ( $disabled->{$tname} or $disabled->{"$suitename.$tname"} )
{
# Test was marked as disabled in suites disabled.def file
$marked_as_disabled= 1;
- $tinfo->{'comment'}= $disabled->{$tname};
+ # Test name may have been disabled with or without suite name part
+ $tinfo->{'comment'}= $disabled->{$tname} ||
+ $disabled->{"$suitename.$tname"};
}
my $disabled_file= "$testdir/$tname.disabled";
diff --git a/mysql-test/lib/mtr_misc.pl b/mysql-test/lib/mtr_misc.pl
index 6838435bbde..388d252502a 100644
--- a/mysql-test/lib/mtr_misc.pl
+++ b/mysql-test/lib/mtr_misc.pl
@@ -149,6 +149,28 @@ sub mtr_exe_maybe_exists (@) {
#
# NOTE! More specific paths should be given before less specific.
+#
+sub mtr_pl_maybe_exists (@) {
+ my @path= @_;
+
+ map {$_.= ".pl"} @path if IS_WINDOWS;
+ foreach my $path ( @path )
+ {
+ if(IS_WINDOWS)
+ {
+ return $path if -f $path;
+ }
+ else
+ {
+ return $path if -x $path;
+ }
+ }
+ return "";
+}
+
+
+#
+# NOTE! More specific paths should be given before less specific.
# For example /client/debug should be listed before /client
#
sub mtr_exe_exists (@) {
diff --git a/mysql-test/lib/v1/mtr_process.pl b/mysql-test/lib/v1/mtr_process.pl
index 566ccfe0778..33a39d1f0b6 100644
--- a/mysql-test/lib/v1/mtr_process.pl
+++ b/mysql-test/lib/v1/mtr_process.pl
@@ -264,8 +264,9 @@ sub spawn_parent_impl {
if ( $timer_name eq "suite" )
{
# We give up here
- # FIXME we should only give up the suite, not all of the run?
print STDERR "\n";
+ kill(9, $pid); # Kill mysqltest
+ mtr_kill_leftovers(); # Kill servers the hard way
mtr_error("Test suite timeout");
}
elsif ( $timer_name eq "testcase" )
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index f4fb2bb7d8a..6edd892d99d 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -130,7 +130,7 @@ my $path_config_file; # The generated config file, var/my.cnf
# executables will be used by the test suite.
our $opt_vs_config = $ENV{'MTR_VS_CONFIG'};
-my $DEFAULT_SUITES= "main,binlog,federated,rpl,maria,parts,innodb";
+my $DEFAULT_SUITES= "main,binlog,federated,rpl,maria,parts,innodb,innodb_plugin";
my $opt_suites;
our $opt_verbose= 0; # Verbose output, enable with --verbose
@@ -2122,6 +2122,15 @@ sub environment_setup {
}
# ----------------------------------------------------
+ # mysqlhotcopy
+ # ----------------------------------------------------
+ my $mysqlhotcopy=
+ mtr_pl_maybe_exists("$basedir/scripts/mysqlhotcopy");
+ # Since mysqltest interprets the real path as "false" in an if,
+ # use 1 ("true") to indicate "not exists" so it can be tested for
+ $ENV{'MYSQLHOTCOPY'}= $mysqlhotcopy || 1;
+
+ # ----------------------------------------------------
# perror
# ----------------------------------------------------
my $exe_perror= mtr_exe_exists("$basedir/extra$opt_vs_config/perror",
diff --git a/mysql-test/r/alter_table-big.result b/mysql-test/r/alter_table-big.result
index 9761754a02f..d6b936bd5d7 100644
--- a/mysql-test/r/alter_table-big.result
+++ b/mysql-test/r/alter_table-big.result
@@ -12,11 +12,11 @@ alter table t1 enable keys;;
insert into t2 values (1);
insert into t1 values (1, 1, 1);
set session debug="-d,sleep_alter_enable_indexes";
-show binlog events in 'master-bin.000001' from 106;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; insert into t2 values (1)
-master-bin.000001 # Query 1 # use `test`; alter table t1 enable keys
-master-bin.000001 # Query 1 # use `test`; insert into t1 values (1, 1, 1)
+master-bin.000001 # Query # # use `test`; insert into t2 values (1)
+master-bin.000001 # Query # # use `test`; alter table t1 enable keys
+master-bin.000001 # Query # # use `test`; insert into t1 values (1, 1, 1)
drop tables t1, t2;
End of 5.0 tests
drop table if exists t1, t2, t3;
@@ -41,17 +41,17 @@ alter table t2 change c vc varchar(100) default 'Test2', rename to t1;;
rename table t1 to t3;
drop table t3;
set session debug="-d,sleep_alter_before_main_binlog";
-show binlog events in 'master-bin.000001' from 106;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; alter table t1 change i c char(10) default 'Test1'
-master-bin.000001 # Query 1 # use `test`; insert into t1 values ()
-master-bin.000001 # Query 1 # use `test`; alter table t1 change c vc varchar(100) default 'Test2'
-master-bin.000001 # Query 1 # use `test`; rename table t1 to t2
-master-bin.000001 # Query 1 # use `test`; drop table t2
-master-bin.000001 # Query 1 # use `test`; create table t1 (i int)
-master-bin.000001 # Query 1 # use `test`; alter table t1 change i c char(10) default 'Test3', rename to t2
-master-bin.000001 # Query 1 # use `test`; insert into t2 values ()
-master-bin.000001 # Query 1 # use `test`; alter table t2 change c vc varchar(100) default 'Test2', rename to t1
-master-bin.000001 # Query 1 # use `test`; rename table t1 to t3
-master-bin.000001 # Query 1 # use `test`; drop table t3
+master-bin.000001 # Query # # use `test`; alter table t1 change i c char(10) default 'Test1'
+master-bin.000001 # Query # # use `test`; insert into t1 values ()
+master-bin.000001 # Query # # use `test`; alter table t1 change c vc varchar(100) default 'Test2'
+master-bin.000001 # Query # # use `test`; rename table t1 to t2
+master-bin.000001 # Query # # use `test`; drop table t2
+master-bin.000001 # Query # # use `test`; create table t1 (i int)
+master-bin.000001 # Query # # use `test`; alter table t1 change i c char(10) default 'Test3', rename to t2
+master-bin.000001 # Query # # use `test`; insert into t2 values ()
+master-bin.000001 # Query # # use `test`; alter table t2 change c vc varchar(100) default 'Test2', rename to t1
+master-bin.000001 # Query # # use `test`; rename table t1 to t3
+master-bin.000001 # Query # # use `test`; drop table t3
End of 5.1 tests
diff --git a/mysql-test/r/bug39022.result b/mysql-test/r/bug39022.result
index 5963709aa2a..75899ed686b 100644
--- a/mysql-test/r/bug39022.result
+++ b/mysql-test/r/bug39022.result
@@ -12,7 +12,7 @@ INSERT INTO t2 VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),
START TRANSACTION;
# in thread2
REPLACE INTO t2 VALUES (-17);
-SELECT d FROM t2,t1 WHERE d=(SELECT MAX(a) FROM t1 WHERE t1.a > t2.d);
+SELECT d FROM t2,t1 WHERE d=(SELECT MAX(a) FROM t1 WHERE t1.a > t2.d) LOCK IN SHARE MODE;
d
# in thread1
REPLACE INTO t1(a,b) VALUES (67,20);
@@ -21,10 +21,10 @@ COMMIT;
START TRANSACTION;
REPLACE INTO t1(a,b) VALUES (65,-50);
REPLACE INTO t2 VALUES (-91);
-SELECT d FROM t2,t1 WHERE d=(SELECT MAX(a) FROM t1 WHERE t1.a > t2.d);
+SELECT d FROM t2,t1 WHERE d=(SELECT MAX(a) FROM t1 WHERE t1.a > t2.d) LOCK IN SHARE MODE;
# in thread1
# should not crash
-SELECT d FROM t2,t1 WHERE d=(SELECT MAX(a) FROM t1 WHERE t1.a > t2.d);
+SELECT d FROM t2,t1 WHERE d=(SELECT MAX(a) FROM t1 WHERE t1.a > t2.d) LOCK IN SHARE MODE;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
# in thread2
d
diff --git a/mysql-test/r/create-big.result b/mysql-test/r/create-big.result
index eb57bf59084..d062b59a008 100644
--- a/mysql-test/r/create-big.result
+++ b/mysql-test/r/create-big.result
@@ -175,12 +175,12 @@ t2 CREATE TABLE `t2` (
`i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t2;
-show binlog events in 'master-bin.000001' from 106;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; insert into t1 values (1)
-master-bin.000001 # Query 1 # use `test`; create table t2 like t1
-master-bin.000001 # Query 1 # use `test`; drop table t1
-master-bin.000001 # Query 1 # use `test`; drop table t2
+master-bin.000001 # Query # # use `test`; insert into t1 values (1)
+master-bin.000001 # Query # # use `test`; create table t2 like t1
+master-bin.000001 # Query # # use `test`; drop table t1
+master-bin.000001 # Query # # use `test`; drop table t2
create table t1 (i int);
set session debug="-d,sleep_create_like_before_check_if_exists:+d,sleep_create_like_before_copy";
create table t2 like t1;;
@@ -197,11 +197,11 @@ reset master;
create table t2 like t1;;
drop table t1;
drop table t2;
-show binlog events in 'master-bin.000001' from 106;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; create table t2 like t1
-master-bin.000001 # Query 1 # use `test`; drop table t1
-master-bin.000001 # Query 1 # use `test`; drop table t2
+master-bin.000001 # Query # # use `test`; create table t2 like t1
+master-bin.000001 # Query # # use `test`; drop table t1
+master-bin.000001 # Query # # use `test`; drop table t2
create table t1 (i int);
set session debug="-d,sleep_create_like_before_copy:+d,sleep_create_like_before_ha_create";
reset master;
@@ -213,16 +213,16 @@ drop table t2;
create table t2 like t1;;
drop table t1;
drop table t2;
-show binlog events in 'master-bin.000001' from 106;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; create table t2 like t1
-master-bin.000001 # Query 1 # use `test`; insert into t2 values (1)
-master-bin.000001 # Query 1 # use `test`; drop table t2
-master-bin.000001 # Query 1 # use `test`; create table t2 like t1
-master-bin.000001 # Query 1 # use `test`; drop table t2
-master-bin.000001 # Query 1 # use `test`; create table t2 like t1
-master-bin.000001 # Query 1 # use `test`; drop table t1
-master-bin.000001 # Query 1 # use `test`; drop table t2
+master-bin.000001 # Query # # use `test`; create table t2 like t1
+master-bin.000001 # Query # # use `test`; insert into t2 values (1)
+master-bin.000001 # Query # # use `test`; drop table t2
+master-bin.000001 # Query # # use `test`; create table t2 like t1
+master-bin.000001 # Query # # use `test`; drop table t2
+master-bin.000001 # Query # # use `test`; create table t2 like t1
+master-bin.000001 # Query # # use `test`; drop table t1
+master-bin.000001 # Query # # use `test`; drop table t2
create table t1 (i int);
set session debug="-d,sleep_create_like_before_ha_create:+d,sleep_create_like_before_binlogging";
reset master;
@@ -234,14 +234,14 @@ drop table t2;
create table t2 like t1;;
drop table t1;
drop table t2;
-show binlog events in 'master-bin.000001' from 106;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; create table t2 like t1
-master-bin.000001 # Query 1 # use `test`; insert into t2 values (1)
-master-bin.000001 # Query 1 # use `test`; drop table t2
-master-bin.000001 # Query 1 # use `test`; create table t2 like t1
-master-bin.000001 # Query 1 # use `test`; drop table t2
-master-bin.000001 # Query 1 # use `test`; create table t2 like t1
-master-bin.000001 # Query 1 # use `test`; drop table t1
-master-bin.000001 # Query 1 # use `test`; drop table t2
+master-bin.000001 # Query # # use `test`; create table t2 like t1
+master-bin.000001 # Query # # use `test`; insert into t2 values (1)
+master-bin.000001 # Query # # use `test`; drop table t2
+master-bin.000001 # Query # # use `test`; create table t2 like t1
+master-bin.000001 # Query # # use `test`; drop table t2
+master-bin.000001 # Query # # use `test`; create table t2 like t1
+master-bin.000001 # Query # # use `test`; drop table t1
+master-bin.000001 # Query # # use `test`; drop table t2
set session debug="-d,sleep_create_like_before_binlogging";
diff --git a/mysql-test/r/ctype_cp932_binlog_stm.result b/mysql-test/r/ctype_cp932_binlog_stm.result
index 044885d1ea7..8854a835e25 100644
--- a/mysql-test/r/ctype_cp932_binlog_stm.result
+++ b/mysql-test/r/ctype_cp932_binlog_stm.result
@@ -29,20 +29,20 @@ HEX(s1) HEX(s2) d
466F6F2773206120426172 ED40ED41ED42 47.93
DROP PROCEDURE bug18293|
DROP TABLE t4|
-SHOW BINLOG EVENTS FROM 370|
+show binlog events from <binlog_start>|
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 370 Query 1 536 use `test`; CREATE TABLE t4 (s1 CHAR(50) CHARACTER SET latin1,
+master-bin.000001 # Query # # use `test`; CREATE TABLE t4 (s1 CHAR(50) CHARACTER SET latin1,
s2 CHAR(50) CHARACTER SET cp932,
d DECIMAL(10,2))
-master-bin.000001 536 Query 1 785 use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `bug18293`(IN ins1 CHAR(50),
+master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `bug18293`(IN ins1 CHAR(50),
IN ins2 CHAR(50) CHARACTER SET cp932,
IN ind DECIMAL(10,2))
BEGIN
INSERT INTO t4 VALUES (ins1, ins2, ind);
END
-master-bin.000001 785 Query 1 1049 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172 COLLATE 'latin1_swedish_ci'), NAME_CONST('ins2',_cp932 0xED40ED41ED42 COLLATE 'cp932_japanese_ci'), NAME_CONST('ind',47.93))
-master-bin.000001 1049 Query 1 1138 use `test`; DROP PROCEDURE bug18293
-master-bin.000001 1138 Query 1 1217 use `test`; DROP TABLE t4
+master-bin.000001 # Query # # use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172 COLLATE 'latin1_swedish_ci'), NAME_CONST('ins2',_cp932 0xED40ED41ED42 COLLATE 'cp932_japanese_ci'), NAME_CONST('ind',47.93))
+master-bin.000001 # Query # # use `test`; DROP PROCEDURE bug18293
+master-bin.000001 # Query # # use `test`; DROP TABLE t4
End of 5.0 tests
SHOW BINLOG EVENTS FROM 365;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error
diff --git a/mysql-test/r/delete.result b/mysql-test/r/delete.result
index 77b2071494d..36025cbfb35 100644
--- a/mysql-test/r/delete.result
+++ b/mysql-test/r/delete.result
@@ -349,4 +349,13 @@ END |
DELETE IGNORE FROM t1;
ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.
DROP TABLE t1;
+#
+# Bug #53450: Crash/assertion
+# "virtual int ha_myisam::index_first(uchar*)") at assert.c:81
+#
+CREATE TABLE t1 (a INT, b INT, c INT,
+INDEX(a), INDEX(b), INDEX(c));
+INSERT INTO t1 VALUES (1,2,3), (4,5,6), (7,8,9);
+DELETE FROM t1 WHERE a = 10 OR b = 20 ORDER BY c LIMIT 1;
+DROP TABLE t1;
End of 5.1 tests
diff --git a/mysql-test/r/error_simulation.result b/mysql-test/r/error_simulation.result
index 27e51a33112..b6b79cb596b 100644
--- a/mysql-test/r/error_simulation.result
+++ b/mysql-test/r/error_simulation.result
@@ -39,5 +39,49 @@ a
2
DROP TABLE t1;
#
+# Bug#42064: low memory crash when importing hex strings, in Item_hex_string::Item_hex_string
+#
+CREATE TABLE t1(a BLOB);
+SET SESSION debug="+d,bug42064_simulate_oom";
+INSERT INTO t1 VALUES("");
+Got one of the listed errors
+SET SESSION debug=DEFAULT;
+DROP TABLE t1;
+#
+# Bug#41660: Sort-index_merge for non-first join table may require
+# O(#scans) memory
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (0), (1), (2), (3), (4), (5), (6), (7), (8), (9);
+CREATE TABLE t2 (a INT, b INT, filler CHAR(100), KEY(a), KEY(b));
+INSERT INTO t2 SELECT 1000, 1000, 'filler' FROM t1 A, t1 B, t1 C;
+INSERT INTO t2 VALUES (1, 1, 'data');
+# the example query uses LEFT JOIN only for the sake of being able to
+# demonstrate the issue with a very small dataset. (left outer join
+# disables the use of join buffering, so we get the second table
+# re-scanned for every record in the outer table. if we used inner join,
+# we would need to have thousands of records and/or more columns in both
+# tables so that the join buffer is filled and re-scans are triggered).
+SET SESSION debug = '+d,only_one_Unique_may_be_created';
+EXPLAIN
+SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 );
+id select_type table type possible_keys key key_len ref rows Extra
+x x x x x x x x x
+x x x x x x x x x Using sort_union(a,b); Using where
+SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 );
+a a b filler
+0 1 1 data
+1 1 1 data
+2 1 1 data
+3 1 1 data
+4 1 1 data
+5 1 1 data
+6 1 1 data
+7 1 1 data
+8 1 1 data
+9 1 1 data
+SET SESSION debug = DEFAULT;
+DROP TABLE t1, t2;
+#
# End of 5.1 tests
#
diff --git a/mysql-test/r/events_scheduling.result b/mysql-test/r/events_scheduling.result
index 7dfd10a53f8..262caea3d7f 100644
--- a/mysql-test/r/events_scheduling.result
+++ b/mysql-test/r/events_scheduling.result
@@ -82,5 +82,24 @@ DROP TABLE table_1;
DROP TABLE table_2;
DROP TABLE table_3;
DROP TABLE table_4;
+
+Bug #50087 Interval arithmetic for Event_queue_element is not portable.
+
+CREATE TABLE t1(a int);
+CREATE EVENT e1 ON SCHEDULE EVERY 1 MONTH
+STARTS NOW() - INTERVAL 1 MONTH
+ENDS NOW() + INTERVAL 2 MONTH
+ON COMPLETION PRESERVE
+DO
+INSERT INTO t1 VALUES (1);
+CREATE EVENT e2 ON SCHEDULE EVERY 1 MONTH
+STARTS NOW()
+ENDS NOW() + INTERVAL 11 MONTH
+ON COMPLETION PRESERVE
+DO
+INSERT INTO t1 VALUES (1);
+DROP TABLE t1;
+DROP EVENT e1;
+DROP EVENT e2;
DROP DATABASE events_test;
SET GLOBAL event_scheduler=@event_scheduler;
diff --git a/mysql-test/r/explain.result b/mysql-test/r/explain.result
index 8f2d704b312..f46fe8daaad 100644
--- a/mysql-test/r/explain.result
+++ b/mysql-test/r/explain.result
@@ -238,4 +238,17 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
DROP TABLE t1, t2;
+#
+# Bug #48573: difference of index selection between rpm binary and
+# .tar.gz, windows vs linux..
+#
+CREATE TABLE t1(c1 INT, c2 INT, c4 INT, c5 INT, KEY(c2, c5), KEY(c2, c4, c5));
+INSERT INTO t1 VALUES(4, 1, 1, 1);
+INSERT INTO t1 VALUES(3, 1, 1, 1);
+INSERT INTO t1 VALUES(2, 1, 1, 1);
+INSERT INTO t1 VALUES(1, 1, 1, 1);
+EXPLAIN SELECT c1 FROM t1 WHERE c2 = 1 AND c4 = 1 AND c5 = 1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref c2,c2_2 c2 10 const,const 3 Using where
+DROP TABLE t1;
End of 5.1 tests.
diff --git a/mysql-test/r/flush_block_commit_notembedded.result b/mysql-test/r/flush_block_commit_notembedded.result
index c7fd7a11877..a81b1ce1e3a 100644
--- a/mysql-test/r/flush_block_commit_notembedded.result
+++ b/mysql-test/r/flush_block_commit_notembedded.result
@@ -7,15 +7,13 @@ SET AUTOCOMMIT=0;
INSERT t1 VALUES (1);
# Switch to connection con2
FLUSH TABLES WITH READ LOCK;
-SHOW MASTER STATUS;
-File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000001 106
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
# Switch to connection con1
COMMIT;
# Switch to connection con2
-SHOW MASTER STATUS;
-File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000001 106
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
UNLOCK TABLES;
# Switch to connection con1
DROP TABLE t1;
diff --git a/mysql-test/r/func_in.result b/mysql-test/r/func_in.result
index ffdacc43735..fdeec2755ca 100644
--- a/mysql-test/r/func_in.result
+++ b/mysql-test/r/func_in.result
@@ -750,4 +750,24 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
DROP TABLE t1;
#
+# Bug#54477: Crash on IN / CASE with NULL arguments
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1), (2);
+SELECT 1 IN (NULL, a) FROM t1;
+1 IN (NULL, a)
+1
+NULL
+SELECT a IN (a, a) FROM t1 GROUP BY a WITH ROLLUP;
+a IN (a, a)
+1
+1
+NULL
+SELECT CASE a WHEN a THEN a END FROM t1 GROUP BY a WITH ROLLUP;
+CASE a WHEN a THEN a END
+1
+2
+NULL
+DROP TABLE t1;
+#
End of 5.1 tests
diff --git a/mysql-test/r/func_isnull.result b/mysql-test/r/func_isnull.result
index 20ddc87ee78..c1f5849c091 100644
--- a/mysql-test/r/func_isnull.result
+++ b/mysql-test/r/func_isnull.result
@@ -5,3 +5,17 @@ flush tables;
select * from t1 where isnull(to_days(mydate));
id mydate
drop table t1;
+#
+# Bug#53933 crash when using uncacheable subquery in the having clause of outer query
+#
+CREATE TABLE t1 (f1 INT);
+INSERT INTO t1 VALUES (0),(0);
+SELECT ISNULL((SELECT GET_LOCK('Bug#53933', 0) FROM t1 GROUP BY f1)) AS f2
+FROM t1 GROUP BY f1 HAVING f2 = f2;
+f2
+0
+SELECT RELEASE_LOCK('Bug#53933');
+RELEASE_LOCK('Bug#53933')
+1
+DROP TABLE t1;
+End of 5.0 tests
diff --git a/mysql-test/r/func_like.result b/mysql-test/r/func_like.result
index 9338a76e320..21da211160b 100644
--- a/mysql-test/r/func_like.result
+++ b/mysql-test/r/func_like.result
@@ -169,3 +169,17 @@ select 'andre%' like 'andreÊ%' escape 'Ê';
select _cp1251'andre%' like convert('andreÊ%' using cp1251) escape 'Ê';
_cp1251'andre%' like convert('andreÊ%' using cp1251) escape 'Ê'
1
+End of 4.1 tests
+#
+# Bug #54575: crash when joining tables with unique set column
+#
+CREATE TABLE t1(a SET('a') NOT NULL, UNIQUE KEY(a));
+CREATE TABLE t2(b INT PRIMARY KEY);
+INSERT INTO t1 VALUES ();
+Warnings:
+Warning 1364 Field 'a' doesn't have a default value
+INSERT INTO t2 VALUES (1), (2), (3);
+SELECT 1 FROM t2 JOIN t1 ON 1 LIKE a GROUP BY a;
+1
+DROP TABLE t1, t2;
+End of 5.1 tests
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result
index 90503300065..645dd460735 100644
--- a/mysql-test/r/group_by.result
+++ b/mysql-test/r/group_by.result
@@ -1790,4 +1790,24 @@ aa b COUNT( b)
1 10 1
DROP TABLE t1, t2;
#
+# Bug#52051: Aggregate functions incorrectly returns NULL from outer
+# join query
+#
+CREATE TABLE t1 (a INT PRIMARY KEY);
+CREATE TABLE t2 (a INT PRIMARY KEY);
+INSERT INTO t2 VALUES (1), (2);
+EXPLAIN SELECT MIN(t2.a) FROM t2 LEFT JOIN t1 ON t2.a = t1.a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
+SELECT MIN(t2.a) FROM t2 LEFT JOIN t1 ON t2.a = t1.a;
+MIN(t2.a)
+1
+EXPLAIN SELECT MAX(t2.a) FROM t2 LEFT JOIN t1 ON t2.a = t1.a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
+SELECT MAX(t2.a) FROM t2 LEFT JOIN t1 ON t2.a = t1.a;
+MAX(t2.a)
+2
+DROP TABLE t1, t2;
+#
# End of 5.1 tests
diff --git a/mysql-test/r/group_min_max.result b/mysql-test/r/group_min_max.result
index 01f27a498ef..6fef66b9d93 100644
--- a/mysql-test/r/group_min_max.result
+++ b/mysql-test/r/group_min_max.result
@@ -2767,4 +2767,17 @@ SELECT MIN( a ) FROM t1 WHERE a IS NULL;
MIN( a )
NULL
DROP TABLE t1;
+#
+# Bug#53859: Valgrind: opt_sum_query(TABLE_LIST*, List<Item>&, Item*) at
+# opt_sum.cc:305
+#
+CREATE TABLE t1 ( a INT, KEY (a) );
+INSERT INTO t1 VALUES (1), (2), (3);
+SELECT MIN( a ) AS min_a
+FROM t1
+WHERE a > 1 AND a IS NULL
+ORDER BY min_a;
+min_a
+NULL
+DROP TABLE t1;
End of 5.1 tests
diff --git a/mysql-test/r/handler_myisam.result b/mysql-test/r/handler_myisam.result
index a970e20a2c0..b20b8dbb138 100644
--- a/mysql-test/r/handler_myisam.result
+++ b/mysql-test/r/handler_myisam.result
@@ -769,4 +769,97 @@ a
1
HANDLER t1 CLOSE;
DROP TABLE t1;
+#
+# Bug #54007: assert in ha_myisam::index_next , HANDLER
+#
+CREATE TABLE t1(a INT, b INT, PRIMARY KEY(a), KEY b(b), KEY ab(a, b));
+HANDLER t1 OPEN;
+HANDLER t1 READ FIRST;
+a b
+HANDLER t1 READ `PRIMARY` NEXT;
+a b
+HANDLER t1 READ ab NEXT;
+a b
+HANDLER t1 READ b NEXT;
+a b
+HANDLER t1 READ NEXT;
+a b
+HANDLER t1 CLOSE;
+INSERT INTO t1 VALUES (2, 20), (1, 10), (4, 40), (3, 30);
+HANDLER t1 OPEN;
+HANDLER t1 READ FIRST;
+a b
+2 20
+HANDLER t1 READ NEXT;
+a b
+1 10
+HANDLER t1 READ `PRIMARY` NEXT;
+a b
+1 10
+HANDLER t1 READ `PRIMARY` NEXT;
+a b
+2 20
+HANDLER t1 READ ab NEXT;
+a b
+1 10
+HANDLER t1 READ ab NEXT;
+a b
+2 20
+HANDLER t1 READ b NEXT;
+a b
+1 10
+HANDLER t1 READ b NEXT;
+a b
+2 20
+HANDLER t1 READ b NEXT;
+a b
+3 30
+HANDLER t1 READ b NEXT;
+a b
+4 40
+HANDLER t1 READ b NEXT;
+a b
+HANDLER t1 READ NEXT;
+a b
+4 40
+HANDLER t1 READ NEXT;
+a b
+3 30
+HANDLER t1 READ NEXT;
+a b
+HANDLER t1 CLOSE;
+HANDLER t1 OPEN;
+HANDLER t1 READ FIRST;
+a b
+2 20
+HANDLER t1 READ `PRIMARY` PREV;
+a b
+4 40
+HANDLER t1 READ `PRIMARY` PREV;
+a b
+3 30
+HANDLER t1 READ b PREV;
+a b
+4 40
+HANDLER t1 READ b PREV;
+a b
+3 30
+HANDLER t1 CLOSE;
+HANDLER t1 OPEN;
+HANDLER t1 READ FIRST;
+a b
+2 20
+HANDLER t1 READ `PRIMARY` PREV LIMIT 3;
+a b
+4 40
+3 30
+2 20
+HANDLER t1 READ b NEXT LIMIT 5;
+a b
+1 10
+2 20
+3 30
+4 40
+HANDLER t1 CLOSE;
+DROP TABLE t1;
End of 5.1 tests
diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result
index 742c9f2864e..f58e92b186f 100644
--- a/mysql-test/r/information_schema.result
+++ b/mysql-test/r/information_schema.result
@@ -1641,4 +1641,14 @@ COUNT(*)
DROP USER nonpriv;
DROP TABLE db1.t1;
DROP DATABASE db1;
+
+Bug#54422 query with = 'variables'
+
+CREATE TABLE variables(f1 INT);
+SELECT COLUMN_DEFAULT, TABLE_NAME
+FROM INFORMATION_SCHEMA.COLUMNS
+WHERE INFORMATION_SCHEMA.COLUMNS.TABLE_NAME = 'variables';
+COLUMN_DEFAULT TABLE_NAME
+NULL variables
+DROP TABLE variables;
End of 5.1 tests.
diff --git a/mysql-test/r/innodb_mysql_lock2.result b/mysql-test/r/innodb_mysql_lock2.result
new file mode 100644
index 00000000000..79606ea8bdc
--- /dev/null
+++ b/mysql-test/r/innodb_mysql_lock2.result
@@ -0,0 +1,601 @@
+#
+# Test how do we handle locking in various cases when
+# we read data from InnoDB tables.
+#
+# In fact by performing this test we check two things:
+# 1) That SQL-layer correctly determine type of thr_lock.c
+# lock to be acquired/passed to InnoDB engine.
+# 2) That InnoDB engine correctly interprets this lock
+# type and takes necessary row locks or does not
+# take them if they are not necessary.
+#
+# This test makes sense only in REPEATABLE-READ mode as
+# in SERIALIZABLE mode all statements that read data take
+# shared lock on them to enforce its semantics.
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+# Prepare playground by creating tables, views,
+# routines and triggers used in tests.
+drop table if exists t0, t1, t2, t3, t4, t5, te;
+drop view if exists v1, v2;
+drop procedure if exists p1;
+drop procedure if exists p2;
+drop function if exists f1;
+drop function if exists f2;
+drop function if exists f3;
+drop function if exists f4;
+drop function if exists f5;
+drop function if exists f6;
+drop function if exists f7;
+drop function if exists f8;
+drop function if exists f9;
+drop function if exists f10;
+drop function if exists f11;
+drop function if exists f12;
+drop function if exists f13;
+drop function if exists f14;
+drop function if exists f15;
+create table t1 (i int primary key) engine=innodb;
+insert into t1 values (1), (2), (3), (4), (5);
+create table t2 (j int primary key) engine=innodb;
+insert into t2 values (1), (2), (3), (4), (5);
+create table t3 (k int primary key) engine=innodb;
+insert into t3 values (1), (2), (3);
+create table t4 (l int primary key) engine=innodb;
+insert into t4 values (1);
+create table t5 (l int primary key) engine=innodb;
+insert into t5 values (1);
+create table te(e int primary key);
+insert into te values (1);
+create view v1 as select i from t1;
+create view v2 as select j from t2 where j in (select i from t1);
+create procedure p1(k int) insert into t2 values (k);
+create function f1() returns int
+begin
+declare j int;
+select i from t1 where i = 1 into j;
+return j;
+end|
+create function f2() returns int
+begin
+declare k int;
+select i from t1 where i = 1 into k;
+insert into t2 values (k + 5);
+return 0;
+end|
+create function f3() returns int
+begin
+return (select i from t1 where i = 3);
+end|
+create function f4() returns int
+begin
+if (select i from t1 where i = 3) then
+return 1;
+else
+return 0;
+end if;
+end|
+create function f5() returns int
+begin
+insert into t2 values ((select i from t1 where i = 1) + 5);
+return 0;
+end|
+create function f6() returns int
+begin
+declare k int;
+select i from v1 where i = 1 into k;
+return k;
+end|
+create function f7() returns int
+begin
+declare k int;
+select j from v2 where j = 1 into k;
+return k;
+end|
+create function f8() returns int
+begin
+declare k int;
+select i from v1 where i = 1 into k;
+insert into t2 values (k+5);
+return k;
+end|
+create function f9() returns int
+begin
+update v2 set j=j+10 where j=1;
+return 1;
+end|
+create function f10() returns int
+begin
+return f1();
+end|
+create function f11() returns int
+begin
+declare k int;
+set k= f1();
+insert into t2 values (k+5);
+return k;
+end|
+create function f12(p int) returns int
+begin
+insert into t2 values (p);
+return p;
+end|
+create function f13(p int) returns int
+begin
+return p;
+end|
+create procedure p2(inout p int)
+begin
+select i from t1 where i = 1 into p;
+end|
+create function f14() returns int
+begin
+declare k int;
+call p2(k);
+insert into t2 values (k+5);
+return k;
+end|
+create function f15() returns int
+begin
+declare k int;
+call p2(k);
+return k;
+end|
+create trigger t4_bi before insert on t4 for each row
+begin
+declare k int;
+select i from t1 where i=1 into k;
+set new.l= k+1;
+end|
+create trigger t4_bu before update on t4 for each row
+begin
+if (select i from t1 where i=1) then
+set new.l= 2;
+end if;
+end|
+# Trigger below uses insertion of duplicate key in 'te'
+# table as a way to abort delete operation.
+create trigger t4_bd before delete on t4 for each row
+begin
+if !(select i from v1 where i=1) then
+insert into te values (1);
+end if;
+end|
+create trigger t5_bi before insert on t5 for each row
+begin
+set new.l= f1()+1;
+end|
+create trigger t5_bu before update on t5 for each row
+begin
+declare j int;
+call p2(j);
+set new.l= j + 1;
+end|
+#
+# Set common variables to be used by scripts called below.
+#
+#
+# 1. Statements that read tables and do not use subqueries.
+#
+#
+# 1.1 Simple SELECT statement.
+#
+# No locks are necessary as this statement won't be written
+# to the binary log and InnoDB supports snapshots.
+Success: 'select * from t1' doesn't take row locks on 't1'.
+#
+# 1.2 Multi-UPDATE statement.
+#
+# Has to take shared locks on rows in the table being read as this
+# statement will be written to the binary log and therefore should
+# be serialized with concurrent statements.
+Success: 'update t2, t1 set j= j - 1 where i = j' takes shared row locks on 't1'.
+#
+# 1.3 Multi-DELETE statement.
+#
+# The above is true for this statement as well.
+Success: 'delete t2 from t1, t2 where i = j' takes shared row locks on 't1'.
+#
+# 1.4 DESCRIBE statement.
+#
+# This statement does not really read data from the
+# target table and thus does not take any lock on it.
+# We check this for completeness of coverage.
+Success: 'describe t1' doesn't take row locks on 't1'.
+#
+# 1.5 SHOW statements.
+#
+# The above is true for SHOW statements as well.
+Success: 'show create table t1' doesn't take row locks on 't1'.
+Success: 'show keys from t1' doesn't take row locks on 't1'.
+#
+# 2. Statements which read tables through subqueries.
+#
+#
+# 2.1 CALL with a subquery.
+#
+# A strong lock is not necessary as this statement is not
+# written to the binary log as a whole (it is written
+# statement-by-statement) and thanks to MVCC we can always get
+# versions of rows prior to the update that has locked them.
+# But in practice InnoDB does locking reads for all statements
+# other than SELECT (unless it is a READ-COMITTED mode or
+# innodb_locks_unsafe_for_binlog is ON).
+Success: 'call p1((select i + 5 from t1 where i = 1))' takes shared row locks on 't1'.
+#
+# 2.2 CREATE TABLE with a subquery.
+#
+# Has to take shared locks on rows in the table being read as
+# this statement is written to the binary log and therefore
+# should be serialized with concurrent statements.
+Success: 'create table t0 engine=innodb select * from t1' takes shared row locks on 't1'.
+drop table t0;
+Success: 'create table t0 engine=innodb select j from t2 where j in (select i from t1)' takes shared row locks on 't1'.
+drop table t0;
+#
+# 2.3 DELETE with a subquery.
+#
+# The above is true for this statement as well.
+Success: 'delete from t2 where j in (select i from t1)' takes shared row locks on 't1'.
+#
+# 2.4 MULTI-DELETE with a subquery.
+#
+# Same is true for this statement as well.
+Success: 'delete t2 from t3, t2 where k = j and j in (select i from t1)' takes shared row locks on 't1'.
+#
+# 2.5 DO with a subquery.
+#
+# In theory should not take row locks as it is not logged.
+# In practice InnoDB takes shared row locks.
+Success: 'do (select i from t1 where i = 1)' takes shared row locks on 't1'.
+#
+# 2.6 INSERT with a subquery.
+#
+# Has to take shared locks on rows in the table being read as
+# this statement is written to the binary log and therefore
+# should be serialized with concurrent statements.
+Success: 'insert into t2 select i+5 from t1' takes shared row locks on 't1'.
+Success: 'insert into t2 values ((select i+5 from t1 where i = 4))' takes shared row locks on 't1'.
+#
+# 2.7 LOAD DATA with a subquery.
+#
+# The above is true for this statement as well.
+Success: 'load data infile '../../std_data/rpl_loaddata.dat' into table t2 (@a, @b) set j= @b + (select i from t1 where i = 1)' takes shared row locks on 't1'.
+#
+# 2.8 REPLACE with a subquery.
+#
+# Same is true for this statement as well.
+Success: 'replace into t2 select i+5 from t1' takes shared row locks on 't1'.
+Success: 'replace into t2 values ((select i+5 from t1 where i = 4))' takes shared row locks on 't1'.
+#
+# 2.9 SELECT with a subquery.
+#
+# Locks are not necessary as this statement is not written
+# to the binary log and thanks to MVCC we can always get
+# versions of rows prior to the update that has locked them.
+#
+# Also serves as a test case for bug #46947 "Embedded SELECT
+# without FOR UPDATE is causing a lock".
+Success: 'select * from t2 where j in (select i from t1)' doesn't take row locks on 't1'.
+#
+# 2.10 SET with a subquery.
+#
+# In theory should not require locking as it is not written
+# to the binary log. In practice InnoDB acquires shared row
+# locks.
+Success: 'set @a:= (select i from t1 where i = 1)' takes shared row locks on 't1'.
+#
+# 2.11 SHOW with a subquery.
+#
+# Similarly to the previous case, in theory should not require locking
+# as it is not written to the binary log. In practice InnoDB
+# acquires shared row locks.
+Success: 'show tables from test where Tables_in_test = 't2' and (select i from t1 where i = 1)' takes shared row locks on 't1'.
+Success: 'show columns from t2 where (select i from t1 where i = 1)' takes shared row locks on 't1'.
+#
+# 2.12 UPDATE with a subquery.
+#
+# Has to take shared locks on rows in the table being read as
+# this statement is written to the binary log and therefore
+# should be serialized with concurrent statements.
+Success: 'update t2 set j= j-10 where j in (select i from t1)' takes shared row locks on 't1'.
+#
+# 2.13 MULTI-UPDATE with a subquery.
+#
+# Same is true for this statement as well.
+Success: 'update t2, t3 set j= j -10 where j=k and j in (select i from t1)' takes shared row locks on 't1'.
+#
+# 3. Statements which read tables through a view.
+#
+#
+# 3.1 SELECT statement which uses some table through a view.
+#
+# Since this statement is not written to the binary log
+# and old version of rows are accessible thanks to MVCC,
+# no locking is necessary.
+Success: 'select * from v1' doesn't take row locks on 't1'.
+Success: 'select * from v2' doesn't take row locks on 't1'.
+Success: 'select * from t2 where j in (select i from v1)' doesn't take row locks on 't1'.
+Success: 'select * from t3 where k in (select j from v2)' doesn't take row locks on 't1'.
+#
+# 3.2 Statements which modify a table and use views.
+#
+# Since such statements are going to be written to the binary
+# log they need to be serialized against concurrent statements
+# and therefore should take shared row locks on data read.
+Success: 'update t2 set j= j-10 where j in (select i from v1)' takes shared row locks on 't1'.
+Success: 'update t3 set k= k-10 where k in (select j from v2)' takes shared row locks on 't1'.
+Success: 'update t2, v1 set j= j-10 where j = i' takes shared row locks on 't1'.
+Success: 'update v2 set j= j-10 where j = 3' takes shared row locks on 't1'.
+#
+# 4. Statements which read tables through stored functions.
+#
+#
+# 4.1 SELECT/SET with a stored function which does not
+# modify data and uses SELECT in its turn.
+#
+# Calls to such functions won't get into the binary log and
+# thus don't need to acquire strong locks.
+# In 5.5 due to fix for bug #53921 "Wrong locks for SELECTs
+# used stored functions may lead to broken SBR" strong locks
+# are taken (we accepted it as a trade-off for this fix).
+Success: 'select f1()' doesn't take row locks on 't1'.
+Success: 'set @a:= f1()' doesn't take row locks on 't1'.
+#
+# 4.2 INSERT (or other statement which modifies data) with
+# a stored function which does not modify data and uses
+# SELECT.
+#
+# Since such statement is written to the binary log it should
+# be serialized with concurrent statements affecting the data
+# it uses. Therefore it should take row locks on the data
+# it reads.
+# But due to bug #53921 "Wrong locks for SELECTs used stored
+# functions may lead to broken SBR" no lock is taken.
+Success: 'insert into t2 values (f1() + 5)' doesn't take row locks on 't1'.
+#
+# 4.3 SELECT/SET with a stored function which
+# reads and modifies data.
+#
+# Since a call to such function is written to the binary log,
+# it should be serialized with concurrent statements affecting
+# the data it uses. Hence, row locks on the data read
+# should be taken.
+# But due to bug #53921 "Wrong locks for SELECTs used stored
+# functions may lead to broken SBR" no lock is taken.
+Success: 'select f2()' doesn't take row locks on 't1'.
+Success: 'set @a:= f2()' doesn't take row locks on 't1'.
+#
+# 4.4. SELECT/SET with a stored function which does not
+# modify data and reads a table through subselect
+# in a control construct.
+#
+# Again, in theory a call to this function won't get to the
+# binary log and thus no locking is needed. But in practice
+# we don't detect this fact early enough (get_lock_type_for_table())
+# to avoid taking row locks.
+Success: 'select f3()' takes shared row locks on 't1'.
+Success: 'set @a:= f3()' takes shared row locks on 't1'.
+Success: 'select f4()' takes shared row locks on 't1'.
+Success: 'set @a:= f4()' takes shared row locks on 't1'.
+#
+# 4.5. INSERT (or other statement which modifies data) with
+# a stored function which does not modify data and reads
+# the table through a subselect in one of its control
+# constructs.
+#
+# Since such statement is written to the binary log it should
+# be serialized with concurrent statements affecting data it
+# uses. Therefore it should take row locks on the data
+# it reads.
+Success: 'insert into t2 values (f3() + 5)' takes shared row locks on 't1'.
+Success: 'insert into t2 values (f4() + 6)' takes shared row locks on 't1'.
+#
+# 4.6 SELECT/SET which uses a stored function with
+# DML which reads a table via a subquery.
+#
+# Since call to such function is written to the binary log
+# it should be serialized with concurrent statements.
+# Hence reads should take row locks.
+Success: 'select f5()' takes shared row locks on 't1'.
+Success: 'set @a:= f5()' takes shared row locks on 't1'.
+#
+# 4.7 SELECT/SET which uses a stored function which
+# doesn't modify data and reads tables through
+# a view.
+#
+# Once again, in theory, calls to such functions won't
+# get into the binary log and thus don't need row
+# locks. In practice this fact is discovered
+# too late to have any effect.
+# But due to bug #53921 "Wrong locks for SELECTs used stored
+# functions may lead to broken SBR" no lock is taken
+# in case of simple SELECT.
+Success: 'select f6()' doesn't take row locks on 't1'.
+Success: 'set @a:= f6()' doesn't take row locks on 't1'.
+Success: 'select f7()' takes shared row locks on 't1'.
+Success: 'set @a:= f7()' takes shared row locks on 't1'.
+#
+# 4.8 INSERT which uses stored function which
+# doesn't modify data and reads a table
+# through a view.
+#
+# Since such statement is written to the binary log and
+# should be serialized with concurrent statements affecting
+# the data it uses. Therefore it should take row locks on
+# the rows it reads.
+# But due to bug #53921 "Wrong locks for SELECTs used stored
+# functions may lead to broken SBR" no lock is taken
+# in case of simple SELECT.
+Success: 'insert into t3 values (f6() + 5)' doesn't take row locks on 't1'.
+Success: 'insert into t3 values (f7() + 5)' takes shared row locks on 't1'.
+#
+# 4.9 SELECT which uses a stored function which
+# modifies data and reads tables through a view.
+#
+# Since a call to such function is written to the binary log
+# it should be serialized with concurrent statements.
+# Hence, reads should take row locks.
+# But due to bug #53921 "Wrong locks for SELECTs used stored
+# functions may lead to broken SBR" no lock is taken
+# in case of simple SELECT.
+Success: 'select f8()' doesn't take row locks on 't1'.
+Success: 'select f9()' takes shared row locks on 't1'.
+#
+# 4.10 SELECT which uses stored function which doesn't modify
+# data and reads a table indirectly, by calling another
+# function.
+#
+# Calls to such functions won't get into the binary log and
+# thus don't need to acquire strong locks.
+# In 5.5 due to fix for bug #53921 "Wrong locks for SELECTs
+# used stored functions may lead to broken SBR" strong locks
+# are taken (we accepted it as a trade-off for this fix).
+Success: 'select f10()' doesn't take row locks on 't1'.
+#
+# 4.11 INSERT which uses a stored function which doesn't modify
+# data and reads a table indirectly, by calling another
+# function.
+#
+# Since such statement is written to the binary log, it should
+# be serialized with concurrent statements affecting the data it
+# uses. Therefore it should take row locks on data it reads.
+# But due to bug #53921 "Wrong locks for SELECTs used stored
+# functions may lead to broken SBR" no lock is taken.
+Success: 'insert into t2 values (f10() + 5)' doesn't take row locks on 't1'.
+#
+# 4.12 SELECT which uses a stored function which modifies
+# data and reads a table indirectly, by calling another
+# function.
+#
+# Since a call to such function is written to the binary log
+# it should be serialized from concurrent statements.
+# Hence, reads should take row locks.
+# But due to bug #53921 "Wrong locks for SELECTs used stored
+# functions may lead to broken SBR" no lock is taken.
+Success: 'select f11()' doesn't take row locks on 't1'.
+#
+# 4.13 SELECT that reads a table through a subquery passed
+# as a parameter to a stored function which modifies
+# data.
+#
+# Even though a call to this function is written to the
+# binary log, values of its parameters are written as literals.
+# So there is no need to acquire row locks on rows used in
+# the subquery.
+# But due to the fact that in 5.1 for prelocked statements
+# THD::in_lock_tables is set to TRUE we acquire strong locks
+# (see also bug#44613 "SELECT statement inside FUNCTION takes
+# a shared lock" [sic!!!]).
+Success: 'select f12((select i+10 from t1 where i=1))' takes shared row locks on 't1'.
+#
+# 4.14 INSERT that reads a table via a subquery passed
+# as a parameter to a stored function which doesn't
+# modify data.
+#
+# Since this statement is written to the binary log it should
+# be serialized with concurrent statements affecting the data it
+# uses. Therefore it should take row locks on the data it reads.
+Success: 'insert into t2 values (f13((select i+10 from t1 where i=1)))' takes shared row locks on 't1'.
+#
+# 5. Statements that read tables through stored procedures.
+#
+#
+# 5.1 CALL statement which reads a table via SELECT.
+#
+# Since neither this statement nor its components are
+# written to the binary log, there is no need to take
+# row locks on the data it reads.
+Success: 'call p2(@a)' doesn't take row locks on 't1'.
+#
+# 5.2 Function that modifies data and uses CALL,
+# which reads a table through SELECT.
+#
+# Since a call to such function is written to the binary
+# log, it should be serialized with concurrent statements.
+# Hence, in this case reads should take row locks on data.
+# But due to bug #53921 "Wrong locks for SELECTs used stored
+# functions may lead to broken SBR" no lock is taken.
+Success: 'select f14()' doesn't take row locks on 't1'.
+#
+# 5.3 SELECT that calls a function that doesn't modify data and
+# uses a CALL statement that reads a table via SELECT.
+#
+# Calls to such functions won't get into the binary log and
+# thus don't need to acquire strong locks.
+# In 5.5 due to fix for bug #53921 "Wrong locks for SELECTs
+# used stored functions may lead to broken SBR" strong locks
+# are taken (we accepted it as a trade-off for this fix).
+Success: 'select f15()' doesn't take row locks on 't1'.
+#
+# 5.4 INSERT which calls function which doesn't modify data and
+# uses CALL statement which reads table through SELECT.
+#
+# Since such statement is written to the binary log it should
+# be serialized with concurrent statements affecting data it
+# uses. Therefore it should take row locks on data it reads.
+# But due to bug #53921 "Wrong locks for SELECTs used stored
+# functions may lead to broken SBR" no lock is taken.
+Success: 'insert into t2 values (f15()+5)' doesn't take row locks on 't1'.
+#
+# 6. Statements that use triggers.
+#
+#
+# 6.1 Statement invoking a trigger that reads table via SELECT.
+#
+# Since this statement is written to the binary log it should
+# be serialized with concurrent statements affecting the data
+# it uses. Therefore, it should take row locks on the data
+# it reads.
+# But due to bug #53921 "Wrong locks for SELECTs used stored
+# functions may lead to broken SBR" no lock is taken.
+Success: 'insert into t4 values (2)' doesn't take row locks on 't1'.
+#
+# 6.2 Statement invoking a trigger that reads table through
+# a subquery in a control construct.
+#
+# The above is true for this statement as well.
+Success: 'update t4 set l= 2 where l = 1' takes shared row locks on 't1'.
+#
+# 6.3 Statement invoking a trigger that reads a table through
+# a view.
+#
+# And for this statement.
+Success: 'delete from t4 where l = 1' takes shared row locks on 't1'.
+#
+# 6.4 Statement invoking a trigger that reads a table through
+# a stored function.
+#
+# And for this statement.
+# But due to bug #53921 "Wrong locks for SELECTs used stored
+# functions may lead to broken SBR" no lock is taken.
+Success: 'insert into t5 values (2)' doesn't take row locks on 't1'.
+#
+# 6.5 Statement invoking a trigger that reads a table through
+# stored procedure.
+#
+# And for this statement.
+# But due to bug #53921 "Wrong locks for SELECTs used stored
+# functions may lead to broken SBR" no lock is taken.
+Success: 'update t5 set l= 2 where l = 1' doesn't take row locks on 't1'.
+# Clean-up.
+drop function f1;
+drop function f2;
+drop function f3;
+drop function f4;
+drop function f5;
+drop function f6;
+drop function f7;
+drop function f8;
+drop function f9;
+drop function f10;
+drop function f11;
+drop function f12;
+drop function f13;
+drop function f14;
+drop function f15;
+drop view v1, v2;
+drop procedure p1;
+drop procedure p2;
+drop table t1, t2, t3, t4, t5, te;
diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result
index 4543446e807..8e438934b23 100644
--- a/mysql-test/r/join_outer.result
+++ b/mysql-test/r/join_outer.result
@@ -1308,4 +1308,93 @@ WHERE (COALESCE(t1.f1, t2.f1), f3) IN ((1, 3), (2, 2));
f1 f2 f3 f1 f2
1 NULL 3 NULL NULL
DROP TABLE t1, t2;
+#
+# Bug#52357: Assertion failed: join->best_read in greedy_search
+# optimizer_search_depth=0
+#
+CREATE TABLE t1( a INT );
+INSERT INTO t1 VALUES (1),(2);
+SET optimizer_search_depth = 0;
+# Should not core dump on query preparation
+EXPLAIN
+SELECT 1
+FROM t1 tt3 LEFT OUTER JOIN t1 tt4 ON 1
+LEFT OUTER JOIN t1 tt5 ON 1
+LEFT OUTER JOIN t1 tt6 ON 1
+LEFT OUTER JOIN t1 tt7 ON 1
+LEFT OUTER JOIN t1 tt8 ON 1
+RIGHT OUTER JOIN t1 tt2 ON 1
+RIGHT OUTER JOIN t1 tt1 ON 1
+STRAIGHT_JOIN t1 tt9 ON 1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE tt1 ALL NULL NULL NULL NULL 2
+1 SIMPLE tt2 ALL NULL NULL NULL NULL 2
+1 SIMPLE tt3 ALL NULL NULL NULL NULL 2
+1 SIMPLE tt4 ALL NULL NULL NULL NULL 2
+1 SIMPLE tt5 ALL NULL NULL NULL NULL 2
+1 SIMPLE tt6 ALL NULL NULL NULL NULL 2
+1 SIMPLE tt7 ALL NULL NULL NULL NULL 2
+1 SIMPLE tt8 ALL NULL NULL NULL NULL 2
+1 SIMPLE tt9 ALL NULL NULL NULL NULL 2 Using join buffer
+SET optimizer_search_depth = DEFAULT;
+DROP TABLE t1;
+#
+# Bug#46091 STRAIGHT_JOIN + RIGHT JOIN returns different result
+#
+CREATE TABLE t1 (f1 INT NOT NULL);
+INSERT INTO t1 VALUES (9),(0);
+CREATE TABLE t2 (f1 INT NOT NULL);
+INSERT INTO t2 VALUES
+(5),(3),(0),(3),(1),(0),(1),(7),(1),(0),(0),(8),(4),(9),(0),(2),(0),(8),(5),(1);
+SELECT STRAIGHT_JOIN COUNT(*) FROM t1 TA1
+RIGHT JOIN t2 TA2 JOIN t2 TA3 ON TA2.f1 ON TA3.f1;
+COUNT(*)
+476
+EXPLAIN SELECT STRAIGHT_JOIN COUNT(*) FROM t1 TA1
+RIGHT JOIN t2 TA2 JOIN t2 TA3 ON TA2.f1 ON TA3.f1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE TA2 ALL NULL NULL NULL NULL 20 Using where
+1 SIMPLE TA3 ALL NULL NULL NULL NULL 20 Using join buffer
+1 SIMPLE TA1 ALL NULL NULL NULL NULL 2
+DROP TABLE t1, t2;
+#
+# Bug#48971 Segfault in add_found_match_trig_cond () at sql_select.cc:5990
+#
+CREATE TABLE t1(f1 INT, PRIMARY KEY (f1));
+INSERT INTO t1 VALUES (1),(2);
+EXPLAIN EXTENDED SELECT STRAIGHT_JOIN jt1.f1 FROM t1 AS jt1
+LEFT JOIN t1 AS jt2
+RIGHT JOIN t1 AS jt3
+JOIN t1 AS jt4 ON 1
+LEFT JOIN t1 AS jt5 ON 1
+ON 1
+RIGHT JOIN t1 AS jt6 ON jt6.f1
+ON 1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE jt1 index NULL PRIMARY 4 NULL 2 100.00 Using index
+1 SIMPLE jt6 index NULL PRIMARY 4 NULL 2 100.00 Using index
+1 SIMPLE jt3 index NULL PRIMARY 4 NULL 2 100.00 Using index
+1 SIMPLE jt4 index NULL PRIMARY 4 NULL 2 100.00 Using index
+1 SIMPLE jt5 index NULL PRIMARY 4 NULL 2 100.00 Using index
+1 SIMPLE jt2 index NULL PRIMARY 4 NULL 2 100.00 Using index
+Warnings:
+Note 1003 select straight_join `test`.`jt1`.`f1` AS `f1` from `test`.`t1` `jt1` left join (`test`.`t1` `jt6` left join (`test`.`t1` `jt3` join `test`.`t1` `jt4` left join `test`.`t1` `jt5` on(1) left join `test`.`t1` `jt2` on(1)) on((`test`.`jt6`.`f1` and 1))) on(1) where 1
+EXPLAIN EXTENDED SELECT STRAIGHT_JOIN jt1.f1 FROM t1 AS jt1
+RIGHT JOIN t1 AS jt2
+RIGHT JOIN t1 AS jt3
+JOIN t1 AS jt4 ON 1
+LEFT JOIN t1 AS jt5 ON 1
+ON 1
+RIGHT JOIN t1 AS jt6 ON jt6.f1
+ON 1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE jt6 index NULL PRIMARY 4 NULL 2 100.00 Using index
+1 SIMPLE jt3 index NULL PRIMARY 4 NULL 2 100.00 Using index
+1 SIMPLE jt4 index NULL PRIMARY 4 NULL 2 100.00 Using index
+1 SIMPLE jt5 index NULL PRIMARY 4 NULL 2 100.00 Using index
+1 SIMPLE jt2 index NULL PRIMARY 4 NULL 2 100.00 Using index
+1 SIMPLE jt1 index NULL PRIMARY 4 NULL 2 100.00 Using index
+Warnings:
+Note 1003 select straight_join `test`.`jt1`.`f1` AS `f1` from `test`.`t1` `jt6` left join (`test`.`t1` `jt3` join `test`.`t1` `jt4` left join `test`.`t1` `jt5` on(1) left join `test`.`t1` `jt2` on(1)) on((`test`.`jt6`.`f1` and 1)) left join `test`.`t1` `jt1` on(1) where 1
+DROP TABLE t1;
End of 5.1 tests
diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result
index b3487d376a1..665e80b8ba2 100644
--- a/mysql-test/r/loaddata.result
+++ b/mysql-test/r/loaddata.result
@@ -496,4 +496,11 @@ SELECT * FROM t1;
col0
test
DROP TABLE t1;
+#
+# Bug #52512 : Assertion `! is_set()' in
+# Diagnostics_area::set_ok_status on LOAD DATA
+#
+CREATE TABLE t1 (id INT NOT NULL);
+LOAD DATA LOCAL INFILE 'tb.txt' INTO TABLE t1;
+DROP TABLE t1;
End of 5.1 tests
diff --git a/mysql-test/r/lock_sync.result b/mysql-test/r/lock_sync.result
new file mode 100644
index 00000000000..752f278a2b4
--- /dev/null
+++ b/mysql-test/r/lock_sync.result
@@ -0,0 +1,631 @@
+#
+# Test how we handle locking in various cases when
+# we read data from MyISAM tables.
+#
+# In this test we mostly check that the SQL-layer correctly
+# determines the type of thr_lock.c lock for a table being
+# read.
+# I.e. that it disallows concurrent inserts when the statement
+# is going to be written to the binary log and therefore
+# should be serialized, and allows concurrent inserts when
+# such serialization is not necessary (e.g. when
+# the statement is not written to binary log).
+#
+# Force concurrent inserts to be performed even if the table
+# has gaps. This allows to simplify clean up in scripts
+# used below (instead of backing up table being inserted
+# into and then restoring it from backup at the end of the
+# script we can simply delete rows which were inserted).
+set @old_concurrent_insert= @@global.concurrent_insert;
+set @@global.concurrent_insert= 2;
+select @@global.concurrent_insert;
+@@global.concurrent_insert
+2
+# Prepare playground by creating tables, views,
+# routines and triggers used in tests.
+drop table if exists t0, t1, t2, t3, t4, t5, te;
+drop view if exists v1, v2;
+drop procedure if exists p1;
+drop procedure if exists p2;
+drop function if exists f1;
+drop function if exists f2;
+drop function if exists f3;
+drop function if exists f4;
+drop function if exists f5;
+drop function if exists f6;
+drop function if exists f7;
+drop function if exists f8;
+drop function if exists f9;
+drop function if exists f10;
+drop function if exists f11;
+drop function if exists f12;
+drop function if exists f13;
+drop function if exists f14;
+drop function if exists f15;
+create table t1 (i int primary key);
+insert into t1 values (1), (2), (3), (4), (5);
+create table t2 (j int primary key);
+insert into t2 values (1), (2), (3), (4), (5);
+create table t3 (k int primary key);
+insert into t3 values (1), (2), (3);
+create table t4 (l int primary key);
+insert into t4 values (1);
+create table t5 (l int primary key);
+insert into t5 values (1);
+create table te(e int primary key);
+insert into te values (1);
+create view v1 as select i from t1;
+create view v2 as select j from t2 where j in (select i from t1);
+create procedure p1(k int) insert into t2 values (k);
+create function f1() returns int
+begin
+declare j int;
+select i from t1 where i = 1 into j;
+return j;
+end|
+create function f2() returns int
+begin
+declare k int;
+select i from t1 where i = 1 into k;
+insert into t2 values (k + 5);
+return 0;
+end|
+create function f3() returns int
+begin
+return (select i from t1 where i = 3);
+end|
+create function f4() returns int
+begin
+if (select i from t1 where i = 3) then
+return 1;
+else
+return 0;
+end if;
+end|
+create function f5() returns int
+begin
+insert into t2 values ((select i from t1 where i = 1) + 5);
+return 0;
+end|
+create function f6() returns int
+begin
+declare k int;
+select i from v1 where i = 1 into k;
+return k;
+end|
+create function f7() returns int
+begin
+declare k int;
+select j from v2 where j = 1 into k;
+return k;
+end|
+create function f8() returns int
+begin
+declare k int;
+select i from v1 where i = 1 into k;
+insert into t2 values (k+5);
+return k;
+end|
+create function f9() returns int
+begin
+update v2 set j=j+10 where j=1;
+return 1;
+end|
+create function f10() returns int
+begin
+return f1();
+end|
+create function f11() returns int
+begin
+declare k int;
+set k= f1();
+insert into t2 values (k+5);
+return k;
+end|
+create function f12(p int) returns int
+begin
+insert into t2 values (p);
+return p;
+end|
+create function f13(p int) returns int
+begin
+return p;
+end|
+create procedure p2(inout p int)
+begin
+select i from t1 where i = 1 into p;
+end|
+create function f14() returns int
+begin
+declare k int;
+call p2(k);
+insert into t2 values (k+5);
+return k;
+end|
+create function f15() returns int
+begin
+declare k int;
+call p2(k);
+return k;
+end|
+create trigger t4_bi before insert on t4 for each row
+begin
+declare k int;
+select i from t1 where i=1 into k;
+set new.l= k+1;
+end|
+create trigger t4_bu before update on t4 for each row
+begin
+if (select i from t1 where i=1) then
+set new.l= 2;
+end if;
+end|
+# Trigger below uses insertion of duplicate key in 'te'
+# table as a way to abort delete operation.
+create trigger t4_bd before delete on t4 for each row
+begin
+if !(select i from v1 where i=1) then
+insert into te values (1);
+end if;
+end|
+create trigger t5_bi before insert on t5 for each row
+begin
+set new.l= f1()+1;
+end|
+create trigger t5_bu before update on t5 for each row
+begin
+declare j int;
+call p2(j);
+set new.l= j + 1;
+end|
+#
+# Set common variables to be used by the scripts
+# called below.
+#
+# Switch to connection 'con1'.
+# Cache all functions used in the tests below so statements
+# calling them won't need to open and lock mysql.proc table
+# and we can assume that each statement locks its tables
+# once during its execution.
+show create procedure p1;
+show create procedure p2;
+show create function f1;
+show create function f2;
+show create function f3;
+show create function f4;
+show create function f5;
+show create function f6;
+show create function f7;
+show create function f8;
+show create function f9;
+show create function f10;
+show create function f11;
+show create function f12;
+show create function f13;
+show create function f14;
+show create function f15;
+# Switch back to connection 'default'.
+#
+# 1. Statements that read tables and do not use subqueries.
+#
+#
+# 1.1 Simple SELECT statement.
+#
+# No locks are necessary as this statement won't be written
+# to the binary log and thanks to how MyISAM works SELECT
+# will see version of the table prior to concurrent insert.
+Success: 'select * from t1' allows concurrent inserts into 't1'.
+#
+# 1.2 Multi-UPDATE statement.
+#
+# Has to take shared locks on rows in the table being read as this
+# statement will be written to the binary log and therefore should
+# be serialized with concurrent statements.
+Success: 'update t2, t1 set j= j - 1 where i = j' doesn't allow concurrent inserts into 't1'.
+#
+# 1.3 Multi-DELETE statement.
+#
+# The above is true for this statement as well.
+Success: 'delete t2 from t1, t2 where i = j' doesn't allow concurrent inserts into 't1'.
+#
+# 1.4 DESCRIBE statement.
+#
+# This statement does not really read data from the
+# target table and thus does not take any lock on it.
+# We check this for completeness of coverage.
+lock table t1 write;
+# Switching to connection 'con1'.
+# This statement should not be blocked.
+describe t1;
+# Switching to connection 'default'.
+unlock tables;
+#
+# 1.5 SHOW statements.
+#
+# The above is true for SHOW statements as well.
+lock table t1 write;
+# Switching to connection 'con1'.
+# These statements should not be blocked.
+show keys from t1;
+# Switching to connection 'default'.
+unlock tables;
+#
+# 2. Statements which read tables through subqueries.
+#
+#
+# 2.1 CALL with a subquery.
+#
+# In theory strong lock is not necessary as this statement
+# is not written to the binary log as a whole (it is written
+# statement-by-statement). But in practice in 5.1 for
+# almost everything except SELECT we take strong lock.
+Success: 'call p1((select i + 5 from t1 where i = 1))' doesn't allow concurrent inserts into 't1'.
+#
+# 2.2 CREATE TABLE with a subquery.
+#
+# Has to take a strong lock on the table being read as
+# this statement is written to the binary log and therefore
+# should be serialized with concurrent statements.
+Success: 'create table t0 select * from t1' doesn't allow concurrent inserts into 't1'.
+drop table t0;
+Success: 'create table t0 select j from t2 where j in (select i from t1)' doesn't allow concurrent inserts into 't1'.
+drop table t0;
+#
+# 2.3 DELETE with a subquery.
+#
+# The above is true for this statement as well.
+Success: 'delete from t2 where j in (select i from t1)' doesn't allow concurrent inserts into 't1'.
+#
+# 2.4 MULTI-DELETE with a subquery.
+#
+# Same is true for this statement as well.
+Success: 'delete t2 from t3, t2 where k = j and j in (select i from t1)' doesn't allow concurrent inserts into 't1'.
+#
+# 2.5 DO with a subquery.
+#
+# In theory strong lock is not necessary as it is not logged.
+# But in practice in 5.1 for almost everything except SELECT
+# we take strong lock.
+Success: 'do (select i from t1 where i = 1)' doesn't allow concurrent inserts into 't1'.
+#
+# 2.6 INSERT with a subquery.
+#
+# Has to take a strong lock on the table being read as
+# this statement is written to the binary log and therefore
+# should be serialized with concurrent inserts.
+Success: 'insert into t2 select i+5 from t1' doesn't allow concurrent inserts into 't1'.
+Success: 'insert into t2 values ((select i+5 from t1 where i = 4))' doesn't allow concurrent inserts into 't1'.
+#
+# 2.7 LOAD DATA with a subquery.
+#
+# The above is true for this statement as well.
+Success: 'load data infile '../../std_data/rpl_loaddata.dat' into table t2 (@a, @b) set j= @b + (select i from t1 where i = 1)' doesn't allow concurrent inserts into 't1'.
+#
+# 2.8 REPLACE with a subquery.
+#
+# Same is true for this statement as well.
+Success: 'replace into t2 select i+5 from t1' doesn't allow concurrent inserts into 't1'.
+Success: 'replace into t2 values ((select i+5 from t1 where i = 4))' doesn't allow concurrent inserts into 't1'.
+#
+# 2.9 SELECT with a subquery.
+#
+# Strong locks are not necessary as this statement is not written
+# to the binary log and thanks to how MyISAM works this statement
+# sees a version of the table prior to the concurrent insert.
+Success: 'select * from t2 where j in (select i from t1)' allows concurrent inserts into 't1'.
+#
+# 2.10 SET with a subquery.
+#
+# In theory the same is true for this statement as well.
+# But in practice in 5.1 we acquire strong lock in this
+# case as well.
+Success: 'set @a:= (select i from t1 where i = 1)' doesn't allow concurrent inserts into 't1'.
+#
+# 2.11 SHOW with a subquery.
+#
+# The same is true for this statement too.
+Success: 'show tables from test where Tables_in_test = 't2' and (select i from t1 where i = 1)' doesn't allow concurrent inserts into 't1'.
+Success: 'show columns from t2 where (select i from t1 where i = 1)' doesn't allow concurrent inserts into 't1'.
+#
+# 2.12 UPDATE with a subquery.
+#
+# Has to take a strong lock on the table being read as
+# this statement is written to the binary log and therefore
+# should be serialized with concurrent inserts.
+Success: 'update t2 set j= j-10 where j in (select i from t1)' doesn't allow concurrent inserts into 't1'.
+#
+# 2.13 MULTI-UPDATE with a subquery.
+#
+# Same is true for this statement as well.
+Success: 'update t2, t3 set j= j -10 where j=k and j in (select i from t1)' doesn't allow concurrent inserts into 't1'.
+#
+# 3. Statements which read tables through a view.
+#
+#
+# 3.1 SELECT statement which uses some table through a view.
+#
+# Since this statement is not written to the binary log and
+# an old version of the table is accessible thanks to how MyISAM
+# handles concurrent insert, no locking is necessary.
+Success: 'select * from v1' allows concurrent inserts into 't1'.
+Success: 'select * from v2' allows concurrent inserts into 't1'.
+Success: 'select * from t2 where j in (select i from v1)' allows concurrent inserts into 't1'.
+Success: 'select * from t3 where k in (select j from v2)' allows concurrent inserts into 't1'.
+#
+# 3.2 Statements which modify a table and use views.
+#
+# Since such statements are going to be written to the binary
+# log they need to be serialized against concurrent statements
+# and therefore should take strong locks on the data read.
+Success: 'update t2 set j= j-10 where j in (select i from v1)' doesn't allow concurrent inserts into 't1'.
+Success: 'update t3 set k= k-10 where k in (select j from v2)' doesn't allow concurrent inserts into 't1'.
+Success: 'update t2, v1 set j= j-10 where j = i' doesn't allow concurrent inserts into 't1'.
+Success: 'update v2 set j= j-10 where j = 3' doesn't allow concurrent inserts into 't1'.
+#
+# 4. Statements which read tables through stored functions.
+#
+#
+# 4.1 SELECT/SET with a stored function which does not
+# modify data and uses SELECT in its turn.
+#
+# Calls to such functions won't get into the binary log and
+# thus don't need to acquire strong locks.
+# In 5.5 due to fix for bug #53921 "Wrong locks for SELECTs
+# used stored functions may lead to broken SBR" strong locks
+# are taken (we accepted it as a trade-off for this fix).
+Success: 'select f1()' allows concurrent inserts into 't1'.
+Success: 'set @a:= f1()' allows concurrent inserts into 't1'.
+#
+# 4.2 INSERT (or other statement which modifies data) with
+# a stored function which does not modify data and uses
+# SELECT.
+#
+# Since such statement is written to the binary log it should
+# be serialized with concurrent statements affecting the data
+# it uses. Therefore it should take strong lock on the data
+# it reads.
+# But due to bug #53921 "Wrong locks for SELECTs used stored
+# functions may lead to broken SBR" weak locks are taken.
+Success: 'insert into t2 values (f1() + 5)' allows concurrent inserts into 't1'.
+#
+# 4.3 SELECT/SET with a stored function which
+# reads and modifies data.
+#
+# Since a call to such function is written to the binary log,
+# it should be serialized with concurrent statements affecting
+# the data it uses. Hence, a strong lock on the data read
+# should be taken.
+# But due to bug #53921 "Wrong locks for SELECTs used stored
+# functions may lead to broken SBR" weak locks are taken.
+Success: 'select f2()' allows concurrent inserts into 't1'.
+Success: 'set @a:= f2()' allows concurrent inserts into 't1'.
+#
+# 4.4. SELECT/SET with a stored function which does not
+# modify data and reads a table through subselect
+# in a control construct.
+#
+# Again, in theory a call to this function won't get to the
+# binary log and thus no strong lock is needed. But in practice
+# we don't detect this fact early enough (get_lock_type_for_table())
+# to avoid taking a strong lock.
+Success: 'select f3()' doesn't allow concurrent inserts into 't1'.
+Success: 'set @a:= f3()' doesn't allow concurrent inserts into 't1'.
+Success: 'select f4()' doesn't allow concurrent inserts into 't1'.
+Success: 'set @a:= f4()' doesn't allow concurrent inserts into 't1'.
+#
+# 4.5. INSERT (or other statement which modifies data) with
+# a stored function which does not modify data and reads
+# the table through a subselect in one of its control
+# constructs.
+#
+# Since such statement is written to the binary log it should
+# be serialized with concurrent statements affecting data it
+# uses. Therefore it should take a strong lock on the data
+# it reads.
+Success: 'insert into t2 values (f3() + 5)' doesn't allow concurrent inserts into 't1'.
+Success: 'insert into t2 values (f4() + 6)' doesn't allow concurrent inserts into 't1'.
+#
+# 4.6 SELECT/SET which uses a stored function with
+# DML which reads a table via a subquery.
+#
+# Since call to such function is written to the binary log
+# it should be serialized with concurrent statements.
+# Hence reads should take a strong lock.
+Success: 'select f5()' doesn't allow concurrent inserts into 't1'.
+Success: 'set @a:= f5()' doesn't allow concurrent inserts into 't1'.
+#
+# 4.7 SELECT/SET which uses a stored function which
+# doesn't modify data and reads tables through
+# a view.
+#
+# Once again, in theory, calls to such functions won't
+# get into the binary log and thus don't need strong
+# locks. In practice this fact is discovered
+# too late to have any effect.
+# But due to bug #53921 "Wrong locks for SELECTs used stored
+# functions may lead to broken SBR" weak locks are taken
+# in case when simple SELECT is used.
+Success: 'select f6()' allows concurrent inserts into 't1'.
+Success: 'set @a:= f6()' allows concurrent inserts into 't1'.
+Success: 'select f7()' doesn't allow concurrent inserts into 't1'.
+Success: 'set @a:= f7()' doesn't allow concurrent inserts into 't1'.
+#
+# 4.8 INSERT which uses stored function which
+# doesn't modify data and reads a table
+# through a view.
+#
+# Since such statement is written to the binary log and
+# should be serialized with concurrent statements affecting
+# the data it uses. Therefore it should take a strong lock on
+# the table it reads.
+# But due to bug #53921 "Wrong locks for SELECTs used stored
+# functions may lead to broken SBR" weak locks are taken
+# in case when simple SELECT is used.
+Success: 'insert into t3 values (f6() + 5)' allows concurrent inserts into 't1'.
+Success: 'insert into t3 values (f7() + 5)' doesn't allow concurrent inserts into 't1'.
+#
+# 4.9 SELECT which uses a stored function which
+# modifies data and reads tables through a view.
+#
+# Since a call to such function is written to the binary log
+# it should be serialized with concurrent statements.
+# Hence, reads should take strong locks.
+# But due to bug #53921 "Wrong locks for SELECTs used stored
+# functions may lead to broken SBR" weak locks are taken
+# in case when simple SELECT is used.
+Success: 'select f8()' allows concurrent inserts into 't1'.
+Success: 'select f9()' doesn't allow concurrent inserts into 't1'.
+#
+# 4.10 SELECT which uses a stored function which doesn't modify
+# data and reads a table indirectly, by calling another
+# function.
+#
+# Calls to such functions won't get into the binary log and
+# thus don't need to acquire strong locks.
+# In 5.5 due to fix for bug #53921 "Wrong locks for SELECTs
+# used stored functions may lead to broken SBR" strong locks
+# are taken (we accepted it as a trade-off for this fix).
+Success: 'select f10()' allows concurrent inserts into 't1'.
+#
+# 4.11 INSERT which uses a stored function which doesn't modify
+# data and reads a table indirectly, by calling another
+# function.
+#
+# Since such statement is written to the binary log, it should
+# be serialized with concurrent statements affecting the data it
+# uses. Therefore it should take strong locks on data it reads.
+# But due to bug #53921 "Wrong locks for SELECTs used stored
+# functions may lead to broken SBR" weak locks are taken.
+Success: 'insert into t2 values (f10() + 5)' allows concurrent inserts into 't1'.
+#
+# 4.12 SELECT which uses a stored function which modifies
+# data and reads a table indirectly, by calling another
+# function.
+#
+# Since a call to such function is written to the binary log
+# it should be serialized from concurrent statements.
+# Hence, read should take a strong lock.
+# But due to bug #53921 "Wrong locks for SELECTs used stored
+# functions may lead to broken SBR" weak locks are taken.
+Success: 'select f11()' allows concurrent inserts into 't1'.
+#
+# 4.13 SELECT that reads a table through a subquery passed
+# as a parameter to a stored function which modifies
+# data.
+#
+# Even though a call to this function is written to the
+# binary log, values of its parameters are written as literals.
+# So there is no need to acquire strong locks for tables used in
+# the subquery.
+Success: 'select f12((select i+10 from t1 where i=1))' allows concurrent inserts into 't1'.
+#
+# 4.14 INSERT that reads a table via a subquery passed
+# as a parameter to a stored function which doesn't
+# modify data.
+#
+# Since this statement is written to the binary log it should
+# be serialized with concurrent statements affecting the data it
+# uses. Therefore it should take strong locks on the data it reads.
+Success: 'insert into t2 values (f13((select i+10 from t1 where i=1)))' doesn't allow concurrent inserts into 't1'.
+#
+# 5. Statements that read tables through stored procedures.
+#
+#
+# 5.1 CALL statement which reads a table via SELECT.
+#
+# Since neither this statement nor its components are
+# written to the binary log, there is no need to take
+# strong locks on the data it reads.
+Success: 'call p2(@a)' allows concurrent inserts into 't1'.
+#
+# 5.2 Function that modifies data and uses CALL,
+# which reads a table through SELECT.
+#
+# Since a call to such function is written to the binary
+# log, it should be serialized with concurrent statements.
+# Hence, in this case reads should take strong locks on data.
+# But due to bug #53921 "Wrong locks for SELECTs used stored
+# functions may lead to broken SBR" weak locks are taken.
+Success: 'select f14()' allows concurrent inserts into 't1'.
+#
+# 5.3 SELECT that calls a function that doesn't modify data and
+# uses a CALL statement that reads a table via SELECT.
+#
+# Calls to such functions won't get into the binary log and
+# thus don't need to acquire strong locks.
+# In 5.5 due to fix for bug #53921 "Wrong locks for SELECTs
+# used stored functions may lead to broken SBR" strong locks
+# are taken (we accepted it as a trade-off for this fix).
+Success: 'select f15()' allows concurrent inserts into 't1'.
+#
+# 5.4 INSERT which calls function which doesn't modify data and
+# uses CALL statement which reads table through SELECT.
+#
+# Since such statement is written to the binary log it should
+# be serialized with concurrent statements affecting data it
+# uses. Therefore it should take strong locks on data it reads.
+# But due to bug #53921 "Wrong locks for SELECTs used stored
+# functions may lead to broken SBR" weak locks are taken.
+Success: 'insert into t2 values (f15()+5)' allows concurrent inserts into 't1'.
+#
+# 6. Statements that use triggers.
+#
+#
+# 6.1 Statement invoking a trigger that reads table via SELECT.
+#
+# Since this statement is written to the binary log it should
+# be serialized with concurrent statements affecting the data
+# it uses. Therefore, it should take strong locks on the data
+# it reads.
+# But due to bug #53921 "Wrong locks for SELECTs used stored
+# functions may lead to broken SBR" weak locks are taken.
+Success: 'insert into t4 values (2)' allows concurrent inserts into 't1'.
+#
+# 6.2 Statement invoking a trigger that reads table through
+# a subquery in a control construct.
+#
+# The above is true for this statement as well.
+Success: 'update t4 set l= 2 where l = 1' doesn't allow concurrent inserts into 't1'.
+#
+# 6.3 Statement invoking a trigger that reads a table through
+# a view.
+#
+# And for this statement.
+Success: 'delete from t4 where l = 1' doesn't allow concurrent inserts into 't1'.
+#
+# 6.4 Statement invoking a trigger that reads a table through
+# a stored function.
+#
+# And for this statement.
+# But due to bug #53921 "Wrong locks for SELECTs used stored
+# functions may lead to broken SBR" weak locks are taken.
+Success: 'insert into t5 values (2)' allows concurrent inserts into 't1'.
+#
+# 6.5 Statement invoking a trigger that reads a table through
+# stored procedure.
+#
+# And for this statement.
+# But due to bug #53921 "Wrong locks for SELECTs used stored
+# functions may lead to broken SBR" weak locks are taken.
+Success: 'update t5 set l= 2 where l = 1' allows concurrent inserts into 't1'.
+# Clean-up.
+drop function f1;
+drop function f2;
+drop function f3;
+drop function f4;
+drop function f5;
+drop function f6;
+drop function f7;
+drop function f8;
+drop function f9;
+drop function f10;
+drop function f11;
+drop function f12;
+drop function f13;
+drop function f14;
+drop function f15;
+drop view v1, v2;
+drop procedure p1;
+drop procedure p2;
+drop table t1, t2, t3, t4, t5, te;
+set @@global.concurrent_insert= @old_concurrent_insert;
diff --git a/mysql-test/r/log_state.result b/mysql-test/r/log_state.result
index 4ce678e37aa..654f9d127d3 100644
--- a/mysql-test/r/log_state.result
+++ b/mysql-test/r/log_state.result
@@ -308,8 +308,41 @@ SET @@global.general_log = @old_general_log;
SET @@global.general_log_file = @old_general_log_file;
SET @@global.slow_query_log = @old_slow_query_log;
SET @@global.slow_query_log_file = @old_slow_query_log_file;
+#
+# Bug #49756 Rows_examined is always 0 in the slow query log
+# for update statements
+#
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = "TABLE";
+SET GLOBAL slow_query_log = ON;
+SET GLOBAL long_query_time = 0.001;
+TRUNCATE TABLE mysql.slow_log;
+CREATE TABLE t1 (a INT);
+CREATE TABLE t2 (b INT, PRIMARY KEY (b));
+INSERT INTO t2 VALUES (3),(4);
+INSERT INTO t1 VALUES (1+sleep(.01)),(2);
+INSERT INTO t1 SELECT b+sleep(.01) from t2;
+UPDATE t1 SET a=a+sleep(.01) WHERE a>2;
+UPDATE t1 SET a=a+sleep(.01) ORDER BY a DESC;
+UPDATE t2 set b=b+sleep(.01) limit 1;
+UPDATE t1 SET a=a+sleep(.01) WHERE a in (SELECT b from t2);
+DELETE FROM t1 WHERE a=a+sleep(.01) ORDER BY a LIMIT 2;
+SELECT rows_examined,sql_text FROM mysql.slow_log;
+rows_examined sql_text
+0 INSERT INTO t1 VALUES (1+sleep(.01)),(2)
+2 INSERT INTO t1 SELECT b+sleep(.01) from t2
+4 UPDATE t1 SET a=a+sleep(.01) WHERE a>2
+8 UPDATE t1 SET a=a+sleep(.01) ORDER BY a DESC
+2 UPDATE t2 set b=b+sleep(.01) limit 1
+4 UPDATE t1 SET a=a+sleep(.01) WHERE a in (SELECT b from t2)
+6 DELETE FROM t1 WHERE a=a+sleep(.01) ORDER BY a LIMIT 2
+DROP TABLE t1,t2;
+TRUNCATE TABLE mysql.slow_log;
+# end of bug#49756
End of 5.1 tests
# Close connection con1
+SET GLOBAL long_query_time = DEFAULT;
+SET GLOBAL log_output = @old_log_output;
SET global general_log = @old_general_log;
SET global general_log_file = @old_general_log_file;
SET global slow_query_log = @old_slow_query_log;
diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result
index 04bf7720c43..ae72f416c79 100644
--- a/mysql-test/r/multi_update.result
+++ b/mysql-test/r/multi_update.result
@@ -602,9 +602,6 @@ select * from t2 /* must be (3,1), (4,4) */;
a b
3 1
4 4
-show master status /* there must be the UPDATE query event */;
-File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000001 206
delete from t1;
delete from t2;
insert into t1 values (1,2),(3,4),(4,4);
@@ -612,9 +609,6 @@ insert into t2 values (1,2),(3,4),(4,4);
reset master;
UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a;
ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
-show master status /* there must be the UPDATE query event */;
-File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000001 221
drop table t1, t2;
set @@session.binlog_format= @sav_binlog_format;
drop table if exists t1, t2, t3;
diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result
index ad77d04d583..ccf60ae5fd9 100644
--- a/mysql-test/r/mysqldump.result
+++ b/mysql-test/r/mysqldump.result
@@ -4561,5 +4561,20 @@ a b c
SET NAMES default;
DROP TABLE t1, t2;
#
+# Bug #53088: mysqldump with -T & --default-character-set set
+# truncates text/blob to 766 chars
+#
+# Also see outfile_loaddata.test
+#
+CREATE TABLE t1 (a BLOB) CHARSET latin1;
+CREATE TABLE t2 LIKE t1;
+INSERT INTO t1 VALUES (REPEAT('.', 800));
+LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET latin1;
+# should be 800
+SELECT LENGTH(a) FROM t2;
+LENGTH(a)
+800
+DROP TABLE t1, t2;
+#
# End of 5.1 tests
#
diff --git a/mysql-test/r/mysqlhotcopy_archive.result b/mysql-test/r/mysqlhotcopy_archive.result
new file mode 100644
index 00000000000..bea78597336
--- /dev/null
+++ b/mysql-test/r/mysqlhotcopy_archive.result
@@ -0,0 +1,118 @@
+DROP DATABASE IF EXISTS hotcopy_test;
+CREATE DATABASE hotcopy_test;
+USE hotcopy_test;
+CREATE TABLE t1 (c1 int, c2 varchar(20)) ENGINE=archive;
+CREATE TABLE t2 (c1 int, c2 varchar(20)) ENGINE=archive;
+CREATE TABLE t3 (c1 int, c2 varchar(20)) ENGINE=archive;
+INSERT INTO t1 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
+Warnings:
+Warning 1265 Data truncated for column 'c2' at row 2
+INSERT INTO t2 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
+Warnings:
+Warning 1265 Data truncated for column 'c2' at row 2
+INSERT INTO t3 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
+Warnings:
+Warning 1265 Data truncated for column 'c2' at row 2
+db.opt
+t1.ARZ
+t1.frm
+t2.ARZ
+t2.frm
+t3.ARZ
+t3.frm
+db.opt
+t1.ARZ
+t1.frm
+t2.ARZ
+t2.frm
+t3.ARZ
+t3.frm
+USE hotcopy_save;
+SELECT * FROM t1;
+c1 c2
+1 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+SELECT * FROM t2;
+c1 c2
+1 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+SELECT * FROM t3;
+c1 c2
+1 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+USE hotcopy_test;
+DROP TABLE t2;
+db.opt
+t1.ARZ
+t1.frm
+t3.ARZ
+t3.frm
+FLUSH TABLES;
+SELECT * FROM t1;
+c1 c2
+1 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+SELECT * FROM t2;
+c1 c2
+1 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+SELECT * FROM t3;
+c1 c2
+1 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+USE hotcopy_test;
+db.opt
+t1.ARZ
+t1.frm
+t2.ARZ
+t2.frm
+t3.ARZ
+t3.frm
+DROP DATABASE hotcopy_save;
+db.opt
+t1.ARZ
+t1.frm
+t2.ARZ
+t2.frm
+t3.ARZ
+t3.frm
+DROP DATABASE hotcopy_save;
+db.opt
+t1.ARZ
+t1.frm
+t2.ARZ
+t2.frm
+t3.ARZ
+t3.frm
+db.opt
+t1.ARZ
+t1.frm
+t2.ARZ
+t2.frm
+t3.ARZ
+t3.frm
+db.opt
+t1.ARZ
+t1.frm
+t2.ARZ
+t2.frm
+t3.ARZ
+t3.frm
+db.opt
+t1.ARZ
+t1.frm
+t2.ARZ
+t2.frm
+t3.ARZ
+t3.frm
+db.opt
+t1.ARZ
+t1.frm
+t2.ARZ
+t2.frm
+t3.ARZ
+t3.frm
+DROP DATABASE hotcopy_test_cpy;
+DROP DATABASE hotcopy_test;
+DROP DATABASE hotcopy_save;
+DROP DATABASE hotcopy_save_old;
diff --git a/mysql-test/r/mysqlhotcopy_myisam.result b/mysql-test/r/mysqlhotcopy_myisam.result
new file mode 100644
index 00000000000..52aeffce5cf
--- /dev/null
+++ b/mysql-test/r/mysqlhotcopy_myisam.result
@@ -0,0 +1,164 @@
+DROP DATABASE IF EXISTS hotcopy_test;
+CREATE DATABASE hotcopy_test;
+USE hotcopy_test;
+CREATE TABLE t1 (c1 int, c2 varchar(20)) ENGINE=MyISAM;
+CREATE TABLE t2 (c1 int, c2 varchar(20)) ENGINE=MyISAM;
+CREATE TABLE t3 (c1 int, c2 varchar(20)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
+Warnings:
+Warning 1265 Data truncated for column 'c2' at row 2
+INSERT INTO t2 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
+Warnings:
+Warning 1265 Data truncated for column 'c2' at row 2
+INSERT INTO t3 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
+Warnings:
+Warning 1265 Data truncated for column 'c2' at row 2
+db.opt
+t1.MYD
+t1.MYI
+t1.frm
+t2.MYD
+t2.MYI
+t2.frm
+t3.MYD
+t3.MYI
+t3.frm
+db.opt
+t1.MYD
+t1.MYI
+t1.frm
+t2.MYD
+t2.MYI
+t2.frm
+t3.MYD
+t3.MYI
+t3.frm
+USE hotcopy_save;
+SELECT * FROM t1;
+c1 c2
+1 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+SELECT * FROM t2;
+c1 c2
+1 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+SELECT * FROM t3;
+c1 c2
+1 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+USE hotcopy_test;
+DELETE FROM t1;
+SELECT * FROM t1;
+c1 c2
+USE hotcopy_save;
+SELECT * FROM t1;
+c1 c2
+1 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+SELECT * FROM t2;
+c1 c2
+1 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+SELECT * FROM t3;
+c1 c2
+1 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+USE hotcopy_test;
+DROP TABLE t2;
+db.opt
+t1.MYD
+t1.MYI
+t1.frm
+t3.MYD
+t3.MYI
+t3.frm
+FLUSH TABLES;
+SELECT * FROM t1;
+c1 c2
+1 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+SELECT * FROM t2;
+c1 c2
+1 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+SELECT * FROM t3;
+c1 c2
+1 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+USE hotcopy_test;
+db.opt
+t1.MYD
+t1.MYI
+t1.frm
+t2.MYD
+t2.MYI
+t2.frm
+t3.MYD
+t3.MYI
+t3.frm
+DROP DATABASE hotcopy_save;
+db.opt
+t1.MYD
+t1.MYI
+t1.frm
+t2.MYD
+t2.MYI
+t2.frm
+t3.MYD
+t3.MYI
+t3.frm
+DROP DATABASE hotcopy_save;
+db.opt
+t1.MYD
+t1.MYI
+t1.frm
+t2.MYD
+t2.MYI
+t2.frm
+t3.MYD
+t3.MYI
+t3.frm
+db.opt
+t1.MYD
+t1.MYI
+t1.frm
+t2.MYD
+t2.MYI
+t2.frm
+t3.MYD
+t3.MYI
+t3.frm
+db.opt
+t1.MYD
+t1.MYI
+t1.frm
+t2.MYD
+t2.MYI
+t2.frm
+t3.MYD
+t3.MYI
+t3.frm
+db.opt
+t1.MYD
+t1.MYI
+t1.frm
+t2.MYD
+t2.MYI
+t2.frm
+t3.MYD
+t3.MYI
+t3.frm
+db.opt
+t1.MYD
+t1.MYI
+t1.frm
+t2.MYD
+t2.MYI
+t2.frm
+t3.MYD
+t3.MYI
+t3.frm
+DROP DATABASE hotcopy_test_cpy;
+DROP DATABASE hotcopy_test;
+DROP DATABASE hotcopy_save;
+DROP DATABASE hotcopy_save_old;
diff --git a/mysql-test/r/outfile_loaddata.result b/mysql-test/r/outfile_loaddata.result
index 453e3adb54c..36a72fd84ce 100644
--- a/mysql-test/r/outfile_loaddata.result
+++ b/mysql-test/r/outfile_loaddata.result
@@ -239,4 +239,24 @@ a b c
2 NULL NULL
SET NAMES default;
DROP TABLE t1, t2;
+#
+# Bug #53088: mysqldump with -T & --default-character-set set
+# truncates text/blob to 766 chars
+#
+# Also see mysqldump.test
+#
+CREATE TABLE t1 (a BLOB) CHARSET latin1;
+CREATE TABLE t2 LIKE t1;
+INSERT INTO t1 VALUES (REPEAT('.', 800));
+SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug53088.txt' CHARACTER SET latin1 FROM t1;
+# should be greater than 800
+SELECT LENGTH(LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug53088.txt'));
+LENGTH(LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug53088.txt'))
+801
+LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug53088.txt' INTO TABLE t2;
+# should be 800
+SELECT LENGTH(a) FROM t2;
+LENGTH(a)
+800
+DROP TABLE t1, t2;
# End of 5.1 tests.
diff --git a/mysql-test/r/partition_error.result b/mysql-test/r/partition_error.result
index 6ebf033adb7..16428fba4d9 100644
--- a/mysql-test/r/partition_error.result
+++ b/mysql-test/r/partition_error.result
@@ -1,5 +1,29 @@
drop table if exists t1;
#
+# Bug#49161: Out of memory; restart server and try again (needed 2 bytes)
+#
+CREATE TABLE t1 (a INT) PARTITION BY HASH (a);
+FLUSH TABLES;
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check Error Failed to read from the .par file
+test.t1 check Error Incorrect information in file: './test/t1.frm'
+test.t1 check error Corrupt
+SELECT * FROM t1;
+ERROR HY000: Failed to read from the .par file
+# Note that it is currently impossible to drop a partitioned table
+# without the .par file
+DROP TABLE t1;
+ERROR 42S02: Unknown table 't1'
+#
+# Bug#49477: Assertion `0' failed in ha_partition.cc:5530
+# with temporary table and partitions
+#
+CREATE TABLE t1 (a INT) PARTITION BY HASH(a);
+CREATE TEMPORARY TABLE tmp_t1 LIKE t1;
+ERROR HY000: Cannot create temporary table with partitions
+DROP TABLE t1;
+#
# Bug#50392: insert_id is not reset for partitioned tables
# auto_increment on duplicate entry
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY);
diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result
index 64e00521cd2..ad8aec7383a 100644
--- a/mysql-test/r/range.result
+++ b/mysql-test/r/range.result
@@ -1653,4 +1653,48 @@ a b
0 0
1 1
DROP TABLE t1;
+#
+# Bug#50939: Loose Index Scan unduly relies on engine to remember range
+# endpoints
+#
+CREATE TABLE t1 (
+a INT,
+b INT,
+KEY ( a, b )
+) PARTITION BY HASH (a) PARTITIONS 1;
+CREATE TABLE t2 (
+a INT,
+b INT,
+KEY ( a, b )
+);
+INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
+INSERT INTO t1 SELECT a + 5, b + 5 FROM t1;
+INSERT INTO t1 SELECT a + 10, b + 10 FROM t1;
+INSERT INTO t1 SELECT a + 20, b + 20 FROM t1;
+INSERT INTO t1 SELECT a + 40, b + 40 FROM t1;
+INSERT INTO t2 SELECT * FROM t1;
+# plans should be identical
+EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10,100) GROUP BY a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range a a 5 NULL 1 Using where; Using index for group-by
+EXPLAIN SELECT a, MAX(b) FROM t2 WHERE a IN (10,100) GROUP BY a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 range a a 5 NULL 2 Using where; Using index for group-by
+FLUSH status;
+SELECT a, MAX(b) FROM t1 WHERE a IN (10, 100) GROUP BY a;
+a MAX(b)
+10 10
+# Should be no more than 4 reads.
+SHOW status LIKE 'handler_read_key';
+Variable_name Value
+Handler_read_key 4
+FLUSH status;
+SELECT a, MAX(b) FROM t2 WHERE a IN (10, 100) GROUP BY a;
+a MAX(b)
+10 10
+# Should be no more than 4 reads.
+SHOW status LIKE 'handler_read_key';
+Variable_name Value
+Handler_read_key 4
+DROP TABLE t1, t2;
End of 5.1 tests
diff --git a/mysql-test/r/renamedb.result b/mysql-test/r/renamedb.result
index ff8f89592fc..e77aca0d0b7 100644
--- a/mysql-test/r/renamedb.result
+++ b/mysql-test/r/renamedb.result
@@ -7,6 +7,6 @@ ERROR HY000: Incorrect usage of ALTER DATABASE UPGRADE DATA DIRECTORY NAME and n
ALTER DATABASE `#mysql51#not-yet` UPGRADE DATA DIRECTORY NAME;
ERROR HY000: Incorrect usage of ALTER DATABASE UPGRADE DATA DIRECTORY NAME and name
ALTER DATABASE `#mysql50#` UPGRADE DATA DIRECTORY NAME;
-ERROR HY000: Incorrect usage of ALTER DATABASE UPGRADE DATA DIRECTORY NAME and name
+ERROR 42000: Incorrect database name '#mysql50#'
ALTER DATABASE `#mysql50#upgrade-me` UPGRADE DATA DIRECTORY NAME;
ERROR 42000: Unknown database '#mysql50#upgrade-me'
diff --git a/mysql-test/r/schema.result b/mysql-test/r/schema.result
index 564fb3626df..e6af4e312a3 100644
--- a/mysql-test/r/schema.result
+++ b/mysql-test/r/schema.result
@@ -11,3 +11,22 @@ mtr
mysql
test
drop schema foo;
+#
+# Bug#54360 Deadlock DROP/ALTER/CREATE DATABASE with open HANDLER
+#
+CREATE DATABASE db1;
+CREATE TABLE db1.t1 (a INT);
+INSERT INTO db1.t1 VALUES (1), (2);
+# Connection con1
+HANDLER db1.t1 OPEN;
+# Connection default
+# Sending:
+DROP DATABASE db1;
+# Connection con2
+# Waiting for 'DROP DATABASE db1' to sync in.
+# Connection con1
+CREATE DATABASE db2;
+ALTER DATABASE db2 DEFAULT CHARACTER SET utf8;
+DROP DATABASE db2;
+# Connection default
+# Reaping: DROP DATABASE db1
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index 6353ae23013..c1aa5704f56 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -4781,4 +4781,19 @@ a b c
SELECT * FROM t1 WHERE 102 < c;
a b c
DROP TABLE t1;
+#
+# Bug #54459: Assertion failed: param.sort_length,
+# file .\filesort.cc, line 149 (part II)
+#
+CREATE TABLE t1(a ENUM('') NOT NULL);
+INSERT INTO t1 VALUES (), (), ();
+EXPLAIN SELECT 1 FROM t1 ORDER BY a COLLATE latin1_german2_ci;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3
+SELECT 1 FROM t1 ORDER BY a COLLATE latin1_german2_ci;
+1
+1
+1
+1
+DROP TABLE t1;
End of 5.1 tests
diff --git a/mysql-test/r/sp_trans_log.result b/mysql-test/r/sp_trans_log.result
index 7a6173b89e2..7b7d05617ab 100644
--- a/mysql-test/r/sp_trans_log.result
+++ b/mysql-test/r/sp_trans_log.result
@@ -14,13 +14,13 @@ end|
reset master|
insert into t2 values (bug23333(),1)|
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
-show binlog events from 106 /* with fixes for #23333 will show there is the query */|
+show binlog events from <binlog_start>|
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # #
-master-bin.000001 # Table_map 1 # #
-master-bin.000001 # Table_map 1 # #
-master-bin.000001 # Write_rows 1 # #
-master-bin.000001 # Query 1 # #
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t2)
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # ROLLBACK
select count(*),@a from t1 /* must be 1,1 */|
count(*) @a
1 1
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index ed5f8e9e75f..cbb6149a148 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -4714,3 +4714,20 @@ t1_id total_amount
DROP TABLE t3;
DROP TABLE t2;
DROP TABLE t1;
+#
+# Bug #52711: Segfault when doing EXPLAIN SELECT with
+# union...order by (select... where...)
+#
+CREATE TABLE t1 (a VARCHAR(10), FULLTEXT KEY a (a));
+INSERT INTO t1 VALUES (1),(2);
+CREATE TABLE t2 (b INT);
+INSERT INTO t2 VALUES (1),(2);
+# Should not crash
+EXPLAIN
+SELECT * FROM t2 UNION SELECT * FROM t2
+ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE));
+# Should not crash
+SELECT * FROM t2 UNION SELECT * FROM t2
+ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE));
+DROP TABLE t1,t2;
+End of 5.1 tests
diff --git a/mysql-test/r/type_time.result b/mysql-test/r/type_time.result
index e4b90196c2d..86712bebfa1 100644
--- a/mysql-test/r/type_time.result
+++ b/mysql-test/r/type_time.result
@@ -138,3 +138,13 @@ CAST(c AS TIME)
00:00:00
DROP TABLE t1;
End of 5.0 tests
+#
+# Bug#53942 valgrind warnings with timestamp() function and incomplete datetime values
+#
+CREATE TABLE t1(f1 TIME);
+INSERT INTO t1 VALUES ('23:38:57');
+SELECT TIMESTAMP(f1,'1') FROM t1;
+TIMESTAMP(f1,'1')
+NULL
+DROP TABLE t1;
+End of 5.1 tests
diff --git a/mysql-test/r/upgrade.result b/mysql-test/r/upgrade.result
index 034242079b1..da2f55b5bb1 100644
--- a/mysql-test/r/upgrade.result
+++ b/mysql-test/r/upgrade.result
@@ -112,3 +112,31 @@ select * from `a-b-c`.v1;
f1
drop database `a-b-c`;
use test;
+# End of 5.0 tests
+#
+# Bug #53804: serious flaws in the alter database .. upgrade data
+# directory name command
+#
+ALTER DATABASE `#mysql50#:` UPGRADE DATA DIRECTORY NAME;
+ERROR 42000: Unknown database '#mysql50#:'
+ALTER DATABASE `#mysql50#.` UPGRADE DATA DIRECTORY NAME;
+ERROR 42000: Incorrect database name '#mysql50#.'
+ALTER DATABASE `#mysql50#../` UPGRADE DATA DIRECTORY NAME;
+ERROR 42000: Incorrect database name '#mysql50#../'
+ALTER DATABASE `#mysql50#../..` UPGRADE DATA DIRECTORY NAME;
+ERROR 42000: Incorrect database name '#mysql50#../..'
+ALTER DATABASE `#mysql50#../../` UPGRADE DATA DIRECTORY NAME;
+ERROR 42000: Incorrect database name '#mysql50#../../'
+ALTER DATABASE `#mysql50#./blablabla` UPGRADE DATA DIRECTORY NAME;
+ERROR 42000: Incorrect database name '#mysql50#./blablabla'
+ALTER DATABASE `#mysql50#../blablabla` UPGRADE DATA DIRECTORY NAME;
+ERROR 42000: Incorrect database name '#mysql50#../blablabla'
+ALTER DATABASE `#mysql50#/` UPGRADE DATA DIRECTORY NAME;
+ERROR 42000: Incorrect database name '#mysql50#/'
+ALTER DATABASE `#mysql50#/.` UPGRADE DATA DIRECTORY NAME;
+ERROR 42000: Incorrect database name '#mysql50#/.'
+USE `#mysql50#.`;
+ERROR 42000: Incorrect database name '#mysql50#.'
+USE `#mysql50#../blablabla`;
+ERROR 42000: Incorrect database name '#mysql50#../blablabla'
+# End of 5.1 tests
diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result
index 54506a9a4a2..832c679f8d5 100644
--- a/mysql-test/r/variables.result
+++ b/mysql-test/r/variables.result
@@ -576,7 +576,7 @@ set global table_open_cache=100;
set storage_engine=myisam;
set global thread_cache_size=100;
set timestamp=1, timestamp=default;
-set tmp_table_size=100;
+set tmp_table_size=1024;
set tx_isolation="READ-COMMITTED";
set wait_timeout=100;
set log_warnings=1;
@@ -1017,6 +1017,13 @@ hostname #
# Test 'myisam_mmap_size' option is not dynamic
SET @@myisam_mmap_size= 500M;
ERROR HY000: Variable 'myisam_mmap_size' is a read only variable
+#
+# Bug #52315: utc_date() crashes when system time > year 2037
+#
+SET TIMESTAMP=2*1024*1024*1024;
+#Should not crash
+SELECT UTC_DATE();
+SET TIMESTAMP=DEFAULT;
End of 5.0 tests
set join_buffer_size=1;
Warnings:
diff --git a/mysql-test/r/variables_debug.result b/mysql-test/r/variables_debug.result
index 85eaf34b033..d578fa957fc 100644
--- a/mysql-test/r/variables_debug.result
+++ b/mysql-test/r/variables_debug.result
@@ -1,3 +1,4 @@
+SET @old_debug = @@GLOBAL.debug;
set debug= 'T';
select @@debug;
@@debug
@@ -22,4 +23,5 @@ SET GLOBAL debug='';
SELECT @@global.debug;
@@global.debug
+SET GLOBAL debug=@old_debug;
End of 5.1 tests
diff --git a/mysql-test/std_data/intersect-bug50389.tsv b/mysql-test/std_data/intersect-bug50389.tsv
new file mode 100644
index 00000000000..f84359603a8
--- /dev/null
+++ b/mysql-test/std_data/intersect-bug50389.tsv
@@ -0,0 +1,441 @@
+3304605 1221256 0 0 abcdefghijklmnopwrst
+3304606 1221259 0 0 abcdefghijklmnopwrst
+3304607 1221260 0 0 asdfghjklzxcvbnm
+3304629 1221273 0 0 asdfghjklzxcvbnm
+3304630 1221273 0 0 asdfghjklzxcvbnm
+3304634 1221259 0 0 asdfghjklzxcvbnm
+3304644 1221278 0 0 abcdefghijklmnopwrst
+3304648 1221278 0 0 abcdefghijklmnopwrst
+3304649 1221278 0 1 asdfghjklzxcvbnm
+3304650 1221278 0 0 asdfghjklzxcvbnm
+3304651 1221282 0 0 abcdefghijklmnopwrst
+3304660 1221287 0 0 asdfghjklzxcvbnm
+3304662 1221288 0 0 abcdefghijklmnopwrst
+3304663 1221288 0 0 abcdefghijklmnopwrst
+3304664 1221290 0 0 abcdefghijklmnopwrst
+3304670 1221290 0 0 asdfghjklzxcvbnm
+3304671 1221292 0 0 abcdefghijklmnopwrst
+3304672 1221287 0 0 asdfghjklzxcvbnm
+3304673 1221294 0 0 asdfghjklzxcvbnm
+3304674 1221287 0 0 asdfghjklzxcvbnm
+3304676 1221296 0 0 abcdefghijklmnopwrst
+3304677 1221287 0 0 abcdefghijklmnopwrst
+3304678 1221287 0 0 abcdefghijklmnopwrst
+3304679 1221297 0 0 asdfghjklzxcvbnm
+3304680 1221290 0 0 abcdefghijklmnopwrst
+3304681 1221290 0 0 abcdefghijklmnopwrst
+3304685 1221300 0 0 asdfghjklzxcvbnm
+3304687 1221302 0 0 abcdefghijklmnopwrst
+3304688 1221296 1221298 0 abcdefghijklmnopwrst
+3304692 1221309 0 0 asdfghjklzxcvbnm
+3304694 1221309 0 0 asdfghjklzxcvbnm
+3304695 1221290 0 0 abcdefghijklmnopwrst
+3304696 1221313 0 0 asdfghjklzxcvbnm
+3304701 1221314 0 0 asdfghjklzxcvbnm
+3304703 1221313 0 0 abcdefghijklmnopwrst
+3304707 1221313 0 0 asdfghjklzxcvbnm
+3304709 1221313 0 0 abcdefghijklmnopwrst
+3304713 1221314 0 0 abcdefghijklmnopwrst
+3304715 1221317 0 0 abcdefghijklmnopwrst
+3304717 1221319 0 0 asdfghjklzxcvbnm
+3304718 1221320 0 0 abcdefghijklmnopwrst
+3304723 1221314 0 0 abcdefghijklmnopwrst
+3304724 1221314 0 0 asdfghjklzxcvbnm
+3304725 1221300 0 0 asdfghjklzxcvbnm
+3304726 1221314 0 0 asdfghjklzxcvbnm
+3304730 1221326 0 0 asdfghjklzxcvbnm
+3304732 1221328 0 0 asdfghjklzxcvbnm
+3304733 1221329 0 0 asdfghjklzxcvbnm
+3304745 1221331 0 0 abcdefghijklmnopwrst
+3304747 1221300 0 0 abcdefghijklmnopwrst
+3304752 1221332 0 0 asdfghjklzxcvbnm
+3304756 1221333 0 0 asdfghjklzxcvbnm
+3304765 1221336 0 0 asdfghjklzxcvbnm
+3304767 1221338 0 0 abcdefghijklmnopwrst
+3304769 1221340 0 0 asdfghjklzxcvbnm
+3304770 1221328 0 0 asdfghjklzxcvbnm
+3304771 1221328 0 0 abcdefghijklmnopwrst
+3304773 1221340 0 0 asdfghjklzxcvbnm
+3304774 1221340 0 0 abcdefghijklmnopwrst
+3304775 1221338 1221342 1 asdfghjklzxcvbnm
+3304778 1221345 0 0 asdfghjklzxcvbnm
+3304786 1221332 0 0 asdfghjklzxcvbnm
+3304787 1221347 0 0 abcdefghijklmnopwrst
+3304789 1221347 0 0 asdfghjklzxcvbnm
+3304793 1221349 0 0 abcdefghijklmnopwrst
+3304794 1221350 0 0 asdfghjklzxcvbnm
+3304800 1221290 0 0 asdfghjklzxcvbnm
+3304802 1221290 0 0 asdfghjklzxcvbnm
+3304803 1221290 0 0 asdfghjklzxcvbnm
+3304810 1221356 0 0 asdfghjklzxcvbnm
+3304811 1221356 0 0 asdfghjklzxcvbnm
+3304821 1221364 0 0 asdfghjklzxcvbnm
+3304823 1221365 0 0 asdfghjklzxcvbnm
+3304824 1221366 0 0 abcdefghijklmnopwrst
+3304825 1221365 0 0 asdfghjklzxcvbnm
+3304826 1221367 0 0 asdfghjklzxcvbnm
+3304828 1221369 0 0 abcdefghijklmnopwrst
+3304829 1221366 1221368 0 asdfghjklzxcvbnm
+3304831 1221372 0 0 abcdefghijklmnopwrst
+3304832 1221364 1221373 0 abcdefghijklmnopwrst
+3304833 1221364 1221371 0 asdfghjklzxcvbnm
+3304834 1221364 0 0 abcdefghijklmnopwrst
+3304836 1221375 0 0 abcdefghijklmnopwrst
+3304837 1221364 0 0 abcdefghijklmnopwrst
+3304838 1221364 1221376 0 asdfghjklzxcvbnm
+3304840 1221372 0 0 asdfghjklzxcvbnm
+3304842 1221372 0 1 abcdefghijklmnopwrst
+3304844 1221372 0 0 asdfghjklzxcvbnm
+3304845 1221372 0 0 abcdefghijklmnopwrst
+3304847 1221382 0 0 abcdefghijklmnopwrst
+3304848 1221372 0 0 abcdefghijklmnopwrst
+3304849 1221372 0 0 asdfghjklzxcvbnm
+3304852 1221364 1221378 0 asdfghjklzxcvbnm
+3304853 1221383 0 0 abcdefghijklmnopwrst
+3304854 1221384 0 0 asdfghjklzxcvbnm
+3304855 1221347 0 0 asdfghjklzxcvbnm
+3304858 1221383 0 0 abcdefghijklmnopwrst
+3304862 1221386 0 0 abcdefghijklmnopwrst
+3304864 1221387 0 0 abcdefghijklmnopwrst
+3304867 1221389 0 0 abcdefghijklmnopwrst
+3304868 1221390 0 0 asdfghjklzxcvbnm
+3304869 1221391 0 0 asdfghjklzxcvbnm
+3304871 1221393 0 0 asdfghjklzxcvbnm
+3304874 1221395 0 0 abcdefghijklmnopwrst
+3304877 1221396 0 0 abcdefghijklmnopwrst
+3304879 1221396 0 0 asdfghjklzxcvbnm
+3304882 1221398 0 0 abcdefghijklmnopwrst
+3304883 1221399 0 0 abcdefghijklmnopwrst
+3304884 1221400 0 0 abcdefghijklmnopwrst
+3304889 1221405 0 0 abcdefghijklmnopwrst
+3304895 1221409 0 0 asdfghjklzxcvbnm
+3304899 1221395 0 0 asdfghjklzxcvbnm
+3304900 1221395 0 0 asdfghjklzxcvbnm
+3304902 1221395 0 0 abcdefghijklmnopwrst
+3304903 1221395 0 0 asdfghjklzxcvbnm
+3304924 1221414 0 0 abcdefghijklmnopwrst
+3304925 1221415 0 0 asdfghjklzxcvbnm
+3304935 1221416 0 0 asdfghjklzxcvbnm
+3304936 1221418 0 0 asdfghjklzxcvbnm
+3304944 1221419 0 0 abcdefghijklmnopwrst
+3304959 1221427 0 0 asdfghjklzxcvbnm
+3304963 1221415 0 0 asdfghjklzxcvbnm
+3304964 1221428 0 0 asdfghjklzxcvbnm
+3304965 1221429 0 0 abcdefghijklmnopwrst
+3304978 1221433 0 0 abcdefghijklmnopwrst
+3304986 1221437 0 0 asdfghjklzxcvbnm
+3304988 1221439 0 0 asdfghjklzxcvbnm
+3304994 1221441 0 0 asdfghjklzxcvbnm
+3304996 1221442 0 0 asdfghjklzxcvbnm
+3304998 1221443 0 0 asdfghjklzxcvbnm
+3305003 1221446 0 0 abcdefghijklmnopwrst
+3305008 1221433 0 0 abcdefghijklmnopwrst
+3305009 1221447 0 0 asdfghjklzxcvbnm
+3305012 1221447 0 0 asdfghjklzxcvbnm
+3305013 1221449 0 0 abcdefghijklmnopwrst
+3305015 1221451 0 0 asdfghjklzxcvbnm
+3305019 1221453 0 0 asdfghjklzxcvbnm
+3305023 1221449 0 0 asdfghjklzxcvbnm
+3305026 1221456 0 0 abcdefghijklmnopwrst
+3305028 1221457 0 0 asdfghjklzxcvbnm
+3305032 1221449 0 0 asdfghjklzxcvbnm
+3305037 1221453 0 0 asdfghjklzxcvbnm
+3305040 1221451 0 0 asdfghjklzxcvbnm
+3305061 1221446 0 0 abcdefghijklmnopwrst
+3305175 1221457 0 0 abcdefghijklmnopwrst
+3305304 1221453 0 0 abcdefghijklmnopwrst
+3305308 1221453 0 1 abcdefghijklmnopwrst
+3305333 1221457 1221577 0 asdfghjklzxcvbnm
+3305335 1221453 0 0 asdfghjklzxcvbnm
+3305354 1221457 0 1 asdfghjklzxcvbnm
+3306089 1221442 0 0 abcdefghijklmnopwrst
+3306090 1221442 0 0 abcdefghijklmnopwrst
+3306092 1221442 0 0 asdfghjklzxcvbnm
+3306345 1221366 0 0 asdfghjklzxcvbnm
+3306349 1221366 0 0 asdfghjklzxcvbnm
+3306419 1221364 1221371 0 asdfghjklzxcvbnm
+3307390 1221453 0 0 abcdefghijklmnopwrst
+3308002 1221416 1221417 0 abcdefghijklmnopwrst
+3308331 1221366 1222821 0 abcdefghijklmnopwrst
+3309991 1221347 0 0 asdfghjklzxcvbnm
+3311917 1221287 0 0 abcdefghijklmnopwrst
+3311937 1221287 0 0 abcdefghijklmnopwrst
+3311945 1221287 0 0 asdfghjklzxcvbnm
+3311955 1221287 0 0 abcdefghijklmnopwrst
+3311961 1221287 0 0 asdfghjklzxcvbnm
+3311963 1221287 0 1 asdfghjklzxcvbnm
+3311968 1221287 0 0 asdfghjklzxcvbnm
+3311974 1221287 0 1 abcdefghijklmnopwrst
+3311976 1221287 0 1 abcdefghijklmnopwrst
+3311981 1221287 0 1 abcdefghijklmnopwrst
+3311985 1221287 0 1 asdfghjklzxcvbnm
+3312014 1221287 0 0 abcdefghijklmnopwrst
+3312018 1221287 0 1 abcdefghijklmnopwrst
+3312025 1221287 0 0 abcdefghijklmnopwrst
+3312027 1221287 0 0 abcdefghijklmnopwrst
+3312030 1221287 0 0 abcdefghijklmnopwrst
+3313755 1221288 0 0 abcdefghijklmnopwrst
+3313767 1221288 0 0 asdfghjklzxcvbnm
+3314668 1221290 0 0 asdfghjklzxcvbnm
+3314670 1221290 0 0 abcdefghijklmnopwrst
+3323440 1221338 0 0 abcdefghijklmnopwrst
+3323736 1221338 0 0 asdfghjklzxcvbnm
+3323739 1221338 0 0 asdfghjklzxcvbnm
+3324077 1221290 0 0 asdfghjklzxcvbnm
+3324081 1221290 0 0 abcdefghijklmnopwrst
+3324082 1221290 0 0 abcdefghijklmnopwrst
+3324639 1221457 1221563 1 asdfghjklzxcvbnm
+3326180 1221287 0 0 abcdefghijklmnopwrst
+3326204 1221287 0 0 asdfghjklzxcvbnm
+3326945 1221457 1221563 1 asdfghjklzxcvbnm
+3328393 1221364 1221373 0 asdfghjklzxcvbnm
+3328966 1221287 0 0 abcdefghijklmnopwrst
+3329875 1221457 1382427 0 abcdefghijklmnopwrst
+3333449 1221278 1231113 0 abcdefghijklmnopwrst
+3336022 1221457 0 0 abcdefghijklmnopwrst
+3340069 1221364 1221373 0 abcdefghijklmnopwrst
+3340073 1221364 1221373 0 abcdefghijklmnopwrst
+3340563 1221290 0 0 asdfghjklzxcvbnm
+3341553 1221453 0 0 abcdefghijklmnopwrst
+3345868 1221287 0 0 asdfghjklzxcvbnm
+3345873 1221287 0 0 abcdefghijklmnopwrst
+3345879 1221287 0 0 asdfghjklzxcvbnm
+3346860 1221457 0 0 abcdefghijklmnopwrst
+3347053 1221287 0 0 asdfghjklzxcvbnm
+3347109 1221287 0 1 abcdefghijklmnopwrst
+3350589 1221372 1236415 0 abcdefghijklmnopwrst
+3350594 1221372 1236415 1 asdfghjklzxcvbnm
+3353871 1221457 0 0 asdfghjklzxcvbnm
+3354727 1221364 1221373 0 abcdefghijklmnopwrst
+3355270 1221393 0 1 abcdefghijklmnopwrst
+3357638 1221287 0 0 asdfghjklzxcvbnm
+3357644 1221287 0 0 abcdefghijklmnopwrst
+3357648 1221287 0 0 abcdefghijklmnopwrst
+3357651 1221287 0 0 asdfghjklzxcvbnm
+3357661 1221287 0 0 abcdefghijklmnopwrst
+3357678 1221287 0 0 abcdefghijklmnopwrst
+3357697 1221287 0 0 asdfghjklzxcvbnm
+3357737 1221287 0 0 asdfghjklzxcvbnm
+3357744 1221287 0 0 abcdefghijklmnopwrst
+3357754 1221287 0 1 asdfghjklzxcvbnm
+3357760 1221287 0 1 abcdefghijklmnopwrst
+3357774 1221287 0 1 abcdefghijklmnopwrst
+3357779 1221287 0 0 abcdefghijklmnopwrst
+3357796 1221287 0 0 asdfghjklzxcvbnm
+3357814 1221287 0 0 asdfghjklzxcvbnm
+3357833 1221287 0 1 asdfghjklzxcvbnm
+3357835 1221287 0 0 abcdefghijklmnopwrst
+3357840 1221287 0 1 asdfghjklzxcvbnm
+3357842 1221287 0 0 abcdefghijklmnopwrst
+3357845 1221287 0 1 abcdefghijklmnopwrst
+3357849 1221287 0 1 abcdefghijklmnopwrst
+3357852 1221287 0 0 abcdefghijklmnopwrst
+3358935 1221443 0 1 abcdefghijklmnopwrst
+3358967 1221443 0 1 abcdefghijklmnopwrst
+3359181 1221256 0 0 abcdefghijklmnopwrst
+3360512 1221319 0 0 asdfghjklzxcvbnm
+3362004 1221287 0 0 abcdefghijklmnopwrst
+3362009 1221287 0 1 abcdefghijklmnopwrst
+3362358 1221287 0 0 asdfghjklzxcvbnm
+3363214 1221287 0 0 abcdefghijklmnopwrst
+3363238 1221287 0 1 asdfghjklzxcvbnm
+3363616 1221287 0 1 asdfghjklzxcvbnm
+3363631 1221287 0 0 asdfghjklzxcvbnm
+3364281 1221287 0 0 abcdefghijklmnopwrst
+3365900 1221347 0 0 asdfghjklzxcvbnm
+3365901 1221347 0 0 asdfghjklzxcvbnm
+3365906 1221347 0 0 asdfghjklzxcvbnm
+3365907 1221347 0 0 asdfghjklzxcvbnm
+3365910 1221347 0 0 abcdefghijklmnopwrst
+3365936 1221347 0 0 abcdefghijklmnopwrst
+3367846 1221287 0 0 abcdefghijklmnopwrst
+3368011 1221428 0 0 abcdefghijklmnopwrst
+3369882 1221300 0 0 asdfghjklzxcvbnm
+3370856 1221443 0 0 asdfghjklzxcvbnm
+3370861 1221443 1221445 0 abcdefghijklmnopwrst
+3375327 1221443 0 0 abcdefghijklmnopwrst
+3375333 1221443 1221445 0 abcdefghijklmnopwrst
+3376219 1221453 0 1 abcdefghijklmnopwrst
+3376228 1221453 0 0 abcdefghijklmnopwrst
+3376238 1221453 0 0 asdfghjklzxcvbnm
+3376243 1221453 0 0 abcdefghijklmnopwrst
+3376248 1221453 0 1 abcdefghijklmnopwrst
+3376254 1221453 0 0 abcdefghijklmnopwrst
+3376263 1221453 0 0 abcdefghijklmnopwrst
+3376272 1221453 0 1 asdfghjklzxcvbnm
+3376281 1221453 0 0 asdfghjklzxcvbnm
+3376290 1221453 0 0 abcdefghijklmnopwrst
+3376296 1221453 0 1 abcdefghijklmnopwrst
+3376301 1221453 0 0 asdfghjklzxcvbnm
+3376350 1221453 0 0 asdfghjklzxcvbnm
+3379002 1221453 0 0 abcdefghijklmnopwrst
+3379015 1221453 0 0 asdfghjklzxcvbnm
+3379025 1221453 0 0 abcdefghijklmnopwrst
+3379032 1221453 0 0 asdfghjklzxcvbnm
+3380181 1221372 1245650 0 asdfghjklzxcvbnm
+3380186 1221372 1245650 0 abcdefghijklmnopwrst
+3380190 1221372 1245650 0 asdfghjklzxcvbnm
+3380195 1221372 1245650 0 abcdefghijklmnopwrst
+3380202 1221372 1245650 0 asdfghjklzxcvbnm
+3380683 1221287 0 0 asdfghjklzxcvbnm
+3382317 1221453 0 0 abcdefghijklmnopwrst
+3382417 1221287 0 0 asdfghjklzxcvbnm
+3383523 1221338 0 1 abcdefghijklmnopwrst
+3387213 1221287 0 0 abcdefghijklmnopwrst
+3388139 1221453 0 0 asdfghjklzxcvbnm
+3398039 1221443 1251164 0 abcdefghijklmnopwrst
+3401835 1221453 0 0 asdfghjklzxcvbnm
+3412582 1221443 1255886 0 asdfghjklzxcvbnm
+3412583 1221443 1255886 0 asdfghjklzxcvbnm
+3413795 1221443 1255886 0 asdfghjklzxcvbnm
+3413813 1221443 1256258 0 asdfghjklzxcvbnm
+3420306 1221453 0 0 asdfghjklzxcvbnm
+3420354 1221453 0 0 asdfghjklzxcvbnm
+3425653 1221443 0 0 abcdefghijklmnopwrst
+3425658 1221443 0 0 asdfghjklzxcvbnm
+3431409 1221453 0 0 asdfghjklzxcvbnm
+3432510 1221443 1262320 0 asdfghjklzxcvbnm
+3432513 1221443 1262320 0 asdfghjklzxcvbnm
+3444444 1221443 1262320 0 abcdefghijklmnopwrst
+3445447 1221287 0 1 asdfghjklzxcvbnm
+3448662 1221338 0 0 asdfghjklzxcvbnm
+3450032 1221347 0 0 abcdefghijklmnopwrst
+3450259 1221453 0 0 abcdefghijklmnopwrst
+3452176 1221453 0 0 asdfghjklzxcvbnm
+3459239 1221347 0 0 asdfghjklzxcvbnm
+3463196 1221347 0 0 abcdefghijklmnopwrst
+3468759 1221453 0 0 abcdefghijklmnopwrst
+3470988 1221457 0 0 asdfghjklzxcvbnm
+3477116 1221287 0 0 asdfghjklzxcvbnm
+3477639 1221372 1277136 0 abcdefghijklmnopwrst
+3477656 1221372 1277136 0 asdfghjklzxcvbnm
+3488071 1221256 1238964 0 abcdefghijklmnopwrst
+3488079 1221256 0 0 asdfghjklzxcvbnm
+3488108 1221256 0 1 asdfghjklzxcvbnm
+3507126 1221287 0 1 asdfghjklzxcvbnm
+3511898 1221347 0 0 asdfghjklzxcvbnm
+3521780 1221453 0 0 abcdefghijklmnopwrst
+3536908 1221287 0 0 abcdefghijklmnopwrst
+3544231 1221329 0 1 asdfghjklzxcvbnm
+3545379 1221329 1298955 0 abcdefghijklmnopwrst
+3545384 1221329 1298955 0 abcdefghijklmnopwrst
+3545387 1221329 1298955 0 abcdefghijklmnopwrst
+3545389 1221329 1298955 1 abcdefghijklmnopwrst
+3545398 1221329 1298955 1 abcdefghijklmnopwrst
+3555715 1221287 0 0 asdfghjklzxcvbnm
+3563557 1221329 1298955 0 abcdefghijklmnopwrst
+3564322 1221338 0 0 asdfghjklzxcvbnm
+3565475 1221453 0 0 abcdefghijklmnopwrst
+3577588 1221287 0 0 asdfghjklzxcvbnm
+3600047 1221453 0 0 abcdefghijklmnopwrst
+3600062 1221453 0 0 asdfghjklzxcvbnm
+3600071 1221453 0 0 abcdefghijklmnopwrst
+3600080 1221453 0 1 abcdefghijklmnopwrst
+3600086 1221453 0 0 asdfghjklzxcvbnm
+3600091 1221453 0 1 abcdefghijklmnopwrst
+3600097 1221453 0 0 asdfghjklzxcvbnm
+3600103 1221453 0 0 asdfghjklzxcvbnm
+3600106 1221453 0 0 abcdefghijklmnopwrst
+3600113 1221453 0 0 abcdefghijklmnopwrst
+3600119 1221453 0 0 asdfghjklzxcvbnm
+3600124 1221453 0 0 abcdefghijklmnopwrst
+3600144 1221453 0 0 asdfghjklzxcvbnm
+3600152 1221453 0 0 asdfghjklzxcvbnm
+3600165 1221453 0 0 asdfghjklzxcvbnm
+3610561 1221287 0 0 abcdefghijklmnopwrst
+3617030 1221329 0 0 asdfghjklzxcvbnm
+3628347 1221443 1327098 0 abcdefghijklmnopwrst
+3628348 1221443 1327098 0 abcdefghijklmnopwrst
+3628646 1221443 0 0 asdfghjklzxcvbnm
+3633673 1221372 1328838 0 abcdefghijklmnopwrst
+3648489 1221443 0 0 asdfghjklzxcvbnm
+3648490 1221443 0 0 asdfghjklzxcvbnm
+3648534 1221443 1333827 0 asdfghjklzxcvbnm
+3653046 1221329 1298955 0 asdfghjklzxcvbnm
+3662680 1221287 0 0 asdfghjklzxcvbnm
+3699529 1221288 0 0 asdfghjklzxcvbnm
+3706659 1221453 0 0 asdfghjklzxcvbnm
+3723399 1221287 0 1 asdfghjklzxcvbnm
+3749934 1221278 0 0 abcdefghijklmnopwrst
+3761370 1221443 1371176 0 asdfghjklzxcvbnm
+3765884 1221443 1333827 0 abcdefghijklmnopwrst
+3772880 1221457 0 0 abcdefghijklmnopwrst
+3779574 1221457 1372998 1 abcdefghijklmnopwrst
+3784656 1221457 1372998 1 abcdefghijklmnopwrst
+3784700 1221457 1372998 1 abcdefghijklmnopwrst
+3784744 1221457 1382427 0 abcdefghijklmnopwrst
+3796187 1221457 1382427 1 abcdefghijklmnopwrst
+3796193 1221457 0 0 abcdefghijklmnopwrst
+3817277 1221457 1382427 0 asdfghjklzxcvbnm
+3828282 1221457 0 0 abcdefghijklmnopwrst
+3828297 1221457 0 0 abcdefghijklmnopwrst
+3828300 1221457 0 0 abcdefghijklmnopwrst
+3833022 1221287 0 0 asdfghjklzxcvbnm
+3856380 1221457 1395359 0 asdfghjklzxcvbnm
+3856391 1221457 0 0 asdfghjklzxcvbnm
+3861413 1221256 0 0 abcdefghijklmnopwrst
+3864734 1221393 0 1 abcdefghijklmnopwrst
+3868051 1221329 0 0 abcdefghijklmnopwrst
+3868059 1221329 0 0 abcdefghijklmnopwrst
+3869088 1221329 0 0 abcdefghijklmnopwrst
+3878669 1221329 1298955 0 asdfghjklzxcvbnm
+3878684 1221329 1298955 0 asdfghjklzxcvbnm
+3881785 1221287 0 0 abcdefghijklmnopwrst
+3882333 1221287 0 0 asdfghjklzxcvbnm
+3882389 1221287 0 0 abcdefghijklmnopwrst
+3908680 1221372 1245650 0 asdfghjklzxcvbnm
+3908690 1221372 1245650 0 asdfghjklzxcvbnm
+3908697 1221372 1245650 0 abcdefghijklmnopwrst
+3911434 1221453 0 0 abcdefghijklmnopwrst
+3911446 1221453 0 0 asdfghjklzxcvbnm
+3911448 1221453 0 0 abcdefghijklmnopwrst
+3911489 1221453 0 0 abcdefghijklmnopwrst
+3917384 1221453 0 0 abcdefghijklmnopwrst
+3939602 1221457 0 1 asdfghjklzxcvbnm
+3962210 1221453 0 0 asdfghjklzxcvbnm
+3963734 1221457 0 0 asdfghjklzxcvbnm
+3977364 1221287 0 0 asdfghjklzxcvbnm
+3981725 1221453 0 0 abcdefghijklmnopwrst
+4042952 1221453 0 0 abcdefghijklmnopwrst
+4042953 1221453 0 0 abcdefghijklmnopwrst
+4042958 1221453 0 0 abcdefghijklmnopwrst
+4042960 1221453 0 1 abcdefghijklmnopwrst
+4042965 1221453 0 0 asdfghjklzxcvbnm
+4066893 1221453 0 1 abcdefghijklmnopwrst
+4066896 1221453 0 0 abcdefghijklmnopwrst
+4066900 1221453 0 0 abcdefghijklmnopwrst
+4066908 1221453 0 0 abcdefghijklmnopwrst
+4066912 1221453 0 0 asdfghjklzxcvbnm
+4066915 1221453 0 0 asdfghjklzxcvbnm
+4066919 1221453 0 0 abcdefghijklmnopwrst
+4066924 1221453 0 0 asdfghjklzxcvbnm
+4066929 1221453 0 0 abcdefghijklmnopwrst
+4066934 1221453 0 0 asdfghjklzxcvbnm
+4066941 1221453 0 0 abcdefghijklmnopwrst
+4066946 1221453 0 0 asdfghjklzxcvbnm
+4066955 1221453 0 0 abcdefghijklmnopwrst
+4116291 1221433 1487238 0 asdfghjklzxcvbnm
+4116295 1221433 1487238 0 abcdefghijklmnopwrst
+4116450 1221433 1487238 0 abcdefghijklmnopwrst
+4121149 1221287 0 0 asdfghjklzxcvbnm
+4137325 1221453 0 0 abcdefghijklmnopwrst
+4149051 1221287 0 0 abcdefghijklmnopwrst
+4162347 1221287 0 0 abcdefghijklmnopwrst
+4164485 1221457 0 1 asdfghjklzxcvbnm
+4174706 1221457 0 0 abcdefghijklmnopwrst
+4178645 1221457 0 0 abcdefghijklmnopwrst
+4180122 1221457 1382427 0 asdfghjklzxcvbnm
+4180925 1221457 1382427 0 asdfghjklzxcvbnm
+4186417 1221457 0 0 abcdefghijklmnopwrst
+4189624 1221457 0 1 asdfghjklzxcvbnm
+4203132 1221453 0 0 asdfghjklzxcvbnm
+4228206 1221457 0 0 abcdefghijklmnopwrst
+4278829 1221453 0 0 abcdefghijklmnopwrst
+4326422 1221453 0 0 abcdefghijklmnopwrst
+4337061 1221287 0 0 abcdefghijklmnopwrst
+4379354 1221287 0 0 abcdefghijklmnopwrst
+4404901 1221457 0 0 abcdefghijklmnopwrst
+4494153 1221457 0 0 abcdefghijklmnopwrst
+4535721 1221287 0 0 asdfghjklzxcvbnm
+4559596 1221457 0 0 abcdefghijklmnopwrst
+4617751 1221393 0 0 abcdefghijklmnopwrst
diff --git a/mysql-test/suite/binlog/r/binlog_base64_flag.result b/mysql-test/suite/binlog/r/binlog_base64_flag.result
index 58c444c9571..7fb5e50a219 100644
--- a/mysql-test/suite/binlog/r/binlog_base64_flag.result
+++ b/mysql-test/suite/binlog/r/binlog_base64_flag.result
@@ -91,3 +91,14 @@ iONkSBcBAAAAKwAAAMQBAAAQABAAAAAAAAEAA//4AQAAAAMAMTIzAQAAAA==
';
ERROR HY000: master may suffer from http://bugs.mysql.com/bug.php?id=37426 so slave stops; check error log on slave for more info
drop table t1, char63_utf8, char128_utf8;
+#
+# Bug #54393: crash and/or valgrind errors in
+# mysql_client_binlog_statement
+#
+BINLOG '';
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use
+BINLOG '123';
+BINLOG '-2079193929';
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use
+BINLOG 'xç↓%~∙D╒ƒ╡';
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use
diff --git a/mysql-test/suite/binlog/r/binlog_innodb.result b/mysql-test/suite/binlog/r/binlog_innodb.result
index 1922897f631..881d8d2719e 100644
--- a/mysql-test/suite/binlog/r/binlog_innodb.result
+++ b/mysql-test/suite/binlog/r/binlog_innodb.result
@@ -156,9 +156,9 @@ select * from t2 /* must be (3,1), (4,4) */;
a b
1 1
4 4
-show master status /* there must no UPDATE in binlog */;
-File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000001 106
+# There must no UPDATE in binlog;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
delete from t1;
delete from t2;
insert into t1 values (1,2),(3,4),(4,4);
@@ -166,8 +166,8 @@ insert into t2 values (1,2),(3,4),(4,4);
reset master;
UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a;
ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
-show master status /* there must be no UPDATE query event */;
-File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000001 106
+# There must be no UPDATE query event;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
drop table t1, t2;
End of tests
diff --git a/mysql-test/suite/binlog/r/binlog_row_binlog.result b/mysql-test/suite/binlog/r/binlog_row_binlog.result
index 4d32a4f4739..d612e7adde1 100644
--- a/mysql-test/suite/binlog/r/binlog_row_binlog.result
+++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result
@@ -26,215 +26,215 @@ create table t1 (n int) engine=innodb;
begin;
commit;
drop table t1;
-show binlog events in 'master-bin.000001' from 106;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; create table t1 (n int) engine=innodb
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Xid 1 # COMMIT /* xid= */
-master-bin.000001 # Rotate 1 # master-bin.000002;pos=4
-show binlog events in 'master-bin.000002' from 106;
+master-bin.000001 # Query # # use `test`; create table t1 (n int) engine=innodb
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Rotate # # master-bin.000002;pos=4
+show binlog events in 'master-bin.000002' from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000002 # Query 1 # use `test`; drop table t1
+master-bin.000002 # Query # # use `test`; drop table t1
set @ac = @@autocommit;
set autocommit= 0;
reset master;
@@ -245,830 +245,828 @@ insert into t1 values (2);
insert into t1 values (3);
commit;
drop table t1;
-show binlog events from 0;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4
-master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=innodb
-master-bin.000001 205 Query 1 273 BEGIN
-master-bin.000001 273 Table_map 1 314 table_id: # (test.t1)
-master-bin.000001 314 Write_rows 1 348 table_id: # flags: STMT_END_F
-master-bin.000001 348 Table_map 1 389 table_id: # (test.t1)
-master-bin.000001 389 Write_rows 1 423 table_id: # flags: STMT_END_F
-master-bin.000001 423 Table_map 1 464 table_id: # (test.t1)
-master-bin.000001 464 Write_rows 1 498 table_id: # flags: STMT_END_F
-master-bin.000001 498 Xid 1 525 COMMIT /* XID */
-master-bin.000001 525 Query 1 601 use `test`; drop table t1
+master-bin.000001 # Query # # use `test`; create table t1(n int) engine=innodb
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # use `test`; drop table t1
set @bcs = @@binlog_cache_size;
set global binlog_cache_size=4096;
reset master;
create table t1 (a int) engine=innodb;
-show binlog events from 0;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4
-master-bin.000001 106 Query 1 206 use `test`; create table t1 (a int) engine=innodb
-master-bin.000001 206 Query 1 274 BEGIN
-master-bin.000001 274 Table_map 1 315 table_id: # (test.t1)
-master-bin.000001 315 Write_rows 1 349 table_id: # flags: STMT_END_F
-master-bin.000001 349 Table_map 1 390 table_id: # (test.t1)
-master-bin.000001 390 Write_rows 1 424 table_id: # flags: STMT_END_F
-master-bin.000001 424 Table_map 1 465 table_id: # (test.t1)
-master-bin.000001 465 Write_rows 1 499 table_id: # flags: STMT_END_F
-master-bin.000001 499 Table_map 1 540 table_id: # (test.t1)
-master-bin.000001 540 Write_rows 1 574 table_id: # flags: STMT_END_F
-master-bin.000001 574 Table_map 1 615 table_id: # (test.t1)
-master-bin.000001 615 Write_rows 1 649 table_id: # flags: STMT_END_F
-master-bin.000001 649 Table_map 1 690 table_id: # (test.t1)
-master-bin.000001 690 Write_rows 1 724 table_id: # flags: STMT_END_F
-master-bin.000001 724 Table_map 1 765 table_id: # (test.t1)
-master-bin.000001 765 Write_rows 1 799 table_id: # flags: STMT_END_F
-master-bin.000001 799 Table_map 1 840 table_id: # (test.t1)
-master-bin.000001 840 Write_rows 1 874 table_id: # flags: STMT_END_F
-master-bin.000001 874 Table_map 1 915 table_id: # (test.t1)
-master-bin.000001 915 Write_rows 1 949 table_id: # flags: STMT_END_F
-master-bin.000001 949 Table_map 1 990 table_id: # (test.t1)
-master-bin.000001 990 Write_rows 1 1024 table_id: # flags: STMT_END_F
-master-bin.000001 1024 Table_map 1 1065 table_id: # (test.t1)
-master-bin.000001 1065 Write_rows 1 1099 table_id: # flags: STMT_END_F
-master-bin.000001 1099 Table_map 1 1140 table_id: # (test.t1)
-master-bin.000001 1140 Write_rows 1 1174 table_id: # flags: STMT_END_F
-master-bin.000001 1174 Table_map 1 1215 table_id: # (test.t1)
-master-bin.000001 1215 Write_rows 1 1249 table_id: # flags: STMT_END_F
-master-bin.000001 1249 Table_map 1 1290 table_id: # (test.t1)
-master-bin.000001 1290 Write_rows 1 1324 table_id: # flags: STMT_END_F
-master-bin.000001 1324 Table_map 1 1365 table_id: # (test.t1)
-master-bin.000001 1365 Write_rows 1 1399 table_id: # flags: STMT_END_F
-master-bin.000001 1399 Table_map 1 1440 table_id: # (test.t1)
-master-bin.000001 1440 Write_rows 1 1474 table_id: # flags: STMT_END_F
-master-bin.000001 1474 Table_map 1 1515 table_id: # (test.t1)
-master-bin.000001 1515 Write_rows 1 1549 table_id: # flags: STMT_END_F
-master-bin.000001 1549 Table_map 1 1590 table_id: # (test.t1)
-master-bin.000001 1590 Write_rows 1 1624 table_id: # flags: STMT_END_F
-master-bin.000001 1624 Table_map 1 1665 table_id: # (test.t1)
-master-bin.000001 1665 Write_rows 1 1699 table_id: # flags: STMT_END_F
-master-bin.000001 1699 Table_map 1 1740 table_id: # (test.t1)
-master-bin.000001 1740 Write_rows 1 1774 table_id: # flags: STMT_END_F
-master-bin.000001 1774 Table_map 1 1815 table_id: # (test.t1)
-master-bin.000001 1815 Write_rows 1 1849 table_id: # flags: STMT_END_F
-master-bin.000001 1849 Table_map 1 1890 table_id: # (test.t1)
-master-bin.000001 1890 Write_rows 1 1924 table_id: # flags: STMT_END_F
-master-bin.000001 1924 Table_map 1 1965 table_id: # (test.t1)
-master-bin.000001 1965 Write_rows 1 1999 table_id: # flags: STMT_END_F
-master-bin.000001 1999 Table_map 1 2040 table_id: # (test.t1)
-master-bin.000001 2040 Write_rows 1 2074 table_id: # flags: STMT_END_F
-master-bin.000001 2074 Table_map 1 2115 table_id: # (test.t1)
-master-bin.000001 2115 Write_rows 1 2149 table_id: # flags: STMT_END_F
-master-bin.000001 2149 Table_map 1 2190 table_id: # (test.t1)
-master-bin.000001 2190 Write_rows 1 2224 table_id: # flags: STMT_END_F
-master-bin.000001 2224 Table_map 1 2265 table_id: # (test.t1)
-master-bin.000001 2265 Write_rows 1 2299 table_id: # flags: STMT_END_F
-master-bin.000001 2299 Table_map 1 2340 table_id: # (test.t1)
-master-bin.000001 2340 Write_rows 1 2374 table_id: # flags: STMT_END_F
-master-bin.000001 2374 Table_map 1 2415 table_id: # (test.t1)
-master-bin.000001 2415 Write_rows 1 2449 table_id: # flags: STMT_END_F
-master-bin.000001 2449 Table_map 1 2490 table_id: # (test.t1)
-master-bin.000001 2490 Write_rows 1 2524 table_id: # flags: STMT_END_F
-master-bin.000001 2524 Table_map 1 2565 table_id: # (test.t1)
-master-bin.000001 2565 Write_rows 1 2599 table_id: # flags: STMT_END_F
-master-bin.000001 2599 Table_map 1 2640 table_id: # (test.t1)
-master-bin.000001 2640 Write_rows 1 2674 table_id: # flags: STMT_END_F
-master-bin.000001 2674 Table_map 1 2715 table_id: # (test.t1)
-master-bin.000001 2715 Write_rows 1 2749 table_id: # flags: STMT_END_F
-master-bin.000001 2749 Table_map 1 2790 table_id: # (test.t1)
-master-bin.000001 2790 Write_rows 1 2824 table_id: # flags: STMT_END_F
-master-bin.000001 2824 Table_map 1 2865 table_id: # (test.t1)
-master-bin.000001 2865 Write_rows 1 2899 table_id: # flags: STMT_END_F
-master-bin.000001 2899 Table_map 1 2940 table_id: # (test.t1)
-master-bin.000001 2940 Write_rows 1 2974 table_id: # flags: STMT_END_F
-master-bin.000001 2974 Table_map 1 3015 table_id: # (test.t1)
-master-bin.000001 3015 Write_rows 1 3049 table_id: # flags: STMT_END_F
-master-bin.000001 3049 Table_map 1 3090 table_id: # (test.t1)
-master-bin.000001 3090 Write_rows 1 3124 table_id: # flags: STMT_END_F
-master-bin.000001 3124 Table_map 1 3165 table_id: # (test.t1)
-master-bin.000001 3165 Write_rows 1 3199 table_id: # flags: STMT_END_F
-master-bin.000001 3199 Table_map 1 3240 table_id: # (test.t1)
-master-bin.000001 3240 Write_rows 1 3274 table_id: # flags: STMT_END_F
-master-bin.000001 3274 Table_map 1 3315 table_id: # (test.t1)
-master-bin.000001 3315 Write_rows 1 3349 table_id: # flags: STMT_END_F
-master-bin.000001 3349 Table_map 1 3390 table_id: # (test.t1)
-master-bin.000001 3390 Write_rows 1 3424 table_id: # flags: STMT_END_F
-master-bin.000001 3424 Table_map 1 3465 table_id: # (test.t1)
-master-bin.000001 3465 Write_rows 1 3499 table_id: # flags: STMT_END_F
-master-bin.000001 3499 Table_map 1 3540 table_id: # (test.t1)
-master-bin.000001 3540 Write_rows 1 3574 table_id: # flags: STMT_END_F
-master-bin.000001 3574 Table_map 1 3615 table_id: # (test.t1)
-master-bin.000001 3615 Write_rows 1 3649 table_id: # flags: STMT_END_F
-master-bin.000001 3649 Table_map 1 3690 table_id: # (test.t1)
-master-bin.000001 3690 Write_rows 1 3724 table_id: # flags: STMT_END_F
-master-bin.000001 3724 Table_map 1 3765 table_id: # (test.t1)
-master-bin.000001 3765 Write_rows 1 3799 table_id: # flags: STMT_END_F
-master-bin.000001 3799 Table_map 1 3840 table_id: # (test.t1)
-master-bin.000001 3840 Write_rows 1 3874 table_id: # flags: STMT_END_F
-master-bin.000001 3874 Table_map 1 3915 table_id: # (test.t1)
-master-bin.000001 3915 Write_rows 1 3949 table_id: # flags: STMT_END_F
-master-bin.000001 3949 Table_map 1 3990 table_id: # (test.t1)
-master-bin.000001 3990 Write_rows 1 4024 table_id: # flags: STMT_END_F
-master-bin.000001 4024 Table_map 1 4065 table_id: # (test.t1)
-master-bin.000001 4065 Write_rows 1 4099 table_id: # flags: STMT_END_F
-master-bin.000001 4099 Table_map 1 4140 table_id: # (test.t1)
-master-bin.000001 4140 Write_rows 1 4174 table_id: # flags: STMT_END_F
-master-bin.000001 4174 Table_map 1 4215 table_id: # (test.t1)
-master-bin.000001 4215 Write_rows 1 4249 table_id: # flags: STMT_END_F
-master-bin.000001 4249 Table_map 1 4290 table_id: # (test.t1)
-master-bin.000001 4290 Write_rows 1 4324 table_id: # flags: STMT_END_F
-master-bin.000001 4324 Table_map 1 4365 table_id: # (test.t1)
-master-bin.000001 4365 Write_rows 1 4399 table_id: # flags: STMT_END_F
-master-bin.000001 4399 Table_map 1 4440 table_id: # (test.t1)
-master-bin.000001 4440 Write_rows 1 4474 table_id: # flags: STMT_END_F
-master-bin.000001 4474 Table_map 1 4515 table_id: # (test.t1)
-master-bin.000001 4515 Write_rows 1 4549 table_id: # flags: STMT_END_F
-master-bin.000001 4549 Table_map 1 4590 table_id: # (test.t1)
-master-bin.000001 4590 Write_rows 1 4624 table_id: # flags: STMT_END_F
-master-bin.000001 4624 Table_map 1 4665 table_id: # (test.t1)
-master-bin.000001 4665 Write_rows 1 4699 table_id: # flags: STMT_END_F
-master-bin.000001 4699 Table_map 1 4740 table_id: # (test.t1)
-master-bin.000001 4740 Write_rows 1 4774 table_id: # flags: STMT_END_F
-master-bin.000001 4774 Table_map 1 4815 table_id: # (test.t1)
-master-bin.000001 4815 Write_rows 1 4849 table_id: # flags: STMT_END_F
-master-bin.000001 4849 Table_map 1 4890 table_id: # (test.t1)
-master-bin.000001 4890 Write_rows 1 4924 table_id: # flags: STMT_END_F
-master-bin.000001 4924 Table_map 1 4965 table_id: # (test.t1)
-master-bin.000001 4965 Write_rows 1 4999 table_id: # flags: STMT_END_F
-master-bin.000001 4999 Table_map 1 5040 table_id: # (test.t1)
-master-bin.000001 5040 Write_rows 1 5074 table_id: # flags: STMT_END_F
-master-bin.000001 5074 Table_map 1 5115 table_id: # (test.t1)
-master-bin.000001 5115 Write_rows 1 5149 table_id: # flags: STMT_END_F
-master-bin.000001 5149 Table_map 1 5190 table_id: # (test.t1)
-master-bin.000001 5190 Write_rows 1 5224 table_id: # flags: STMT_END_F
-master-bin.000001 5224 Table_map 1 5265 table_id: # (test.t1)
-master-bin.000001 5265 Write_rows 1 5299 table_id: # flags: STMT_END_F
-master-bin.000001 5299 Table_map 1 5340 table_id: # (test.t1)
-master-bin.000001 5340 Write_rows 1 5374 table_id: # flags: STMT_END_F
-master-bin.000001 5374 Table_map 1 5415 table_id: # (test.t1)
-master-bin.000001 5415 Write_rows 1 5449 table_id: # flags: STMT_END_F
-master-bin.000001 5449 Table_map 1 5490 table_id: # (test.t1)
-master-bin.000001 5490 Write_rows 1 5524 table_id: # flags: STMT_END_F
-master-bin.000001 5524 Table_map 1 5565 table_id: # (test.t1)
-master-bin.000001 5565 Write_rows 1 5599 table_id: # flags: STMT_END_F
-master-bin.000001 5599 Table_map 1 5640 table_id: # (test.t1)
-master-bin.000001 5640 Write_rows 1 5674 table_id: # flags: STMT_END_F
-master-bin.000001 5674 Table_map 1 5715 table_id: # (test.t1)
-master-bin.000001 5715 Write_rows 1 5749 table_id: # flags: STMT_END_F
-master-bin.000001 5749 Table_map 1 5790 table_id: # (test.t1)
-master-bin.000001 5790 Write_rows 1 5824 table_id: # flags: STMT_END_F
-master-bin.000001 5824 Table_map 1 5865 table_id: # (test.t1)
-master-bin.000001 5865 Write_rows 1 5899 table_id: # flags: STMT_END_F
-master-bin.000001 5899 Table_map 1 5940 table_id: # (test.t1)
-master-bin.000001 5940 Write_rows 1 5974 table_id: # flags: STMT_END_F
-master-bin.000001 5974 Table_map 1 6015 table_id: # (test.t1)
-master-bin.000001 6015 Write_rows 1 6049 table_id: # flags: STMT_END_F
-master-bin.000001 6049 Table_map 1 6090 table_id: # (test.t1)
-master-bin.000001 6090 Write_rows 1 6124 table_id: # flags: STMT_END_F
-master-bin.000001 6124 Table_map 1 6165 table_id: # (test.t1)
-master-bin.000001 6165 Write_rows 1 6199 table_id: # flags: STMT_END_F
-master-bin.000001 6199 Table_map 1 6240 table_id: # (test.t1)
-master-bin.000001 6240 Write_rows 1 6274 table_id: # flags: STMT_END_F
-master-bin.000001 6274 Table_map 1 6315 table_id: # (test.t1)
-master-bin.000001 6315 Write_rows 1 6349 table_id: # flags: STMT_END_F
-master-bin.000001 6349 Table_map 1 6390 table_id: # (test.t1)
-master-bin.000001 6390 Write_rows 1 6424 table_id: # flags: STMT_END_F
-master-bin.000001 6424 Table_map 1 6465 table_id: # (test.t1)
-master-bin.000001 6465 Write_rows 1 6499 table_id: # flags: STMT_END_F
-master-bin.000001 6499 Table_map 1 6540 table_id: # (test.t1)
-master-bin.000001 6540 Write_rows 1 6574 table_id: # flags: STMT_END_F
-master-bin.000001 6574 Table_map 1 6615 table_id: # (test.t1)
-master-bin.000001 6615 Write_rows 1 6649 table_id: # flags: STMT_END_F
-master-bin.000001 6649 Table_map 1 6690 table_id: # (test.t1)
-master-bin.000001 6690 Write_rows 1 6724 table_id: # flags: STMT_END_F
-master-bin.000001 6724 Table_map 1 6765 table_id: # (test.t1)
-master-bin.000001 6765 Write_rows 1 6799 table_id: # flags: STMT_END_F
-master-bin.000001 6799 Table_map 1 6840 table_id: # (test.t1)
-master-bin.000001 6840 Write_rows 1 6874 table_id: # flags: STMT_END_F
-master-bin.000001 6874 Table_map 1 6915 table_id: # (test.t1)
-master-bin.000001 6915 Write_rows 1 6949 table_id: # flags: STMT_END_F
-master-bin.000001 6949 Table_map 1 6990 table_id: # (test.t1)
-master-bin.000001 6990 Write_rows 1 7024 table_id: # flags: STMT_END_F
-master-bin.000001 7024 Table_map 1 7065 table_id: # (test.t1)
-master-bin.000001 7065 Write_rows 1 7099 table_id: # flags: STMT_END_F
-master-bin.000001 7099 Table_map 1 7140 table_id: # (test.t1)
-master-bin.000001 7140 Write_rows 1 7174 table_id: # flags: STMT_END_F
-master-bin.000001 7174 Table_map 1 7215 table_id: # (test.t1)
-master-bin.000001 7215 Write_rows 1 7249 table_id: # flags: STMT_END_F
-master-bin.000001 7249 Table_map 1 7290 table_id: # (test.t1)
-master-bin.000001 7290 Write_rows 1 7324 table_id: # flags: STMT_END_F
-master-bin.000001 7324 Table_map 1 7365 table_id: # (test.t1)
-master-bin.000001 7365 Write_rows 1 7399 table_id: # flags: STMT_END_F
-master-bin.000001 7399 Table_map 1 7440 table_id: # (test.t1)
-master-bin.000001 7440 Write_rows 1 7474 table_id: # flags: STMT_END_F
-master-bin.000001 7474 Table_map 1 7515 table_id: # (test.t1)
-master-bin.000001 7515 Write_rows 1 7549 table_id: # flags: STMT_END_F
-master-bin.000001 7549 Table_map 1 7590 table_id: # (test.t1)
-master-bin.000001 7590 Write_rows 1 7624 table_id: # flags: STMT_END_F
-master-bin.000001 7624 Table_map 1 7665 table_id: # (test.t1)
-master-bin.000001 7665 Write_rows 1 7699 table_id: # flags: STMT_END_F
-master-bin.000001 7699 Table_map 1 7740 table_id: # (test.t1)
-master-bin.000001 7740 Write_rows 1 7774 table_id: # flags: STMT_END_F
-master-bin.000001 7774 Table_map 1 7815 table_id: # (test.t1)
-master-bin.000001 7815 Write_rows 1 7849 table_id: # flags: STMT_END_F
-master-bin.000001 7849 Table_map 1 7890 table_id: # (test.t1)
-master-bin.000001 7890 Write_rows 1 7924 table_id: # flags: STMT_END_F
-master-bin.000001 7924 Table_map 1 7965 table_id: # (test.t1)
-master-bin.000001 7965 Write_rows 1 7999 table_id: # flags: STMT_END_F
-master-bin.000001 7999 Table_map 1 8040 table_id: # (test.t1)
-master-bin.000001 8040 Write_rows 1 8074 table_id: # flags: STMT_END_F
-master-bin.000001 8074 Table_map 1 8115 table_id: # (test.t1)
-master-bin.000001 8115 Write_rows 1 8149 table_id: # flags: STMT_END_F
-master-bin.000001 8149 Table_map 1 8190 table_id: # (test.t1)
-master-bin.000001 8190 Write_rows 1 8224 table_id: # flags: STMT_END_F
-master-bin.000001 8224 Table_map 1 8265 table_id: # (test.t1)
-master-bin.000001 8265 Write_rows 1 8299 table_id: # flags: STMT_END_F
-master-bin.000001 8299 Table_map 1 8340 table_id: # (test.t1)
-master-bin.000001 8340 Write_rows 1 8374 table_id: # flags: STMT_END_F
-master-bin.000001 8374 Table_map 1 8415 table_id: # (test.t1)
-master-bin.000001 8415 Write_rows 1 8449 table_id: # flags: STMT_END_F
-master-bin.000001 8449 Table_map 1 8490 table_id: # (test.t1)
-master-bin.000001 8490 Write_rows 1 8524 table_id: # flags: STMT_END_F
-master-bin.000001 8524 Table_map 1 8565 table_id: # (test.t1)
-master-bin.000001 8565 Write_rows 1 8599 table_id: # flags: STMT_END_F
-master-bin.000001 8599 Table_map 1 8640 table_id: # (test.t1)
-master-bin.000001 8640 Write_rows 1 8674 table_id: # flags: STMT_END_F
-master-bin.000001 8674 Table_map 1 8715 table_id: # (test.t1)
-master-bin.000001 8715 Write_rows 1 8749 table_id: # flags: STMT_END_F
-master-bin.000001 8749 Table_map 1 8790 table_id: # (test.t1)
-master-bin.000001 8790 Write_rows 1 8824 table_id: # flags: STMT_END_F
-master-bin.000001 8824 Table_map 1 8865 table_id: # (test.t1)
-master-bin.000001 8865 Write_rows 1 8899 table_id: # flags: STMT_END_F
-master-bin.000001 8899 Table_map 1 8940 table_id: # (test.t1)
-master-bin.000001 8940 Write_rows 1 8974 table_id: # flags: STMT_END_F
-master-bin.000001 8974 Table_map 1 9015 table_id: # (test.t1)
-master-bin.000001 9015 Write_rows 1 9049 table_id: # flags: STMT_END_F
-master-bin.000001 9049 Table_map 1 9090 table_id: # (test.t1)
-master-bin.000001 9090 Write_rows 1 9124 table_id: # flags: STMT_END_F
-master-bin.000001 9124 Table_map 1 9165 table_id: # (test.t1)
-master-bin.000001 9165 Write_rows 1 9199 table_id: # flags: STMT_END_F
-master-bin.000001 9199 Table_map 1 9240 table_id: # (test.t1)
-master-bin.000001 9240 Write_rows 1 9274 table_id: # flags: STMT_END_F
-master-bin.000001 9274 Table_map 1 9315 table_id: # (test.t1)
-master-bin.000001 9315 Write_rows 1 9349 table_id: # flags: STMT_END_F
-master-bin.000001 9349 Table_map 1 9390 table_id: # (test.t1)
-master-bin.000001 9390 Write_rows 1 9424 table_id: # flags: STMT_END_F
-master-bin.000001 9424 Table_map 1 9465 table_id: # (test.t1)
-master-bin.000001 9465 Write_rows 1 9499 table_id: # flags: STMT_END_F
-master-bin.000001 9499 Table_map 1 9540 table_id: # (test.t1)
-master-bin.000001 9540 Write_rows 1 9574 table_id: # flags: STMT_END_F
-master-bin.000001 9574 Table_map 1 9615 table_id: # (test.t1)
-master-bin.000001 9615 Write_rows 1 9649 table_id: # flags: STMT_END_F
-master-bin.000001 9649 Table_map 1 9690 table_id: # (test.t1)
-master-bin.000001 9690 Write_rows 1 9724 table_id: # flags: STMT_END_F
-master-bin.000001 9724 Table_map 1 9765 table_id: # (test.t1)
-master-bin.000001 9765 Write_rows 1 9799 table_id: # flags: STMT_END_F
-master-bin.000001 9799 Table_map 1 9840 table_id: # (test.t1)
-master-bin.000001 9840 Write_rows 1 9874 table_id: # flags: STMT_END_F
-master-bin.000001 9874 Table_map 1 9915 table_id: # (test.t1)
-master-bin.000001 9915 Write_rows 1 9949 table_id: # flags: STMT_END_F
-master-bin.000001 9949 Table_map 1 9990 table_id: # (test.t1)
-master-bin.000001 9990 Write_rows 1 10024 table_id: # flags: STMT_END_F
-master-bin.000001 10024 Table_map 1 10065 table_id: # (test.t1)
-master-bin.000001 10065 Write_rows 1 10099 table_id: # flags: STMT_END_F
-master-bin.000001 10099 Table_map 1 10140 table_id: # (test.t1)
-master-bin.000001 10140 Write_rows 1 10174 table_id: # flags: STMT_END_F
-master-bin.000001 10174 Table_map 1 10215 table_id: # (test.t1)
-master-bin.000001 10215 Write_rows 1 10249 table_id: # flags: STMT_END_F
-master-bin.000001 10249 Table_map 1 10290 table_id: # (test.t1)
-master-bin.000001 10290 Write_rows 1 10324 table_id: # flags: STMT_END_F
-master-bin.000001 10324 Table_map 1 10365 table_id: # (test.t1)
-master-bin.000001 10365 Write_rows 1 10399 table_id: # flags: STMT_END_F
-master-bin.000001 10399 Table_map 1 10440 table_id: # (test.t1)
-master-bin.000001 10440 Write_rows 1 10474 table_id: # flags: STMT_END_F
-master-bin.000001 10474 Table_map 1 10515 table_id: # (test.t1)
-master-bin.000001 10515 Write_rows 1 10549 table_id: # flags: STMT_END_F
-master-bin.000001 10549 Table_map 1 10590 table_id: # (test.t1)
-master-bin.000001 10590 Write_rows 1 10624 table_id: # flags: STMT_END_F
-master-bin.000001 10624 Table_map 1 10665 table_id: # (test.t1)
-master-bin.000001 10665 Write_rows 1 10699 table_id: # flags: STMT_END_F
-master-bin.000001 10699 Table_map 1 10740 table_id: # (test.t1)
-master-bin.000001 10740 Write_rows 1 10774 table_id: # flags: STMT_END_F
-master-bin.000001 10774 Table_map 1 10815 table_id: # (test.t1)
-master-bin.000001 10815 Write_rows 1 10849 table_id: # flags: STMT_END_F
-master-bin.000001 10849 Table_map 1 10890 table_id: # (test.t1)
-master-bin.000001 10890 Write_rows 1 10924 table_id: # flags: STMT_END_F
-master-bin.000001 10924 Table_map 1 10965 table_id: # (test.t1)
-master-bin.000001 10965 Write_rows 1 10999 table_id: # flags: STMT_END_F
-master-bin.000001 10999 Table_map 1 11040 table_id: # (test.t1)
-master-bin.000001 11040 Write_rows 1 11074 table_id: # flags: STMT_END_F
-master-bin.000001 11074 Table_map 1 11115 table_id: # (test.t1)
-master-bin.000001 11115 Write_rows 1 11149 table_id: # flags: STMT_END_F
-master-bin.000001 11149 Table_map 1 11190 table_id: # (test.t1)
-master-bin.000001 11190 Write_rows 1 11224 table_id: # flags: STMT_END_F
-master-bin.000001 11224 Table_map 1 11265 table_id: # (test.t1)
-master-bin.000001 11265 Write_rows 1 11299 table_id: # flags: STMT_END_F
-master-bin.000001 11299 Table_map 1 11340 table_id: # (test.t1)
-master-bin.000001 11340 Write_rows 1 11374 table_id: # flags: STMT_END_F
-master-bin.000001 11374 Table_map 1 11415 table_id: # (test.t1)
-master-bin.000001 11415 Write_rows 1 11449 table_id: # flags: STMT_END_F
-master-bin.000001 11449 Table_map 1 11490 table_id: # (test.t1)
-master-bin.000001 11490 Write_rows 1 11524 table_id: # flags: STMT_END_F
-master-bin.000001 11524 Table_map 1 11565 table_id: # (test.t1)
-master-bin.000001 11565 Write_rows 1 11599 table_id: # flags: STMT_END_F
-master-bin.000001 11599 Table_map 1 11640 table_id: # (test.t1)
-master-bin.000001 11640 Write_rows 1 11674 table_id: # flags: STMT_END_F
-master-bin.000001 11674 Table_map 1 11715 table_id: # (test.t1)
-master-bin.000001 11715 Write_rows 1 11749 table_id: # flags: STMT_END_F
-master-bin.000001 11749 Table_map 1 11790 table_id: # (test.t1)
-master-bin.000001 11790 Write_rows 1 11824 table_id: # flags: STMT_END_F
-master-bin.000001 11824 Table_map 1 11865 table_id: # (test.t1)
-master-bin.000001 11865 Write_rows 1 11899 table_id: # flags: STMT_END_F
-master-bin.000001 11899 Table_map 1 11940 table_id: # (test.t1)
-master-bin.000001 11940 Write_rows 1 11974 table_id: # flags: STMT_END_F
-master-bin.000001 11974 Table_map 1 12015 table_id: # (test.t1)
-master-bin.000001 12015 Write_rows 1 12049 table_id: # flags: STMT_END_F
-master-bin.000001 12049 Table_map 1 12090 table_id: # (test.t1)
-master-bin.000001 12090 Write_rows 1 12124 table_id: # flags: STMT_END_F
-master-bin.000001 12124 Table_map 1 12165 table_id: # (test.t1)
-master-bin.000001 12165 Write_rows 1 12199 table_id: # flags: STMT_END_F
-master-bin.000001 12199 Table_map 1 12240 table_id: # (test.t1)
-master-bin.000001 12240 Write_rows 1 12274 table_id: # flags: STMT_END_F
-master-bin.000001 12274 Table_map 1 12315 table_id: # (test.t1)
-master-bin.000001 12315 Write_rows 1 12349 table_id: # flags: STMT_END_F
-master-bin.000001 12349 Table_map 1 12390 table_id: # (test.t1)
-master-bin.000001 12390 Write_rows 1 12424 table_id: # flags: STMT_END_F
-master-bin.000001 12424 Table_map 1 12465 table_id: # (test.t1)
-master-bin.000001 12465 Write_rows 1 12499 table_id: # flags: STMT_END_F
-master-bin.000001 12499 Table_map 1 12540 table_id: # (test.t1)
-master-bin.000001 12540 Write_rows 1 12574 table_id: # flags: STMT_END_F
-master-bin.000001 12574 Table_map 1 12615 table_id: # (test.t1)
-master-bin.000001 12615 Write_rows 1 12649 table_id: # flags: STMT_END_F
-master-bin.000001 12649 Table_map 1 12690 table_id: # (test.t1)
-master-bin.000001 12690 Write_rows 1 12724 table_id: # flags: STMT_END_F
-master-bin.000001 12724 Table_map 1 12765 table_id: # (test.t1)
-master-bin.000001 12765 Write_rows 1 12799 table_id: # flags: STMT_END_F
-master-bin.000001 12799 Table_map 1 12840 table_id: # (test.t1)
-master-bin.000001 12840 Write_rows 1 12874 table_id: # flags: STMT_END_F
-master-bin.000001 12874 Table_map 1 12915 table_id: # (test.t1)
-master-bin.000001 12915 Write_rows 1 12949 table_id: # flags: STMT_END_F
-master-bin.000001 12949 Table_map 1 12990 table_id: # (test.t1)
-master-bin.000001 12990 Write_rows 1 13024 table_id: # flags: STMT_END_F
-master-bin.000001 13024 Table_map 1 13065 table_id: # (test.t1)
-master-bin.000001 13065 Write_rows 1 13099 table_id: # flags: STMT_END_F
-master-bin.000001 13099 Table_map 1 13140 table_id: # (test.t1)
-master-bin.000001 13140 Write_rows 1 13174 table_id: # flags: STMT_END_F
-master-bin.000001 13174 Table_map 1 13215 table_id: # (test.t1)
-master-bin.000001 13215 Write_rows 1 13249 table_id: # flags: STMT_END_F
-master-bin.000001 13249 Table_map 1 13290 table_id: # (test.t1)
-master-bin.000001 13290 Write_rows 1 13324 table_id: # flags: STMT_END_F
-master-bin.000001 13324 Table_map 1 13365 table_id: # (test.t1)
-master-bin.000001 13365 Write_rows 1 13399 table_id: # flags: STMT_END_F
-master-bin.000001 13399 Table_map 1 13440 table_id: # (test.t1)
-master-bin.000001 13440 Write_rows 1 13474 table_id: # flags: STMT_END_F
-master-bin.000001 13474 Table_map 1 13515 table_id: # (test.t1)
-master-bin.000001 13515 Write_rows 1 13549 table_id: # flags: STMT_END_F
-master-bin.000001 13549 Table_map 1 13590 table_id: # (test.t1)
-master-bin.000001 13590 Write_rows 1 13624 table_id: # flags: STMT_END_F
-master-bin.000001 13624 Table_map 1 13665 table_id: # (test.t1)
-master-bin.000001 13665 Write_rows 1 13699 table_id: # flags: STMT_END_F
-master-bin.000001 13699 Table_map 1 13740 table_id: # (test.t1)
-master-bin.000001 13740 Write_rows 1 13774 table_id: # flags: STMT_END_F
-master-bin.000001 13774 Table_map 1 13815 table_id: # (test.t1)
-master-bin.000001 13815 Write_rows 1 13849 table_id: # flags: STMT_END_F
-master-bin.000001 13849 Table_map 1 13890 table_id: # (test.t1)
-master-bin.000001 13890 Write_rows 1 13924 table_id: # flags: STMT_END_F
-master-bin.000001 13924 Table_map 1 13965 table_id: # (test.t1)
-master-bin.000001 13965 Write_rows 1 13999 table_id: # flags: STMT_END_F
-master-bin.000001 13999 Table_map 1 14040 table_id: # (test.t1)
-master-bin.000001 14040 Write_rows 1 14074 table_id: # flags: STMT_END_F
-master-bin.000001 14074 Table_map 1 14115 table_id: # (test.t1)
-master-bin.000001 14115 Write_rows 1 14149 table_id: # flags: STMT_END_F
-master-bin.000001 14149 Table_map 1 14190 table_id: # (test.t1)
-master-bin.000001 14190 Write_rows 1 14224 table_id: # flags: STMT_END_F
-master-bin.000001 14224 Table_map 1 14265 table_id: # (test.t1)
-master-bin.000001 14265 Write_rows 1 14299 table_id: # flags: STMT_END_F
-master-bin.000001 14299 Table_map 1 14340 table_id: # (test.t1)
-master-bin.000001 14340 Write_rows 1 14374 table_id: # flags: STMT_END_F
-master-bin.000001 14374 Table_map 1 14415 table_id: # (test.t1)
-master-bin.000001 14415 Write_rows 1 14449 table_id: # flags: STMT_END_F
-master-bin.000001 14449 Table_map 1 14490 table_id: # (test.t1)
-master-bin.000001 14490 Write_rows 1 14524 table_id: # flags: STMT_END_F
-master-bin.000001 14524 Table_map 1 14565 table_id: # (test.t1)
-master-bin.000001 14565 Write_rows 1 14599 table_id: # flags: STMT_END_F
-master-bin.000001 14599 Table_map 1 14640 table_id: # (test.t1)
-master-bin.000001 14640 Write_rows 1 14674 table_id: # flags: STMT_END_F
-master-bin.000001 14674 Table_map 1 14715 table_id: # (test.t1)
-master-bin.000001 14715 Write_rows 1 14749 table_id: # flags: STMT_END_F
-master-bin.000001 14749 Table_map 1 14790 table_id: # (test.t1)
-master-bin.000001 14790 Write_rows 1 14824 table_id: # flags: STMT_END_F
-master-bin.000001 14824 Table_map 1 14865 table_id: # (test.t1)
-master-bin.000001 14865 Write_rows 1 14899 table_id: # flags: STMT_END_F
-master-bin.000001 14899 Table_map 1 14940 table_id: # (test.t1)
-master-bin.000001 14940 Write_rows 1 14974 table_id: # flags: STMT_END_F
-master-bin.000001 14974 Table_map 1 15015 table_id: # (test.t1)
-master-bin.000001 15015 Write_rows 1 15049 table_id: # flags: STMT_END_F
-master-bin.000001 15049 Table_map 1 15090 table_id: # (test.t1)
-master-bin.000001 15090 Write_rows 1 15124 table_id: # flags: STMT_END_F
-master-bin.000001 15124 Table_map 1 15165 table_id: # (test.t1)
-master-bin.000001 15165 Write_rows 1 15199 table_id: # flags: STMT_END_F
-master-bin.000001 15199 Table_map 1 15240 table_id: # (test.t1)
-master-bin.000001 15240 Write_rows 1 15274 table_id: # flags: STMT_END_F
-master-bin.000001 15274 Table_map 1 15315 table_id: # (test.t1)
-master-bin.000001 15315 Write_rows 1 15349 table_id: # flags: STMT_END_F
-master-bin.000001 15349 Table_map 1 15390 table_id: # (test.t1)
-master-bin.000001 15390 Write_rows 1 15424 table_id: # flags: STMT_END_F
-master-bin.000001 15424 Table_map 1 15465 table_id: # (test.t1)
-master-bin.000001 15465 Write_rows 1 15499 table_id: # flags: STMT_END_F
-master-bin.000001 15499 Table_map 1 15540 table_id: # (test.t1)
-master-bin.000001 15540 Write_rows 1 15574 table_id: # flags: STMT_END_F
-master-bin.000001 15574 Table_map 1 15615 table_id: # (test.t1)
-master-bin.000001 15615 Write_rows 1 15649 table_id: # flags: STMT_END_F
-master-bin.000001 15649 Table_map 1 15690 table_id: # (test.t1)
-master-bin.000001 15690 Write_rows 1 15724 table_id: # flags: STMT_END_F
-master-bin.000001 15724 Table_map 1 15765 table_id: # (test.t1)
-master-bin.000001 15765 Write_rows 1 15799 table_id: # flags: STMT_END_F
-master-bin.000001 15799 Table_map 1 15840 table_id: # (test.t1)
-master-bin.000001 15840 Write_rows 1 15874 table_id: # flags: STMT_END_F
-master-bin.000001 15874 Table_map 1 15915 table_id: # (test.t1)
-master-bin.000001 15915 Write_rows 1 15949 table_id: # flags: STMT_END_F
-master-bin.000001 15949 Table_map 1 15990 table_id: # (test.t1)
-master-bin.000001 15990 Write_rows 1 16024 table_id: # flags: STMT_END_F
-master-bin.000001 16024 Table_map 1 16065 table_id: # (test.t1)
-master-bin.000001 16065 Write_rows 1 16099 table_id: # flags: STMT_END_F
-master-bin.000001 16099 Table_map 1 16140 table_id: # (test.t1)
-master-bin.000001 16140 Write_rows 1 16174 table_id: # flags: STMT_END_F
-master-bin.000001 16174 Table_map 1 16215 table_id: # (test.t1)
-master-bin.000001 16215 Write_rows 1 16249 table_id: # flags: STMT_END_F
-master-bin.000001 16249 Table_map 1 16290 table_id: # (test.t1)
-master-bin.000001 16290 Write_rows 1 16324 table_id: # flags: STMT_END_F
-master-bin.000001 16324 Table_map 1 16365 table_id: # (test.t1)
-master-bin.000001 16365 Write_rows 1 16399 table_id: # flags: STMT_END_F
-master-bin.000001 16399 Table_map 1 16440 table_id: # (test.t1)
-master-bin.000001 16440 Write_rows 1 16474 table_id: # flags: STMT_END_F
-master-bin.000001 16474 Table_map 1 16515 table_id: # (test.t1)
-master-bin.000001 16515 Write_rows 1 16549 table_id: # flags: STMT_END_F
-master-bin.000001 16549 Table_map 1 16590 table_id: # (test.t1)
-master-bin.000001 16590 Write_rows 1 16624 table_id: # flags: STMT_END_F
-master-bin.000001 16624 Table_map 1 16665 table_id: # (test.t1)
-master-bin.000001 16665 Write_rows 1 16699 table_id: # flags: STMT_END_F
-master-bin.000001 16699 Table_map 1 16740 table_id: # (test.t1)
-master-bin.000001 16740 Write_rows 1 16774 table_id: # flags: STMT_END_F
-master-bin.000001 16774 Table_map 1 16815 table_id: # (test.t1)
-master-bin.000001 16815 Write_rows 1 16849 table_id: # flags: STMT_END_F
-master-bin.000001 16849 Table_map 1 16890 table_id: # (test.t1)
-master-bin.000001 16890 Write_rows 1 16924 table_id: # flags: STMT_END_F
-master-bin.000001 16924 Table_map 1 16965 table_id: # (test.t1)
-master-bin.000001 16965 Write_rows 1 16999 table_id: # flags: STMT_END_F
-master-bin.000001 16999 Table_map 1 17040 table_id: # (test.t1)
-master-bin.000001 17040 Write_rows 1 17074 table_id: # flags: STMT_END_F
-master-bin.000001 17074 Table_map 1 17115 table_id: # (test.t1)
-master-bin.000001 17115 Write_rows 1 17149 table_id: # flags: STMT_END_F
-master-bin.000001 17149 Table_map 1 17190 table_id: # (test.t1)
-master-bin.000001 17190 Write_rows 1 17224 table_id: # flags: STMT_END_F
-master-bin.000001 17224 Table_map 1 17265 table_id: # (test.t1)
-master-bin.000001 17265 Write_rows 1 17299 table_id: # flags: STMT_END_F
-master-bin.000001 17299 Table_map 1 17340 table_id: # (test.t1)
-master-bin.000001 17340 Write_rows 1 17374 table_id: # flags: STMT_END_F
-master-bin.000001 17374 Table_map 1 17415 table_id: # (test.t1)
-master-bin.000001 17415 Write_rows 1 17449 table_id: # flags: STMT_END_F
-master-bin.000001 17449 Table_map 1 17490 table_id: # (test.t1)
-master-bin.000001 17490 Write_rows 1 17524 table_id: # flags: STMT_END_F
-master-bin.000001 17524 Table_map 1 17565 table_id: # (test.t1)
-master-bin.000001 17565 Write_rows 1 17599 table_id: # flags: STMT_END_F
-master-bin.000001 17599 Table_map 1 17640 table_id: # (test.t1)
-master-bin.000001 17640 Write_rows 1 17674 table_id: # flags: STMT_END_F
-master-bin.000001 17674 Table_map 1 17715 table_id: # (test.t1)
-master-bin.000001 17715 Write_rows 1 17749 table_id: # flags: STMT_END_F
-master-bin.000001 17749 Table_map 1 17790 table_id: # (test.t1)
-master-bin.000001 17790 Write_rows 1 17824 table_id: # flags: STMT_END_F
-master-bin.000001 17824 Table_map 1 17865 table_id: # (test.t1)
-master-bin.000001 17865 Write_rows 1 17899 table_id: # flags: STMT_END_F
-master-bin.000001 17899 Table_map 1 17940 table_id: # (test.t1)
-master-bin.000001 17940 Write_rows 1 17974 table_id: # flags: STMT_END_F
-master-bin.000001 17974 Table_map 1 18015 table_id: # (test.t1)
-master-bin.000001 18015 Write_rows 1 18049 table_id: # flags: STMT_END_F
-master-bin.000001 18049 Table_map 1 18090 table_id: # (test.t1)
-master-bin.000001 18090 Write_rows 1 18124 table_id: # flags: STMT_END_F
-master-bin.000001 18124 Table_map 1 18165 table_id: # (test.t1)
-master-bin.000001 18165 Write_rows 1 18199 table_id: # flags: STMT_END_F
-master-bin.000001 18199 Table_map 1 18240 table_id: # (test.t1)
-master-bin.000001 18240 Write_rows 1 18274 table_id: # flags: STMT_END_F
-master-bin.000001 18274 Table_map 1 18315 table_id: # (test.t1)
-master-bin.000001 18315 Write_rows 1 18349 table_id: # flags: STMT_END_F
-master-bin.000001 18349 Table_map 1 18390 table_id: # (test.t1)
-master-bin.000001 18390 Write_rows 1 18424 table_id: # flags: STMT_END_F
-master-bin.000001 18424 Table_map 1 18465 table_id: # (test.t1)
-master-bin.000001 18465 Write_rows 1 18499 table_id: # flags: STMT_END_F
-master-bin.000001 18499 Table_map 1 18540 table_id: # (test.t1)
-master-bin.000001 18540 Write_rows 1 18574 table_id: # flags: STMT_END_F
-master-bin.000001 18574 Table_map 1 18615 table_id: # (test.t1)
-master-bin.000001 18615 Write_rows 1 18649 table_id: # flags: STMT_END_F
-master-bin.000001 18649 Table_map 1 18690 table_id: # (test.t1)
-master-bin.000001 18690 Write_rows 1 18724 table_id: # flags: STMT_END_F
-master-bin.000001 18724 Table_map 1 18765 table_id: # (test.t1)
-master-bin.000001 18765 Write_rows 1 18799 table_id: # flags: STMT_END_F
-master-bin.000001 18799 Table_map 1 18840 table_id: # (test.t1)
-master-bin.000001 18840 Write_rows 1 18874 table_id: # flags: STMT_END_F
-master-bin.000001 18874 Table_map 1 18915 table_id: # (test.t1)
-master-bin.000001 18915 Write_rows 1 18949 table_id: # flags: STMT_END_F
-master-bin.000001 18949 Table_map 1 18990 table_id: # (test.t1)
-master-bin.000001 18990 Write_rows 1 19024 table_id: # flags: STMT_END_F
-master-bin.000001 19024 Table_map 1 19065 table_id: # (test.t1)
-master-bin.000001 19065 Write_rows 1 19099 table_id: # flags: STMT_END_F
-master-bin.000001 19099 Table_map 1 19140 table_id: # (test.t1)
-master-bin.000001 19140 Write_rows 1 19174 table_id: # flags: STMT_END_F
-master-bin.000001 19174 Table_map 1 19215 table_id: # (test.t1)
-master-bin.000001 19215 Write_rows 1 19249 table_id: # flags: STMT_END_F
-master-bin.000001 19249 Table_map 1 19290 table_id: # (test.t1)
-master-bin.000001 19290 Write_rows 1 19324 table_id: # flags: STMT_END_F
-master-bin.000001 19324 Table_map 1 19365 table_id: # (test.t1)
-master-bin.000001 19365 Write_rows 1 19399 table_id: # flags: STMT_END_F
-master-bin.000001 19399 Table_map 1 19440 table_id: # (test.t1)
-master-bin.000001 19440 Write_rows 1 19474 table_id: # flags: STMT_END_F
-master-bin.000001 19474 Table_map 1 19515 table_id: # (test.t1)
-master-bin.000001 19515 Write_rows 1 19549 table_id: # flags: STMT_END_F
-master-bin.000001 19549 Table_map 1 19590 table_id: # (test.t1)
-master-bin.000001 19590 Write_rows 1 19624 table_id: # flags: STMT_END_F
-master-bin.000001 19624 Table_map 1 19665 table_id: # (test.t1)
-master-bin.000001 19665 Write_rows 1 19699 table_id: # flags: STMT_END_F
-master-bin.000001 19699 Table_map 1 19740 table_id: # (test.t1)
-master-bin.000001 19740 Write_rows 1 19774 table_id: # flags: STMT_END_F
-master-bin.000001 19774 Table_map 1 19815 table_id: # (test.t1)
-master-bin.000001 19815 Write_rows 1 19849 table_id: # flags: STMT_END_F
-master-bin.000001 19849 Table_map 1 19890 table_id: # (test.t1)
-master-bin.000001 19890 Write_rows 1 19924 table_id: # flags: STMT_END_F
-master-bin.000001 19924 Table_map 1 19965 table_id: # (test.t1)
-master-bin.000001 19965 Write_rows 1 19999 table_id: # flags: STMT_END_F
-master-bin.000001 19999 Table_map 1 20040 table_id: # (test.t1)
-master-bin.000001 20040 Write_rows 1 20074 table_id: # flags: STMT_END_F
-master-bin.000001 20074 Table_map 1 20115 table_id: # (test.t1)
-master-bin.000001 20115 Write_rows 1 20149 table_id: # flags: STMT_END_F
-master-bin.000001 20149 Table_map 1 20190 table_id: # (test.t1)
-master-bin.000001 20190 Write_rows 1 20224 table_id: # flags: STMT_END_F
-master-bin.000001 20224 Table_map 1 20265 table_id: # (test.t1)
-master-bin.000001 20265 Write_rows 1 20299 table_id: # flags: STMT_END_F
-master-bin.000001 20299 Table_map 1 20340 table_id: # (test.t1)
-master-bin.000001 20340 Write_rows 1 20374 table_id: # flags: STMT_END_F
-master-bin.000001 20374 Table_map 1 20415 table_id: # (test.t1)
-master-bin.000001 20415 Write_rows 1 20449 table_id: # flags: STMT_END_F
-master-bin.000001 20449 Table_map 1 20490 table_id: # (test.t1)
-master-bin.000001 20490 Write_rows 1 20524 table_id: # flags: STMT_END_F
-master-bin.000001 20524 Table_map 1 20565 table_id: # (test.t1)
-master-bin.000001 20565 Write_rows 1 20599 table_id: # flags: STMT_END_F
-master-bin.000001 20599 Table_map 1 20640 table_id: # (test.t1)
-master-bin.000001 20640 Write_rows 1 20674 table_id: # flags: STMT_END_F
-master-bin.000001 20674 Table_map 1 20715 table_id: # (test.t1)
-master-bin.000001 20715 Write_rows 1 20749 table_id: # flags: STMT_END_F
-master-bin.000001 20749 Table_map 1 20790 table_id: # (test.t1)
-master-bin.000001 20790 Write_rows 1 20824 table_id: # flags: STMT_END_F
-master-bin.000001 20824 Table_map 1 20865 table_id: # (test.t1)
-master-bin.000001 20865 Write_rows 1 20899 table_id: # flags: STMT_END_F
-master-bin.000001 20899 Table_map 1 20940 table_id: # (test.t1)
-master-bin.000001 20940 Write_rows 1 20974 table_id: # flags: STMT_END_F
-master-bin.000001 20974 Table_map 1 21015 table_id: # (test.t1)
-master-bin.000001 21015 Write_rows 1 21049 table_id: # flags: STMT_END_F
-master-bin.000001 21049 Table_map 1 21090 table_id: # (test.t1)
-master-bin.000001 21090 Write_rows 1 21124 table_id: # flags: STMT_END_F
-master-bin.000001 21124 Table_map 1 21165 table_id: # (test.t1)
-master-bin.000001 21165 Write_rows 1 21199 table_id: # flags: STMT_END_F
-master-bin.000001 21199 Table_map 1 21240 table_id: # (test.t1)
-master-bin.000001 21240 Write_rows 1 21274 table_id: # flags: STMT_END_F
-master-bin.000001 21274 Table_map 1 21315 table_id: # (test.t1)
-master-bin.000001 21315 Write_rows 1 21349 table_id: # flags: STMT_END_F
-master-bin.000001 21349 Table_map 1 21390 table_id: # (test.t1)
-master-bin.000001 21390 Write_rows 1 21424 table_id: # flags: STMT_END_F
-master-bin.000001 21424 Table_map 1 21465 table_id: # (test.t1)
-master-bin.000001 21465 Write_rows 1 21499 table_id: # flags: STMT_END_F
-master-bin.000001 21499 Table_map 1 21540 table_id: # (test.t1)
-master-bin.000001 21540 Write_rows 1 21574 table_id: # flags: STMT_END_F
-master-bin.000001 21574 Table_map 1 21615 table_id: # (test.t1)
-master-bin.000001 21615 Write_rows 1 21649 table_id: # flags: STMT_END_F
-master-bin.000001 21649 Table_map 1 21690 table_id: # (test.t1)
-master-bin.000001 21690 Write_rows 1 21724 table_id: # flags: STMT_END_F
-master-bin.000001 21724 Table_map 1 21765 table_id: # (test.t1)
-master-bin.000001 21765 Write_rows 1 21799 table_id: # flags: STMT_END_F
-master-bin.000001 21799 Table_map 1 21840 table_id: # (test.t1)
-master-bin.000001 21840 Write_rows 1 21874 table_id: # flags: STMT_END_F
-master-bin.000001 21874 Table_map 1 21915 table_id: # (test.t1)
-master-bin.000001 21915 Write_rows 1 21949 table_id: # flags: STMT_END_F
-master-bin.000001 21949 Table_map 1 21990 table_id: # (test.t1)
-master-bin.000001 21990 Write_rows 1 22024 table_id: # flags: STMT_END_F
-master-bin.000001 22024 Table_map 1 22065 table_id: # (test.t1)
-master-bin.000001 22065 Write_rows 1 22099 table_id: # flags: STMT_END_F
-master-bin.000001 22099 Table_map 1 22140 table_id: # (test.t1)
-master-bin.000001 22140 Write_rows 1 22174 table_id: # flags: STMT_END_F
-master-bin.000001 22174 Table_map 1 22215 table_id: # (test.t1)
-master-bin.000001 22215 Write_rows 1 22249 table_id: # flags: STMT_END_F
-master-bin.000001 22249 Table_map 1 22290 table_id: # (test.t1)
-master-bin.000001 22290 Write_rows 1 22324 table_id: # flags: STMT_END_F
-master-bin.000001 22324 Table_map 1 22365 table_id: # (test.t1)
-master-bin.000001 22365 Write_rows 1 22399 table_id: # flags: STMT_END_F
-master-bin.000001 22399 Table_map 1 22440 table_id: # (test.t1)
-master-bin.000001 22440 Write_rows 1 22474 table_id: # flags: STMT_END_F
-master-bin.000001 22474 Table_map 1 22515 table_id: # (test.t1)
-master-bin.000001 22515 Write_rows 1 22549 table_id: # flags: STMT_END_F
-master-bin.000001 22549 Table_map 1 22590 table_id: # (test.t1)
-master-bin.000001 22590 Write_rows 1 22624 table_id: # flags: STMT_END_F
-master-bin.000001 22624 Table_map 1 22665 table_id: # (test.t1)
-master-bin.000001 22665 Write_rows 1 22699 table_id: # flags: STMT_END_F
-master-bin.000001 22699 Table_map 1 22740 table_id: # (test.t1)
-master-bin.000001 22740 Write_rows 1 22774 table_id: # flags: STMT_END_F
-master-bin.000001 22774 Table_map 1 22815 table_id: # (test.t1)
-master-bin.000001 22815 Write_rows 1 22849 table_id: # flags: STMT_END_F
-master-bin.000001 22849 Table_map 1 22890 table_id: # (test.t1)
-master-bin.000001 22890 Write_rows 1 22924 table_id: # flags: STMT_END_F
-master-bin.000001 22924 Table_map 1 22965 table_id: # (test.t1)
-master-bin.000001 22965 Write_rows 1 22999 table_id: # flags: STMT_END_F
-master-bin.000001 22999 Table_map 1 23040 table_id: # (test.t1)
-master-bin.000001 23040 Write_rows 1 23074 table_id: # flags: STMT_END_F
-master-bin.000001 23074 Table_map 1 23115 table_id: # (test.t1)
-master-bin.000001 23115 Write_rows 1 23149 table_id: # flags: STMT_END_F
-master-bin.000001 23149 Table_map 1 23190 table_id: # (test.t1)
-master-bin.000001 23190 Write_rows 1 23224 table_id: # flags: STMT_END_F
-master-bin.000001 23224 Table_map 1 23265 table_id: # (test.t1)
-master-bin.000001 23265 Write_rows 1 23299 table_id: # flags: STMT_END_F
-master-bin.000001 23299 Table_map 1 23340 table_id: # (test.t1)
-master-bin.000001 23340 Write_rows 1 23374 table_id: # flags: STMT_END_F
-master-bin.000001 23374 Table_map 1 23415 table_id: # (test.t1)
-master-bin.000001 23415 Write_rows 1 23449 table_id: # flags: STMT_END_F
-master-bin.000001 23449 Table_map 1 23490 table_id: # (test.t1)
-master-bin.000001 23490 Write_rows 1 23524 table_id: # flags: STMT_END_F
-master-bin.000001 23524 Table_map 1 23565 table_id: # (test.t1)
-master-bin.000001 23565 Write_rows 1 23599 table_id: # flags: STMT_END_F
-master-bin.000001 23599 Table_map 1 23640 table_id: # (test.t1)
-master-bin.000001 23640 Write_rows 1 23674 table_id: # flags: STMT_END_F
-master-bin.000001 23674 Table_map 1 23715 table_id: # (test.t1)
-master-bin.000001 23715 Write_rows 1 23749 table_id: # flags: STMT_END_F
-master-bin.000001 23749 Table_map 1 23790 table_id: # (test.t1)
-master-bin.000001 23790 Write_rows 1 23824 table_id: # flags: STMT_END_F
-master-bin.000001 23824 Table_map 1 23865 table_id: # (test.t1)
-master-bin.000001 23865 Write_rows 1 23899 table_id: # flags: STMT_END_F
-master-bin.000001 23899 Table_map 1 23940 table_id: # (test.t1)
-master-bin.000001 23940 Write_rows 1 23974 table_id: # flags: STMT_END_F
-master-bin.000001 23974 Table_map 1 24015 table_id: # (test.t1)
-master-bin.000001 24015 Write_rows 1 24049 table_id: # flags: STMT_END_F
-master-bin.000001 24049 Table_map 1 24090 table_id: # (test.t1)
-master-bin.000001 24090 Write_rows 1 24124 table_id: # flags: STMT_END_F
-master-bin.000001 24124 Table_map 1 24165 table_id: # (test.t1)
-master-bin.000001 24165 Write_rows 1 24199 table_id: # flags: STMT_END_F
-master-bin.000001 24199 Table_map 1 24240 table_id: # (test.t1)
-master-bin.000001 24240 Write_rows 1 24274 table_id: # flags: STMT_END_F
-master-bin.000001 24274 Table_map 1 24315 table_id: # (test.t1)
-master-bin.000001 24315 Write_rows 1 24349 table_id: # flags: STMT_END_F
-master-bin.000001 24349 Table_map 1 24390 table_id: # (test.t1)
-master-bin.000001 24390 Write_rows 1 24424 table_id: # flags: STMT_END_F
-master-bin.000001 24424 Table_map 1 24465 table_id: # (test.t1)
-master-bin.000001 24465 Write_rows 1 24499 table_id: # flags: STMT_END_F
-master-bin.000001 24499 Table_map 1 24540 table_id: # (test.t1)
-master-bin.000001 24540 Write_rows 1 24574 table_id: # flags: STMT_END_F
-master-bin.000001 24574 Table_map 1 24615 table_id: # (test.t1)
-master-bin.000001 24615 Write_rows 1 24649 table_id: # flags: STMT_END_F
-master-bin.000001 24649 Table_map 1 24690 table_id: # (test.t1)
-master-bin.000001 24690 Write_rows 1 24724 table_id: # flags: STMT_END_F
-master-bin.000001 24724 Table_map 1 24765 table_id: # (test.t1)
-master-bin.000001 24765 Write_rows 1 24799 table_id: # flags: STMT_END_F
-master-bin.000001 24799 Table_map 1 24840 table_id: # (test.t1)
-master-bin.000001 24840 Write_rows 1 24874 table_id: # flags: STMT_END_F
-master-bin.000001 24874 Table_map 1 24915 table_id: # (test.t1)
-master-bin.000001 24915 Write_rows 1 24949 table_id: # flags: STMT_END_F
-master-bin.000001 24949 Table_map 1 24990 table_id: # (test.t1)
-master-bin.000001 24990 Write_rows 1 25024 table_id: # flags: STMT_END_F
-master-bin.000001 25024 Table_map 1 25065 table_id: # (test.t1)
-master-bin.000001 25065 Write_rows 1 25099 table_id: # flags: STMT_END_F
-master-bin.000001 25099 Table_map 1 25140 table_id: # (test.t1)
-master-bin.000001 25140 Write_rows 1 25174 table_id: # flags: STMT_END_F
-master-bin.000001 25174 Table_map 1 25215 table_id: # (test.t1)
-master-bin.000001 25215 Write_rows 1 25249 table_id: # flags: STMT_END_F
-master-bin.000001 25249 Table_map 1 25290 table_id: # (test.t1)
-master-bin.000001 25290 Write_rows 1 25324 table_id: # flags: STMT_END_F
-master-bin.000001 25324 Table_map 1 25365 table_id: # (test.t1)
-master-bin.000001 25365 Write_rows 1 25399 table_id: # flags: STMT_END_F
-master-bin.000001 25399 Table_map 1 25440 table_id: # (test.t1)
-master-bin.000001 25440 Write_rows 1 25474 table_id: # flags: STMT_END_F
-master-bin.000001 25474 Table_map 1 25515 table_id: # (test.t1)
-master-bin.000001 25515 Write_rows 1 25549 table_id: # flags: STMT_END_F
-master-bin.000001 25549 Table_map 1 25590 table_id: # (test.t1)
-master-bin.000001 25590 Write_rows 1 25624 table_id: # flags: STMT_END_F
-master-bin.000001 25624 Table_map 1 25665 table_id: # (test.t1)
-master-bin.000001 25665 Write_rows 1 25699 table_id: # flags: STMT_END_F
-master-bin.000001 25699 Table_map 1 25740 table_id: # (test.t1)
-master-bin.000001 25740 Write_rows 1 25774 table_id: # flags: STMT_END_F
-master-bin.000001 25774 Table_map 1 25815 table_id: # (test.t1)
-master-bin.000001 25815 Write_rows 1 25849 table_id: # flags: STMT_END_F
-master-bin.000001 25849 Table_map 1 25890 table_id: # (test.t1)
-master-bin.000001 25890 Write_rows 1 25924 table_id: # flags: STMT_END_F
-master-bin.000001 25924 Table_map 1 25965 table_id: # (test.t1)
-master-bin.000001 25965 Write_rows 1 25999 table_id: # flags: STMT_END_F
-master-bin.000001 25999 Table_map 1 26040 table_id: # (test.t1)
-master-bin.000001 26040 Write_rows 1 26074 table_id: # flags: STMT_END_F
-master-bin.000001 26074 Table_map 1 26115 table_id: # (test.t1)
-master-bin.000001 26115 Write_rows 1 26149 table_id: # flags: STMT_END_F
-master-bin.000001 26149 Table_map 1 26190 table_id: # (test.t1)
-master-bin.000001 26190 Write_rows 1 26224 table_id: # flags: STMT_END_F
-master-bin.000001 26224 Table_map 1 26265 table_id: # (test.t1)
-master-bin.000001 26265 Write_rows 1 26299 table_id: # flags: STMT_END_F
-master-bin.000001 26299 Table_map 1 26340 table_id: # (test.t1)
-master-bin.000001 26340 Write_rows 1 26374 table_id: # flags: STMT_END_F
-master-bin.000001 26374 Table_map 1 26415 table_id: # (test.t1)
-master-bin.000001 26415 Write_rows 1 26449 table_id: # flags: STMT_END_F
-master-bin.000001 26449 Table_map 1 26490 table_id: # (test.t1)
-master-bin.000001 26490 Write_rows 1 26524 table_id: # flags: STMT_END_F
-master-bin.000001 26524 Table_map 1 26565 table_id: # (test.t1)
-master-bin.000001 26565 Write_rows 1 26599 table_id: # flags: STMT_END_F
-master-bin.000001 26599 Table_map 1 26640 table_id: # (test.t1)
-master-bin.000001 26640 Write_rows 1 26674 table_id: # flags: STMT_END_F
-master-bin.000001 26674 Table_map 1 26715 table_id: # (test.t1)
-master-bin.000001 26715 Write_rows 1 26749 table_id: # flags: STMT_END_F
-master-bin.000001 26749 Table_map 1 26790 table_id: # (test.t1)
-master-bin.000001 26790 Write_rows 1 26824 table_id: # flags: STMT_END_F
-master-bin.000001 26824 Table_map 1 26865 table_id: # (test.t1)
-master-bin.000001 26865 Write_rows 1 26899 table_id: # flags: STMT_END_F
-master-bin.000001 26899 Table_map 1 26940 table_id: # (test.t1)
-master-bin.000001 26940 Write_rows 1 26974 table_id: # flags: STMT_END_F
-master-bin.000001 26974 Table_map 1 27015 table_id: # (test.t1)
-master-bin.000001 27015 Write_rows 1 27049 table_id: # flags: STMT_END_F
-master-bin.000001 27049 Table_map 1 27090 table_id: # (test.t1)
-master-bin.000001 27090 Write_rows 1 27124 table_id: # flags: STMT_END_F
-master-bin.000001 27124 Table_map 1 27165 table_id: # (test.t1)
-master-bin.000001 27165 Write_rows 1 27199 table_id: # flags: STMT_END_F
-master-bin.000001 27199 Table_map 1 27240 table_id: # (test.t1)
-master-bin.000001 27240 Write_rows 1 27274 table_id: # flags: STMT_END_F
-master-bin.000001 27274 Table_map 1 27315 table_id: # (test.t1)
-master-bin.000001 27315 Write_rows 1 27349 table_id: # flags: STMT_END_F
-master-bin.000001 27349 Table_map 1 27390 table_id: # (test.t1)
-master-bin.000001 27390 Write_rows 1 27424 table_id: # flags: STMT_END_F
-master-bin.000001 27424 Table_map 1 27465 table_id: # (test.t1)
-master-bin.000001 27465 Write_rows 1 27499 table_id: # flags: STMT_END_F
-master-bin.000001 27499 Table_map 1 27540 table_id: # (test.t1)
-master-bin.000001 27540 Write_rows 1 27574 table_id: # flags: STMT_END_F
-master-bin.000001 27574 Table_map 1 27615 table_id: # (test.t1)
-master-bin.000001 27615 Write_rows 1 27649 table_id: # flags: STMT_END_F
-master-bin.000001 27649 Table_map 1 27690 table_id: # (test.t1)
-master-bin.000001 27690 Write_rows 1 27724 table_id: # flags: STMT_END_F
-master-bin.000001 27724 Table_map 1 27765 table_id: # (test.t1)
-master-bin.000001 27765 Write_rows 1 27799 table_id: # flags: STMT_END_F
-master-bin.000001 27799 Table_map 1 27840 table_id: # (test.t1)
-master-bin.000001 27840 Write_rows 1 27874 table_id: # flags: STMT_END_F
-master-bin.000001 27874 Table_map 1 27915 table_id: # (test.t1)
-master-bin.000001 27915 Write_rows 1 27949 table_id: # flags: STMT_END_F
-master-bin.000001 27949 Table_map 1 27990 table_id: # (test.t1)
-master-bin.000001 27990 Write_rows 1 28024 table_id: # flags: STMT_END_F
-master-bin.000001 28024 Table_map 1 28065 table_id: # (test.t1)
-master-bin.000001 28065 Write_rows 1 28099 table_id: # flags: STMT_END_F
-master-bin.000001 28099 Table_map 1 28140 table_id: # (test.t1)
-master-bin.000001 28140 Write_rows 1 28174 table_id: # flags: STMT_END_F
-master-bin.000001 28174 Table_map 1 28215 table_id: # (test.t1)
-master-bin.000001 28215 Write_rows 1 28249 table_id: # flags: STMT_END_F
-master-bin.000001 28249 Table_map 1 28290 table_id: # (test.t1)
-master-bin.000001 28290 Write_rows 1 28324 table_id: # flags: STMT_END_F
-master-bin.000001 28324 Table_map 1 28365 table_id: # (test.t1)
-master-bin.000001 28365 Write_rows 1 28399 table_id: # flags: STMT_END_F
-master-bin.000001 28399 Table_map 1 28440 table_id: # (test.t1)
-master-bin.000001 28440 Write_rows 1 28474 table_id: # flags: STMT_END_F
-master-bin.000001 28474 Table_map 1 28515 table_id: # (test.t1)
-master-bin.000001 28515 Write_rows 1 28549 table_id: # flags: STMT_END_F
-master-bin.000001 28549 Table_map 1 28590 table_id: # (test.t1)
-master-bin.000001 28590 Write_rows 1 28624 table_id: # flags: STMT_END_F
-master-bin.000001 28624 Table_map 1 28665 table_id: # (test.t1)
-master-bin.000001 28665 Write_rows 1 28699 table_id: # flags: STMT_END_F
-master-bin.000001 28699 Table_map 1 28740 table_id: # (test.t1)
-master-bin.000001 28740 Write_rows 1 28774 table_id: # flags: STMT_END_F
-master-bin.000001 28774 Table_map 1 28815 table_id: # (test.t1)
-master-bin.000001 28815 Write_rows 1 28849 table_id: # flags: STMT_END_F
-master-bin.000001 28849 Table_map 1 28890 table_id: # (test.t1)
-master-bin.000001 28890 Write_rows 1 28924 table_id: # flags: STMT_END_F
-master-bin.000001 28924 Table_map 1 28965 table_id: # (test.t1)
-master-bin.000001 28965 Write_rows 1 28999 table_id: # flags: STMT_END_F
-master-bin.000001 28999 Table_map 1 29040 table_id: # (test.t1)
-master-bin.000001 29040 Write_rows 1 29074 table_id: # flags: STMT_END_F
-master-bin.000001 29074 Table_map 1 29115 table_id: # (test.t1)
-master-bin.000001 29115 Write_rows 1 29149 table_id: # flags: STMT_END_F
-master-bin.000001 29149 Table_map 1 29190 table_id: # (test.t1)
-master-bin.000001 29190 Write_rows 1 29224 table_id: # flags: STMT_END_F
-master-bin.000001 29224 Table_map 1 29265 table_id: # (test.t1)
-master-bin.000001 29265 Write_rows 1 29299 table_id: # flags: STMT_END_F
-master-bin.000001 29299 Table_map 1 29340 table_id: # (test.t1)
-master-bin.000001 29340 Write_rows 1 29374 table_id: # flags: STMT_END_F
-master-bin.000001 29374 Table_map 1 29415 table_id: # (test.t1)
-master-bin.000001 29415 Write_rows 1 29449 table_id: # flags: STMT_END_F
-master-bin.000001 29449 Table_map 1 29490 table_id: # (test.t1)
-master-bin.000001 29490 Write_rows 1 29524 table_id: # flags: STMT_END_F
-master-bin.000001 29524 Table_map 1 29565 table_id: # (test.t1)
-master-bin.000001 29565 Write_rows 1 29599 table_id: # flags: STMT_END_F
-master-bin.000001 29599 Table_map 1 29640 table_id: # (test.t1)
-master-bin.000001 29640 Write_rows 1 29674 table_id: # flags: STMT_END_F
-master-bin.000001 29674 Table_map 1 29715 table_id: # (test.t1)
-master-bin.000001 29715 Write_rows 1 29749 table_id: # flags: STMT_END_F
-master-bin.000001 29749 Table_map 1 29790 table_id: # (test.t1)
-master-bin.000001 29790 Write_rows 1 29824 table_id: # flags: STMT_END_F
-master-bin.000001 29824 Table_map 1 29865 table_id: # (test.t1)
-master-bin.000001 29865 Write_rows 1 29899 table_id: # flags: STMT_END_F
-master-bin.000001 29899 Table_map 1 29940 table_id: # (test.t1)
-master-bin.000001 29940 Write_rows 1 29974 table_id: # flags: STMT_END_F
-master-bin.000001 29974 Table_map 1 30015 table_id: # (test.t1)
-master-bin.000001 30015 Write_rows 1 30049 table_id: # flags: STMT_END_F
-master-bin.000001 30049 Table_map 1 30090 table_id: # (test.t1)
-master-bin.000001 30090 Write_rows 1 30124 table_id: # flags: STMT_END_F
-master-bin.000001 30124 Table_map 1 30165 table_id: # (test.t1)
-master-bin.000001 30165 Write_rows 1 30199 table_id: # flags: STMT_END_F
-master-bin.000001 30199 Table_map 1 30240 table_id: # (test.t1)
-master-bin.000001 30240 Write_rows 1 30274 table_id: # flags: STMT_END_F
-master-bin.000001 30274 Xid 1 30301 COMMIT /* XID */
-master-bin.000001 30301 Rotate 1 30345 master-bin.000002;pos=4
+master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=innodb
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Rotate # # master-bin.000002;pos=4
drop table t1;
set global binlog_cache_size=@bcs;
set session autocommit = @ac;
@@ -1081,15 +1079,14 @@ set @b= 14632475938453979136;
execute stmt using @a, @b;
deallocate prepare stmt;
drop table t1;
-show binlog events from 0;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4
-master-bin.000001 106 Query 1 227 use `test`; create table t1 (a bigint unsigned, b bigint(20) unsigned)
-master-bin.000001 227 Query 1 295 BEGIN
-master-bin.000001 295 Table_map 1 337 table_id: # (test.t1)
-master-bin.000001 337 Write_rows 1 383 table_id: # flags: STMT_END_F
-master-bin.000001 383 Query 1 452 COMMIT
-master-bin.000001 452 Query 1 528 use `test`; drop table t1
+master-bin.000001 # Query # # use `test`; create table t1 (a bigint unsigned, b bigint(20) unsigned)
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Query # # use `test`; drop table t1
reset master;
CREATE DATABASE bug39182 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
USE bug39182;
@@ -1289,14 +1286,14 @@ drop table if exists t3;
create table t3 (a int(11) NOT NULL AUTO_INCREMENT, b text, PRIMARY KEY (a) ) engine=innodb;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000001 346
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
-show master status /* must show new binlog index after rotating */;
+show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000002 106
+master-bin.000002 # <Binlog_Do_DB> <Binlog_Ignore_DB>
drop table t3;
#
# Bug #45998: database crashes when running "create as select"
diff --git a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
index 9057395ab82..8b42cadf6cb 100644
--- a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
+++ b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
@@ -879,11 +879,11 @@ delete from t4;
insert into t3 values (1,1),(2,2);
insert into t4 values (1,1),(2,2);
reset master;
-UPDATE t3,t4 SET t3.a=t4.a + bug27417(1);
+UPDATE t3,t4 SET t3.a = t4.a + bug27417(1) where t3.a = 1;
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
select count(*) from t1 /* must be 1 */;
count(*)
-2
+1
drop table t4;
delete from t1;
delete from t2;
diff --git a/mysql-test/suite/binlog/r/binlog_stm_binlog.result b/mysql-test/suite/binlog/r/binlog_stm_binlog.result
index a7f79e53895..abfd6a33a7d 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result
@@ -3,14 +3,13 @@ create table t1 (a int, b int) engine=innodb;
begin;
insert into t1 values (1,2);
commit;
-show binlog events;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 4 Format_desc 1 106 Server ver: #, Binlog ver: #
-master-bin.000001 106 Query 1 192 use `test`; drop table if exists t1
-master-bin.000001 192 Query 1 299 use `test`; create table t1 (a int, b int) engine=innodb
-master-bin.000001 299 Query 1 367 BEGIN
-master-bin.000001 367 Query 1 457 use `test`; insert into t1 values (1,2)
-master-bin.000001 457 Xid 1 484 COMMIT /* XID */
+master-bin.000001 # Query # # use `test`; drop table if exists t1
+master-bin.000001 # Query # # use `test`; create table t1 (a int, b int) engine=innodb
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; insert into t1 values (1,2)
+master-bin.000001 # Xid # # COMMIT /* XID */
drop table t1;
drop table if exists t1, t2;
reset master;
@@ -38,115 +37,115 @@ create table t1 (n int) engine=innodb;
begin;
commit;
drop table t1;
-show binlog events in 'master-bin.000001' from 106;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; create table t1 (n int) engine=innodb
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(100 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(99 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(98 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(97 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(96 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(95 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(94 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(93 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(92 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(91 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(90 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(89 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(88 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(87 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(86 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(85 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(84 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(83 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(82 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(81 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(80 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(79 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(78 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(77 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(76 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(75 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(74 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(73 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(72 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(71 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(70 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(69 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(68 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(67 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(66 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(65 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(64 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(63 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(62 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(61 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(60 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(59 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(58 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(57 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(56 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(55 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(54 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(53 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(52 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(51 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(50 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(49 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(48 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(47 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(46 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(45 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(44 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(43 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(42 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(41 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(40 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(39 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(38 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(37 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(36 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(35 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(34 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(33 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(32 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(31 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(30 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(29 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(28 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(27 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(26 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(25 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(24 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(23 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(22 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(21 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(20 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(19 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(18 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(17 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(16 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(15 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(14 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(13 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(12 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(11 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(10 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(9 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(8 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(7 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(6 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(5 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(4 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(3 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(2 + 4)
-master-bin.000001 # Query 1 # use `test`; insert into t1 values(1 + 4)
-master-bin.000001 # Xid 1 # COMMIT /* xid= */
-master-bin.000001 # Rotate 1 # master-bin.000002;pos=4
-show binlog events in 'master-bin.000002' from 106;
+master-bin.000001 # Query # # use `test`; create table t1 (n int) engine=innodb
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; insert into t1 values(100 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(99 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(98 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(97 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(96 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(95 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(94 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(93 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(92 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(91 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(90 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(89 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(88 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(87 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(86 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(85 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(84 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(83 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(82 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(81 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(80 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(79 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(78 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(77 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(76 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(75 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(74 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(73 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(72 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(71 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(70 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(69 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(68 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(67 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(66 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(65 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(64 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(63 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(62 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(61 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(60 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(59 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(58 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(57 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(56 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(55 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(54 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(53 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(52 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(51 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(50 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(49 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(48 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(47 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(46 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(45 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(44 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(43 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(42 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(41 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(40 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(39 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(38 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(37 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(36 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(35 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(34 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(33 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(32 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(31 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(30 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(29 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(28 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(27 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(26 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(25 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(24 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(23 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(22 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(21 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(20 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(19 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(18 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(17 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(16 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(15 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(14 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(13 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(12 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(11 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(10 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(9 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(8 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(7 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(6 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(5 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(4 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(3 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(2 + 4)
+master-bin.000001 # Query # # use `test`; insert into t1 values(1 + 4)
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Rotate # # master-bin.000002;pos=4
+show binlog events in 'master-bin.000002' from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000002 # Query 1 # use `test`; drop table t1
+master-bin.000002 # Query # # use `test`; drop table t1
set @ac = @@autocommit;
set autocommit= 0;
reset master;
@@ -157,427 +156,425 @@ insert into t1 values (2);
insert into t1 values (3);
commit;
drop table t1;
-show binlog events from 0;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4
-master-bin.000001 106 Query 1 205 use `test`; create table t1(n int) engine=innodb
-master-bin.000001 205 Query 1 273 BEGIN
-master-bin.000001 273 Query 1 361 use `test`; insert into t1 values (1)
-master-bin.000001 361 Query 1 449 use `test`; insert into t1 values (2)
-master-bin.000001 449 Query 1 537 use `test`; insert into t1 values (3)
-master-bin.000001 537 Xid 1 564 COMMIT /* XID */
-master-bin.000001 564 Query 1 640 use `test`; drop table t1
+master-bin.000001 # Query # # use `test`; create table t1(n int) engine=innodb
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; insert into t1 values (1)
+master-bin.000001 # Query # # use `test`; insert into t1 values (2)
+master-bin.000001 # Query # # use `test`; insert into t1 values (3)
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # use `test`; drop table t1
set @bcs = @@binlog_cache_size;
set global binlog_cache_size=4096;
reset master;
create table t1 (a int) engine=innodb;
-show binlog events from 0;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4
-master-bin.000001 106 Query 1 206 use `test`; create table t1 (a int) engine=innodb
-master-bin.000001 206 Query 1 274 BEGIN
-master-bin.000001 274 Query 1 365 use `test`; insert into t1 values( 400 )
-master-bin.000001 365 Query 1 456 use `test`; insert into t1 values( 399 )
-master-bin.000001 456 Query 1 547 use `test`; insert into t1 values( 398 )
-master-bin.000001 547 Query 1 638 use `test`; insert into t1 values( 397 )
-master-bin.000001 638 Query 1 729 use `test`; insert into t1 values( 396 )
-master-bin.000001 729 Query 1 820 use `test`; insert into t1 values( 395 )
-master-bin.000001 820 Query 1 911 use `test`; insert into t1 values( 394 )
-master-bin.000001 911 Query 1 1002 use `test`; insert into t1 values( 393 )
-master-bin.000001 1002 Query 1 1093 use `test`; insert into t1 values( 392 )
-master-bin.000001 1093 Query 1 1184 use `test`; insert into t1 values( 391 )
-master-bin.000001 1184 Query 1 1275 use `test`; insert into t1 values( 390 )
-master-bin.000001 1275 Query 1 1366 use `test`; insert into t1 values( 389 )
-master-bin.000001 1366 Query 1 1457 use `test`; insert into t1 values( 388 )
-master-bin.000001 1457 Query 1 1548 use `test`; insert into t1 values( 387 )
-master-bin.000001 1548 Query 1 1639 use `test`; insert into t1 values( 386 )
-master-bin.000001 1639 Query 1 1730 use `test`; insert into t1 values( 385 )
-master-bin.000001 1730 Query 1 1821 use `test`; insert into t1 values( 384 )
-master-bin.000001 1821 Query 1 1912 use `test`; insert into t1 values( 383 )
-master-bin.000001 1912 Query 1 2003 use `test`; insert into t1 values( 382 )
-master-bin.000001 2003 Query 1 2094 use `test`; insert into t1 values( 381 )
-master-bin.000001 2094 Query 1 2185 use `test`; insert into t1 values( 380 )
-master-bin.000001 2185 Query 1 2276 use `test`; insert into t1 values( 379 )
-master-bin.000001 2276 Query 1 2367 use `test`; insert into t1 values( 378 )
-master-bin.000001 2367 Query 1 2458 use `test`; insert into t1 values( 377 )
-master-bin.000001 2458 Query 1 2549 use `test`; insert into t1 values( 376 )
-master-bin.000001 2549 Query 1 2640 use `test`; insert into t1 values( 375 )
-master-bin.000001 2640 Query 1 2731 use `test`; insert into t1 values( 374 )
-master-bin.000001 2731 Query 1 2822 use `test`; insert into t1 values( 373 )
-master-bin.000001 2822 Query 1 2913 use `test`; insert into t1 values( 372 )
-master-bin.000001 2913 Query 1 3004 use `test`; insert into t1 values( 371 )
-master-bin.000001 3004 Query 1 3095 use `test`; insert into t1 values( 370 )
-master-bin.000001 3095 Query 1 3186 use `test`; insert into t1 values( 369 )
-master-bin.000001 3186 Query 1 3277 use `test`; insert into t1 values( 368 )
-master-bin.000001 3277 Query 1 3368 use `test`; insert into t1 values( 367 )
-master-bin.000001 3368 Query 1 3459 use `test`; insert into t1 values( 366 )
-master-bin.000001 3459 Query 1 3550 use `test`; insert into t1 values( 365 )
-master-bin.000001 3550 Query 1 3641 use `test`; insert into t1 values( 364 )
-master-bin.000001 3641 Query 1 3732 use `test`; insert into t1 values( 363 )
-master-bin.000001 3732 Query 1 3823 use `test`; insert into t1 values( 362 )
-master-bin.000001 3823 Query 1 3914 use `test`; insert into t1 values( 361 )
-master-bin.000001 3914 Query 1 4005 use `test`; insert into t1 values( 360 )
-master-bin.000001 4005 Query 1 4096 use `test`; insert into t1 values( 359 )
-master-bin.000001 4096 Query 1 4187 use `test`; insert into t1 values( 358 )
-master-bin.000001 4187 Query 1 4278 use `test`; insert into t1 values( 357 )
-master-bin.000001 4278 Query 1 4369 use `test`; insert into t1 values( 356 )
-master-bin.000001 4369 Query 1 4460 use `test`; insert into t1 values( 355 )
-master-bin.000001 4460 Query 1 4551 use `test`; insert into t1 values( 354 )
-master-bin.000001 4551 Query 1 4642 use `test`; insert into t1 values( 353 )
-master-bin.000001 4642 Query 1 4733 use `test`; insert into t1 values( 352 )
-master-bin.000001 4733 Query 1 4824 use `test`; insert into t1 values( 351 )
-master-bin.000001 4824 Query 1 4915 use `test`; insert into t1 values( 350 )
-master-bin.000001 4915 Query 1 5006 use `test`; insert into t1 values( 349 )
-master-bin.000001 5006 Query 1 5097 use `test`; insert into t1 values( 348 )
-master-bin.000001 5097 Query 1 5188 use `test`; insert into t1 values( 347 )
-master-bin.000001 5188 Query 1 5279 use `test`; insert into t1 values( 346 )
-master-bin.000001 5279 Query 1 5370 use `test`; insert into t1 values( 345 )
-master-bin.000001 5370 Query 1 5461 use `test`; insert into t1 values( 344 )
-master-bin.000001 5461 Query 1 5552 use `test`; insert into t1 values( 343 )
-master-bin.000001 5552 Query 1 5643 use `test`; insert into t1 values( 342 )
-master-bin.000001 5643 Query 1 5734 use `test`; insert into t1 values( 341 )
-master-bin.000001 5734 Query 1 5825 use `test`; insert into t1 values( 340 )
-master-bin.000001 5825 Query 1 5916 use `test`; insert into t1 values( 339 )
-master-bin.000001 5916 Query 1 6007 use `test`; insert into t1 values( 338 )
-master-bin.000001 6007 Query 1 6098 use `test`; insert into t1 values( 337 )
-master-bin.000001 6098 Query 1 6189 use `test`; insert into t1 values( 336 )
-master-bin.000001 6189 Query 1 6280 use `test`; insert into t1 values( 335 )
-master-bin.000001 6280 Query 1 6371 use `test`; insert into t1 values( 334 )
-master-bin.000001 6371 Query 1 6462 use `test`; insert into t1 values( 333 )
-master-bin.000001 6462 Query 1 6553 use `test`; insert into t1 values( 332 )
-master-bin.000001 6553 Query 1 6644 use `test`; insert into t1 values( 331 )
-master-bin.000001 6644 Query 1 6735 use `test`; insert into t1 values( 330 )
-master-bin.000001 6735 Query 1 6826 use `test`; insert into t1 values( 329 )
-master-bin.000001 6826 Query 1 6917 use `test`; insert into t1 values( 328 )
-master-bin.000001 6917 Query 1 7008 use `test`; insert into t1 values( 327 )
-master-bin.000001 7008 Query 1 7099 use `test`; insert into t1 values( 326 )
-master-bin.000001 7099 Query 1 7190 use `test`; insert into t1 values( 325 )
-master-bin.000001 7190 Query 1 7281 use `test`; insert into t1 values( 324 )
-master-bin.000001 7281 Query 1 7372 use `test`; insert into t1 values( 323 )
-master-bin.000001 7372 Query 1 7463 use `test`; insert into t1 values( 322 )
-master-bin.000001 7463 Query 1 7554 use `test`; insert into t1 values( 321 )
-master-bin.000001 7554 Query 1 7645 use `test`; insert into t1 values( 320 )
-master-bin.000001 7645 Query 1 7736 use `test`; insert into t1 values( 319 )
-master-bin.000001 7736 Query 1 7827 use `test`; insert into t1 values( 318 )
-master-bin.000001 7827 Query 1 7918 use `test`; insert into t1 values( 317 )
-master-bin.000001 7918 Query 1 8009 use `test`; insert into t1 values( 316 )
-master-bin.000001 8009 Query 1 8100 use `test`; insert into t1 values( 315 )
-master-bin.000001 8100 Query 1 8191 use `test`; insert into t1 values( 314 )
-master-bin.000001 8191 Query 1 8282 use `test`; insert into t1 values( 313 )
-master-bin.000001 8282 Query 1 8373 use `test`; insert into t1 values( 312 )
-master-bin.000001 8373 Query 1 8464 use `test`; insert into t1 values( 311 )
-master-bin.000001 8464 Query 1 8555 use `test`; insert into t1 values( 310 )
-master-bin.000001 8555 Query 1 8646 use `test`; insert into t1 values( 309 )
-master-bin.000001 8646 Query 1 8737 use `test`; insert into t1 values( 308 )
-master-bin.000001 8737 Query 1 8828 use `test`; insert into t1 values( 307 )
-master-bin.000001 8828 Query 1 8919 use `test`; insert into t1 values( 306 )
-master-bin.000001 8919 Query 1 9010 use `test`; insert into t1 values( 305 )
-master-bin.000001 9010 Query 1 9101 use `test`; insert into t1 values( 304 )
-master-bin.000001 9101 Query 1 9192 use `test`; insert into t1 values( 303 )
-master-bin.000001 9192 Query 1 9283 use `test`; insert into t1 values( 302 )
-master-bin.000001 9283 Query 1 9374 use `test`; insert into t1 values( 301 )
-master-bin.000001 9374 Query 1 9465 use `test`; insert into t1 values( 300 )
-master-bin.000001 9465 Query 1 9556 use `test`; insert into t1 values( 299 )
-master-bin.000001 9556 Query 1 9647 use `test`; insert into t1 values( 298 )
-master-bin.000001 9647 Query 1 9738 use `test`; insert into t1 values( 297 )
-master-bin.000001 9738 Query 1 9829 use `test`; insert into t1 values( 296 )
-master-bin.000001 9829 Query 1 9920 use `test`; insert into t1 values( 295 )
-master-bin.000001 9920 Query 1 10011 use `test`; insert into t1 values( 294 )
-master-bin.000001 10011 Query 1 10102 use `test`; insert into t1 values( 293 )
-master-bin.000001 10102 Query 1 10193 use `test`; insert into t1 values( 292 )
-master-bin.000001 10193 Query 1 10284 use `test`; insert into t1 values( 291 )
-master-bin.000001 10284 Query 1 10375 use `test`; insert into t1 values( 290 )
-master-bin.000001 10375 Query 1 10466 use `test`; insert into t1 values( 289 )
-master-bin.000001 10466 Query 1 10557 use `test`; insert into t1 values( 288 )
-master-bin.000001 10557 Query 1 10648 use `test`; insert into t1 values( 287 )
-master-bin.000001 10648 Query 1 10739 use `test`; insert into t1 values( 286 )
-master-bin.000001 10739 Query 1 10830 use `test`; insert into t1 values( 285 )
-master-bin.000001 10830 Query 1 10921 use `test`; insert into t1 values( 284 )
-master-bin.000001 10921 Query 1 11012 use `test`; insert into t1 values( 283 )
-master-bin.000001 11012 Query 1 11103 use `test`; insert into t1 values( 282 )
-master-bin.000001 11103 Query 1 11194 use `test`; insert into t1 values( 281 )
-master-bin.000001 11194 Query 1 11285 use `test`; insert into t1 values( 280 )
-master-bin.000001 11285 Query 1 11376 use `test`; insert into t1 values( 279 )
-master-bin.000001 11376 Query 1 11467 use `test`; insert into t1 values( 278 )
-master-bin.000001 11467 Query 1 11558 use `test`; insert into t1 values( 277 )
-master-bin.000001 11558 Query 1 11649 use `test`; insert into t1 values( 276 )
-master-bin.000001 11649 Query 1 11740 use `test`; insert into t1 values( 275 )
-master-bin.000001 11740 Query 1 11831 use `test`; insert into t1 values( 274 )
-master-bin.000001 11831 Query 1 11922 use `test`; insert into t1 values( 273 )
-master-bin.000001 11922 Query 1 12013 use `test`; insert into t1 values( 272 )
-master-bin.000001 12013 Query 1 12104 use `test`; insert into t1 values( 271 )
-master-bin.000001 12104 Query 1 12195 use `test`; insert into t1 values( 270 )
-master-bin.000001 12195 Query 1 12286 use `test`; insert into t1 values( 269 )
-master-bin.000001 12286 Query 1 12377 use `test`; insert into t1 values( 268 )
-master-bin.000001 12377 Query 1 12468 use `test`; insert into t1 values( 267 )
-master-bin.000001 12468 Query 1 12559 use `test`; insert into t1 values( 266 )
-master-bin.000001 12559 Query 1 12650 use `test`; insert into t1 values( 265 )
-master-bin.000001 12650 Query 1 12741 use `test`; insert into t1 values( 264 )
-master-bin.000001 12741 Query 1 12832 use `test`; insert into t1 values( 263 )
-master-bin.000001 12832 Query 1 12923 use `test`; insert into t1 values( 262 )
-master-bin.000001 12923 Query 1 13014 use `test`; insert into t1 values( 261 )
-master-bin.000001 13014 Query 1 13105 use `test`; insert into t1 values( 260 )
-master-bin.000001 13105 Query 1 13196 use `test`; insert into t1 values( 259 )
-master-bin.000001 13196 Query 1 13287 use `test`; insert into t1 values( 258 )
-master-bin.000001 13287 Query 1 13378 use `test`; insert into t1 values( 257 )
-master-bin.000001 13378 Query 1 13469 use `test`; insert into t1 values( 256 )
-master-bin.000001 13469 Query 1 13560 use `test`; insert into t1 values( 255 )
-master-bin.000001 13560 Query 1 13651 use `test`; insert into t1 values( 254 )
-master-bin.000001 13651 Query 1 13742 use `test`; insert into t1 values( 253 )
-master-bin.000001 13742 Query 1 13833 use `test`; insert into t1 values( 252 )
-master-bin.000001 13833 Query 1 13924 use `test`; insert into t1 values( 251 )
-master-bin.000001 13924 Query 1 14015 use `test`; insert into t1 values( 250 )
-master-bin.000001 14015 Query 1 14106 use `test`; insert into t1 values( 249 )
-master-bin.000001 14106 Query 1 14197 use `test`; insert into t1 values( 248 )
-master-bin.000001 14197 Query 1 14288 use `test`; insert into t1 values( 247 )
-master-bin.000001 14288 Query 1 14379 use `test`; insert into t1 values( 246 )
-master-bin.000001 14379 Query 1 14470 use `test`; insert into t1 values( 245 )
-master-bin.000001 14470 Query 1 14561 use `test`; insert into t1 values( 244 )
-master-bin.000001 14561 Query 1 14652 use `test`; insert into t1 values( 243 )
-master-bin.000001 14652 Query 1 14743 use `test`; insert into t1 values( 242 )
-master-bin.000001 14743 Query 1 14834 use `test`; insert into t1 values( 241 )
-master-bin.000001 14834 Query 1 14925 use `test`; insert into t1 values( 240 )
-master-bin.000001 14925 Query 1 15016 use `test`; insert into t1 values( 239 )
-master-bin.000001 15016 Query 1 15107 use `test`; insert into t1 values( 238 )
-master-bin.000001 15107 Query 1 15198 use `test`; insert into t1 values( 237 )
-master-bin.000001 15198 Query 1 15289 use `test`; insert into t1 values( 236 )
-master-bin.000001 15289 Query 1 15380 use `test`; insert into t1 values( 235 )
-master-bin.000001 15380 Query 1 15471 use `test`; insert into t1 values( 234 )
-master-bin.000001 15471 Query 1 15562 use `test`; insert into t1 values( 233 )
-master-bin.000001 15562 Query 1 15653 use `test`; insert into t1 values( 232 )
-master-bin.000001 15653 Query 1 15744 use `test`; insert into t1 values( 231 )
-master-bin.000001 15744 Query 1 15835 use `test`; insert into t1 values( 230 )
-master-bin.000001 15835 Query 1 15926 use `test`; insert into t1 values( 229 )
-master-bin.000001 15926 Query 1 16017 use `test`; insert into t1 values( 228 )
-master-bin.000001 16017 Query 1 16108 use `test`; insert into t1 values( 227 )
-master-bin.000001 16108 Query 1 16199 use `test`; insert into t1 values( 226 )
-master-bin.000001 16199 Query 1 16290 use `test`; insert into t1 values( 225 )
-master-bin.000001 16290 Query 1 16381 use `test`; insert into t1 values( 224 )
-master-bin.000001 16381 Query 1 16472 use `test`; insert into t1 values( 223 )
-master-bin.000001 16472 Query 1 16563 use `test`; insert into t1 values( 222 )
-master-bin.000001 16563 Query 1 16654 use `test`; insert into t1 values( 221 )
-master-bin.000001 16654 Query 1 16745 use `test`; insert into t1 values( 220 )
-master-bin.000001 16745 Query 1 16836 use `test`; insert into t1 values( 219 )
-master-bin.000001 16836 Query 1 16927 use `test`; insert into t1 values( 218 )
-master-bin.000001 16927 Query 1 17018 use `test`; insert into t1 values( 217 )
-master-bin.000001 17018 Query 1 17109 use `test`; insert into t1 values( 216 )
-master-bin.000001 17109 Query 1 17200 use `test`; insert into t1 values( 215 )
-master-bin.000001 17200 Query 1 17291 use `test`; insert into t1 values( 214 )
-master-bin.000001 17291 Query 1 17382 use `test`; insert into t1 values( 213 )
-master-bin.000001 17382 Query 1 17473 use `test`; insert into t1 values( 212 )
-master-bin.000001 17473 Query 1 17564 use `test`; insert into t1 values( 211 )
-master-bin.000001 17564 Query 1 17655 use `test`; insert into t1 values( 210 )
-master-bin.000001 17655 Query 1 17746 use `test`; insert into t1 values( 209 )
-master-bin.000001 17746 Query 1 17837 use `test`; insert into t1 values( 208 )
-master-bin.000001 17837 Query 1 17928 use `test`; insert into t1 values( 207 )
-master-bin.000001 17928 Query 1 18019 use `test`; insert into t1 values( 206 )
-master-bin.000001 18019 Query 1 18110 use `test`; insert into t1 values( 205 )
-master-bin.000001 18110 Query 1 18201 use `test`; insert into t1 values( 204 )
-master-bin.000001 18201 Query 1 18292 use `test`; insert into t1 values( 203 )
-master-bin.000001 18292 Query 1 18383 use `test`; insert into t1 values( 202 )
-master-bin.000001 18383 Query 1 18474 use `test`; insert into t1 values( 201 )
-master-bin.000001 18474 Query 1 18565 use `test`; insert into t1 values( 200 )
-master-bin.000001 18565 Query 1 18656 use `test`; insert into t1 values( 199 )
-master-bin.000001 18656 Query 1 18747 use `test`; insert into t1 values( 198 )
-master-bin.000001 18747 Query 1 18838 use `test`; insert into t1 values( 197 )
-master-bin.000001 18838 Query 1 18929 use `test`; insert into t1 values( 196 )
-master-bin.000001 18929 Query 1 19020 use `test`; insert into t1 values( 195 )
-master-bin.000001 19020 Query 1 19111 use `test`; insert into t1 values( 194 )
-master-bin.000001 19111 Query 1 19202 use `test`; insert into t1 values( 193 )
-master-bin.000001 19202 Query 1 19293 use `test`; insert into t1 values( 192 )
-master-bin.000001 19293 Query 1 19384 use `test`; insert into t1 values( 191 )
-master-bin.000001 19384 Query 1 19475 use `test`; insert into t1 values( 190 )
-master-bin.000001 19475 Query 1 19566 use `test`; insert into t1 values( 189 )
-master-bin.000001 19566 Query 1 19657 use `test`; insert into t1 values( 188 )
-master-bin.000001 19657 Query 1 19748 use `test`; insert into t1 values( 187 )
-master-bin.000001 19748 Query 1 19839 use `test`; insert into t1 values( 186 )
-master-bin.000001 19839 Query 1 19930 use `test`; insert into t1 values( 185 )
-master-bin.000001 19930 Query 1 20021 use `test`; insert into t1 values( 184 )
-master-bin.000001 20021 Query 1 20112 use `test`; insert into t1 values( 183 )
-master-bin.000001 20112 Query 1 20203 use `test`; insert into t1 values( 182 )
-master-bin.000001 20203 Query 1 20294 use `test`; insert into t1 values( 181 )
-master-bin.000001 20294 Query 1 20385 use `test`; insert into t1 values( 180 )
-master-bin.000001 20385 Query 1 20476 use `test`; insert into t1 values( 179 )
-master-bin.000001 20476 Query 1 20567 use `test`; insert into t1 values( 178 )
-master-bin.000001 20567 Query 1 20658 use `test`; insert into t1 values( 177 )
-master-bin.000001 20658 Query 1 20749 use `test`; insert into t1 values( 176 )
-master-bin.000001 20749 Query 1 20840 use `test`; insert into t1 values( 175 )
-master-bin.000001 20840 Query 1 20931 use `test`; insert into t1 values( 174 )
-master-bin.000001 20931 Query 1 21022 use `test`; insert into t1 values( 173 )
-master-bin.000001 21022 Query 1 21113 use `test`; insert into t1 values( 172 )
-master-bin.000001 21113 Query 1 21204 use `test`; insert into t1 values( 171 )
-master-bin.000001 21204 Query 1 21295 use `test`; insert into t1 values( 170 )
-master-bin.000001 21295 Query 1 21386 use `test`; insert into t1 values( 169 )
-master-bin.000001 21386 Query 1 21477 use `test`; insert into t1 values( 168 )
-master-bin.000001 21477 Query 1 21568 use `test`; insert into t1 values( 167 )
-master-bin.000001 21568 Query 1 21659 use `test`; insert into t1 values( 166 )
-master-bin.000001 21659 Query 1 21750 use `test`; insert into t1 values( 165 )
-master-bin.000001 21750 Query 1 21841 use `test`; insert into t1 values( 164 )
-master-bin.000001 21841 Query 1 21932 use `test`; insert into t1 values( 163 )
-master-bin.000001 21932 Query 1 22023 use `test`; insert into t1 values( 162 )
-master-bin.000001 22023 Query 1 22114 use `test`; insert into t1 values( 161 )
-master-bin.000001 22114 Query 1 22205 use `test`; insert into t1 values( 160 )
-master-bin.000001 22205 Query 1 22296 use `test`; insert into t1 values( 159 )
-master-bin.000001 22296 Query 1 22387 use `test`; insert into t1 values( 158 )
-master-bin.000001 22387 Query 1 22478 use `test`; insert into t1 values( 157 )
-master-bin.000001 22478 Query 1 22569 use `test`; insert into t1 values( 156 )
-master-bin.000001 22569 Query 1 22660 use `test`; insert into t1 values( 155 )
-master-bin.000001 22660 Query 1 22751 use `test`; insert into t1 values( 154 )
-master-bin.000001 22751 Query 1 22842 use `test`; insert into t1 values( 153 )
-master-bin.000001 22842 Query 1 22933 use `test`; insert into t1 values( 152 )
-master-bin.000001 22933 Query 1 23024 use `test`; insert into t1 values( 151 )
-master-bin.000001 23024 Query 1 23115 use `test`; insert into t1 values( 150 )
-master-bin.000001 23115 Query 1 23206 use `test`; insert into t1 values( 149 )
-master-bin.000001 23206 Query 1 23297 use `test`; insert into t1 values( 148 )
-master-bin.000001 23297 Query 1 23388 use `test`; insert into t1 values( 147 )
-master-bin.000001 23388 Query 1 23479 use `test`; insert into t1 values( 146 )
-master-bin.000001 23479 Query 1 23570 use `test`; insert into t1 values( 145 )
-master-bin.000001 23570 Query 1 23661 use `test`; insert into t1 values( 144 )
-master-bin.000001 23661 Query 1 23752 use `test`; insert into t1 values( 143 )
-master-bin.000001 23752 Query 1 23843 use `test`; insert into t1 values( 142 )
-master-bin.000001 23843 Query 1 23934 use `test`; insert into t1 values( 141 )
-master-bin.000001 23934 Query 1 24025 use `test`; insert into t1 values( 140 )
-master-bin.000001 24025 Query 1 24116 use `test`; insert into t1 values( 139 )
-master-bin.000001 24116 Query 1 24207 use `test`; insert into t1 values( 138 )
-master-bin.000001 24207 Query 1 24298 use `test`; insert into t1 values( 137 )
-master-bin.000001 24298 Query 1 24389 use `test`; insert into t1 values( 136 )
-master-bin.000001 24389 Query 1 24480 use `test`; insert into t1 values( 135 )
-master-bin.000001 24480 Query 1 24571 use `test`; insert into t1 values( 134 )
-master-bin.000001 24571 Query 1 24662 use `test`; insert into t1 values( 133 )
-master-bin.000001 24662 Query 1 24753 use `test`; insert into t1 values( 132 )
-master-bin.000001 24753 Query 1 24844 use `test`; insert into t1 values( 131 )
-master-bin.000001 24844 Query 1 24935 use `test`; insert into t1 values( 130 )
-master-bin.000001 24935 Query 1 25026 use `test`; insert into t1 values( 129 )
-master-bin.000001 25026 Query 1 25117 use `test`; insert into t1 values( 128 )
-master-bin.000001 25117 Query 1 25208 use `test`; insert into t1 values( 127 )
-master-bin.000001 25208 Query 1 25299 use `test`; insert into t1 values( 126 )
-master-bin.000001 25299 Query 1 25390 use `test`; insert into t1 values( 125 )
-master-bin.000001 25390 Query 1 25481 use `test`; insert into t1 values( 124 )
-master-bin.000001 25481 Query 1 25572 use `test`; insert into t1 values( 123 )
-master-bin.000001 25572 Query 1 25663 use `test`; insert into t1 values( 122 )
-master-bin.000001 25663 Query 1 25754 use `test`; insert into t1 values( 121 )
-master-bin.000001 25754 Query 1 25845 use `test`; insert into t1 values( 120 )
-master-bin.000001 25845 Query 1 25936 use `test`; insert into t1 values( 119 )
-master-bin.000001 25936 Query 1 26027 use `test`; insert into t1 values( 118 )
-master-bin.000001 26027 Query 1 26118 use `test`; insert into t1 values( 117 )
-master-bin.000001 26118 Query 1 26209 use `test`; insert into t1 values( 116 )
-master-bin.000001 26209 Query 1 26300 use `test`; insert into t1 values( 115 )
-master-bin.000001 26300 Query 1 26391 use `test`; insert into t1 values( 114 )
-master-bin.000001 26391 Query 1 26482 use `test`; insert into t1 values( 113 )
-master-bin.000001 26482 Query 1 26573 use `test`; insert into t1 values( 112 )
-master-bin.000001 26573 Query 1 26664 use `test`; insert into t1 values( 111 )
-master-bin.000001 26664 Query 1 26755 use `test`; insert into t1 values( 110 )
-master-bin.000001 26755 Query 1 26846 use `test`; insert into t1 values( 109 )
-master-bin.000001 26846 Query 1 26937 use `test`; insert into t1 values( 108 )
-master-bin.000001 26937 Query 1 27028 use `test`; insert into t1 values( 107 )
-master-bin.000001 27028 Query 1 27119 use `test`; insert into t1 values( 106 )
-master-bin.000001 27119 Query 1 27210 use `test`; insert into t1 values( 105 )
-master-bin.000001 27210 Query 1 27301 use `test`; insert into t1 values( 104 )
-master-bin.000001 27301 Query 1 27392 use `test`; insert into t1 values( 103 )
-master-bin.000001 27392 Query 1 27483 use `test`; insert into t1 values( 102 )
-master-bin.000001 27483 Query 1 27574 use `test`; insert into t1 values( 101 )
-master-bin.000001 27574 Query 1 27665 use `test`; insert into t1 values( 100 )
-master-bin.000001 27665 Query 1 27755 use `test`; insert into t1 values( 99 )
-master-bin.000001 27755 Query 1 27845 use `test`; insert into t1 values( 98 )
-master-bin.000001 27845 Query 1 27935 use `test`; insert into t1 values( 97 )
-master-bin.000001 27935 Query 1 28025 use `test`; insert into t1 values( 96 )
-master-bin.000001 28025 Query 1 28115 use `test`; insert into t1 values( 95 )
-master-bin.000001 28115 Query 1 28205 use `test`; insert into t1 values( 94 )
-master-bin.000001 28205 Query 1 28295 use `test`; insert into t1 values( 93 )
-master-bin.000001 28295 Query 1 28385 use `test`; insert into t1 values( 92 )
-master-bin.000001 28385 Query 1 28475 use `test`; insert into t1 values( 91 )
-master-bin.000001 28475 Query 1 28565 use `test`; insert into t1 values( 90 )
-master-bin.000001 28565 Query 1 28655 use `test`; insert into t1 values( 89 )
-master-bin.000001 28655 Query 1 28745 use `test`; insert into t1 values( 88 )
-master-bin.000001 28745 Query 1 28835 use `test`; insert into t1 values( 87 )
-master-bin.000001 28835 Query 1 28925 use `test`; insert into t1 values( 86 )
-master-bin.000001 28925 Query 1 29015 use `test`; insert into t1 values( 85 )
-master-bin.000001 29015 Query 1 29105 use `test`; insert into t1 values( 84 )
-master-bin.000001 29105 Query 1 29195 use `test`; insert into t1 values( 83 )
-master-bin.000001 29195 Query 1 29285 use `test`; insert into t1 values( 82 )
-master-bin.000001 29285 Query 1 29375 use `test`; insert into t1 values( 81 )
-master-bin.000001 29375 Query 1 29465 use `test`; insert into t1 values( 80 )
-master-bin.000001 29465 Query 1 29555 use `test`; insert into t1 values( 79 )
-master-bin.000001 29555 Query 1 29645 use `test`; insert into t1 values( 78 )
-master-bin.000001 29645 Query 1 29735 use `test`; insert into t1 values( 77 )
-master-bin.000001 29735 Query 1 29825 use `test`; insert into t1 values( 76 )
-master-bin.000001 29825 Query 1 29915 use `test`; insert into t1 values( 75 )
-master-bin.000001 29915 Query 1 30005 use `test`; insert into t1 values( 74 )
-master-bin.000001 30005 Query 1 30095 use `test`; insert into t1 values( 73 )
-master-bin.000001 30095 Query 1 30185 use `test`; insert into t1 values( 72 )
-master-bin.000001 30185 Query 1 30275 use `test`; insert into t1 values( 71 )
-master-bin.000001 30275 Query 1 30365 use `test`; insert into t1 values( 70 )
-master-bin.000001 30365 Query 1 30455 use `test`; insert into t1 values( 69 )
-master-bin.000001 30455 Query 1 30545 use `test`; insert into t1 values( 68 )
-master-bin.000001 30545 Query 1 30635 use `test`; insert into t1 values( 67 )
-master-bin.000001 30635 Query 1 30725 use `test`; insert into t1 values( 66 )
-master-bin.000001 30725 Query 1 30815 use `test`; insert into t1 values( 65 )
-master-bin.000001 30815 Query 1 30905 use `test`; insert into t1 values( 64 )
-master-bin.000001 30905 Query 1 30995 use `test`; insert into t1 values( 63 )
-master-bin.000001 30995 Query 1 31085 use `test`; insert into t1 values( 62 )
-master-bin.000001 31085 Query 1 31175 use `test`; insert into t1 values( 61 )
-master-bin.000001 31175 Query 1 31265 use `test`; insert into t1 values( 60 )
-master-bin.000001 31265 Query 1 31355 use `test`; insert into t1 values( 59 )
-master-bin.000001 31355 Query 1 31445 use `test`; insert into t1 values( 58 )
-master-bin.000001 31445 Query 1 31535 use `test`; insert into t1 values( 57 )
-master-bin.000001 31535 Query 1 31625 use `test`; insert into t1 values( 56 )
-master-bin.000001 31625 Query 1 31715 use `test`; insert into t1 values( 55 )
-master-bin.000001 31715 Query 1 31805 use `test`; insert into t1 values( 54 )
-master-bin.000001 31805 Query 1 31895 use `test`; insert into t1 values( 53 )
-master-bin.000001 31895 Query 1 31985 use `test`; insert into t1 values( 52 )
-master-bin.000001 31985 Query 1 32075 use `test`; insert into t1 values( 51 )
-master-bin.000001 32075 Query 1 32165 use `test`; insert into t1 values( 50 )
-master-bin.000001 32165 Query 1 32255 use `test`; insert into t1 values( 49 )
-master-bin.000001 32255 Query 1 32345 use `test`; insert into t1 values( 48 )
-master-bin.000001 32345 Query 1 32435 use `test`; insert into t1 values( 47 )
-master-bin.000001 32435 Query 1 32525 use `test`; insert into t1 values( 46 )
-master-bin.000001 32525 Query 1 32615 use `test`; insert into t1 values( 45 )
-master-bin.000001 32615 Query 1 32705 use `test`; insert into t1 values( 44 )
-master-bin.000001 32705 Query 1 32795 use `test`; insert into t1 values( 43 )
-master-bin.000001 32795 Query 1 32885 use `test`; insert into t1 values( 42 )
-master-bin.000001 32885 Query 1 32975 use `test`; insert into t1 values( 41 )
-master-bin.000001 32975 Query 1 33065 use `test`; insert into t1 values( 40 )
-master-bin.000001 33065 Query 1 33155 use `test`; insert into t1 values( 39 )
-master-bin.000001 33155 Query 1 33245 use `test`; insert into t1 values( 38 )
-master-bin.000001 33245 Query 1 33335 use `test`; insert into t1 values( 37 )
-master-bin.000001 33335 Query 1 33425 use `test`; insert into t1 values( 36 )
-master-bin.000001 33425 Query 1 33515 use `test`; insert into t1 values( 35 )
-master-bin.000001 33515 Query 1 33605 use `test`; insert into t1 values( 34 )
-master-bin.000001 33605 Query 1 33695 use `test`; insert into t1 values( 33 )
-master-bin.000001 33695 Query 1 33785 use `test`; insert into t1 values( 32 )
-master-bin.000001 33785 Query 1 33875 use `test`; insert into t1 values( 31 )
-master-bin.000001 33875 Query 1 33965 use `test`; insert into t1 values( 30 )
-master-bin.000001 33965 Query 1 34055 use `test`; insert into t1 values( 29 )
-master-bin.000001 34055 Query 1 34145 use `test`; insert into t1 values( 28 )
-master-bin.000001 34145 Query 1 34235 use `test`; insert into t1 values( 27 )
-master-bin.000001 34235 Query 1 34325 use `test`; insert into t1 values( 26 )
-master-bin.000001 34325 Query 1 34415 use `test`; insert into t1 values( 25 )
-master-bin.000001 34415 Query 1 34505 use `test`; insert into t1 values( 24 )
-master-bin.000001 34505 Query 1 34595 use `test`; insert into t1 values( 23 )
-master-bin.000001 34595 Query 1 34685 use `test`; insert into t1 values( 22 )
-master-bin.000001 34685 Query 1 34775 use `test`; insert into t1 values( 21 )
-master-bin.000001 34775 Query 1 34865 use `test`; insert into t1 values( 20 )
-master-bin.000001 34865 Query 1 34955 use `test`; insert into t1 values( 19 )
-master-bin.000001 34955 Query 1 35045 use `test`; insert into t1 values( 18 )
-master-bin.000001 35045 Query 1 35135 use `test`; insert into t1 values( 17 )
-master-bin.000001 35135 Query 1 35225 use `test`; insert into t1 values( 16 )
-master-bin.000001 35225 Query 1 35315 use `test`; insert into t1 values( 15 )
-master-bin.000001 35315 Query 1 35405 use `test`; insert into t1 values( 14 )
-master-bin.000001 35405 Query 1 35495 use `test`; insert into t1 values( 13 )
-master-bin.000001 35495 Query 1 35585 use `test`; insert into t1 values( 12 )
-master-bin.000001 35585 Query 1 35675 use `test`; insert into t1 values( 11 )
-master-bin.000001 35675 Query 1 35765 use `test`; insert into t1 values( 10 )
-master-bin.000001 35765 Query 1 35854 use `test`; insert into t1 values( 9 )
-master-bin.000001 35854 Query 1 35943 use `test`; insert into t1 values( 8 )
-master-bin.000001 35943 Query 1 36032 use `test`; insert into t1 values( 7 )
-master-bin.000001 36032 Query 1 36121 use `test`; insert into t1 values( 6 )
-master-bin.000001 36121 Query 1 36210 use `test`; insert into t1 values( 5 )
-master-bin.000001 36210 Query 1 36299 use `test`; insert into t1 values( 4 )
-master-bin.000001 36299 Query 1 36388 use `test`; insert into t1 values( 3 )
-master-bin.000001 36388 Query 1 36477 use `test`; insert into t1 values( 2 )
-master-bin.000001 36477 Query 1 36566 use `test`; insert into t1 values( 1 )
-master-bin.000001 36566 Xid 1 36593 COMMIT /* XID */
-master-bin.000001 36593 Rotate 1 36637 master-bin.000002;pos=4
+master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=innodb
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; insert into t1 values( 400 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 399 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 398 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 397 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 396 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 395 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 394 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 393 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 392 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 391 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 390 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 389 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 388 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 387 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 386 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 385 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 384 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 383 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 382 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 381 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 380 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 379 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 378 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 377 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 376 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 375 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 374 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 373 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 372 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 371 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 370 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 369 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 368 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 367 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 366 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 365 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 364 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 363 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 362 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 361 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 360 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 359 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 358 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 357 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 356 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 355 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 354 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 353 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 352 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 351 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 350 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 349 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 348 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 347 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 346 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 345 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 344 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 343 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 342 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 341 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 340 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 339 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 338 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 337 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 336 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 335 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 334 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 333 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 332 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 331 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 330 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 329 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 328 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 327 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 326 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 325 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 324 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 323 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 322 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 321 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 320 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 319 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 318 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 317 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 316 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 315 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 314 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 313 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 312 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 311 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 310 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 309 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 308 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 307 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 306 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 305 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 304 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 303 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 302 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 301 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 300 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 299 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 298 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 297 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 296 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 295 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 294 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 293 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 292 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 291 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 290 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 289 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 288 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 287 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 286 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 285 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 284 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 283 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 282 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 281 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 280 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 279 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 278 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 277 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 276 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 275 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 274 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 273 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 272 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 271 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 270 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 269 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 268 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 267 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 266 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 265 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 264 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 263 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 262 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 261 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 260 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 259 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 258 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 257 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 256 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 255 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 254 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 253 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 252 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 251 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 250 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 249 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 248 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 247 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 246 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 245 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 244 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 243 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 242 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 241 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 240 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 239 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 238 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 237 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 236 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 235 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 234 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 233 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 232 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 231 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 230 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 229 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 228 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 227 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 226 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 225 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 224 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 223 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 222 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 221 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 220 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 219 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 218 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 217 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 216 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 215 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 214 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 213 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 212 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 211 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 210 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 209 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 208 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 207 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 206 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 205 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 204 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 203 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 202 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 201 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 200 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 199 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 198 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 197 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 196 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 195 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 194 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 193 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 192 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 191 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 190 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 189 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 188 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 187 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 186 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 185 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 184 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 183 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 182 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 181 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 180 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 179 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 178 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 177 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 176 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 175 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 174 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 173 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 172 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 171 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 170 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 169 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 168 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 167 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 166 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 165 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 164 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 163 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 162 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 161 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 160 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 159 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 158 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 157 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 156 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 155 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 154 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 153 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 152 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 151 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 150 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 149 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 148 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 147 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 146 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 145 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 144 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 143 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 142 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 141 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 140 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 139 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 138 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 137 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 136 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 135 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 134 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 133 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 132 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 131 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 130 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 129 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 128 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 127 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 126 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 125 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 124 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 123 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 122 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 121 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 120 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 119 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 118 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 117 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 116 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 115 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 114 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 113 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 112 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 111 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 110 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 109 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 108 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 107 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( <binlog_start> )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 105 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 104 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 103 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 102 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 101 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 100 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 99 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 98 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 97 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 96 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 95 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 94 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 93 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 92 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 91 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 90 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 89 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 88 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 87 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 86 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 85 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 84 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 83 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 82 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 81 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 80 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 79 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 78 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 77 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 76 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 75 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 74 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 73 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 72 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 71 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 70 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 69 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 68 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 67 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 66 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 65 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 64 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 63 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 62 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 61 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 60 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 59 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 58 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 57 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 56 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 55 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 54 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 53 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 52 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 51 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 50 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 49 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 48 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 47 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 46 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 45 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 44 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 43 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 42 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 41 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 40 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 39 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 38 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 37 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 36 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 35 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 34 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 33 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 32 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 31 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 30 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 29 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 28 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 27 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 26 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 25 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 24 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 23 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 22 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 21 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 20 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 19 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 18 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 17 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 16 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 15 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 14 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 13 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 12 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 11 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 10 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 9 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 8 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 7 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 6 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 5 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 4 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 3 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 2 )
+master-bin.000001 # Query # # use `test`; insert into t1 values( 1 )
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Rotate # # master-bin.000002;pos=4
drop table t1;
set global binlog_cache_size=@bcs;
set session autocommit = @ac;
@@ -590,12 +587,11 @@ set @b= 14632475938453979136;
execute stmt using @a, @b;
deallocate prepare stmt;
drop table t1;
-show binlog events from 0;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4
-master-bin.000001 106 Query 1 227 use `test`; create table t1 (a bigint unsigned, b bigint(20) unsigned)
-master-bin.000001 227 Query 1 351 use `test`; insert into t1 values (9999999999999999,14632475938453979136)
-master-bin.000001 351 Query 1 427 use `test`; drop table t1
+master-bin.000001 # Query # # use `test`; create table t1 (a bigint unsigned, b bigint(20) unsigned)
+master-bin.000001 # Query # # use `test`; insert into t1 values (9999999999999999,14632475938453979136)
+master-bin.000001 # Query # # use `test`; drop table t1
reset master;
CREATE DATABASE bug39182 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
USE bug39182;
@@ -766,14 +762,14 @@ drop table if exists t3;
create table t3 (a int(11) NOT NULL AUTO_INCREMENT, b text, PRIMARY KEY (a) ) engine=innodb;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000001 346
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
insert into t3(b) values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
-show master status /* must show new binlog index after rotating */;
+show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000002 106
+master-bin.000002 # <Binlog_Do_DB> <Binlog_Ignore_DB>
drop table t3;
#
# Bug #45998: database crashes when running "create as select"
diff --git a/mysql-test/suite/binlog/r/binlog_stm_blackhole.result b/mysql-test/suite/binlog/r/binlog_stm_blackhole.result
index b2e6ac854cf..a47ab2ce932 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_blackhole.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_blackhole.result
@@ -104,9 +104,8 @@ select * from t2;
a
select * from t3;
a
-show binlog events;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Format_desc # # Server ver: VERSION, Binlog ver: 4
master-bin.000001 # Query # # use `test`; drop table t1,t2
master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=blackhole
master-bin.000001 # Query # # BEGIN
@@ -126,7 +125,7 @@ master-bin.000001 # Query # # use `test`; replace into t1 values(100)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; create table t2 (a varchar(200)) engine=blackhole
master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=581
+master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t2` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) ;file_id=#
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; alter table t1 add b int
@@ -163,13 +162,6 @@ start transaction;
insert into t1 values(2);
rollback;
set autocommit=1;
-show binlog events;
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Format_desc # # Server ver: VERSION, Binlog ver: 4
-master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=blackhole
-master-bin.000001 # Query # # BEGIN
-master-bin.000001 # Query # # use `test`; insert into t1 values(1)
-master-bin.000001 # Query # # COMMIT
drop table if exists t1;
reset master;
create table t1 (a int auto_increment, primary key (a)) engine=blackhole;
diff --git a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
index 75094ca3b4c..a26fcc1dc1a 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
@@ -364,6 +364,9 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (10,10)
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO t2 values (100,100)
master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO t2 values (101,101)
+master-bin.000001 # Query # # ROLLBACK
master-bin.000001 # Query # # use `test`; DROP TABLE t1,t2
reset master;
create table t1 (a int) engine=innodb;
@@ -802,7 +805,7 @@ delete from t4;
insert into t3 values (1,1),(2,2);
insert into t4 values (1,1),(2,2);
reset master;
-UPDATE t3,t4 SET t3.a=t4.a + bug27417(1);
+UPDATE t3,t4 SET t3.a = t4.a + bug27417(1) where t3.a = 1;
ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
select count(*) from t1 /* must be 1 */;
count(*)
diff --git a/mysql-test/suite/binlog/t/binlog_base64_flag.test b/mysql-test/suite/binlog/t/binlog_base64_flag.test
index e6271ec6ccc..3f1e4e98bec 100644
--- a/mysql-test/suite/binlog/t/binlog_base64_flag.test
+++ b/mysql-test/suite/binlog/t/binlog_base64_flag.test
@@ -150,3 +150,16 @@ iONkSBcBAAAAKwAAAMQBAAAQABAAAAAAAAEAA//4AQAAAAMAMTIzAQAAAA==
';
drop table t1, char63_utf8, char128_utf8;
+
+
+--echo #
+--echo # Bug #54393: crash and/or valgrind errors in
+--echo # mysql_client_binlog_statement
+--echo #
+--error ER_SYNTAX_ERROR
+BINLOG '';
+BINLOG '123';
+--error ER_SYNTAX_ERROR
+BINLOG '-2079193929';
+--error ER_SYNTAX_ERROR
+BINLOG 'xç↓%~∙D╒ƒ╡';
diff --git a/mysql-test/suite/binlog/t/binlog_innodb.test b/mysql-test/suite/binlog/t/binlog_innodb.test
index f84fd65226a..2914cd1dcc5 100644
--- a/mysql-test/suite/binlog/t/binlog_innodb.test
+++ b/mysql-test/suite/binlog/t/binlog_innodb.test
@@ -155,7 +155,8 @@ reset master;
UPDATE t2,t1 SET t2.a=t1.a+2;
# check
select * from t2 /* must be (3,1), (4,4) */;
-show master status /* there must no UPDATE in binlog */;
+--echo # There must no UPDATE in binlog;
+source include/show_binlog_events.inc;
# B. testing multi_update::send_error() execution branch
delete from t1;
@@ -165,7 +166,8 @@ insert into t2 values (1,2),(3,4),(4,4);
reset master;
--error ER_DUP_ENTRY
UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a;
-show master status /* there must be no UPDATE query event */;
+--echo # There must be no UPDATE query event;
+source include/show_binlog_events.inc;
# cleanup bug#27716
drop table t1, t2;
diff --git a/mysql-test/suite/binlog/t/binlog_killed.test b/mysql-test/suite/binlog/t/binlog_killed.test
index ce6d344af32..e2db326129d 100644
--- a/mysql-test/suite/binlog/t/binlog_killed.test
+++ b/mysql-test/suite/binlog/t/binlog_killed.test
@@ -202,7 +202,7 @@ eval kill query $ID;
rollback;
connection con2;
---error 0,ER_QUERY_INTERRUPTED,ER_LOCK_WAIT_TIMEOUT
+--error 0,ER_QUERY_INTERRUPTED
reap;
# todo 1,2 above
rollback;
diff --git a/mysql-test/suite/binlog/t/binlog_stm_binlog.test b/mysql-test/suite/binlog/t/binlog_stm_binlog.test
index a8afe4d3b8c..f5257f21434 100644
--- a/mysql-test/suite/binlog/t/binlog_stm_binlog.test
+++ b/mysql-test/suite/binlog/t/binlog_stm_binlog.test
@@ -12,8 +12,7 @@ create table t1 (a int, b int) engine=innodb;
begin;
insert into t1 values (1,2);
commit;
---replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
-show binlog events;
+source include/show_binlog_events.inc;
drop table t1;
# This is a wrapper for binlog.test so that the same test case can be used
diff --git a/mysql-test/suite/bugs/r/rpl_bug12691.result b/mysql-test/suite/bugs/r/rpl_bug12691.result
index 69d5e8009b0..8feeb0effc3 100644
--- a/mysql-test/suite/bugs/r/rpl_bug12691.result
+++ b/mysql-test/suite/bugs/r/rpl_bug12691.result
@@ -16,12 +16,11 @@ LOAD DATA INFILE FILENAME
SELECT COUNT(*) FROM t1;
COUNT(*)
3
-SHOW BINLOG EVENTS;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Format_desc 1 # Server ver: #
-master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (b CHAR(10))
-master-bin.000001 # Begin_load_query 1 # ;file_id=#;block_len=#
-master-bin.000001 # Execute_load_query 1 # use `test`; LOAD DATA INFILE FILENAME ;file_id=#
+master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (b CHAR(10))
+master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
+master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/rpl_bug12691.dat' INTO TABLE `t1` FIELDS TERMINATED BY '|' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`b`) ;file_id=#
**** On Slave ****
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
diff --git a/mysql-test/suite/bugs/r/rpl_bug36391.result b/mysql-test/suite/bugs/r/rpl_bug36391.result
index 2d62837a87a..33175d89d30 100644
--- a/mysql-test/suite/bugs/r/rpl_bug36391.result
+++ b/mysql-test/suite/bugs/r/rpl_bug36391.result
@@ -13,5 +13,6 @@ Tables_in_test
t1
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000001 278
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
flush logs;
+drop table t1;
diff --git a/mysql-test/suite/bugs/t/rpl_bug12691.test b/mysql-test/suite/bugs/t/rpl_bug12691.test
index b29c85584a5..28d7f16935e 100644
--- a/mysql-test/suite/bugs/t/rpl_bug12691.test
+++ b/mysql-test/suite/bugs/t/rpl_bug12691.test
@@ -28,9 +28,7 @@ STOP SLAVE;
SELECT COUNT(*) FROM t1;
---replace_column 2 # 5 #
---replace_regex /Server ver: .+/Server ver: #/ /table_id: [0-9]+/table_id: #/ /COMMIT.+xid=[0-9]+.+/#/ /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/ /'.+'/FILENAME/
-SHOW BINLOG EVENTS;
+source include/show_binlog_events.inc;
--save_master_pos
diff --git a/mysql-test/suite/bugs/t/rpl_bug36391.test b/mysql-test/suite/bugs/t/rpl_bug36391.test
index 9f384304837..8bca9a46c5a 100644
--- a/mysql-test/suite/bugs/t/rpl_bug36391.test
+++ b/mysql-test/suite/bugs/t/rpl_bug36391.test
@@ -21,8 +21,10 @@ create table t1(id int);
show tables;
-show master status;
+--source include/show_master_status.inc
flush logs;
--exec $MYSQL_BINLOG $MYSQL_TEST_DIR/var/log/master-bin.000001 | $MYSQL test
+
+drop table t1;
diff --git a/mysql-test/suite/engines/funcs/r/rpl_000015.result b/mysql-test/suite/engines/funcs/r/rpl_000015.result
index eee3b505ad6..8cd48141127 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_000015.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_000015.result
@@ -10,166 +10,25 @@ File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 106
stop slave;
reset slave;
-show slave status;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry #
Master_Log_File
Read_Master_Log_Pos 4
-Relay_Log_File #
-Relay_Log_Pos #
Relay_Master_Log_File
-Slave_IO_Running No
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
Exec_Master_Log_Pos 0
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
-Last_IO_Error
-Last_SQL_Errno 0
-Last_SQL_Error
change master to master_host='127.0.0.1';
-show slave status;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry #
Master_Log_File
Read_Master_Log_Pos 4
-Relay_Log_File #
-Relay_Log_Pos #
Relay_Master_Log_File
-Slave_IO_Running No
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
Exec_Master_Log_Pos 0
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
-Last_IO_Error
-Last_SQL_Errno 0
-Last_SQL_Error
change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=MASTER_PORT;
-show slave status;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry #
Master_Log_File
Read_Master_Log_Pos 4
-Relay_Log_File #
-Relay_Log_Pos #
Relay_Master_Log_File
-Slave_IO_Running No
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
Exec_Master_Log_Pos 0
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
-Last_IO_Error
-Last_SQL_Errno 0
-Last_SQL_Error
start slave;
-show slave status;
-Slave_IO_State Waiting for master to send event
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
Master_Log_File master-bin.000001
-Read_Master_Log_Pos 106
-Relay_Log_File slave-relay-bin.000002
-Relay_Log_Pos 252
Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos 106
-Relay_Log_Space 407
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
-Last_IO_Error
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
drop table if exists t1;
create table t1 (n int, PRIMARY KEY(n));
insert into t1 values (10),(45),(90);
diff --git a/mysql-test/suite/engines/funcs/r/rpl_REDIRECT.result b/mysql-test/suite/engines/funcs/r/rpl_REDIRECT.result
index 7a901b65810..b6cb2c0e7de 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_REDIRECT.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_REDIRECT.result
@@ -4,8 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
-SHOW SLAVE STATUS;
-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
+SHOW SLAVE STATUS;;
SHOW SLAVE HOSTS;
Server_id Host Port Rpl_recovery_rank Master_id
2 127.0.0.1 SLAVE_PORT 0 1
diff --git a/mysql-test/suite/engines/funcs/r/rpl_change_master.result b/mysql-test/suite/engines/funcs/r/rpl_change_master.result
index 62c5ffdd4f8..2258a35a869 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_change_master.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_change_master.result
@@ -11,13 +11,7 @@ stop slave sql_thread;
insert into t1 values(1);
insert into t1 values(2);
stop slave;
-show slave status;
-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
-# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 191 # None 0 No # No 0 0
change master to master_user='root';
-show slave status;
-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
-# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 191 # None 0 No # No 0 0
start slave;
select * from t1;
n
diff --git a/mysql-test/suite/engines/funcs/r/rpl_empty_master_crash.result b/mysql-test/suite/engines/funcs/r/rpl_empty_master_crash.result
index b5e14d3adac..f71411c68dd 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_empty_master_crash.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_empty_master_crash.result
@@ -4,8 +4,6 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
-show slave status;
-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
load table t1 from master;
ERROR 08S01: Error connecting to master: Master is not configured
load table t1 from master;
diff --git a/mysql-test/suite/engines/funcs/r/rpl_flushlog_loop.result b/mysql-test/suite/engines/funcs/r/rpl_flushlog_loop.result
index c894ad0135b..ef4d7797dbf 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_flushlog_loop.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_flushlog_loop.result
@@ -17,43 +17,6 @@ let $result_pattern= '%127.0.0.1%root%slave-bin.000001%slave-bin.000001%Yes%Yes%
--source include/wait_slave_status.inc
flush logs;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port SLAVE_PORT
-Connect_Retry 60
-Master_Log_File slave-bin.000001
-Read_Master_Log_Pos 106
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File slave-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos 106
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
-Last_IO_Error
-Last_SQL_Errno 0
-Last_SQL_Error
+Relay_Log_File mysqld-relay-bin.000003
+Checking that both slave threads are running.
STOP SLAVE;
diff --git a/mysql-test/suite/engines/funcs/r/rpl_loaddata_s.result b/mysql-test/suite/engines/funcs/r/rpl_loaddata_s.result
index d858ced1352..779a3af9631 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_loaddata_s.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_loaddata_s.result
@@ -10,6 +10,6 @@ load data infile '../../std_data/rpl_loaddata.dat' into table test.t1;
select count(*) from test.t1;
count(*)
2
-show binlog events from 106;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
drop table test.t1;
diff --git a/mysql-test/suite/engines/funcs/r/rpl_log_pos.result b/mysql-test/suite/engines/funcs/r/rpl_log_pos.result
index f26f4350cf1..1b2ded26f66 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_log_pos.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_log_pos.result
@@ -4,39 +4,23 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
-show master status;
-File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000001 106 <Binlog_Ignore_DB>
-show slave status;
-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
-# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes 0 0 106 # None 0 No # No 0 0
stop slave;
-change master to master_log_pos=106;
+change master to master_log_pos=MASTER_LOG_POS;
start slave;
stop slave;
-change master to master_log_pos=106;
-show slave status;
-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
-# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 No No 0 0 106 # None 0 No # No 0 0
+change master to master_log_pos=MASTER_LOG_POS;
start slave;
-show slave status;
-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
-# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 106 # # master-bin.000001 Yes Yes 0 0 106 # None 0 No # No 0 0
stop slave;
-change master to master_log_pos=177;
+# impossible position leads to an error
+change master to master_log_pos=MASTER_LOG_POS;
start slave;
-show slave status;
-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
-# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 177 # # master-bin.000001 No Yes 0 0 177 # None 0 No # No 1236 Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position' 0
-show master status;
-File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000001 106 <Binlog_Ignore_DB>
+Last_IO_Error = Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position'
create table if not exists t1 (n int);
drop table if exists t1;
create table t1 (n int);
insert into t1 values (1),(2),(3);
stop slave;
-change master to master_log_pos=206;
+change master to master_log_pos=MASTER_LOG_POS;
start slave;
select * from t1 ORDER BY n;
n
diff --git a/mysql-test/suite/engines/funcs/r/rpl_rbr_to_sbr.result b/mysql-test/suite/engines/funcs/r/rpl_rbr_to_sbr.result
index b4b04d35208..ced1693bdc8 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_rbr_to_sbr.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_rbr_to_sbr.result
@@ -14,47 +14,16 @@ MIXED MIXED
CREATE TABLE t1 (a INT, b LONG);
INSERT INTO t1 VALUES (1,1), (2,2);
INSERT INTO t1 VALUES (3,UUID()), (4,UUID());
-SHOW BINLOG EVENTS;
+show binlog events from <binlog_start>;
**** On Slave ****
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
-Last_IO_Error
-Last_SQL_Errno 0
-Last_SQL_Error
-SHOW BINLOG EVENTS;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG)
+slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
+slave-bin.000001 # Query # # BEGIN
+slave-bin.000001 # Table_map # # table_id: # (test.t1)
+slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+slave-bin.000001 # Query # # COMMIT
+show binlog events from <binlog_start>;
DROP TABLE IF EXISTS t1;
SET GLOBAL BINLOG_FORMAT=@saved_binlog_format;
diff --git a/mysql-test/suite/engines/funcs/r/rpl_row_drop.result b/mysql-test/suite/engines/funcs/r/rpl_row_drop.result
index 89654ebf165..048e07271b3 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_row_drop.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_row_drop.result
@@ -41,12 +41,11 @@ t1
t2
**** On Master ****
DROP TABLE t1,t2;
-SHOW BINLOG EVENTS;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 4 Format_desc 1 106 Server ver: VERSION, Binlog ver: 4
-master-bin.000001 106 Query 1 192 use `test`; CREATE TABLE t1 (a int)
-master-bin.000001 192 Query 1 278 use `test`; CREATE TABLE t2 (a int)
-master-bin.000001 278 Query 1 382 use `test`; DROP TABLE `t1` /* generated by server */
+master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a int)
+master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a int)
+master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
SHOW TABLES;
Tables_in_test
t2
diff --git a/mysql-test/suite/engines/funcs/r/rpl_row_inexist_tbl.result b/mysql-test/suite/engines/funcs/r/rpl_row_inexist_tbl.result
index ad192b530a7..cd7528280d0 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_row_inexist_tbl.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_row_inexist_tbl.result
@@ -17,43 +17,5 @@ a
0
drop table t1;
insert into t1 values (1);
-show slave status;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_MYPORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table test.t2
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1146
-Last_Error Error 'Table 'test.t1' doesn't exist' on opening tables
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
-Last_IO_Error
-Last_SQL_Errno 1146
-Last_SQL_Error Error 'Table 'test.t1' doesn't exist' on opening tables
+Last_SQL_Error = Error 'Table 'test.t1' doesn't exist' on opening tables
drop table t1, t2;
diff --git a/mysql-test/suite/engines/funcs/r/rpl_row_max_relay_size.result b/mysql-test/suite/engines/funcs/r/rpl_row_max_relay_size.result
index 6ef88c23726..c0f7ddabec7 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_row_max_relay_size.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_row_max_relay_size.result
@@ -24,45 +24,7 @@ select @@global.max_relay_log_size;
@@global.max_relay_log_size
4096
start slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
#
# Test 2
#
@@ -72,45 +34,7 @@ set global max_relay_log_size=(5*4096);
select @@global.max_relay_log_size;
@@global.max_relay_log_size 20480
start slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
#
# Test 3: max_relay_log_size = 0
#
@@ -120,90 +44,13 @@ set global max_relay_log_size=0;
select @@global.max_relay_log_size;
@@global.max_relay_log_size 0
start slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
#
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
#
stop slave;
reset slave;
flush logs;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File
-Slave_IO_Running No
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
#
# Test 5
#
@@ -211,89 +58,13 @@ reset slave;
start slave;
flush logs;
create table t1 (a int);
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
#
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
#
flush logs;
drop table t1;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
flush logs;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
diff --git a/mysql-test/suite/engines/funcs/r/rpl_row_reset_slave.result b/mysql-test/suite/engines/funcs/r/rpl_row_reset_slave.result
index fa40d8760a8..7bf09df31ca 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_row_reset_slave.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_row_reset_slave.result
@@ -4,196 +4,37 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-stop slave;
-change master to master_user='test';
-SHOW SLAVE STATUS;
-Slave_IO_State #
Master_Host 127.0.0.1
+include/stop_slave.inc
+change master to master_user='test';
Master_User test
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running No
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-reset slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
Master_Host 127.0.0.1
+reset slave;
Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File
-Slave_IO_Running No
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-start slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
Master_Host 127.0.0.1
+include/start_slave.inc
Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-stop slave;
+Master_Host 127.0.0.1
+include/stop_slave.inc
reset slave;
-start slave;
+include/start_slave.inc
create temporary table t1 (a int);
-stop slave;
+include/stop_slave.inc
reset slave;
-start slave;
+include/start_slave.inc
show status like 'slave_open_temp_tables';
Variable_name Value
Slave_open_temp_tables 0
-stop slave;
+include/stop_slave.inc
reset slave;
-*** errno must be zero: 0 ***
change master to master_user='impossible_user_name';
start slave;
-ONE
-1
include/stop_slave.inc
change master to master_user='root';
include/start_slave.inc
-*** last errno must be zero: 0 ***
-*** last error must be blank: ***
include/stop_slave.inc
change master to master_user='impossible_user_name';
start slave;
-ONE
-1
include/stop_slave.inc
reset slave;
-*** io last errno must be zero: 0 ***
-*** io last error must be blank: ***
-*** sql last errno must be zero: 0 ***
-*** sql last error must be blank: ***
diff --git a/mysql-test/suite/engines/funcs/r/rpl_row_until.result b/mysql-test/suite/engines/funcs/r/rpl_row_until.result
index 5091a9f6468..72dd1a6a7c3 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_row_until.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_row_until.result
@@ -12,193 +12,39 @@ create table t2(n int not null auto_increment primary key);
insert into t2 values (1),(2);
insert into t2 values (3),(4);
drop table t2;
-start slave until master_log_file='master-bin.000001', master_log_pos=311;
+start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_LOG_POS;
select * from t1;
n
1
2
3
4
-show slave status;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_MYPORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File slave-relay-bin.000004
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running #
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition Master
-Until_Log_File master-bin.000001
-Until_Log_Pos 311
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
-Last_IO_Error
-Last_SQL_Errno 0
-Last_SQL_Error
-start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
+start slave until master_log_file='master-no-such-bin.000001', master_log_pos=MASTER_LOG_POS;
select * from t1;
-n 1
-n 2
-n 3
-n 4
-show slave status;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_MYPORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File slave-relay-bin.000004
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running #
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition Master
-Until_Log_File master-no-such-bin.000001
-Until_Log_Pos 291
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
-Last_IO_Error
-Last_SQL_Errno 0
-Last_SQL_Error
-start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728;
+n
+1
+2
+3
+4
+start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=RELAY_LOG_POS;
select * from t2;
-show slave status;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_MYPORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File slave-relay-bin.000004
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running #
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition Relay
-Until_Log_File slave-relay-bin.000004
-Until_Log_Pos 728
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
-Last_IO_Error
-Last_SQL_Errno 0
-Last_SQL_Error
+n
+1
+2
start slave;
stop slave;
-start slave until master_log_file='master-bin.000001', master_log_pos=740;
-show slave status;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_MYPORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File slave-relay-bin.000004
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition Master
-Until_Log_File master-bin.000001
-Until_Log_Pos 740
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
-Last_IO_Error
-Last_SQL_Errno 0
-Last_SQL_Error
-start slave until master_log_file='master-bin', master_log_pos=561;
+start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_LOG_POS;
+start slave until master_log_file='master-bin', master_log_pos=MASTER_LOG_POS;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
-start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;
+start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_LOG_POS, relay_log_pos=RELAY_LOG_POS;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
start slave until master_log_file='master-bin.000001';
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
start slave until relay_log_file='slave-relay-bin.000002';
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
-start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561;
+start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=MASTER_LOG_POS;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
start slave sql_thread;
-start slave until master_log_file='master-bin.000001', master_log_pos=740;
+start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_LOG_POS;
Warnings:
-Level Note
-Code 1254
-Message Slave is already running
+Note 1254 Slave is already running
diff --git a/mysql-test/suite/engines/funcs/r/rpl_server_id1.result b/mysql-test/suite/engines/funcs/r/rpl_server_id1.result
index 47c2a522094..1e7108d7961 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_server_id1.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_server_id1.result
@@ -8,10 +8,8 @@ create table t1 (n int);
reset master;
stop slave;
change master to master_port=SLAVE_PORT;
-show slave status;
-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
- 127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # # 0 0 0 106 None 0 No NULL No 0 0
start slave;
+Last_IO_Error = Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it).
insert into t1 values (1);
show status like "slave_running";
Variable_name Value
diff --git a/mysql-test/suite/engines/funcs/r/rpl_server_id2.result b/mysql-test/suite/engines/funcs/r/rpl_server_id2.result
index d50814022d8..066b563c4e8 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_server_id2.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_server_id2.result
@@ -8,9 +8,6 @@ create table t1 (n int);
reset master;
stop slave;
change master to master_port=SLAVE_PORT;
-show slave status;
-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
- 127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 106 None 0 No NULL No 0 0
start slave;
insert into t1 values (1);
select * from t1;
diff --git a/mysql-test/suite/engines/funcs/r/rpl_slave_status.result b/mysql-test/suite/engines/funcs/r/rpl_slave_status.result
index dfc82f61e68..c4dc7686045 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_slave_status.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_slave_status.result
@@ -18,44 +18,5 @@ drop user rpl@127.0.0.1;
flush privileges;
stop slave;
start slave;
-show slave status;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User rpl
-Master_Port MASTER_MYPORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running No
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master NULL
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
drop table t1;
drop table t1;
diff --git a/mysql-test/suite/engines/funcs/r/rpl_stm_max_relay_size.result b/mysql-test/suite/engines/funcs/r/rpl_stm_max_relay_size.result
index 2215b34814e..db06cb6d3de 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_stm_max_relay_size.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_stm_max_relay_size.result
@@ -21,45 +21,7 @@ select @@global.max_relay_log_size;
@@global.max_relay_log_size
4096
start slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
#
# Test 2
#
@@ -69,45 +31,7 @@ set global max_relay_log_size=(5*4096);
select @@global.max_relay_log_size;
@@global.max_relay_log_size 20480
start slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
#
# Test 3: max_relay_log_size = 0
#
@@ -117,90 +41,13 @@ set global max_relay_log_size=0;
select @@global.max_relay_log_size;
@@global.max_relay_log_size 0
start slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
#
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
#
stop slave;
reset slave;
flush logs;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File
-Slave_IO_Running No
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
#
# Test 5
#
@@ -208,89 +55,13 @@ reset slave;
start slave;
flush logs;
create table t1 (a int);
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
#
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
#
flush logs;
drop table t1;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
flush logs;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
diff --git a/mysql-test/suite/engines/funcs/r/rpl_stm_reset_slave.result b/mysql-test/suite/engines/funcs/r/rpl_stm_reset_slave.result
index 78d9d7c41eb..1fc189975ef 100644
--- a/mysql-test/suite/engines/funcs/r/rpl_stm_reset_slave.result
+++ b/mysql-test/suite/engines/funcs/r/rpl_stm_reset_slave.result
@@ -4,196 +4,37 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-stop slave;
-change master to master_user='test';
-SHOW SLAVE STATUS;
-Slave_IO_State #
Master_Host 127.0.0.1
+include/stop_slave.inc
+change master to master_user='test';
Master_User test
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running No
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-reset slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
Master_Host 127.0.0.1
+reset slave;
Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File
-Slave_IO_Running No
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-start slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
Master_Host 127.0.0.1
+include/start_slave.inc
Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-stop slave;
+Master_Host 127.0.0.1
+include/stop_slave.inc
reset slave;
-start slave;
+include/start_slave.inc
create temporary table t1 (a int);
-stop slave;
+include/stop_slave.inc
reset slave;
-start slave;
+include/start_slave.inc
show status like 'slave_open_temp_tables';
Variable_name Value
Slave_open_temp_tables 1
-stop slave;
+include/stop_slave.inc
reset slave;
-*** errno must be zero: 0 ***
change master to master_user='impossible_user_name';
start slave;
-ONE
-1
include/stop_slave.inc
change master to master_user='root';
include/start_slave.inc
-*** last errno must be zero: 0 ***
-*** last error must be blank: ***
include/stop_slave.inc
change master to master_user='impossible_user_name';
start slave;
-ONE
-1
include/stop_slave.inc
reset slave;
-*** io last errno must be zero: 0 ***
-*** io last error must be blank: ***
-*** sql last errno must be zero: 0 ***
-*** sql last error must be blank: ***
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 466302000af..61d77c0dc2a 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
@@ -376,7 +376,7 @@ CREATE TABLE t12 (data LONG);
LOCK TABLES t12 WRITE;
INSERT INTO t12 VALUES(UUID());
UNLOCK TABLES;
-show binlog events;
-show binlog events;
+show binlog events from <binlog_start>;
+show binlog events from <binlog_start>;
drop database mysqltest1;
set global binlog_format= @saved_binlog_format;
diff --git a/mysql-test/suite/engines/funcs/t/rpl_000015.test b/mysql-test/suite/engines/funcs/t/rpl_000015.test
index 817ed6f407c..6c18e66a3a6 100644
--- a/mysql-test/suite/engines/funcs/t/rpl_000015.test
+++ b/mysql-test/suite/engines/funcs/t/rpl_000015.test
@@ -11,31 +11,25 @@ save_master_pos;
connection slave;
stop slave;
reset slave;
---vertical_results
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 5 # 8 # 9 # 23 # 33 #
-show slave status;
+let $status_items= Master_Log_File, Read_Master_Log_Pos, Relay_Master_Log_File, Exec_Master_Log_Pos;
+source include/show_slave_status.inc;
change master to master_host='127.0.0.1';
# The following needs to be cleaned up when change master is fixed
---vertical_results
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 5 # 8 # 9 # 23 # 33 #
-show slave status;
+source include/show_slave_status.inc;
+
--replace_result $MASTER_MYPORT MASTER_PORT
eval change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=$MASTER_MYPORT;
---vertical_results
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 5 # 8 # 9 # 23 # 33 #
-show slave status;
+source include/show_slave_status.inc;
+
start slave;
sync_with_master;
+let $status_items= Master_Log_File, Relay_Master_Log_File;
+source include/show_slave_status.inc;
+source include/check_slave_is_running.inc;
+
--vertical_results
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 5 # 8 # 9 # 23 # 33 #
---replace_column 33 #
-show slave status;
connection master;
--disable_warnings
drop table if exists t1;
diff --git a/mysql-test/suite/engines/funcs/t/rpl_REDIRECT.test b/mysql-test/suite/engines/funcs/t/rpl_REDIRECT.test
index 078d1048794..7644b18ee7e 100644
--- a/mysql-test/suite/engines/funcs/t/rpl_REDIRECT.test
+++ b/mysql-test/suite/engines/funcs/t/rpl_REDIRECT.test
@@ -7,15 +7,11 @@ source include/master-slave.inc;
--disable_ps_protocol
#first, make sure the slave has had enough time to register
-save_master_pos;
-connection slave;
-sync_with_master;
+sync_slave_with_master;
#discover slaves
connection master;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 16 # 23 # 33 #
-SHOW SLAVE STATUS;
+--query_vertical SHOW SLAVE STATUS;
--replace_result $SLAVE_MYPORT SLAVE_PORT
SHOW SLAVE HOSTS;
rpl_probe;
@@ -25,9 +21,7 @@ enable_rpl_parse;
create table t1 ( n int);
insert into t1 values (1),(2),(3),(4);
disable_rpl_parse;
-save_master_pos;
-connection slave;
-sync_with_master;
+sync_slave_with_master;
insert into t1 values(5);
connection master;
enable_rpl_parse;
diff --git a/mysql-test/suite/engines/funcs/t/rpl_change_master.test b/mysql-test/suite/engines/funcs/t/rpl_change_master.test
index c031464c95e..ce8c921c2ad 100644
--- a/mysql-test/suite/engines/funcs/t/rpl_change_master.test
+++ b/mysql-test/suite/engines/funcs/t/rpl_change_master.test
@@ -18,13 +18,26 @@ save_master_pos;
connection slave;
--real_sleep 3 # wait for I/O thread to have read updates
stop slave;
---replace_result $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 7 # 8 # 9 # 23 # 33 #
-show slave status;
+source include/wait_for_slave_to_stop.inc;
+
+let $read_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1);
+let $exec_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
+if (`SELECT $read_pos = $exec_pos`)
+{
+ source include/show_rpl_debug_info.inc;
+ echo 'Read_Master_Log_Pos: $read_pos' == 'Exec_Master_Log_Pos: $exec_pos';
+ die Failed because Read_Master_Log_Pos is equal to Exec_Master_Log_Pos;
+}
change master to master_user='root';
---replace_result $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 7 # 8 # 9 # 23 # 33 #
-show slave status;
+let $read_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1);
+let $exec_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
+if (`SELECT $read_pos <> $exec_pos`)
+{
+ source include/show_rpl_debug_info.inc;
+ echo 'Read_Master_Log_Pos: $read_pos' <> 'Exec_Master_Log_Pos: $exec_pos';
+ die Failed because Read_Master_Log_Pos is not equal to Exec_Master_Log_Pos;
+}
+
start slave;
sync_with_master;
select * from t1;
diff --git a/mysql-test/suite/engines/funcs/t/rpl_empty_master_crash.test b/mysql-test/suite/engines/funcs/t/rpl_empty_master_crash.test
index 707d1eca8c2..863b450a6d9 100644
--- a/mysql-test/suite/engines/funcs/t/rpl_empty_master_crash.test
+++ b/mysql-test/suite/engines/funcs/t/rpl_empty_master_crash.test
@@ -1,8 +1,5 @@
source include/master-slave.inc;
---replace_column 1 # 8 # 9 # 16 # 23 # 33 #
-show slave status;
-
#
# Load table should not succeed on the master as this is not a slave
#
diff --git a/mysql-test/suite/engines/funcs/t/rpl_flushlog_loop.test b/mysql-test/suite/engines/funcs/t/rpl_flushlog_loop.test
index 2e481f5e5e7..0b71817226a 100644
--- a/mysql-test/suite/engines/funcs/t/rpl_flushlog_loop.test
+++ b/mysql-test/suite/engines/funcs/t/rpl_flushlog_loop.test
@@ -41,8 +41,7 @@ sleep 5;
#
# Show status of slave
#
---replace_result $SLAVE_MYPORT SLAVE_PORT
---replace_column 1 # 8 # 9 # 16 # 23 # 33 #
---vertical_results
-SHOW SLAVE STATUS;
+--let status_items= Relay_Log_File
+--source include/show_slave_status.inc
+--source include/check_slave_is_running.inc
STOP SLAVE;
diff --git a/mysql-test/suite/engines/funcs/t/rpl_loaddata_s.test b/mysql-test/suite/engines/funcs/t/rpl_loaddata_s.test
index 791fe84420f..2dd2218eb5c 100644
--- a/mysql-test/suite/engines/funcs/t/rpl_loaddata_s.test
+++ b/mysql-test/suite/engines/funcs/t/rpl_loaddata_s.test
@@ -20,9 +20,7 @@ save_master_pos;
connection slave;
sync_with_master;
select count(*) from test.t1; # check that LOAD was replicated
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/
-show binlog events from 106; # should be nothing
+source include/show_binlog_events.inc;
# Cleanup
connection master;
diff --git a/mysql-test/suite/engines/funcs/t/rpl_log_pos.test b/mysql-test/suite/engines/funcs/t/rpl_log_pos.test
index 13083e47bcf..e07f0d5f2a7 100644
--- a/mysql-test/suite/engines/funcs/t/rpl_log_pos.test
+++ b/mysql-test/suite/engines/funcs/t/rpl_log_pos.test
@@ -11,36 +11,41 @@
# Passes with rbr no problem, removed statement include [jbm]
source include/master-slave.inc;
---replace_column 3 <Binlog_Ignore_DB>
-show master status;
+let $master_log_pos= query_get_value(SHOW MASTER STATUS, Position, 1);
sync_slave_with_master;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 23 # 33 #
-show slave status;
stop slave;
-change master to master_log_pos=106;
+
+--replace_result $master_log_pos MASTER_LOG_POS
+eval change master to master_log_pos=$master_log_pos;
start slave;
sleep 5;
stop slave;
-change master to master_log_pos=106;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 23 # 33 #
-show slave status;
+
+--replace_result $master_log_pos MASTER_LOG_POS
+eval change master to master_log_pos=$master_log_pos;
+--let $slave_param= Read_Master_Log_Pos
+--let $slave_param_value= $master_log_pos
+--source include/wait_for_slave_param.inc
+
start slave;
sleep 5;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 23 # 33 #
-show slave status;
+--let $slave_param= Read_Master_Log_Pos
+--let $slave_param_value= $master_log_pos
+--source include/wait_for_slave_param.inc
+--source include/check_slave_no_error.inc
+
stop slave;
+--echo # impossible position leads to an error
+--replace_result 177 MASTER_LOG_POS
change master to master_log_pos=177;
start slave;
sleep 2;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 23 # 33 #
-show slave status;
+let $slave_io_errno= 1236;
+let $show_slave_io_error= 1;
+source include/wait_for_slave_io_error.inc;
connection master;
---replace_column 3 <Binlog_Ignore_DB>
-show master status;
+
+let $master_log_pos= query_get_value(SHOW MASTER STATUS, Position, 1);
create table if not exists t1 (n int);
drop table if exists t1;
create table t1 (n int);
@@ -48,7 +53,9 @@ insert into t1 values (1),(2),(3);
save_master_pos;
connection slave;
stop slave;
-change master to master_log_pos=206;
+
+--replace_result $master_log_pos MASTER_LOG_POS
+eval change master to master_log_pos=$master_log_pos;
start slave;
sync_with_master;
select * from t1 ORDER BY n;
diff --git a/mysql-test/suite/engines/funcs/t/rpl_rbr_to_sbr.test b/mysql-test/suite/engines/funcs/t/rpl_rbr_to_sbr.test
index d466382dc92..c9d27d1ea6a 100644
--- a/mysql-test/suite/engines/funcs/t/rpl_rbr_to_sbr.test
+++ b/mysql-test/suite/engines/funcs/t/rpl_rbr_to_sbr.test
@@ -15,25 +15,17 @@ SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT;
CREATE TABLE t1 (a INT, b LONG);
INSERT INTO t1 VALUES (1,1), (2,2);
INSERT INTO t1 VALUES (3,UUID()), (4,UUID());
-let $VERSION=`select version()`;
---replace_result $VERSION VERSION
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/
# Different number of binlog events are generated by different engines
--disable_result_log
-SHOW BINLOG EVENTS;
+source include/show_binlog_events.inc;
--enable_result_log
sync_slave_with_master;
--echo **** On Slave ****
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 #
---query_vertical SHOW SLAVE STATUS
---replace_result $VERSION VERSION
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/
+source include/show_binlog_events.inc;
+
# Different number of binlog events are generated by different engines
--disable_result_log
-SHOW BINLOG EVENTS;
+source include/show_binlog_events.inc;
--enable_result_log
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql
--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql
diff --git a/mysql-test/suite/engines/funcs/t/rpl_row_drop.test b/mysql-test/suite/engines/funcs/t/rpl_row_drop.test
index 20c217a7c3a..d18ebc2846b 100644
--- a/mysql-test/suite/engines/funcs/t/rpl_row_drop.test
+++ b/mysql-test/suite/engines/funcs/t/rpl_row_drop.test
@@ -30,10 +30,7 @@ connection master;
--echo **** On Master ****
# Should drop the non-temporary table t1 and the temporary table t2
DROP TABLE t1,t2;
-let $VERSION=`select version()`;
---replace_result $VERSION VERSION
---replace_regex /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS;
+source include/show_binlog_events.inc;
SHOW TABLES;
sync_slave_with_master;
--echo **** On Slave ****
diff --git a/mysql-test/suite/engines/funcs/t/rpl_row_inexist_tbl.test b/mysql-test/suite/engines/funcs/t/rpl_row_inexist_tbl.test
index 736071a8ece..dca2894c9da 100644
--- a/mysql-test/suite/engines/funcs/t/rpl_row_inexist_tbl.test
+++ b/mysql-test/suite/engines/funcs/t/rpl_row_inexist_tbl.test
@@ -22,13 +22,11 @@ connection master;
insert into t1 values (1);
connection slave;
-# slave should have stopped because can't find table t1
-wait_for_slave_to_stop;
+# slave should have stopped because can't find table t1
# see if we have a good error message:
---replace_result $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 #
---vertical_results
-show slave status;
+--let $slave_sql_errno= 1146
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error.inc
# cleanup
connection master;
diff --git a/mysql-test/suite/engines/funcs/t/rpl_row_until.test b/mysql-test/suite/engines/funcs/t/rpl_row_until.test
index ccd9ce11637..b60734317c6 100644
--- a/mysql-test/suite/engines/funcs/t/rpl_row_until.test
+++ b/mysql-test/suite/engines/funcs/t/rpl_row_until.test
@@ -18,44 +18,50 @@ connection master;
# create some events on master
create table t1(n int not null auto_increment primary key);
insert into t1 values (1),(2),(3),(4);
+let $master_log_pos_1= query_get_value(SHOW MASTER STATUS, Position, 1);
drop table t1;
+
create table t2(n int not null auto_increment primary key);
insert into t2 values (1),(2);
+let $master_log_pos_2= query_get_value(SHOW MASTER STATUS, Position, 1);
insert into t2 values (3),(4);
drop table t2;
# try to replicate all queries until drop of t1
connection slave;
-start slave until master_log_file='master-bin.000001', master_log_pos=311;
+--replace_result $master_log_pos_1 MASTER_LOG_POS
+eval start slave until master_log_file='master-bin.000001', master_log_pos=$master_log_pos_1;
sleep 2;
wait_for_slave_to_stop;
# here table should be still not deleted
select * from t1;
---vertical_results
---replace_result $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 7 # 9 # 11 # 22 # 23 # 33 #
-show slave status;
+--let $slave_param= Exec_Master_Log_Pos
+--let $slave_param_value= $master_log_pos_1
+--source include/check_slave_param.inc
# this should fail right after start
+--replace_result 291 MASTER_LOG_POS
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
# again this table should be still not deleted
select * from t1;
sleep 2;
wait_for_slave_to_stop;
---vertical_results
---replace_result $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 7 # 9 # 11 # 22 # 23 # 33 #
-show slave status;
+--let $slave_param= Exec_Master_Log_Pos
+--let $slave_param_value= $master_log_pos_1
+--source include/check_slave_param.inc
# try replicate all up to and not including the second insert to t2;
-start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728;
+let $master_log_pos= $master_log_pos_2;
+let $relay_log_file= slave-relay-bin.000004;
+--source include/get_relay_log_pos.inc
+--replace_result $relay_log_pos RELAY_LOG_POS
+eval start slave until relay_log_file='$relay_log_file', relay_log_pos=$relay_log_pos;
sleep 2;
wait_for_slave_to_stop;
select * from t2;
---vertical_results
---replace_result $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 7 # 9 # 11 # 22 # 23 # 33 #
-show slave status;
+--let $slave_param= Exec_Master_Log_Pos
+--let $slave_param_value= $master_log_pos
+--source include/check_slave_param.inc
# clean up
start slave;
@@ -65,27 +71,32 @@ connection slave;
sync_with_master;
stop slave;
+--let $exec_log_pos_1= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1)
# this should stop immediately as we are already there
-start slave until master_log_file='master-bin.000001', master_log_pos=740;
+--replace_result $master_log_pos_2 MASTER_LOG_POS
+eval start slave until master_log_file='master-bin.000001', master_log_pos=$master_log_pos_2;
sleep 2;
wait_for_slave_to_stop;
# here the sql slave thread should be stopped
---vertical_results
---replace_result $MASTER_MYPORT MASTER_MYPORT bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004
---replace_column 1 # 7 # 9 # 22 # 23 # 33 #
-show slave status;
+--let $slave_param= Exec_Master_Log_Pos
+--let $slave_param_value= $exec_log_pos_1
+--source include/check_slave_param.inc
#testing various error conditions
+--replace_result 561 MASTER_LOG_POS
--error 1277
start slave until master_log_file='master-bin', master_log_pos=561;
+--replace_result 561 MASTER_LOG_POS 12 RELAY_LOG_POS
--error 1277
start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;
--error 1277
start slave until master_log_file='master-bin.000001';
--error 1277
start slave until relay_log_file='slave-relay-bin.000002';
+--replace_result 561 MASTER_LOG_POS
--error 1277
start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561;
# Warning should be given for second command
start slave sql_thread;
+--replace_result 740 MASTER_LOG_POS
start slave until master_log_file='master-bin.000001', master_log_pos=740;
diff --git a/mysql-test/suite/engines/funcs/t/rpl_server_id1.test b/mysql-test/suite/engines/funcs/t/rpl_server_id1.test
index 71310750b60..014f38d3544 100644
--- a/mysql-test/suite/engines/funcs/t/rpl_server_id1.test
+++ b/mysql-test/suite/engines/funcs/t/rpl_server_id1.test
@@ -12,10 +12,13 @@ reset master;
stop slave;
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval change master to master_port=$SLAVE_MYPORT;
---replace_result $SLAVE_MYPORT SLAVE_PORT
---replace_column 16 # 18 #
-show slave status;
+source include/check_slave_no_error.inc;
+
start slave;
+let $slave_io_errno= 1593;
+let $show_slave_io_error= 1;
+source include/wait_for_slave_io_error.inc;
+
insert into t1 values (1);
# can't MASTER_POS_WAIT(), it does not work in this weird setup
# (when slave is its own master without --replicate-same-server-id)
diff --git a/mysql-test/suite/engines/funcs/t/rpl_server_id2.test b/mysql-test/suite/engines/funcs/t/rpl_server_id2.test
index 0f2eb560d18..5b8683ecfb1 100644
--- a/mysql-test/suite/engines/funcs/t/rpl_server_id2.test
+++ b/mysql-test/suite/engines/funcs/t/rpl_server_id2.test
@@ -9,9 +9,6 @@ reset master;
stop slave;
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval change master to master_port=$SLAVE_MYPORT;
---replace_result $SLAVE_MYPORT SLAVE_PORT
---replace_column 18 #
-show slave status;
start slave;
insert into t1 values (1);
save_master_pos;
diff --git a/mysql-test/suite/engines/funcs/t/rpl_slave_status.test b/mysql-test/suite/engines/funcs/t/rpl_slave_status.test
index b3d6e49e215..cc3fbf6abee 100644
--- a/mysql-test/suite/engines/funcs/t/rpl_slave_status.test
+++ b/mysql-test/suite/engines/funcs/t/rpl_slave_status.test
@@ -22,9 +22,7 @@ drop table if exists t1;
--enable_warnings
create table t1 (n int);
insert into t1 values (1);
-save_master_pos;
-connection slave;
-sync_with_master;
+sync_slave_with_master;
select * from t1;
# 3. Delete new replication user
@@ -40,12 +38,8 @@ stop slave;
start slave;
# 5. Make sure Slave_IO_Running = No
---replace_result $MASTER_MYPORT MASTER_MYPORT
-# Column 1 is replaced, since the output can be either
-# "Connecting to master" or "Waiting for master update"
---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 35 # 36 #
---vertical_results
-show slave status;
+let $slave_io_errno= 1045;
+source include/wait_for_slave_io_error.inc;
# Cleanup (Note that slave IO thread is not running)
connection slave;
diff --git a/mysql-test/suite/engines/funcs/t/rpl_switch_stm_row_mixed.test b/mysql-test/suite/engines/funcs/t/rpl_switch_stm_row_mixed.test
index d89765fb28d..eb2e2a828f3 100644
--- a/mysql-test/suite/engines/funcs/t/rpl_switch_stm_row_mixed.test
+++ b/mysql-test/suite/engines/funcs/t/rpl_switch_stm_row_mixed.test
@@ -501,9 +501,7 @@ INSERT INTO t12 VALUES(UUID());
UNLOCK TABLES;
--disable_result_log
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/
-show binlog events;
+source include/show_binlog_events.inc;
--enable_result_log
sync_slave_with_master;
@@ -520,9 +518,7 @@ diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_
connection master;
--disable_result_log
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/
-show binlog events;
+source include/show_binlog_events.inc;
--enable_result_log
# Now test that mysqlbinlog works fine on a binlog generated by the
diff --git a/mysql-test/r/innodb-autoinc-optimize.result b/mysql-test/suite/innodb/r/innodb-autoinc-optimize.result
index c6da43555b2..c6da43555b2 100644
--- a/mysql-test/r/innodb-autoinc-optimize.result
+++ b/mysql-test/suite/innodb/r/innodb-autoinc-optimize.result
diff --git a/mysql-test/r/innodb-ucs2.result b/mysql-test/suite/innodb/r/innodb-ucs2.result
index b6bff7d5f42..b6bff7d5f42 100644
--- a/mysql-test/r/innodb-ucs2.result
+++ b/mysql-test/suite/innodb/r/innodb-ucs2.result
diff --git a/mysql-test/suite/innodb/r/innodb.result b/mysql-test/suite/innodb/r/innodb.result
new file mode 100644
index 00000000000..c6f6f352743
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb.result
@@ -0,0 +1,2353 @@
+drop table if exists t1,t2,t3,t4;
+drop database if exists mysqltest;
+create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=innodb;
+insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David'), (2, 'Erik'), (3, 'Sasha'), (3, 'Jeremy'), (4, 'Matt');
+select id, code, name from t1 order by id;
+id code name
+1 1 Tim
+2 1 Monty
+3 2 David
+4 2 Erik
+5 3 Sasha
+6 3 Jeremy
+7 4 Matt
+update ignore t1 set id = 8, name = 'Sinisa' where id < 3;
+select id, code, name from t1 order by id;
+id code name
+2 1 Monty
+3 2 David
+4 2 Erik
+5 3 Sasha
+6 3 Jeremy
+7 4 Matt
+8 1 Sinisa
+update ignore t1 set id = id + 10, name = 'Ralph' where id < 4;
+select id, code, name from t1 order by id;
+id code name
+3 2 David
+4 2 Erik
+5 3 Sasha
+6 3 Jeremy
+7 4 Matt
+8 1 Sinisa
+12 1 Ralph
+drop table t1;
+CREATE TABLE t1 (
+id int(11) NOT NULL auto_increment,
+parent_id int(11) DEFAULT '0' NOT NULL,
+level tinyint(4) DEFAULT '0' NOT NULL,
+PRIMARY KEY (id),
+KEY parent_id (parent_id),
+KEY level (level)
+) engine=innodb;
+INSERT INTO t1 VALUES (1,0,0),(3,1,1),(4,1,1),(8,2,2),(9,2,2),(17,3,2),(22,4,2),(24,4,2),(28,5,2),(29,5,2),(30,5,2),(31,6,2),(32,6,2),(33,6,2),(203,7,2),(202,7,2),(20,3,2),(157,0,0),(193,5,2),(40,7,2),(2,1,1),(15,2,2),(6,1,1),(34,6,2),(35,6,2),(16,3,2),(7,1,1),(36,7,2),(18,3,2),(26,5,2),(27,5,2),(183,4,2),(38,7,2),(25,5,2),(37,7,2),(21,4,2),(19,3,2),(5,1,1),(179,5,2);
+update t1 set parent_id=parent_id+100;
+select * from t1 where parent_id=102;
+id parent_id level
+8 102 2
+9 102 2
+15 102 2
+update t1 set id=id+1000;
+update t1 set id=1024 where id=1009;
+Got one of the listed errors
+select * from t1;
+id parent_id level
+1001 100 0
+1002 101 1
+1003 101 1
+1004 101 1
+1005 101 1
+1006 101 1
+1007 101 1
+1008 102 2
+1009 102 2
+1015 102 2
+1016 103 2
+1017 103 2
+1018 103 2
+1019 103 2
+1020 103 2
+1021 104 2
+1022 104 2
+1024 104 2
+1025 105 2
+1026 105 2
+1027 105 2
+1028 105 2
+1029 105 2
+1030 105 2
+1031 106 2
+1032 106 2
+1033 106 2
+1034 106 2
+1035 106 2
+1036 107 2
+1037 107 2
+1038 107 2
+1040 107 2
+1157 100 0
+1179 105 2
+1183 104 2
+1193 105 2
+1202 107 2
+1203 107 2
+update ignore t1 set id=id+1;
+select * from t1;
+id parent_id level
+1001 100 0
+1002 101 1
+1003 101 1
+1004 101 1
+1005 101 1
+1006 101 1
+1007 101 1
+1008 102 2
+1010 102 2
+1015 102 2
+1016 103 2
+1017 103 2
+1018 103 2
+1019 103 2
+1020 103 2
+1021 104 2
+1023 104 2
+1024 104 2
+1025 105 2
+1026 105 2
+1027 105 2
+1028 105 2
+1029 105 2
+1030 105 2
+1031 106 2
+1032 106 2
+1033 106 2
+1034 106 2
+1035 106 2
+1036 107 2
+1037 107 2
+1039 107 2
+1041 107 2
+1158 100 0
+1180 105 2
+1184 104 2
+1194 105 2
+1202 107 2
+1204 107 2
+update ignore t1 set id=1023 where id=1010;
+select * from t1 where parent_id=102;
+id parent_id level
+1008 102 2
+1010 102 2
+1015 102 2
+explain select level from t1 where level=1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref level level 1 const # Using index
+explain select level,id from t1 where level=1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref level level 1 const # Using index
+explain select level,id,parent_id from t1 where level=1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref level level 1 const #
+select level,id from t1 where level=1;
+level id
+1 1002
+1 1003
+1 1004
+1 1005
+1 1006
+1 1007
+select level,id,parent_id from t1 where level=1;
+level id parent_id
+1 1002 101
+1 1003 101
+1 1004 101
+1 1005 101
+1 1006 101
+1 1007 101
+optimize table t1;
+Table Op Msg_type Msg_text
+test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
+test.t1 optimize status OK
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 0 PRIMARY 1 id A # NULL NULL BTREE
+t1 1 parent_id 1 parent_id A # NULL NULL BTREE
+t1 1 level 1 level A # NULL NULL BTREE
+drop table t1;
+CREATE TABLE t1 (
+gesuchnr int(11) DEFAULT '0' NOT NULL,
+benutzer_id int(11) DEFAULT '0' NOT NULL,
+PRIMARY KEY (gesuchnr,benutzer_id)
+) engine=innodb;
+replace into t1 (gesuchnr,benutzer_id) values (2,1);
+replace into t1 (gesuchnr,benutzer_id) values (1,1);
+replace into t1 (gesuchnr,benutzer_id) values (1,1);
+select * from t1;
+gesuchnr benutzer_id
+1 1
+2 1
+drop table t1;
+create table t1 (a int) engine=innodb;
+insert into t1 values (1), (2);
+optimize table t1;
+Table Op Msg_type Msg_text
+test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
+test.t1 optimize status OK
+delete from t1 where a = 1;
+select * from t1;
+a
+2
+check table t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+drop table t1;
+create table t1 (a int,b varchar(20)) engine=innodb;
+insert into t1 values (1,""), (2,"testing");
+delete from t1 where a = 1;
+select * from t1;
+a b
+2 testing
+create index skr on t1 (a);
+insert into t1 values (3,""), (4,"testing");
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status OK
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 1 skr 1 a A # NULL NULL YES BTREE
+drop table t1;
+create table t1 (a int,b varchar(20),key(a)) engine=innodb;
+insert into t1 values (1,""), (2,"testing");
+select * from t1 where a = 1;
+a b
+1
+drop table t1;
+create table t1 (n int not null primary key) engine=innodb;
+set autocommit=0;
+insert into t1 values (4);
+rollback;
+select n, "after rollback" from t1;
+n after rollback
+insert into t1 values (4);
+commit;
+select n, "after commit" from t1;
+n after commit
+4 after commit
+commit;
+insert into t1 values (5);
+insert into t1 values (4);
+ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
+commit;
+select n, "after commit" from t1;
+n after commit
+4 after commit
+5 after commit
+set autocommit=1;
+insert into t1 values (6);
+insert into t1 values (4);
+ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
+select n from t1;
+n
+4
+5
+6
+set autocommit=0;
+begin;
+savepoint `my_savepoint`;
+insert into t1 values (7);
+savepoint `savept2`;
+insert into t1 values (3);
+select n from t1;
+n
+3
+4
+5
+6
+7
+savepoint savept3;
+rollback to savepoint savept2;
+rollback to savepoint savept3;
+ERROR 42000: SAVEPOINT savept3 does not exist
+rollback to savepoint savept2;
+release savepoint `my_savepoint`;
+select n from t1;
+n
+4
+5
+6
+7
+rollback to savepoint `my_savepoint`;
+ERROR 42000: SAVEPOINT my_savepoint does not exist
+rollback to savepoint savept2;
+ERROR 42000: SAVEPOINT savept2 does not exist
+insert into t1 values (8);
+savepoint sv;
+commit;
+savepoint sv;
+set autocommit=1;
+rollback;
+drop table t1;
+create table t1 (n int not null primary key) engine=innodb;
+start transaction;
+insert into t1 values (4);
+flush tables with read lock;
+commit;
+unlock tables;
+commit;
+select * from t1;
+n
+4
+drop table t1;
+create table t1 ( id int NOT NULL PRIMARY KEY, nom varchar(64)) engine=innodb;
+begin;
+insert into t1 values(1,'hamdouni');
+select id as afterbegin_id,nom as afterbegin_nom from t1;
+afterbegin_id afterbegin_nom
+1 hamdouni
+rollback;
+select id as afterrollback_id,nom as afterrollback_nom from t1;
+afterrollback_id afterrollback_nom
+set autocommit=0;
+insert into t1 values(2,'mysql');
+select id as afterautocommit0_id,nom as afterautocommit0_nom from t1;
+afterautocommit0_id afterautocommit0_nom
+2 mysql
+rollback;
+select id as afterrollback_id,nom as afterrollback_nom from t1;
+afterrollback_id afterrollback_nom
+set autocommit=1;
+drop table t1;
+CREATE TABLE t1 (id char(8) not null primary key, val int not null) engine=innodb;
+insert into t1 values ('pippo', 12);
+insert into t1 values ('pippo', 12);
+ERROR 23000: Duplicate entry 'pippo' for key 'PRIMARY'
+delete from t1;
+delete from t1 where id = 'pippo';
+select * from t1;
+id val
+insert into t1 values ('pippo', 12);
+set autocommit=0;
+delete from t1;
+rollback;
+select * from t1;
+id val
+pippo 12
+delete from t1;
+commit;
+select * from t1;
+id val
+drop table t1;
+create table t1 (a integer) engine=innodb;
+start transaction;
+rename table t1 to t2;
+create table t1 (b integer) engine=innodb;
+insert into t1 values (1);
+rollback;
+drop table t1;
+rename table t2 to t1;
+drop table t1;
+set autocommit=1;
+CREATE TABLE t1 (ID INTEGER NOT NULL PRIMARY KEY, NAME VARCHAR(64)) ENGINE=innodb;
+INSERT INTO t1 VALUES (1, 'Jochen');
+select * from t1;
+ID NAME
+1 Jochen
+drop table t1;
+CREATE TABLE t1 ( _userid VARCHAR(60) NOT NULL PRIMARY KEY) ENGINE=innodb;
+set autocommit=0;
+INSERT INTO t1 SET _userid='marc@anyware.co.uk';
+COMMIT;
+SELECT * FROM t1;
+_userid
+marc@anyware.co.uk
+SELECT _userid FROM t1 WHERE _userid='marc@anyware.co.uk';
+_userid
+marc@anyware.co.uk
+drop table t1;
+set autocommit=1;
+CREATE TABLE t1 (
+user_id int(10) DEFAULT '0' NOT NULL,
+name varchar(100),
+phone varchar(100),
+ref_email varchar(100) DEFAULT '' NOT NULL,
+detail varchar(200),
+PRIMARY KEY (user_id,ref_email)
+)engine=innodb;
+INSERT INTO t1 VALUES (10292,'sanjeev','29153373','sansh777@hotmail.com','xxx'),(10292,'shirish','2333604','shirish@yahoo.com','ddsds'),(10292,'sonali','323232','sonali@bolly.com','filmstar');
+select * from t1 where user_id=10292;
+user_id name phone ref_email detail
+10292 sanjeev 29153373 sansh777@hotmail.com xxx
+10292 shirish 2333604 shirish@yahoo.com ddsds
+10292 sonali 323232 sonali@bolly.com filmstar
+INSERT INTO t1 VALUES (10291,'sanjeev','29153373','sansh777@hotmail.com','xxx'),(10293,'shirish','2333604','shirish@yahoo.com','ddsds');
+select * from t1 where user_id=10292;
+user_id name phone ref_email detail
+10292 sanjeev 29153373 sansh777@hotmail.com xxx
+10292 shirish 2333604 shirish@yahoo.com ddsds
+10292 sonali 323232 sonali@bolly.com filmstar
+select * from t1 where user_id>=10292;
+user_id name phone ref_email detail
+10292 sanjeev 29153373 sansh777@hotmail.com xxx
+10292 shirish 2333604 shirish@yahoo.com ddsds
+10292 sonali 323232 sonali@bolly.com filmstar
+10293 shirish 2333604 shirish@yahoo.com ddsds
+select * from t1 where user_id>10292;
+user_id name phone ref_email detail
+10293 shirish 2333604 shirish@yahoo.com ddsds
+select * from t1 where user_id<10292;
+user_id name phone ref_email detail
+10291 sanjeev 29153373 sansh777@hotmail.com xxx
+drop table t1;
+CREATE TABLE t1 (a int not null, b int not null,c int not null,
+key(a),primary key(a,b), unique(c),key(a),unique(b));
+show index from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 0 PRIMARY 1 a A # NULL NULL BTREE
+t1 0 PRIMARY 2 b A # NULL NULL BTREE
+t1 0 c 1 c A # NULL NULL BTREE
+t1 0 b 1 b A # NULL NULL BTREE
+t1 1 a 1 a A # NULL NULL BTREE
+t1 1 a_2 1 a A # NULL NULL BTREE
+drop table t1;
+create table t1 (col1 int not null, col2 char(4) not null, primary key(col1));
+alter table t1 engine=innodb;
+insert into t1 values ('1','1'),('5','2'),('2','3'),('3','4'),('4','4');
+select * from t1;
+col1 col2
+1 1
+2 3
+3 4
+4 4
+5 2
+update t1 set col2='7' where col1='4';
+select * from t1;
+col1 col2
+1 1
+2 3
+3 4
+4 7
+5 2
+alter table t1 add co3 int not null;
+select * from t1;
+col1 col2 co3
+1 1 0
+2 3 0
+3 4 0
+4 7 0
+5 2 0
+update t1 set col2='9' where col1='2';
+select * from t1;
+col1 col2 co3
+1 1 0
+2 9 0
+3 4 0
+4 7 0
+5 2 0
+drop table t1;
+create table t1 (a int not null , b int, primary key (a)) engine = innodb;
+create table t2 (a int not null , b int, primary key (a)) engine = myisam;
+insert into t1 VALUES (1,3) , (2,3), (3,3);
+select * from t1;
+a b
+1 3
+2 3
+3 3
+insert into t2 select * from t1;
+select * from t2;
+a b
+1 3
+2 3
+3 3
+delete from t1 where b = 3;
+select * from t1;
+a b
+insert into t1 select * from t2;
+select * from t1;
+a b
+1 3
+2 3
+3 3
+select * from t2;
+a b
+1 3
+2 3
+3 3
+drop table t1,t2;
+CREATE TABLE t1 (
+user_name varchar(12),
+password text,
+subscribed char(1),
+user_id int(11) DEFAULT '0' NOT NULL,
+quota bigint(20),
+weight double,
+access_date date,
+access_time time,
+approved datetime,
+dummy_primary_key int(11) NOT NULL auto_increment,
+PRIMARY KEY (dummy_primary_key)
+) ENGINE=innodb;
+INSERT INTO t1 VALUES ('user_0','somepassword','N',0,0,0,'2000-09-07','23:06:59','2000-09-07 23:06:59',1);
+INSERT INTO t1 VALUES ('user_1','somepassword','Y',1,1,1,'2000-09-07','23:06:59','2000-09-07 23:06:59',2);
+INSERT INTO t1 VALUES ('user_2','somepassword','N',2,2,1.4142135623731,'2000-09-07','23:06:59','2000-09-07 23:06:59',3);
+INSERT INTO t1 VALUES ('user_3','somepassword','Y',3,3,1.7320508075689,'2000-09-07','23:06:59','2000-09-07 23:06:59',4);
+INSERT INTO t1 VALUES ('user_4','somepassword','N',4,4,2,'2000-09-07','23:06:59','2000-09-07 23:06:59',5);
+select user_name, password , subscribed, user_id, quota, weight, access_date, access_time, approved, dummy_primary_key from t1 order by user_name;
+user_name password subscribed user_id quota weight access_date access_time approved dummy_primary_key
+user_0 somepassword N 0 0 0 2000-09-07 23:06:59 2000-09-07 23:06:59 1
+user_1 somepassword Y 1 1 1 2000-09-07 23:06:59 2000-09-07 23:06:59 2
+user_2 somepassword N 2 2 1.4142135623731 2000-09-07 23:06:59 2000-09-07 23:06:59 3
+user_3 somepassword Y 3 3 1.7320508075689 2000-09-07 23:06:59 2000-09-07 23:06:59 4
+user_4 somepassword N 4 4 2 2000-09-07 23:06:59 2000-09-07 23:06:59 5
+drop table t1;
+CREATE TABLE t1 (
+id int(11) NOT NULL auto_increment,
+parent_id int(11) DEFAULT '0' NOT NULL,
+level tinyint(4) DEFAULT '0' NOT NULL,
+KEY (id),
+KEY parent_id (parent_id),
+KEY level (level)
+) engine=innodb;
+INSERT INTO t1 VALUES (1,0,0),(3,1,1),(4,1,1),(8,2,2),(9,2,2),(17,3,2),(22,4,2),(24,4,2),(28,5,2),(29,5,2),(30,5,2),(31,6,2),(32,6,2),(33,6,2),(203,7,2),(202,7,2),(20,3,2),(157,0,0),(193,5,2),(40,7,2),(2,1,1),(15,2,2),(6,1,1),(34,6,2),(35,6,2),(16,3,2),(7,1,1),(36,7,2),(18,3,2),(26,5,2),(27,5,2),(183,4,2),(38,7,2),(25,5,2),(37,7,2),(21,4,2),(19,3,2),(5,1,1);
+INSERT INTO t1 values (179,5,2);
+update t1 set parent_id=parent_id+100;
+select * from t1 where parent_id=102;
+id parent_id level
+8 102 2
+9 102 2
+15 102 2
+update t1 set id=id+1000;
+update t1 set id=1024 where id=1009;
+select * from t1;
+id parent_id level
+1001 100 0
+1003 101 1
+1004 101 1
+1008 102 2
+1024 102 2
+1017 103 2
+1022 104 2
+1024 104 2
+1028 105 2
+1029 105 2
+1030 105 2
+1031 106 2
+1032 106 2
+1033 106 2
+1203 107 2
+1202 107 2
+1020 103 2
+1157 100 0
+1193 105 2
+1040 107 2
+1002 101 1
+1015 102 2
+1006 101 1
+1034 106 2
+1035 106 2
+1016 103 2
+1007 101 1
+1036 107 2
+1018 103 2
+1026 105 2
+1027 105 2
+1183 104 2
+1038 107 2
+1025 105 2
+1037 107 2
+1021 104 2
+1019 103 2
+1005 101 1
+1179 105 2
+update ignore t1 set id=id+1;
+select * from t1;
+id parent_id level
+1002 100 0
+1004 101 1
+1005 101 1
+1009 102 2
+1025 102 2
+1018 103 2
+1023 104 2
+1025 104 2
+1029 105 2
+1030 105 2
+1031 105 2
+1032 106 2
+1033 106 2
+1034 106 2
+1204 107 2
+1203 107 2
+1021 103 2
+1158 100 0
+1194 105 2
+1041 107 2
+1003 101 1
+1016 102 2
+1007 101 1
+1035 106 2
+1036 106 2
+1017 103 2
+1008 101 1
+1037 107 2
+1019 103 2
+1027 105 2
+1028 105 2
+1184 104 2
+1039 107 2
+1026 105 2
+1038 107 2
+1022 104 2
+1020 103 2
+1006 101 1
+1180 105 2
+update ignore t1 set id=1023 where id=1010;
+select * from t1 where parent_id=102;
+id parent_id level
+1009 102 2
+1025 102 2
+1016 102 2
+explain select level from t1 where level=1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref level level 1 const # Using index
+select level,id from t1 where level=1;
+level id
+1 1004
+1 1005
+1 1003
+1 1007
+1 1008
+1 1006
+select level,id,parent_id from t1 where level=1;
+level id parent_id
+1 1004 101
+1 1005 101
+1 1003 101
+1 1007 101
+1 1008 101
+1 1006 101
+select level,id from t1 where level=1 order by id;
+level id
+1 1003
+1 1004
+1 1005
+1 1006
+1 1007
+1 1008
+delete from t1 where level=1;
+select * from t1;
+id parent_id level
+1002 100 0
+1009 102 2
+1025 102 2
+1018 103 2
+1023 104 2
+1025 104 2
+1029 105 2
+1030 105 2
+1031 105 2
+1032 106 2
+1033 106 2
+1034 106 2
+1204 107 2
+1203 107 2
+1021 103 2
+1158 100 0
+1194 105 2
+1041 107 2
+1016 102 2
+1035 106 2
+1036 106 2
+1017 103 2
+1037 107 2
+1019 103 2
+1027 105 2
+1028 105 2
+1184 104 2
+1039 107 2
+1026 105 2
+1038 107 2
+1022 104 2
+1020 103 2
+1180 105 2
+drop table t1;
+CREATE TABLE t1 (
+sca_code char(6) NOT NULL,
+cat_code char(6) NOT NULL,
+sca_desc varchar(50),
+lan_code char(2) NOT NULL,
+sca_pic varchar(100),
+sca_sdesc varchar(50),
+sca_sch_desc varchar(16),
+PRIMARY KEY (sca_code, cat_code, lan_code),
+INDEX sca_pic (sca_pic)
+) engine = innodb ;
+INSERT INTO t1 ( sca_code, cat_code, sca_desc, lan_code, sca_pic, sca_sdesc, sca_sch_desc) VALUES ( 'PD', 'J', 'PENDANT', 'EN', NULL, NULL, 'PENDANT'),( 'RI', 'J', 'RING', 'EN', NULL, NULL, 'RING'),( 'QQ', 'N', 'RING', 'EN', 'not null', NULL, 'RING');
+select count(*) from t1 where sca_code = 'PD';
+count(*)
+1
+select count(*) from t1 where sca_code <= 'PD';
+count(*)
+1
+select count(*) from t1 where sca_pic is null;
+count(*)
+2
+alter table t1 drop index sca_pic, add index sca_pic (cat_code, sca_pic);
+select count(*) from t1 where sca_code='PD' and sca_pic is null;
+count(*)
+1
+select count(*) from t1 where cat_code='E';
+count(*)
+0
+alter table t1 drop index sca_pic, add index (sca_pic, cat_code);
+select count(*) from t1 where sca_code='PD' and sca_pic is null;
+count(*)
+1
+select count(*) from t1 where sca_pic >= 'n';
+count(*)
+1
+select sca_pic from t1 where sca_pic is null;
+sca_pic
+NULL
+NULL
+update t1 set sca_pic="test" where sca_pic is null;
+delete from t1 where sca_code='pd';
+drop table t1;
+set @a:=now();
+CREATE TABLE t1 (a int not null, b timestamp not null, primary key (a)) engine=innodb;
+insert into t1 (a) values(1),(2),(3);
+select t1.a from t1 natural join t1 as t2 where t1.b >= @a order by t1.a;
+a
+1
+2
+3
+select a from t1 natural join t1 as t2 where b >= @a order by a;
+a
+1
+2
+3
+update t1 set a=5 where a=1;
+select a from t1;
+a
+2
+3
+5
+drop table t1;
+create table t1 (a varchar(100) not null, primary key(a), b int not null) engine=innodb;
+insert into t1 values("hello",1),("world",2);
+select * from t1 order by b desc;
+a b
+world 2
+hello 1
+optimize table t1;
+Table Op Msg_type Msg_text
+test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
+test.t1 optimize status OK
+show keys from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 0 PRIMARY 1 a A # NULL NULL BTREE
+drop table t1;
+create table t1 (i int, j int ) ENGINE=innodb;
+insert into t1 values (1,2);
+select * from t1 where i=1 and j=2;
+i j
+1 2
+create index ax1 on t1 (i,j);
+select * from t1 where i=1 and j=2;
+i j
+1 2
+drop table t1;
+CREATE TABLE t1 (
+a int3 unsigned NOT NULL,
+b int1 unsigned NOT NULL,
+UNIQUE (a, b)
+) ENGINE = innodb;
+INSERT INTO t1 VALUES (1, 1);
+SELECT MIN(B),MAX(b) FROM t1 WHERE t1.a = 1;
+MIN(B) MAX(b)
+1 1
+drop table t1;
+CREATE TABLE t1 (a int unsigned NOT NULL) engine=innodb;
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1;
+a
+1
+DROP TABLE t1;
+create table t1 (a int primary key,b int, c int, d int, e int, f int, g int, h int, i int, j int, k int, l int, m int, n int, o int, p int, q int, r int, s int, t int, u int, v int, w int, x int, y int, z int, a1 int, a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int, b1 int, b2 int, b3 int, b4 int, b5 int, b6 int) engine = innodb;
+insert into t1 values (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,1,1,1,1);
+explain select * from t1 where a > 0 and a < 50;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL # Using where
+drop table t1;
+create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) engine=innodb;
+insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
+LOCK TABLES t1 WRITE;
+insert into t1 values (99,1,2,'D'),(1,1,2,'D');
+ERROR 23000: Duplicate entry '1-1' for key 'PRIMARY'
+select id from t1;
+id
+0
+1
+2
+select id from t1;
+id
+0
+1
+2
+UNLOCK TABLES;
+DROP TABLE t1;
+create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) engine=innodb;
+insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
+LOCK TABLES t1 WRITE;
+begin;
+insert into t1 values (99,1,2,'D'),(1,1,2,'D');
+ERROR 23000: Duplicate entry '1-1' for key 'PRIMARY'
+select id from t1;
+id
+0
+1
+2
+insert ignore into t1 values (100,1,2,'D'),(1,1,99,'D');
+commit;
+select id,id3 from t1;
+id id3
+0 0
+1 1
+2 2
+100 2
+UNLOCK TABLES;
+DROP TABLE t1;
+create table t1 (a char(20), unique (a(5))) engine=innodb;
+drop table t1;
+create table t1 (a char(20), index (a(5))) engine=innodb;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(20) DEFAULT NULL,
+ KEY `a` (`a`(5))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t1;
+create temporary table t1 (a int not null auto_increment, primary key(a)) engine=innodb;
+insert into t1 values (NULL),(NULL),(NULL);
+delete from t1 where a=3;
+insert into t1 values (NULL);
+select * from t1;
+a
+1
+2
+4
+alter table t1 add b int;
+select * from t1;
+a b
+1 NULL
+2 NULL
+4 NULL
+drop table t1;
+create table t1
+(
+id int auto_increment primary key,
+name varchar(32) not null,
+value text not null,
+uid int not null,
+unique key(name,uid)
+) engine=innodb;
+insert into t1 values (1,'one','one value',101),
+(2,'two','two value',102),(3,'three','three value',103);
+set insert_id=5;
+replace into t1 (value,name,uid) values ('other value','two',102);
+delete from t1 where uid=102;
+set insert_id=5;
+replace into t1 (value,name,uid) values ('other value','two',102);
+set insert_id=6;
+replace into t1 (value,name,uid) values ('other value','two',102);
+select * from t1;
+id name value uid
+1 one one value 101
+3 three three value 103
+6 two other value 102
+drop table t1;
+create database mysqltest;
+create table mysqltest.t1 (a int not null) engine= innodb;
+insert into mysqltest.t1 values(1);
+create table mysqltest.t2 (a int not null) engine= myisam;
+insert into mysqltest.t2 values(1);
+create table mysqltest.t3 (a int not null) engine= heap;
+insert into mysqltest.t3 values(1);
+commit;
+drop database mysqltest;
+show tables from mysqltest;
+ERROR 42000: Unknown database 'mysqltest'
+set autocommit=0;
+create table t1 (a int not null) engine= innodb;
+insert into t1 values(1),(2);
+truncate table t1;
+commit;
+truncate table t1;
+truncate table t1;
+select * from t1;
+a
+insert into t1 values(1),(2);
+delete from t1;
+select * from t1;
+a
+commit;
+drop table t1;
+set autocommit=1;
+create table t1 (a int not null) engine= innodb;
+insert into t1 values(1),(2);
+truncate table t1;
+insert into t1 values(1),(2);
+select * from t1;
+a
+1
+2
+truncate table t1;
+insert into t1 values(1),(2);
+delete from t1;
+select * from t1;
+a
+drop table t1;
+create table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) engine=innodb;
+insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4);
+explain select * from t1 order by a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index NULL PRIMARY 4 NULL #
+explain select * from t1 order by b;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL # Using filesort
+explain select * from t1 order by c;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL # Using filesort
+explain select a from t1 order by a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index NULL PRIMARY 4 NULL # Using index
+explain select b from t1 order by b;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index NULL b 4 NULL # Using index
+explain select a,b from t1 order by b;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index NULL b 4 NULL # Using index
+explain select a,b from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index NULL b 4 NULL # Using index
+explain select a,b,c from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL #
+drop table t1;
+create table t1 (t int not null default 1, key (t)) engine=innodb;
+desc t1;
+Field Type Null Key Default Extra
+t int(11) NO MUL 1
+drop table t1;
+CREATE TABLE t1 (
+number bigint(20) NOT NULL default '0',
+cname char(15) NOT NULL default '',
+carrier_id smallint(6) NOT NULL default '0',
+privacy tinyint(4) NOT NULL default '0',
+last_mod_date timestamp NOT NULL,
+last_mod_id smallint(6) NOT NULL default '0',
+last_app_date timestamp NOT NULL,
+last_app_id smallint(6) default '-1',
+version smallint(6) NOT NULL default '0',
+assigned_scps int(11) default '0',
+status tinyint(4) default '0'
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (4077711111,'SeanWheeler',90,2,20020111112846,500,00000000000000,-1,2,3,1);
+INSERT INTO t1 VALUES (9197722223,'berry',90,3,20020111112809,500,20020102114532,501,4,10,0);
+INSERT INTO t1 VALUES (650,'San Francisco',0,0,20011227111336,342,00000000000000,-1,1,24,1);
+INSERT INTO t1 VALUES (302467,'Sue\'s Subshop',90,3,20020109113241,500,20020102115111,501,7,24,0);
+INSERT INTO t1 VALUES (6014911113,'SudzCarwash',520,1,20020102115234,500,20020102115259,501,33,32768,0);
+INSERT INTO t1 VALUES (333,'tubs',99,2,20020109113440,501,20020109113440,500,3,10,0);
+CREATE TABLE t2 (
+number bigint(20) NOT NULL default '0',
+cname char(15) NOT NULL default '',
+carrier_id smallint(6) NOT NULL default '0',
+privacy tinyint(4) NOT NULL default '0',
+last_mod_date timestamp NOT NULL,
+last_mod_id smallint(6) NOT NULL default '0',
+last_app_date timestamp NOT NULL,
+last_app_id smallint(6) default '-1',
+version smallint(6) NOT NULL default '0',
+assigned_scps int(11) default '0',
+status tinyint(4) default '0'
+) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (4077711111,'SeanWheeler',0,2,20020111112853,500,00000000000000,-1,2,3,1);
+INSERT INTO t2 VALUES (9197722223,'berry',90,3,20020111112818,500,20020102114532,501,4,10,0);
+INSERT INTO t2 VALUES (650,'San Francisco',90,0,20020109113158,342,00000000000000,-1,1,24,1);
+INSERT INTO t2 VALUES (333,'tubs',99,2,20020109113453,501,20020109113453,500,3,10,0);
+select * from t1;
+number cname carrier_id privacy last_mod_date last_mod_id last_app_date last_app_id version assigned_scps status
+4077711111 SeanWheeler 90 2 2002-01-11 11:28:46 500 0000-00-00 00:00:00 -1 2 3 1
+9197722223 berry 90 3 2002-01-11 11:28:09 500 2002-01-02 11:45:32 501 4 10 0
+650 San Francisco 0 0 2001-12-27 11:13:36 342 0000-00-00 00:00:00 -1 1 24 1
+302467 Sue's Subshop 90 3 2002-01-09 11:32:41 500 2002-01-02 11:51:11 501 7 24 0
+6014911113 SudzCarwash 520 1 2002-01-02 11:52:34 500 2002-01-02 11:52:59 501 33 32768 0
+333 tubs 99 2 2002-01-09 11:34:40 501 2002-01-09 11:34:40 500 3 10 0
+select * from t2;
+number cname carrier_id privacy last_mod_date last_mod_id last_app_date last_app_id version assigned_scps status
+4077711111 SeanWheeler 0 2 2002-01-11 11:28:53 500 0000-00-00 00:00:00 -1 2 3 1
+9197722223 berry 90 3 2002-01-11 11:28:18 500 2002-01-02 11:45:32 501 4 10 0
+650 San Francisco 90 0 2002-01-09 11:31:58 342 0000-00-00 00:00:00 -1 1 24 1
+333 tubs 99 2 2002-01-09 11:34:53 501 2002-01-09 11:34:53 500 3 10 0
+delete t1, t2 from t1 left join t2 on t1.number=t2.number where (t1.carrier_id=90 and t1.number=t2.number) or (t2.carrier_id=90 and t1.number=t2.number) or (t1.carrier_id=90 and t2.number is null);
+select * from t1;
+number cname carrier_id privacy last_mod_date last_mod_id last_app_date last_app_id version assigned_scps status
+6014911113 SudzCarwash 520 1 2002-01-02 11:52:34 500 2002-01-02 11:52:59 501 33 32768 0
+333 tubs 99 2 2002-01-09 11:34:40 501 2002-01-09 11:34:40 500 3 10 0
+select * from t2;
+number cname carrier_id privacy last_mod_date last_mod_id last_app_date last_app_id version assigned_scps status
+333 tubs 99 2 2002-01-09 11:34:53 501 2002-01-09 11:34:53 500 3 10 0
+select * from t2;
+number cname carrier_id privacy last_mod_date last_mod_id last_app_date last_app_id version assigned_scps status
+333 tubs 99 2 2002-01-09 11:34:53 501 2002-01-09 11:34:53 500 3 10 0
+drop table t1,t2;
+create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=innodb;
+BEGIN;
+SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
+SELECT @@tx_isolation,@@global.tx_isolation;
+@@tx_isolation @@global.tx_isolation
+SERIALIZABLE REPEATABLE-READ
+insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David');
+select id, code, name from t1 order by id;
+id code name
+1 1 Tim
+2 1 Monty
+3 2 David
+COMMIT;
+BEGIN;
+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+insert into t1 (code, name) values (2, 'Erik'), (3, 'Sasha');
+select id, code, name from t1 order by id;
+id code name
+1 1 Tim
+2 1 Monty
+3 2 David
+4 2 Erik
+5 3 Sasha
+COMMIT;
+SET binlog_format='MIXED';
+BEGIN;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+insert into t1 (code, name) values (3, 'Jeremy'), (4, 'Matt');
+select id, code, name from t1 order by id;
+id code name
+1 1 Tim
+2 1 Monty
+3 2 David
+4 2 Erik
+5 3 Sasha
+6 3 Jeremy
+7 4 Matt
+COMMIT;
+DROP TABLE t1;
+create table t1 (n int(10), d int(10)) engine=innodb;
+create table t2 (n int(10), d int(10)) engine=innodb;
+insert into t1 values(1,1),(1,2);
+insert into t2 values(1,10),(2,20);
+UPDATE t1,t2 SET t1.d=t2.d,t2.d=30 WHERE t1.n=t2.n;
+select * from t1;
+n d
+1 10
+1 10
+select * from t2;
+n d
+1 30
+2 20
+drop table t1,t2;
+drop table if exists t1, t2;
+CREATE TABLE t1 (a int, PRIMARY KEY (a));
+CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
+create trigger trg_del_t2 after delete on t2 for each row
+insert into t1 values (1);
+insert into t1 values (1);
+insert into t2 values (1),(2);
+delete t2 from t2;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+select count(*) from t2 /* must be 2 as restored after rollback caused by the error */;
+count(*)
+2
+drop table t1, t2;
+drop table if exists t1, t2;
+CREATE TABLE t1 (a int, PRIMARY KEY (a));
+CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
+create trigger trg_del_t2 after delete on t2 for each row
+insert into t1 values (1);
+insert into t1 values (1);
+insert into t2 values (1),(2);
+delete t2 from t2;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+select count(*) from t2 /* must be 2 as restored after rollback caused by the error */;
+count(*)
+2
+drop table t1, t2;
+create table t1 (a int, b int) engine=innodb;
+insert into t1 values(20,null);
+select t2.b, ifnull(t2.b,"this is null") from t1 as t2 left join t1 as t3 on
+t2.b=t3.a;
+b ifnull(t2.b,"this is null")
+NULL this is null
+select t2.b, ifnull(t2.b,"this is null") from t1 as t2 left join t1 as t3 on
+t2.b=t3.a order by 1;
+b ifnull(t2.b,"this is null")
+NULL this is null
+insert into t1 values(10,null);
+select t2.b, ifnull(t2.b,"this is null") from t1 as t2 left join t1 as t3 on
+t2.b=t3.a order by 1;
+b ifnull(t2.b,"this is null")
+NULL this is null
+NULL this is null
+drop table t1;
+create table t1 (a varchar(10) not null) engine=myisam;
+create table t2 (b varchar(10) not null unique) engine=innodb;
+select t1.a from t1,t2 where t1.a=t2.b;
+a
+drop table t1,t2;
+create table t1 (a int not null, b int, primary key (a)) engine = innodb;
+create table t2 (a int not null, b int, primary key (a)) engine = innodb;
+insert into t1 values (10, 20);
+insert into t2 values (10, 20);
+update t1, t2 set t1.b = 150, t2.b = t1.b where t2.a = t1.a and t1.a = 10;
+drop table t1,t2;
+CREATE TABLE t1 (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
+CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id), FOREIGN KEY (t1_id) REFERENCES t1(id) ON DELETE CASCADE ) ENGINE=INNODB;
+insert into t1 set id=1;
+insert into t2 set id=1, t1_id=1;
+delete t1,t2 from t1,t2 where t1.id=t2.t1_id;
+select * from t1;
+id
+select * from t2;
+id t1_id
+drop table t2,t1;
+CREATE TABLE t1(id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
+CREATE TABLE t2(id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id) ) ENGINE=INNODB;
+INSERT INTO t1 VALUES(1);
+INSERT INTO t2 VALUES(1, 1);
+SELECT * from t1;
+id
+1
+UPDATE t1,t2 SET t1.id=t1.id+1, t2.t1_id=t1.id+1;
+SELECT * from t1;
+id
+2
+UPDATE t1,t2 SET t1.id=t1.id+1 where t1.id!=t2.id;
+SELECT * from t1;
+id
+3
+DROP TABLE t1,t2;
+set autocommit=0;
+CREATE TABLE t1 (id CHAR(15) NOT NULL, value CHAR(40) NOT NULL, PRIMARY KEY(id)) ENGINE=InnoDB;
+CREATE TABLE t2 (id CHAR(15) NOT NULL, value CHAR(40) NOT NULL, PRIMARY KEY(id)) ENGINE=InnoDB;
+CREATE TABLE t3 (id1 CHAR(15) NOT NULL, id2 CHAR(15) NOT NULL, PRIMARY KEY(id1, id2)) ENGINE=InnoDB;
+INSERT INTO t3 VALUES("my-test-1", "my-test-2");
+COMMIT;
+INSERT INTO t1 VALUES("this-key", "will disappear");
+INSERT INTO t2 VALUES("this-key", "will also disappear");
+DELETE FROM t3 WHERE id1="my-test-1";
+SELECT * FROM t1;
+id value
+this-key will disappear
+SELECT * FROM t2;
+id value
+this-key will also disappear
+SELECT * FROM t3;
+id1 id2
+ROLLBACK;
+SELECT * FROM t1;
+id value
+SELECT * FROM t2;
+id value
+SELECT * FROM t3;
+id1 id2
+my-test-1 my-test-2
+SELECT * FROM t3 WHERE id1="my-test-1" LOCK IN SHARE MODE;
+id1 id2
+my-test-1 my-test-2
+COMMIT;
+set autocommit=1;
+DROP TABLE t1,t2,t3;
+CREATE TABLE t1 (a int not null primary key, b int not null, unique (b)) engine=innodb;
+INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+UPDATE t1 set a=a+100 where b between 2 and 3 and a < 1000;
+SELECT * from t1;
+a b
+1 1
+102 2
+103 3
+4 4
+5 5
+6 6
+7 7
+8 8
+9 9
+drop table t1;
+CREATE TABLE t2 ( NEXT_T BIGINT NOT NULL PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t1 ( B_ID INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
+SET AUTOCOMMIT=0;
+INSERT INTO t1 ( B_ID ) VALUES ( 1 );
+INSERT INTO t2 ( NEXT_T ) VALUES ( 1 );
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+SELECT * FROM t1;
+B_ID
+drop table t1,t2;
+create table t1 ( pk int primary key, parent int not null, child int not null, index (parent) ) engine = innodb;
+insert into t1 values (1,0,4), (2,1,3), (3,2,1), (4,1,2);
+select distinct parent,child from t1 order by parent;
+parent child
+0 4
+1 2
+1 3
+2 1
+drop table t1;
+create table t1 (a int not null auto_increment primary key, b int, c int, key(c)) engine=innodb;
+create table t2 (a int not null auto_increment primary key, b int);
+insert into t1 (b) values (null),(null),(null),(null),(null),(null),(null);
+insert into t2 (a) select b from t1;
+insert into t1 (b) select b from t2;
+insert into t2 (a) select b from t1;
+insert into t1 (a) select b from t2;
+insert into t2 (a) select b from t1;
+insert into t1 (a) select b from t2;
+insert into t2 (a) select b from t1;
+insert into t1 (a) select b from t2;
+insert into t2 (a) select b from t1;
+insert into t1 (a) select b from t2;
+select count(*) from t1;
+count(*)
+623
+explain select * from t1 where c between 1 and 2500;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range c c 5 NULL # Using where
+update t1 set c=a;
+explain select * from t1 where c between 1 and 2500;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL c NULL NULL NULL # Using where
+drop table t1,t2;
+create table t1 (id int primary key auto_increment, fk int, index index_fk (fk)) engine=innodb;
+insert into t1 (id) values (null),(null),(null),(null),(null);
+update t1 set fk=69 where fk is null order by id limit 1;
+SELECT * from t1;
+id fk
+2 NULL
+3 NULL
+4 NULL
+5 NULL
+1 69
+drop table t1;
+create table t1 (a int not null, b int not null, key (a));
+insert into t1 values (1,1),(1,2),(1,3),(3,1),(3,2),(3,3),(3,1),(3,2),(3,3),(2,1),(2,2),(2,3);
+SET @tmp=0;
+update t1 set b=(@tmp:=@tmp+1) order by a;
+update t1 set b=99 where a=1 order by b asc limit 1;
+update t1 set b=100 where a=1 order by b desc limit 2;
+update t1 set a=a+10+b where a=1 order by b;
+select * from t1 order by a,b;
+a b
+2 4
+2 5
+2 6
+3 7
+3 8
+3 9
+3 10
+3 11
+3 12
+13 2
+111 100
+111 100
+drop table t1;
+create table t1 ( c char(8) not null ) engine=innodb;
+insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9');
+insert into t1 values ('A'),('B'),('C'),('D'),('E'),('F');
+alter table t1 add b char(8) not null;
+alter table t1 add a char(8) not null;
+alter table t1 add primary key (a,b,c);
+update t1 set a=c, b=c;
+create table t2 (c char(8) not null, b char(8) not null, a char(8) not null, primary key(a,b,c)) engine=innodb;
+insert into t2 select * from t1;
+delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b;
+drop table t1,t2;
+SET AUTOCOMMIT=1;
+create table t1 (a integer auto_increment primary key) engine=innodb;
+insert into t1 (a) values (NULL),(NULL);
+truncate table t1;
+insert into t1 (a) values (NULL),(NULL);
+SELECT * from t1;
+a
+1
+2
+drop table t1;
+CREATE TABLE t1 (`id 1` INT NOT NULL, PRIMARY KEY (`id 1`)) ENGINE=INNODB;
+CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id), FOREIGN KEY (`t1_id`) REFERENCES `t1`(`id 1`) ON DELETE CASCADE ) ENGINE=INNODB;
+drop table t2,t1;
+create table `t1` (`id` int( 11 ) not null ,primary key ( `id` )) engine = innodb;
+insert into `t1`values ( 1 ) ;
+create table `t2` (`id` int( 11 ) not null default '0',unique key `id` ( `id` ) ,constraint `t1_id_fk` foreign key ( `id` ) references `t1` (`id` )) engine = innodb;
+insert into `t2`values ( 1 ) ;
+create table `t3` (`id` int( 11 ) not null default '0',key `id` ( `id` ) ,constraint `t2_id_fk` foreign key ( `id` ) references `t2` (`id` )) engine = innodb;
+insert into `t3`values ( 1 ) ;
+delete t3,t2,t1 from t1,t2,t3 where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`))
+update t1,t2,t3 set t3.id=5, t2.id=6, t1.id=7 where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`))
+update t3 set t3.id=7 where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
+ERROR 42S22: Unknown column 't1.id' in 'where clause'
+drop table t3,t2,t1;
+create table t1(
+id int primary key,
+pid int,
+index(pid),
+foreign key(pid) references t1(id) on delete cascade) engine=innodb;
+insert into t1 values(0,0),(1,0),(2,1),(3,2),(4,3),(5,4),(6,5),(7,6),
+(8,7),(9,8),(10,9),(11,10),(12,11),(13,12),(14,13),(15,14);
+delete from t1 where id=0;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t1`, CONSTRAINT `t1_ibfk_1` FOREIGN KEY (`pid`) REFERENCES `t1` (`id`) ON DELETE CASCADE)
+delete from t1 where id=15;
+delete from t1 where id=0;
+drop table t1;
+CREATE TABLE t1 (col1 int(1))ENGINE=InnoDB;
+CREATE TABLE t2 (col1 int(1),stamp TIMESTAMP,INDEX stamp_idx
+(stamp))ENGINE=InnoDB;
+insert into t1 values (1),(2),(3);
+insert into t2 values (1, 20020204130000),(2, 20020204130000),(4,20020204310000 ),(5,20020204230000);
+Warnings:
+Warning 1265 Data truncated for column 'stamp' at row 3
+SELECT col1 FROM t1 UNION SELECT col1 FROM t2 WHERE stamp <
+'20020204120000' GROUP BY col1;
+col1
+1
+2
+3
+4
+drop table t1,t2;
+CREATE TABLE t1 (
+`id` int(10) unsigned NOT NULL auto_increment,
+`id_object` int(10) unsigned default '0',
+`id_version` int(10) unsigned NOT NULL default '1',
+`label` varchar(100) NOT NULL default '',
+`description` text,
+PRIMARY KEY (`id`),
+KEY `id_object` (`id_object`),
+KEY `id_version` (`id_version`)
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES("6", "3382", "9", "Test", NULL), ("7", "102", "5", "Le Pekin (Test)", NULL),("584", "1794", "4", "Test de resto", NULL),("837", "1822", "6", "Test 3", NULL),("1119", "3524", "1", "Societe Test", NULL),("1122", "3525", "1", "Fournisseur Test", NULL);
+CREATE TABLE t2 (
+`id` int(10) unsigned NOT NULL auto_increment,
+`id_version` int(10) unsigned NOT NULL default '1',
+PRIMARY KEY (`id`),
+KEY `id_version` (`id_version`)
+) ENGINE=InnoDB;
+INSERT INTO t2 VALUES("3524", "1"),("3525", "1"),("1794", "4"),("102", "5"),("1822", "6"),("3382", "9");
+SELECT t2.id, t1.`label` FROM t2 INNER JOIN
+(SELECT t1.id_object as id_object FROM t1 WHERE t1.`label` LIKE '%test%') AS lbl
+ON (t2.id = lbl.id_object) INNER JOIN t1 ON (t2.id = t1.id_object);
+id label
+3382 Test
+102 Le Pekin (Test)
+1794 Test de resto
+1822 Test 3
+3524 Societe Test
+3525 Fournisseur Test
+drop table t1,t2;
+create table t1 (a int, b varchar(200), c text not null) checksum=1 engine=myisam;
+create table t2 (a int, b varchar(200), c text not null) checksum=0 engine=innodb;
+create table t3 (a int, b varchar(200), c text not null) checksum=1 engine=innodb;
+insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
+insert t2 select * from t1;
+insert t3 select * from t1;
+checksum table t1, t2, t3, t4 quick;
+Table Checksum
+test.t1 2948697075
+test.t2 NULL
+test.t3 NULL
+test.t4 NULL
+Warnings:
+Error 1146 Table 'test.t4' doesn't exist
+checksum table t1, t2, t3, t4;
+Table Checksum
+test.t1 2948697075
+test.t2 2948697075
+test.t3 2948697075
+test.t4 NULL
+Warnings:
+Error 1146 Table 'test.t4' doesn't exist
+checksum table t1, t2, t3, t4 extended;
+Table Checksum
+test.t1 2948697075
+test.t2 2948697075
+test.t3 2948697075
+test.t4 NULL
+Warnings:
+Error 1146 Table 'test.t4' doesn't exist
+drop table t1,t2,t3;
+create table t1 (id int, name char(10) not null, name2 char(10) not null) engine=innodb;
+insert into t1 values(1,'first','fff'),(2,'second','sss'),(3,'third','ttt');
+select trim(name2) from t1 union all select trim(name) from t1 union all select trim(id) from t1;
+trim(name2)
+fff
+sss
+ttt
+first
+second
+third
+1
+2
+3
+drop table t1;
+create table t1 (a int) engine=innodb;
+create table t2 like t1;
+drop table t1,t2;
+create table t1 (id int(11) not null, id2 int(11) not null, unique (id,id2)) engine=innodb;
+create table t2 (id int(11) not null, constraint t1_id_fk foreign key ( id ) references t1 (id)) engine = innodb;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `id` int(11) NOT NULL,
+ `id2` int(11) NOT NULL,
+ UNIQUE KEY `id` (`id`,`id2`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `id` int(11) NOT NULL,
+ KEY `t1_id_fk` (`id`),
+ CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+create index id on t2 (id);
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `id` int(11) NOT NULL,
+ KEY `id` (`id`),
+ CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+create index id2 on t2 (id);
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `id` int(11) NOT NULL,
+ KEY `id` (`id`),
+ KEY `id2` (`id`),
+ CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop index id2 on t2;
+drop index id on t2;
+Got one of the listed errors
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `id` int(11) NOT NULL,
+ KEY `id` (`id`),
+ CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t2;
+create table t2 (id int(11) not null, id2 int(11) not null, constraint t1_id_fk foreign key (id,id2) references t1 (id,id2)) engine = innodb;
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `id` int(11) NOT NULL,
+ `id2` int(11) NOT NULL,
+ KEY `t1_id_fk` (`id`,`id2`),
+ CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`, `id2`) REFERENCES `t1` (`id`, `id2`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+create unique index id on t2 (id,id2);
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `id` int(11) NOT NULL,
+ `id2` int(11) NOT NULL,
+ UNIQUE KEY `id` (`id`,`id2`),
+ CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`, `id2`) REFERENCES `t1` (`id`, `id2`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t2;
+create table t2 (id int(11) not null, id2 int(11) not null, unique (id,id2),constraint t1_id_fk foreign key (id2,id) references t1 (id,id2)) engine = innodb;
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `id` int(11) NOT NULL,
+ `id2` int(11) NOT NULL,
+ UNIQUE KEY `id` (`id`,`id2`),
+ KEY `t1_id_fk` (`id2`,`id`),
+ CONSTRAINT `t1_id_fk` FOREIGN KEY (`id2`, `id`) REFERENCES `t1` (`id`, `id2`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t2;
+create table t2 (id int(11) not null, id2 int(11) not null, unique (id,id2), constraint t1_id_fk foreign key (id) references t1 (id)) engine = innodb;
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `id` int(11) NOT NULL,
+ `id2` int(11) NOT NULL,
+ UNIQUE KEY `id` (`id`,`id2`),
+ CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t2;
+create table t2 (id int(11) not null, id2 int(11) not null, unique (id,id2),constraint t1_id_fk foreign key (id2,id) references t1 (id,id2)) engine = innodb;
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `id` int(11) NOT NULL,
+ `id2` int(11) NOT NULL,
+ UNIQUE KEY `id` (`id`,`id2`),
+ KEY `t1_id_fk` (`id2`,`id`),
+ CONSTRAINT `t1_id_fk` FOREIGN KEY (`id2`, `id`) REFERENCES `t1` (`id`, `id2`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t2;
+create table t2 (id int(11) not null auto_increment, id2 int(11) not null, constraint t1_id_fk foreign key (id) references t1 (id), primary key (id), index (id,id2)) engine = innodb;
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `id2` int(11) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `id` (`id`,`id2`),
+ CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t2;
+create table t2 (id int(11) not null auto_increment, id2 int(11) not null, constraint t1_id_fk foreign key (id) references t1 (id)) engine= innodb;
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `id2` int(11) NOT NULL,
+ KEY `t1_id_fk` (`id`),
+ CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+alter table t2 add index id_test (id), add index id_test2 (id,id2);
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `id2` int(11) NOT NULL,
+ KEY `id_test` (`id`),
+ KEY `id_test2` (`id`,`id2`),
+ CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t2;
+create table t2 (id int(11) not null, id2 int(11) not null, constraint t1_id_fk foreign key (id2,id) references t1 (id)) engine = innodb;
+ERROR 42000: Incorrect foreign key definition for 't1_id_fk': Key reference and table reference don't match
+create table t2 (a int auto_increment primary key, b int, index(b), foreign key (b) references t1(id), unique(b)) engine=innodb;
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) NOT NULL AUTO_INCREMENT,
+ `b` int(11) DEFAULT NULL,
+ PRIMARY KEY (`a`),
+ UNIQUE KEY `b_2` (`b`),
+ KEY `b` (`b`),
+ CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`b`) REFERENCES `t1` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t2;
+create table t2 (a int auto_increment primary key, b int, foreign key (b) references t1(id), foreign key (b) references t1(id), unique(b)) engine=innodb;
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) NOT NULL AUTO_INCREMENT,
+ `b` int(11) DEFAULT NULL,
+ PRIMARY KEY (`a`),
+ UNIQUE KEY `b` (`b`),
+ CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`b`) REFERENCES `t1` (`id`),
+ CONSTRAINT `t2_ibfk_2` FOREIGN KEY (`b`) REFERENCES `t1` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t2, t1;
+create table t1 (c char(10), index (c,c)) engine=innodb;
+ERROR 42S21: Duplicate column name 'c'
+create table t1 (c1 char(10), c2 char(10), index (c1,c2,c1)) engine=innodb;
+ERROR 42S21: Duplicate column name 'c1'
+create table t1 (c1 char(10), c2 char(10), index (c1,c1,c2)) engine=innodb;
+ERROR 42S21: Duplicate column name 'c1'
+create table t1 (c1 char(10), c2 char(10), index (c2,c1,c1)) engine=innodb;
+ERROR 42S21: Duplicate column name 'c1'
+create table t1 (c1 char(10), c2 char(10)) engine=innodb;
+alter table t1 add key (c1,c1);
+ERROR 42S21: Duplicate column name 'c1'
+alter table t1 add key (c2,c1,c1);
+ERROR 42S21: Duplicate column name 'c1'
+alter table t1 add key (c1,c2,c1);
+ERROR 42S21: Duplicate column name 'c1'
+alter table t1 add key (c1,c1,c2);
+ERROR 42S21: Duplicate column name 'c1'
+drop table t1;
+create table t1(a int(1) , b int(1)) engine=innodb;
+insert into t1 values ('1111', '3333');
+select distinct concat(a, b) from t1;
+concat(a, b)
+11113333
+drop table t1;
+CREATE TABLE t1 ( a char(10) ) ENGINE=InnoDB;
+SELECT a FROM t1 WHERE MATCH (a) AGAINST ('test' IN BOOLEAN MODE);
+ERROR HY000: The used table type doesn't support FULLTEXT indexes
+DROP TABLE t1;
+CREATE TABLE t1 (a_id tinyint(4) NOT NULL default '0', PRIMARY KEY (a_id)) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+INSERT INTO t1 VALUES (1),(2),(3);
+CREATE TABLE t2 (b_id tinyint(4) NOT NULL default '0',b_a tinyint(4) NOT NULL default '0', PRIMARY KEY (b_id), KEY (b_a),
+CONSTRAINT fk_b_a FOREIGN KEY (b_a) REFERENCES t1 (a_id) ON DELETE CASCADE ON UPDATE NO ACTION) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+INSERT INTO t2 VALUES (1,1),(2,1),(3,1),(4,2),(5,2);
+SELECT * FROM (SELECT t1.*,GROUP_CONCAT(t2.b_id SEPARATOR ',') as b_list FROM (t1 LEFT JOIN (t2) on t1.a_id = t2.b_a) GROUP BY t1.a_id ) AS xyz;
+a_id b_list
+1 1,2,3
+2 4,5
+3 NULL
+DROP TABLE t2;
+DROP TABLE t1;
+create temporary table t1 (a int) engine=innodb;
+insert into t1 values (4711);
+truncate t1;
+insert into t1 values (42);
+select * from t1;
+a
+42
+drop table t1;
+create table t1 (a int) engine=innodb;
+insert into t1 values (4711);
+truncate t1;
+insert into t1 values (42);
+select * from t1;
+a
+42
+drop table t1;
+create table t1 (a int not null, b int not null, c blob not null, d int not null, e int, primary key (a,b,c(255),d)) engine=innodb;
+insert into t1 values (2,2,"b",2,2),(1,1,"a",1,1),(3,3,"ab",3,3);
+select * from t1 order by a,b,c,d;
+a b c d e
+1 1 a 1 1
+2 2 b 2 2
+3 3 ab 3 3
+explain select * from t1 order by a,b,c,d;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using filesort
+drop table t1;
+create table t1 (a char(1), b char(1), key(a, b)) engine=innodb;
+insert into t1 values ('8', '6'), ('4', '7');
+select min(a) from t1;
+min(a)
+4
+select min(b) from t1 where a='8';
+min(b)
+6
+drop table t1;
+create table t1 (x bigint unsigned not null primary key) engine=innodb;
+insert into t1(x) values (0xfffffffffffffff0),(0xfffffffffffffff1);
+select * from t1;
+x
+18446744073709551600
+18446744073709551601
+select count(*) from t1 where x>0;
+count(*)
+2
+select count(*) from t1 where x=0;
+count(*)
+0
+select count(*) from t1 where x<0;
+count(*)
+0
+select count(*) from t1 where x < -16;
+count(*)
+0
+select count(*) from t1 where x = -16;
+count(*)
+0
+explain select count(*) from t1 where x > -16;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index PRIMARY PRIMARY 8 NULL 2 Using where; Using index
+select count(*) from t1 where x > -16;
+count(*)
+2
+select * from t1 where x > -16;
+x
+18446744073709551600
+18446744073709551601
+select count(*) from t1 where x = 18446744073709551601;
+count(*)
+1
+drop table t1;
+SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
+variable_value
+512
+SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size';
+variable_value
+16384
+SELECT variable_value - @innodb_rows_deleted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted';
+variable_value - @innodb_rows_deleted_orig
+71
+SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted';
+variable_value - @innodb_rows_inserted_orig
+1063
+SELECT variable_value - @innodb_rows_updated_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated';
+variable_value - @innodb_rows_updated_orig
+865
+SELECT variable_value - @innodb_row_lock_waits_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_waits';
+variable_value - @innodb_row_lock_waits_orig
+0
+SELECT variable_value - @innodb_row_lock_current_waits_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_current_waits';
+variable_value - @innodb_row_lock_current_waits_orig
+0
+SELECT variable_value - @innodb_row_lock_time_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time';
+variable_value - @innodb_row_lock_time_orig
+0
+SELECT variable_value - @innodb_row_lock_time_max_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_max';
+variable_value - @innodb_row_lock_time_max_orig
+0
+SELECT variable_value - @innodb_row_lock_time_avg_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_avg';
+variable_value - @innodb_row_lock_time_avg_orig
+0
+show variables like "innodb_sync_spin_loops";
+Variable_name Value
+innodb_sync_spin_loops 20
+set global innodb_sync_spin_loops=1000;
+show variables like "innodb_sync_spin_loops";
+Variable_name Value
+innodb_sync_spin_loops 1000
+set global innodb_sync_spin_loops=0;
+show variables like "innodb_sync_spin_loops";
+Variable_name Value
+innodb_sync_spin_loops 0
+set global innodb_sync_spin_loops=20;
+show variables like "innodb_sync_spin_loops";
+Variable_name Value
+innodb_sync_spin_loops 20
+SET @old_innodb_thread_concurrency= @@global.innodb_thread_concurrency;
+show variables like "innodb_thread_concurrency";
+Variable_name Value
+innodb_thread_concurrency 8
+set global innodb_thread_concurrency=1001;
+Warnings:
+Warning 1292 Truncated incorrect thread_concurrency value: '1001'
+show variables like "innodb_thread_concurrency";
+Variable_name Value
+innodb_thread_concurrency 1000
+set global innodb_thread_concurrency=0;
+show variables like "innodb_thread_concurrency";
+Variable_name Value
+innodb_thread_concurrency 0
+set global innodb_thread_concurrency=16;
+show variables like "innodb_thread_concurrency";
+Variable_name Value
+innodb_thread_concurrency 16
+SET @@global.innodb_thread_concurrency= @old_innodb_thread_concurrency;
+show variables like "innodb_concurrency_tickets";
+Variable_name Value
+innodb_concurrency_tickets 500
+set global innodb_concurrency_tickets=1000;
+show variables like "innodb_concurrency_tickets";
+Variable_name Value
+innodb_concurrency_tickets 1000
+set global innodb_concurrency_tickets=0;
+Warnings:
+Warning 1292 Truncated incorrect concurrency_tickets value: '0'
+show variables like "innodb_concurrency_tickets";
+Variable_name Value
+innodb_concurrency_tickets 1
+set global innodb_concurrency_tickets=500;
+show variables like "innodb_concurrency_tickets";
+Variable_name Value
+innodb_concurrency_tickets 500
+show variables like "innodb_thread_sleep_delay";
+Variable_name Value
+innodb_thread_sleep_delay 10000
+set global innodb_thread_sleep_delay=100000;
+show variables like "innodb_thread_sleep_delay";
+Variable_name Value
+innodb_thread_sleep_delay 100000
+set global innodb_thread_sleep_delay=0;
+show variables like "innodb_thread_sleep_delay";
+Variable_name Value
+innodb_thread_sleep_delay 0
+set global innodb_thread_sleep_delay=10000;
+show variables like "innodb_thread_sleep_delay";
+Variable_name Value
+innodb_thread_sleep_delay 10000
+set storage_engine=INNODB;
+drop table if exists t1,t2,t3;
+--- Testing varchar ---
+--- Testing varchar ---
+create table t1 (v varchar(10), c char(10), t text);
+insert into t1 values('+ ', '+ ', '+ ');
+set @a=repeat(' ',20);
+insert into t1 values (concat('+',@a),concat('+',@a),concat('+',@a));
+Warnings:
+Note 1265 Data truncated for column 'v' at row 1
+select concat('*',v,'*',c,'*',t,'*') from t1;
+concat('*',v,'*',c,'*',t,'*')
+*+ *+*+ *
+*+ *+*+ *
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `v` varchar(10) DEFAULT NULL,
+ `c` char(10) DEFAULT NULL,
+ `t` text
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+create table t2 like t1;
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `v` varchar(10) DEFAULT NULL,
+ `c` char(10) DEFAULT NULL,
+ `t` text
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+create table t3 select * from t1;
+show create table t3;
+Table Create Table
+t3 CREATE TABLE `t3` (
+ `v` varchar(10) DEFAULT NULL,
+ `c` char(10) DEFAULT NULL,
+ `t` text
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+alter table t1 modify c varchar(10);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `v` varchar(10) DEFAULT NULL,
+ `c` varchar(10) DEFAULT NULL,
+ `t` text
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+alter table t1 modify v char(10);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `v` char(10) DEFAULT NULL,
+ `c` varchar(10) DEFAULT NULL,
+ `t` text
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+alter table t1 modify t varchar(10);
+Warnings:
+Note 1265 Data truncated for column 't' at row 2
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `v` char(10) DEFAULT NULL,
+ `c` varchar(10) DEFAULT NULL,
+ `t` varchar(10) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+select concat('*',v,'*',c,'*',t,'*') from t1;
+concat('*',v,'*',c,'*',t,'*')
+*+*+*+ *
+*+*+*+ *
+drop table t1,t2,t3;
+create table t1 (v varchar(10), c char(10), t text, key(v), key(c), key(t(10)));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `v` varchar(10) DEFAULT NULL,
+ `c` char(10) DEFAULT NULL,
+ `t` text,
+ KEY `v` (`v`),
+ KEY `c` (`c`),
+ KEY `t` (`t`(10))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+select count(*) from t1;
+count(*)
+270
+insert into t1 values(concat('a',char(1)),concat('a',char(1)),concat('a',char(1)));
+select count(*) from t1 where v='a';
+count(*)
+10
+select count(*) from t1 where c='a';
+count(*)
+10
+select count(*) from t1 where t='a';
+count(*)
+10
+select count(*) from t1 where v='a ';
+count(*)
+10
+select count(*) from t1 where c='a ';
+count(*)
+10
+select count(*) from t1 where t='a ';
+count(*)
+10
+select count(*) from t1 where v between 'a' and 'a ';
+count(*)
+10
+select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n';
+count(*)
+10
+select count(*) from t1 where v like 'a%';
+count(*)
+11
+select count(*) from t1 where c like 'a%';
+count(*)
+11
+select count(*) from t1 where t like 'a%';
+count(*)
+11
+select count(*) from t1 where v like 'a %';
+count(*)
+9
+explain select count(*) from t1 where v='a ';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref v v 13 const # Using where; Using index
+explain select count(*) from t1 where c='a ';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref c c 11 const # Using where; Using index
+explain select count(*) from t1 where t='a ';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref t t 13 const # Using where
+explain select count(*) from t1 where v like 'a%';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range v v 13 NULL # Using where; Using index
+explain select count(*) from t1 where v between 'a' and 'a ';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref v v 13 const # Using where; Using index
+explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref v v 13 const # Using where; Using index
+alter table t1 add unique(v);
+ERROR 23000: Duplicate entry '{ ' for key 'v_2'
+alter table t1 add key(v);
+select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a';
+qq
+*a*a*a*
+*a *a*a *
+*a *a*a *
+*a *a*a *
+*a *a*a *
+*a *a*a *
+*a *a*a *
+*a *a*a *
+*a *a*a *
+*a *a*a *
+explain select * from t1 where v='a';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref v,v_2 # 13 const # Using where
+select v,count(*) from t1 group by v limit 10;
+v count(*)
+a 1
+a 10
+b 10
+c 10
+d 10
+e 10
+f 10
+g 10
+h 10
+i 10
+select v,count(t) from t1 group by v limit 10;
+v count(t)
+a 1
+a 10
+b 10
+c 10
+d 10
+e 10
+f 10
+g 10
+h 10
+i 10
+select v,count(c) from t1 group by v limit 10;
+v count(c)
+a 1
+a 10
+b 10
+c 10
+d 10
+e 10
+f 10
+g 10
+h 10
+i 10
+select sql_big_result v,count(t) from t1 group by v limit 10;
+v count(t)
+a 1
+a 10
+b 10
+c 10
+d 10
+e 10
+f 10
+g 10
+h 10
+i 10
+select sql_big_result v,count(c) from t1 group by v limit 10;
+v count(c)
+a 1
+a 10
+b 10
+c 10
+d 10
+e 10
+f 10
+g 10
+h 10
+i 10
+select c,count(*) from t1 group by c limit 10;
+c count(*)
+a 1
+a 10
+b 10
+c 10
+d 10
+e 10
+f 10
+g 10
+h 10
+i 10
+select c,count(t) from t1 group by c limit 10;
+c count(t)
+a 1
+a 10
+b 10
+c 10
+d 10
+e 10
+f 10
+g 10
+h 10
+i 10
+select sql_big_result c,count(t) from t1 group by c limit 10;
+c count(t)
+a 1
+a 10
+b 10
+c 10
+d 10
+e 10
+f 10
+g 10
+h 10
+i 10
+select t,count(*) from t1 group by t limit 10;
+t count(*)
+a 1
+a 10
+b 10
+c 10
+d 10
+e 10
+f 10
+g 10
+h 10
+i 10
+select t,count(t) from t1 group by t limit 10;
+t count(t)
+a 1
+a 10
+b 10
+c 10
+d 10
+e 10
+f 10
+g 10
+h 10
+i 10
+select sql_big_result t,count(t) from t1 group by t limit 10;
+t count(t)
+a 1
+a 10
+b 10
+c 10
+d 10
+e 10
+f 10
+g 10
+h 10
+i 10
+alter table t1 modify v varchar(300), drop key v, drop key v_2, add key v (v);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `v` varchar(300) DEFAULT NULL,
+ `c` char(10) DEFAULT NULL,
+ `t` text,
+ KEY `c` (`c`),
+ KEY `t` (`t`(10)),
+ KEY `v` (`v`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+select count(*) from t1 where v='a';
+count(*)
+10
+select count(*) from t1 where v='a ';
+count(*)
+10
+select count(*) from t1 where v between 'a' and 'a ';
+count(*)
+10
+select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n';
+count(*)
+10
+select count(*) from t1 where v like 'a%';
+count(*)
+11
+select count(*) from t1 where v like 'a %';
+count(*)
+9
+explain select count(*) from t1 where v='a ';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref v v 303 const # Using where; Using index
+explain select count(*) from t1 where v like 'a%';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range v v 303 NULL # Using where; Using index
+explain select count(*) from t1 where v between 'a' and 'a ';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref v v 303 const # Using where; Using index
+explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref v v 303 const # Using where; Using index
+explain select * from t1 where v='a';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref v v 303 const # Using where
+select v,count(*) from t1 group by v limit 10;
+v count(*)
+a 1
+a 10
+b 10
+c 10
+d 10
+e 10
+f 10
+g 10
+h 10
+i 10
+select v,count(t) from t1 group by v limit 10;
+v count(t)
+a 1
+a 10
+b 10
+c 10
+d 10
+e 10
+f 10
+g 10
+h 10
+i 10
+select sql_big_result v,count(t) from t1 group by v limit 10;
+v count(t)
+a 1
+a 10
+b 10
+c 10
+d 10
+e 10
+f 10
+g 10
+h 10
+i 10
+alter table t1 drop key v, add key v (v(30));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `v` varchar(300) DEFAULT NULL,
+ `c` char(10) DEFAULT NULL,
+ `t` text,
+ KEY `c` (`c`),
+ KEY `t` (`t`(10)),
+ KEY `v` (`v`(30))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+select count(*) from t1 where v='a';
+count(*)
+10
+select count(*) from t1 where v='a ';
+count(*)
+10
+select count(*) from t1 where v between 'a' and 'a ';
+count(*)
+10
+select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n';
+count(*)
+10
+select count(*) from t1 where v like 'a%';
+count(*)
+11
+select count(*) from t1 where v like 'a %';
+count(*)
+9
+explain select count(*) from t1 where v='a ';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref v v 33 const # Using where
+explain select count(*) from t1 where v like 'a%';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range v v 33 NULL # Using where
+explain select count(*) from t1 where v between 'a' and 'a ';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref v v 33 const # Using where
+explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref v v 33 const # Using where
+explain select * from t1 where v='a';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref v v 33 const # Using where
+select v,count(*) from t1 group by v limit 10;
+v count(*)
+a 1
+a 10
+b 10
+c 10
+d 10
+e 10
+f 10
+g 10
+h 10
+i 10
+select v,count(t) from t1 group by v limit 10;
+v count(t)
+a 1
+a 10
+b 10
+c 10
+d 10
+e 10
+f 10
+g 10
+h 10
+i 10
+select sql_big_result v,count(t) from t1 group by v limit 10;
+v count(t)
+a 1
+a 10
+b 10
+c 10
+d 10
+e 10
+f 10
+g 10
+h 10
+i 10
+alter table t1 modify v varchar(600), drop key v, add key v (v);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `v` varchar(600) DEFAULT NULL,
+ `c` char(10) DEFAULT NULL,
+ `t` text,
+ KEY `c` (`c`),
+ KEY `t` (`t`(10)),
+ KEY `v` (`v`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+select v,count(*) from t1 group by v limit 10;
+v count(*)
+a 1
+a 10
+b 10
+c 10
+d 10
+e 10
+f 10
+g 10
+h 10
+i 10
+select v,count(t) from t1 group by v limit 10;
+v count(t)
+a 1
+a 10
+b 10
+c 10
+d 10
+e 10
+f 10
+g 10
+h 10
+i 10
+select sql_big_result v,count(t) from t1 group by v limit 10;
+v count(t)
+a 1
+a 10
+b 10
+c 10
+d 10
+e 10
+f 10
+g 10
+h 10
+i 10
+drop table t1;
+create table t1 (a char(10), unique (a));
+insert into t1 values ('a ');
+insert into t1 values ('a ');
+ERROR 23000: Duplicate entry 'a' for key 'a'
+alter table t1 modify a varchar(10);
+insert into t1 values ('a '),('a '),('a '),('a ');
+ERROR 23000: Duplicate entry 'a ' for key 'a'
+insert into t1 values ('a ');
+ERROR 23000: Duplicate entry 'a ' for key 'a'
+insert into t1 values ('a ');
+ERROR 23000: Duplicate entry 'a ' for key 'a'
+insert into t1 values ('a ');
+ERROR 23000: Duplicate entry 'a ' for key 'a'
+update t1 set a='a ' where a like 'a%';
+select concat(a,'.') from t1;
+concat(a,'.')
+a .
+update t1 set a='abc ' where a like 'a ';
+select concat(a,'.') from t1;
+concat(a,'.')
+a .
+update t1 set a='a ' where a like 'a %';
+select concat(a,'.') from t1;
+concat(a,'.')
+a .
+update t1 set a='a ' where a like 'a ';
+select concat(a,'.') from t1;
+concat(a,'.')
+a .
+drop table t1;
+create table t1 (v varchar(10), c char(10), t text, key(v(5)), key(c(5)), key(t(5)));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `v` varchar(10) DEFAULT NULL,
+ `c` char(10) DEFAULT NULL,
+ `t` text,
+ KEY `v` (`v`(5)),
+ KEY `c` (`c`(5)),
+ KEY `t` (`t`(5))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t1;
+create table t1 (v char(10) character set utf8);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `v` char(10) CHARACTER SET utf8 DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t1;
+create table t1 (v varchar(10), c char(10)) row_format=fixed;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `v` varchar(10) DEFAULT NULL,
+ `c` char(10) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED
+insert into t1 values('a','a'),('a ','a ');
+select concat('*',v,'*',c,'*') from t1;
+concat('*',v,'*',c,'*')
+*a*a*
+*a *a*
+drop table t1;
+create table t1 (v varchar(65530), key(v(10)));
+insert into t1 values(repeat('a',65530));
+select length(v) from t1 where v=repeat('a',65530);
+length(v)
+65530
+drop table t1;
+create table t1(a int, b varchar(12), key ba(b, a));
+insert into t1 values (1, 'A'), (20, NULL);
+explain select * from t1 where a=20 and b is null;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref ba ba 20 const,const 1 Using where; Using index
+select * from t1 where a=20 and b is null;
+a b
+20 NULL
+drop table t1;
+create table t1 (v varchar(65530), key(v));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 767 bytes
+drop table t1;
+create table t1 (v varchar(65536));
+Warnings:
+Note 1246 Converting column 'v' from VARCHAR to TEXT
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `v` mediumtext
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t1;
+create table t1 (v varchar(65530) character set utf8);
+Warnings:
+Note 1246 Converting column 'v' from VARCHAR to TEXT
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `v` mediumtext CHARACTER SET utf8
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t1;
+set storage_engine=MyISAM;
diff --git a/mysql-test/r/innodb_autoinc_lock_mode_zero.result b/mysql-test/suite/innodb/r/innodb_autoinc_lock_mode_zero.result
index 3d016684338..3d016684338 100644
--- a/mysql-test/r/innodb_autoinc_lock_mode_zero.result
+++ b/mysql-test/suite/innodb/r/innodb_autoinc_lock_mode_zero.result
diff --git a/mysql-test/r/innodb_bug30919.result b/mysql-test/suite/innodb/r/innodb_bug30919.result
index 42aa4ff302b..42aa4ff302b 100644
--- a/mysql-test/r/innodb_bug30919.result
+++ b/mysql-test/suite/innodb/r/innodb_bug30919.result
diff --git a/mysql-test/r/innodb_bug42419.result b/mysql-test/suite/innodb/r/innodb_bug42419.result
index f304bb634cb..f304bb634cb 100644
--- a/mysql-test/r/innodb_bug42419.result
+++ b/mysql-test/suite/innodb/r/innodb_bug42419.result
diff --git a/mysql-test/suite/innodb/r/innodb_bug48024.result b/mysql-test/suite/innodb/r/innodb_bug48024.result
new file mode 100644
index 00000000000..611923d2796
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb_bug48024.result
@@ -0,0 +1,10 @@
+CREATE TABLE bug48024(a int PRIMARY KEY,b int NOT NULL,KEY(b)) ENGINE=InnoDB;
+CREATE TABLE bug48024_b(b int PRIMARY KEY) ENGINE=InnoDB;
+ALTER TABLE bug48024 /*/ADD CONSTRAINT FOREIGN KEY(c) REFERENCES(a),/*/
+ADD CONSTRAINT FOREIGN KEY(b) REFERENCES bug48024_b(b);
+DROP TABLE bug48024,bug48024_b;
+CREATE TABLE bug48024(a int PRIMARY KEY,b int NOT NULL,KEY(b)) ENGINE=InnoDB;
+CREATE TABLE bug48024_b(b int PRIMARY KEY) ENGINE=InnoDB;
+ALTER TABLE bug48024 /*/ADD CONSTRAINT FOREIGN KEY(c) REFERENCES(a),/*/
+ADD CONSTRAINT FOREIGN KEY(b) REFERENCES bug48024_b(b)|
+DROP TABLE bug48024,bug48024_b;
diff --git a/mysql-test/suite/innodb/r/innodb_bug49164.result b/mysql-test/suite/innodb/r/innodb_bug49164.result
new file mode 100644
index 00000000000..9456702e1d0
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb_bug49164.result
@@ -0,0 +1,42 @@
+SET tx_isolation = 'READ-COMMITTED';
+CREATE TABLE bug49164 (a INT, b BIGINT, c TINYINT, PRIMARY KEY (a, b))
+ENGINE=InnoDB;
+insert into bug49164 values (1,1,1), (2,2,2), (3,3,3);
+begin;
+update bug49164 set c=7;
+select * from bug49164;
+a b c
+1 1 7
+2 2 7
+3 3 7
+rollback;
+select * from bug49164;
+a b c
+1 1 1
+2 2 2
+3 3 3
+begin;
+update bug49164 set c=7;
+SET tx_isolation = 'READ-COMMITTED';
+begin;
+select * from bug49164;
+a b c
+1 1 1
+2 2 2
+3 3 3
+commit;
+begin;
+update bug49164 set c=6 where a=1 and b=1;
+rollback;
+select * from bug49164;
+a b c
+1 1 1
+2 2 2
+3 3 3
+commit;
+select * from bug49164;
+a b c
+1 1 6
+2 2 2
+3 3 3
+drop table bug49164;
diff --git a/mysql-test/suite/innodb/r/innodb_bug53674.result b/mysql-test/suite/innodb/r/innodb_bug53674.result
new file mode 100644
index 00000000000..c4021c2e7cd
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb_bug53674.result
@@ -0,0 +1,11 @@
+create table bug53674(a int)engine=innodb;
+insert into bug53674 values (1),(2);
+start transaction;
+select * from bug53674 for update;
+a
+1
+2
+select * from bug53674 where a=(select a from bug53674 where a > 1);
+a
+2
+drop table bug53674;
diff --git a/mysql-test/suite/innodb/r/innodb_bug54044.result b/mysql-test/suite/innodb/r/innodb_bug54044.result
new file mode 100644
index 00000000000..90ab812f2ae
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb_bug54044.result
@@ -0,0 +1,3 @@
+CREATE TEMPORARY TABLE table_54044 ENGINE = INNODB
+AS SELECT IF(NULL IS NOT NULL, NULL, NULL);
+ERROR HY000: Can't create table 'test.table_54044' (errno: -1)
diff --git a/mysql-test/r/innodb_gis.result b/mysql-test/suite/innodb/r/innodb_gis.result
index c6c775afc9f..c6c775afc9f 100644
--- a/mysql-test/r/innodb_gis.result
+++ b/mysql-test/suite/innodb/r/innodb_gis.result
diff --git a/mysql-test/r/innodb_lock_wait_timeout_1.result b/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result
index bd8760b8f79..bd8760b8f79 100644
--- a/mysql-test/r/innodb_lock_wait_timeout_1.result
+++ b/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result
diff --git a/mysql-test/suite/innodb/r/innodb_multi_update.result b/mysql-test/suite/innodb/r/innodb_multi_update.result
new file mode 100644
index 00000000000..7af9b030d1f
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb_multi_update.result
@@ -0,0 +1,76 @@
+CREATE TABLE bug38999_1 (a int not null primary key, b int not null, key (b)) engine=innodb;
+CREATE TABLE bug38999_2 (a int not null primary key, b int not null, key (b)) engine=innodb;
+INSERT INTO bug38999_1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10),(11,11),(12,12);
+INSERT INTO bug38999_2 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+update bug38999_1,bug38999_2 set bug38999_1.a=bug38999_1.a+100;
+select * from bug38999_1;
+a b
+101 1
+102 2
+103 3
+104 4
+105 5
+106 6
+107 7
+108 8
+109 9
+110 10
+111 11
+112 12
+update bug38999_1,bug38999_2 set bug38999_1.a=bug38999_1.a+100 where bug38999_1.a=101;
+select * from bug38999_1;
+a b
+201 1
+102 2
+103 3
+104 4
+105 5
+106 6
+107 7
+108 8
+109 9
+110 10
+111 11
+112 12
+update bug38999_1,bug38999_2 set bug38999_1.b=bug38999_1.b+10 where bug38999_1.b=2;
+select * from bug38999_1;
+a b
+201 1
+103 3
+104 4
+105 5
+106 6
+107 7
+108 8
+109 9
+110 10
+111 11
+102 12
+112 12
+update bug38999_1,bug38999_2 set bug38999_1.b=bug38999_1.b+2,bug38999_2.b=bug38999_1.b+10 where bug38999_1.b between 3 and 5 and bug38999_1.a=bug38999_2.a+100;
+select * from bug38999_1;
+a b
+201 1
+103 5
+104 6
+106 6
+105 7
+107 7
+108 8
+109 9
+110 10
+111 11
+102 12
+112 12
+select * from bug38999_2;
+a b
+1 1
+2 2
+6 6
+7 7
+8 8
+9 9
+3 13
+4 14
+5 15
+drop table bug38999_1,bug38999_2;
diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result
new file mode 100644
index 00000000000..d018cace759
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb_mysql.result
@@ -0,0 +1,2510 @@
+set global innodb_support_xa=default;
+set session innodb_support_xa=default;
+SET SESSION STORAGE_ENGINE = InnoDB;
+drop table if exists t1,t2,t3,t1m,t1i,t2m,t2i,t4;
+drop procedure if exists p1;
+create table t1 (
+c_id int(11) not null default '0',
+org_id int(11) default null,
+unique key contacts$c_id (c_id),
+key contacts$org_id (org_id)
+);
+insert into t1 values
+(2,null),(120,null),(141,null),(218,7), (128,1),
+(151,2),(234,2),(236,2),(243,2),(255,2),(259,2),(232,3),(235,3),(238,3),
+(246,3),(253,3),(269,3),(285,3),(291,3),(293,3),(131,4),(230,4),(231,4);
+create table t2 (
+slai_id int(11) not null default '0',
+owner_tbl int(11) default null,
+owner_id int(11) default null,
+sla_id int(11) default null,
+inc_web int(11) default null,
+inc_email int(11) default null,
+inc_chat int(11) default null,
+inc_csr int(11) default null,
+inc_total int(11) default null,
+time_billed int(11) default null,
+activedate timestamp null default null,
+expiredate timestamp null default null,
+state int(11) default null,
+sla_set int(11) default null,
+unique key t2$slai_id (slai_id),
+key t2$owner_id (owner_id),
+key t2$sla_id (sla_id)
+);
+insert into t2(slai_id, owner_tbl, owner_id, sla_id) values
+(1,3,1,1), (3,3,10,2), (4,3,3,6), (5,3,2,5), (6,3,8,3), (7,3,9,7),
+(8,3,6,8), (9,3,4,9), (10,3,5,10), (11,3,11,11), (12,3,7,12);
+flush tables;
+select si.slai_id
+from t1 c join t2 si on
+((si.owner_tbl = 3 and si.owner_id = c.org_id) or
+( si.owner_tbl = 2 and si.owner_id = c.c_id))
+where
+c.c_id = 218 and expiredate is null;
+slai_id
+12
+select * from t1 where org_id is null;
+c_id org_id
+2 NULL
+120 NULL
+141 NULL
+select si.slai_id
+from t1 c join t2 si on
+((si.owner_tbl = 3 and si.owner_id = c.org_id) or
+( si.owner_tbl = 2 and si.owner_id = c.c_id))
+where
+c.c_id = 218 and expiredate is null;
+slai_id
+12
+drop table t1, t2;
+CREATE TABLE t1 (a int, b int, KEY b (b));
+CREATE TABLE t2 (a int, b int, PRIMARY KEY (a,b));
+CREATE TABLE t3 (a int, b int, c int, PRIMARY KEY (a),
+UNIQUE KEY b (b,c), KEY a (a,b,c));
+INSERT INTO t1 VALUES (1, 1);
+INSERT INTO t1 SELECT a + 1, b + 1 FROM t1;
+INSERT INTO t1 SELECT a + 2, b + 2 FROM t1;
+INSERT INTO t2 VALUES (1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8);
+INSERT INTO t2 SELECT a + 1, b FROM t2;
+DELETE FROM t2 WHERE a = 1 AND b < 2;
+INSERT INTO t3 VALUES (1,1,1),(2,1,2);
+INSERT INTO t3 SELECT a + 2, a + 2, 3 FROM t3;
+INSERT INTO t3 SELECT a + 4, a + 4, 3 FROM t3;
+SELECT STRAIGHT_JOIN SQL_NO_CACHE t1.b, t1.a FROM t1, t3, t2 WHERE
+t3.a = t2.a AND t2.b = t1.a AND t3.b = 1 AND t3.c IN (1, 2)
+ORDER BY t1.b LIMIT 2;
+b a
+1 1
+2 2
+SELECT STRAIGHT_JOIN SQL_NO_CACHE t1.b, t1.a FROM t1, t3, t2 WHERE
+t3.a = t2.a AND t2.b = t1.a AND t3.b = 1 AND t3.c IN (1, 2)
+ORDER BY t1.b LIMIT 5;
+b a
+1 1
+2 2
+2 2
+3 3
+3 3
+DROP TABLE t1, t2, t3;
+CREATE TABLE `t1` (`id1` INT) ;
+INSERT INTO `t1` (`id1`) VALUES (1),(5),(2);
+CREATE TABLE `t2` (
+`id1` INT,
+`id2` INT NOT NULL,
+`id3` INT,
+`id4` INT NOT NULL,
+UNIQUE (`id2`,`id4`),
+KEY (`id1`)
+);
+INSERT INTO `t2`(`id1`,`id2`,`id3`,`id4`) VALUES
+(1,1,1,0),
+(1,1,2,1),
+(5,1,2,2),
+(6,1,2,3),
+(1,2,2,2),
+(1,2,1,1);
+SELECT `id1` FROM `t1` WHERE `id1` NOT IN (SELECT `id1` FROM `t2` WHERE `id2` = 1 AND `id3` = 2);
+id1
+2
+DROP TABLE t1, t2;
+create table t1 (c1 int) engine=innodb;
+handler t1 open;
+handler t1 read first;
+c1
+Before and after comparison
+0
+drop table t1;
+CREATE TABLE t1(c1 TEXT, UNIQUE (c1(1)), cnt INT DEFAULT 1)
+ENGINE=INNODB CHARACTER SET UTF8;
+INSERT INTO t1 (c1) VALUES ('1a');
+SELECT * FROM t1;
+c1 cnt
+1a 1
+INSERT INTO t1 (c1) VALUES ('1b') ON DUPLICATE KEY UPDATE cnt=cnt+1;
+SELECT * FROM t1;
+c1 cnt
+1a 2
+DROP TABLE t1;
+CREATE TABLE t1(c1 VARCHAR(2), UNIQUE (c1(1)), cnt INT DEFAULT 1)
+ENGINE=INNODB CHARACTER SET UTF8;
+INSERT INTO t1 (c1) VALUES ('1a');
+SELECT * FROM t1;
+c1 cnt
+1a 1
+INSERT INTO t1 (c1) VALUES ('1b') ON DUPLICATE KEY UPDATE cnt=cnt+1;
+SELECT * FROM t1;
+c1 cnt
+1a 2
+DROP TABLE t1;
+CREATE TABLE t1(c1 CHAR(2), UNIQUE (c1(1)), cnt INT DEFAULT 1)
+ENGINE=INNODB CHARACTER SET UTF8;
+INSERT INTO t1 (c1) VALUES ('1a');
+SELECT * FROM t1;
+c1 cnt
+1a 1
+INSERT INTO t1 (c1) VALUES ('1b') ON DUPLICATE KEY UPDATE cnt=cnt+1;
+SELECT * FROM t1;
+c1 cnt
+1a 2
+DROP TABLE t1;
+CREATE TABLE t1 (
+a1 decimal(10,0) DEFAULT NULL,
+a2 blob,
+a3 time DEFAULT NULL,
+a4 blob,
+a5 char(175) DEFAULT NULL,
+a6 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+a7 tinyblob,
+INDEX idx (a6,a7(239),a5)
+) ENGINE=InnoDB;
+EXPLAIN SELECT a4 FROM t1 WHERE
+a6=NULL AND
+a4='UNcT5pIde4I6c2SheTo4gt92OV1jgJCVkXmzyf325R1DwLURkbYHwhydANIZMbKTgdcR5xS';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+EXPLAIN SELECT t1.a4 FROM t1, t1 t WHERE
+t.a6=t.a6 AND t1.a6=NULL AND
+t1.a4='UNcT5pIde4I6c2SheTo4gt92OV1jgJCVkXmzyf325R1DwLURkbYHwhydANIZMbKTgdcR5xS';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+DROP TABLE t1;
+create table t1m (a int) engine = MEMORY;
+create table t1i (a int);
+create table t2m (a int) engine = MEMORY;
+create table t2i (a int);
+insert into t2m values (5);
+insert into t2i values (5);
+select min(a) from t1i;
+min(a)
+NULL
+select min(7) from t1i;
+min(7)
+NULL
+select min(7) from DUAL;
+min(7)
+7
+explain select min(7) from t2i join t1i;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2i ALL NULL NULL NULL NULL 1
+1 SIMPLE t1i ALL NULL NULL NULL NULL 1 Using join buffer
+select min(7) from t2i join t1i;
+min(7)
+NULL
+select max(a) from t1i;
+max(a)
+NULL
+select max(7) from t1i;
+max(7)
+NULL
+select max(7) from DUAL;
+max(7)
+7
+explain select max(7) from t2i join t1i;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2i ALL NULL NULL NULL NULL 1
+1 SIMPLE t1i ALL NULL NULL NULL NULL 1 Using join buffer
+select max(7) from t2i join t1i;
+max(7)
+NULL
+select 1, min(a) from t1i where a=99;
+1 min(a)
+1 NULL
+select 1, min(a) from t1i where 1=99;
+1 min(a)
+1 NULL
+select 1, min(1) from t1i where a=99;
+1 min(1)
+1 NULL
+select 1, min(1) from t1i where 1=99;
+1 min(1)
+1 NULL
+select 1, max(a) from t1i where a=99;
+1 max(a)
+1 NULL
+select 1, max(a) from t1i where 1=99;
+1 max(a)
+1 NULL
+select 1, max(1) from t1i where a=99;
+1 max(1)
+1 NULL
+select 1, max(1) from t1i where 1=99;
+1 max(1)
+1 NULL
+explain select count(*), min(7), max(7) from t1m, t1i;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1m system NULL NULL NULL NULL 0 const row not found
+1 SIMPLE t1i ALL NULL NULL NULL NULL 1
+select count(*), min(7), max(7) from t1m, t1i;
+count(*) min(7) max(7)
+0 NULL NULL
+explain select count(*), min(7), max(7) from t1m, t2i;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1m system NULL NULL NULL NULL 0 const row not found
+1 SIMPLE t2i ALL NULL NULL NULL NULL 1
+select count(*), min(7), max(7) from t1m, t2i;
+count(*) min(7) max(7)
+0 NULL NULL
+explain select count(*), min(7), max(7) from t2m, t1i;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2m system NULL NULL NULL NULL 1
+1 SIMPLE t1i ALL NULL NULL NULL NULL 1
+select count(*), min(7), max(7) from t2m, t1i;
+count(*) min(7) max(7)
+0 NULL NULL
+drop table t1m, t1i, t2m, t2i;
+create table t1 (
+a1 char(64), a2 char(64), b char(16), c char(16) not null, d char(16), dummy char(64) default ' '
+) ENGINE = MEMORY;
+insert into t1 (a1, a2, b, c, d) values
+('a','a','a','a111','xy1'),('a','a','a','b111','xy2'),('a','a','a','c111','xy3'),('a','a','a','d111','xy4'),
+('a','a','b','e112','xy1'),('a','a','b','f112','xy2'),('a','a','b','g112','xy3'),('a','a','b','h112','xy4'),
+('a','b','a','i121','xy1'),('a','b','a','j121','xy2'),('a','b','a','k121','xy3'),('a','b','a','l121','xy4'),
+('a','b','b','m122','xy1'),('a','b','b','n122','xy2'),('a','b','b','o122','xy3'),('a','b','b','p122','xy4'),
+('b','a','a','a211','xy1'),('b','a','a','b211','xy2'),('b','a','a','c211','xy3'),('b','a','a','d211','xy4'),
+('b','a','b','e212','xy1'),('b','a','b','f212','xy2'),('b','a','b','g212','xy3'),('b','a','b','h212','xy4'),
+('b','b','a','i221','xy1'),('b','b','a','j221','xy2'),('b','b','a','k221','xy3'),('b','b','a','l221','xy4'),
+('b','b','b','m222','xy1'),('b','b','b','n222','xy2'),('b','b','b','o222','xy3'),('b','b','b','p222','xy4'),
+('c','a','a','a311','xy1'),('c','a','a','b311','xy2'),('c','a','a','c311','xy3'),('c','a','a','d311','xy4'),
+('c','a','b','e312','xy1'),('c','a','b','f312','xy2'),('c','a','b','g312','xy3'),('c','a','b','h312','xy4'),
+('c','b','a','i321','xy1'),('c','b','a','j321','xy2'),('c','b','a','k321','xy3'),('c','b','a','l321','xy4'),
+('c','b','b','m322','xy1'),('c','b','b','n322','xy2'),('c','b','b','o322','xy3'),('c','b','b','p322','xy4'),
+('d','a','a','a411','xy1'),('d','a','a','b411','xy2'),('d','a','a','c411','xy3'),('d','a','a','d411','xy4'),
+('d','a','b','e412','xy1'),('d','a','b','f412','xy2'),('d','a','b','g412','xy3'),('d','a','b','h412','xy4'),
+('d','b','a','i421','xy1'),('d','b','a','j421','xy2'),('d','b','a','k421','xy3'),('d','b','a','l421','xy4'),
+('d','b','b','m422','xy1'),('d','b','b','n422','xy2'),('d','b','b','o422','xy3'),('d','b','b','p422','xy4'),
+('a','a','a','a111','xy1'),('a','a','a','b111','xy2'),('a','a','a','c111','xy3'),('a','a','a','d111','xy4'),
+('a','a','b','e112','xy1'),('a','a','b','f112','xy2'),('a','a','b','g112','xy3'),('a','a','b','h112','xy4'),
+('a','b','a','i121','xy1'),('a','b','a','j121','xy2'),('a','b','a','k121','xy3'),('a','b','a','l121','xy4'),
+('a','b','b','m122','xy1'),('a','b','b','n122','xy2'),('a','b','b','o122','xy3'),('a','b','b','p122','xy4'),
+('b','a','a','a211','xy1'),('b','a','a','b211','xy2'),('b','a','a','c211','xy3'),('b','a','a','d211','xy4'),
+('b','a','b','e212','xy1'),('b','a','b','f212','xy2'),('b','a','b','g212','xy3'),('b','a','b','h212','xy4'),
+('b','b','a','i221','xy1'),('b','b','a','j221','xy2'),('b','b','a','k221','xy3'),('b','b','a','l221','xy4'),
+('b','b','b','m222','xy1'),('b','b','b','n222','xy2'),('b','b','b','o222','xy3'),('b','b','b','p222','xy4'),
+('c','a','a','a311','xy1'),('c','a','a','b311','xy2'),('c','a','a','c311','xy3'),('c','a','a','d311','xy4'),
+('c','a','b','e312','xy1'),('c','a','b','f312','xy2'),('c','a','b','g312','xy3'),('c','a','b','h312','xy4'),
+('c','b','a','i321','xy1'),('c','b','a','j321','xy2'),('c','b','a','k321','xy3'),('c','b','a','l321','xy4'),
+('c','b','b','m322','xy1'),('c','b','b','n322','xy2'),('c','b','b','o322','xy3'),('c','b','b','p322','xy4'),
+('d','a','a','a411','xy1'),('d','a','a','b411','xy2'),('d','a','a','c411','xy3'),('d','a','a','d411','xy4'),
+('d','a','b','e412','xy1'),('d','a','b','f412','xy2'),('d','a','b','g412','xy3'),('d','a','b','h412','xy4'),
+('d','b','a','i421','xy1'),('d','b','a','j421','xy2'),('d','b','a','k421','xy3'),('d','b','a','l421','xy4'),
+('d','b','b','m422','xy1'),('d','b','b','n422','xy2'),('d','b','b','o422','xy3'),('d','b','b','p422','xy4');
+create table t4 (
+pk_col int auto_increment primary key, a1 char(64), a2 char(64), b char(16), c char(16) not null, d char(16), dummy char(64) default ' '
+);
+insert into t4 (a1, a2, b, c, d, dummy) select * from t1;
+create index idx12672_0 on t4 (a1);
+create index idx12672_1 on t4 (a1,a2,b,c);
+create index idx12672_2 on t4 (a1,a2,b);
+analyze table t4;
+Table Op Msg_type Msg_text
+test.t4 analyze status OK
+select distinct a1 from t4 where pk_col not in (1,2,3,4);
+a1
+a
+b
+c
+d
+drop table t1,t4;
+DROP TABLE IF EXISTS t2, t1;
+CREATE TABLE t1 (i INT NOT NULL PRIMARY KEY) ENGINE= InnoDB;
+CREATE TABLE t2 (
+i INT NOT NULL,
+FOREIGN KEY (i) REFERENCES t1 (i) ON DELETE NO ACTION
+) ENGINE= InnoDB;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (1);
+DELETE IGNORE FROM t1 WHERE i = 1;
+Warnings:
+Error 1451 Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`i`) REFERENCES `t1` (`i`) ON DELETE NO ACTION)
+SELECT * FROM t1, t2;
+i i
+1 1
+DROP TABLE t2, t1;
+End of 4.1 tests.
+create table t1 (
+a varchar(30), b varchar(30), primary key(a), key(b)
+);
+select distinct a from t1;
+a
+drop table t1;
+create table t1(a int, key(a));
+insert into t1 values(1);
+select a, count(a) from t1 group by a with rollup;
+a count(a)
+1 1
+NULL 1
+drop table t1;
+create table t1 (f1 int, f2 char(1), primary key(f1,f2));
+insert into t1 values ( 1,"e"),(2,"a"),( 3,"c"),(4,"d");
+alter table t1 drop primary key, add primary key (f2, f1);
+explain select distinct f1 a, f1 b from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index NULL PRIMARY 5 NULL 4 Using index; Using temporary
+explain select distinct f1, f2 from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range NULL PRIMARY 5 NULL 3 Using index for group-by; Using temporary
+drop table t1;
+CREATE TABLE t1 (id int(11) NOT NULL PRIMARY KEY, name varchar(20),
+INDEX (name));
+CREATE TABLE t2 (id int(11) NOT NULL PRIMARY KEY, fkey int(11));
+ALTER TABLE t2 ADD FOREIGN KEY (fkey) REFERENCES t2(id);
+INSERT INTO t1 VALUES (1,'A1'),(2,'A2'),(3,'B');
+INSERT INTO t2 VALUES (1,1),(2,2),(3,2),(4,3),(5,3);
+EXPLAIN
+SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id
+WHERE t1.name LIKE 'A%';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index PRIMARY,name name 23 NULL 3 Using where; Using index
+1 SIMPLE t2 ref fkey fkey 5 test.t1.id 1 Using where; Using index
+EXPLAIN
+SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id
+WHERE t1.name LIKE 'A%' OR FALSE;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 index NULL fkey 5 NULL 5 Using index
+1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.fkey 1 Using where
+DROP TABLE t1,t2;
+CREATE TABLE t1 (
+id int NOT NULL,
+name varchar(20) NOT NULL,
+dept varchar(20) NOT NULL,
+age tinyint(3) unsigned NOT NULL,
+PRIMARY KEY (id),
+INDEX (name,dept)
+) ENGINE=InnoDB;
+INSERT INTO t1(id, dept, age, name) VALUES
+(3987, 'cs1', 10, 'rs1'), (3988, 'cs2', 20, 'rs1'), (3995, 'cs3', 10, 'rs2'),
+(3996, 'cs4', 20, 'rs2'), (4003, 'cs5', 10, 'rs3'), (4004, 'cs6', 20, 'rs3'),
+(4011, 'cs7', 10, 'rs4'), (4012, 'cs8', 20, 'rs4'), (4019, 'cs9', 10, 'rs5'),
+(4020, 'cs10', 20, 'rs5'),(4027, 'cs11', 10, 'rs6'),(4028, 'cs12', 20, 'rs6');
+EXPLAIN SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range name name 44 NULL 2 Using where; Using index for group-by
+SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
+name dept
+rs5 cs10
+rs5 cs9
+DELETE FROM t1;
+# Masking (#) number in "rows" column of the following EXPLAIN output, as it may vary (bug#47746).
+EXPLAIN SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range name name 44 NULL # Using where; Using index for group-by
+SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
+name dept
+DROP TABLE t1;
+drop table if exists t1;
+show variables like 'innodb_rollback_on_timeout';
+Variable_name Value
+innodb_rollback_on_timeout OFF
+create table t1 (a int unsigned not null primary key) engine = innodb;
+insert into t1 values (1);
+commit;
+begin work;
+insert into t1 values (2);
+select * from t1;
+a
+1
+2
+begin work;
+insert into t1 values (5);
+select * from t1;
+a
+1
+5
+insert into t1 values (2);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+select * from t1;
+a
+1
+5
+commit;
+select * from t1;
+a
+1
+2
+commit;
+select * from t1;
+a
+1
+2
+5
+drop table t1;
+set @save_qcache_size=@@global.query_cache_size;
+set @save_qcache_type=@@global.query_cache_type;
+set global query_cache_size=10*1024*1024;
+set global query_cache_type=1;
+drop table if exists `test`;
+Warnings:
+Note 1051 Unknown table 'test'
+CREATE TABLE `test` (`test1` varchar(3) NOT NULL,
+`test2` varchar(4) NOT NULL,PRIMARY KEY (`test1`))
+ENGINE=InnoDB DEFAULT CHARSET=latin1;
+INSERT INTO `test` (`test1`, `test2`) VALUES ('tes', '5678');
+select * from test;
+test1 test2
+tes 5678
+INSERT INTO `test` (`test1`, `test2`) VALUES ('tes', '1234')
+ON DUPLICATE KEY UPDATE `test2` = '1234';
+select * from test;
+test1 test2
+tes 1234
+flush tables;
+select * from test;
+test1 test2
+tes 1234
+drop table test;
+set global query_cache_type=@save_qcache_type;
+set global query_cache_size=@save_qcache_size;
+drop table if exists t1;
+show variables like 'innodb_rollback_on_timeout';
+Variable_name Value
+innodb_rollback_on_timeout OFF
+create table t1 (a int unsigned not null primary key) engine = innodb;
+insert into t1 values (1);
+commit;
+begin work;
+insert into t1 values (2);
+select * from t1;
+a
+1
+2
+begin work;
+insert into t1 values (5);
+select * from t1;
+a
+1
+5
+insert into t1 values (2);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+select * from t1;
+a
+1
+5
+commit;
+select * from t1;
+a
+1
+2
+commit;
+select * from t1;
+a
+1
+2
+5
+drop table t1;
+create table t1(
+id int auto_increment,
+c char(1) not null,
+counter int not null default 1,
+primary key (id),
+unique key (c)
+) engine=innodb;
+insert into t1 (id, c) values
+(NULL, 'a'),
+(NULL, 'a')
+on duplicate key update id = values(id), counter = counter + 1;
+select * from t1;
+id c counter
+2 a 2
+insert into t1 (id, c) values
+(NULL, 'b')
+on duplicate key update id = values(id), counter = counter + 1;
+select * from t1;
+id c counter
+2 a 2
+3 b 1
+truncate table t1;
+insert into t1 (id, c) values (NULL, 'a');
+select * from t1;
+id c counter
+1 a 1
+insert into t1 (id, c) values (NULL, 'b'), (NULL, 'b')
+on duplicate key update id = values(id), c = values(c), counter = counter + 1;
+select * from t1;
+id c counter
+1 a 1
+3 b 2
+insert into t1 (id, c) values (NULL, 'a')
+on duplicate key update id = values(id), c = values(c), counter = counter + 1;
+select * from t1;
+id c counter
+3 b 2
+4 a 2
+drop table t1;
+CREATE TABLE t1(
+id int AUTO_INCREMENT PRIMARY KEY,
+stat_id int NOT NULL,
+acct_id int DEFAULT NULL,
+INDEX idx1 (stat_id, acct_id),
+INDEX idx2 (acct_id)
+) ENGINE=MyISAM;
+CREATE TABLE t2(
+id int AUTO_INCREMENT PRIMARY KEY,
+stat_id int NOT NULL,
+acct_id int DEFAULT NULL,
+INDEX idx1 (stat_id, acct_id),
+INDEX idx2 (acct_id)
+) ENGINE=InnoDB;
+INSERT INTO t1(stat_id,acct_id) VALUES
+(1,759), (2,831), (3,785), (4,854), (1,921),
+(1,553), (2,589), (3,743), (2,827), (2,545),
+(4,779), (4,783), (1,597), (1,785), (4,832),
+(1,741), (1,833), (3,788), (2,973), (1,907);
+INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+UPDATE t1 SET acct_id=785
+WHERE MOD(stat_id,2)=0 AND MOD(id,stat_id)=MOD(acct_id,stat_id);
+OPTIMIZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 optimize status OK
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+40960
+SELECT COUNT(*) FROM t1 WHERE acct_id=785;
+COUNT(*)
+8702
+EXPLAIN SELECT COUNT(*) FROM t1 WHERE stat_id IN (1,3) AND acct_id=785;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range idx1,idx2 idx1 9 NULL 2 Using where; Using index
+INSERT INTO t2 SELECT * FROM t1;
+OPTIMIZE TABLE t2;
+Table Op Msg_type Msg_text
+test.t2 optimize note Table does not support optimize, doing recreate + analyze instead
+test.t2 optimize status OK
+EXPLAIN SELECT COUNT(*) FROM t2 WHERE stat_id IN (1,3) AND acct_id=785;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 range idx1,idx2 idx1 9 NULL 2 Using where; Using index
+DROP TABLE t1,t2;
+create table t1(a int) engine=innodb;
+alter table t1 comment '123';
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='123'
+drop table t1;
+CREATE TABLE t1 (a CHAR(2), KEY (a)) ENGINE = InnoDB DEFAULT CHARSET=UTF8;
+INSERT INTO t1 VALUES ('uk'),('bg');
+SELECT * FROM t1 WHERE a = 'uk';
+a
+uk
+DELETE FROM t1 WHERE a = 'uk';
+SELECT * FROM t1 WHERE a = 'uk';
+a
+UPDATE t1 SET a = 'us' WHERE a = 'uk';
+SELECT * FROM t1 WHERE a = 'uk';
+a
+CREATE TABLE t2 (a CHAR(2), KEY (a)) ENGINE = InnoDB;
+INSERT INTO t2 VALUES ('uk'),('bg');
+SELECT * FROM t2 WHERE a = 'uk';
+a
+uk
+DELETE FROM t2 WHERE a = 'uk';
+SELECT * FROM t2 WHERE a = 'uk';
+a
+INSERT INTO t2 VALUES ('uk');
+UPDATE t2 SET a = 'us' WHERE a = 'uk';
+SELECT * FROM t2 WHERE a = 'uk';
+a
+CREATE TABLE t3 (a CHAR(2), KEY (a)) ENGINE = MyISAM;
+INSERT INTO t3 VALUES ('uk'),('bg');
+SELECT * FROM t3 WHERE a = 'uk';
+a
+uk
+DELETE FROM t3 WHERE a = 'uk';
+SELECT * FROM t3 WHERE a = 'uk';
+a
+INSERT INTO t3 VALUES ('uk');
+UPDATE t3 SET a = 'us' WHERE a = 'uk';
+SELECT * FROM t3 WHERE a = 'uk';
+a
+DROP TABLE t1,t2,t3;
+create table t1 (a int) engine=innodb;
+select * from bug29807;
+ERROR 42S02: Table 'test.bug29807' doesn't exist
+drop table t1;
+drop table bug29807;
+ERROR 42S02: Unknown table 'bug29807'
+create table bug29807 (a int);
+drop table bug29807;
+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
+CREATE TABLE t2 (a INT) ENGINE=InnoDB;
+switch to connection c1
+SET AUTOCOMMIT=0;
+INSERT INTO t2 VALUES (1);
+switch to connection c2
+SET AUTOCOMMIT=0;
+LOCK TABLES t1 READ, t2 READ;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+switch to connection c1
+COMMIT;
+INSERT INTO t1 VALUES (1);
+switch to connection default
+SET AUTOCOMMIT=default;
+DROP TABLE t1,t2;
+CREATE TABLE t1 (
+id int NOT NULL auto_increment PRIMARY KEY,
+b int NOT NULL,
+c datetime NOT NULL,
+INDEX idx_b(b),
+INDEX idx_c(c)
+) ENGINE=InnoDB;
+CREATE TABLE t2 (
+b int NOT NULL auto_increment PRIMARY KEY,
+c datetime NOT NULL
+) ENGINE= MyISAM;
+INSERT INTO t2(c) VALUES ('2007-01-01');
+INSERT INTO t2(c) SELECT c FROM t2;
+INSERT INTO t2(c) SELECT c FROM t2;
+INSERT INTO t2(c) SELECT c FROM t2;
+INSERT INTO t2(c) SELECT c FROM t2;
+INSERT INTO t2(c) SELECT c FROM t2;
+INSERT INTO t2(c) SELECT c FROM t2;
+INSERT INTO t2(c) SELECT c FROM t2;
+INSERT INTO t2(c) SELECT c FROM t2;
+INSERT INTO t2(c) SELECT c FROM t2;
+INSERT INTO t2(c) SELECT c FROM t2;
+INSERT INTO t1(b,c) SELECT b,c FROM t2;
+UPDATE t2 SET c='2007-01-02';
+INSERT INTO t1(b,c) SELECT b,c FROM t2;
+UPDATE t2 SET c='2007-01-03';
+INSERT INTO t1(b,c) SELECT b,c FROM t2;
+set @@sort_buffer_size=8192;
+Warnings:
+Warning 1292 Truncated incorrect sort_buffer_size value: '8192'
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+3072
+EXPLAIN
+SELECT COUNT(*) FROM t1
+WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL idx_b,idx_c NULL NULL NULL # Using where
+SELECT COUNT(*) FROM t1
+WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1;
+COUNT(*)
+3072
+EXPLAIN
+SELECT COUNT(*) FROM t1 FORCE INDEX(idx_b, idx_c)
+WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index_merge idx_b,idx_c idx_c,idx_b 8,4 NULL # Using sort_union(idx_c,idx_b); Using where
+SELECT COUNT(*) FROM t1 FORCE INDEX(idx_b, idx_c)
+WHERE (c >= '2007-01-02' AND c <= '2007-01-03') OR b >= 1;
+COUNT(*)
+3072
+set @@sort_buffer_size=default;
+DROP TABLE t1,t2;
+CREATE TABLE t1 (a int, b int);
+insert into t1 values (1,1),(1,2);
+CREATE TABLE t2 (primary key (a)) select * from t1;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+drop table if exists t2;
+Warnings:
+Note 1051 Unknown table 't2'
+CREATE TEMPORARY TABLE t2 (primary key (a)) select * from t1;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+drop table if exists t2;
+Warnings:
+Note 1051 Unknown table 't2'
+CREATE TABLE t2 (a int, b int, primary key (a));
+BEGIN;
+INSERT INTO t2 values(100,100);
+CREATE TABLE IF NOT EXISTS t2 (primary key (a)) select * from t1;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+SELECT * from t2;
+a b
+100 100
+ROLLBACK;
+SELECT * from t2;
+a b
+100 100
+TRUNCATE table t2;
+INSERT INTO t2 select * from t1;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+SELECT * from t2;
+a b
+drop table t2;
+CREATE TEMPORARY TABLE t2 (a int, b int, primary key (a));
+BEGIN;
+INSERT INTO t2 values(100,100);
+CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) select * from t1;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+SELECT * from t2;
+a b
+100 100
+COMMIT;
+BEGIN;
+INSERT INTO t2 values(101,101);
+CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) select * from t1;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+SELECT * from t2;
+a b
+100 100
+101 101
+ROLLBACK;
+SELECT * from t2;
+a b
+100 100
+TRUNCATE table t2;
+INSERT INTO t2 select * from t1;
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+SELECT * from t2;
+a b
+drop table t1,t2;
+create table t1(f1 varchar(800) binary not null, key(f1))
+character set utf8 collate utf8_general_ci;
+Warnings:
+Warning 1071 Specified key was too long; max key length is 767 bytes
+insert into t1 values('aaa');
+drop table t1;
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c FLOAT, KEY b(b)) ENGINE = INNODB;
+INSERT INTO t1 VALUES ( 1 , 1 , 1);
+INSERT INTO t1 SELECT a + 1 , MOD(a + 1 , 20), 1 FROM t1;
+INSERT INTO t1 SELECT a + 2 , MOD(a + 2 , 20), 1 FROM t1;
+INSERT INTO t1 SELECT a + 4 , MOD(a + 4 , 20), 1 FROM t1;
+INSERT INTO t1 SELECT a + 8 , MOD(a + 8 , 20), 1 FROM t1;
+INSERT INTO t1 SELECT a + 16, MOD(a + 16, 20), 1 FROM t1;
+INSERT INTO t1 SELECT a + 32, MOD(a + 32, 20), 1 FROM t1;
+INSERT INTO t1 SELECT a + 64, MOD(a + 64, 20), 1 FROM t1;
+EXPLAIN SELECT b, SUM(c) FROM t1 GROUP BY b;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index NULL b 5 NULL 128
+EXPLAIN SELECT SQL_BIG_RESULT b, SUM(c) FROM t1 GROUP BY b;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 128 Using filesort
+DROP TABLE t1;
+drop table if exists t1;
+show variables like 'innodb_rollback_on_timeout';
+Variable_name Value
+innodb_rollback_on_timeout OFF
+create table t1 (a int unsigned not null primary key) engine = innodb;
+insert into t1 values (1);
+commit;
+begin work;
+insert into t1 values (2);
+select * from t1;
+a
+1
+2
+begin work;
+insert into t1 values (5);
+select * from t1;
+a
+1
+5
+insert into t1 values (2);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+select * from t1;
+a
+1
+5
+commit;
+select * from t1;
+a
+1
+2
+commit;
+select * from t1;
+a
+1
+2
+5
+drop table t1;
+drop table if exists t1;
+create table t1 (a int) engine=innodb;
+alter table t1 alter a set default 1;
+drop table t1;
+
+Bug#24918 drop table and lock / inconsistent between
+perm and temp tables
+
+Check transactional tables under LOCK TABLES
+
+drop table if exists t24918, t24918_tmp, t24918_trans, t24918_trans_tmp,
+t24918_access;
+create table t24918_access (id int);
+create table t24918 (id int) engine=myisam;
+create temporary table t24918_tmp (id int) engine=myisam;
+create table t24918_trans (id int) engine=innodb;
+create temporary table t24918_trans_tmp (id int) engine=innodb;
+lock table t24918 write, t24918_tmp write, t24918_trans write, t24918_trans_tmp write;
+drop table t24918;
+select * from t24918_access;
+ERROR HY000: Table 't24918_access' was not locked with LOCK TABLES
+drop table t24918_trans;
+select * from t24918_access;
+ERROR HY000: Table 't24918_access' was not locked with LOCK TABLES
+drop table t24918_trans_tmp;
+select * from t24918_access;
+ERROR HY000: Table 't24918_access' was not locked with LOCK TABLES
+drop table t24918_tmp;
+select * from t24918_access;
+ERROR HY000: Table 't24918_access' was not locked with LOCK TABLES
+unlock tables;
+drop table t24918_access;
+CREATE TABLE t1 (a int, b int, PRIMARY KEY (a), KEY bkey (b)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,2),(3,2),(2,2),(4,2),(5,2),(6,2),(7,2),(8,2);
+INSERT INTO t1 SELECT a + 8, 2 FROM t1;
+INSERT INTO t1 SELECT a + 16, 1 FROM t1;
+EXPLAIN SELECT * FROM t1 WHERE b=2 ORDER BY a;
+id 1
+select_type SIMPLE
+table t1
+type ref
+possible_keys bkey
+key bkey
+key_len 5
+ref const
+rows 16
+Extra Using where; Using index
+SELECT * FROM t1 WHERE b=2 ORDER BY a;
+a b
+1 2
+2 2
+3 2
+4 2
+5 2
+6 2
+7 2
+8 2
+9 2
+10 2
+11 2
+12 2
+13 2
+14 2
+15 2
+16 2
+EXPLAIN SELECT * FROM t1 WHERE b BETWEEN 1 AND 2 ORDER BY a;
+id 1
+select_type SIMPLE
+table t1
+type range
+possible_keys bkey
+key bkey
+key_len 5
+ref NULL
+rows 16
+Extra Using where; Using index; Using filesort
+SELECT * FROM t1 WHERE b BETWEEN 1 AND 2 ORDER BY a;
+a b
+1 2
+2 2
+3 2
+4 2
+5 2
+6 2
+7 2
+8 2
+9 2
+10 2
+11 2
+12 2
+13 2
+14 2
+15 2
+16 2
+17 1
+18 1
+19 1
+20 1
+21 1
+22 1
+23 1
+24 1
+25 1
+26 1
+27 1
+28 1
+29 1
+30 1
+31 1
+32 1
+EXPLAIN SELECT * FROM t1 WHERE b BETWEEN 1 AND 2 ORDER BY b,a;
+id 1
+select_type SIMPLE
+table t1
+type range
+possible_keys bkey
+key bkey
+key_len 5
+ref NULL
+rows 16
+Extra Using where; Using index
+SELECT * FROM t1 WHERE b BETWEEN 1 AND 2 ORDER BY b,a;
+a b
+17 1
+18 1
+19 1
+20 1
+21 1
+22 1
+23 1
+24 1
+25 1
+26 1
+27 1
+28 1
+29 1
+30 1
+31 1
+32 1
+1 2
+2 2
+3 2
+4 2
+5 2
+6 2
+7 2
+8 2
+9 2
+10 2
+11 2
+12 2
+13 2
+14 2
+15 2
+16 2
+CREATE TABLE t2 (a int, b int, c int, PRIMARY KEY (a), KEY bkey (b,c))
+ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1,1,1),(3,1,1),(2,1,1),(4,1,1);
+INSERT INTO t2 SELECT a + 4, 1, 1 FROM t2;
+INSERT INTO t2 SELECT a + 8, 1, 1 FROM t2;
+EXPLAIN SELECT * FROM t2 WHERE b=1 ORDER BY a;
+id 1
+select_type SIMPLE
+table t2
+type ref
+possible_keys bkey
+key bkey
+key_len 5
+ref const
+rows 8
+Extra Using where; Using index; Using filesort
+SELECT * FROM t2 WHERE b=1 ORDER BY a;
+a b c
+1 1 1
+2 1 1
+3 1 1
+4 1 1
+5 1 1
+6 1 1
+7 1 1
+8 1 1
+9 1 1
+10 1 1
+11 1 1
+12 1 1
+13 1 1
+14 1 1
+15 1 1
+16 1 1
+EXPLAIN SELECT * FROM t2 WHERE b=1 AND c=1 ORDER BY a;
+id 1
+select_type SIMPLE
+table t2
+type ref
+possible_keys bkey
+key bkey
+key_len 10
+ref const,const
+rows 8
+Extra Using where; Using index
+SELECT * FROM t2 WHERE b=1 AND c=1 ORDER BY a;
+a b c
+1 1 1
+2 1 1
+3 1 1
+4 1 1
+5 1 1
+6 1 1
+7 1 1
+8 1 1
+9 1 1
+10 1 1
+11 1 1
+12 1 1
+13 1 1
+14 1 1
+15 1 1
+16 1 1
+EXPLAIN SELECT * FROM t2 WHERE b=1 AND c=1 ORDER BY b,c,a;
+id 1
+select_type SIMPLE
+table t2
+type ref
+possible_keys bkey
+key bkey
+key_len 10
+ref const,const
+rows 8
+Extra Using where; Using index
+SELECT * FROM t2 WHERE b=1 AND c=1 ORDER BY b,c,a;
+a b c
+1 1 1
+2 1 1
+3 1 1
+4 1 1
+5 1 1
+6 1 1
+7 1 1
+8 1 1
+9 1 1
+10 1 1
+11 1 1
+12 1 1
+13 1 1
+14 1 1
+15 1 1
+16 1 1
+EXPLAIN SELECT * FROM t2 WHERE b=1 AND c=1 ORDER BY c,a;
+id 1
+select_type SIMPLE
+table t2
+type ref
+possible_keys bkey
+key bkey
+key_len 10
+ref const,const
+rows 8
+Extra Using where; Using index
+SELECT * FROM t2 WHERE b=1 AND c=1 ORDER BY c,a;
+a b c
+1 1 1
+2 1 1
+3 1 1
+4 1 1
+5 1 1
+6 1 1
+7 1 1
+8 1 1
+9 1 1
+10 1 1
+11 1 1
+12 1 1
+13 1 1
+14 1 1
+15 1 1
+16 1 1
+DROP TABLE t1,t2;
+CREATE TABLE t1 (a INT, PRIMARY KEY (a)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8);
+INSERT INTO t1 SELECT a + 8 FROM t1;
+INSERT INTO t1 SELECT a + 16 FROM t1;
+CREATE PROCEDURE p1 ()
+BEGIN
+DECLARE i INT DEFAULT 50;
+DECLARE cnt INT;
+START TRANSACTION;
+ALTER TABLE t1 ENGINE=InnoDB;
+COMMIT;
+START TRANSACTION;
+WHILE (i > 0) DO
+SET i = i - 1;
+SELECT COUNT(*) INTO cnt FROM t1 LOCK IN SHARE MODE;
+END WHILE;
+COMMIT;
+END;|
+CALL p1();
+CALL p1();
+CALL p1();
+DROP PROCEDURE p1;
+DROP TABLE t1;
+create table t1(a text) engine=innodb default charset=utf8;
+insert into t1 values('aaa');
+alter table t1 add index(a(1024));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 767 bytes
+Warning 1071 Specified key was too long; max key length is 767 bytes
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` text,
+ KEY `a` (`a`(255))
+) ENGINE=InnoDB DEFAULT CHARSET=utf8
+drop table t1;
+CREATE TABLE t1 (
+a INT,
+b INT,
+KEY (b)
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,10), (2,10), (2,20), (3,30);
+START TRANSACTION;
+SELECT * FROM t1 WHERE b=20 FOR UPDATE;
+a b
+2 20
+START TRANSACTION;
+SELECT * FROM t1 WHERE b=10 ORDER BY A FOR UPDATE;
+a b
+1 10
+2 10
+ROLLBACK;
+ROLLBACK;
+DROP TABLE t1;
+CREATE TABLE t1(
+a INT,
+b INT NOT NULL,
+c INT NOT NULL,
+d INT,
+UNIQUE KEY (c,b)
+) engine=innodb;
+INSERT INTO t1 VALUES (1,1,1,50), (1,2,3,40), (2,1,3,4);
+EXPLAIN SELECT c,b,d FROM t1 GROUP BY c,b,d;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using filesort
+SELECT c,b,d FROM t1 GROUP BY c,b,d;
+c b d
+1 1 50
+3 1 4
+3 2 40
+EXPLAIN SELECT c,b,d FROM t1 GROUP BY c,b,d ORDER BY NULL;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3
+SELECT c,b,d FROM t1 GROUP BY c,b,d ORDER BY NULL;
+c b d
+1 1 50
+3 1 4
+3 2 40
+EXPLAIN SELECT c,b,d FROM t1 ORDER BY c,b,d;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using filesort
+SELECT c,b,d FROM t1 ORDER BY c,b,d;
+c b d
+1 1 50
+3 1 4
+3 2 40
+EXPLAIN SELECT c,b,d FROM t1 GROUP BY c,b;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index NULL c 8 NULL 3
+SELECT c,b,d FROM t1 GROUP BY c,b;
+c b d
+1 1 50
+3 1 4
+3 2 40
+EXPLAIN SELECT c,b FROM t1 GROUP BY c,b;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index NULL c 8 NULL 3 Using index
+SELECT c,b FROM t1 GROUP BY c,b;
+c b
+1 1
+3 1
+3 2
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a), INDEX b (b)) ENGINE=InnoDB;
+INSERT INTO t1(a,b) VALUES (1,1), (2,2), (3,2);
+EXPLAIN SELECT * FROM t1 WHERE b=2 ORDER BY a ASC;
+id 1
+select_type SIMPLE
+table t1
+type ref
+possible_keys b
+key b
+key_len 5
+ref const
+rows 1
+Extra Using where; Using index
+SELECT * FROM t1 WHERE b=2 ORDER BY a ASC;
+a b
+2 2
+3 2
+EXPLAIN SELECT * FROM t1 WHERE b=2 ORDER BY a DESC;
+id 1
+select_type SIMPLE
+table t1
+type ref
+possible_keys b
+key b
+key_len 5
+ref const
+rows 1
+Extra Using where; Using index
+SELECT * FROM t1 WHERE b=2 ORDER BY a DESC;
+a b
+3 2
+2 2
+EXPLAIN SELECT * FROM t1 ORDER BY b ASC, a ASC;
+id 1
+select_type SIMPLE
+table t1
+type index
+possible_keys NULL
+key b
+key_len 5
+ref NULL
+rows 3
+Extra Using index
+SELECT * FROM t1 ORDER BY b ASC, a ASC;
+a b
+1 1
+2 2
+3 2
+EXPLAIN SELECT * FROM t1 ORDER BY b DESC, a DESC;
+id 1
+select_type SIMPLE
+table t1
+type index
+possible_keys NULL
+key b
+key_len 5
+ref NULL
+rows 3
+Extra Using index
+SELECT * FROM t1 ORDER BY b DESC, a DESC;
+a b
+3 2
+2 2
+1 1
+EXPLAIN SELECT * FROM t1 ORDER BY b ASC, a DESC;
+id 1
+select_type SIMPLE
+table t1
+type index
+possible_keys NULL
+key b
+key_len 5
+ref NULL
+rows 3
+Extra Using index; Using filesort
+SELECT * FROM t1 ORDER BY b ASC, a DESC;
+a b
+1 1
+3 2
+2 2
+EXPLAIN SELECT * FROM t1 ORDER BY b DESC, a ASC;
+id 1
+select_type SIMPLE
+table t1
+type index
+possible_keys NULL
+key b
+key_len 5
+ref NULL
+rows 3
+Extra Using index; Using filesort
+SELECT * FROM t1 ORDER BY b DESC, a ASC;
+a b
+2 2
+3 2
+1 1
+DROP TABLE t1;
+
+#
+# Bug#27610: ALTER TABLE ROW_FORMAT=... does not rebuild the table.
+#
+
+# - prepare;
+
+DROP TABLE IF EXISTS t1;
+
+CREATE TABLE t1(c INT)
+ENGINE = InnoDB
+ROW_FORMAT = COMPACT;
+
+# - initial check;
+
+SELECT table_schema, table_name, row_format
+FROM INFORMATION_SCHEMA.TABLES
+WHERE table_schema = DATABASE() AND table_name = 't1';
+table_schema table_name row_format
+test t1 Compact
+
+# - change ROW_FORMAT and check;
+
+ALTER TABLE t1 ROW_FORMAT = REDUNDANT;
+
+SELECT table_schema, table_name, row_format
+FROM INFORMATION_SCHEMA.TABLES
+WHERE table_schema = DATABASE() AND table_name = 't1';
+table_schema table_name row_format
+test t1 Redundant
+
+# - that's it, cleanup.
+
+DROP TABLE t1;
+create table t1(a char(10) not null, unique key aa(a(1)),
+b char(4) not null, unique key bb(b(4))) engine=innodb;
+desc t1;
+Field Type Null Key Default Extra
+a char(10) NO UNI NULL
+b char(4) NO PRI NULL
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(10) NOT NULL,
+ `b` char(4) NOT NULL,
+ UNIQUE KEY `bb` (`b`),
+ UNIQUE KEY `aa` (`a`(1))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+drop table t1;
+CREATE TABLE t1 (id int, type char(6), d int, INDEX idx(id,d)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES
+(191, 'member', 1), (NULL, 'member', 3), (NULL, 'member', 4), (201, 'member', 2);
+EXPLAIN SELECT * FROM t1 WHERE id=191 OR id IS NULL ORDER BY d;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL idx NULL NULL NULL 4 Using where; Using filesort
+SELECT * FROM t1 WHERE id=191 OR id IS NULL ORDER BY d;
+id type d
+191 member 1
+NULL member 3
+NULL member 4
+DROP TABLE t1;
+set @my_innodb_autoextend_increment=@@global.innodb_autoextend_increment;
+set global innodb_autoextend_increment=8;
+set global innodb_autoextend_increment=@my_innodb_autoextend_increment;
+set @my_innodb_commit_concurrency=@@global.innodb_commit_concurrency;
+set global innodb_commit_concurrency=0;
+set global innodb_commit_concurrency=@my_innodb_commit_concurrency;
+CREATE TABLE t1 (a int, b int, c int, PRIMARY KEY (a), KEY t1_b (b))
+ENGINE=InnoDB;
+INSERT INTO t1 (a,b,c) VALUES (1,1,1), (2,1,1), (3,1,1), (4,1,1);
+INSERT INTO t1 (a,b,c) SELECT a+4,b,c FROM t1;
+EXPLAIN SELECT a, b, c FROM t1 WHERE b = 1 ORDER BY a DESC LIMIT 5;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index t1_b PRIMARY 4 NULL 8 Using where
+SELECT a, b, c FROM t1 WHERE b = 1 ORDER BY a DESC LIMIT 5;
+a b c
+8 1 1
+7 1 1
+6 1 1
+5 1 1
+4 1 1
+DROP TABLE t1;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (a char(50)) ENGINE=InnoDB;
+CREATE INDEX i1 on t1 (a(3));
+SELECT * FROM t1 WHERE a = 'abcde';
+a
+DROP TABLE t1;
+#
+# BUG #26288: savepoint are not deleted on comit, if the transaction
+# was otherwise empty
+#
+BEGIN;
+SAVEPOINT s1;
+COMMIT;
+RELEASE SAVEPOINT s1;
+ERROR 42000: SAVEPOINT s1 does not exist
+BEGIN;
+SAVEPOINT s2;
+COMMIT;
+ROLLBACK TO SAVEPOINT s2;
+ERROR 42000: SAVEPOINT s2 does not exist
+BEGIN;
+SAVEPOINT s3;
+ROLLBACK;
+RELEASE SAVEPOINT s3;
+ERROR 42000: SAVEPOINT s3 does not exist
+BEGIN;
+SAVEPOINT s4;
+ROLLBACK;
+ROLLBACK TO SAVEPOINT s4;
+ERROR 42000: SAVEPOINT s4 does not exist
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY COMMENT 'My ID#', f2 INTEGER DEFAULT NULL, f3 CHAR(10) DEFAULT 'My ID#', CONSTRAINT f2_ref FOREIGN KEY (f2) REFERENCES t1 (f1)) ENGINE=INNODB;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) NOT NULL COMMENT 'My ID#',
+ `f2` int(11) DEFAULT NULL,
+ `f3` char(10) DEFAULT 'My ID#',
+ PRIMARY KEY (`f1`),
+ KEY `f2_ref` (`f2`),
+ CONSTRAINT `f2_ref` FOREIGN KEY (`f2`) REFERENCES `t1` (`f1`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE t1;
+#
+# Bug #36995: valgrind error in remove_const during subquery executions
+#
+create table t1 (a bit(1) not null,b int) engine=myisam;
+create table t2 (c int) engine=innodb;
+explain
+select b from t1 where a not in (select b from t1,t2 group by a) group by a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+2 DEPENDENT SUBQUERY t1 system NULL NULL NULL NULL 0 const row not found
+2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1
+DROP TABLE t1,t2;
+End of 5.0 tests
+CREATE TABLE `t2` (
+`k` int(11) NOT NULL auto_increment,
+`a` int(11) default NULL,
+`c` int(11) default NULL,
+PRIMARY KEY (`k`),
+UNIQUE KEY `idx_1` (`a`)
+);
+insert into t2 ( a ) values ( 6 ) on duplicate key update c =
+ifnull( c,
+0 ) + 1;
+insert into t2 ( a ) values ( 7 ) on duplicate key update c =
+ifnull( c,
+0 ) + 1;
+select last_insert_id();
+last_insert_id()
+2
+select * from t2;
+k a c
+1 6 NULL
+2 7 NULL
+insert into t2 ( a ) values ( 6 ) on duplicate key update c =
+ifnull( c,
+0 ) + 1;
+select last_insert_id();
+last_insert_id()
+2
+select last_insert_id(0);
+last_insert_id(0)
+0
+insert into t2 ( a ) values ( 6 ) on duplicate key update c =
+ifnull( c,
+0 ) + 1;
+select last_insert_id();
+last_insert_id()
+0
+select * from t2;
+k a c
+1 6 2
+2 7 NULL
+insert ignore into t2 values (null,6,1),(10,8,1);
+select last_insert_id();
+last_insert_id()
+0
+insert ignore into t2 values (null,6,1),(null,8,1),(null,15,1),(null,20,1);
+select last_insert_id();
+last_insert_id()
+11
+select * from t2;
+k a c
+1 6 2
+2 7 NULL
+10 8 1
+11 15 1
+12 20 1
+insert into t2 ( a ) values ( 6 ) on duplicate key update c =
+ifnull( c,
+0 ) + 1, k=last_insert_id(k);
+select last_insert_id();
+last_insert_id()
+1
+select * from t2;
+k a c
+1 6 3
+2 7 NULL
+10 8 1
+11 15 1
+12 20 1
+drop table t2;
+drop table if exists t1, t2;
+create table t1 (i int);
+alter table t1 modify i int default 1;
+alter table t1 modify i int default 2, rename t2;
+lock table t2 write;
+alter table t2 modify i int default 3;
+unlock tables;
+lock table t2 write;
+alter table t2 modify i int default 4, rename t1;
+unlock tables;
+drop table t1;
+drop table if exists t1;
+create table t1 (i int);
+insert into t1 values ();
+lock table t1 write;
+alter table t1 modify i int default 1;
+insert into t1 values ();
+select * from t1;
+i
+NULL
+1
+alter table t1 change i c char(10) default "Two";
+insert into t1 values ();
+select * from t1;
+c
+NULL
+1
+Two
+unlock tables;
+select * from t1;
+c
+NULL
+1
+Two
+drop tables t1;
+create table t1(f1 varchar(5) unique, f2 timestamp NOT NULL DEFAULT
+CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);
+insert into t1(f1) values(1);
+select @a:=f2 from t1;
+@a:=f2
+#
+update t1 set f1=1;
+select @b:=f2 from t1;
+@b:=f2
+#
+select if(@a=@b,"ok","wrong");
+if(@a=@b,"ok","wrong")
+ok
+insert into t1(f1) values (1) on duplicate key update f1="1";
+select @b:=f2 from t1;
+@b:=f2
+#
+select if(@a=@b,"ok","wrong");
+if(@a=@b,"ok","wrong")
+ok
+insert into t1(f1) select f1 from t1 on duplicate key update f1="1";
+select @b:=f2 from t1;
+@b:=f2
+#
+select if(@a=@b,"ok","wrong");
+if(@a=@b,"ok","wrong")
+ok
+drop table t1;
+SET SESSION AUTOCOMMIT = 0;
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+set binlog_format=mixed;
+# Switch to connection con1
+CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(256))
+ENGINE = InnoDB;
+INSERT INTO t1 VALUES (1,2);
+# 1. test for locking:
+BEGIN;
+UPDATE t1 SET b = 12 WHERE a = 1;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+a b
+1 12
+# Switch to connection con2
+UPDATE t1 SET b = 21 WHERE a = 1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+# Switch to connection con1
+SELECT * FROM t1;
+a b
+1 12
+ROLLBACK;
+# 2. test for serialized update:
+CREATE TABLE t2 (a INT);
+TRUNCATE t1;
+INSERT INTO t1 VALUES (1,'init');
+CREATE PROCEDURE p1()
+BEGIN
+UPDATE t1 SET b = CONCAT(b, '+con2') WHERE a = 1;
+INSERT INTO t2 VALUES ();
+END|
+BEGIN;
+UPDATE t1 SET b = CONCAT(b, '+con1') WHERE a = 1;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+a b
+1 init+con1
+# Switch to connection con2
+CALL p1;;
+# Switch to connection con1
+SELECT * FROM t1;
+a b
+1 init+con1
+COMMIT;
+SELECT * FROM t1;
+a b
+1 init+con1
+# Switch to connection con2
+SELECT * FROM t1;
+a b
+1 init+con1+con2
+# Switch to connection con1
+# 3. test for updated key column:
+TRUNCATE t1;
+TRUNCATE t2;
+INSERT INTO t1 VALUES (1,'init');
+BEGIN;
+UPDATE t1 SET a = 2, b = CONCAT(b, '+con1') WHERE a = 1;
+affected rows: 1
+info: Rows matched: 1 Changed: 1 Warnings: 0
+SELECT * FROM t1;
+a b
+2 init+con1
+# Switch to connection con2
+CALL p1;;
+# Switch to connection con1
+SELECT * FROM t1;
+a b
+2 init+con1
+COMMIT;
+SELECT * FROM t1;
+a b
+2 init+con1
+# Switch to connection con2
+SELECT * FROM t1;
+a b
+2 init+con1
+DROP PROCEDURE p1;
+DROP TABLE t1, t2;
+CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL, PRIMARY KEY (a,b)) engine=innodb;
+CREATE TABLE t2 (c INT NOT NULL, d INT NOT NULL, PRIMARY KEY (c,d),
+CONSTRAINT c2 FOREIGN KEY f2 (c) REFERENCES t1 (a,b) ON UPDATE NO ACTION) engine=innodb;
+ERROR 42000: Incorrect foreign key definition for 'f2': Key reference and table reference don't match
+CREATE TABLE t2 (c INT NOT NULL, d INT NOT NULL, PRIMARY KEY (c,d),
+CONSTRAINT c2 FOREIGN KEY (c) REFERENCES t1 (a,b) ON UPDATE NO ACTION) engine=innodb;
+ERROR 42000: Incorrect foreign key definition for 'c2': Key reference and table reference don't match
+CREATE TABLE t2 (c INT NOT NULL, d INT NOT NULL, PRIMARY KEY (c,d),
+CONSTRAINT c1 FOREIGN KEY c2 (c) REFERENCES t1 (a) ON DELETE NO ACTION,
+CONSTRAINT c2 FOREIGN KEY (c) REFERENCES t1 (a) ON UPDATE NO ACTION) engine=innodb;
+ALTER TABLE t2 DROP FOREIGN KEY c2;
+DROP TABLE t2;
+CREATE TABLE t2 (c INT NOT NULL, d INT NOT NULL, PRIMARY KEY (c,d),
+FOREIGN KEY (c) REFERENCES t1 (a,k) ON UPDATE NO ACTION) engine=innodb;
+ERROR 42000: Incorrect foreign key definition for 'foreign key without name': Key reference and table reference don't match
+CREATE TABLE t2 (c INT NOT NULL, d INT NOT NULL, PRIMARY KEY (c,d),
+FOREIGN KEY f1 (c) REFERENCES t1 (a,k) ON UPDATE NO ACTION) engine=innodb;
+ERROR 42000: Incorrect foreign key definition for 'f1': Key reference and table reference don't match
+CREATE TABLE t2 (c INT NOT NULL, d INT NOT NULL, PRIMARY KEY (c,d),
+CONSTRAINT c1 FOREIGN KEY f1 (c) REFERENCES t1 (a) ON DELETE NO ACTION,
+CONSTRAINT c2 FOREIGN KEY (c) REFERENCES t1 (a) ON UPDATE NO ACTION,
+FOREIGN KEY f3 (c) REFERENCES t1 (a) ON UPDATE NO ACTION,
+FOREIGN KEY (c) REFERENCES t1 (a) ON UPDATE NO ACTION) engine=innodb;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c` int(11) NOT NULL,
+ `d` int(11) NOT NULL,
+ PRIMARY KEY (`c`,`d`),
+ CONSTRAINT `c1` FOREIGN KEY (`c`) REFERENCES `t1` (`a`) ON DELETE NO ACTION,
+ CONSTRAINT `c2` FOREIGN KEY (`c`) REFERENCES `t1` (`a`) ON UPDATE NO ACTION,
+ CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`c`) REFERENCES `t1` (`a`) ON UPDATE NO ACTION,
+ CONSTRAINT `t2_ibfk_2` FOREIGN KEY (`c`) REFERENCES `t1` (`a`) ON UPDATE NO ACTION
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE t2;
+DROP TABLE t1;
+create table t1 (a int auto_increment primary key) engine=innodb;
+alter table t1 order by a;
+Warnings:
+Warning 1105 ORDER BY ignored as there is a user-defined clustered index in the table 't1'
+drop table t1;
+CREATE TABLE t1
+(vid integer NOT NULL,
+tid integer NOT NULL,
+idx integer NOT NULL,
+name varchar(128) NOT NULL,
+type varchar(128) NULL,
+PRIMARY KEY(idx, vid, tid),
+UNIQUE(vid, tid, name)
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES
+(1,1,1,'pk',NULL),(2,1,1,'pk',NULL),(3,1,1,'pk',NULL),(4,1,1,'c1',NULL),
+(5,1,1,'pk',NULL),(1,1,2,'c1',NULL),(2,1,2,'c1',NULL),(3,1,2,'c1',NULL),
+(4,1,2,'c2',NULL),(5,1,2,'c1',NULL),(2,1,3,'c2',NULL),(3,1,3,'c2',NULL),
+(4,1,3,'pk',NULL),(5,1,3,'c2',NULL),
+(2,1,4,'c_extra',NULL),(3,1,4,'c_extra',NULL);
+EXPLAIN SELECT * FROM t1 FORCE INDEX (PRIMARY) WHERE tid = 1 AND vid = 3 ORDER BY idx DESC;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index NULL PRIMARY 12 NULL 16 Using where
+SELECT * FROM t1 FORCE INDEX (PRIMARY) WHERE tid = 1 AND vid = 3 ORDER BY idx DESC;
+vid tid idx name type
+3 1 4 c_extra NULL
+3 1 3 c2 NULL
+3 1 2 c1 NULL
+3 1 1 pk NULL
+DROP TABLE t1;
+#
+# Bug #44290: explain crashes for subquery with distinct in
+# SQL_SELECT::test_quick_select
+# (reproduced only with InnoDB tables)
+#
+CREATE TABLE t1 (c1 INT, c2 INT, c3 INT, KEY (c3), KEY (c2, c3))
+ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,1,1), (1,1,1), (1,1,2), (1,1,1), (1,1,2);
+SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
+FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
+1
+1
+EXPLAIN
+SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
+FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> system NULL NULL NULL NULL 1
+2 DERIVED t1 index c3,c2 c2 10 NULL 5
+DROP TABLE t1;
+CREATE TABLE t1 (c1 REAL, c2 REAL, c3 REAL, KEY (c3), KEY (c2, c3))
+ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,1,1), (1,1,1), (1,1,2), (1,1,1), (1,1,2);
+SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
+FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
+1
+1
+EXPLAIN
+SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
+FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> system NULL NULL NULL NULL 1
+2 DERIVED t1 index c3,c2 c2 18 NULL 5
+DROP TABLE t1;
+CREATE TABLE t1 (c1 DECIMAL(12,2), c2 DECIMAL(12,2), c3 DECIMAL(12,2),
+KEY (c3), KEY (c2, c3))
+ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,1,1), (1,1,1), (1,1,2), (1,1,1), (1,1,2);
+SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
+FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
+1
+1
+EXPLAIN
+SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
+FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> system NULL NULL NULL NULL 1
+2 DERIVED t1 index c3,c2 c2 14 NULL 5
+DROP TABLE t1;
+End of 5.1 tests
+drop table if exists t1, t2, t3;
+create table t1(a int);
+insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t2 (a int, b int, pk int, key(a,b), primary key(pk)) engine=innodb;
+insert into t2 select @a:=A.a+10*(B.a + 10*C.a),@a, @a from t1 A, t1 B, t1 C;
+this must use key 'a', not PRIMARY:
+explain select a from t2 where a=b;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 index NULL a 10 NULL # Using where; Using index
+drop table t1, t2;
+SET SESSION BINLOG_FORMAT=STATEMENT;
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+select @@session.sql_log_bin, @@session.binlog_format, @@session.tx_isolation;
+@@session.sql_log_bin 1
+@@session.binlog_format STATEMENT
+@@session.tx_isolation READ-COMMITTED
+CREATE TABLE t1 ( a INT ) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1);
+DROP TABLE t1;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (a char(50)) ENGINE=InnoDB;
+CREATE INDEX i1 on t1 (a(3));
+SELECT * FROM t1 WHERE a = 'abcde';
+a
+DROP TABLE t1;
+CREATE TABLE foo (a int, b int, c char(10),
+PRIMARY KEY (c(3)),
+KEY b (b)
+) engine=innodb;
+CREATE TABLE foo2 (a int, b int, c char(10),
+PRIMARY KEY (c),
+KEY b (b)
+) engine=innodb;
+CREATE TABLE bar (a int, b int, c char(10),
+PRIMARY KEY (c(3)),
+KEY b (b)
+) engine=myisam;
+INSERT INTO foo VALUES
+(1,2,'abcdefghij'), (2,3,''), (3,4,'klmnopqrst'),
+(4,5,'uvwxyz'), (5,6,'meotnsyglt'), (4,5,'asfdewe');
+INSERT INTO bar SELECT * FROM foo;
+INSERT INTO foo2 SELECT * FROM foo;
+EXPLAIN SELECT c FROM bar WHERE b>2;;
+id 1
+select_type SIMPLE
+table bar
+type ALL
+possible_keys b
+key NULL
+key_len NULL
+ref NULL
+rows 6
+Extra Using where
+EXPLAIN SELECT c FROM foo WHERE b>2;;
+id 1
+select_type SIMPLE
+table foo
+type ALL
+possible_keys b
+key NULL
+key_len NULL
+ref NULL
+rows 6
+Extra Using where
+EXPLAIN SELECT c FROM foo2 WHERE b>2;;
+id 1
+select_type SIMPLE
+table foo2
+type range
+possible_keys b
+key b
+key_len 5
+ref NULL
+rows 3
+Extra Using where; Using index
+EXPLAIN SELECT c FROM bar WHERE c>2;;
+id 1
+select_type SIMPLE
+table bar
+type ALL
+possible_keys PRIMARY
+key NULL
+key_len NULL
+ref NULL
+rows 6
+Extra Using where
+EXPLAIN SELECT c FROM foo WHERE c>2;;
+id 1
+select_type SIMPLE
+table foo
+type ALL
+possible_keys PRIMARY
+key NULL
+key_len NULL
+ref NULL
+rows 6
+Extra Using where
+EXPLAIN SELECT c FROM foo2 WHERE c>2;;
+id 1
+select_type SIMPLE
+table foo2
+type index
+possible_keys PRIMARY
+key b
+key_len 5
+ref NULL
+rows 6
+Extra Using where; Using index
+DROP TABLE foo, bar, foo2;
+DROP TABLE IF EXISTS t1,t3,t2;
+DROP FUNCTION IF EXISTS f1;
+CREATE FUNCTION f1() RETURNS VARCHAR(250)
+BEGIN
+return 'hhhhhhh' ;
+END|
+CREATE TABLE t1 (a VARCHAR(20), b VARCHAR(20), c VARCHAR(20)) ENGINE=INNODB;
+BEGIN WORK;
+CREATE TEMPORARY TABLE t2 (a VARCHAR(20), b VARCHAR(20), c varchar(20)) ENGINE=INNODB;
+CREATE TEMPORARY TABLE t3 LIKE t2;
+INSERT INTO t1 VALUES ('a','b',NULL),('c','d',NULL),('e','f',NULL);
+SET @stmt := CONCAT('INSERT INTO t2 SELECT tbl.a, tbl.b, f1()',' FROM t1 tbl');
+PREPARE stmt1 FROM @stmt;
+SET @stmt := CONCAT('INSERT INTO t3', ' SELECT * FROM t2');
+PREPARE stmt3 FROM @stmt;
+EXECUTE stmt1;
+COMMIT;
+DEALLOCATE PREPARE stmt1;
+DEALLOCATE PREPARE stmt3;
+DROP TABLE t1,t3,t2;
+DROP FUNCTION f1;
+DROP TABLE IF EXISTS t1,t2;
+CREATE TABLE t1 (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
+CREATE TABLE t2 (id INT PRIMARY KEY,
+t1_id INT, INDEX par_ind (t1_id),
+FOREIGN KEY (t1_id) REFERENCES t1(id)) ENGINE=INNODB;
+INSERT INTO t1 VALUES (1),(2);
+INSERT INTO t2 VALUES (3,2);
+SET AUTOCOMMIT = 0;
+START TRANSACTION;
+TRUNCATE TABLE t1;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`t1_id`) REFERENCES `t1` (`id`))
+SELECT * FROM t1;
+id
+1
+2
+COMMIT;
+SELECT * FROM t1;
+id
+1
+2
+START TRANSACTION;
+TRUNCATE TABLE t1;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`t1_id`) REFERENCES `t1` (`id`))
+SELECT * FROM t1;
+id
+1
+2
+ROLLBACK;
+SELECT * FROM t1;
+id
+1
+2
+SET AUTOCOMMIT = 1;
+START TRANSACTION;
+SELECT * FROM t1;
+id
+1
+2
+COMMIT;
+TRUNCATE TABLE t1;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`t1_id`) REFERENCES `t1` (`id`))
+SELECT * FROM t1;
+id
+1
+2
+DELETE FROM t2 WHERE id = 3;
+START TRANSACTION;
+SELECT * FROM t1;
+id
+1
+2
+TRUNCATE TABLE t1;
+ROLLBACK;
+SELECT * FROM t1;
+id
+TRUNCATE TABLE t2;
+DROP TABLE t2;
+DROP TABLE t1;
+#
+# Bug#40127 Multiple table DELETE IGNORE hangs on foreign key constraint violation on 5.0
+#
+CREATE TABLE t1 (
+id INT UNSIGNED NOT NULL AUTO_INCREMENT,
+PRIMARY KEY (id)
+) ENGINE=InnoDB;
+CREATE TABLE t2 (
+id INT UNSIGNED NOT NULL AUTO_INCREMENT,
+aid INT UNSIGNED NOT NULL,
+PRIMARY KEY (id),
+FOREIGN KEY (aid) REFERENCES t1 (id)
+) ENGINE=InnoDB;
+CREATE TABLE t3 (
+bid INT UNSIGNED NOT NULL,
+FOREIGN KEY (bid) REFERENCES t2 (id)
+) ENGINE=InnoDB;
+CREATE TABLE t4 (
+a INT
+) ENGINE=InnoDB;
+CREATE TABLE t5 (
+a INT
+) ENGINE=InnoDB;
+INSERT INTO t1 (id) VALUES (1);
+INSERT INTO t2 (id, aid) VALUES (1, 1),(2,1),(3,1),(4,1);
+INSERT INTO t3 (bid) VALUES (1);
+INSERT INTO t4 VALUES (1),(2),(3),(4),(5);
+INSERT INTO t5 VALUES (1);
+DELETE t5 FROM t4 LEFT JOIN t5 ON t4.a= t5.a;
+DELETE t2, t1 FROM t2 INNER JOIN t1 ON (t2.aid = t1.id) WHERE t2.id = 1;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t3`, CONSTRAINT `t3_ibfk_1` FOREIGN KEY (`bid`) REFERENCES `t2` (`id`))
+DELETE t2, t1 FROM t2 INNER JOIN t1 ON (t2.aid = t1.id) WHERE t2.id = 1;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t3`, CONSTRAINT `t3_ibfk_1` FOREIGN KEY (`bid`) REFERENCES `t2` (`id`))
+DELETE IGNORE t2, t1 FROM t2 INNER JOIN t1 ON (t2.aid = t1.id) WHERE t2.id = 1;
+DROP TABLE t3;
+DROP TABLE t2;
+DROP TABLE t1;
+DROP TABLES t4,t5;
+# Bug#40127 Multiple table DELETE IGNORE hangs on foreign key constraint violation on 5.0
+# Testing for any side effects of IGNORE on AFTER DELETE triggers used with
+# transactional tables.
+#
+CREATE TABLE t1 (i INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t2 (a VARCHAR(100)) ENGINE=InnoDB;
+CREATE TABLE t3 (i INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t4 (i INT NOT NULL PRIMARY KEY, t1i INT,
+FOREIGN KEY (t1i) REFERENCES t1(i))
+ENGINE=InnoDB;
+CREATE TRIGGER trg AFTER DELETE ON t1 FOR EACH ROW
+BEGIN
+SET @b:='EXECUTED TRIGGER';
+INSERT INTO t2 VALUES (@b);
+SET @a:= error_happens_here;
+END||
+SET @b:="";
+SET @a:="";
+INSERT INTO t1 VALUES (1),(2),(3),(4);
+INSERT INTO t3 SELECT * FROM t1;
+** An error in a trigger causes rollback of the statement.
+DELETE t1 FROM t3 LEFT JOIN t1 ON t1.i=t3.i;
+ERROR 42S22: Unknown column 'error_happens_here' in 'field list'
+SELECT @a,@b;
+@a @b
+ EXECUTED TRIGGER
+SELECT * FROM t2;
+a
+SELECT * FROM t1 LEFT JOIN t3 ON t1.i=t3.i;
+i i
+1 1
+2 2
+3 3
+4 4
+** Same happens with the IGNORE option
+DELETE IGNORE t1 FROM t3 LEFT JOIN t1 ON t1.i=t3.i;
+ERROR 42S22: Unknown column 'error_happens_here' in 'field list'
+SELECT * FROM t2;
+a
+SELECT * FROM t1 LEFT JOIN t3 ON t1.i=t3.i;
+i i
+1 1
+2 2
+3 3
+4 4
+**
+** The following is an attempt to demonstrate
+** error handling inside a row iteration.
+**
+DROP TRIGGER trg;
+TRUNCATE TABLE t1;
+TRUNCATE TABLE t2;
+TRUNCATE TABLE t3;
+INSERT INTO t1 VALUES (1),(2),(3),(4);
+INSERT INTO t3 VALUES (1),(2),(3),(4);
+INSERT INTO t4 VALUES (3,3),(4,4);
+CREATE TRIGGER trg AFTER DELETE ON t1 FOR EACH ROW
+BEGIN
+SET @b:= CONCAT('EXECUTED TRIGGER FOR ROW ',CAST(OLD.i AS CHAR));
+INSERT INTO t2 VALUES (@b);
+END||
+** DELETE is prevented by foreign key constrains but errors are silenced.
+** The AFTER trigger isn't fired.
+DELETE IGNORE t1 FROM t3 LEFT JOIN t1 ON t1.i=t3.i;
+** Tables are modified by best effort:
+SELECT * FROM t1 LEFT JOIN t3 ON t1.i=t3.i;
+i i
+3 3
+4 4
+** The AFTER trigger was only executed on successful rows:
+SELECT * FROM t2;
+a
+EXECUTED TRIGGER FOR ROW 1
+EXECUTED TRIGGER FOR ROW 2
+DROP TRIGGER trg;
+**
+** Induce an error midway through an AFTER-trigger
+**
+TRUNCATE TABLE t4;
+TRUNCATE TABLE t1;
+TRUNCATE TABLE t3;
+INSERT INTO t1 VALUES (1),(2),(3),(4);
+INSERT INTO t3 VALUES (1),(2),(3),(4);
+CREATE TRIGGER trg AFTER DELETE ON t1 FOR EACH ROW
+BEGIN
+SET @a:= @a+1;
+IF @a > 2 THEN
+INSERT INTO t4 VALUES (5,5);
+END IF;
+END||
+SET @a:=0;
+** Errors in the trigger causes the statement to abort.
+DELETE IGNORE t1 FROM t3 LEFT JOIN t1 ON t1.i=t3.i;
+ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t4`, CONSTRAINT `t4_ibfk_1` FOREIGN KEY (`t1i`) REFERENCES `t1` (`i`))
+SELECT * FROM t1 LEFT JOIN t3 ON t1.i=t3.i;
+i i
+1 1
+2 2
+3 3
+4 4
+SELECT * FROM t4;
+i t1i
+DROP TRIGGER trg;
+DROP TABLE t4;
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+CREATE TABLE t1 (a INT, b INT, KEY (a)) ENGINE = INNODB;
+CREATE TABLE t2 (a INT KEY, b INT, KEY (b)) ENGINE = INNODB;
+CREATE TABLE t3 (a INT, b INT KEY, KEY (a)) ENGINE = INNODB;
+CREATE TABLE t4 (a INT KEY, b INT, KEY (b)) ENGINE = INNODB;
+INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6);
+INSERT INTO t2 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
+INSERT INTO t3 VALUES (1, 101), (2, 102), (3, 103), (4, 104), (5, 105), (6, 106);
+INSERT INTO t4 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
+UPDATE t1, t2 SET t1.a = t1.a + 100, t2.b = t1.a + 10
+WHERE t1.a BETWEEN 2 AND 4 AND t2.a = t1.b;
+SELECT * FROM t2;
+a b
+1 1
+2 12
+3 13
+4 14
+5 5
+UPDATE t3, t4 SET t3.a = t3.a + 100, t4.b = t3.a + 10
+WHERE t3.a BETWEEN 2 AND 4 AND t4.a = t3.b - 100;
+SELECT * FROM t4;
+a b
+1 1
+2 12
+3 13
+4 14
+5 5
+DROP TABLE t1, t2, t3, t4;
+#
+# Bug#44886: SIGSEGV in test_if_skip_sort_order() -
+# uninitialized variable used as subscript
+#
+CREATE TABLE t1 (a INT, b INT, c INT, d INT, PRIMARY KEY (b), KEY (a,c))
+ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,1,1,0);
+CREATE TABLE t2 (a INT, b INT, e INT, KEY (e)) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1,1,2);
+CREATE TABLE t3 (a INT, b INT) ENGINE=MyISAM;
+INSERT INTO t3 VALUES (1, 1);
+SELECT * FROM t1, t2, t3
+WHERE t1.a = t3.a AND (t1.b = t3.b OR t1.d) AND t2.b = t1.b AND t2.e = 2
+GROUP BY t1.b;
+a b c d a b e a b
+1 1 1 0 1 1 2 1 1
+DROP TABLE t1, t2, t3;
+#
+# Bug #45828: Optimizer won't use partial primary key if another
+# index can prevent filesort
+#
+CREATE TABLE `t1` (
+c1 int NOT NULL,
+c2 int NOT NULL,
+c3 int NOT NULL,
+PRIMARY KEY (c1,c2),
+KEY (c3)
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (5,2,1246276747);
+INSERT INTO t1 VALUES (2,1,1246281721);
+INSERT INTO t1 VALUES (7,3,1246281756);
+INSERT INTO t1 VALUES (4,2,1246282139);
+INSERT INTO t1 VALUES (3,1,1246282230);
+INSERT INTO t1 VALUES (1,0,1246282712);
+INSERT INTO t1 VALUES (8,3,1246282765);
+INSERT INTO t1 SELECT c1+10,c2+10,c3+10 FROM t1;
+INSERT INTO t1 SELECT c1+100,c2+100,c3+100 from t1;
+INSERT INTO t1 SELECT c1+1000,c2+1000,c3+1000 from t1;
+INSERT INTO t1 SELECT c1+10000,c2+10000,c3+10000 from t1;
+INSERT INTO t1 SELECT c1+100000,c2+100000,c3+100000 from t1;
+INSERT INTO t1 SELECT c1+1000000,c2+1000000,c3+1000000 from t1;
+SELECT * FROM t1 WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3;
+c1 c2 c3
+EXPLAIN SELECT * FROM t1 WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref PRIMARY,c3 PRIMARY 4 const 1 Using where; Using filesort
+EXPLAIN SELECT * FROM t1 FORCE INDEX (PRIMARY) WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref PRIMARY PRIMARY 4 const 1 Using where; Using filesort
+CREATE TABLE t2 (
+c1 int NOT NULL,
+c2 int NOT NULL,
+c3 int NOT NULL,
+KEY (c1,c2),
+KEY (c3)
+) ENGINE=InnoDB;
+explain SELECT * FROM t2 WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ref c1,c3 c1 4 const 1 Using where; Using filesort
+DROP TABLE t1,t2;
+#
+# 36259: Optimizing with ORDER BY
+#
+CREATE TABLE t1 (
+a INT NOT NULL AUTO_INCREMENT,
+b INT NOT NULL,
+c INT NOT NULL,
+d VARCHAR(5),
+e INT NOT NULL,
+PRIMARY KEY (a), KEY i2 (b,c,d)
+) ENGINE=InnoDB;
+INSERT INTO t1 (b,c,d,e) VALUES (1,1,'a',1), (2,2,'b',2);
+INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
+INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
+INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
+INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
+INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
+INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
+EXPLAIN SELECT * FROM t1 WHERE b=1 AND c=1 ORDER BY a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref i2 i2 8 const,const 1 Using where; Using filesort
+EXPLAIN SELECT * FROM t1 FORCE INDEX(i2) WHERE b=1 and c=1 ORDER BY a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref i2 i2 8 const,const 1 Using where; Using filesort
+EXPLAIN SELECT * FROM t1 FORCE INDEX(PRIMARY) WHERE b=1 AND c=1 ORDER BY a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index NULL PRIMARY 4 NULL 128 Using where
+DROP TABLE t1;
+#
+# Bug #47963: Wrong results when index is used
+#
+CREATE TABLE t1(
+a VARCHAR(5) NOT NULL,
+b VARCHAR(5) NOT NULL,
+c DATETIME NOT NULL,
+KEY (c)
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES('TEST', 'TEST', '2009-10-09 00:00:00');
+SELECT * FROM t1 WHERE a = 'TEST' AND
+c >= '2009-10-09 00:00:00' AND c <= '2009-10-09 00:00:00';
+a b c
+TEST TEST 2009-10-09 00:00:00
+SELECT * FROM t1 WHERE a = 'TEST' AND
+c >= '2009-10-09 00:00:00.0' AND c <= '2009-10-09 00:00:00.0';
+a b c
+TEST TEST 2009-10-09 00:00:00
+SELECT * FROM t1 WHERE a = 'TEST' AND
+c >= '2009-10-09 00:00:00.0' AND c <= '2009-10-09 00:00:00';
+a b c
+TEST TEST 2009-10-09 00:00:00
+SELECT * FROM t1 WHERE a = 'TEST' AND
+c >= '2009-10-09 00:00:00' AND c <= '2009-10-09 00:00:00.0';
+a b c
+TEST TEST 2009-10-09 00:00:00
+SELECT * FROM t1 WHERE a = 'TEST' AND
+c >= '2009-10-09 00:00:00.000' AND c <= '2009-10-09 00:00:00.000';
+a b c
+TEST TEST 2009-10-09 00:00:00
+SELECT * FROM t1 WHERE a = 'TEST' AND
+c >= '2009-10-09 00:00:00.00' AND c <= '2009-10-09 00:00:00.001';
+a b c
+TEST TEST 2009-10-09 00:00:00
+SELECT * FROM t1 WHERE a = 'TEST' AND
+c >= '2009-10-09 00:00:00.001' AND c <= '2009-10-09 00:00:00.00';
+a b c
+EXPLAIN SELECT * FROM t1 WHERE a = 'TEST' AND
+c >= '2009-10-09 00:00:00.001' AND c <= '2009-10-09 00:00:00.00';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+DROP TABLE t1;
+#
+# Bug #46175: NULL read_view and consistent read assertion
+#
+CREATE TABLE t1(a CHAR(13),KEY(a)) ENGINE=innodb;
+CREATE TABLE t2(b DATETIME,KEY(b)) ENGINE=innodb;
+INSERT INTO t1 VALUES (),();
+INSERT INTO t2 VALUES (),();
+CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t2
+WHERE b =(SELECT a FROM t1 LIMIT 1);
+CREATE PROCEDURE p1(num INT)
+BEGIN
+DECLARE i INT DEFAULT 0;
+REPEAT
+SHOW CREATE VIEW v1;
+SET i:=i+1;
+UNTIL i>num END REPEAT;
+END|
+# Should not crash
+# Should not crash
+DROP PROCEDURE p1;
+DROP VIEW v1;
+DROP TABLE t1,t2;
+#
+# Bug #49324: more valgrind errors in test_if_skip_sort_order
+#
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb ;
+#should not cause valgrind warnings
+SELECT 1 FROM t1 JOIN t1 a USING(a) GROUP BY t1.a,t1.a;
+1
+DROP TABLE t1;
+#
+# Bug#50843: Filesort used instead of clustered index led to
+# performance degradation.
+#
+create table t1(f1 int not null primary key, f2 int) engine=innodb;
+create table t2(f1 int not null, key (f1)) engine=innodb;
+insert into t1 values (1,1),(2,2),(3,3);
+insert into t2 values (1),(2),(3);
+explain select t1.* from t1 left join t2 using(f1) group by t1.f1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index NULL PRIMARY 4 NULL 3
+1 SIMPLE t2 ref f1 f1 4 test.t1.f1 1 Using index
+drop table t1,t2;
+#
+#
+# Bug #49838: DROP INDEX and ADD UNIQUE INDEX for same index may
+# corrupt definition at engine
+#
+CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL, KEY k (a,b))
+ENGINE=InnoDB;
+ALTER TABLE t1 DROP INDEX k, ADD UNIQUE INDEX k (a,b);
+SHOW INDEXES FROM t1;;
+Table t1
+Non_unique 0
+Key_name k
+Seq_in_index 1
+Column_name a
+Collation A
+Cardinality 0
+Sub_part NULL
+Packed NULL
+Null
+Index_type BTREE
+Comment
+Table t1
+Non_unique 0
+Key_name k
+Seq_in_index 2
+Column_name b
+Collation A
+Cardinality 0
+Sub_part NULL
+Packed NULL
+Null
+Index_type BTREE
+Comment
+DROP TABLE t1;
+#
+# Bug #53334: wrong result for outer join with impossible ON condition
+# (see the same test case for MyISAM in join.test)
+#
+create table t1 (id int primary key);
+create table t2 (id int);
+insert into t1 values (75);
+insert into t1 values (79);
+insert into t1 values (78);
+insert into t1 values (77);
+replace into t1 values (76);
+replace into t1 values (76);
+insert into t1 values (104);
+insert into t1 values (103);
+insert into t1 values (102);
+insert into t1 values (101);
+insert into t1 values (105);
+insert into t1 values (106);
+insert into t1 values (107);
+insert into t2 values (107),(75),(1000);
+select t1.id,t2.id from t2 left join t1 on t1.id>=74 and t1.id<=0
+where t2.id=75 and t1.id is null;
+id id
+NULL 75
+explain select t1.id,t2.id from t2 left join t1 on t1.id>=74 and t1.id<=0
+where t2.id=75 and t1.id is null;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 const PRIMARY NULL NULL NULL 1 Impossible ON condition
+1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where
+drop table t1,t2;
+#
+# Bug #47453: InnoDB incorrectly changes TIMESTAMP columns when
+# JOINed during an UPDATE
+#
+CREATE TABLE t1 (d INT) ENGINE=InnoDB;
+CREATE TABLE t2 (a INT, b INT,
+c TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
+ON UPDATE CURRENT_TIMESTAMP) ENGINE=InnoDB;
+set up our data elements
+INSERT INTO t1 (d) VALUES (1);
+INSERT INTO t2 (a,b) VALUES (1,1);
+SELECT SECOND(c) INTO @bug47453 FROM t2;
+SELECT SECOND(c)-@bug47453 FROM t1 JOIN t2 ON d=a;
+SECOND(c)-@bug47453
+0
+UPDATE t1 JOIN t2 ON d=a SET b=1 WHERE a=1;
+SELECT SECOND(c)-@bug47453 FROM t1 JOIN t2 ON d=a;
+SECOND(c)-@bug47453
+0
+SELECT SLEEP(1);
+SLEEP(1)
+0
+UPDATE t1 JOIN t2 ON d=a SET b=1 WHERE a=1;
+#should be 0
+SELECT SECOND(c)-@bug47453 FROM t1 JOIN t2 ON d=a;
+SECOND(c)-@bug47453
+0
+DROP TABLE t1, t2;
+#
+# Bug#38999 valgrind warnings for update statement in function compare_record()
+#
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 values (1),(2),(3),(4),(5);
+INSERT INTO t2 values (1);
+SELECT * FROM t1 WHERE a = 2;
+a
+2
+UPDATE t1,t2 SET t1.a = t1.a + 100 WHERE t1.a = 1;
+DROP TABLE t1,t2;
+#
+# Bug #53334: wrong result for outer join with impossible ON condition
+# (see the same test case for MyISAM in join.test)
+#
+CREATE TABLE t1 (id INT PRIMARY KEY);
+CREATE TABLE t2 (id INT);
+INSERT INTO t1 VALUES (75);
+INSERT INTO t1 VALUES (79);
+INSERT INTO t1 VALUES (78);
+INSERT INTO t1 VALUES (77);
+REPLACE INTO t1 VALUES (76);
+REPLACE INTO t1 VALUES (76);
+INSERT INTO t1 VALUES (104);
+INSERT INTO t1 VALUES (103);
+INSERT INTO t1 VALUES (102);
+INSERT INTO t1 VALUES (101);
+INSERT INTO t1 VALUES (105);
+INSERT INTO t1 VALUES (106);
+INSERT INTO t1 VALUES (107);
+INSERT INTO t2 VALUES (107),(75),(1000);
+SELECT t1.id,t2.id FROM t2 LEFT JOIN t1 ON t1.id>=74 AND t1.id<=0
+WHERE t2.id=75 AND t1.id IS NULL;
+id id
+NULL 75
+EXPLAIN SELECT t1.id,t2.id FROM t2 LEFT JOIN t1 ON t1.id>=74 AND t1.id<=0
+WHERE t2.id=75 AND t1.id IS NULL;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 const PRIMARY NULL NULL NULL 1 Impossible ON condition
+1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where
+DROP TABLE t1,t2;
+#
+# Bug #53830: !table || (!table->read_set || bitmap_is_set(table->read_set, field_index))
+#
+CREATE TABLE t1 (a INT, b INT, c INT, d INT,
+PRIMARY KEY(a,b,c), KEY(b,d))
+ENGINE=InnoDB;
+INSERT INTO t1 VALUES (0, 77, 1, 3);
+UPDATE t1 SET d = 0 WHERE b = 77 AND c = 25;
+DROP TABLE t1;
+#
+# Bug#50389 Using intersect does not return all rows
+#
+CREATE TABLE t1 (
+f1 INT(10) NOT NULL,
+f2 INT(10),
+f3 INT(10),
+f4 TINYINT(4),
+f5 VARCHAR(50),
+PRIMARY KEY (f1),
+KEY idx1 (f2,f5,f4),
+KEY idx2 (f2,f4)
+) ENGINE=InnoDB;
+LOAD DATA INFILE '../../std_data/intersect-bug50389.tsv' INTO TABLE t1;
+SELECT * FROM t1 WHERE f1 IN
+(3305028,3353871,3772880,3346860,4228206,3336022,
+3470988,3305175,3329875,3817277,3856380,3796193,
+3784744,4180925,4559596,3963734,3856391,4494153)
+AND f5 = 'abcdefghijklmnopwrst' AND f2 = 1221457 AND f4 = 0 ;
+f1 f2 f3 f4 f5
+3305175 1221457 0 0 abcdefghijklmnopwrst
+3329875 1221457 1382427 0 abcdefghijklmnopwrst
+3336022 1221457 0 0 abcdefghijklmnopwrst
+3346860 1221457 0 0 abcdefghijklmnopwrst
+3772880 1221457 0 0 abcdefghijklmnopwrst
+3784744 1221457 1382427 0 abcdefghijklmnopwrst
+3796193 1221457 0 0 abcdefghijklmnopwrst
+4228206 1221457 0 0 abcdefghijklmnopwrst
+4494153 1221457 0 0 abcdefghijklmnopwrst
+4559596 1221457 0 0 abcdefghijklmnopwrst
+EXPLAIN SELECT * FROM t1 WHERE f1 IN
+(3305028,3353871,3772880,3346860,4228206,3336022,
+3470988,3305175,3329875,3817277,3856380,3796193,
+3784744,4180925,4559596,3963734,3856391,4494153)
+AND f5 = 'abcdefghijklmnopwrst' AND f2 = 1221457 AND f4 = 0 ;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 index_merge PRIMARY,idx1,idx2 idx2,idx1,PRIMARY 7,60,4 NULL 1 Using intersect(idx2,idx1,PRIMARY); Using where
+DROP TABLE t1;
+#
+# Bug#51431 Wrong sort order after import of dump file
+#
+CREATE TABLE t1 (
+f1 INT(11) NOT NULL,
+f2 int(11) NOT NULL,
+f3 int(11) NOT NULL,
+f4 tinyint(1) NOT NULL,
+PRIMARY KEY (f1),
+UNIQUE KEY (f2, f3),
+KEY (f4)
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES
+(1,1,991,1), (2,1,992,1), (3,1,993,1), (4,1,994,1), (5,1,995,1),
+(6,1,996,1), (7,1,997,1), (8,1,998,1), (10,1,999,1), (11,1,9910,1),
+(16,1,9911,1), (17,1,9912,1), (18,1,9913,1), (19,1,9914,1), (20,1,9915,1),
+(21,1,9916,1), (22,1,9917,1), (23,1,9918,1), (24,1,9919,1), (25,1,9920,1),
+(26,1,9921,1), (27,1,9922,1);
+FLUSH TABLES;
+SELECT * FROM t1 WHERE f2 = 1 AND f4 = TRUE
+ORDER BY f1 DESC LIMIT 5;
+f1 f2 f3 f4
+27 1 9922 1
+26 1 9921 1
+25 1 9920 1
+24 1 9919 1
+23 1 9918 1
+EXPLAIN SELECT * FROM t1 WHERE f2 = 1 AND f4 = TRUE
+ORDER BY f1 DESC LIMIT 5;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range f2,f4 f4 1 NULL 11 Using where
+DROP TABLE t1;
+End of 5.1 tests
diff --git a/mysql-test/r/innodb_mysql_rbk.result b/mysql-test/suite/innodb/r/innodb_mysql_rbk.result
index 21ac4295325..21ac4295325 100644
--- a/mysql-test/r/innodb_mysql_rbk.result
+++ b/mysql-test/suite/innodb/r/innodb_mysql_rbk.result
diff --git a/mysql-test/r/innodb_notembedded.result b/mysql-test/suite/innodb/r/innodb_notembedded.result
index af332aba38a..af332aba38a 100644
--- a/mysql-test/r/innodb_notembedded.result
+++ b/mysql-test/suite/innodb/r/innodb_notembedded.result
diff --git a/mysql-test/r/innodb_timeout_rollback.result b/mysql-test/suite/innodb/r/innodb_timeout_rollback.result
index e2da6ba8af7..e2da6ba8af7 100644
--- a/mysql-test/r/innodb_timeout_rollback.result
+++ b/mysql-test/suite/innodb/r/innodb_timeout_rollback.result
diff --git a/mysql-test/suite/innodb/t/disabled.def b/mysql-test/suite/innodb/t/disabled.def
index 7ab00a90758..6e475d18211 100644
--- a/mysql-test/suite/innodb/t/disabled.def
+++ b/mysql-test/suite/innodb/t/disabled.def
@@ -9,6 +9,8 @@
# Do not use any TAB characters for whitespace.
#
##############################################################################
+
innodb : Bug#53306 2010-04-30 VasilDimov valgrind warnings
innodb_bug52663 : Waiting for merge with XtraDB
innodb_bug51920 : Waiting for merge with XtraDB
+innodb_bug48024 : Waiting for merge with XtraDB
diff --git a/mysql-test/t/innodb-autoinc-optimize.test b/mysql-test/suite/innodb/t/innodb-autoinc-optimize.test
index 0f0cb57f92f..0f0cb57f92f 100644
--- a/mysql-test/t/innodb-autoinc-optimize.test
+++ b/mysql-test/suite/innodb/t/innodb-autoinc-optimize.test
diff --git a/mysql-test/t/innodb-ucs2.test b/mysql-test/suite/innodb/t/innodb-ucs2.test
index 7b91ef37d3f..7b91ef37d3f 100644
--- a/mysql-test/t/innodb-ucs2.test
+++ b/mysql-test/suite/innodb/t/innodb-ucs2.test
diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test
new file mode 100644
index 00000000000..480183b9e2d
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb.test
@@ -0,0 +1,1387 @@
+#######################################################################
+# #
+# Please, DO NOT TOUCH this file as well as the innodb.result file. #
+# These files are to be modified ONLY BY INNOBASE guys. #
+# #
+# Use innodb_mysql.[test|result] files instead. #
+# #
+# If nevertheless you need to make some changes here, please, forward #
+# your commit message #
+# To: innodb_dev_ww@oracle.com #
+# Cc: dev-innodb@mysql.com #
+# (otherwise your changes may be erased). #
+# #
+#######################################################################
+
+-- source include/have_innodb.inc
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+
+# Save the original values of some variables in order to be able to
+# estimate how much they have changed during the tests. Previously this
+# test assumed that e.g. rows_deleted is 0 here and after deleting 23
+# rows it expected that rows_deleted will be 23. Now we do not make
+# assumptions about the values of the variables at the beginning, e.g.
+# rows_deleted should be 23 + "rows_deleted before the test". This allows
+# the test to be run multiple times without restarting the mysqld server.
+# See Bug#43309 Test main.innodb can't be run twice
+-- disable_query_log
+SET @innodb_thread_concurrency_orig = @@innodb_thread_concurrency;
+
+SET @innodb_rows_deleted_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted');
+SET @innodb_rows_inserted_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted');
+SET @innodb_rows_updated_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated');
+SET @innodb_row_lock_waits_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_waits');
+SET @innodb_row_lock_current_waits_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_current_waits');
+SET @innodb_row_lock_time_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time');
+SET @innodb_row_lock_time_max_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_max');
+SET @innodb_row_lock_time_avg_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_avg');
+-- enable_query_log
+
+--disable_warnings
+drop table if exists t1,t2,t3,t4;
+drop database if exists mysqltest;
+--enable_warnings
+
+#
+# Small basic test with ignore
+#
+
+create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=innodb;
+
+insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David'), (2, 'Erik'), (3, 'Sasha'), (3, 'Jeremy'), (4, 'Matt');
+select id, code, name from t1 order by id;
+
+update ignore t1 set id = 8, name = 'Sinisa' where id < 3;
+select id, code, name from t1 order by id;
+update ignore t1 set id = id + 10, name = 'Ralph' where id < 4;
+select id, code, name from t1 order by id;
+
+drop table t1;
+
+#
+# A bit bigger test
+# The 'replace_column' statements are needed because the cardinality calculated
+# by innodb is not always the same between runs
+#
+
+CREATE TABLE t1 (
+ id int(11) NOT NULL auto_increment,
+ parent_id int(11) DEFAULT '0' NOT NULL,
+ level tinyint(4) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (id),
+ KEY parent_id (parent_id),
+ KEY level (level)
+) engine=innodb;
+INSERT INTO t1 VALUES (1,0,0),(3,1,1),(4,1,1),(8,2,2),(9,2,2),(17,3,2),(22,4,2),(24,4,2),(28,5,2),(29,5,2),(30,5,2),(31,6,2),(32,6,2),(33,6,2),(203,7,2),(202,7,2),(20,3,2),(157,0,0),(193,5,2),(40,7,2),(2,1,1),(15,2,2),(6,1,1),(34,6,2),(35,6,2),(16,3,2),(7,1,1),(36,7,2),(18,3,2),(26,5,2),(27,5,2),(183,4,2),(38,7,2),(25,5,2),(37,7,2),(21,4,2),(19,3,2),(5,1,1),(179,5,2);
+update t1 set parent_id=parent_id+100;
+select * from t1 where parent_id=102;
+update t1 set id=id+1000;
+-- error ER_DUP_ENTRY,1022
+update t1 set id=1024 where id=1009;
+select * from t1;
+update ignore t1 set id=id+1; # This will change all rows
+select * from t1;
+update ignore t1 set id=1023 where id=1010;
+select * from t1 where parent_id=102;
+--replace_column 9 #
+explain select level from t1 where level=1;
+--replace_column 9 #
+explain select level,id from t1 where level=1;
+--replace_column 9 #
+explain select level,id,parent_id from t1 where level=1;
+select level,id from t1 where level=1;
+select level,id,parent_id from t1 where level=1;
+optimize table t1;
+--replace_column 7 #
+show keys from t1;
+drop table t1;
+
+#
+# Test replace
+#
+
+CREATE TABLE t1 (
+ gesuchnr int(11) DEFAULT '0' NOT NULL,
+ benutzer_id int(11) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (gesuchnr,benutzer_id)
+) engine=innodb;
+
+replace into t1 (gesuchnr,benutzer_id) values (2,1);
+replace into t1 (gesuchnr,benutzer_id) values (1,1);
+replace into t1 (gesuchnr,benutzer_id) values (1,1);
+select * from t1;
+drop table t1;
+
+#
+# test delete using hidden_primary_key
+#
+
+create table t1 (a int) engine=innodb;
+insert into t1 values (1), (2);
+optimize table t1;
+delete from t1 where a = 1;
+select * from t1;
+check table t1;
+drop table t1;
+
+create table t1 (a int,b varchar(20)) engine=innodb;
+insert into t1 values (1,""), (2,"testing");
+delete from t1 where a = 1;
+select * from t1;
+create index skr on t1 (a);
+insert into t1 values (3,""), (4,"testing");
+analyze table t1;
+--replace_column 7 #
+show keys from t1;
+drop table t1;
+
+
+# Test of reading on secondary key with may be null
+
+create table t1 (a int,b varchar(20),key(a)) engine=innodb;
+insert into t1 values (1,""), (2,"testing");
+select * from t1 where a = 1;
+drop table t1;
+
+#
+# Test rollback
+#
+
+create table t1 (n int not null primary key) engine=innodb;
+set autocommit=0;
+insert into t1 values (4);
+rollback;
+select n, "after rollback" from t1;
+insert into t1 values (4);
+commit;
+select n, "after commit" from t1;
+commit;
+insert into t1 values (5);
+-- error ER_DUP_ENTRY
+insert into t1 values (4);
+commit;
+select n, "after commit" from t1;
+set autocommit=1;
+insert into t1 values (6);
+-- error ER_DUP_ENTRY
+insert into t1 values (4);
+select n from t1;
+set autocommit=0;
+#
+# savepoints
+#
+begin;
+savepoint `my_savepoint`;
+insert into t1 values (7);
+savepoint `savept2`;
+insert into t1 values (3);
+select n from t1;
+savepoint savept3;
+rollback to savepoint savept2;
+--error 1305
+rollback to savepoint savept3;
+rollback to savepoint savept2;
+release savepoint `my_savepoint`;
+select n from t1;
+-- error 1305
+rollback to savepoint `my_savepoint`;
+--error 1305
+rollback to savepoint savept2;
+insert into t1 values (8);
+savepoint sv;
+commit;
+savepoint sv;
+set autocommit=1;
+# nop
+rollback;
+drop table t1;
+
+#
+# Test for commit and FLUSH TABLES WITH READ LOCK
+#
+
+create table t1 (n int not null primary key) engine=innodb;
+start transaction;
+insert into t1 values (4);
+flush tables with read lock;
+#
+# Current code can't handle a read lock in middle of transaction
+#--error 1223;
+commit;
+unlock tables;
+commit;
+select * from t1;
+drop table t1;
+
+#
+# Testing transactions
+#
+
+create table t1 ( id int NOT NULL PRIMARY KEY, nom varchar(64)) engine=innodb;
+begin;
+insert into t1 values(1,'hamdouni');
+select id as afterbegin_id,nom as afterbegin_nom from t1;
+rollback;
+select id as afterrollback_id,nom as afterrollback_nom from t1;
+set autocommit=0;
+insert into t1 values(2,'mysql');
+select id as afterautocommit0_id,nom as afterautocommit0_nom from t1;
+rollback;
+select id as afterrollback_id,nom as afterrollback_nom from t1;
+set autocommit=1;
+drop table t1;
+
+#
+# Simple not autocommit test
+#
+
+CREATE TABLE t1 (id char(8) not null primary key, val int not null) engine=innodb;
+insert into t1 values ('pippo', 12);
+-- error ER_DUP_ENTRY
+insert into t1 values ('pippo', 12); # Gives error
+delete from t1;
+delete from t1 where id = 'pippo';
+select * from t1;
+
+insert into t1 values ('pippo', 12);
+set autocommit=0;
+delete from t1;
+rollback;
+select * from t1;
+delete from t1;
+commit;
+select * from t1;
+drop table t1;
+
+#
+# Test of active transactions
+#
+
+create table t1 (a integer) engine=innodb;
+start transaction;
+rename table t1 to t2;
+create table t1 (b integer) engine=innodb;
+insert into t1 values (1);
+rollback;
+drop table t1;
+rename table t2 to t1;
+drop table t1;
+set autocommit=1;
+
+#
+# The following simple tests failed at some point
+#
+
+CREATE TABLE t1 (ID INTEGER NOT NULL PRIMARY KEY, NAME VARCHAR(64)) ENGINE=innodb;
+INSERT INTO t1 VALUES (1, 'Jochen');
+select * from t1;
+drop table t1;
+
+CREATE TABLE t1 ( _userid VARCHAR(60) NOT NULL PRIMARY KEY) ENGINE=innodb;
+set autocommit=0;
+INSERT INTO t1 SET _userid='marc@anyware.co.uk';
+COMMIT;
+SELECT * FROM t1;
+SELECT _userid FROM t1 WHERE _userid='marc@anyware.co.uk';
+drop table t1;
+set autocommit=1;
+
+#
+# Test when reading on part of unique key
+#
+CREATE TABLE t1 (
+ user_id int(10) DEFAULT '0' NOT NULL,
+ name varchar(100),
+ phone varchar(100),
+ ref_email varchar(100) DEFAULT '' NOT NULL,
+ detail varchar(200),
+ PRIMARY KEY (user_id,ref_email)
+)engine=innodb;
+
+INSERT INTO t1 VALUES (10292,'sanjeev','29153373','sansh777@hotmail.com','xxx'),(10292,'shirish','2333604','shirish@yahoo.com','ddsds'),(10292,'sonali','323232','sonali@bolly.com','filmstar');
+select * from t1 where user_id=10292;
+INSERT INTO t1 VALUES (10291,'sanjeev','29153373','sansh777@hotmail.com','xxx'),(10293,'shirish','2333604','shirish@yahoo.com','ddsds');
+select * from t1 where user_id=10292;
+select * from t1 where user_id>=10292;
+select * from t1 where user_id>10292;
+select * from t1 where user_id<10292;
+drop table t1;
+
+#
+# Test that keys are created in right order
+#
+
+CREATE TABLE t1 (a int not null, b int not null,c int not null,
+key(a),primary key(a,b), unique(c),key(a),unique(b));
+--replace_column 7 #
+show index from t1;
+drop table t1;
+
+#
+# Test of ALTER TABLE and innodb tables
+#
+
+create table t1 (col1 int not null, col2 char(4) not null, primary key(col1));
+alter table t1 engine=innodb;
+insert into t1 values ('1','1'),('5','2'),('2','3'),('3','4'),('4','4');
+select * from t1;
+update t1 set col2='7' where col1='4';
+select * from t1;
+alter table t1 add co3 int not null;
+select * from t1;
+update t1 set col2='9' where col1='2';
+select * from t1;
+drop table t1;
+
+#
+# INSERT INTO innodb tables
+#
+
+create table t1 (a int not null , b int, primary key (a)) engine = innodb;
+create table t2 (a int not null , b int, primary key (a)) engine = myisam;
+insert into t1 VALUES (1,3) , (2,3), (3,3);
+select * from t1;
+insert into t2 select * from t1;
+select * from t2;
+delete from t1 where b = 3;
+select * from t1;
+insert into t1 select * from t2;
+select * from t1;
+select * from t2;
+drop table t1,t2;
+
+#
+# ORDER BY on not primary key
+#
+
+CREATE TABLE t1 (
+ user_name varchar(12),
+ password text,
+ subscribed char(1),
+ user_id int(11) DEFAULT '0' NOT NULL,
+ quota bigint(20),
+ weight double,
+ access_date date,
+ access_time time,
+ approved datetime,
+ dummy_primary_key int(11) NOT NULL auto_increment,
+ PRIMARY KEY (dummy_primary_key)
+) ENGINE=innodb;
+INSERT INTO t1 VALUES ('user_0','somepassword','N',0,0,0,'2000-09-07','23:06:59','2000-09-07 23:06:59',1);
+INSERT INTO t1 VALUES ('user_1','somepassword','Y',1,1,1,'2000-09-07','23:06:59','2000-09-07 23:06:59',2);
+INSERT INTO t1 VALUES ('user_2','somepassword','N',2,2,1.4142135623731,'2000-09-07','23:06:59','2000-09-07 23:06:59',3);
+INSERT INTO t1 VALUES ('user_3','somepassword','Y',3,3,1.7320508075689,'2000-09-07','23:06:59','2000-09-07 23:06:59',4);
+INSERT INTO t1 VALUES ('user_4','somepassword','N',4,4,2,'2000-09-07','23:06:59','2000-09-07 23:06:59',5);
+select user_name, password , subscribed, user_id, quota, weight, access_date, access_time, approved, dummy_primary_key from t1 order by user_name;
+drop table t1;
+
+#
+# Testing of tables without primary keys
+#
+
+CREATE TABLE t1 (
+ id int(11) NOT NULL auto_increment,
+ parent_id int(11) DEFAULT '0' NOT NULL,
+ level tinyint(4) DEFAULT '0' NOT NULL,
+ KEY (id),
+ KEY parent_id (parent_id),
+ KEY level (level)
+) engine=innodb;
+INSERT INTO t1 VALUES (1,0,0),(3,1,1),(4,1,1),(8,2,2),(9,2,2),(17,3,2),(22,4,2),(24,4,2),(28,5,2),(29,5,2),(30,5,2),(31,6,2),(32,6,2),(33,6,2),(203,7,2),(202,7,2),(20,3,2),(157,0,0),(193,5,2),(40,7,2),(2,1,1),(15,2,2),(6,1,1),(34,6,2),(35,6,2),(16,3,2),(7,1,1),(36,7,2),(18,3,2),(26,5,2),(27,5,2),(183,4,2),(38,7,2),(25,5,2),(37,7,2),(21,4,2),(19,3,2),(5,1,1);
+INSERT INTO t1 values (179,5,2);
+update t1 set parent_id=parent_id+100;
+select * from t1 where parent_id=102;
+update t1 set id=id+1000;
+update t1 set id=1024 where id=1009;
+select * from t1;
+update ignore t1 set id=id+1; # This will change all rows
+select * from t1;
+update ignore t1 set id=1023 where id=1010;
+select * from t1 where parent_id=102;
+--replace_column 9 #
+explain select level from t1 where level=1;
+select level,id from t1 where level=1;
+select level,id,parent_id from t1 where level=1;
+select level,id from t1 where level=1 order by id;
+delete from t1 where level=1;
+select * from t1;
+drop table t1;
+
+#
+# Test of index only reads
+#
+CREATE TABLE t1 (
+ sca_code char(6) NOT NULL,
+ cat_code char(6) NOT NULL,
+ sca_desc varchar(50),
+ lan_code char(2) NOT NULL,
+ sca_pic varchar(100),
+ sca_sdesc varchar(50),
+ sca_sch_desc varchar(16),
+ PRIMARY KEY (sca_code, cat_code, lan_code),
+ INDEX sca_pic (sca_pic)
+) engine = innodb ;
+
+INSERT INTO t1 ( sca_code, cat_code, sca_desc, lan_code, sca_pic, sca_sdesc, sca_sch_desc) VALUES ( 'PD', 'J', 'PENDANT', 'EN', NULL, NULL, 'PENDANT'),( 'RI', 'J', 'RING', 'EN', NULL, NULL, 'RING'),( 'QQ', 'N', 'RING', 'EN', 'not null', NULL, 'RING');
+select count(*) from t1 where sca_code = 'PD';
+select count(*) from t1 where sca_code <= 'PD';
+select count(*) from t1 where sca_pic is null;
+alter table t1 drop index sca_pic, add index sca_pic (cat_code, sca_pic);
+select count(*) from t1 where sca_code='PD' and sca_pic is null;
+select count(*) from t1 where cat_code='E';
+
+alter table t1 drop index sca_pic, add index (sca_pic, cat_code);
+select count(*) from t1 where sca_code='PD' and sca_pic is null;
+select count(*) from t1 where sca_pic >= 'n';
+select sca_pic from t1 where sca_pic is null;
+update t1 set sca_pic="test" where sca_pic is null;
+delete from t1 where sca_code='pd';
+drop table t1;
+
+#
+# Test of opening table twice and timestamps
+#
+set @a:=now();
+CREATE TABLE t1 (a int not null, b timestamp not null, primary key (a)) engine=innodb;
+insert into t1 (a) values(1),(2),(3);
+select t1.a from t1 natural join t1 as t2 where t1.b >= @a order by t1.a;
+select a from t1 natural join t1 as t2 where b >= @a order by a;
+update t1 set a=5 where a=1;
+select a from t1;
+drop table t1;
+
+#
+# Test with variable length primary key
+#
+create table t1 (a varchar(100) not null, primary key(a), b int not null) engine=innodb;
+insert into t1 values("hello",1),("world",2);
+select * from t1 order by b desc;
+optimize table t1;
+--replace_column 7 #
+show keys from t1;
+drop table t1;
+
+#
+# Test of create index with NULL columns
+#
+create table t1 (i int, j int ) ENGINE=innodb;
+insert into t1 values (1,2);
+select * from t1 where i=1 and j=2;
+create index ax1 on t1 (i,j);
+select * from t1 where i=1 and j=2;
+drop table t1;
+
+#
+# Test min-max optimization
+#
+
+CREATE TABLE t1 (
+ a int3 unsigned NOT NULL,
+ b int1 unsigned NOT NULL,
+ UNIQUE (a, b)
+) ENGINE = innodb;
+
+INSERT INTO t1 VALUES (1, 1);
+SELECT MIN(B),MAX(b) FROM t1 WHERE t1.a = 1;
+drop table t1;
+
+#
+# Test INSERT DELAYED
+#
+
+CREATE TABLE t1 (a int unsigned NOT NULL) engine=innodb;
+# Can't test this in 3.23
+# INSERT DELAYED INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (1);
+SELECT * FROM t1;
+DROP TABLE t1;
+
+
+#
+# Crash when using many tables (Test case by Jeremy D Zawodny)
+#
+
+create table t1 (a int primary key,b int, c int, d int, e int, f int, g int, h int, i int, j int, k int, l int, m int, n int, o int, p int, q int, r int, s int, t int, u int, v int, w int, x int, y int, z int, a1 int, a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int, b1 int, b2 int, b3 int, b4 int, b5 int, b6 int) engine = innodb;
+insert into t1 values (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,1,1,1,1);
+--replace_column 9 #
+explain select * from t1 where a > 0 and a < 50;
+drop table t1;
+
+#
+# Test lock tables
+#
+
+create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) engine=innodb;
+insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
+LOCK TABLES t1 WRITE;
+--error ER_DUP_ENTRY
+insert into t1 values (99,1,2,'D'),(1,1,2,'D');
+select id from t1;
+select id from t1;
+UNLOCK TABLES;
+DROP TABLE t1;
+
+create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) engine=innodb;
+insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
+LOCK TABLES t1 WRITE;
+begin;
+--error ER_DUP_ENTRY
+insert into t1 values (99,1,2,'D'),(1,1,2,'D');
+select id from t1;
+insert ignore into t1 values (100,1,2,'D'),(1,1,99,'D');
+commit;
+select id,id3 from t1;
+UNLOCK TABLES;
+DROP TABLE t1;
+
+#
+# Test prefix key
+#
+create table t1 (a char(20), unique (a(5))) engine=innodb;
+drop table t1;
+create table t1 (a char(20), index (a(5))) engine=innodb;
+show create table t1;
+drop table t1;
+
+#
+# Test using temporary table and auto_increment
+#
+
+create temporary table t1 (a int not null auto_increment, primary key(a)) engine=innodb;
+insert into t1 values (NULL),(NULL),(NULL);
+delete from t1 where a=3;
+insert into t1 values (NULL);
+select * from t1;
+alter table t1 add b int;
+select * from t1;
+drop table t1;
+
+#Slashdot bug
+create table t1
+ (
+ id int auto_increment primary key,
+ name varchar(32) not null,
+ value text not null,
+ uid int not null,
+ unique key(name,uid)
+ ) engine=innodb;
+insert into t1 values (1,'one','one value',101),
+ (2,'two','two value',102),(3,'three','three value',103);
+set insert_id=5;
+replace into t1 (value,name,uid) values ('other value','two',102);
+delete from t1 where uid=102;
+set insert_id=5;
+replace into t1 (value,name,uid) values ('other value','two',102);
+set insert_id=6;
+replace into t1 (value,name,uid) values ('other value','two',102);
+select * from t1;
+drop table t1;
+
+#
+# Test DROP DATABASE
+#
+
+create database mysqltest;
+create table mysqltest.t1 (a int not null) engine= innodb;
+insert into mysqltest.t1 values(1);
+create table mysqltest.t2 (a int not null) engine= myisam;
+insert into mysqltest.t2 values(1);
+create table mysqltest.t3 (a int not null) engine= heap;
+insert into mysqltest.t3 values(1);
+commit;
+drop database mysqltest;
+# Don't check error message
+--error 1049
+show tables from mysqltest;
+
+#
+# Test truncate table with and without auto_commit
+#
+
+set autocommit=0;
+create table t1 (a int not null) engine= innodb;
+insert into t1 values(1),(2);
+truncate table t1;
+commit;
+truncate table t1;
+truncate table t1;
+select * from t1;
+insert into t1 values(1),(2);
+delete from t1;
+select * from t1;
+commit;
+drop table t1;
+set autocommit=1;
+
+create table t1 (a int not null) engine= innodb;
+insert into t1 values(1),(2);
+truncate table t1;
+insert into t1 values(1),(2);
+select * from t1;
+truncate table t1;
+insert into t1 values(1),(2);
+delete from t1;
+select * from t1;
+drop table t1;
+
+#
+# Test of how ORDER BY works when doing it on the whole table
+#
+
+create table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) engine=innodb;
+insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4);
+--replace_column 9 #
+explain select * from t1 order by a;
+--replace_column 9 #
+explain select * from t1 order by b;
+--replace_column 9 #
+explain select * from t1 order by c;
+--replace_column 9 #
+explain select a from t1 order by a;
+--replace_column 9 #
+explain select b from t1 order by b;
+--replace_column 9 #
+explain select a,b from t1 order by b;
+--replace_column 9 #
+explain select a,b from t1;
+--replace_column 9 #
+explain select a,b,c from t1;
+drop table t1;
+
+#
+# Check describe
+#
+
+create table t1 (t int not null default 1, key (t)) engine=innodb;
+desc t1;
+drop table t1;
+
+#
+# Test of multi-table-delete
+#
+
+CREATE TABLE t1 (
+ number bigint(20) NOT NULL default '0',
+ cname char(15) NOT NULL default '',
+ carrier_id smallint(6) NOT NULL default '0',
+ privacy tinyint(4) NOT NULL default '0',
+ last_mod_date timestamp NOT NULL,
+ last_mod_id smallint(6) NOT NULL default '0',
+ last_app_date timestamp NOT NULL,
+ last_app_id smallint(6) default '-1',
+ version smallint(6) NOT NULL default '0',
+ assigned_scps int(11) default '0',
+ status tinyint(4) default '0'
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (4077711111,'SeanWheeler',90,2,20020111112846,500,00000000000000,-1,2,3,1);
+INSERT INTO t1 VALUES (9197722223,'berry',90,3,20020111112809,500,20020102114532,501,4,10,0);
+INSERT INTO t1 VALUES (650,'San Francisco',0,0,20011227111336,342,00000000000000,-1,1,24,1);
+INSERT INTO t1 VALUES (302467,'Sue\'s Subshop',90,3,20020109113241,500,20020102115111,501,7,24,0);
+INSERT INTO t1 VALUES (6014911113,'SudzCarwash',520,1,20020102115234,500,20020102115259,501,33,32768,0);
+INSERT INTO t1 VALUES (333,'tubs',99,2,20020109113440,501,20020109113440,500,3,10,0);
+CREATE TABLE t2 (
+ number bigint(20) NOT NULL default '0',
+ cname char(15) NOT NULL default '',
+ carrier_id smallint(6) NOT NULL default '0',
+ privacy tinyint(4) NOT NULL default '0',
+ last_mod_date timestamp NOT NULL,
+ last_mod_id smallint(6) NOT NULL default '0',
+ last_app_date timestamp NOT NULL,
+ last_app_id smallint(6) default '-1',
+ version smallint(6) NOT NULL default '0',
+ assigned_scps int(11) default '0',
+ status tinyint(4) default '0'
+) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (4077711111,'SeanWheeler',0,2,20020111112853,500,00000000000000,-1,2,3,1);
+INSERT INTO t2 VALUES (9197722223,'berry',90,3,20020111112818,500,20020102114532,501,4,10,0);
+INSERT INTO t2 VALUES (650,'San Francisco',90,0,20020109113158,342,00000000000000,-1,1,24,1);
+INSERT INTO t2 VALUES (333,'tubs',99,2,20020109113453,501,20020109113453,500,3,10,0);
+select * from t1;
+select * from t2;
+delete t1, t2 from t1 left join t2 on t1.number=t2.number where (t1.carrier_id=90 and t1.number=t2.number) or (t2.carrier_id=90 and t1.number=t2.number) or (t1.carrier_id=90 and t2.number is null);
+select * from t1;
+select * from t2;
+select * from t2;
+drop table t1,t2;
+
+#
+# A simple test with some isolation levels
+# TODO: Make this into a test using replication to really test how
+# this works.
+#
+
+create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=innodb;
+
+BEGIN;
+SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
+SELECT @@tx_isolation,@@global.tx_isolation;
+insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David');
+select id, code, name from t1 order by id;
+COMMIT;
+
+BEGIN;
+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
+insert into t1 (code, name) values (2, 'Erik'), (3, 'Sasha');
+select id, code, name from t1 order by id;
+COMMIT;
+
+SET binlog_format='MIXED';
+BEGIN;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+insert into t1 (code, name) values (3, 'Jeremy'), (4, 'Matt');
+select id, code, name from t1 order by id;
+COMMIT;
+DROP TABLE t1;
+
+#
+# Test of multi-table-update
+#
+create table t1 (n int(10), d int(10)) engine=innodb;
+create table t2 (n int(10), d int(10)) engine=innodb;
+insert into t1 values(1,1),(1,2);
+insert into t2 values(1,10),(2,20);
+UPDATE t1,t2 SET t1.d=t2.d,t2.d=30 WHERE t1.n=t2.n;
+select * from t1;
+select * from t2;
+drop table t1,t2;
+
+#
+# Bug #29136 erred multi-delete on trans table does not rollback
+#
+
+# prepare
+--disable_warnings
+drop table if exists t1, t2;
+--enable_warnings
+CREATE TABLE t1 (a int, PRIMARY KEY (a));
+CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
+create trigger trg_del_t2 after delete on t2 for each row
+ insert into t1 values (1);
+insert into t1 values (1);
+insert into t2 values (1),(2);
+
+
+# exec cases A, B - see multi_update.test
+
+# A. send_error() w/o send_eof() branch
+
+--error ER_DUP_ENTRY
+delete t2 from t2;
+
+# check
+
+select count(*) from t2 /* must be 2 as restored after rollback caused by the error */;
+
+# cleanup bug#29136
+
+drop table t1, t2;
+
+
+#
+# Bug #29136 erred multi-delete on trans table does not rollback
+#
+
+# prepare
+--disable_warnings
+drop table if exists t1, t2;
+--enable_warnings
+CREATE TABLE t1 (a int, PRIMARY KEY (a));
+CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
+create trigger trg_del_t2 after delete on t2 for each row
+ insert into t1 values (1);
+insert into t1 values (1);
+insert into t2 values (1),(2);
+
+
+# exec cases A, B - see multi_update.test
+
+# A. send_error() w/o send_eof() branch
+
+--error ER_DUP_ENTRY
+delete t2 from t2;
+
+# check
+
+select count(*) from t2 /* must be 2 as restored after rollback caused by the error */;
+
+# cleanup bug#29136
+
+drop table t1, t2;
+
+
+#
+# Testing of IFNULL
+#
+create table t1 (a int, b int) engine=innodb;
+insert into t1 values(20,null);
+select t2.b, ifnull(t2.b,"this is null") from t1 as t2 left join t1 as t3 on
+t2.b=t3.a;
+select t2.b, ifnull(t2.b,"this is null") from t1 as t2 left join t1 as t3 on
+t2.b=t3.a order by 1;
+insert into t1 values(10,null);
+select t2.b, ifnull(t2.b,"this is null") from t1 as t2 left join t1 as t3 on
+t2.b=t3.a order by 1;
+drop table t1;
+
+#
+# Test of read_through not existing const_table
+#
+
+create table t1 (a varchar(10) not null) engine=myisam;
+create table t2 (b varchar(10) not null unique) engine=innodb;
+select t1.a from t1,t2 where t1.a=t2.b;
+drop table t1,t2;
+create table t1 (a int not null, b int, primary key (a)) engine = innodb;
+create table t2 (a int not null, b int, primary key (a)) engine = innodb;
+insert into t1 values (10, 20);
+insert into t2 values (10, 20);
+update t1, t2 set t1.b = 150, t2.b = t1.b where t2.a = t1.a and t1.a = 10;
+drop table t1,t2;
+
+#
+# Test of multi-table-delete with foreign key constraints
+#
+
+CREATE TABLE t1 (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
+CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id), FOREIGN KEY (t1_id) REFERENCES t1(id) ON DELETE CASCADE ) ENGINE=INNODB;
+insert into t1 set id=1;
+insert into t2 set id=1, t1_id=1;
+delete t1,t2 from t1,t2 where t1.id=t2.t1_id;
+select * from t1;
+select * from t2;
+drop table t2,t1;
+CREATE TABLE t1(id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
+CREATE TABLE t2(id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id) ) ENGINE=INNODB;
+INSERT INTO t1 VALUES(1);
+INSERT INTO t2 VALUES(1, 1);
+SELECT * from t1;
+UPDATE t1,t2 SET t1.id=t1.id+1, t2.t1_id=t1.id+1;
+SELECT * from t1;
+UPDATE t1,t2 SET t1.id=t1.id+1 where t1.id!=t2.id;
+SELECT * from t1;
+DROP TABLE t1,t2;
+
+#
+# Test of range_optimizer
+#
+
+set autocommit=0;
+
+CREATE TABLE t1 (id CHAR(15) NOT NULL, value CHAR(40) NOT NULL, PRIMARY KEY(id)) ENGINE=InnoDB;
+
+CREATE TABLE t2 (id CHAR(15) NOT NULL, value CHAR(40) NOT NULL, PRIMARY KEY(id)) ENGINE=InnoDB;
+
+CREATE TABLE t3 (id1 CHAR(15) NOT NULL, id2 CHAR(15) NOT NULL, PRIMARY KEY(id1, id2)) ENGINE=InnoDB;
+
+INSERT INTO t3 VALUES("my-test-1", "my-test-2");
+COMMIT;
+
+INSERT INTO t1 VALUES("this-key", "will disappear");
+INSERT INTO t2 VALUES("this-key", "will also disappear");
+DELETE FROM t3 WHERE id1="my-test-1";
+
+SELECT * FROM t1;
+SELECT * FROM t2;
+SELECT * FROM t3;
+ROLLBACK;
+
+SELECT * FROM t1;
+SELECT * FROM t2;
+SELECT * FROM t3;
+SELECT * FROM t3 WHERE id1="my-test-1" LOCK IN SHARE MODE;
+COMMIT;
+set autocommit=1;
+DROP TABLE t1,t2,t3;
+
+#
+# Check update with conflicting key
+#
+
+CREATE TABLE t1 (a int not null primary key, b int not null, unique (b)) engine=innodb;
+INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+# We need the a < 1000 test here to quard against the halloween problems
+UPDATE t1 set a=a+100 where b between 2 and 3 and a < 1000;
+SELECT * from t1;
+drop table t1;
+
+CREATE TABLE t2 ( NEXT_T BIGINT NOT NULL PRIMARY KEY) ENGINE=MyISAM;
+CREATE TABLE t1 ( B_ID INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
+SET AUTOCOMMIT=0;
+INSERT INTO t1 ( B_ID ) VALUES ( 1 );
+INSERT INTO t2 ( NEXT_T ) VALUES ( 1 );
+ROLLBACK;
+SELECT * FROM t1;
+drop table t1,t2;
+create table t1 ( pk int primary key, parent int not null, child int not null, index (parent) ) engine = innodb;
+insert into t1 values (1,0,4), (2,1,3), (3,2,1), (4,1,2);
+select distinct parent,child from t1 order by parent;
+drop table t1;
+
+#
+# Test that MySQL priorities clustered indexes
+#
+create table t1 (a int not null auto_increment primary key, b int, c int, key(c)) engine=innodb;
+create table t2 (a int not null auto_increment primary key, b int);
+insert into t1 (b) values (null),(null),(null),(null),(null),(null),(null);
+insert into t2 (a) select b from t1;
+insert into t1 (b) select b from t2;
+insert into t2 (a) select b from t1;
+insert into t1 (a) select b from t2;
+insert into t2 (a) select b from t1;
+insert into t1 (a) select b from t2;
+insert into t2 (a) select b from t1;
+insert into t1 (a) select b from t2;
+insert into t2 (a) select b from t1;
+insert into t1 (a) select b from t2;
+select count(*) from t1;
+--replace_column 9 #
+explain select * from t1 where c between 1 and 2500;
+update t1 set c=a;
+--replace_column 9 #
+explain select * from t1 where c between 1 and 2500;
+drop table t1,t2;
+
+#
+# Test of UPDATE ... ORDER BY
+#
+
+create table t1 (id int primary key auto_increment, fk int, index index_fk (fk)) engine=innodb;
+
+insert into t1 (id) values (null),(null),(null),(null),(null);
+update t1 set fk=69 where fk is null order by id limit 1;
+SELECT * from t1;
+drop table t1;
+
+create table t1 (a int not null, b int not null, key (a));
+insert into t1 values (1,1),(1,2),(1,3),(3,1),(3,2),(3,3),(3,1),(3,2),(3,3),(2,1),(2,2),(2,3);
+SET @tmp=0;
+update t1 set b=(@tmp:=@tmp+1) order by a;
+update t1 set b=99 where a=1 order by b asc limit 1;
+update t1 set b=100 where a=1 order by b desc limit 2;
+update t1 set a=a+10+b where a=1 order by b;
+select * from t1 order by a,b;
+drop table t1;
+
+#
+# Test of multi-table-updates (bug #1980).
+#
+
+create table t1 ( c char(8) not null ) engine=innodb;
+insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9');
+insert into t1 values ('A'),('B'),('C'),('D'),('E'),('F');
+
+alter table t1 add b char(8) not null;
+alter table t1 add a char(8) not null;
+alter table t1 add primary key (a,b,c);
+update t1 set a=c, b=c;
+
+create table t2 (c char(8) not null, b char(8) not null, a char(8) not null, primary key(a,b,c)) engine=innodb;
+insert into t2 select * from t1;
+
+delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b;
+drop table t1,t2;
+
+#
+# test autoincrement with TRUNCATE
+#
+
+SET AUTOCOMMIT=1;
+create table t1 (a integer auto_increment primary key) engine=innodb;
+insert into t1 (a) values (NULL),(NULL);
+truncate table t1;
+insert into t1 (a) values (NULL),(NULL);
+SELECT * from t1;
+drop table t1;
+
+#
+# Test dictionary handling with spaceand quoting
+#
+
+CREATE TABLE t1 (`id 1` INT NOT NULL, PRIMARY KEY (`id 1`)) ENGINE=INNODB;
+CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id), FOREIGN KEY (`t1_id`) REFERENCES `t1`(`id 1`) ON DELETE CASCADE ) ENGINE=INNODB;
+#show create table t2;
+drop table t2,t1;
+
+#
+# Test of multi updated and foreign keys
+#
+
+create table `t1` (`id` int( 11 ) not null ,primary key ( `id` )) engine = innodb;
+insert into `t1`values ( 1 ) ;
+create table `t2` (`id` int( 11 ) not null default '0',unique key `id` ( `id` ) ,constraint `t1_id_fk` foreign key ( `id` ) references `t1` (`id` )) engine = innodb;
+insert into `t2`values ( 1 ) ;
+create table `t3` (`id` int( 11 ) not null default '0',key `id` ( `id` ) ,constraint `t2_id_fk` foreign key ( `id` ) references `t2` (`id` )) engine = innodb;
+insert into `t3`values ( 1 ) ;
+--error 1451
+delete t3,t2,t1 from t1,t2,t3 where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
+--error 1451
+update t1,t2,t3 set t3.id=5, t2.id=6, t1.id=7 where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
+--error 1054
+update t3 set t3.id=7 where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
+drop table t3,t2,t1;
+
+#
+# test for recursion depth limit
+#
+create table t1(
+ id int primary key,
+ pid int,
+ index(pid),
+ foreign key(pid) references t1(id) on delete cascade) engine=innodb;
+insert into t1 values(0,0),(1,0),(2,1),(3,2),(4,3),(5,4),(6,5),(7,6),
+ (8,7),(9,8),(10,9),(11,10),(12,11),(13,12),(14,13),(15,14);
+-- error 1451
+delete from t1 where id=0;
+delete from t1 where id=15;
+delete from t1 where id=0;
+
+drop table t1;
+
+#
+# Test timestamps
+#
+
+CREATE TABLE t1 (col1 int(1))ENGINE=InnoDB;
+CREATE TABLE t2 (col1 int(1),stamp TIMESTAMP,INDEX stamp_idx
+(stamp))ENGINE=InnoDB;
+insert into t1 values (1),(2),(3);
+# Note that timestamp 3 is wrong
+insert into t2 values (1, 20020204130000),(2, 20020204130000),(4,20020204310000 ),(5,20020204230000);
+SELECT col1 FROM t1 UNION SELECT col1 FROM t2 WHERE stamp <
+'20020204120000' GROUP BY col1;
+drop table t1,t2;
+
+#
+# Test by Francois MASUREL
+#
+
+CREATE TABLE t1 (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `id_object` int(10) unsigned default '0',
+ `id_version` int(10) unsigned NOT NULL default '1',
+ `label` varchar(100) NOT NULL default '',
+ `description` text,
+ PRIMARY KEY (`id`),
+ KEY `id_object` (`id_object`),
+ KEY `id_version` (`id_version`)
+) ENGINE=InnoDB;
+
+INSERT INTO t1 VALUES("6", "3382", "9", "Test", NULL), ("7", "102", "5", "Le Pekin (Test)", NULL),("584", "1794", "4", "Test de resto", NULL),("837", "1822", "6", "Test 3", NULL),("1119", "3524", "1", "Societe Test", NULL),("1122", "3525", "1", "Fournisseur Test", NULL);
+
+CREATE TABLE t2 (
+ `id` int(10) unsigned NOT NULL auto_increment,
+ `id_version` int(10) unsigned NOT NULL default '1',
+ PRIMARY KEY (`id`),
+ KEY `id_version` (`id_version`)
+) ENGINE=InnoDB;
+
+INSERT INTO t2 VALUES("3524", "1"),("3525", "1"),("1794", "4"),("102", "5"),("1822", "6"),("3382", "9");
+
+SELECT t2.id, t1.`label` FROM t2 INNER JOIN
+(SELECT t1.id_object as id_object FROM t1 WHERE t1.`label` LIKE '%test%') AS lbl
+ON (t2.id = lbl.id_object) INNER JOIN t1 ON (t2.id = t1.id_object);
+drop table t1,t2;
+
+create table t1 (a int, b varchar(200), c text not null) checksum=1 engine=myisam;
+create table t2 (a int, b varchar(200), c text not null) checksum=0 engine=innodb;
+create table t3 (a int, b varchar(200), c text not null) checksum=1 engine=innodb;
+insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
+insert t2 select * from t1;
+insert t3 select * from t1;
+checksum table t1, t2, t3, t4 quick;
+checksum table t1, t2, t3, t4;
+checksum table t1, t2, t3, t4 extended;
+#show table status;
+drop table t1,t2,t3;
+
+#
+# Test problem with refering to different fields in same table in UNION
+# (Bug #2552)
+#
+create table t1 (id int, name char(10) not null, name2 char(10) not null) engine=innodb;
+insert into t1 values(1,'first','fff'),(2,'second','sss'),(3,'third','ttt');
+select trim(name2) from t1 union all select trim(name) from t1 union all select trim(id) from t1;
+drop table t1;
+
+#
+# Bug2160
+#
+create table t1 (a int) engine=innodb;
+create table t2 like t1;
+drop table t1,t2;
+
+#
+# Test of automaticly created foreign keys
+#
+
+create table t1 (id int(11) not null, id2 int(11) not null, unique (id,id2)) engine=innodb;
+create table t2 (id int(11) not null, constraint t1_id_fk foreign key ( id ) references t1 (id)) engine = innodb;
+show create table t1;
+show create table t2;
+create index id on t2 (id);
+show create table t2;
+create index id2 on t2 (id);
+show create table t2;
+drop index id2 on t2;
+--error 1025,1025
+drop index id on t2;
+show create table t2;
+drop table t2;
+
+create table t2 (id int(11) not null, id2 int(11) not null, constraint t1_id_fk foreign key (id,id2) references t1 (id,id2)) engine = innodb;
+show create table t2;
+create unique index id on t2 (id,id2);
+show create table t2;
+drop table t2;
+
+# Check foreign key columns created in different order than key columns
+create table t2 (id int(11) not null, id2 int(11) not null, unique (id,id2),constraint t1_id_fk foreign key (id2,id) references t1 (id,id2)) engine = innodb;
+show create table t2;
+drop table t2;
+
+create table t2 (id int(11) not null, id2 int(11) not null, unique (id,id2), constraint t1_id_fk foreign key (id) references t1 (id)) engine = innodb;
+show create table t2;
+drop table t2;
+
+create table t2 (id int(11) not null, id2 int(11) not null, unique (id,id2),constraint t1_id_fk foreign key (id2,id) references t1 (id,id2)) engine = innodb;
+show create table t2;
+drop table t2;
+
+create table t2 (id int(11) not null auto_increment, id2 int(11) not null, constraint t1_id_fk foreign key (id) references t1 (id), primary key (id), index (id,id2)) engine = innodb;
+show create table t2;
+drop table t2;
+
+create table t2 (id int(11) not null auto_increment, id2 int(11) not null, constraint t1_id_fk foreign key (id) references t1 (id)) engine= innodb;
+show create table t2;
+alter table t2 add index id_test (id), add index id_test2 (id,id2);
+show create table t2;
+drop table t2;
+
+# Test error handling
+
+# Embedded server doesn't chdir to data directory
+--replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
+--error ER_WRONG_FK_DEF
+create table t2 (id int(11) not null, id2 int(11) not null, constraint t1_id_fk foreign key (id2,id) references t1 (id)) engine = innodb;
+
+# bug#3749
+
+create table t2 (a int auto_increment primary key, b int, index(b), foreign key (b) references t1(id), unique(b)) engine=innodb;
+show create table t2;
+drop table t2;
+create table t2 (a int auto_increment primary key, b int, foreign key (b) references t1(id), foreign key (b) references t1(id), unique(b)) engine=innodb;
+show create table t2;
+drop table t2, t1;
+
+
+#
+# Bug #6126: Duplicate columns in keys gives misleading error message
+#
+--error 1060
+create table t1 (c char(10), index (c,c)) engine=innodb;
+--error 1060
+create table t1 (c1 char(10), c2 char(10), index (c1,c2,c1)) engine=innodb;
+--error 1060
+create table t1 (c1 char(10), c2 char(10), index (c1,c1,c2)) engine=innodb;
+--error 1060
+create table t1 (c1 char(10), c2 char(10), index (c2,c1,c1)) engine=innodb;
+create table t1 (c1 char(10), c2 char(10)) engine=innodb;
+--error 1060
+alter table t1 add key (c1,c1);
+--error 1060
+alter table t1 add key (c2,c1,c1);
+--error 1060
+alter table t1 add key (c1,c2,c1);
+--error 1060
+alter table t1 add key (c1,c1,c2);
+drop table t1;
+
+#
+# Bug #4082: integer truncation
+#
+
+create table t1(a int(1) , b int(1)) engine=innodb;
+insert into t1 values ('1111', '3333');
+select distinct concat(a, b) from t1;
+drop table t1;
+
+#
+# BUG#7709 test case - Boolean fulltext query against unsupported
+# engines does not fail
+#
+
+CREATE TABLE t1 ( a char(10) ) ENGINE=InnoDB;
+--error 1214
+SELECT a FROM t1 WHERE MATCH (a) AGAINST ('test' IN BOOLEAN MODE);
+DROP TABLE t1;
+
+#
+# check null values #1
+#
+
+--disable_warnings
+CREATE TABLE t1 (a_id tinyint(4) NOT NULL default '0', PRIMARY KEY (a_id)) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+INSERT INTO t1 VALUES (1),(2),(3);
+CREATE TABLE t2 (b_id tinyint(4) NOT NULL default '0',b_a tinyint(4) NOT NULL default '0', PRIMARY KEY (b_id), KEY (b_a),
+ CONSTRAINT fk_b_a FOREIGN KEY (b_a) REFERENCES t1 (a_id) ON DELETE CASCADE ON UPDATE NO ACTION) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+--enable_warnings
+INSERT INTO t2 VALUES (1,1),(2,1),(3,1),(4,2),(5,2);
+SELECT * FROM (SELECT t1.*,GROUP_CONCAT(t2.b_id SEPARATOR ',') as b_list FROM (t1 LEFT JOIN (t2) on t1.a_id = t2.b_a) GROUP BY t1.a_id ) AS xyz;
+DROP TABLE t2;
+DROP TABLE t1;
+
+#
+# Bug#11816 - Truncate table doesn't work with temporary innodb tables
+# This is not an innodb bug, but we test it using innodb.
+#
+create temporary table t1 (a int) engine=innodb;
+insert into t1 values (4711);
+truncate t1;
+insert into t1 values (42);
+select * from t1;
+drop table t1;
+# Show that it works with permanent tables too.
+create table t1 (a int) engine=innodb;
+insert into t1 values (4711);
+truncate t1;
+insert into t1 values (42);
+select * from t1;
+drop table t1;
+
+#
+# Bug #13025 Server crash during filesort
+#
+
+create table t1 (a int not null, b int not null, c blob not null, d int not null, e int, primary key (a,b,c(255),d)) engine=innodb;
+insert into t1 values (2,2,"b",2,2),(1,1,"a",1,1),(3,3,"ab",3,3);
+select * from t1 order by a,b,c,d;
+explain select * from t1 order by a,b,c,d;
+drop table t1;
+
+#
+# BUG#11039,#13218 Wrong key length in min()
+#
+
+create table t1 (a char(1), b char(1), key(a, b)) engine=innodb;
+insert into t1 values ('8', '6'), ('4', '7');
+select min(a) from t1;
+select min(b) from t1 where a='8';
+drop table t1;
+
+# End of 4.1 tests
+
+#
+# range optimizer problem
+#
+
+create table t1 (x bigint unsigned not null primary key) engine=innodb;
+insert into t1(x) values (0xfffffffffffffff0),(0xfffffffffffffff1);
+select * from t1;
+select count(*) from t1 where x>0;
+select count(*) from t1 where x=0;
+select count(*) from t1 where x<0;
+select count(*) from t1 where x < -16;
+select count(*) from t1 where x = -16;
+explain select count(*) from t1 where x > -16;
+select count(*) from t1 where x > -16;
+select * from t1 where x > -16;
+select count(*) from t1 where x = 18446744073709551601;
+drop table t1;
+
+
+# Test for testable InnoDB status variables. This test
+# uses previous ones(pages_created, rows_deleted, ...).
+SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
+SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size';
+SELECT variable_value - @innodb_rows_deleted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted';
+SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted';
+SELECT variable_value - @innodb_rows_updated_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated';
+
+# Test for row locks InnoDB status variables.
+SELECT variable_value - @innodb_row_lock_waits_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_waits';
+SELECT variable_value - @innodb_row_lock_current_waits_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_current_waits';
+SELECT variable_value - @innodb_row_lock_time_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time';
+SELECT variable_value - @innodb_row_lock_time_max_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_max';
+SELECT variable_value - @innodb_row_lock_time_avg_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_avg';
+
+# Test for innodb_sync_spin_loops variable
+show variables like "innodb_sync_spin_loops";
+set global innodb_sync_spin_loops=1000;
+show variables like "innodb_sync_spin_loops";
+set global innodb_sync_spin_loops=0;
+show variables like "innodb_sync_spin_loops";
+set global innodb_sync_spin_loops=20;
+show variables like "innodb_sync_spin_loops";
+
+# Test for innodb_thread_concurrency variable
+SET @old_innodb_thread_concurrency= @@global.innodb_thread_concurrency;
+show variables like "innodb_thread_concurrency";
+set global innodb_thread_concurrency=1001;
+show variables like "innodb_thread_concurrency";
+set global innodb_thread_concurrency=0;
+show variables like "innodb_thread_concurrency";
+set global innodb_thread_concurrency=16;
+show variables like "innodb_thread_concurrency";
+SET @@global.innodb_thread_concurrency= @old_innodb_thread_concurrency;
+
+# Test for innodb_concurrency_tickets variable
+show variables like "innodb_concurrency_tickets";
+set global innodb_concurrency_tickets=1000;
+show variables like "innodb_concurrency_tickets";
+set global innodb_concurrency_tickets=0;
+show variables like "innodb_concurrency_tickets";
+set global innodb_concurrency_tickets=500;
+show variables like "innodb_concurrency_tickets";
+
+# Test for innodb_thread_sleep_delay variable
+show variables like "innodb_thread_sleep_delay";
+set global innodb_thread_sleep_delay=100000;
+show variables like "innodb_thread_sleep_delay";
+set global innodb_thread_sleep_delay=0;
+show variables like "innodb_thread_sleep_delay";
+set global innodb_thread_sleep_delay=10000;
+show variables like "innodb_thread_sleep_delay";
+
+#
+# Test varchar
+#
+
+let $default=`select @@storage_engine`;
+set storage_engine=INNODB;
+source include/varchar.inc;
+
+#
+# Some errors/warnings on create
+#
+
+# Embedded server doesn't chdir to data directory
+--replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
+create table t1 (v varchar(65530), key(v));
+drop table t1;
+create table t1 (v varchar(65536));
+show create table t1;
+drop table t1;
+create table t1 (v varchar(65530) character set utf8);
+show create table t1;
+drop table t1;
+
+eval set storage_engine=$default;
+
+-- disable_query_log
+SET GLOBAL innodb_thread_concurrency = @innodb_thread_concurrency_orig;
+
+#######################################################################
+# #
+# Please, DO NOT TOUCH this file as well as the innodb.result file. #
+# These files are to be modified ONLY BY INNOBASE guys. #
+# #
+# Use innodb_mysql.[test|result] files instead. #
+# #
+# If nevertheless you need to make some changes here, please, forward #
+# your commit message #
+# To: innodb_dev_ww@oracle.com #
+# Cc: dev-innodb@mysql.com #
+# (otherwise your changes may be erased). #
+# #
+#######################################################################
diff --git a/mysql-test/t/innodb_autoinc_lock_mode_zero-master.opt b/mysql-test/suite/innodb/t/innodb_autoinc_lock_mode_zero-master.opt
index fad0da2ac2e..fad0da2ac2e 100644
--- a/mysql-test/t/innodb_autoinc_lock_mode_zero-master.opt
+++ b/mysql-test/suite/innodb/t/innodb_autoinc_lock_mode_zero-master.opt
diff --git a/mysql-test/t/innodb_autoinc_lock_mode_zero.test b/mysql-test/suite/innodb/t/innodb_autoinc_lock_mode_zero.test
index 96f748673c0..96f748673c0 100644
--- a/mysql-test/t/innodb_autoinc_lock_mode_zero.test
+++ b/mysql-test/suite/innodb/t/innodb_autoinc_lock_mode_zero.test
diff --git a/mysql-test/t/innodb_bug30919-master.opt b/mysql-test/suite/innodb/t/innodb_bug30919-master.opt
index 8636d2d8734..8636d2d8734 100644
--- a/mysql-test/t/innodb_bug30919-master.opt
+++ b/mysql-test/suite/innodb/t/innodb_bug30919-master.opt
diff --git a/mysql-test/t/innodb_bug30919.test b/mysql-test/suite/innodb/t/innodb_bug30919.test
index 56b2c7bc03d..56b2c7bc03d 100644
--- a/mysql-test/t/innodb_bug30919.test
+++ b/mysql-test/suite/innodb/t/innodb_bug30919.test
diff --git a/mysql-test/t/innodb_bug42419.test b/mysql-test/suite/innodb/t/innodb_bug42419.test
index 93c4764252a..93c4764252a 100644
--- a/mysql-test/t/innodb_bug42419.test
+++ b/mysql-test/suite/innodb/t/innodb_bug42419.test
diff --git a/mysql-test/suite/innodb/t/innodb_bug48024.test b/mysql-test/suite/innodb/t/innodb_bug48024.test
new file mode 100644
index 00000000000..db828aa1cda
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_bug48024.test
@@ -0,0 +1,22 @@
+# Bug #48024 Innodb doesn't work with multi-statements
+
+--source include/have_innodb.inc
+
+CREATE TABLE bug48024(a int PRIMARY KEY,b int NOT NULL,KEY(b)) ENGINE=InnoDB;
+CREATE TABLE bug48024_b(b int PRIMARY KEY) ENGINE=InnoDB;
+# Bug #53644 InnoDB thinks that /*/ starts and ends a comment
+ALTER TABLE bug48024 /*/ADD CONSTRAINT FOREIGN KEY(c) REFERENCES(a),/*/
+ADD CONSTRAINT FOREIGN KEY(b) REFERENCES bug48024_b(b);
+
+DROP TABLE bug48024,bug48024_b;
+
+# Work around Bug #53750 (failure in mysql-test-run --ps-protocol)
+-- disable_ps_protocol
+delimiter |;
+CREATE TABLE bug48024(a int PRIMARY KEY,b int NOT NULL,KEY(b)) ENGINE=InnoDB;
+CREATE TABLE bug48024_b(b int PRIMARY KEY) ENGINE=InnoDB;
+ALTER TABLE bug48024 /*/ADD CONSTRAINT FOREIGN KEY(c) REFERENCES(a),/*/
+ADD CONSTRAINT FOREIGN KEY(b) REFERENCES bug48024_b(b)|
+delimiter ;|
+
+DROP TABLE bug48024,bug48024_b;
diff --git a/mysql-test/suite/innodb/t/innodb_bug49164.test b/mysql-test/suite/innodb/t/innodb_bug49164.test
new file mode 100644
index 00000000000..7f1c9f4ca9c
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_bug49164.test
@@ -0,0 +1,47 @@
+-- source include/have_innodb.inc
+
+# Bug #49164 READ-COMMITTED reports "matched: 0" on compound PK
+# a duplicate of
+# Bug #52663 Lost update incrementing column value under READ COMMITTED
+
+connect (con1,localhost,root,,);
+connect (con2,localhost,root,,);
+
+connection con1;
+SET tx_isolation = 'READ-COMMITTED';
+
+CREATE TABLE bug49164 (a INT, b BIGINT, c TINYINT, PRIMARY KEY (a, b))
+ENGINE=InnoDB;
+
+insert into bug49164 values (1,1,1), (2,2,2), (3,3,3);
+
+begin;
+update bug49164 set c=7;
+select * from bug49164;
+rollback;
+select * from bug49164;
+begin;
+update bug49164 set c=7;
+
+connection con2;
+
+SET tx_isolation = 'READ-COMMITTED';
+begin;
+select * from bug49164;
+commit;
+begin;
+--send
+update bug49164 set c=6 where a=1 and b=1;
+
+connection con1;
+rollback;
+select * from bug49164;
+connection con2;
+reap;
+commit;
+connection con1;
+select * from bug49164;
+connection default;
+disconnect con1;
+disconnect con2;
+drop table bug49164;
diff --git a/mysql-test/suite/innodb/t/innodb_bug53674-master.opt b/mysql-test/suite/innodb/t/innodb_bug53674-master.opt
new file mode 100644
index 00000000000..f1cfd7ab6c7
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_bug53674-master.opt
@@ -0,0 +1 @@
+--log-bin --innodb-locks-unsafe-for-binlog --binlog-format=mixed
diff --git a/mysql-test/suite/innodb/t/innodb_bug53674.test b/mysql-test/suite/innodb/t/innodb_bug53674.test
new file mode 100644
index 00000000000..47f67f109c3
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_bug53674.test
@@ -0,0 +1,8 @@
+-- source include/have_innodb.inc
+
+create table bug53674(a int)engine=innodb;
+insert into bug53674 values (1),(2);
+start transaction;
+select * from bug53674 for update;
+select * from bug53674 where a=(select a from bug53674 where a > 1);
+drop table bug53674;
diff --git a/mysql-test/suite/innodb/t/innodb_bug54044.test b/mysql-test/suite/innodb/t/innodb_bug54044.test
new file mode 100644
index 00000000000..a6722ed6399
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_bug54044.test
@@ -0,0 +1,11 @@
+# This is the test for bug #54044. Special handle MYSQL_TYPE_NULL type
+# during create table, so it will not trigger assertion failure.
+
+--source include/have_innodb.inc
+
+# This 'create table' operation should fail because of
+# using NULL datatype
+--error ER_CANT_CREATE_TABLE
+CREATE TEMPORARY TABLE table_54044 ENGINE = INNODB
+ AS SELECT IF(NULL IS NOT NULL, NULL, NULL);
+
diff --git a/mysql-test/t/innodb_gis.test b/mysql-test/suite/innodb/t/innodb_gis.test
index 1adb14ea482..1adb14ea482 100644
--- a/mysql-test/t/innodb_gis.test
+++ b/mysql-test/suite/innodb/t/innodb_gis.test
diff --git a/mysql-test/t/innodb_lock_wait_timeout_1-master.opt b/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1-master.opt
index 462f8fbe828..462f8fbe828 100644
--- a/mysql-test/t/innodb_lock_wait_timeout_1-master.opt
+++ b/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1-master.opt
diff --git a/mysql-test/t/innodb_lock_wait_timeout_1.test b/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test
index fcbf2b1cfc7..fcbf2b1cfc7 100644
--- a/mysql-test/t/innodb_lock_wait_timeout_1.test
+++ b/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test
diff --git a/mysql-test/suite/innodb/t/innodb_multi_update.test b/mysql-test/suite/innodb/t/innodb_multi_update.test
new file mode 100644
index 00000000000..7ab17ccf70a
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_multi_update.test
@@ -0,0 +1,29 @@
+-- source include/have_innodb.inc
+
+#
+# Test multi update with different join methods
+#
+
+CREATE TABLE bug38999_1 (a int not null primary key, b int not null, key (b)) engine=innodb;
+CREATE TABLE bug38999_2 (a int not null primary key, b int not null, key (b)) engine=innodb;
+INSERT INTO bug38999_1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10),(11,11),(12,12);
+INSERT INTO bug38999_2 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+
+# Full join, without key
+update bug38999_1,bug38999_2 set bug38999_1.a=bug38999_1.a+100;
+select * from bug38999_1;
+
+# unique key
+update bug38999_1,bug38999_2 set bug38999_1.a=bug38999_1.a+100 where bug38999_1.a=101;
+select * from bug38999_1;
+
+# ref key
+update bug38999_1,bug38999_2 set bug38999_1.b=bug38999_1.b+10 where bug38999_1.b=2;
+select * from bug38999_1;
+
+# Range key (in bug38999_1)
+update bug38999_1,bug38999_2 set bug38999_1.b=bug38999_1.b+2,bug38999_2.b=bug38999_1.b+10 where bug38999_1.b between 3 and 5 and bug38999_1.a=bug38999_2.a+100;
+select * from bug38999_1;
+select * from bug38999_2;
+
+drop table bug38999_1,bug38999_2;
diff --git a/mysql-test/t/innodb_mysql-master.opt b/mysql-test/suite/innodb/t/innodb_mysql-master.opt
index 205c733455d..205c733455d 100644
--- a/mysql-test/t/innodb_mysql-master.opt
+++ b/mysql-test/suite/innodb/t/innodb_mysql-master.opt
diff --git a/mysql-test/suite/innodb/t/innodb_mysql.test b/mysql-test/suite/innodb/t/innodb_mysql.test
new file mode 100644
index 00000000000..8d3af2b3a5d
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_mysql.test
@@ -0,0 +1,755 @@
+# t/innodb_mysql.test
+#
+# Last update:
+# 2006-07-26 ML test refactored (MySQL 5.1)
+# main testing code t/innodb_mysql.test -> include/mix1.inc
+#
+
+# Slow test, don't run during staging part
+-- source include/not_staging.inc
+-- source include/have_innodb.inc
+let $engine_type= InnoDB;
+let $other_engine_type= MEMORY;
+# InnoDB does support FOREIGN KEYFOREIGN KEYs
+let $test_foreign_keys= 1;
+set global innodb_support_xa=default;
+set session innodb_support_xa=default;
+--source include/mix1.inc
+
+--disable_warnings
+drop table if exists t1, t2, t3;
+--enable_warnings
+#
+# BUG#35850: Performance regression in 5.1.23/5.1.24
+#
+create table t1(a int);
+insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t2 (a int, b int, pk int, key(a,b), primary key(pk)) engine=innodb;
+insert into t2 select @a:=A.a+10*(B.a + 10*C.a),@a, @a from t1 A, t1 B, t1 C;
+--echo this must use key 'a', not PRIMARY:
+--replace_column 9 #
+explain select a from t2 where a=b;
+drop table t1, t2;
+
+#
+# Bug #40360: Binlog related errors with binlog off
+#
+# This bug is triggered when the binlog format is STATEMENT and the
+# binary log is turned off. In this case, no error should be shown for
+# the statement since there are no replication issues.
+
+SET SESSION BINLOG_FORMAT=STATEMENT;
+SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
+query_vertical select @@session.sql_log_bin, @@session.binlog_format, @@session.tx_isolation;
+CREATE TABLE t1 ( a INT ) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1);
+DROP TABLE t1;
+
+#
+# Bug#37284 Crash in Field_string::type()
+#
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+CREATE TABLE t1 (a char(50)) ENGINE=InnoDB;
+CREATE INDEX i1 on t1 (a(3));
+SELECT * FROM t1 WHERE a = 'abcde';
+DROP TABLE t1;
+
+#
+# Bug #37742: HA_EXTRA_KEYREAD flag is set when key contains only prefix of
+# requested column
+#
+
+CREATE TABLE foo (a int, b int, c char(10),
+ PRIMARY KEY (c(3)),
+ KEY b (b)
+) engine=innodb;
+
+CREATE TABLE foo2 (a int, b int, c char(10),
+ PRIMARY KEY (c),
+ KEY b (b)
+) engine=innodb;
+
+CREATE TABLE bar (a int, b int, c char(10),
+ PRIMARY KEY (c(3)),
+ KEY b (b)
+) engine=myisam;
+
+INSERT INTO foo VALUES
+ (1,2,'abcdefghij'), (2,3,''), (3,4,'klmnopqrst'),
+ (4,5,'uvwxyz'), (5,6,'meotnsyglt'), (4,5,'asfdewe');
+
+INSERT INTO bar SELECT * FROM foo;
+INSERT INTO foo2 SELECT * FROM foo;
+
+--query_vertical EXPLAIN SELECT c FROM bar WHERE b>2;
+--query_vertical EXPLAIN SELECT c FROM foo WHERE b>2;
+--query_vertical EXPLAIN SELECT c FROM foo2 WHERE b>2;
+
+--query_vertical EXPLAIN SELECT c FROM bar WHERE c>2;
+--query_vertical EXPLAIN SELECT c FROM foo WHERE c>2;
+--query_vertical EXPLAIN SELECT c FROM foo2 WHERE c>2;
+
+DROP TABLE foo, bar, foo2;
+
+
+#
+# Bug#41348: INSERT INTO tbl SELECT * FROM temp_tbl overwrites locking type of temp table
+#
+
+--disable_warnings
+DROP TABLE IF EXISTS t1,t3,t2;
+DROP FUNCTION IF EXISTS f1;
+--enable_warnings
+
+DELIMITER |;
+CREATE FUNCTION f1() RETURNS VARCHAR(250)
+ BEGIN
+ return 'hhhhhhh' ;
+ END|
+DELIMITER ;|
+
+CREATE TABLE t1 (a VARCHAR(20), b VARCHAR(20), c VARCHAR(20)) ENGINE=INNODB;
+
+BEGIN WORK;
+
+CREATE TEMPORARY TABLE t2 (a VARCHAR(20), b VARCHAR(20), c varchar(20)) ENGINE=INNODB;
+CREATE TEMPORARY TABLE t3 LIKE t2;
+
+INSERT INTO t1 VALUES ('a','b',NULL),('c','d',NULL),('e','f',NULL);
+
+SET @stmt := CONCAT('INSERT INTO t2 SELECT tbl.a, tbl.b, f1()',' FROM t1 tbl');
+PREPARE stmt1 FROM @stmt;
+
+SET @stmt := CONCAT('INSERT INTO t3', ' SELECT * FROM t2');
+PREPARE stmt3 FROM @stmt;
+
+EXECUTE stmt1;
+
+COMMIT;
+
+DEALLOCATE PREPARE stmt1;
+DEALLOCATE PREPARE stmt3;
+
+DROP TABLE t1,t3,t2;
+DROP FUNCTION f1;
+
+#
+# Bug#37016: TRUNCATE TABLE removes some rows but not all
+#
+
+--disable_warnings
+DROP TABLE IF EXISTS t1,t2;
+--enable_warnings
+
+CREATE TABLE t1 (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
+CREATE TABLE t2 (id INT PRIMARY KEY,
+ t1_id INT, INDEX par_ind (t1_id),
+ FOREIGN KEY (t1_id) REFERENCES t1(id)) ENGINE=INNODB;
+INSERT INTO t1 VALUES (1),(2);
+INSERT INTO t2 VALUES (3,2);
+
+SET AUTOCOMMIT = 0;
+
+START TRANSACTION;
+--error ER_ROW_IS_REFERENCED_2
+TRUNCATE TABLE t1;
+SELECT * FROM t1;
+COMMIT;
+SELECT * FROM t1;
+
+START TRANSACTION;
+--error ER_ROW_IS_REFERENCED_2
+TRUNCATE TABLE t1;
+SELECT * FROM t1;
+ROLLBACK;
+SELECT * FROM t1;
+
+SET AUTOCOMMIT = 1;
+
+START TRANSACTION;
+SELECT * FROM t1;
+COMMIT;
+
+--error ER_ROW_IS_REFERENCED_2
+TRUNCATE TABLE t1;
+SELECT * FROM t1;
+DELETE FROM t2 WHERE id = 3;
+
+START TRANSACTION;
+SELECT * FROM t1;
+TRUNCATE TABLE t1;
+ROLLBACK;
+SELECT * FROM t1;
+TRUNCATE TABLE t2;
+
+DROP TABLE t2;
+DROP TABLE t1;
+
+--echo #
+--echo # Bug#40127 Multiple table DELETE IGNORE hangs on foreign key constraint violation on 5.0
+--echo #
+CREATE TABLE t1 (
+ id INT UNSIGNED NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (id)
+) ENGINE=InnoDB;
+
+CREATE TABLE t2 (
+ id INT UNSIGNED NOT NULL AUTO_INCREMENT,
+ aid INT UNSIGNED NOT NULL,
+ PRIMARY KEY (id),
+ FOREIGN KEY (aid) REFERENCES t1 (id)
+) ENGINE=InnoDB;
+
+CREATE TABLE t3 (
+ bid INT UNSIGNED NOT NULL,
+ FOREIGN KEY (bid) REFERENCES t2 (id)
+) ENGINE=InnoDB;
+
+CREATE TABLE t4 (
+ a INT
+) ENGINE=InnoDB;
+
+CREATE TABLE t5 (
+ a INT
+) ENGINE=InnoDB;
+
+INSERT INTO t1 (id) VALUES (1);
+INSERT INTO t2 (id, aid) VALUES (1, 1),(2,1),(3,1),(4,1);
+INSERT INTO t3 (bid) VALUES (1);
+
+INSERT INTO t4 VALUES (1),(2),(3),(4),(5);
+INSERT INTO t5 VALUES (1);
+
+DELETE t5 FROM t4 LEFT JOIN t5 ON t4.a= t5.a;
+
+--error ER_ROW_IS_REFERENCED_2
+DELETE t2, t1 FROM t2 INNER JOIN t1 ON (t2.aid = t1.id) WHERE t2.id = 1;
+--error ER_ROW_IS_REFERENCED_2
+DELETE t2, t1 FROM t2 INNER JOIN t1 ON (t2.aid = t1.id) WHERE t2.id = 1;
+
+DELETE IGNORE t2, t1 FROM t2 INNER JOIN t1 ON (t2.aid = t1.id) WHERE t2.id = 1;
+
+DROP TABLE t3;
+DROP TABLE t2;
+DROP TABLE t1;
+DROP TABLES t4,t5;
+
+--echo # Bug#40127 Multiple table DELETE IGNORE hangs on foreign key constraint violation on 5.0
+--echo # Testing for any side effects of IGNORE on AFTER DELETE triggers used with
+--echo # transactional tables.
+--echo #
+CREATE TABLE t1 (i INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t2 (a VARCHAR(100)) ENGINE=InnoDB;
+CREATE TABLE t3 (i INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t4 (i INT NOT NULL PRIMARY KEY, t1i INT,
+ FOREIGN KEY (t1i) REFERENCES t1(i))
+ ENGINE=InnoDB;
+delimiter ||;
+CREATE TRIGGER trg AFTER DELETE ON t1 FOR EACH ROW
+BEGIN
+ SET @b:='EXECUTED TRIGGER';
+ INSERT INTO t2 VALUES (@b);
+ SET @a:= error_happens_here;
+END||
+delimiter ;||
+
+SET @b:="";
+SET @a:="";
+INSERT INTO t1 VALUES (1),(2),(3),(4);
+INSERT INTO t3 SELECT * FROM t1;
+--echo ** An error in a trigger causes rollback of the statement.
+--error ER_BAD_FIELD_ERROR
+DELETE t1 FROM t3 LEFT JOIN t1 ON t1.i=t3.i;
+SELECT @a,@b;
+SELECT * FROM t2;
+SELECT * FROM t1 LEFT JOIN t3 ON t1.i=t3.i;
+
+--echo ** Same happens with the IGNORE option
+--error ER_BAD_FIELD_ERROR
+DELETE IGNORE t1 FROM t3 LEFT JOIN t1 ON t1.i=t3.i;
+SELECT * FROM t2;
+SELECT * FROM t1 LEFT JOIN t3 ON t1.i=t3.i;
+
+--echo **
+--echo ** The following is an attempt to demonstrate
+--echo ** error handling inside a row iteration.
+--echo **
+DROP TRIGGER trg;
+TRUNCATE TABLE t1;
+TRUNCATE TABLE t2;
+TRUNCATE TABLE t3;
+
+INSERT INTO t1 VALUES (1),(2),(3),(4);
+INSERT INTO t3 VALUES (1),(2),(3),(4);
+INSERT INTO t4 VALUES (3,3),(4,4);
+
+delimiter ||;
+CREATE TRIGGER trg AFTER DELETE ON t1 FOR EACH ROW
+BEGIN
+ SET @b:= CONCAT('EXECUTED TRIGGER FOR ROW ',CAST(OLD.i AS CHAR));
+ INSERT INTO t2 VALUES (@b);
+END||
+delimiter ;||
+
+--echo ** DELETE is prevented by foreign key constrains but errors are silenced.
+--echo ** The AFTER trigger isn't fired.
+DELETE IGNORE t1 FROM t3 LEFT JOIN t1 ON t1.i=t3.i;
+--echo ** Tables are modified by best effort:
+SELECT * FROM t1 LEFT JOIN t3 ON t1.i=t3.i;
+--echo ** The AFTER trigger was only executed on successful rows:
+SELECT * FROM t2;
+
+DROP TRIGGER trg;
+
+--echo **
+--echo ** Induce an error midway through an AFTER-trigger
+--echo **
+TRUNCATE TABLE t4;
+TRUNCATE TABLE t1;
+TRUNCATE TABLE t3;
+INSERT INTO t1 VALUES (1),(2),(3),(4);
+INSERT INTO t3 VALUES (1),(2),(3),(4);
+delimiter ||;
+CREATE TRIGGER trg AFTER DELETE ON t1 FOR EACH ROW
+BEGIN
+ SET @a:= @a+1;
+ IF @a > 2 THEN
+ INSERT INTO t4 VALUES (5,5);
+ END IF;
+END||
+delimiter ;||
+
+SET @a:=0;
+--echo ** Errors in the trigger causes the statement to abort.
+--error ER_NO_REFERENCED_ROW_2
+DELETE IGNORE t1 FROM t3 LEFT JOIN t1 ON t1.i=t3.i;
+SELECT * FROM t1 LEFT JOIN t3 ON t1.i=t3.i;
+SELECT * FROM t4;
+
+DROP TRIGGER trg;
+DROP TABLE t4;
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+
+#
+# Bug#43580: Issue with Innodb on multi-table update
+#
+CREATE TABLE t1 (a INT, b INT, KEY (a)) ENGINE = INNODB;
+CREATE TABLE t2 (a INT KEY, b INT, KEY (b)) ENGINE = INNODB;
+
+CREATE TABLE t3 (a INT, b INT KEY, KEY (a)) ENGINE = INNODB;
+CREATE TABLE t4 (a INT KEY, b INT, KEY (b)) ENGINE = INNODB;
+
+INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6);
+INSERT INTO t2 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
+
+INSERT INTO t3 VALUES (1, 101), (2, 102), (3, 103), (4, 104), (5, 105), (6, 106);
+INSERT INTO t4 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
+
+UPDATE t1, t2 SET t1.a = t1.a + 100, t2.b = t1.a + 10
+WHERE t1.a BETWEEN 2 AND 4 AND t2.a = t1.b;
+--sorted_result
+SELECT * FROM t2;
+
+UPDATE t3, t4 SET t3.a = t3.a + 100, t4.b = t3.a + 10
+WHERE t3.a BETWEEN 2 AND 4 AND t4.a = t3.b - 100;
+--sorted_result
+SELECT * FROM t4;
+
+DROP TABLE t1, t2, t3, t4;
+
+--echo #
+--echo # Bug#44886: SIGSEGV in test_if_skip_sort_order() -
+--echo # uninitialized variable used as subscript
+--echo #
+
+CREATE TABLE t1 (a INT, b INT, c INT, d INT, PRIMARY KEY (b), KEY (a,c))
+ ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,1,1,0);
+
+CREATE TABLE t2 (a INT, b INT, e INT, KEY (e)) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1,1,2);
+
+CREATE TABLE t3 (a INT, b INT) ENGINE=MyISAM;
+INSERT INTO t3 VALUES (1, 1);
+
+SELECT * FROM t1, t2, t3
+ WHERE t1.a = t3.a AND (t1.b = t3.b OR t1.d) AND t2.b = t1.b AND t2.e = 2
+ GROUP BY t1.b;
+
+DROP TABLE t1, t2, t3;
+
+--echo #
+--echo # Bug #45828: Optimizer won't use partial primary key if another
+--echo # index can prevent filesort
+--echo #
+
+# Create the table
+CREATE TABLE `t1` (
+ c1 int NOT NULL,
+ c2 int NOT NULL,
+ c3 int NOT NULL,
+ PRIMARY KEY (c1,c2),
+ KEY (c3)
+) ENGINE=InnoDB;
+
+# populate with data
+INSERT INTO t1 VALUES (5,2,1246276747);
+INSERT INTO t1 VALUES (2,1,1246281721);
+INSERT INTO t1 VALUES (7,3,1246281756);
+INSERT INTO t1 VALUES (4,2,1246282139);
+INSERT INTO t1 VALUES (3,1,1246282230);
+INSERT INTO t1 VALUES (1,0,1246282712);
+INSERT INTO t1 VALUES (8,3,1246282765);
+INSERT INTO t1 SELECT c1+10,c2+10,c3+10 FROM t1;
+INSERT INTO t1 SELECT c1+100,c2+100,c3+100 from t1;
+INSERT INTO t1 SELECT c1+1000,c2+1000,c3+1000 from t1;
+INSERT INTO t1 SELECT c1+10000,c2+10000,c3+10000 from t1;
+INSERT INTO t1 SELECT c1+100000,c2+100000,c3+100000 from t1;
+INSERT INTO t1 SELECT c1+1000000,c2+1000000,c3+1000000 from t1;
+
+# query and no rows will match the c1 condition, whereas all will match c3
+SELECT * FROM t1 WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3;
+
+# SHOULD use the pk.
+# index on c3 will be used instead of primary key
+EXPLAIN SELECT * FROM t1 WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3;
+
+# if we force the primary key, we can see the estimate is 1
+EXPLAIN SELECT * FROM t1 FORCE INDEX (PRIMARY) WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3;
+
+
+CREATE TABLE t2 (
+ c1 int NOT NULL,
+ c2 int NOT NULL,
+ c3 int NOT NULL,
+ KEY (c1,c2),
+ KEY (c3)
+) ENGINE=InnoDB;
+
+# SHOULD use the pk.
+# if we switch it from a primary key to a regular index, it works correctly as well
+explain SELECT * FROM t2 WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3;
+
+DROP TABLE t1,t2;
+
+
+--echo #
+--echo # 36259: Optimizing with ORDER BY
+--echo #
+
+CREATE TABLE t1 (
+ a INT NOT NULL AUTO_INCREMENT,
+ b INT NOT NULL,
+ c INT NOT NULL,
+ d VARCHAR(5),
+ e INT NOT NULL,
+ PRIMARY KEY (a), KEY i2 (b,c,d)
+) ENGINE=InnoDB;
+
+INSERT INTO t1 (b,c,d,e) VALUES (1,1,'a',1), (2,2,'b',2);
+INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
+INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
+INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
+INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
+INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
+INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
+EXPLAIN SELECT * FROM t1 WHERE b=1 AND c=1 ORDER BY a;
+EXPLAIN SELECT * FROM t1 FORCE INDEX(i2) WHERE b=1 and c=1 ORDER BY a;
+EXPLAIN SELECT * FROM t1 FORCE INDEX(PRIMARY) WHERE b=1 AND c=1 ORDER BY a;
+
+DROP TABLE t1;
+
+--echo #
+--echo # Bug #47963: Wrong results when index is used
+--echo #
+CREATE TABLE t1(
+ a VARCHAR(5) NOT NULL,
+ b VARCHAR(5) NOT NULL,
+ c DATETIME NOT NULL,
+ KEY (c)
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES('TEST', 'TEST', '2009-10-09 00:00:00');
+SELECT * FROM t1 WHERE a = 'TEST' AND
+ c >= '2009-10-09 00:00:00' AND c <= '2009-10-09 00:00:00';
+SELECT * FROM t1 WHERE a = 'TEST' AND
+ c >= '2009-10-09 00:00:00.0' AND c <= '2009-10-09 00:00:00.0';
+SELECT * FROM t1 WHERE a = 'TEST' AND
+ c >= '2009-10-09 00:00:00.0' AND c <= '2009-10-09 00:00:00';
+SELECT * FROM t1 WHERE a = 'TEST' AND
+ c >= '2009-10-09 00:00:00' AND c <= '2009-10-09 00:00:00.0';
+SELECT * FROM t1 WHERE a = 'TEST' AND
+ c >= '2009-10-09 00:00:00.000' AND c <= '2009-10-09 00:00:00.000';
+SELECT * FROM t1 WHERE a = 'TEST' AND
+ c >= '2009-10-09 00:00:00.00' AND c <= '2009-10-09 00:00:00.001';
+SELECT * FROM t1 WHERE a = 'TEST' AND
+ c >= '2009-10-09 00:00:00.001' AND c <= '2009-10-09 00:00:00.00';
+EXPLAIN SELECT * FROM t1 WHERE a = 'TEST' AND
+ c >= '2009-10-09 00:00:00.001' AND c <= '2009-10-09 00:00:00.00';
+DROP TABLE t1;
+
+--echo #
+--echo # Bug #46175: NULL read_view and consistent read assertion
+--echo #
+
+CREATE TABLE t1(a CHAR(13),KEY(a)) ENGINE=innodb;
+CREATE TABLE t2(b DATETIME,KEY(b)) ENGINE=innodb;
+INSERT INTO t1 VALUES (),();
+INSERT INTO t2 VALUES (),();
+CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t2
+ WHERE b =(SELECT a FROM t1 LIMIT 1);
+
+--disable_query_log
+--disable_result_log
+CONNECT (con1, localhost, root,,);
+--enable_query_log
+--enable_result_log
+CONNECTION default;
+
+DELIMITER |;
+CREATE PROCEDURE p1(num INT)
+BEGIN
+ DECLARE i INT DEFAULT 0;
+ REPEAT
+ SHOW CREATE VIEW v1;
+ SET i:=i+1;
+ UNTIL i>num END REPEAT;
+END|
+DELIMITER ;|
+
+--echo # Should not crash
+--disable_query_log
+--disable_result_log
+--send CALL p1(1000)
+CONNECTION con1;
+--echo # Should not crash
+CALL p1(1000);
+
+CONNECTION default;
+--reap
+--enable_query_log
+--enable_result_log
+
+DISCONNECT con1;
+DROP PROCEDURE p1;
+DROP VIEW v1;
+DROP TABLE t1,t2;
+
+
+--echo #
+--echo # Bug #49324: more valgrind errors in test_if_skip_sort_order
+--echo #
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb ;
+--echo #should not cause valgrind warnings
+SELECT 1 FROM t1 JOIN t1 a USING(a) GROUP BY t1.a,t1.a;
+DROP TABLE t1;
+
+--echo #
+--echo # Bug#50843: Filesort used instead of clustered index led to
+--echo # performance degradation.
+--echo #
+create table t1(f1 int not null primary key, f2 int) engine=innodb;
+create table t2(f1 int not null, key (f1)) engine=innodb;
+insert into t1 values (1,1),(2,2),(3,3);
+insert into t2 values (1),(2),(3);
+explain select t1.* from t1 left join t2 using(f1) group by t1.f1;
+drop table t1,t2;
+--echo #
+
+
+--echo #
+--echo # Bug #49838: DROP INDEX and ADD UNIQUE INDEX for same index may
+--echo # corrupt definition at engine
+--echo #
+
+CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL, KEY k (a,b))
+ ENGINE=InnoDB;
+
+ALTER TABLE t1 DROP INDEX k, ADD UNIQUE INDEX k (a,b);
+
+--query_vertical SHOW INDEXES FROM t1;
+
+DROP TABLE t1;
+
+--echo #
+--echo # Bug #53334: wrong result for outer join with impossible ON condition
+--echo # (see the same test case for MyISAM in join.test)
+--echo #
+
+create table t1 (id int primary key);
+create table t2 (id int);
+
+insert into t1 values (75);
+insert into t1 values (79);
+insert into t1 values (78);
+insert into t1 values (77);
+replace into t1 values (76);
+replace into t1 values (76);
+insert into t1 values (104);
+insert into t1 values (103);
+insert into t1 values (102);
+insert into t1 values (101);
+insert into t1 values (105);
+insert into t1 values (106);
+insert into t1 values (107);
+
+insert into t2 values (107),(75),(1000);
+
+select t1.id,t2.id from t2 left join t1 on t1.id>=74 and t1.id<=0
+ where t2.id=75 and t1.id is null;
+explain select t1.id,t2.id from t2 left join t1 on t1.id>=74 and t1.id<=0
+ where t2.id=75 and t1.id is null;
+
+drop table t1,t2;
+
+--echo #
+--echo # Bug #47453: InnoDB incorrectly changes TIMESTAMP columns when
+--echo # JOINed during an UPDATE
+--echo #
+
+CREATE TABLE t1 (d INT) ENGINE=InnoDB;
+CREATE TABLE t2 (a INT, b INT,
+ c TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
+ ON UPDATE CURRENT_TIMESTAMP) ENGINE=InnoDB;
+
+--echo set up our data elements
+INSERT INTO t1 (d) VALUES (1);
+INSERT INTO t2 (a,b) VALUES (1,1);
+SELECT SECOND(c) INTO @bug47453 FROM t2;
+
+SELECT SECOND(c)-@bug47453 FROM t1 JOIN t2 ON d=a;
+UPDATE t1 JOIN t2 ON d=a SET b=1 WHERE a=1;
+SELECT SECOND(c)-@bug47453 FROM t1 JOIN t2 ON d=a;
+
+SELECT SLEEP(1);
+
+UPDATE t1 JOIN t2 ON d=a SET b=1 WHERE a=1;
+
+--echo #should be 0
+SELECT SECOND(c)-@bug47453 FROM t1 JOIN t2 ON d=a;
+
+DROP TABLE t1, t2;
+
+--echo #
+--echo # Bug#38999 valgrind warnings for update statement in function compare_record()
+--echo #
+
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 values (1),(2),(3),(4),(5);
+INSERT INTO t2 values (1);
+
+SELECT * FROM t1 WHERE a = 2;
+UPDATE t1,t2 SET t1.a = t1.a + 100 WHERE t1.a = 1;
+
+DROP TABLE t1,t2;
+
+--echo #
+--echo # Bug #53334: wrong result for outer join with impossible ON condition
+--echo # (see the same test case for MyISAM in join.test)
+--echo #
+
+CREATE TABLE t1 (id INT PRIMARY KEY);
+CREATE TABLE t2 (id INT);
+
+INSERT INTO t1 VALUES (75);
+INSERT INTO t1 VALUES (79);
+INSERT INTO t1 VALUES (78);
+INSERT INTO t1 VALUES (77);
+REPLACE INTO t1 VALUES (76);
+REPLACE INTO t1 VALUES (76);
+INSERT INTO t1 VALUES (104);
+INSERT INTO t1 VALUES (103);
+INSERT INTO t1 VALUES (102);
+INSERT INTO t1 VALUES (101);
+INSERT INTO t1 VALUES (105);
+INSERT INTO t1 VALUES (106);
+INSERT INTO t1 VALUES (107);
+
+INSERT INTO t2 VALUES (107),(75),(1000);
+
+SELECT t1.id,t2.id FROM t2 LEFT JOIN t1 ON t1.id>=74 AND t1.id<=0
+ WHERE t2.id=75 AND t1.id IS NULL;
+EXPLAIN SELECT t1.id,t2.id FROM t2 LEFT JOIN t1 ON t1.id>=74 AND t1.id<=0
+ WHERE t2.id=75 AND t1.id IS NULL;
+
+DROP TABLE t1,t2;
+
+--echo #
+--echo # Bug #53830: !table || (!table->read_set || bitmap_is_set(table->read_set, field_index))
+--echo #
+
+CREATE TABLE t1 (a INT, b INT, c INT, d INT,
+ PRIMARY KEY(a,b,c), KEY(b,d))
+ ENGINE=InnoDB;
+INSERT INTO t1 VALUES (0, 77, 1, 3);
+
+UPDATE t1 SET d = 0 WHERE b = 77 AND c = 25;
+
+DROP TABLE t1;
+
+--echo #
+--echo # Bug#50389 Using intersect does not return all rows
+--echo #
+
+CREATE TABLE t1 (
+ f1 INT(10) NOT NULL,
+ f2 INT(10),
+ f3 INT(10),
+ f4 TINYINT(4),
+ f5 VARCHAR(50),
+ PRIMARY KEY (f1),
+ KEY idx1 (f2,f5,f4),
+ KEY idx2 (f2,f4)
+) ENGINE=InnoDB;
+
+LOAD DATA INFILE '../../std_data/intersect-bug50389.tsv' INTO TABLE t1;
+
+SELECT * FROM t1 WHERE f1 IN
+(3305028,3353871,3772880,3346860,4228206,3336022,
+ 3470988,3305175,3329875,3817277,3856380,3796193,
+ 3784744,4180925,4559596,3963734,3856391,4494153)
+AND f5 = 'abcdefghijklmnopwrst' AND f2 = 1221457 AND f4 = 0 ;
+
+EXPLAIN SELECT * FROM t1 WHERE f1 IN
+(3305028,3353871,3772880,3346860,4228206,3336022,
+ 3470988,3305175,3329875,3817277,3856380,3796193,
+ 3784744,4180925,4559596,3963734,3856391,4494153)
+AND f5 = 'abcdefghijklmnopwrst' AND f2 = 1221457 AND f4 = 0 ;
+
+DROP TABLE t1;
+
+--echo #
+--echo # Bug#51431 Wrong sort order after import of dump file
+--echo #
+
+CREATE TABLE t1 (
+ f1 INT(11) NOT NULL,
+ f2 int(11) NOT NULL,
+ f3 int(11) NOT NULL,
+ f4 tinyint(1) NOT NULL,
+ PRIMARY KEY (f1),
+ UNIQUE KEY (f2, f3),
+ KEY (f4)
+) ENGINE=InnoDB;
+
+INSERT INTO t1 VALUES
+(1,1,991,1), (2,1,992,1), (3,1,993,1), (4,1,994,1), (5,1,995,1),
+(6,1,996,1), (7,1,997,1), (8,1,998,1), (10,1,999,1), (11,1,9910,1),
+(16,1,9911,1), (17,1,9912,1), (18,1,9913,1), (19,1,9914,1), (20,1,9915,1),
+(21,1,9916,1), (22,1,9917,1), (23,1,9918,1), (24,1,9919,1), (25,1,9920,1),
+(26,1,9921,1), (27,1,9922,1);
+
+FLUSH TABLES;
+
+SELECT * FROM t1 WHERE f2 = 1 AND f4 = TRUE
+ORDER BY f1 DESC LIMIT 5;
+EXPLAIN SELECT * FROM t1 WHERE f2 = 1 AND f4 = TRUE
+ORDER BY f1 DESC LIMIT 5;
+
+DROP TABLE t1;
+
+--echo End of 5.1 tests
diff --git a/mysql-test/t/innodb_mysql_rbk-master.opt b/mysql-test/suite/innodb/t/innodb_mysql_rbk-master.opt
index 0e400f9c36b..0e400f9c36b 100644
--- a/mysql-test/t/innodb_mysql_rbk-master.opt
+++ b/mysql-test/suite/innodb/t/innodb_mysql_rbk-master.opt
diff --git a/mysql-test/t/innodb_mysql_rbk.test b/mysql-test/suite/innodb/t/innodb_mysql_rbk.test
index d2368c81f95..d2368c81f95 100644
--- a/mysql-test/t/innodb_mysql_rbk.test
+++ b/mysql-test/suite/innodb/t/innodb_mysql_rbk.test
diff --git a/mysql-test/t/innodb_notembedded.test b/mysql-test/suite/innodb/t/innodb_notembedded.test
index c74dc931505..c74dc931505 100644
--- a/mysql-test/t/innodb_notembedded.test
+++ b/mysql-test/suite/innodb/t/innodb_notembedded.test
diff --git a/mysql-test/t/innodb_timeout_rollback-master.opt b/mysql-test/suite/innodb/t/innodb_timeout_rollback-master.opt
index 50921bb4df0..50921bb4df0 100644
--- a/mysql-test/t/innodb_timeout_rollback-master.opt
+++ b/mysql-test/suite/innodb/t/innodb_timeout_rollback-master.opt
diff --git a/mysql-test/t/innodb_timeout_rollback.test b/mysql-test/suite/innodb/t/innodb_timeout_rollback.test
index 99890971064..99890971064 100644
--- a/mysql-test/t/innodb_timeout_rollback.test
+++ b/mysql-test/suite/innodb/t/innodb_timeout_rollback.test
diff --git a/mysql-test/suite/innodb_plugin/r/innodb-autoinc-optimize.result b/mysql-test/suite/innodb_plugin/r/innodb-autoinc-optimize.result
new file mode 100644
index 00000000000..c6da43555b2
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb-autoinc-optimize.result
@@ -0,0 +1,9 @@
+drop table if exists t1;
+create table t1(a int not null auto_increment primary key) engine=innodb;
+insert into t1 set a = -1;
+optimize table t1;
+Table Op Msg_type Msg_text
+test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
+test.t1 optimize status OK
+==== clean up ====
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_plugin/r/innodb-ucs2.result b/mysql-test/suite/innodb_plugin/r/innodb-ucs2.result
new file mode 100644
index 00000000000..b6bff7d5f42
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb-ucs2.result
@@ -0,0 +1,314 @@
+drop table if exists t1, t2;
+create table t1 (
+a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
+) character set utf8 engine = innodb;
+create table t2 (
+a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
+) character set ucs2 engine = innodb;
+insert into t1 values (1,'abcdefg','abcdefg','one');
+insert into t1 values (2,'ijkilmn','ijkilmn','two');
+insert into t1 values (3,'qrstuvw','qrstuvw','three');
+insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
+insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
+insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
+insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
+insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
+insert into t2 values (1,'abcdefg','abcdefg','one');
+insert into t2 values (2,'ijkilmn','ijkilmn','two');
+insert into t2 values (3,'qrstuvw','qrstuvw','three');
+insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
+insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
+insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
+insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
+insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
+insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
+insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
+insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
+insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
+update t1 set filler = 'boo' where a = 1;
+update t2 set filler ='email' where a = 4;
+select a,hex(b),hex(c),filler from t1 order by filler;
+a hex(b) hex(c) filler
+1 61626364656667 61626364656667 boo
+4 D0B1 D0B1 eight
+4 5B 5B five
+4 E880BD E880BD four
+4 E880BDD0B1E880BD E880BDD0B1E880BD seven
+4 E880BDE880BD E880BDE880BD six
+3 71727374757677 71727374757677 three
+2 696A6B696C6D6E 696A6B696C6D6E two
+select a,hex(b),hex(c),filler from t2 order by filler;
+a hex(b) hex(c) filler
+4 05630563 05630563 email
+4 0563 0563 email
+4 05612020 05612020 email
+4 01FC 01FC email
+4 0120 0120 email
+4 00640065 00640065 email
+4 00E400E50068 00E400E50068 email
+4 0000E400 0000E400 email
+4 0000563001FC0563 0000563001FC0563 email
+1 0061006200630064006500660067 0061006200630064006500660067 one
+3 0071007200730074007500760077 0071007200730074007500760077 three
+2 0069006A006B0069006C006D006E 0069006A006B0069006C006D006E two
+drop table t1;
+drop table t2;
+create table t1 (
+a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2))
+) character set utf8 engine = innodb;
+create table t2 (
+a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2))
+) character set ucs2 engine = innodb;
+insert into t1 values (1,'abcdefg','abcdefg','one');
+insert into t1 values (2,'ijkilmn','ijkilmn','two');
+insert into t1 values (3,'qrstuvw','qrstuvw','three');
+insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
+insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
+insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
+insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
+insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
+insert into t2 values (1,'abcdefg','abcdefg','one');
+insert into t2 values (2,'ijkilmn','ijkilmn','two');
+insert into t2 values (3,'qrstuvw','qrstuvw','three');
+insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
+insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
+insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
+insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
+insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
+insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
+insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
+insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
+insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
+update t1 set filler = 'boo' where a = 1;
+update t2 set filler ='email' where a = 4;
+select a,hex(b),hex(c),filler from t1 order by filler;
+a hex(b) hex(c) filler
+1 61626364656667 61626364656667 boo
+4 D0B1 D0B1 eight
+4 5B 5B five
+4 E880BD E880BD four
+4 E880BDD0B1E880BD E880BDD0B1E880BD seven
+4 E880BDE880BD E880BDE880BD six
+3 71727374757677 71727374757677 three
+2 696A6B696C6D6E 696A6B696C6D6E two
+select a,hex(b),hex(c),filler from t2 order by filler;
+a hex(b) hex(c) filler
+4 05630563 05630563 email
+4 0563 0563 email
+4 05612020 05612020 email
+4 01FC 01FC email
+4 0120 0120 email
+4 00640065 00640065 email
+4 00E400E50068 00E400E50068 email
+4 0000E400 0000E400 email
+4 0000563001FC0563 0000563001FC0563 email
+1 0061006200630064006500660067 0061006200630064006500660067 one
+3 0071007200730074007500760077 0071007200730074007500760077 three
+2 0069006A006B0069006C006D006E 0069006A006B0069006C006D006E two
+drop table t1;
+drop table t2;
+create table t1 (
+a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2))
+) character set utf8 engine = innodb;
+create table t2 (
+a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2))
+) character set ucs2 engine = innodb;
+insert into t1 values (1,'abcdefg','abcdefg','one');
+insert into t1 values (2,'ijkilmn','ijkilmn','two');
+insert into t1 values (3,'qrstuvw','qrstuvw','three');
+insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
+insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
+insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
+insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
+insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
+insert into t2 values (1,'abcdefg','abcdefg','one');
+insert into t2 values (2,'ijkilmn','ijkilmn','two');
+insert into t2 values (3,'qrstuvw','qrstuvw','three');
+insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
+insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
+insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
+insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
+insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
+insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
+insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
+insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
+insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
+update t1 set filler = 'boo' where a = 1;
+update t2 set filler ='email' where a = 4;
+select a,hex(b),hex(c),filler from t1 order by filler;
+a hex(b) hex(c) filler
+1 61626364656667 61626364656667 boo
+4 D0B1 D0B1 eight
+4 5B 5B five
+4 E880BD E880BD four
+4 E880BDD0B1E880BD E880BDD0B1E880BD seven
+4 E880BDE880BD E880BDE880BD six
+3 71727374757677 71727374757677 three
+2 696A6B696C6D6E 696A6B696C6D6E two
+select a,hex(b),hex(c),filler from t2 order by filler;
+a hex(b) hex(c) filler
+4 0120 0120 email
+4 01FC 01FC email
+4 0563 0563 email
+4 0000563001FC0563 0000563001FC0563 email
+4 0000E400 0000E400 email
+4 00640065 00640065 email
+4 00E400E50068 00E400E50068 email
+4 05612020 05612020 email
+4 05630563 05630563 email
+1 0061006200630064006500660067 0061006200630064006500660067 one
+3 0071007200730074007500760077 0071007200730074007500760077 three
+2 0069006A006B0069006C006D006E 0069006A006B0069006C006D006E two
+drop table t1;
+drop table t2;
+create table t1 (
+a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2))
+) character set utf8 engine = innodb;
+create table t2 (
+a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2))
+) character set ucs2 engine = innodb;
+insert into t1 values (1,'abcdefg','abcdefg','one');
+insert into t1 values (2,'ijkilmn','ijkilmn','two');
+insert into t1 values (3,'qrstuvw','qrstuvw','three');
+insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
+insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
+insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
+insert into t2 values (1,'abcdefg','abcdefg','one');
+insert into t2 values (2,'ijkilmn','ijkilmn','two');
+insert into t2 values (3,'qrstuvw','qrstuvw','three');
+insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
+insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
+insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
+insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
+insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
+insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
+insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
+update t1 set filler = 'boo' where a = 1;
+update t2 set filler ='email' where a = 4;
+select a,hex(b),hex(c),filler from t1 order by filler;
+a hex(b) hex(c) filler
+1 61626364656667 61626364656667 boo
+4 D0B1 D0B1 eight
+4 5B 5B five
+4 E880BD E880BD four
+3 71727374757677 71727374757677 three
+2 696A6B696C6D6E 696A6B696C6D6E two
+select a,hex(b),hex(c),filler from t2 order by filler;
+a hex(b) hex(c) filler
+4 0000E400 0000E400 email
+4 00640065 00640065 email
+4 00E400E50068 00E400E50068 email
+4 0120 0120 email
+4 01FC 01FC email
+4 05612020 05612020 email
+4 0563 0563 email
+1 61626364656667 61626364656667 one
+3 71727374757677 71727374757677 three
+2 696A6B696C6D6E 696A6B696C6D6E two
+drop table t1;
+drop table t2;
+commit;
+CREATE TABLE t1 (
+ind enum('0','1','2') NOT NULL default '0',
+string1 varchar(250) NOT NULL,
+PRIMARY KEY (ind)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE t2 (
+ind enum('0','1','2') NOT NULL default '0',
+string1 varchar(250) NOT NULL,
+PRIMARY KEY (ind)
+) ENGINE=InnoDB DEFAULT CHARSET=ucs2;
+INSERT INTO t1 VALUES ('1', ''),('2', '');
+INSERT INTO t2 VALUES ('1', ''),('2', '');
+SELECT hex(ind),hex(string1) FROM t1 ORDER BY string1;
+hex(ind) hex(string1)
+31
+32
+SELECT hex(ind),hex(string1) FROM t2 ORDER BY string1;
+hex(ind) hex(string1)
+0031
+0032
+drop table t1,t2;
+CREATE TABLE t1 (
+ind set('0','1','2') NOT NULL default '0',
+string1 varchar(250) NOT NULL,
+PRIMARY KEY (ind)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE t2 (
+ind set('0','1','2') NOT NULL default '0',
+string1 varchar(250) NOT NULL,
+PRIMARY KEY (ind)
+) ENGINE=InnoDB DEFAULT CHARSET=ucs2;
+INSERT INTO t1 VALUES ('1', ''),('2', '');
+INSERT INTO t2 VALUES ('1', ''),('2', '');
+SELECT hex(ind),hex(string1) FROM t1 ORDER BY string1;
+hex(ind) hex(string1)
+31
+32
+SELECT hex(ind),hex(string1) FROM t2 ORDER BY string1;
+hex(ind) hex(string1)
+0031
+0032
+drop table t1,t2;
+CREATE TABLE t1 (
+ind bit not null,
+string1 varchar(250) NOT NULL,
+PRIMARY KEY (ind)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE t2 (
+ind bit not null,
+string1 varchar(250) NOT NULL,
+PRIMARY KEY (ind)
+) ENGINE=InnoDB DEFAULT CHARSET=ucs2;
+insert into t1 values(0,''),(1,'');
+insert into t2 values(0,''),(1,'');
+select hex(ind),hex(string1) from t1 order by string1;
+hex(ind) hex(string1)
+0
+1
+select hex(ind),hex(string1) from t2 order by string1;
+hex(ind) hex(string1)
+0
+1
+drop table t1,t2;
+create table t2 (
+a int, b char(10), filler char(10), primary key(a, b(2))
+) character set utf8 engine = innodb;
+insert into t2 values (1,'abcdefg','one');
+insert into t2 values (2,'ijkilmn','two');
+insert into t2 values (3, 'qrstuvw','three');
+update t2 set a=5, filler='booo' where a=1;
+drop table t2;
+create table t2 (
+a int, b char(10), filler char(10), primary key(a, b(2))
+) character set ucs2 engine = innodb;
+insert into t2 values (1,'abcdefg','one');
+insert into t2 values (2,'ijkilmn','two');
+insert into t2 values (3, 'qrstuvw','three');
+update t2 set a=5, filler='booo' where a=1;
+drop table t2;
+create table t1(a int not null, b char(110),primary key(a,b(100))) engine=innodb default charset=utf8;
+insert into t1 values(1,'abcdefg'),(2,'defghijk');
+insert into t1 values(6,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1);
+insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2);
+select a,hex(b) from t1 order by b;
+a hex(b)
+1 61626364656667
+2 6465666768696A6B
+6 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1
+7 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2
+update t1 set b = 'three' where a = 6;
+drop table t1;
+create table t1(a int not null, b text(110),primary key(a,b(100))) engine=innodb default charset=utf8;
+insert into t1 values(1,'abcdefg'),(2,'defghijk');
+insert into t1 values(6,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1);
+insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2);
+select a,hex(b) from t1 order by b;
+a hex(b)
+1 61626364656667
+2 6465666768696A6B
+6 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1
+7 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2
+update t1 set b = 'three' where a = 6;
+drop table t1;
+End of 5.0 tests
diff --git a/mysql-test/suite/innodb_plugin/r/innodb.result b/mysql-test/suite/innodb_plugin/r/innodb.result
index e435c0f68ca..75a7023f9d0 100644
--- a/mysql-test/suite/innodb_plugin/r/innodb.result
+++ b/mysql-test/suite/innodb_plugin/r/innodb.result
@@ -1184,82 +1184,6 @@ a b
8 8
9 9
drop table t1;
-CREATE TABLE t1 (a int not null primary key, b int not null, key (b)) engine=innodb;
-CREATE TABLE t2 (a int not null primary key, b int not null, key (b)) engine=innodb;
-INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10),(11,11),(12,12);
-INSERT INTO t2 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
-update t1,t2 set t1.a=t1.a+100;
-select * from t1;
-a b
-101 1
-102 2
-103 3
-104 4
-105 5
-106 6
-107 7
-108 8
-109 9
-110 10
-111 11
-112 12
-update t1,t2 set t1.a=t1.a+100 where t1.a=101;
-select * from t1;
-a b
-201 1
-102 2
-103 3
-104 4
-105 5
-106 6
-107 7
-108 8
-109 9
-110 10
-111 11
-112 12
-update t1,t2 set t1.b=t1.b+10 where t1.b=2;
-select * from t1;
-a b
-201 1
-103 3
-104 4
-105 5
-106 6
-107 7
-108 8
-109 9
-110 10
-111 11
-102 12
-112 12
-update t1,t2 set t1.b=t1.b+2,t2.b=t1.b+10 where t1.b between 3 and 5 and t1.a=t2.a+100;
-select * from t1;
-a b
-201 1
-103 5
-104 6
-106 6
-105 7
-107 7
-108 8
-109 9
-110 10
-111 11
-102 12
-112 12
-select * from t2;
-a b
-1 1
-2 2
-6 6
-7 7
-8 8
-9 9
-3 13
-4 14
-5 15
-drop table t1,t2;
CREATE TABLE t2 ( NEXT_T BIGINT NOT NULL PRIMARY KEY) ENGINE=MyISAM;
CREATE TABLE t1 ( B_ID INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
SET AUTOCOMMIT=0;
@@ -1752,10 +1676,10 @@ variable_value - @innodb_rows_deleted_orig
71
SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted';
variable_value - @innodb_rows_inserted_orig
-1087
+1066
SELECT variable_value - @innodb_rows_updated_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated';
variable_value - @innodb_rows_updated_orig
-885
+865
SELECT variable_value - @innodb_row_lock_waits_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_waits';
variable_value - @innodb_row_lock_waits_orig
0
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_autoinc_lock_mode_zero.result b/mysql-test/suite/innodb_plugin/r/innodb_autoinc_lock_mode_zero.result
new file mode 100644
index 00000000000..3d016684338
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb_autoinc_lock_mode_zero.result
@@ -0,0 +1,39 @@
+drop table if exists t1;
+CREATE TABLE t1 (
+id int(11) NOT NULL auto_increment,
+ggid varchar(32) binary DEFAULT '' NOT NULL,
+email varchar(64) DEFAULT '' NOT NULL,
+passwd varchar(32) binary DEFAULT '' NOT NULL,
+PRIMARY KEY (id),
+UNIQUE ggid (ggid)
+) ENGINE=innodb;
+insert into t1 (ggid,passwd) values ('test1','xxx');
+insert into t1 (ggid,passwd) values ('test2','yyy');
+insert into t1 (ggid,passwd) values ('test2','this will fail');
+ERROR 23000: Duplicate entry 'test2' for key 'ggid'
+insert into t1 (ggid,id) values ('this will fail',1);
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+select * from t1 where ggid='test1';
+id ggid email passwd
+1 test1 xxx
+select * from t1 where passwd='xxx';
+id ggid email passwd
+1 test1 xxx
+select * from t1 where id=2;
+id ggid email passwd
+2 test2 yyy
+replace into t1 (ggid,id) values ('this will work',1);
+replace into t1 (ggid,passwd) values ('test2','this will work');
+update t1 set id=100,ggid='test2' where id=1;
+ERROR 23000: Duplicate entry 'test2' for key 'ggid'
+select * from t1;
+id ggid email passwd
+1 this will work
+3 test2 this will work
+select * from t1 where id=1;
+id ggid email passwd
+1 this will work
+select * from t1 where id=999;
+id ggid email passwd
+drop table t1;
+End of tests
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_bug30919.result b/mysql-test/suite/innodb_plugin/r/innodb_bug30919.result
new file mode 100644
index 00000000000..42aa4ff302b
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug30919.result
@@ -0,0 +1,1043 @@
+use test;
+CREATE TABLE test.part_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
+dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
+fkid MEDIUMINT, filler VARCHAR(255),
+PRIMARY KEY(id)) ENGINE='innodb'
+PARTITION BY RANGE(id)
+SUBPARTITION BY hash(id) subpartitions 2
+(PARTITION pa3 values less than (42),
+PARTITION pa6 values less than (60),
+PARTITION pa7 values less than (70),
+PARTITION pa8 values less than (80),
+PARTITION pa9 values less than (90),
+PARTITION pa10 values less than (100),
+PARTITION pa11 values less than MAXVALUE);
+CREATE PROCEDURE test.proc_part()
+BEGIN
+DECLARE ins_count INT DEFAULT 1000;
+DECLARE del_count INT;
+DECLARE cur_user VARCHAR(255);
+DECLARE local_uuid VARCHAR(255);
+DECLARE local_time TIMESTAMP;
+SET local_time= NOW();
+SET cur_user= CURRENT_USER();
+SET local_uuid= UUID();
+WHILE ins_count > 0 DO
+INSERT INTO test.part_tbl VALUES (NULL, NOW(), USER() , UUID(),
+ins_count,'Going to test MBR for MySQL');
+SET ins_count = ins_count - 1;
+END WHILE;
+SELECT MAX(id) FROM test.part_tbl INTO del_count;
+WHILE del_count > 0 DO
+DELETE FROM test.part_tbl WHERE id = del_count;
+select count(*) as internal_count, del_count -- these two lines are for
+FROM test.part_tbl; -- debug to show the problem
+SET del_count = del_count - 2;
+END WHILE;
+END|
+CALL test.proc_part();
+internal_count del_count
+999 1000
+internal_count del_count
+998 998
+internal_count del_count
+997 996
+internal_count del_count
+996 994
+internal_count del_count
+995 992
+internal_count del_count
+994 990
+internal_count del_count
+993 988
+internal_count del_count
+992 986
+internal_count del_count
+991 984
+internal_count del_count
+990 982
+internal_count del_count
+989 980
+internal_count del_count
+988 978
+internal_count del_count
+987 976
+internal_count del_count
+986 974
+internal_count del_count
+985 972
+internal_count del_count
+984 970
+internal_count del_count
+983 968
+internal_count del_count
+982 966
+internal_count del_count
+981 964
+internal_count del_count
+980 962
+internal_count del_count
+979 960
+internal_count del_count
+978 958
+internal_count del_count
+977 956
+internal_count del_count
+976 954
+internal_count del_count
+975 952
+internal_count del_count
+974 950
+internal_count del_count
+973 948
+internal_count del_count
+972 946
+internal_count del_count
+971 944
+internal_count del_count
+970 942
+internal_count del_count
+969 940
+internal_count del_count
+968 938
+internal_count del_count
+967 936
+internal_count del_count
+966 934
+internal_count del_count
+965 932
+internal_count del_count
+964 930
+internal_count del_count
+963 928
+internal_count del_count
+962 926
+internal_count del_count
+961 924
+internal_count del_count
+960 922
+internal_count del_count
+959 920
+internal_count del_count
+958 918
+internal_count del_count
+957 916
+internal_count del_count
+956 914
+internal_count del_count
+955 912
+internal_count del_count
+954 910
+internal_count del_count
+953 908
+internal_count del_count
+952 906
+internal_count del_count
+951 904
+internal_count del_count
+950 902
+internal_count del_count
+949 900
+internal_count del_count
+948 898
+internal_count del_count
+947 896
+internal_count del_count
+946 894
+internal_count del_count
+945 892
+internal_count del_count
+944 890
+internal_count del_count
+943 888
+internal_count del_count
+942 886
+internal_count del_count
+941 884
+internal_count del_count
+940 882
+internal_count del_count
+939 880
+internal_count del_count
+938 878
+internal_count del_count
+937 876
+internal_count del_count
+936 874
+internal_count del_count
+935 872
+internal_count del_count
+934 870
+internal_count del_count
+933 868
+internal_count del_count
+932 866
+internal_count del_count
+931 864
+internal_count del_count
+930 862
+internal_count del_count
+929 860
+internal_count del_count
+928 858
+internal_count del_count
+927 856
+internal_count del_count
+926 854
+internal_count del_count
+925 852
+internal_count del_count
+924 850
+internal_count del_count
+923 848
+internal_count del_count
+922 846
+internal_count del_count
+921 844
+internal_count del_count
+920 842
+internal_count del_count
+919 840
+internal_count del_count
+918 838
+internal_count del_count
+917 836
+internal_count del_count
+916 834
+internal_count del_count
+915 832
+internal_count del_count
+914 830
+internal_count del_count
+913 828
+internal_count del_count
+912 826
+internal_count del_count
+911 824
+internal_count del_count
+910 822
+internal_count del_count
+909 820
+internal_count del_count
+908 818
+internal_count del_count
+907 816
+internal_count del_count
+906 814
+internal_count del_count
+905 812
+internal_count del_count
+904 810
+internal_count del_count
+903 808
+internal_count del_count
+902 806
+internal_count del_count
+901 804
+internal_count del_count
+900 802
+internal_count del_count
+899 800
+internal_count del_count
+898 798
+internal_count del_count
+897 796
+internal_count del_count
+896 794
+internal_count del_count
+895 792
+internal_count del_count
+894 790
+internal_count del_count
+893 788
+internal_count del_count
+892 786
+internal_count del_count
+891 784
+internal_count del_count
+890 782
+internal_count del_count
+889 780
+internal_count del_count
+888 778
+internal_count del_count
+887 776
+internal_count del_count
+886 774
+internal_count del_count
+885 772
+internal_count del_count
+884 770
+internal_count del_count
+883 768
+internal_count del_count
+882 766
+internal_count del_count
+881 764
+internal_count del_count
+880 762
+internal_count del_count
+879 760
+internal_count del_count
+878 758
+internal_count del_count
+877 756
+internal_count del_count
+876 754
+internal_count del_count
+875 752
+internal_count del_count
+874 750
+internal_count del_count
+873 748
+internal_count del_count
+872 746
+internal_count del_count
+871 744
+internal_count del_count
+870 742
+internal_count del_count
+869 740
+internal_count del_count
+868 738
+internal_count del_count
+867 736
+internal_count del_count
+866 734
+internal_count del_count
+865 732
+internal_count del_count
+864 730
+internal_count del_count
+863 728
+internal_count del_count
+862 726
+internal_count del_count
+861 724
+internal_count del_count
+860 722
+internal_count del_count
+859 720
+internal_count del_count
+858 718
+internal_count del_count
+857 716
+internal_count del_count
+856 714
+internal_count del_count
+855 712
+internal_count del_count
+854 710
+internal_count del_count
+853 708
+internal_count del_count
+852 706
+internal_count del_count
+851 704
+internal_count del_count
+850 702
+internal_count del_count
+849 700
+internal_count del_count
+848 698
+internal_count del_count
+847 696
+internal_count del_count
+846 694
+internal_count del_count
+845 692
+internal_count del_count
+844 690
+internal_count del_count
+843 688
+internal_count del_count
+842 686
+internal_count del_count
+841 684
+internal_count del_count
+840 682
+internal_count del_count
+839 680
+internal_count del_count
+838 678
+internal_count del_count
+837 676
+internal_count del_count
+836 674
+internal_count del_count
+835 672
+internal_count del_count
+834 670
+internal_count del_count
+833 668
+internal_count del_count
+832 666
+internal_count del_count
+831 664
+internal_count del_count
+830 662
+internal_count del_count
+829 660
+internal_count del_count
+828 658
+internal_count del_count
+827 656
+internal_count del_count
+826 654
+internal_count del_count
+825 652
+internal_count del_count
+824 650
+internal_count del_count
+823 648
+internal_count del_count
+822 646
+internal_count del_count
+821 644
+internal_count del_count
+820 642
+internal_count del_count
+819 640
+internal_count del_count
+818 638
+internal_count del_count
+817 636
+internal_count del_count
+816 634
+internal_count del_count
+815 632
+internal_count del_count
+814 630
+internal_count del_count
+813 628
+internal_count del_count
+812 626
+internal_count del_count
+811 624
+internal_count del_count
+810 622
+internal_count del_count
+809 620
+internal_count del_count
+808 618
+internal_count del_count
+807 616
+internal_count del_count
+806 614
+internal_count del_count
+805 612
+internal_count del_count
+804 610
+internal_count del_count
+803 608
+internal_count del_count
+802 606
+internal_count del_count
+801 604
+internal_count del_count
+800 602
+internal_count del_count
+799 600
+internal_count del_count
+798 598
+internal_count del_count
+797 596
+internal_count del_count
+796 594
+internal_count del_count
+795 592
+internal_count del_count
+794 590
+internal_count del_count
+793 588
+internal_count del_count
+792 586
+internal_count del_count
+791 584
+internal_count del_count
+790 582
+internal_count del_count
+789 580
+internal_count del_count
+788 578
+internal_count del_count
+787 576
+internal_count del_count
+786 574
+internal_count del_count
+785 572
+internal_count del_count
+784 570
+internal_count del_count
+783 568
+internal_count del_count
+782 566
+internal_count del_count
+781 564
+internal_count del_count
+780 562
+internal_count del_count
+779 560
+internal_count del_count
+778 558
+internal_count del_count
+777 556
+internal_count del_count
+776 554
+internal_count del_count
+775 552
+internal_count del_count
+774 550
+internal_count del_count
+773 548
+internal_count del_count
+772 546
+internal_count del_count
+771 544
+internal_count del_count
+770 542
+internal_count del_count
+769 540
+internal_count del_count
+768 538
+internal_count del_count
+767 536
+internal_count del_count
+766 534
+internal_count del_count
+765 532
+internal_count del_count
+764 530
+internal_count del_count
+763 528
+internal_count del_count
+762 526
+internal_count del_count
+761 524
+internal_count del_count
+760 522
+internal_count del_count
+759 520
+internal_count del_count
+758 518
+internal_count del_count
+757 516
+internal_count del_count
+756 514
+internal_count del_count
+755 512
+internal_count del_count
+754 510
+internal_count del_count
+753 508
+internal_count del_count
+752 506
+internal_count del_count
+751 504
+internal_count del_count
+750 502
+internal_count del_count
+749 500
+internal_count del_count
+748 498
+internal_count del_count
+747 496
+internal_count del_count
+746 494
+internal_count del_count
+745 492
+internal_count del_count
+744 490
+internal_count del_count
+743 488
+internal_count del_count
+742 486
+internal_count del_count
+741 484
+internal_count del_count
+740 482
+internal_count del_count
+739 480
+internal_count del_count
+738 478
+internal_count del_count
+737 476
+internal_count del_count
+736 474
+internal_count del_count
+735 472
+internal_count del_count
+734 470
+internal_count del_count
+733 468
+internal_count del_count
+732 466
+internal_count del_count
+731 464
+internal_count del_count
+730 462
+internal_count del_count
+729 460
+internal_count del_count
+728 458
+internal_count del_count
+727 456
+internal_count del_count
+726 454
+internal_count del_count
+725 452
+internal_count del_count
+724 450
+internal_count del_count
+723 448
+internal_count del_count
+722 446
+internal_count del_count
+721 444
+internal_count del_count
+720 442
+internal_count del_count
+719 440
+internal_count del_count
+718 438
+internal_count del_count
+717 436
+internal_count del_count
+716 434
+internal_count del_count
+715 432
+internal_count del_count
+714 430
+internal_count del_count
+713 428
+internal_count del_count
+712 426
+internal_count del_count
+711 424
+internal_count del_count
+710 422
+internal_count del_count
+709 420
+internal_count del_count
+708 418
+internal_count del_count
+707 416
+internal_count del_count
+706 414
+internal_count del_count
+705 412
+internal_count del_count
+704 410
+internal_count del_count
+703 408
+internal_count del_count
+702 406
+internal_count del_count
+701 404
+internal_count del_count
+700 402
+internal_count del_count
+699 400
+internal_count del_count
+698 398
+internal_count del_count
+697 396
+internal_count del_count
+696 394
+internal_count del_count
+695 392
+internal_count del_count
+694 390
+internal_count del_count
+693 388
+internal_count del_count
+692 386
+internal_count del_count
+691 384
+internal_count del_count
+690 382
+internal_count del_count
+689 380
+internal_count del_count
+688 378
+internal_count del_count
+687 376
+internal_count del_count
+686 374
+internal_count del_count
+685 372
+internal_count del_count
+684 370
+internal_count del_count
+683 368
+internal_count del_count
+682 366
+internal_count del_count
+681 364
+internal_count del_count
+680 362
+internal_count del_count
+679 360
+internal_count del_count
+678 358
+internal_count del_count
+677 356
+internal_count del_count
+676 354
+internal_count del_count
+675 352
+internal_count del_count
+674 350
+internal_count del_count
+673 348
+internal_count del_count
+672 346
+internal_count del_count
+671 344
+internal_count del_count
+670 342
+internal_count del_count
+669 340
+internal_count del_count
+668 338
+internal_count del_count
+667 336
+internal_count del_count
+666 334
+internal_count del_count
+665 332
+internal_count del_count
+664 330
+internal_count del_count
+663 328
+internal_count del_count
+662 326
+internal_count del_count
+661 324
+internal_count del_count
+660 322
+internal_count del_count
+659 320
+internal_count del_count
+658 318
+internal_count del_count
+657 316
+internal_count del_count
+656 314
+internal_count del_count
+655 312
+internal_count del_count
+654 310
+internal_count del_count
+653 308
+internal_count del_count
+652 306
+internal_count del_count
+651 304
+internal_count del_count
+650 302
+internal_count del_count
+649 300
+internal_count del_count
+648 298
+internal_count del_count
+647 296
+internal_count del_count
+646 294
+internal_count del_count
+645 292
+internal_count del_count
+644 290
+internal_count del_count
+643 288
+internal_count del_count
+642 286
+internal_count del_count
+641 284
+internal_count del_count
+640 282
+internal_count del_count
+639 280
+internal_count del_count
+638 278
+internal_count del_count
+637 276
+internal_count del_count
+636 274
+internal_count del_count
+635 272
+internal_count del_count
+634 270
+internal_count del_count
+633 268
+internal_count del_count
+632 266
+internal_count del_count
+631 264
+internal_count del_count
+630 262
+internal_count del_count
+629 260
+internal_count del_count
+628 258
+internal_count del_count
+627 256
+internal_count del_count
+626 254
+internal_count del_count
+625 252
+internal_count del_count
+624 250
+internal_count del_count
+623 248
+internal_count del_count
+622 246
+internal_count del_count
+621 244
+internal_count del_count
+620 242
+internal_count del_count
+619 240
+internal_count del_count
+618 238
+internal_count del_count
+617 236
+internal_count del_count
+616 234
+internal_count del_count
+615 232
+internal_count del_count
+614 230
+internal_count del_count
+613 228
+internal_count del_count
+612 226
+internal_count del_count
+611 224
+internal_count del_count
+610 222
+internal_count del_count
+609 220
+internal_count del_count
+608 218
+internal_count del_count
+607 216
+internal_count del_count
+606 214
+internal_count del_count
+605 212
+internal_count del_count
+604 210
+internal_count del_count
+603 208
+internal_count del_count
+602 206
+internal_count del_count
+601 204
+internal_count del_count
+600 202
+internal_count del_count
+599 200
+internal_count del_count
+598 198
+internal_count del_count
+597 196
+internal_count del_count
+596 194
+internal_count del_count
+595 192
+internal_count del_count
+594 190
+internal_count del_count
+593 188
+internal_count del_count
+592 186
+internal_count del_count
+591 184
+internal_count del_count
+590 182
+internal_count del_count
+589 180
+internal_count del_count
+588 178
+internal_count del_count
+587 176
+internal_count del_count
+586 174
+internal_count del_count
+585 172
+internal_count del_count
+584 170
+internal_count del_count
+583 168
+internal_count del_count
+582 166
+internal_count del_count
+581 164
+internal_count del_count
+580 162
+internal_count del_count
+579 160
+internal_count del_count
+578 158
+internal_count del_count
+577 156
+internal_count del_count
+576 154
+internal_count del_count
+575 152
+internal_count del_count
+574 150
+internal_count del_count
+573 148
+internal_count del_count
+572 146
+internal_count del_count
+571 144
+internal_count del_count
+570 142
+internal_count del_count
+569 140
+internal_count del_count
+568 138
+internal_count del_count
+567 136
+internal_count del_count
+566 134
+internal_count del_count
+565 132
+internal_count del_count
+564 130
+internal_count del_count
+563 128
+internal_count del_count
+562 126
+internal_count del_count
+561 124
+internal_count del_count
+560 122
+internal_count del_count
+559 120
+internal_count del_count
+558 118
+internal_count del_count
+557 116
+internal_count del_count
+556 114
+internal_count del_count
+555 112
+internal_count del_count
+554 110
+internal_count del_count
+553 108
+internal_count del_count
+552 106
+internal_count del_count
+551 104
+internal_count del_count
+550 102
+internal_count del_count
+549 100
+internal_count del_count
+548 98
+internal_count del_count
+547 96
+internal_count del_count
+546 94
+internal_count del_count
+545 92
+internal_count del_count
+544 90
+internal_count del_count
+543 88
+internal_count del_count
+542 86
+internal_count del_count
+541 84
+internal_count del_count
+540 82
+internal_count del_count
+539 80
+internal_count del_count
+538 78
+internal_count del_count
+537 76
+internal_count del_count
+536 74
+internal_count del_count
+535 72
+internal_count del_count
+534 70
+internal_count del_count
+533 68
+internal_count del_count
+532 66
+internal_count del_count
+531 64
+internal_count del_count
+530 62
+internal_count del_count
+529 60
+internal_count del_count
+528 58
+internal_count del_count
+527 56
+internal_count del_count
+526 54
+internal_count del_count
+525 52
+internal_count del_count
+524 50
+internal_count del_count
+523 48
+internal_count del_count
+522 46
+internal_count del_count
+521 44
+internal_count del_count
+520 42
+internal_count del_count
+519 40
+internal_count del_count
+518 38
+internal_count del_count
+517 36
+internal_count del_count
+516 34
+internal_count del_count
+515 32
+internal_count del_count
+514 30
+internal_count del_count
+513 28
+internal_count del_count
+512 26
+internal_count del_count
+511 24
+internal_count del_count
+510 22
+internal_count del_count
+509 20
+internal_count del_count
+508 18
+internal_count del_count
+507 16
+internal_count del_count
+506 14
+internal_count del_count
+505 12
+internal_count del_count
+504 10
+internal_count del_count
+503 8
+internal_count del_count
+502 6
+internal_count del_count
+501 4
+internal_count del_count
+500 2
+select count(*) as Part from test.part_tbl;
+Part
+500
+DROP PROCEDURE test.proc_part;
+DROP TABLE test.part_tbl;
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_bug42419.result b/mysql-test/suite/innodb_plugin/r/innodb_bug42419.result
new file mode 100644
index 00000000000..f304bb634cb
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug42419.result
@@ -0,0 +1,17 @@
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b INT) ENGINE = InnoDB;
+INSERT INTO t1 VALUES (1,1),(2,2),(3,3);
+COMMIT;
+SET AUTOCOMMIT = 0;
+CREATE TEMPORARY TABLE t1_tmp ( b INT );
+INSERT INTO t1_tmp (b) SELECT b FROM t1 WHERE a = 3;
+INSERT INTO t1_tmp (b) SELECT b FROM t1 WHERE a = 2;
+SET AUTOCOMMIT = 0;
+CREATE TEMPORARY TABLE t2_tmp ( a int, new_a int );
+INSERT INTO t2_tmp VALUES (1,51),(2,52),(3,53);
+UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 1;
+UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 2;
+INSERT INTO t1_tmp (b) SELECT b FROM t1 WHERE a = 1;
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+Reap the server message for connection user2 UPDATE t1 ...
+UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 3;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_bug48024.result b/mysql-test/suite/innodb_plugin/r/innodb_bug48024.result
new file mode 100644
index 00000000000..611923d2796
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug48024.result
@@ -0,0 +1,10 @@
+CREATE TABLE bug48024(a int PRIMARY KEY,b int NOT NULL,KEY(b)) ENGINE=InnoDB;
+CREATE TABLE bug48024_b(b int PRIMARY KEY) ENGINE=InnoDB;
+ALTER TABLE bug48024 /*/ADD CONSTRAINT FOREIGN KEY(c) REFERENCES(a),/*/
+ADD CONSTRAINT FOREIGN KEY(b) REFERENCES bug48024_b(b);
+DROP TABLE bug48024,bug48024_b;
+CREATE TABLE bug48024(a int PRIMARY KEY,b int NOT NULL,KEY(b)) ENGINE=InnoDB;
+CREATE TABLE bug48024_b(b int PRIMARY KEY) ENGINE=InnoDB;
+ALTER TABLE bug48024 /*/ADD CONSTRAINT FOREIGN KEY(c) REFERENCES(a),/*/
+ADD CONSTRAINT FOREIGN KEY(b) REFERENCES bug48024_b(b)|
+DROP TABLE bug48024,bug48024_b;
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_bug49164.result b/mysql-test/suite/innodb_plugin/r/innodb_bug49164.result
new file mode 100644
index 00000000000..9456702e1d0
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug49164.result
@@ -0,0 +1,42 @@
+SET tx_isolation = 'READ-COMMITTED';
+CREATE TABLE bug49164 (a INT, b BIGINT, c TINYINT, PRIMARY KEY (a, b))
+ENGINE=InnoDB;
+insert into bug49164 values (1,1,1), (2,2,2), (3,3,3);
+begin;
+update bug49164 set c=7;
+select * from bug49164;
+a b c
+1 1 7
+2 2 7
+3 3 7
+rollback;
+select * from bug49164;
+a b c
+1 1 1
+2 2 2
+3 3 3
+begin;
+update bug49164 set c=7;
+SET tx_isolation = 'READ-COMMITTED';
+begin;
+select * from bug49164;
+a b c
+1 1 1
+2 2 2
+3 3 3
+commit;
+begin;
+update bug49164 set c=6 where a=1 and b=1;
+rollback;
+select * from bug49164;
+a b c
+1 1 1
+2 2 2
+3 3 3
+commit;
+select * from bug49164;
+a b c
+1 1 6
+2 2 2
+3 3 3
+drop table bug49164;
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_bug53290.result b/mysql-test/suite/innodb_plugin/r/innodb_bug53290.result
new file mode 100644
index 00000000000..46cd7248c4e
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug53290.result
@@ -0,0 +1,17 @@
+create table bug53290 (x bigint) engine=innodb;
+insert into bug53290 () values (),(),(),(),(),(),(),(),(),(),(),();
+insert into bug53290 select * from bug53290;
+insert into bug53290 select * from bug53290;
+insert into bug53290 select * from bug53290;
+insert into bug53290 select * from bug53290;
+insert into bug53290 select * from bug53290;
+insert into bug53290 select * from bug53290;
+insert into bug53290 select * from bug53290;
+insert into bug53290 select * from bug53290;
+insert into bug53290 select * from bug53290;
+insert into bug53290 select * from bug53290;
+insert into bug53290 select * from bug53290;
+insert into bug53290 select * from bug53290;
+insert into bug53290 select * from bug53290;
+alter table bug53290 add unique index `idx` (x);
+drop table bug53290;
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_bug53591.result b/mysql-test/suite/innodb_plugin/r/innodb_bug53591.result
new file mode 100644
index 00000000000..1f05b6d2a57
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug53591.result
@@ -0,0 +1,16 @@
+SET GLOBAL innodb_file_format='Barracuda';
+SET GLOBAL innodb_file_per_table=on;
+set old_alter_table=0;
+CREATE TABLE bug53591(a text charset utf8 not null)
+ENGINE=InnoDB KEY_BLOCK_SIZE=1;
+ALTER TABLE bug53591 ADD PRIMARY KEY(a(220));
+ERROR HY000: Too big row
+SHOW WARNINGS;
+Level Code Message
+Error 139 Too big row
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs
+Error 1030 Got error 139 from storage engine
+DROP TABLE bug53591;
+SET GLOBAL innodb_file_format=Antelope;
+SET GLOBAL innodb_file_format_check=Antelope;
+SET GLOBAL innodb_file_per_table=0;
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_bug53592.result b/mysql-test/suite/innodb_plugin/r/innodb_bug53592.result
new file mode 100644
index 00000000000..18906568613
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug53592.result
@@ -0,0 +1,26 @@
+set old_alter_table=0;
+create table bug53592(a int) engine=innodb row_format=compact;
+alter table bug53592 add column b text charset utf8;
+alter table bug53592 add column c blob not null;
+create index bug53592_b on bug53592(b(81));
+create unique index bug53592_c on bug53592(c(1));
+replace into bug53592 values (),();
+Warnings:
+Warning 1364 Field 'c' doesn't have a default value
+check table bug53592;
+Table Op Msg_type Msg_text
+test.bug53592 check status OK
+drop table bug53592;
+set old_alter_table=1;
+create table bug53592(a int) engine=innodb row_format=compact;
+alter table bug53592 add column b text charset utf8;
+alter table bug53592 add column c blob not null;
+create index bug53592_b on bug53592(b(81));
+create unique index bug53592_c on bug53592(c(1));
+replace into bug53592 values (),();
+Warnings:
+Warning 1364 Field 'c' doesn't have a default value
+check table bug53592;
+Table Op Msg_type Msg_text
+test.bug53592 check status OK
+drop table bug53592;
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_bug53674.result b/mysql-test/suite/innodb_plugin/r/innodb_bug53674.result
new file mode 100644
index 00000000000..c4021c2e7cd
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug53674.result
@@ -0,0 +1,11 @@
+create table bug53674(a int)engine=innodb;
+insert into bug53674 values (1),(2);
+start transaction;
+select * from bug53674 for update;
+a
+1
+2
+select * from bug53674 where a=(select a from bug53674 where a > 1);
+a
+2
+drop table bug53674;
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_bug54044.result b/mysql-test/suite/innodb_plugin/r/innodb_bug54044.result
new file mode 100644
index 00000000000..90ab812f2ae
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug54044.result
@@ -0,0 +1,3 @@
+CREATE TEMPORARY TABLE table_54044 ENGINE = INNODB
+AS SELECT IF(NULL IS NOT NULL, NULL, NULL);
+ERROR HY000: Can't create table 'test.table_54044' (errno: -1)
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_bug54679.result b/mysql-test/suite/innodb_plugin/r/innodb_bug54679.result
new file mode 100644
index 00000000000..14fd32ca469
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug54679.result
@@ -0,0 +1,91 @@
+SET GLOBAL innodb_file_format='Barracuda';
+SET GLOBAL innodb_file_per_table=ON;
+SET innodb_strict_mode=ON;
+CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
+WHERE TABLE_NAME='bug54679';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+bug54679 Compressed row_format=COMPRESSED
+ALTER TABLE bug54679 ADD COLUMN b INT;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
+WHERE TABLE_NAME='bug54679';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+bug54679 Compressed row_format=COMPRESSED
+DROP TABLE bug54679;
+CREATE TABLE bug54679 (a INT) ENGINE=InnoDB;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
+WHERE TABLE_NAME='bug54679';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+bug54679 Compact
+ALTER TABLE bug54679 KEY_BLOCK_SIZE=1;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
+WHERE TABLE_NAME='bug54679';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+bug54679 Compressed KEY_BLOCK_SIZE=1
+ALTER TABLE bug54679 ROW_FORMAT=REDUNDANT;
+ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
+Error 1005 Can't create table '#sql-temporary' (errno: 1478)
+DROP TABLE bug54679;
+CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
+WHERE TABLE_NAME='bug54679';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+bug54679 Redundant row_format=REDUNDANT
+ALTER TABLE bug54679 KEY_BLOCK_SIZE=2;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
+WHERE TABLE_NAME='bug54679';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+bug54679 Compressed row_format=REDUNDANT KEY_BLOCK_SIZE=2
+SET GLOBAL innodb_file_format=Antelope;
+ALTER TABLE bug54679 KEY_BLOCK_SIZE=4;
+ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Error 1005 Can't create table '#sql-temporary' (errno: 1478)
+ALTER TABLE bug54679 ROW_FORMAT=DYNAMIC;
+ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
+Error 1005 Can't create table '#sql-temporary' (errno: 1478)
+DROP TABLE bug54679;
+CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ERROR HY000: Can't create table 'test.bug54679' (errno: 1478)
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
+Error 1005 Can't create table 'test.bug54679' (errno: 1478)
+CREATE TABLE bug54679 (a INT) ENGINE=InnoDB;
+SET GLOBAL innodb_file_format=Barracuda;
+SET GLOBAL innodb_file_per_table=OFF;
+ALTER TABLE bug54679 KEY_BLOCK_SIZE=4;
+ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Error 1005 Can't create table '#sql-temporary' (errno: 1478)
+ALTER TABLE bug54679 ROW_FORMAT=DYNAMIC;
+ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
+Error 1005 Can't create table '#sql-temporary' (errno: 1478)
+DROP TABLE bug54679;
+CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+ERROR HY000: Can't create table 'test.bug54679' (errno: 1478)
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
+Error 1005 Can't create table 'test.bug54679' (errno: 1478)
+SET GLOBAL innodb_file_per_table=ON;
+CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+DROP TABLE bug54679;
+SET GLOBAL innodb_file_format=Antelope;
+SET GLOBAL innodb_file_format_check=Antelope;
+SET GLOBAL innodb_file_per_table=0;
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_gis.result b/mysql-test/suite/innodb_plugin/r/innodb_gis.result
new file mode 100644
index 00000000000..c6c775afc9f
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb_gis.result
@@ -0,0 +1,589 @@
+SET storage_engine=innodb;
+DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;
+CREATE TABLE gis_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POINT);
+CREATE TABLE gis_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g LINESTRING);
+CREATE TABLE gis_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g POLYGON);
+CREATE TABLE gis_multi_point (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOINT);
+CREATE TABLE gis_multi_line (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTILINESTRING);
+CREATE TABLE gis_multi_polygon (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g MULTIPOLYGON);
+CREATE TABLE gis_geometrycollection (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRYCOLLECTION);
+CREATE TABLE gis_geometry (fid INTEGER PRIMARY KEY AUTO_INCREMENT, g GEOMETRY);
+SHOW CREATE TABLE gis_point;
+Table Create Table
+gis_point CREATE TABLE `gis_point` (
+ `fid` int(11) NOT NULL AUTO_INCREMENT,
+ `g` point DEFAULT NULL,
+ PRIMARY KEY (`fid`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SHOW FIELDS FROM gis_point;
+Field Type Null Key Default Extra
+fid int(11) NO PRI NULL auto_increment
+g point YES NULL
+SHOW FIELDS FROM gis_line;
+Field Type Null Key Default Extra
+fid int(11) NO PRI NULL auto_increment
+g linestring YES NULL
+SHOW FIELDS FROM gis_polygon;
+Field Type Null Key Default Extra
+fid int(11) NO PRI NULL auto_increment
+g polygon YES NULL
+SHOW FIELDS FROM gis_multi_point;
+Field Type Null Key Default Extra
+fid int(11) NO PRI NULL auto_increment
+g multipoint YES NULL
+SHOW FIELDS FROM gis_multi_line;
+Field Type Null Key Default Extra
+fid int(11) NO PRI NULL auto_increment
+g multilinestring YES NULL
+SHOW FIELDS FROM gis_multi_polygon;
+Field Type Null Key Default Extra
+fid int(11) NO PRI NULL auto_increment
+g multipolygon YES NULL
+SHOW FIELDS FROM gis_geometrycollection;
+Field Type Null Key Default Extra
+fid int(11) NO PRI NULL auto_increment
+g geometrycollection YES NULL
+SHOW FIELDS FROM gis_geometry;
+Field Type Null Key Default Extra
+fid int(11) NO PRI NULL auto_increment
+g geometry YES NULL
+INSERT INTO gis_point VALUES
+(101, PointFromText('POINT(10 10)')),
+(102, PointFromText('POINT(20 10)')),
+(103, PointFromText('POINT(20 20)')),
+(104, PointFromWKB(AsWKB(PointFromText('POINT(10 20)'))));
+INSERT INTO gis_line VALUES
+(105, LineFromText('LINESTRING(0 0,0 10,10 0)')),
+(106, LineStringFromText('LINESTRING(10 10,20 10,20 20,10 20,10 10)')),
+(107, LineStringFromWKB(LineString(Point(10, 10), Point(40, 10))));
+INSERT INTO gis_polygon VALUES
+(108, PolygonFromText('POLYGON((10 10,20 10,20 20,10 20,10 10))')),
+(109, PolyFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))')),
+(110, PolyFromWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(0, 0)))));
+INSERT INTO gis_multi_point VALUES
+(111, MultiPointFromText('MULTIPOINT(0 0,10 10,10 20,20 20)')),
+(112, MPointFromText('MULTIPOINT(1 1,11 11,11 21,21 21)')),
+(113, MPointFromWKB(MultiPoint(Point(3, 6), Point(4, 10))));
+INSERT INTO gis_multi_line VALUES
+(114, MultiLineStringFromText('MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))')),
+(115, MLineFromText('MULTILINESTRING((10 48,10 21,10 0))')),
+(116, MLineFromWKB(MultiLineString(LineString(Point(1, 2), Point(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21, 7)))));
+INSERT INTO gis_multi_polygon VALUES
+(117, MultiPolygonFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')),
+(118, MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')),
+(119, MPolyFromWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3))))));
+INSERT INTO gis_geometrycollection VALUES
+(120, GeomCollFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))')),
+(121, GeometryFromWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9)))));
+INSERT into gis_geometry SELECT * FROM gis_point;
+INSERT into gis_geometry SELECT * FROM gis_line;
+INSERT into gis_geometry SELECT * FROM gis_polygon;
+INSERT into gis_geometry SELECT * FROM gis_multi_point;
+INSERT into gis_geometry SELECT * FROM gis_multi_line;
+INSERT into gis_geometry SELECT * FROM gis_multi_polygon;
+INSERT into gis_geometry SELECT * FROM gis_geometrycollection;
+SELECT fid, AsText(g) FROM gis_point ORDER by fid;
+fid AsText(g)
+101 POINT(10 10)
+102 POINT(20 10)
+103 POINT(20 20)
+104 POINT(10 20)
+SELECT fid, AsText(g) FROM gis_line ORDER by fid;
+fid AsText(g)
+105 LINESTRING(0 0,0 10,10 0)
+106 LINESTRING(10 10,20 10,20 20,10 20,10 10)
+107 LINESTRING(10 10,40 10)
+SELECT fid, AsText(g) FROM gis_polygon ORDER by fid;
+fid AsText(g)
+108 POLYGON((10 10,20 10,20 20,10 20,10 10))
+109 POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10))
+110 POLYGON((0 0,30 0,30 30,0 0))
+SELECT fid, AsText(g) FROM gis_multi_point ORDER by fid;
+fid AsText(g)
+111 MULTIPOINT(0 0,10 10,10 20,20 20)
+112 MULTIPOINT(1 1,11 11,11 21,21 21)
+113 MULTIPOINT(3 6,4 10)
+SELECT fid, AsText(g) FROM gis_multi_line ORDER by fid;
+fid AsText(g)
+114 MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))
+115 MULTILINESTRING((10 48,10 21,10 0))
+116 MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7))
+SELECT fid, AsText(g) FROM gis_multi_polygon ORDER by fid;
+fid AsText(g)
+117 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))
+118 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))
+119 MULTIPOLYGON(((0 3,3 3,3 0,0 3)))
+SELECT fid, AsText(g) FROM gis_geometrycollection ORDER by fid;
+fid AsText(g)
+120 GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10))
+121 GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9))
+SELECT fid, AsText(g) FROM gis_geometry ORDER by fid;
+fid AsText(g)
+101 POINT(10 10)
+102 POINT(20 10)
+103 POINT(20 20)
+104 POINT(10 20)
+105 LINESTRING(0 0,0 10,10 0)
+106 LINESTRING(10 10,20 10,20 20,10 20,10 10)
+107 LINESTRING(10 10,40 10)
+108 POLYGON((10 10,20 10,20 20,10 20,10 10))
+109 POLYGON((0 0,50 0,50 50,0 50,0 0),(10 10,20 10,20 20,10 20,10 10))
+110 POLYGON((0 0,30 0,30 30,0 0))
+111 MULTIPOINT(0 0,10 10,10 20,20 20)
+112 MULTIPOINT(1 1,11 11,11 21,21 21)
+113 MULTIPOINT(3 6,4 10)
+114 MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))
+115 MULTILINESTRING((10 48,10 21,10 0))
+116 MULTILINESTRING((1 2,3 5),(2 5,5 8,21 7))
+117 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))
+118 MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))
+119 MULTIPOLYGON(((0 3,3 3,3 0,0 3)))
+120 GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(0 0,10 10))
+121 GEOMETRYCOLLECTION(POINT(44 6),LINESTRING(3 6,7 9))
+SELECT fid, Dimension(g) FROM gis_geometry ORDER by fid;
+fid Dimension(g)
+101 0
+102 0
+103 0
+104 0
+105 1
+106 1
+107 1
+108 2
+109 2
+110 2
+111 0
+112 0
+113 0
+114 1
+115 1
+116 1
+117 2
+118 2
+119 2
+120 1
+121 1
+SELECT fid, GeometryType(g) FROM gis_geometry ORDER by fid;
+fid GeometryType(g)
+101 POINT
+102 POINT
+103 POINT
+104 POINT
+105 LINESTRING
+106 LINESTRING
+107 LINESTRING
+108 POLYGON
+109 POLYGON
+110 POLYGON
+111 MULTIPOINT
+112 MULTIPOINT
+113 MULTIPOINT
+114 MULTILINESTRING
+115 MULTILINESTRING
+116 MULTILINESTRING
+117 MULTIPOLYGON
+118 MULTIPOLYGON
+119 MULTIPOLYGON
+120 GEOMETRYCOLLECTION
+121 GEOMETRYCOLLECTION
+SELECT fid, IsEmpty(g) FROM gis_geometry ORDER by fid;
+fid IsEmpty(g)
+101 0
+102 0
+103 0
+104 0
+105 0
+106 0
+107 0
+108 0
+109 0
+110 0
+111 0
+112 0
+113 0
+114 0
+115 0
+116 0
+117 0
+118 0
+119 0
+120 0
+121 0
+SELECT fid, AsText(Envelope(g)) FROM gis_geometry ORDER by fid;
+fid AsText(Envelope(g))
+101 POLYGON((10 10,10 10,10 10,10 10,10 10))
+102 POLYGON((20 10,20 10,20 10,20 10,20 10))
+103 POLYGON((20 20,20 20,20 20,20 20,20 20))
+104 POLYGON((10 20,10 20,10 20,10 20,10 20))
+105 POLYGON((0 0,10 0,10 10,0 10,0 0))
+106 POLYGON((10 10,20 10,20 20,10 20,10 10))
+107 POLYGON((10 10,40 10,40 10,10 10,10 10))
+108 POLYGON((10 10,20 10,20 20,10 20,10 10))
+109 POLYGON((0 0,50 0,50 50,0 50,0 0))
+110 POLYGON((0 0,30 0,30 30,0 30,0 0))
+111 POLYGON((0 0,20 0,20 20,0 20,0 0))
+112 POLYGON((1 1,21 1,21 21,1 21,1 1))
+113 POLYGON((3 6,4 6,4 10,3 10,3 6))
+114 POLYGON((10 0,16 0,16 48,10 48,10 0))
+115 POLYGON((10 0,10 0,10 48,10 48,10 0))
+116 POLYGON((1 2,21 2,21 8,1 8,1 2))
+117 POLYGON((28 0,84 0,84 42,28 42,28 0))
+118 POLYGON((28 0,84 0,84 42,28 42,28 0))
+119 POLYGON((0 0,3 0,3 3,0 3,0 0))
+120 POLYGON((0 0,10 0,10 10,0 10,0 0))
+121 POLYGON((3 6,44 6,44 9,3 9,3 6))
+explain extended select Dimension(g), GeometryType(g), IsEmpty(g), AsText(Envelope(g)) from gis_geometry;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE gis_geometry ALL NULL NULL NULL NULL 21 100.00
+Warnings:
+Note 1003 select dimension(`test`.`gis_geometry`.`g`) AS `Dimension(g)`,geometrytype(`test`.`gis_geometry`.`g`) AS `GeometryType(g)`,isempty(`test`.`gis_geometry`.`g`) AS `IsEmpty(g)`,astext(envelope(`test`.`gis_geometry`.`g`)) AS `AsText(Envelope(g))` from `test`.`gis_geometry`
+SELECT fid, X(g) FROM gis_point ORDER by fid;
+fid X(g)
+101 10
+102 20
+103 20
+104 10
+SELECT fid, Y(g) FROM gis_point ORDER by fid;
+fid Y(g)
+101 10
+102 10
+103 20
+104 20
+explain extended select X(g),Y(g) FROM gis_point;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE gis_point ALL NULL NULL NULL NULL 4 100.00
+Warnings:
+Note 1003 select x(`test`.`gis_point`.`g`) AS `X(g)`,y(`test`.`gis_point`.`g`) AS `Y(g)` from `test`.`gis_point`
+SELECT fid, AsText(StartPoint(g)) FROM gis_line ORDER by fid;
+fid AsText(StartPoint(g))
+105 POINT(0 0)
+106 POINT(10 10)
+107 POINT(10 10)
+SELECT fid, AsText(EndPoint(g)) FROM gis_line ORDER by fid;
+fid AsText(EndPoint(g))
+105 POINT(10 0)
+106 POINT(10 10)
+107 POINT(40 10)
+SELECT fid, GLength(g) FROM gis_line ORDER by fid;
+fid GLength(g)
+105 24.142135623731
+106 40
+107 30
+SELECT fid, NumPoints(g) FROM gis_line ORDER by fid;
+fid NumPoints(g)
+105 3
+106 5
+107 2
+SELECT fid, AsText(PointN(g, 2)) FROM gis_line ORDER by fid;
+fid AsText(PointN(g, 2))
+105 POINT(0 10)
+106 POINT(20 10)
+107 POINT(40 10)
+SELECT fid, IsClosed(g) FROM gis_line ORDER by fid;
+fid IsClosed(g)
+105 0
+106 1
+107 0
+explain extended select AsText(StartPoint(g)),AsText(EndPoint(g)),GLength(g),NumPoints(g),AsText(PointN(g, 2)),IsClosed(g) FROM gis_line;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE gis_line ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint(g))`,astext(endpoint(`test`.`gis_line`.`g`)) AS `AsText(EndPoint(g))`,glength(`test`.`gis_line`.`g`) AS `GLength(g)`,numpoints(`test`.`gis_line`.`g`) AS `NumPoints(g)`,astext(pointn(`test`.`gis_line`.`g`,2)) AS `AsText(PointN(g, 2))`,isclosed(`test`.`gis_line`.`g`) AS `IsClosed(g)` from `test`.`gis_line`
+SELECT fid, AsText(Centroid(g)) FROM gis_polygon ORDER by fid;
+fid AsText(Centroid(g))
+108 POINT(15 15)
+109 POINT(25.4166666666667 25.4166666666667)
+110 POINT(20 10)
+SELECT fid, Area(g) FROM gis_polygon ORDER by fid;
+fid Area(g)
+108 100
+109 2400
+110 450
+SELECT fid, AsText(ExteriorRing(g)) FROM gis_polygon ORDER by fid;
+fid AsText(ExteriorRing(g))
+108 LINESTRING(10 10,20 10,20 20,10 20,10 10)
+109 LINESTRING(0 0,50 0,50 50,0 50,0 0)
+110 LINESTRING(0 0,30 0,30 30,0 0)
+SELECT fid, NumInteriorRings(g) FROM gis_polygon ORDER by fid;
+fid NumInteriorRings(g)
+108 0
+109 1
+110 0
+SELECT fid, AsText(InteriorRingN(g, 1)) FROM gis_polygon ORDER by fid;
+fid AsText(InteriorRingN(g, 1))
+108 NULL
+109 LINESTRING(10 10,20 10,20 20,10 20,10 10)
+110 NULL
+explain extended select AsText(Centroid(g)),Area(g),AsText(ExteriorRing(g)),NumInteriorRings(g),AsText(InteriorRingN(g, 1)) FROM gis_polygon;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE gis_polygon ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select astext(centroid(`test`.`gis_polygon`.`g`)) AS `AsText(Centroid(g))`,area(`test`.`gis_polygon`.`g`) AS `Area(g)`,astext(exteriorring(`test`.`gis_polygon`.`g`)) AS `AsText(ExteriorRing(g))`,numinteriorrings(`test`.`gis_polygon`.`g`) AS `NumInteriorRings(g)`,astext(interiorringn(`test`.`gis_polygon`.`g`,1)) AS `AsText(InteriorRingN(g, 1))` from `test`.`gis_polygon`
+SELECT fid, IsClosed(g) FROM gis_multi_line ORDER by fid;
+fid IsClosed(g)
+114 0
+115 0
+116 0
+SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon ORDER by fid;
+fid AsText(Centroid(g))
+117 POINT(55.5885277530424 17.426536064114)
+118 POINT(55.5885277530424 17.426536064114)
+119 POINT(2 2)
+SELECT fid, Area(g) FROM gis_multi_polygon ORDER by fid;
+fid Area(g)
+117 1684.5
+118 1684.5
+119 4.5
+SELECT fid, NumGeometries(g) from gis_multi_point ORDER by fid;
+fid NumGeometries(g)
+111 4
+112 4
+113 2
+SELECT fid, NumGeometries(g) from gis_multi_line ORDER by fid;
+fid NumGeometries(g)
+114 2
+115 1
+116 2
+SELECT fid, NumGeometries(g) from gis_multi_polygon ORDER by fid;
+fid NumGeometries(g)
+117 2
+118 2
+119 1
+SELECT fid, NumGeometries(g) from gis_geometrycollection ORDER by fid;
+fid NumGeometries(g)
+120 2
+121 2
+explain extended SELECT fid, NumGeometries(g) from gis_multi_point;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,numgeometries(`test`.`gis_multi_point`.`g`) AS `NumGeometries(g)` from `test`.`gis_multi_point`
+SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point ORDER by fid;
+fid AsText(GeometryN(g, 2))
+111 POINT(10 10)
+112 POINT(11 11)
+113 POINT(4 10)
+SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_line ORDER by fid;
+fid AsText(GeometryN(g, 2))
+114 LINESTRING(16 0,16 23,16 48)
+115 NULL
+116 LINESTRING(2 5,5 8,21 7)
+SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_polygon ORDER by fid;
+fid AsText(GeometryN(g, 2))
+117 POLYGON((59 18,67 18,67 13,59 13,59 18))
+118 POLYGON((59 18,67 18,67 13,59 13,59 18))
+119 NULL
+SELECT fid, AsText(GeometryN(g, 2)) from gis_geometrycollection ORDER by fid;
+fid AsText(GeometryN(g, 2))
+120 LINESTRING(0 0,10 10)
+121 LINESTRING(3 6,7 9)
+SELECT fid, AsText(GeometryN(g, 1)) from gis_geometrycollection ORDER by fid;
+fid AsText(GeometryN(g, 1))
+120 POINT(0 0)
+121 POINT(44 6)
+explain extended SELECT fid, AsText(GeometryN(g, 2)) from gis_multi_point;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE gis_multi_point ALL NULL NULL NULL NULL 3 100.00
+Warnings:
+Note 1003 select `test`.`gis_multi_point`.`fid` AS `fid`,astext(geometryn(`test`.`gis_multi_point`.`g`,2)) AS `AsText(GeometryN(g, 2))` from `test`.`gis_multi_point`
+SELECT g1.fid as first, g2.fid as second,
+Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o,
+Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
+Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r
+FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second;
+first second w c o e d t i r
+120 120 1 1 0 1 0 0 1 0
+120 121 0 0 1 0 0 0 1 0
+121 120 0 0 1 0 0 0 1 0
+121 121 1 1 0 1 0 0 1 0
+explain extended SELECT g1.fid as first, g2.fid as second,
+Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o,
+Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
+Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r
+FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE g1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort
+1 SIMPLE g2 ALL NULL NULL NULL NULL 2 100.00 Using join buffer
+Warnings:
+Note 1003 select `test`.`g1`.`fid` AS `first`,`test`.`g2`.`fid` AS `second`,within(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `w`,contains(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `c`,overlaps(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `o`,equals(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `e`,disjoint(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `d`,touches(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `t`,intersects(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `i`,crosses(`test`.`g1`.`g`,`test`.`g2`.`g`) AS `r` from `test`.`gis_geometrycollection` `g1` join `test`.`gis_geometrycollection` `g2` order by `test`.`g1`.`fid`,`test`.`g2`.`fid`
+DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;
+CREATE TABLE t1 (
+a INTEGER PRIMARY KEY AUTO_INCREMENT,
+gp point,
+ln linestring,
+pg polygon,
+mp multipoint,
+mln multilinestring,
+mpg multipolygon,
+gc geometrycollection,
+gm geometry
+);
+SHOW FIELDS FROM t1;
+Field Type Null Key Default Extra
+a int(11) NO PRI NULL auto_increment
+gp point YES NULL
+ln linestring YES NULL
+pg polygon YES NULL
+mp multipoint YES NULL
+mln multilinestring YES NULL
+mpg multipolygon YES NULL
+gc geometrycollection YES NULL
+gm geometry YES NULL
+ALTER TABLE t1 ADD fid INT;
+SHOW FIELDS FROM t1;
+Field Type Null Key Default Extra
+a int(11) NO PRI NULL auto_increment
+gp point YES NULL
+ln linestring YES NULL
+pg polygon YES NULL
+mp multipoint YES NULL
+mln multilinestring YES NULL
+mpg multipolygon YES NULL
+gc geometrycollection YES NULL
+gm geometry YES NULL
+fid int(11) YES NULL
+DROP TABLE t1;
+create table t1 (pk integer primary key auto_increment, a geometry not null);
+insert into t1 (a) values (GeomFromText('Point(1 2)'));
+insert into t1 (a) values ('Garbage');
+ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
+insert IGNORE into t1 (a) values ('Garbage');
+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
+insert into t1 (fl) values (1.11);
+ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
+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)'));
+ERROR 23000: Column 'fl' cannot be null
+drop table t1;
+End of 4.1 tests
+CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY);
+INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))'));
+INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))'));
+INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))'));
+INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))'));
+INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))'));
+INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))'));
+INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))'));
+INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))'));
+INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))'));
+INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))'));
+INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))'));
+INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))'));
+INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))'));
+INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))'));
+INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))'));
+SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
+mbrcontains
+center,small
+SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
+mbrdisjoint
+down3,left3,right3,up3
+SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
+mbrequal
+center
+SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
+mbrintersect
+big,center,down,down2,left,left2,right,right2,small,up,up2
+SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
+mbroverlaps
+down,left,right,up
+SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
+mbrtouches
+down2,left2,right2,up2
+SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
+mbrwithin
+big,center
+SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
+contains
+center,small
+SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
+disjoint
+down3,left3,right3,up3
+SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
+equals
+center
+SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
+intersect
+big,center,down,down2,left,left2,right,right2,small,up,up2
+SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
+overlaps
+down,left,right,up
+SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
+touches
+down2,left2,right2,up2
+SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
+within
+big,center
+SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))');
+SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))');
+SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))');
+SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))');
+SET @point1 = GeomFromText('POLYGON ((0 0))');
+SET @point2 = GeomFromText('POLYGON ((-2 0))');
+SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name;
+overlaps
+SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name;
+overlaps
+SELECT Overlaps(@horiz1, @vert1) FROM DUAL;
+Overlaps(@horiz1, @vert1)
+0
+SELECT Overlaps(@horiz1, @horiz2) FROM DUAL;
+Overlaps(@horiz1, @horiz2)
+1
+SELECT Overlaps(@horiz1, @horiz3) FROM DUAL;
+Overlaps(@horiz1, @horiz3)
+0
+SELECT Overlaps(@horiz1, @point1) FROM DUAL;
+Overlaps(@horiz1, @point1)
+0
+SELECT Overlaps(@horiz1, @point2) FROM DUAL;
+Overlaps(@horiz1, @point2)
+0
+DROP TABLE t1;
+End of 5.0 tests
+CREATE TABLE t1 (p POINT);
+CREATE TABLE t2 (p POINT, INDEX(p));
+INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(1 2)'));
+INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(1 2)'));
+SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
+COUNT(*)
+1
+EXPLAIN
+SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ref p p 28 const 1 Using where
+SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
+COUNT(*)
+1
+INSERT INTO t1 VALUES (POINTFROMTEXT('POINT(1 2)'));
+INSERT INTO t2 VALUES (POINTFROMTEXT('POINT(1 2)'));
+EXPLAIN
+SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
+SELECT COUNT(*) FROM t1 WHERE p=POINTFROMTEXT('POINT(1 2)');
+COUNT(*)
+2
+EXPLAIN
+SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ref p p 28 const 1 Using where
+SELECT COUNT(*) FROM t2 WHERE p=POINTFROMTEXT('POINT(1 2)');
+COUNT(*)
+2
+EXPLAIN
+SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)');
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where
+SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)');
+COUNT(*)
+2
+DROP TABLE t1, t2;
+End of 5.0 tests
+create table t1 (g geometry not null, spatial gk(g)) engine=innodb;
+ERROR HY000: The used table type doesn't support SPATIAL indexes
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_lock_wait_timeout_1.result b/mysql-test/suite/innodb_plugin/r/innodb_lock_wait_timeout_1.result
new file mode 100644
index 00000000000..bd8760b8f79
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb_lock_wait_timeout_1.result
@@ -0,0 +1,375 @@
+#
+# Bug #40113: Embedded SELECT inside UPDATE or DELETE can timeout
+# without error
+#
+CREATE TABLE t1 (a int, b int, PRIMARY KEY (a,b)) ENGINE=InnoDB;
+INSERT INTO t1 (a,b) VALUES (1070109,99);
+CREATE TABLE t2 (b int, a int, PRIMARY KEY (b)) ENGINE=InnoDB;
+INSERT INTO t2 (b,a) VALUES (7,1070109);
+SELECT * FROM t1;
+a b
+1070109 99
+BEGIN;
+SELECT b FROM t2 WHERE b=7 FOR UPDATE;
+b
+7
+BEGIN;
+SELECT b FROM t2 WHERE b=7 FOR UPDATE;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+INSERT INTO t1 (a) VALUES ((SELECT a FROM t2 WHERE b=7));
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+UPDATE t1 SET a='7000000' WHERE a=(SELECT a FROM t2 WHERE b=7);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+DELETE FROM t1 WHERE a=(SELECT a FROM t2 WHERE b=7);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SELECT * FROM t1;
+a b
+1070109 99
+DROP TABLE t2, t1;
+# End of 5.0 tests
+#
+# Bug#46539 Various crashes on INSERT IGNORE SELECT + SELECT
+# FOR UPDATE
+#
+drop table if exists t1;
+create table t1 (a int primary key auto_increment,
+b int, index(b)) engine=innodb;
+insert into t1 (b) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+set autocommit=0;
+begin;
+select * from t1 where b=5 for update;
+a b
+5 5
+insert ignore into t1 (b) select a as b from t1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+# Cleanup
+#
+commit;
+set autocommit=default;
+drop table t1;
+#
+# Bug #37183 insert ignore into .. select ... hangs
+# after deadlock was encountered
+#
+create table t1(id int primary key,v int)engine=innodb;
+insert into t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7);
+create table t2 like t1;
+begin;
+update t1 set v=id*2 where id=1;
+begin;
+update t1 set v=id*2 where id=2;
+update t1 set v=id*2 where id=2;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+insert ignore into t2 select * from t1 where id=1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+rollback;
+rollback;
+drop table t1, t2;
+#
+# Bug#41756 Strange error messages about locks from InnoDB
+#
+drop table if exists t1;
+# In the default transaction isolation mode, and/or with
+# innodb_locks_unsafe_for_binlog=OFF, handler::unlock_row()
+# in InnoDB does nothing.
+# Thus in order to reproduce the condition that led to the
+# warning, one needs to relax isolation by either
+# setting a weaker tx_isolation value, or by turning on
+# the unsafe replication switch.
+# For testing purposes, choose to tweak the isolation level,
+# since it's settable at runtime, unlike
+# innodb_locks_unsafe_for_binlog, which is
+# only a command-line switch.
+#
+set @@session.tx_isolation="read-committed";
+# Prepare data. We need a table with a unique index,
+# for join_read_key to be used. The other column
+# allows to control what passes WHERE clause filter.
+create table t1 (a int primary key, b int) engine=innodb;
+# Let's make sure t1 has sufficient amount of rows
+# to exclude JT_ALL access method when reading it,
+# i.e. make sure that JT_EQ_REF(a) is always preferred.
+insert into t1 values (1,1), (2,null), (3,1), (4,1),
+(5,1), (6,1), (7,1), (8,1), (9,1), (10,1),
+(11,1), (12,1), (13,1), (14,1), (15,1),
+(16,1), (17,1), (18,1), (19,1), (20,1);
+#
+# Demonstrate that for the SELECT statement
+# used later in the test JT_EQ_REF access method is used.
+#
+explain
+select 1 from t1 natural join (select 2 as a, 1 as b union all
+select 2 as a, 2 as b) as t2 for update;
+id 1
+select_type PRIMARY
+table <derived2>
+type ALL
+possible_keys NULL
+key NULL
+key_len NULL
+ref NULL
+rows 2
+Extra
+id 1
+select_type PRIMARY
+table t1
+type eq_ref
+possible_keys PRIMARY
+key PRIMARY
+key_len 4
+ref t2.a
+rows 1
+Extra Using where
+id 2
+select_type DERIVED
+table NULL
+type NULL
+possible_keys NULL
+key NULL
+key_len NULL
+ref NULL
+rows NULL
+Extra No tables used
+id 3
+select_type UNION
+table NULL
+type NULL
+possible_keys NULL
+key NULL
+key_len NULL
+ref NULL
+rows NULL
+Extra No tables used
+id NULL
+select_type UNION RESULT
+table <union2,3>
+type ALL
+possible_keys NULL
+key NULL
+key_len NULL
+ref NULL
+rows NULL
+Extra
+#
+# Demonstrate that the reported SELECT statement
+# no longer produces warnings.
+#
+select 1 from t1 natural join (select 2 as a, 1 as b union all
+select 2 as a, 2 as b) as t2 for update;
+1
+commit;
+#
+# Demonstrate that due to lack of inter-sweep "reset" function,
+# we keep some non-matching records locked, even though we know
+# we could unlock them.
+# To do that, show that if there is only one distinct value
+# for a in t2 (a=2), we will keep record (2,null) in t1 locked.
+# But if we add another value for "a" to t2, say 6,
+# join_read_key cache will be pruned at least once,
+# and thus record (2, null) in t1 will get unlocked.
+#
+begin;
+select 1 from t1 natural join (select 2 as a, 1 as b union all
+select 2 as a, 2 as b) as t2 for update;
+1
+#
+# Switching to connection con1
+# We should be able to delete all records from t1 except (2, null),
+# since they were not locked.
+begin;
+# Delete in series of 3 records so that full scan
+# is not used and we're not blocked on record (2,null)
+delete from t1 where a in (1,3,4);
+delete from t1 where a in (5,6,7);
+delete from t1 where a in (8,9,10);
+delete from t1 where a in (11,12,13);
+delete from t1 where a in (14,15,16);
+delete from t1 where a in (17,18);
+delete from t1 where a in (19,20);
+#
+# Record (2, null) is locked. This is actually unnecessary,
+# because the previous select returned no rows.
+# Just demonstrate the effect.
+#
+delete from t1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+rollback;
+#
+# Switching to connection default
+#
+# Show that the original contents of t1 is intact:
+select * from t1;
+a b
+1 1
+2 NULL
+3 1
+4 1
+5 1
+6 1
+7 1
+8 1
+9 1
+10 1
+11 1
+12 1
+13 1
+14 1
+15 1
+16 1
+17 1
+18 1
+19 1
+20 1
+commit;
+#
+# Have a one more record in t2 to show that
+# if join_read_key cache is purned, the current
+# row under the cursor is unlocked (provided, this row didn't
+# match the partial WHERE clause, of course).
+# Sic: the result of this test dependent on the order of retrieval
+# of records --echo # from the derived table, if !
+# We use DELETE to disable the JOIN CACHE. This DELETE modifies no
+# records. It also should leave no InnoDB row locks.
+#
+begin;
+delete t1.* from t1 natural join (select 2 as a, 2 as b union all
+select 0 as a, 0 as b) as t2;
+# Demonstrate that nothing was deleted form t1
+select * from t1;
+a b
+1 1
+2 NULL
+3 1
+4 1
+5 1
+6 1
+7 1
+8 1
+9 1
+10 1
+11 1
+12 1
+13 1
+14 1
+15 1
+16 1
+17 1
+18 1
+19 1
+20 1
+#
+# Switching to connection con1
+begin;
+# Since there is another distinct record in the derived table
+# the previous matching record in t1 -- (2,null) -- was unlocked.
+delete from t1;
+# We will need the contents of the table again.
+rollback;
+select * from t1;
+a b
+1 1
+2 NULL
+3 1
+4 1
+5 1
+6 1
+7 1
+8 1
+9 1
+10 1
+11 1
+12 1
+13 1
+14 1
+15 1
+16 1
+17 1
+18 1
+19 1
+20 1
+commit;
+#
+# Switching to connection default
+rollback;
+begin;
+#
+# Before this patch, we could wrongly unlock a record
+# that was cached and later used in a join. Demonstrate that
+# this is no longer the case.
+# Sic: this test is also order-dependent (i.e. the
+# the bug would show up only if the first record in the union
+# is retreived and processed first.
+#
+# Verify that JT_EQ_REF is used.
+explain
+select 1 from t1 natural join (select 3 as a, 2 as b union all
+select 3 as a, 1 as b) as t2 for update;
+id 1
+select_type PRIMARY
+table <derived2>
+type ALL
+possible_keys NULL
+key NULL
+key_len NULL
+ref NULL
+rows 2
+Extra
+id 1
+select_type PRIMARY
+table t1
+type eq_ref
+possible_keys PRIMARY
+key PRIMARY
+key_len 4
+ref t2.a
+rows 1
+Extra Using where
+id 2
+select_type DERIVED
+table NULL
+type NULL
+possible_keys NULL
+key NULL
+key_len NULL
+ref NULL
+rows NULL
+Extra No tables used
+id 3
+select_type UNION
+table NULL
+type NULL
+possible_keys NULL
+key NULL
+key_len NULL
+ref NULL
+rows NULL
+Extra No tables used
+id NULL
+select_type UNION RESULT
+table <union2,3>
+type ALL
+possible_keys NULL
+key NULL
+key_len NULL
+ref NULL
+rows NULL
+Extra
+# Lock the record.
+select 1 from t1 natural join (select 3 as a, 2 as b union all
+select 3 as a, 1 as b) as t2 for update;
+1
+1
+# Switching to connection con1
+#
+# We should not be able to delete record (3,1) from t1,
+# (previously it was possible).
+#
+delete from t1 where a=3;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+# Switching to connection default
+commit;
+set @@session.tx_isolation=default;
+drop table t1;
+#
+# End of 5.1 tests
+#
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_multi_update.result b/mysql-test/suite/innodb_plugin/r/innodb_multi_update.result
new file mode 100644
index 00000000000..7af9b030d1f
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb_multi_update.result
@@ -0,0 +1,76 @@
+CREATE TABLE bug38999_1 (a int not null primary key, b int not null, key (b)) engine=innodb;
+CREATE TABLE bug38999_2 (a int not null primary key, b int not null, key (b)) engine=innodb;
+INSERT INTO bug38999_1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10),(11,11),(12,12);
+INSERT INTO bug38999_2 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+update bug38999_1,bug38999_2 set bug38999_1.a=bug38999_1.a+100;
+select * from bug38999_1;
+a b
+101 1
+102 2
+103 3
+104 4
+105 5
+106 6
+107 7
+108 8
+109 9
+110 10
+111 11
+112 12
+update bug38999_1,bug38999_2 set bug38999_1.a=bug38999_1.a+100 where bug38999_1.a=101;
+select * from bug38999_1;
+a b
+201 1
+102 2
+103 3
+104 4
+105 5
+106 6
+107 7
+108 8
+109 9
+110 10
+111 11
+112 12
+update bug38999_1,bug38999_2 set bug38999_1.b=bug38999_1.b+10 where bug38999_1.b=2;
+select * from bug38999_1;
+a b
+201 1
+103 3
+104 4
+105 5
+106 6
+107 7
+108 8
+109 9
+110 10
+111 11
+102 12
+112 12
+update bug38999_1,bug38999_2 set bug38999_1.b=bug38999_1.b+2,bug38999_2.b=bug38999_1.b+10 where bug38999_1.b between 3 and 5 and bug38999_1.a=bug38999_2.a+100;
+select * from bug38999_1;
+a b
+201 1
+103 5
+104 6
+106 6
+105 7
+107 7
+108 8
+109 9
+110 10
+111 11
+102 12
+112 12
+select * from bug38999_2;
+a b
+1 1
+2 2
+6 6
+7 7
+8 8
+9 9
+3 13
+4 14
+5 15
+drop table bug38999_1,bug38999_2;
diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/suite/innodb_plugin/r/innodb_mysql.result
index 7a19d913231..b4ac88fc1c3 100644
--- a/mysql-test/r/innodb_mysql.result
+++ b/mysql-test/suite/innodb_plugin/r/innodb_mysql.result
@@ -2296,6 +2296,28 @@ id select_type table type possible_keys key key_len ref rows Extra
drop table t1,t2;
#
#
+# Bug #39653: find_shortest_key in sql_select.cc does not consider
+# clustered primary keys
+#
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c INT, d INT, e INT, f INT,
+KEY (b,c)) ENGINE=INNODB;
+INSERT INTO t1 VALUES (1,1,1,1,1,1), (2,2,2,2,2,2), (3,3,3,3,3,3),
+(4,4,4,4,4,4), (5,5,5,5,5,5), (6,6,6,6,6,6),
+(7,7,7,7,7,7), (8,8,8,8,8,8), (9,9,9,9,9,9),
+(11,11,11,11,11,11);
+EXPLAIN SELECT COUNT(*) FROM t1;
+id 1
+select_type SIMPLE
+table t1
+type index
+possible_keys NULL
+key b
+key_len 10
+ref NULL
+rows 10
+Extra Using index
+DROP TABLE t1;
+#
# Bug #49838: DROP INDEX and ADD UNIQUE INDEX for same index may
# corrupt definition at engine
#
@@ -2329,36 +2351,6 @@ Index_type BTREE
Comment
DROP TABLE t1;
#
-# Bug #53334: wrong result for outer join with impossible ON condition
-# (see the same test case for MyISAM in join.test)
-#
-create table t1 (id int primary key);
-create table t2 (id int);
-insert into t1 values (75);
-insert into t1 values (79);
-insert into t1 values (78);
-insert into t1 values (77);
-replace into t1 values (76);
-replace into t1 values (76);
-insert into t1 values (104);
-insert into t1 values (103);
-insert into t1 values (102);
-insert into t1 values (101);
-insert into t1 values (105);
-insert into t1 values (106);
-insert into t1 values (107);
-insert into t2 values (107),(75),(1000);
-select t1.id,t2.id from t2 left join t1 on t1.id>=74 and t1.id<=0
-where t2.id=75 and t1.id is null;
-id id
-NULL 75
-explain select t1.id,t2.id from t2 left join t1 on t1.id>=74 and t1.id<=0
-where t2.id=75 and t1.id is null;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 const PRIMARY NULL NULL NULL 1 Impossible ON condition
-1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where
-drop table t1,t2;
-#
# Bug #47453: InnoDB incorrectly changes TIMESTAMP columns when
# JOINed during an UPDATE
#
@@ -2386,4 +2378,16 @@ SELECT SECOND(c)-@bug47453 FROM t1 JOIN t2 ON d=a;
SECOND(c)-@bug47453
0
DROP TABLE t1, t2;
+#
+# Bug#38999 valgrind warnings for update statement in function compare_record()
+#
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 values (1),(2),(3),(4),(5);
+INSERT INTO t2 values (1);
+SELECT * FROM t1 WHERE a = 2;
+a
+2
+UPDATE t1,t2 SET t1.a = t1.a + 100 WHERE t1.a = 1;
+DROP TABLE t1,t2;
End of 5.1 tests
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_mysql_rbk.result b/mysql-test/suite/innodb_plugin/r/innodb_mysql_rbk.result
new file mode 100644
index 00000000000..21ac4295325
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb_mysql_rbk.result
@@ -0,0 +1,21 @@
+CREATE TABLE t1(a INT, b INT NOT NULL, PRIMARY KEY (a)) ENGINE=innodb
+DEFAULT CHARSET=latin1;
+INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7);
+START TRANSACTION;
+SELECT * FROM t1 WHERE b=3 LIMIT 1 FOR UPDATE;
+a b
+3 3
+START TRANSACTION;
+UPDATE t1 SET b=b+12 WHERE a > 2 ORDER BY a;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+ROLLBACK;
+START TRANSACTION;
+SELECT * FROM t1 WHERE b=3 LIMIT 1 FOR UPDATE;
+a b
+3 3
+START TRANSACTION;
+UPDATE t1 SET b=10 WHERE a > 1 ORDER BY a;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SELECT * FROM t1 WHERE b = 10;
+a b
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_notembedded.result b/mysql-test/suite/innodb_plugin/r/innodb_notembedded.result
new file mode 100644
index 00000000000..af332aba38a
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb_notembedded.result
@@ -0,0 +1,23 @@
+drop table if exists t1;
+SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
+SET GLOBAL log_bin_trust_function_creators = 1;
+create table t1 (col1 integer primary key, col2 integer) engine=innodb;
+insert t1 values (1,100);
+create function f1 () returns integer begin
+declare var1 int;
+select col2 into var1 from t1 where col1=1 for update;
+return var1;
+end|
+start transaction;
+select f1();
+f1()
+100
+update t1 set col2=0 where col1=1;
+select * from t1;
+col1 col2
+1 100
+rollback;
+rollback;
+drop table t1;
+drop function f1;
+SET @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators;
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_timeout_rollback.result b/mysql-test/suite/innodb_plugin/r/innodb_timeout_rollback.result
new file mode 100644
index 00000000000..e2da6ba8af7
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb_timeout_rollback.result
@@ -0,0 +1,36 @@
+drop table if exists t1;
+show variables like 'innodb_rollback_on_timeout';
+Variable_name Value
+innodb_rollback_on_timeout ON
+create table t1 (a int unsigned not null primary key) engine = innodb;
+insert into t1 values (1);
+commit;
+begin work;
+insert into t1 values (2);
+select * from t1;
+a
+1
+2
+begin work;
+insert into t1 values (5);
+select * from t1;
+a
+1
+5
+insert into t1 values (2);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+select * from t1;
+a
+1
+commit;
+select * from t1;
+a
+1
+2
+commit;
+select * from t1;
+a
+1
+2
+drop table t1;
+End of 5.0 tests
diff --git a/mysql-test/suite/innodb_plugin/t/disabled.def b/mysql-test/suite/innodb_plugin/t/disabled.def
new file mode 100644
index 00000000000..888298bbb09
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/disabled.def
@@ -0,0 +1,11 @@
+##############################################################################
+#
+# List the test cases that are to be disabled temporarily.
+#
+# Separate the test case name and the comment with ':'.
+#
+# <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment>
+#
+# Do not use any TAB characters for whitespace.
+#
+##############################################################################
diff --git a/mysql-test/suite/innodb_plugin/t/innodb-autoinc-optimize.test b/mysql-test/suite/innodb_plugin/t/innodb-autoinc-optimize.test
new file mode 100644
index 00000000000..b359980768c
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb-autoinc-optimize.test
@@ -0,0 +1,19 @@
+-- source include/have_innodb_plugin.inc
+# embedded server ignores 'delayed', so skip this
+-- source include/not_embedded.inc
+
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+#
+# Bug 34286
+#
+create table t1(a int not null auto_increment primary key) engine=innodb;
+insert into t1 set a = -1;
+# NOTE: The database needs to be shutdown and restarted (here) for
+# the test to work. It's included for reference only.
+optimize table t1;
+
+--echo ==== clean up ====
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_plugin/t/innodb-ucs2.test b/mysql-test/suite/innodb_plugin/t/innodb-ucs2.test
new file mode 100644
index 00000000000..050a05675e7
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb-ucs2.test
@@ -0,0 +1,230 @@
+-- source include/have_innodb_plugin.inc
+-- source include/have_ucs2.inc
+
+--disable_warnings
+drop table if exists t1, t2;
+--enable_warnings
+
+#
+# BUG 14056 Column prefix index on UTF-8 primary key column causes: Can't find record..
+#
+
+create table t1 (
+ a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
+) character set utf8 engine = innodb;
+create table t2 (
+ a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
+) character set ucs2 engine = innodb;
+insert into t1 values (1,'abcdefg','abcdefg','one');
+insert into t1 values (2,'ijkilmn','ijkilmn','two');
+insert into t1 values (3,'qrstuvw','qrstuvw','three');
+insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
+insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
+insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
+insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
+insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
+insert into t2 values (1,'abcdefg','abcdefg','one');
+insert into t2 values (2,'ijkilmn','ijkilmn','two');
+insert into t2 values (3,'qrstuvw','qrstuvw','three');
+insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
+insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
+insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
+insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
+insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
+insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
+insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
+insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
+insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
+update t1 set filler = 'boo' where a = 1;
+update t2 set filler ='email' where a = 4;
+select a,hex(b),hex(c),filler from t1 order by filler;
+select a,hex(b),hex(c),filler from t2 order by filler;
+drop table t1;
+drop table t2;
+
+create table t1 (
+ a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2))
+) character set utf8 engine = innodb;
+create table t2 (
+ a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2))
+) character set ucs2 engine = innodb;
+insert into t1 values (1,'abcdefg','abcdefg','one');
+insert into t1 values (2,'ijkilmn','ijkilmn','two');
+insert into t1 values (3,'qrstuvw','qrstuvw','three');
+insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
+insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
+insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
+insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
+insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
+insert into t2 values (1,'abcdefg','abcdefg','one');
+insert into t2 values (2,'ijkilmn','ijkilmn','two');
+insert into t2 values (3,'qrstuvw','qrstuvw','three');
+insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
+insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
+insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
+insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
+insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
+insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
+insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
+insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
+insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
+update t1 set filler = 'boo' where a = 1;
+update t2 set filler ='email' where a = 4;
+select a,hex(b),hex(c),filler from t1 order by filler;
+select a,hex(b),hex(c),filler from t2 order by filler;
+drop table t1;
+drop table t2;
+
+create table t1 (
+ a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2))
+) character set utf8 engine = innodb;
+create table t2 (
+ a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2))
+) character set ucs2 engine = innodb;
+insert into t1 values (1,'abcdefg','abcdefg','one');
+insert into t1 values (2,'ijkilmn','ijkilmn','two');
+insert into t1 values (3,'qrstuvw','qrstuvw','three');
+insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
+insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
+insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
+insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
+insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
+insert into t2 values (1,'abcdefg','abcdefg','one');
+insert into t2 values (2,'ijkilmn','ijkilmn','two');
+insert into t2 values (3,'qrstuvw','qrstuvw','three');
+insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
+insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
+insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
+insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
+insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
+insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
+insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
+insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
+insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
+update t1 set filler = 'boo' where a = 1;
+update t2 set filler ='email' where a = 4;
+select a,hex(b),hex(c),filler from t1 order by filler;
+select a,hex(b),hex(c),filler from t2 order by filler;
+drop table t1;
+drop table t2;
+
+create table t1 (
+ a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2))
+) character set utf8 engine = innodb;
+create table t2 (
+ a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2))
+) character set ucs2 engine = innodb;
+insert into t1 values (1,'abcdefg','abcdefg','one');
+insert into t1 values (2,'ijkilmn','ijkilmn','two');
+insert into t1 values (3,'qrstuvw','qrstuvw','three');
+insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
+insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
+insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
+insert into t2 values (1,'abcdefg','abcdefg','one');
+insert into t2 values (2,'ijkilmn','ijkilmn','two');
+insert into t2 values (3,'qrstuvw','qrstuvw','three');
+insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
+insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
+insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
+insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
+insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
+insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
+insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
+update t1 set filler = 'boo' where a = 1;
+update t2 set filler ='email' where a = 4;
+select a,hex(b),hex(c),filler from t1 order by filler;
+select a,hex(b),hex(c),filler from t2 order by filler;
+drop table t1;
+drop table t2;
+commit;
+
+#
+# Test cases for bug #15308 Problem of Order with Enum Column in Primary Key
+#
+CREATE TABLE t1 (
+ ind enum('0','1','2') NOT NULL default '0',
+ string1 varchar(250) NOT NULL,
+ PRIMARY KEY (ind)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE t2 (
+ ind enum('0','1','2') NOT NULL default '0',
+ string1 varchar(250) NOT NULL,
+ PRIMARY KEY (ind)
+) ENGINE=InnoDB DEFAULT CHARSET=ucs2;
+
+INSERT INTO t1 VALUES ('1', ''),('2', '');
+INSERT INTO t2 VALUES ('1', ''),('2', '');
+SELECT hex(ind),hex(string1) FROM t1 ORDER BY string1;
+SELECT hex(ind),hex(string1) FROM t2 ORDER BY string1;
+drop table t1,t2;
+
+CREATE TABLE t1 (
+ ind set('0','1','2') NOT NULL default '0',
+ string1 varchar(250) NOT NULL,
+ PRIMARY KEY (ind)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE t2 (
+ ind set('0','1','2') NOT NULL default '0',
+ string1 varchar(250) NOT NULL,
+ PRIMARY KEY (ind)
+) ENGINE=InnoDB DEFAULT CHARSET=ucs2;
+
+INSERT INTO t1 VALUES ('1', ''),('2', '');
+INSERT INTO t2 VALUES ('1', ''),('2', '');
+SELECT hex(ind),hex(string1) FROM t1 ORDER BY string1;
+SELECT hex(ind),hex(string1) FROM t2 ORDER BY string1;
+drop table t1,t2;
+
+CREATE TABLE t1 (
+ ind bit not null,
+ string1 varchar(250) NOT NULL,
+ PRIMARY KEY (ind)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE t2 (
+ ind bit not null,
+ string1 varchar(250) NOT NULL,
+ PRIMARY KEY (ind)
+) ENGINE=InnoDB DEFAULT CHARSET=ucs2;
+insert into t1 values(0,''),(1,'');
+insert into t2 values(0,''),(1,'');
+select hex(ind),hex(string1) from t1 order by string1;
+select hex(ind),hex(string1) from t2 order by string1;
+drop table t1,t2;
+
+# tests for bug #14056 Column prefix index on UTF-8 primary key column causes 'Can't find record..'
+
+create table t2 (
+ a int, b char(10), filler char(10), primary key(a, b(2))
+) character set utf8 engine = innodb;
+
+insert into t2 values (1,'abcdefg','one');
+insert into t2 values (2,'ijkilmn','two');
+insert into t2 values (3, 'qrstuvw','three');
+update t2 set a=5, filler='booo' where a=1;
+drop table t2;
+create table t2 (
+ a int, b char(10), filler char(10), primary key(a, b(2))
+) character set ucs2 engine = innodb;
+
+insert into t2 values (1,'abcdefg','one');
+insert into t2 values (2,'ijkilmn','two');
+insert into t2 values (3, 'qrstuvw','three');
+update t2 set a=5, filler='booo' where a=1;
+drop table t2;
+
+create table t1(a int not null, b char(110),primary key(a,b(100))) engine=innodb default charset=utf8;
+insert into t1 values(1,'abcdefg'),(2,'defghijk');
+insert into t1 values(6,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1);
+insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2);
+select a,hex(b) from t1 order by b;
+update t1 set b = 'three' where a = 6;
+drop table t1;
+create table t1(a int not null, b text(110),primary key(a,b(100))) engine=innodb default charset=utf8;
+insert into t1 values(1,'abcdefg'),(2,'defghijk');
+insert into t1 values(6,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1);
+insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2);
+select a,hex(b) from t1 order by b;
+update t1 set b = 'three' where a = 6;
+drop table t1;
+
+--echo End of 5.0 tests
diff --git a/mysql-test/suite/innodb_plugin/t/innodb.test b/mysql-test/suite/innodb_plugin/t/innodb.test
index 6cfc0f0cb9a..60ba7d1e3bf 100644
--- a/mysql-test/suite/innodb_plugin/t/innodb.test
+++ b/mysql-test/suite/innodb_plugin/t/innodb.test
@@ -915,33 +915,6 @@ UPDATE t1 set a=a+100 where b between 2 and 3 and a < 1000;
SELECT * from t1;
drop table t1;
-#
-# Test multi update with different join methods
-#
-
-CREATE TABLE t1 (a int not null primary key, b int not null, key (b)) engine=innodb;
-CREATE TABLE t2 (a int not null primary key, b int not null, key (b)) engine=innodb;
-INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10),(11,11),(12,12);
-INSERT INTO t2 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
-
-# Full join, without key
-update t1,t2 set t1.a=t1.a+100;
-select * from t1;
-
-# unique key
-update t1,t2 set t1.a=t1.a+100 where t1.a=101;
-select * from t1;
-
-# ref key
-update t1,t2 set t1.b=t1.b+10 where t1.b=2;
-select * from t1;
-
-# Range key (in t1)
-update t1,t2 set t1.b=t1.b+2,t2.b=t1.b+10 where t1.b between 3 and 5 and t1.a=t2.a+100;
-select * from t1;
-select * from t2;
-
-drop table t1,t2;
CREATE TABLE t2 ( NEXT_T BIGINT NOT NULL PRIMARY KEY) ENGINE=MyISAM;
CREATE TABLE t1 ( B_ID INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
SET AUTOCOMMIT=0;
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_autoinc_lock_mode_zero-master.opt b/mysql-test/suite/innodb_plugin/t/innodb_autoinc_lock_mode_zero-master.opt
new file mode 100644
index 00000000000..fad0da2ac2e
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_autoinc_lock_mode_zero-master.opt
@@ -0,0 +1 @@
+--innodb-autoinc-lock-mode=0
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_autoinc_lock_mode_zero.test b/mysql-test/suite/innodb_plugin/t/innodb_autoinc_lock_mode_zero.test
new file mode 100644
index 00000000000..5a0cd5fa766
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_autoinc_lock_mode_zero.test
@@ -0,0 +1,44 @@
+# This test runs with old-style locking, as:
+# --innodb-autoinc-lock-mode=0
+
+-- source include/have_innodb_plugin.inc
+
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+
+#
+# Search on unique key
+#
+
+CREATE TABLE t1 (
+ id int(11) NOT NULL auto_increment,
+ ggid varchar(32) binary DEFAULT '' NOT NULL,
+ email varchar(64) DEFAULT '' NOT NULL,
+ passwd varchar(32) binary DEFAULT '' NOT NULL,
+ PRIMARY KEY (id),
+ UNIQUE ggid (ggid)
+) ENGINE=innodb;
+
+insert into t1 (ggid,passwd) values ('test1','xxx');
+insert into t1 (ggid,passwd) values ('test2','yyy');
+-- error ER_DUP_ENTRY
+insert into t1 (ggid,passwd) values ('test2','this will fail');
+-- error ER_DUP_ENTRY
+insert into t1 (ggid,id) values ('this will fail',1);
+
+select * from t1 where ggid='test1';
+select * from t1 where passwd='xxx';
+select * from t1 where id=2;
+
+replace into t1 (ggid,id) values ('this will work',1);
+replace into t1 (ggid,passwd) values ('test2','this will work');
+-- error ER_DUP_ENTRY
+update t1 set id=100,ggid='test2' where id=1;
+select * from t1;
+select * from t1 where id=1;
+select * from t1 where id=999;
+drop table t1;
+
+--echo End of tests
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_bug30919-master.opt b/mysql-test/suite/innodb_plugin/t/innodb_bug30919-master.opt
new file mode 100644
index 00000000000..8636d2d8734
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug30919-master.opt
@@ -0,0 +1 @@
+--innodb --innodb_autoinc_lock_mode=0
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_bug30919.test b/mysql-test/suite/innodb_plugin/t/innodb_bug30919.test
new file mode 100644
index 00000000000..cc1358294e1
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug30919.test
@@ -0,0 +1,68 @@
+--source include/have_innodb_plugin.inc
+--source include/have_partition.inc
+--vertical_results
+let $engine_type= 'innodb';
+
+######## Creat Table Section #########
+use test;
+
+eval CREATE TABLE test.part_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
+ fkid MEDIUMINT, filler VARCHAR(255),
+ PRIMARY KEY(id)) ENGINE=$engine_type
+ PARTITION BY RANGE(id)
+ SUBPARTITION BY hash(id) subpartitions 2
+ (PARTITION pa3 values less than (42),
+ PARTITION pa6 values less than (60),
+ PARTITION pa7 values less than (70),
+ PARTITION pa8 values less than (80),
+ PARTITION pa9 values less than (90),
+ PARTITION pa10 values less than (100),
+ PARTITION pa11 values less than MAXVALUE);
+
+######## Create SPs, Functions, Views and Triggers Section ##############
+
+delimiter |;
+
+CREATE PROCEDURE test.proc_part()
+BEGIN
+ DECLARE ins_count INT DEFAULT 1000;
+ DECLARE del_count INT;
+ DECLARE cur_user VARCHAR(255);
+ DECLARE local_uuid VARCHAR(255);
+ DECLARE local_time TIMESTAMP;
+
+ SET local_time= NOW();
+ SET cur_user= CURRENT_USER();
+ SET local_uuid= UUID();
+
+ WHILE ins_count > 0 DO
+ INSERT INTO test.part_tbl VALUES (NULL, NOW(), USER() , UUID(),
+ ins_count,'Going to test MBR for MySQL');
+ SET ins_count = ins_count - 1;
+ END WHILE;
+ SELECT MAX(id) FROM test.part_tbl INTO del_count;
+ WHILE del_count > 0 DO
+ DELETE FROM test.part_tbl WHERE id = del_count;
+ select count(*) as internal_count, del_count -- these two lines are for
+ FROM test.part_tbl; -- debug to show the problem
+ SET del_count = del_count - 2;
+ END WHILE;
+END|
+
+delimiter ;|
+
+############ Finish Setup Section ###################
+
+############ Test Section ###################
+--horizontal_results
+
+CALL test.proc_part();
+
+select count(*) as Part from test.part_tbl;
+
+###### CLEAN UP SECTION ##############
+
+DROP PROCEDURE test.proc_part;
+DROP TABLE test.part_tbl;
+
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_bug42419.test b/mysql-test/suite/innodb_plugin/t/innodb_bug42419.test
new file mode 100644
index 00000000000..2302e3c2233
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug42419.test
@@ -0,0 +1,78 @@
+#
+# Testcase for InnoDB
+# Bug#42419 Server crash with "Pure virtual method called" on two concurrent connections
+#
+
+--source include/not_embedded.inc
+--source include/have_innodb_plugin.inc
+
+let $innodb_lock_wait_timeout= query_get_value(SHOW VARIABLES LIKE 'innodb_lock_wait_timeout%', Value, 1);
+if (`SELECT $innodb_lock_wait_timeout < 10`)
+{
+ --echo # innodb_lock_wait_timeout must be >= 10 seconds
+ --echo # so that this test can work all time fine on an overloaded testing box
+ SHOW VARIABLES LIKE 'innodb_lock_wait_timeout';
+ exit;
+}
+
+# Save the initial number of concurrent sessions
+--source include/count_sessions.inc
+
+# First session
+connection default;
+
+
+--enable_warnings
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b INT) ENGINE = InnoDB;
+
+INSERT INTO t1 VALUES (1,1),(2,2),(3,3);
+COMMIT;
+SET AUTOCOMMIT = 0;
+
+CREATE TEMPORARY TABLE t1_tmp ( b INT );
+
+INSERT INTO t1_tmp (b) SELECT b FROM t1 WHERE a = 3;
+INSERT INTO t1_tmp (b) SELECT b FROM t1 WHERE a = 2;
+
+# Second session
+connect (user2,localhost,root,,,$MASTER_MYPORT,$MASTER_MYSOCK);
+
+SET AUTOCOMMIT = 0;
+
+CREATE TEMPORARY TABLE t2_tmp ( a int, new_a int );
+INSERT INTO t2_tmp VALUES (1,51),(2,52),(3,53);
+
+UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 1;
+send
+UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 2;
+
+# The last update will wait for a lock held by the first session
+
+# First session
+connection default;
+
+# Poll till the UPDATE of the second session waits for lock
+let $show_statement= SHOW PROCESSLIST;
+let $field= State;
+let $condition= = 'Updating';
+--source include/wait_show_condition.inc
+
+# If the testing box is overloadeded and innodb_lock_wait_timeout is too small
+# we might get here ER_LOCK_WAIT_TIMEOUT.
+--error ER_LOCK_DEADLOCK
+INSERT INTO t1_tmp (b) SELECT b FROM t1 WHERE a = 1;
+
+# Second session
+connection user2;
+--echo Reap the server message for connection user2 UPDATE t1 ...
+reap;
+
+# The server crashed when executing this UPDATE or the succeeding SQL command.
+UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 3;
+
+connection default;
+disconnect user2;
+DROP TABLE t1;
+
+# Wait till all disconnects are completed
+--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_bug48024.test b/mysql-test/suite/innodb_plugin/t/innodb_bug48024.test
new file mode 100644
index 00000000000..fea3adf9216
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug48024.test
@@ -0,0 +1,22 @@
+# Bug #48024 Innodb doesn't work with multi-statements
+
+--source include/have_innodb_plugin.inc
+
+CREATE TABLE bug48024(a int PRIMARY KEY,b int NOT NULL,KEY(b)) ENGINE=InnoDB;
+CREATE TABLE bug48024_b(b int PRIMARY KEY) ENGINE=InnoDB;
+# Bug #53644 InnoDB thinks that /*/ starts and ends a comment
+ALTER TABLE bug48024 /*/ADD CONSTRAINT FOREIGN KEY(c) REFERENCES(a),/*/
+ADD CONSTRAINT FOREIGN KEY(b) REFERENCES bug48024_b(b);
+
+DROP TABLE bug48024,bug48024_b;
+
+# Work around Bug #53750 (failure in mysql-test-run --ps-protocol)
+-- disable_ps_protocol
+delimiter |;
+CREATE TABLE bug48024(a int PRIMARY KEY,b int NOT NULL,KEY(b)) ENGINE=InnoDB;
+CREATE TABLE bug48024_b(b int PRIMARY KEY) ENGINE=InnoDB;
+ALTER TABLE bug48024 /*/ADD CONSTRAINT FOREIGN KEY(c) REFERENCES(a),/*/
+ADD CONSTRAINT FOREIGN KEY(b) REFERENCES bug48024_b(b)|
+delimiter ;|
+
+DROP TABLE bug48024,bug48024_b;
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_bug49164.test b/mysql-test/suite/innodb_plugin/t/innodb_bug49164.test
new file mode 100644
index 00000000000..a945bc681b6
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug49164.test
@@ -0,0 +1,47 @@
+-- source include/have_innodb_plugin.inc
+
+# Bug #49164 READ-COMMITTED reports "matched: 0" on compound PK
+# a duplicate of
+# Bug #52663 Lost update incrementing column value under READ COMMITTED
+
+connect (con1,localhost,root,,);
+connect (con2,localhost,root,,);
+
+connection con1;
+SET tx_isolation = 'READ-COMMITTED';
+
+CREATE TABLE bug49164 (a INT, b BIGINT, c TINYINT, PRIMARY KEY (a, b))
+ENGINE=InnoDB;
+
+insert into bug49164 values (1,1,1), (2,2,2), (3,3,3);
+
+begin;
+update bug49164 set c=7;
+select * from bug49164;
+rollback;
+select * from bug49164;
+begin;
+update bug49164 set c=7;
+
+connection con2;
+
+SET tx_isolation = 'READ-COMMITTED';
+begin;
+select * from bug49164;
+commit;
+begin;
+--send
+update bug49164 set c=6 where a=1 and b=1;
+
+connection con1;
+rollback;
+select * from bug49164;
+connection con2;
+reap;
+commit;
+connection con1;
+select * from bug49164;
+connection default;
+disconnect con1;
+disconnect con2;
+drop table bug49164;
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_bug53290.test b/mysql-test/suite/innodb_plugin/t/innodb_bug53290.test
new file mode 100644
index 00000000000..3f6b9b513f7
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug53290.test
@@ -0,0 +1,22 @@
+-- source include/have_innodb_plugin.inc
+
+create table bug53290 (x bigint) engine=innodb;
+
+insert into bug53290 () values (),(),(),(),(),(),(),(),(),(),(),();
+insert into bug53290 select * from bug53290;
+insert into bug53290 select * from bug53290;
+insert into bug53290 select * from bug53290;
+insert into bug53290 select * from bug53290;
+insert into bug53290 select * from bug53290;
+insert into bug53290 select * from bug53290;
+insert into bug53290 select * from bug53290;
+insert into bug53290 select * from bug53290;
+insert into bug53290 select * from bug53290;
+insert into bug53290 select * from bug53290;
+insert into bug53290 select * from bug53290;
+insert into bug53290 select * from bug53290;
+insert into bug53290 select * from bug53290;
+
+alter table bug53290 add unique index `idx` (x);
+
+drop table bug53290;
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_bug53591.test b/mysql-test/suite/innodb_plugin/t/innodb_bug53591.test
new file mode 100644
index 00000000000..760b4630383
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug53591.test
@@ -0,0 +1,22 @@
+-- source include/have_innodb_plugin.inc
+
+let $file_format=`select @@innodb_file_format`;
+let $file_format_check=`select @@innodb_file_format_check`;
+let $file_per_table=`select @@innodb_file_per_table`;
+
+SET GLOBAL innodb_file_format='Barracuda';
+SET GLOBAL innodb_file_per_table=on;
+
+set old_alter_table=0;
+
+CREATE TABLE bug53591(a text charset utf8 not null)
+ENGINE=InnoDB KEY_BLOCK_SIZE=1;
+-- error 139
+ALTER TABLE bug53591 ADD PRIMARY KEY(a(220));
+SHOW WARNINGS;
+
+DROP TABLE bug53591;
+
+EVAL SET GLOBAL innodb_file_format=$file_format;
+EVAL SET GLOBAL innodb_file_format_check=$file_format_check;
+EVAL SET GLOBAL innodb_file_per_table=$file_per_table;
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_bug53592.test b/mysql-test/suite/innodb_plugin/t/innodb_bug53592.test
new file mode 100644
index 00000000000..aec331e031b
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug53592.test
@@ -0,0 +1,59 @@
+# Testcase for Bug #53592 - "crash replacing duplicates into
+# table after fast alter table added unique key". The fix is to make
+# sure index number lookup should go through "index translation table".
+
+--source include/have_innodb_plugin.inc
+
+# Use FIC for index creation
+set old_alter_table=0;
+
+create table bug53592(a int) engine=innodb row_format=compact;
+
+alter table bug53592 add column b text charset utf8;
+
+alter table bug53592 add column c blob not null;
+
+# Create a non-unique nonclustered index
+create index bug53592_b on bug53592(b(81));
+
+# Create a unique index, this unique index should have smaller
+# index number than bug53592_b, since unique index ranks higher
+# than regular index does
+create unique index bug53592_c on bug53592(c(1));
+
+# This will trigger a dup key error and will require fetching
+# the index number through a index structure for the error reporting.
+# To get the correct index number, the code should go through index
+# translation table. Otherwise, it will get the wrong index
+# number and later trigger a server crash.
+replace into bug53592 values (),();
+
+check table bug53592;
+
+drop table bug53592;
+
+# Running the same set of test when "old_alter_table" is turned on
+set old_alter_table=1;
+
+create table bug53592(a int) engine=innodb row_format=compact;
+
+alter table bug53592 add column b text charset utf8;
+
+alter table bug53592 add column c blob not null;
+
+# Create a non-unique nonclustered index
+create index bug53592_b on bug53592(b(81));
+
+# Create a unique index
+create unique index bug53592_c on bug53592(c(1));
+
+# This will trigger a dup key error and will require fetching
+# the index number through a index structure for the error reporting.
+# To get the correct index number, the code should go through index
+# translation table. Otherwise, it will get the wrong index
+# number and later trigger a server crash.
+replace into bug53592 values (),();
+
+check table bug53592;
+
+drop table bug53592;
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_bug53674-master.opt b/mysql-test/suite/innodb_plugin/t/innodb_bug53674-master.opt
new file mode 100644
index 00000000000..f1cfd7ab6c7
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug53674-master.opt
@@ -0,0 +1 @@
+--log-bin --innodb-locks-unsafe-for-binlog --binlog-format=mixed
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_bug53674.test b/mysql-test/suite/innodb_plugin/t/innodb_bug53674.test
new file mode 100644
index 00000000000..e3cbf4466a7
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug53674.test
@@ -0,0 +1,8 @@
+-- source include/have_innodb_plugin.inc
+
+create table bug53674(a int)engine=innodb;
+insert into bug53674 values (1),(2);
+start transaction;
+select * from bug53674 for update;
+select * from bug53674 where a=(select a from bug53674 where a > 1);
+drop table bug53674;
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_bug54044.test b/mysql-test/suite/innodb_plugin/t/innodb_bug54044.test
new file mode 100644
index 00000000000..58f60a54130
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug54044.test
@@ -0,0 +1,11 @@
+# This is the test for bug #54044. Special handle MYSQL_TYPE_NULL type
+# during create table, so it will not trigger assertion failure.
+
+--source include/have_innodb_plugin.inc
+
+# This 'create table' operation should fail because of
+# using NULL datatype
+--error ER_CANT_CREATE_TABLE
+CREATE TEMPORARY TABLE table_54044 ENGINE = INNODB
+ AS SELECT IF(NULL IS NOT NULL, NULL, NULL);
+
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_bug54679.test b/mysql-test/suite/innodb_plugin/t/innodb_bug54679.test
new file mode 100644
index 00000000000..863d9847ac1
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug54679.test
@@ -0,0 +1,97 @@
+# Test Bug #54679 alter table causes compressed row_format to revert to compact
+
+--source include/have_innodb_plugin.inc
+
+let $file_format=`select @@innodb_file_format`;
+let $file_format_check=`select @@innodb_file_format_check`;
+let $file_per_table=`select @@innodb_file_per_table`;
+SET GLOBAL innodb_file_format='Barracuda';
+SET GLOBAL innodb_file_per_table=ON;
+SET innodb_strict_mode=ON;
+
+CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
+WHERE TABLE_NAME='bug54679';
+
+# The ROW_FORMAT of the table should be preserved when it is not specified
+# in ALTER TABLE.
+ALTER TABLE bug54679 ADD COLUMN b INT;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
+WHERE TABLE_NAME='bug54679';
+
+DROP TABLE bug54679;
+
+# Check that the ROW_FORMAT conversion to/from COMPRESSED works.
+
+CREATE TABLE bug54679 (a INT) ENGINE=InnoDB;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
+WHERE TABLE_NAME='bug54679';
+
+# KEY_BLOCK_SIZE implies COMPRESSED.
+ALTER TABLE bug54679 KEY_BLOCK_SIZE=1;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
+WHERE TABLE_NAME='bug54679';
+
+--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
+--error ER_CANT_CREATE_TABLE
+ALTER TABLE bug54679 ROW_FORMAT=REDUNDANT;
+--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
+SHOW WARNINGS;
+DROP TABLE bug54679;
+CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
+WHERE TABLE_NAME='bug54679';
+
+ALTER TABLE bug54679 KEY_BLOCK_SIZE=2;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
+WHERE TABLE_NAME='bug54679';
+
+# This prevents other than REDUNDANT or COMPACT ROW_FORMAT for new tables.
+SET GLOBAL innodb_file_format=Antelope;
+
+--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
+--error ER_CANT_CREATE_TABLE
+ALTER TABLE bug54679 KEY_BLOCK_SIZE=4;
+--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
+SHOW WARNINGS;
+--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
+--error ER_CANT_CREATE_TABLE
+ALTER TABLE bug54679 ROW_FORMAT=DYNAMIC;
+--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
+SHOW WARNINGS;
+DROP TABLE bug54679;
+--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
+--error ER_CANT_CREATE_TABLE
+CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
+SHOW WARNINGS;
+CREATE TABLE bug54679 (a INT) ENGINE=InnoDB;
+
+SET GLOBAL innodb_file_format=Barracuda;
+# This will prevent ROW_FORMAT=COMPRESSED, because the system tablespace
+# cannot be compressed.
+SET GLOBAL innodb_file_per_table=OFF;
+
+--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
+--error ER_CANT_CREATE_TABLE
+ALTER TABLE bug54679 KEY_BLOCK_SIZE=4;
+--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
+SHOW WARNINGS;
+--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
+--error ER_CANT_CREATE_TABLE
+ALTER TABLE bug54679 ROW_FORMAT=DYNAMIC;
+--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
+SHOW WARNINGS;
+DROP TABLE bug54679;
+--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
+--error ER_CANT_CREATE_TABLE
+CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
+SHOW WARNINGS;
+SET GLOBAL innodb_file_per_table=ON;
+CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+DROP TABLE bug54679;
+
+EVAL SET GLOBAL innodb_file_format=$file_format;
+EVAL SET GLOBAL innodb_file_format_check=$file_format_check;
+EVAL SET GLOBAL innodb_file_per_table=$file_per_table;
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_gis.test b/mysql-test/suite/innodb_plugin/t/innodb_gis.test
new file mode 100644
index 00000000000..ad1d081f29c
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_gis.test
@@ -0,0 +1,10 @@
+--source include/have_innodb_plugin.inc
+SET storage_engine=innodb;
+--source include/gis_generic.inc
+--source include/gis_keys.inc
+
+#
+# Bug #15680 (SPATIAL key in innodb)
+#
+--error ER_TABLE_CANT_HANDLE_SPKEYS
+create table t1 (g geometry not null, spatial gk(g)) engine=innodb;
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_lock_wait_timeout_1-master.opt b/mysql-test/suite/innodb_plugin/t/innodb_lock_wait_timeout_1-master.opt
new file mode 100644
index 00000000000..462f8fbe828
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_lock_wait_timeout_1-master.opt
@@ -0,0 +1 @@
+--innodb_lock_wait_timeout=1
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_lock_wait_timeout_1.test b/mysql-test/suite/innodb_plugin/t/innodb_lock_wait_timeout_1.test
new file mode 100644
index 00000000000..d7272779bdd
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_lock_wait_timeout_1.test
@@ -0,0 +1,264 @@
+--source include/have_innodb_plugin.inc
+
+--echo #
+--echo # Bug #40113: Embedded SELECT inside UPDATE or DELETE can timeout
+--echo # without error
+--echo #
+
+CREATE TABLE t1 (a int, b int, PRIMARY KEY (a,b)) ENGINE=InnoDB;
+
+INSERT INTO t1 (a,b) VALUES (1070109,99);
+
+CREATE TABLE t2 (b int, a int, PRIMARY KEY (b)) ENGINE=InnoDB;
+
+INSERT INTO t2 (b,a) VALUES (7,1070109);
+
+SELECT * FROM t1;
+
+BEGIN;
+
+SELECT b FROM t2 WHERE b=7 FOR UPDATE;
+
+CONNECT (addconroot, localhost, root,,);
+CONNECTION addconroot;
+
+BEGIN;
+
+--error ER_LOCK_WAIT_TIMEOUT
+SELECT b FROM t2 WHERE b=7 FOR UPDATE;
+
+--error ER_LOCK_WAIT_TIMEOUT
+INSERT INTO t1 (a) VALUES ((SELECT a FROM t2 WHERE b=7));
+
+--error ER_LOCK_WAIT_TIMEOUT
+UPDATE t1 SET a='7000000' WHERE a=(SELECT a FROM t2 WHERE b=7);
+
+--error ER_LOCK_WAIT_TIMEOUT
+DELETE FROM t1 WHERE a=(SELECT a FROM t2 WHERE b=7);
+
+SELECT * FROM t1;
+
+CONNECTION default;
+DISCONNECT addconroot;
+
+DROP TABLE t2, t1;
+
+--echo # End of 5.0 tests
+
+--echo #
+--echo # Bug#46539 Various crashes on INSERT IGNORE SELECT + SELECT
+--echo # FOR UPDATE
+--echo #
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+create table t1 (a int primary key auto_increment,
+ b int, index(b)) engine=innodb;
+insert into t1 (b) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+set autocommit=0;
+begin;
+select * from t1 where b=5 for update;
+connect (con1, localhost, root,,);
+connection con1;
+--error ER_LOCK_WAIT_TIMEOUT
+insert ignore into t1 (b) select a as b from t1;
+connection default;
+--echo # Cleanup
+--echo #
+disconnect con1;
+commit;
+set autocommit=default;
+drop table t1;
+
+--echo #
+--echo # Bug #37183 insert ignore into .. select ... hangs
+--echo # after deadlock was encountered
+--echo #
+connect (con1,localhost,root,,);
+create table t1(id int primary key,v int)engine=innodb;
+insert into t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7);
+create table t2 like t1;
+
+--connection con1
+begin;
+update t1 set v=id*2 where id=1;
+
+--connection default
+begin;
+update t1 set v=id*2 where id=2;
+
+--connection con1
+--error 1205
+update t1 set v=id*2 where id=2;
+
+--connection default
+--error 1205
+insert ignore into t2 select * from t1 where id=1;
+rollback;
+
+--connection con1
+rollback;
+
+--connection default
+disconnect con1;
+drop table t1, t2;
+
+
+--echo #
+--echo # Bug#41756 Strange error messages about locks from InnoDB
+--echo #
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+--echo # In the default transaction isolation mode, and/or with
+--echo # innodb_locks_unsafe_for_binlog=OFF, handler::unlock_row()
+--echo # in InnoDB does nothing.
+--echo # Thus in order to reproduce the condition that led to the
+--echo # warning, one needs to relax isolation by either
+--echo # setting a weaker tx_isolation value, or by turning on
+--echo # the unsafe replication switch.
+--echo # For testing purposes, choose to tweak the isolation level,
+--echo # since it's settable at runtime, unlike
+--echo # innodb_locks_unsafe_for_binlog, which is
+--echo # only a command-line switch.
+--echo #
+set @@session.tx_isolation="read-committed";
+
+--echo # Prepare data. We need a table with a unique index,
+--echo # for join_read_key to be used. The other column
+--echo # allows to control what passes WHERE clause filter.
+create table t1 (a int primary key, b int) engine=innodb;
+--echo # Let's make sure t1 has sufficient amount of rows
+--echo # to exclude JT_ALL access method when reading it,
+--echo # i.e. make sure that JT_EQ_REF(a) is always preferred.
+insert into t1 values (1,1), (2,null), (3,1), (4,1),
+ (5,1), (6,1), (7,1), (8,1), (9,1), (10,1),
+ (11,1), (12,1), (13,1), (14,1), (15,1),
+ (16,1), (17,1), (18,1), (19,1), (20,1);
+--echo #
+--echo # Demonstrate that for the SELECT statement
+--echo # used later in the test JT_EQ_REF access method is used.
+--echo #
+--vertical_results
+explain
+select 1 from t1 natural join (select 2 as a, 1 as b union all
+ select 2 as a, 2 as b) as t2 for update;
+--horizontal_results
+--echo #
+--echo # Demonstrate that the reported SELECT statement
+--echo # no longer produces warnings.
+--echo #
+select 1 from t1 natural join (select 2 as a, 1 as b union all
+ select 2 as a, 2 as b) as t2 for update;
+commit;
+--echo #
+--echo # Demonstrate that due to lack of inter-sweep "reset" function,
+--echo # we keep some non-matching records locked, even though we know
+--echo # we could unlock them.
+--echo # To do that, show that if there is only one distinct value
+--echo # for a in t2 (a=2), we will keep record (2,null) in t1 locked.
+--echo # But if we add another value for "a" to t2, say 6,
+--echo # join_read_key cache will be pruned at least once,
+--echo # and thus record (2, null) in t1 will get unlocked.
+--echo #
+begin;
+select 1 from t1 natural join (select 2 as a, 1 as b union all
+ select 2 as a, 2 as b) as t2 for update;
+connect (con1,localhost,root,,);
+--echo #
+--echo # Switching to connection con1
+connection con1;
+--echo # We should be able to delete all records from t1 except (2, null),
+--echo # since they were not locked.
+begin;
+--echo # Delete in series of 3 records so that full scan
+--echo # is not used and we're not blocked on record (2,null)
+delete from t1 where a in (1,3,4);
+delete from t1 where a in (5,6,7);
+delete from t1 where a in (8,9,10);
+delete from t1 where a in (11,12,13);
+delete from t1 where a in (14,15,16);
+delete from t1 where a in (17,18);
+delete from t1 where a in (19,20);
+--echo #
+--echo # Record (2, null) is locked. This is actually unnecessary,
+--echo # because the previous select returned no rows.
+--echo # Just demonstrate the effect.
+--echo #
+--error ER_LOCK_WAIT_TIMEOUT
+delete from t1;
+rollback;
+--echo #
+--echo # Switching to connection default
+connection default;
+--echo #
+--echo # Show that the original contents of t1 is intact:
+select * from t1;
+commit;
+--echo #
+--echo # Have a one more record in t2 to show that
+--echo # if join_read_key cache is purned, the current
+--echo # row under the cursor is unlocked (provided, this row didn't
+--echo # match the partial WHERE clause, of course).
+--echo # Sic: the result of this test dependent on the order of retrieval
+--echo # of records --echo # from the derived table, if !
+--echo # We use DELETE to disable the JOIN CACHE. This DELETE modifies no
+--echo # records. It also should leave no InnoDB row locks.
+--echo #
+begin;
+delete t1.* from t1 natural join (select 2 as a, 2 as b union all
+ select 0 as a, 0 as b) as t2;
+--echo # Demonstrate that nothing was deleted form t1
+select * from t1;
+--echo #
+--echo # Switching to connection con1
+connection con1;
+begin;
+--echo # Since there is another distinct record in the derived table
+--echo # the previous matching record in t1 -- (2,null) -- was unlocked.
+delete from t1;
+--echo # We will need the contents of the table again.
+rollback;
+select * from t1;
+commit;
+--echo #
+--echo # Switching to connection default
+connection default;
+rollback;
+begin;
+--echo #
+--echo # Before this patch, we could wrongly unlock a record
+--echo # that was cached and later used in a join. Demonstrate that
+--echo # this is no longer the case.
+--echo # Sic: this test is also order-dependent (i.e. the
+--echo # the bug would show up only if the first record in the union
+--echo # is retreived and processed first.
+--echo #
+--echo # Verify that JT_EQ_REF is used.
+--vertical_results
+explain
+select 1 from t1 natural join (select 3 as a, 2 as b union all
+ select 3 as a, 1 as b) as t2 for update;
+--horizontal_results
+--echo # Lock the record.
+select 1 from t1 natural join (select 3 as a, 2 as b union all
+ select 3 as a, 1 as b) as t2 for update;
+--echo # Switching to connection con1
+connection con1;
+--echo #
+--echo # We should not be able to delete record (3,1) from t1,
+--echo # (previously it was possible).
+--echo #
+--error ER_LOCK_WAIT_TIMEOUT
+delete from t1 where a=3;
+--echo # Switching to connection default
+connection default;
+commit;
+
+disconnect con1;
+set @@session.tx_isolation=default;
+drop table t1;
+
+--echo #
+--echo # End of 5.1 tests
+--echo #
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_multi_update.test b/mysql-test/suite/innodb_plugin/t/innodb_multi_update.test
new file mode 100644
index 00000000000..890889301e6
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_multi_update.test
@@ -0,0 +1,29 @@
+-- source include/have_innodb_plugin.inc
+
+#
+# Test multi update with different join methods
+#
+
+CREATE TABLE bug38999_1 (a int not null primary key, b int not null, key (b)) engine=innodb;
+CREATE TABLE bug38999_2 (a int not null primary key, b int not null, key (b)) engine=innodb;
+INSERT INTO bug38999_1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10),(11,11),(12,12);
+INSERT INTO bug38999_2 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+
+# Full join, without key
+update bug38999_1,bug38999_2 set bug38999_1.a=bug38999_1.a+100;
+select * from bug38999_1;
+
+# unique key
+update bug38999_1,bug38999_2 set bug38999_1.a=bug38999_1.a+100 where bug38999_1.a=101;
+select * from bug38999_1;
+
+# ref key
+update bug38999_1,bug38999_2 set bug38999_1.b=bug38999_1.b+10 where bug38999_1.b=2;
+select * from bug38999_1;
+
+# Range key (in bug38999_1)
+update bug38999_1,bug38999_2 set bug38999_1.b=bug38999_1.b+2,bug38999_2.b=bug38999_1.b+10 where bug38999_1.b between 3 and 5 and bug38999_1.a=bug38999_2.a+100;
+select * from bug38999_1;
+select * from bug38999_2;
+
+drop table bug38999_1,bug38999_2;
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_mysql-master.opt b/mysql-test/suite/innodb_plugin/t/innodb_mysql-master.opt
new file mode 100644
index 00000000000..205c733455d
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_mysql-master.opt
@@ -0,0 +1 @@
+--innodb-lock-wait-timeout=2
diff --git a/mysql-test/t/innodb_mysql.test b/mysql-test/suite/innodb_plugin/t/innodb_mysql.test
index ada4323dcee..3f6d9d96bb8 100644
--- a/mysql-test/t/innodb_mysql.test
+++ b/mysql-test/suite/innodb_plugin/t/innodb_mysql.test
@@ -5,9 +5,7 @@
# main testing code t/innodb_mysql.test -> include/mix1.inc
#
-# Slow test, don't run during staging part
--- source include/not_staging.inc
--- source include/have_innodb.inc
+-- source include/have_innodb_plugin.inc
let $engine_type= InnoDB;
let $other_engine_type= MEMORY;
# InnoDB does support FOREIGN KEYFOREIGN KEYs
@@ -561,6 +559,23 @@ drop table t1,t2;
--echo #
+--echo # Bug #39653: find_shortest_key in sql_select.cc does not consider
+--echo # clustered primary keys
+--echo #
+
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c INT, d INT, e INT, f INT,
+ KEY (b,c)) ENGINE=INNODB;
+
+INSERT INTO t1 VALUES (1,1,1,1,1,1), (2,2,2,2,2,2), (3,3,3,3,3,3),
+ (4,4,4,4,4,4), (5,5,5,5,5,5), (6,6,6,6,6,6),
+ (7,7,7,7,7,7), (8,8,8,8,8,8), (9,9,9,9,9,9),
+ (11,11,11,11,11,11);
+
+--query_vertical EXPLAIN SELECT COUNT(*) FROM t1
+
+DROP TABLE t1;
+
+--echo #
--echo # Bug #49838: DROP INDEX and ADD UNIQUE INDEX for same index may
--echo # corrupt definition at engine
--echo #
@@ -574,36 +589,6 @@ ALTER TABLE t1 DROP INDEX k, ADD UNIQUE INDEX k (a,b);
DROP TABLE t1;
---echo #
---echo # Bug #53334: wrong result for outer join with impossible ON condition
---echo # (see the same test case for MyISAM in join.test)
---echo #
-
-create table t1 (id int primary key);
-create table t2 (id int);
-
-insert into t1 values (75);
-insert into t1 values (79);
-insert into t1 values (78);
-insert into t1 values (77);
-replace into t1 values (76);
-replace into t1 values (76);
-insert into t1 values (104);
-insert into t1 values (103);
-insert into t1 values (102);
-insert into t1 values (101);
-insert into t1 values (105);
-insert into t1 values (106);
-insert into t1 values (107);
-
-insert into t2 values (107),(75),(1000);
-
-select t1.id,t2.id from t2 left join t1 on t1.id>=74 and t1.id<=0
- where t2.id=75 and t1.id is null;
-explain select t1.id,t2.id from t2 left join t1 on t1.id>=74 and t1.id<=0
- where t2.id=75 and t1.id is null;
-
-drop table t1,t2;
--echo #
--echo # Bug #47453: InnoDB incorrectly changes TIMESTAMP columns when
@@ -633,4 +618,18 @@ SELECT SECOND(c)-@bug47453 FROM t1 JOIN t2 ON d=a;
DROP TABLE t1, t2;
+--echo #
+--echo # Bug#38999 valgrind warnings for update statement in function compare_record()
+--echo #
+
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t1 values (1),(2),(3),(4),(5);
+INSERT INTO t2 values (1);
+
+SELECT * FROM t1 WHERE a = 2;
+UPDATE t1,t2 SET t1.a = t1.a + 100 WHERE t1.a = 1;
+
+DROP TABLE t1,t2;
+
--echo End of 5.1 tests
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_mysql_rbk-master.opt b/mysql-test/suite/innodb_plugin/t/innodb_mysql_rbk-master.opt
new file mode 100644
index 00000000000..0e400f9c36b
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_mysql_rbk-master.opt
@@ -0,0 +1 @@
+--innodb_lock_wait_timeout=1 --innodb_rollback_on_timeout=1
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_mysql_rbk.test b/mysql-test/suite/innodb_plugin/t/innodb_mysql_rbk.test
new file mode 100644
index 00000000000..d8d56adc448
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_mysql_rbk.test
@@ -0,0 +1,35 @@
+-- source include/have_innodb_plugin.inc
+
+#
+# Bug #41453: Assertion `m_status == DA_ERROR' failed in
+# Diagnostics_area::sql_errno
+#
+
+CREATE TABLE t1(a INT, b INT NOT NULL, PRIMARY KEY (a)) ENGINE=innodb
+DEFAULT CHARSET=latin1;
+INSERT INTO t1 VALUES (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7);
+CONNECT (con1,localhost,root,,);
+CONNECT (con2,localhost,root,,);
+
+CONNECTION con1;
+START TRANSACTION;
+SELECT * FROM t1 WHERE b=3 LIMIT 1 FOR UPDATE;
+CONNECTION con2;
+START TRANSACTION;
+--error ER_LOCK_WAIT_TIMEOUT
+UPDATE t1 SET b=b+12 WHERE a > 2 ORDER BY a;
+ROLLBACK;
+
+CONNECTION con1;
+START TRANSACTION;
+SELECT * FROM t1 WHERE b=3 LIMIT 1 FOR UPDATE;
+CONNECTION con2;
+START TRANSACTION;
+--error ER_LOCK_WAIT_TIMEOUT
+UPDATE t1 SET b=10 WHERE a > 1 ORDER BY a;
+SELECT * FROM t1 WHERE b = 10;
+
+CONNECTION default;
+DISCONNECT con1;
+DISCONNECT con2;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_notembedded.test b/mysql-test/suite/innodb_plugin/t/innodb_notembedded.test
new file mode 100644
index 00000000000..2afe9079ba8
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_notembedded.test
@@ -0,0 +1,50 @@
+-- source include/not_embedded.inc
+-- source include/have_innodb_plugin.inc
+
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+SET @old_log_bin_trust_function_creators= @@global.log_bin_trust_function_creators;
+
+connect (a,localhost,root,,);
+connect (b,localhost,root,,);
+
+
+#
+# BUG#11238 - in prelocking mode SELECT .. FOR UPDATE is changed to
+# non-blocking SELECT
+#
+SET GLOBAL log_bin_trust_function_creators = 1;
+create table t1 (col1 integer primary key, col2 integer) engine=innodb;
+insert t1 values (1,100);
+delimiter |;
+create function f1 () returns integer begin
+declare var1 int;
+select col2 into var1 from t1 where col1=1 for update;
+return var1;
+end|
+delimiter ;|
+start transaction;
+select f1();
+connection b;
+send update t1 set col2=0 where col1=1;
+connection default;
+select * from t1;
+connection a;
+rollback;
+connection b;
+reap;
+rollback;
+
+# Cleanup
+connection a;
+disconnect a;
+--source include/wait_until_disconnected.inc
+connection b;
+disconnect b;
+--source include/wait_until_disconnected.inc
+connection default;
+drop table t1;
+drop function f1;
+SET @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators;
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_timeout_rollback-master.opt b/mysql-test/suite/innodb_plugin/t/innodb_timeout_rollback-master.opt
new file mode 100644
index 00000000000..50921bb4df0
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_timeout_rollback-master.opt
@@ -0,0 +1 @@
+--innodb_lock_wait_timeout=2 --innodb_rollback_on_timeout
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_timeout_rollback.test b/mysql-test/suite/innodb_plugin/t/innodb_timeout_rollback.test
new file mode 100644
index 00000000000..cc7ab9ee0bd
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_timeout_rollback.test
@@ -0,0 +1,5 @@
+-- source include/have_innodb_plugin.inc
+
+--source include/innodb_rollback_on_timeout.inc
+
+--echo End of 5.0 tests
diff --git a/mysql-test/suite/manual/r/rpl_replication_delay.result b/mysql-test/suite/manual/r/rpl_replication_delay.result
index a8fa6ce8265..73dd77cc647 100644
--- a/mysql-test/suite/manual/r/rpl_replication_delay.result
+++ b/mysql-test/suite/manual/r/rpl_replication_delay.result
@@ -4,45 +4,8 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
-show slave status /* Second_behind reports 0 */;;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port 9306
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos 106
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos 106
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
+# Second_behind reports 0
Seconds_Behind_Master 0
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
-Last_IO_Error
-Last_SQL_Errno 0
-Last_SQL_Error
drop table if exists t1;
Warnings:
Note 1051 Unknown table 't1'
@@ -50,87 +13,13 @@ create table t1 (f1 int);
flush logs /* contaminate rli->last_master_timestamp */;
lock table t1 write;
insert into t1 values (1);
-show slave status /* bug emulated: reports slave threads starting time about 3*3 not 3 secs */;;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port 9306
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos 367
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos 279
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
+# bug emulated: reports slave threads starting time about 3*3 not 3 secs
Seconds_Behind_Master 9
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
-Last_IO_Error
-Last_SQL_Errno 0
-Last_SQL_Error
unlock tables;
flush logs /* this time rli->last_master_timestamp is not affected */;
lock table t1 write;
insert into t1 values (2);
-show slave status /* reports the correct diff with master query time about 3+3 secs */;;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port 9306
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos 455
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos 367
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
+# reports the correct diff with master query time about 3+3 secs
Seconds_Behind_Master 7
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
-Last_IO_Error
-Last_SQL_Errno 0
-Last_SQL_Error
unlock tables;
drop table t1;
diff --git a/mysql-test/suite/manual/t/rpl_replication_delay.test b/mysql-test/suite/manual/t/rpl_replication_delay.test
index 8230698c8f9..fc1db9bfe18 100644
--- a/mysql-test/suite/manual/t/rpl_replication_delay.test
+++ b/mysql-test/suite/manual/t/rpl_replication_delay.test
@@ -10,9 +10,9 @@ source include/master-slave.inc;
connection master;
#connection slave;
sync_slave_with_master;
---replace_result $DEFAULT_MASTER_PORT DEFAULT_MASTER_PORT
---replace_column 1 # 8 # 9 # 23 #
---query_vertical show slave status /* Second_behind reports 0 */;
+--echo # Second_behind reports 0
+let $status_items= Seconds_Behind_Master;
+source include/show_slave_status.inc;
sleep 3;
### bug emulation
@@ -35,9 +35,8 @@ insert into t1 values (1);
sleep 3;
connection slave;
---replace_result $DEFAULT_MASTER_PORT DEFAULT_MASTER_PORT
---replace_column 1 # 8 # 9 # 23 #
---query_vertical show slave status /* bug emulated: reports slave threads starting time about 3*3 not 3 secs */;
+--echo # bug emulated: reports slave threads starting time about 3*3 not 3 secs
+source include/show_slave_status.inc;
unlock tables;
connection master;
@@ -55,9 +54,8 @@ insert into t1 values (2);
sleep 3;
connection slave;
---replace_result $DEFAULT_MASTER_PORT DEFAULT_MASTER_PORT
---replace_column 1 # 8 # 9 # 23 #
---query_vertical show slave status /* reports the correct diff with master query time about 3+3 secs */;
+--echo # reports the correct diff with master query time about 3+3 secs
+source include/show_slave_status.inc;
unlock tables;
connection master;
diff --git a/mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result b/mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result
index 97300e7131b..fb0324bc89e 100644
--- a/mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result
+++ b/mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result
@@ -91,49 +91,7 @@ f1 f2 f3 f4
27 27 27 next
29 29 29 second
30 30 30 next
-
-* Show Slave Status *
-
-show slave status;;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-
+Checking that both slave threads are running.
***** Testing Altering table def scenario *****
@@ -454,7 +412,9 @@ f1 f2 f3 f4
update t31 set f5=555555555555555 where f3=6;
update t31 set f2=2 where f3=2;
update t31 set f1=NULL where f3=1;
-update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3;
+update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
+Warnings:
+Warning 1048 Column 'f3' cannot be null
** Delete from Master **
@@ -463,50 +423,12 @@ delete from t2;
delete from t3;
delete from t4;
delete from t31;
+select * from t31;
+f1 f2 f3 f4
** Check slave status **
-select * from t31;
-f1 f2 f3 f4
-show slave status;;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
****************************************
* columns in master at middle of table *
@@ -539,50 +461,13 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
(3,@b1,DEFAULT,'QA',DEFAULT);
********************************************
-*** Expect slave to fail with Error 1523 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t10 ***
DROP TABLE t10;
@@ -614,50 +499,13 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
(3,@b1,DEFAULT,'QA',DEFAULT);
********************************************
-*** Expect slave to fail with Error 1523 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t11 ***
DROP TABLE t11;
@@ -768,45 +616,7 @@ c1 c3 hex(c4) c5 c6
************
* Bug30415 *
************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1091
-Last_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1091
-Last_SQL_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
+Last_SQL_Error = Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
STOP SLAVE;
RESET SLAVE;
@@ -854,45 +664,7 @@ c1 hex(c4) c5 c6 c7 c2
*** Expect slave to fail with Error 1054 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1054
-Last_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1054
-Last_SQL_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
+Last_SQL_Error = Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
STOP SLAVE;
RESET SLAVE;
@@ -940,45 +712,7 @@ c1 hex(c4) c5 c6 c7
*** BUG 30434 ***
*****************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1072
-Last_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1072
-Last_SQL_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
+Last_SQL_Error = Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
STOP SLAVE;
RESET SLAVE;
@@ -1230,49 +964,7 @@ f1 f2 f3 f4
27 27 27 next
29 29 29 second
30 30 30 next
-
-* Show Slave Status *
-
-show slave status;;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-
+Checking that both slave threads are running.
***** Testing Altering table def scenario *****
@@ -1593,7 +1285,9 @@ f1 f2 f3 f4
update t31 set f5=555555555555555 where f3=6;
update t31 set f2=2 where f3=2;
update t31 set f1=NULL where f3=1;
-update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3;
+update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
+Warnings:
+Warning 1048 Column 'f3' cannot be null
** Delete from Master **
@@ -1602,50 +1296,12 @@ delete from t2;
delete from t3;
delete from t4;
delete from t31;
+select * from t31;
+f1 f2 f3 f4
** Check slave status **
-select * from t31;
-f1 f2 f3 f4
-show slave status;;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
****************************************
* columns in master at middle of table *
@@ -1678,50 +1334,13 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
(3,@b1,DEFAULT,'QA',DEFAULT);
********************************************
-*** Expect slave to fail with Error 1523 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t10 ***
DROP TABLE t10;
@@ -1753,50 +1372,13 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
(3,@b1,DEFAULT,'QA',DEFAULT);
********************************************
-*** Expect slave to fail with Error 1523 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t11 ***
DROP TABLE t11;
@@ -1907,45 +1489,7 @@ c1 c3 hex(c4) c5 c6
************
* Bug30415 *
************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1091
-Last_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1091
-Last_SQL_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
+Last_SQL_Error = Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
STOP SLAVE;
RESET SLAVE;
@@ -1993,45 +1537,7 @@ c1 hex(c4) c5 c6 c7 c2
*** Expect slave to fail with Error 1054 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1054
-Last_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1054
-Last_SQL_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
+Last_SQL_Error = Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
STOP SLAVE;
RESET SLAVE;
@@ -2079,45 +1585,7 @@ c1 hex(c4) c5 c6 c7
*** BUG 30434 ***
*****************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1072
-Last_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1072
-Last_SQL_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
+Last_SQL_Error = Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
STOP SLAVE;
RESET SLAVE;
diff --git a/mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result b/mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result
index f9c077f38da..203a59b4613 100644
--- a/mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result
+++ b/mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result
@@ -26,21 +26,21 @@ from mysql.ndb_apply_status;
# since insert is done with transactional engine, expect a BEGIN
# at <start_pos>
-show binlog events from <start_pos> limit 1;
+show binlog events from <binlog_start> limit 1;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 <start_pos> Query 1 # BEGIN
+master-bin.000001 # Query # # BEGIN
# Now the insert, one step after
-show binlog events from <start_pos> limit 1,1;
+show binlog events from <binlog_start> limit 1,1;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; insert into t1 values (1,2)
+master-bin.000001 # Query # # use `test`; insert into t1 values (1,2)
# and the COMMIT should be at <end_pos>
-show binlog events from <start_pos> limit 2,1;
+show binlog events from <binlog_start> limit 2,1;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Xid 1 <end_pos> COMMIT /* XID */
+master-bin.000001 # Xid # # COMMIT /* XID */
begin;
insert into t1 values (2,3);
@@ -51,18 +51,18 @@ select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos
from mysql.ndb_apply_status;
@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos
<log_name> <start_pos> <end_pos>
-show binlog events from <start_pos> limit 1;
+show binlog events from <binlog_start> limit 1;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 <start_pos> Query 1 # BEGIN
+master-bin.000001 # Query # # BEGIN
-show binlog events from <start_pos> limit 1,2;
+show binlog events from <binlog_start> limit 1,2;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; insert into t1 values (2,3)
master-bin.000001 # Query # # use `test`; insert into t2 values (3,4)
-show binlog events from <start_pos> limit 3,1;
+show binlog events from <binlog_start> limit 3,1;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Xid 1 <end_pos> COMMIT /* XID */
+master-bin.000001 # Xid # # COMMIT /* XID */
DROP TABLE test.t1, test.t2;
SHOW TABLES;
diff --git a/mysql-test/suite/parts/r/partition_debug_sync_innodb.result b/mysql-test/suite/parts/r/partition_debug_sync_innodb.result
new file mode 100644
index 00000000000..41c3d1af174
--- /dev/null
+++ b/mysql-test/suite/parts/r/partition_debug_sync_innodb.result
@@ -0,0 +1,61 @@
+#
+# Bug#50561: ALTER PARTITIONS does not have adequate lock, breaks with
+# concurrent I_S query
+create table t1 (a int)
+engine = innodb
+partition by range (a)
+(partition p0 values less than MAXVALUE);
+insert into t1 values (1), (11), (21), (33);
+SELECT * FROM t1;
+a
+1
+11
+21
+33
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+t1#P#p0.ibd
+t1.frm
+t1.par
+SET DEBUG_SYNC='before_open_in_get_all_tables SIGNAL parked WAIT_FOR open';
+SET DEBUG_SYNC='partition_open_error SIGNAL alter WAIT_FOR finish';
+SELECT * FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test';
+SET DEBUG_SYNC = 'now WAIT_FOR parked';
+# When waiting for the name lock in get_all_tables in sql_show.cc
+# this will not be concurrent any more, thus the TIMEOUT
+SET DEBUG_SYNC = 'before_rename_partitions SIGNAL open WAIT_FOR alter TIMEOUT 1';
+# Needs to be executed twice, since first is this 'SET DEBUG_SYNC ...'
+SET DEBUG_SYNC = 'before_close_thread_tables SIGNAL finish EXECUTE 2';
+ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
+(PARTITION p0 VALUES LESS THAN (10),
+PARTITION p10 VALUES LESS THAN MAXVALUE);
+Warnings:
+Warning 1639 debug sync point wait timed out
+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
+NULL test t1 p0 NULL 1 NULL RANGE NULL a NULL 10 1 16384 16384 NULL 0 0 NULL NULL NULL NULL default NULL
+NULL test t1 p10 NULL 2 NULL RANGE NULL a NULL MAXVALUE 3 5461 16384 NULL 0 0 NULL NULL NULL NULL default NULL
+t1#P#p0.ibd
+t1#P#p10.ibd
+t1.frm
+t1.par
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p10 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a
+1
+11
+21
+33
+drop table t1;
+SET DEBUG_SYNC = 'RESET';
diff --git a/mysql-test/suite/parts/r/rpl_partition.result b/mysql-test/suite/parts/r/rpl_partition.result
index c2537815631..9c5ac34b1b0 100644
--- a/mysql-test/suite/parts/r/rpl_partition.result
+++ b/mysql-test/suite/parts/r/rpl_partition.result
@@ -138,45 +138,7 @@ SUBPARTITIONS 2
PARTITION pa9 VALUES LESS THAN (90) ENGINE = InnoDB,
PARTITION pa10 VALUES LESS THAN (100) ENGINE = InnoDB,
PARTITION pa11 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
-show slave status;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_MYPORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
SELECT count(*) "Slave norm" FROM t1;
Slave norm 500
SELECT count(*) "Slave bykey" FROM t2;
diff --git a/mysql-test/suite/parts/t/partition_debug_sync_innodb-master.opt b/mysql-test/suite/parts/t/partition_debug_sync_innodb-master.opt
new file mode 100644
index 00000000000..9854fda301d
--- /dev/null
+++ b/mysql-test/suite/parts/t/partition_debug_sync_innodb-master.opt
@@ -0,0 +1 @@
+--innodb_file_per_table=1
diff --git a/mysql-test/suite/parts/t/partition_debug_sync_innodb.test b/mysql-test/suite/parts/t/partition_debug_sync_innodb.test
new file mode 100644
index 00000000000..79ef3d537bf
--- /dev/null
+++ b/mysql-test/suite/parts/t/partition_debug_sync_innodb.test
@@ -0,0 +1,44 @@
+--source include/have_innodb.inc
+--source include/have_partition.inc
+--source include/have_debug_sync.inc
+
+let $MYSQLD_DATADIR=`SELECT @@datadir`;
+
+--echo #
+--echo # Bug#50561: ALTER PARTITIONS does not have adequate lock, breaks with
+--echo # concurrent I_S query
+create table t1 (a int)
+engine = innodb
+partition by range (a)
+(partition p0 values less than MAXVALUE);
+insert into t1 values (1), (11), (21), (33);
+SELECT * FROM t1;
+SHOW CREATE TABLE t1;
+--list_files $MYSQLD_DATADIR/test
+
+SET DEBUG_SYNC='before_open_in_get_all_tables SIGNAL parked WAIT_FOR open';
+SET DEBUG_SYNC='partition_open_error SIGNAL alter WAIT_FOR finish';
+send
+SELECT * FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test';
+
+connect (con1, localhost, root,,);
+SET DEBUG_SYNC = 'now WAIT_FOR parked';
+--echo # When waiting for the name lock in get_all_tables in sql_show.cc
+--echo # this will not be concurrent any more, thus the TIMEOUT
+SET DEBUG_SYNC = 'before_rename_partitions SIGNAL open WAIT_FOR alter TIMEOUT 1';
+--echo # Needs to be executed twice, since first is this 'SET DEBUG_SYNC ...'
+SET DEBUG_SYNC = 'before_close_thread_tables SIGNAL finish EXECUTE 2';
+--error 0,ER_TABLE_EXISTS_ERROR
+ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
+(PARTITION p0 VALUES LESS THAN (10),
+ PARTITION p10 VALUES LESS THAN MAXVALUE);
+
+disconnect con1;
+connection default;
+--reap
+--list_files $MYSQLD_DATADIR/test
+SHOW CREATE TABLE t1;
+SELECT * FROM t1;
+drop table t1;
+--list_files $MYSQLD_DATADIR/test
+SET DEBUG_SYNC = 'RESET';
diff --git a/mysql-test/suite/parts/t/rpl_partition.test b/mysql-test/suite/parts/t/rpl_partition.test
index f7d1c14cf29..4b4915b89ec 100644
--- a/mysql-test/suite/parts/t/rpl_partition.test
+++ b/mysql-test/suite/parts/t/rpl_partition.test
@@ -145,9 +145,7 @@ SELECT count(*) as "Master byrange" FROM t3;
--sync_slave_with_master
connection slave;
show create table t3;
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
-show slave status;
+--source include/check_slave_is_running.inc
SELECT count(*) "Slave norm" FROM t1;
SELECT count(*) "Slave bykey" FROM t2;
SELECT count(*) "Slave byrange" FROM t3;
diff --git a/mysql-test/suite/rpl/include/rpl_mixed_ddl.inc b/mysql-test/suite/rpl/include/rpl_mixed_ddl.inc
index 70e17cef9fe..79825016448 100644
--- a/mysql-test/suite/rpl/include/rpl_mixed_ddl.inc
+++ b/mysql-test/suite/rpl/include/rpl_mixed_ddl.inc
@@ -66,9 +66,7 @@ ALTER TABLE t2 DROP COLUMN d;
--echo
--echo
--echo ******************** SHOW BINLOG EVENTS ********************
---replace_column 2 # 5 #
---replace_regex /Server ver: .+/Server ver: #/ /table_id: [0-9]+/table_id: #/
-show binlog events from 1;
+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
--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
diff --git a/mysql-test/suite/rpl/include/rpl_mixed_dml.inc b/mysql-test/suite/rpl/include/rpl_mixed_dml.inc
index e9adb805c99..d953397c0cb 100644
--- a/mysql-test/suite/rpl/include/rpl_mixed_dml.inc
+++ b/mysql-test/suite/rpl/include/rpl_mixed_dml.inc
@@ -326,10 +326,7 @@ DROP VIEW v2;
--echo
--echo
--echo ******************** SHOW BINLOG EVENTS ********************
---replace_column 2 # 5 #
---replace_regex /Server ver: .+/Server ver: #/ /table_id: [0-9]+/table_id: #/ /COMMIT.+xid=[0-9]+.+/#/ /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
-show binlog events from 1;
+--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
--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
diff --git a/mysql-test/suite/rpl/r/rpl_000015.result b/mysql-test/suite/rpl/r/rpl_000015.result
deleted file mode 100644
index 03b96d5870b..00000000000
--- a/mysql-test/suite/rpl/r/rpl_000015.result
+++ /dev/null
@@ -1,141 +0,0 @@
-reset master;
-show master status;
-File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
-reset slave;
-SHOW SLAVE STATUS;
-change master to master_host='127.0.0.1';
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User test
-Master_Port 3306
-Connect_Retry 7
-Master_Log_File
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File
-Slave_IO_Running No
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-change master to master_host='127.0.0.1',master_user='root',
-master_password='',master_port=MASTER_PORT;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 7
-Master_Log_File
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File
-Slave_IO_Running No
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-start slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 7
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-drop table if exists t1;
-create table t1 (n int, PRIMARY KEY(n));
-insert into t1 values (10),(45),(90);
-SELECT * FROM t1 ORDER BY n;
-n
-10
-45
-90
-SELECT * FROM t1 ORDER BY n;
-n
-10
-45
-90
-drop table t1;
diff --git a/mysql-test/suite/rpl/r/rpl_binlog_grant.result b/mysql-test/suite/rpl/r/rpl_binlog_grant.result
index 4a789f361c6..7a2e3183d5b 100644
--- a/mysql-test/suite/rpl/r/rpl_binlog_grant.result
+++ b/mysql-test/suite/rpl/r/rpl_binlog_grant.result
@@ -17,16 +17,6 @@ show grants for x@y;
Grants for x@y
GRANT USAGE ON *.* TO 'x'@'y'
GRANT SELECT ON `d1`.`t` TO 'x'@'y'
-show binlog events;
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 4 Format_desc 1 106 Server ver: VERSION, Binlog ver: 4
-master-bin.000001 106 Query 1 193 drop database if exists d1
-master-bin.000001 193 Query 1 272 create database d1
-master-bin.000001 272 Query 1 370 use `d1`; create table t (s1 int) engine=innodb
-master-bin.000001 370 Query 1 436 BEGIN
-master-bin.000001 436 Query 1 521 use `d1`; insert into t values (1)
-master-bin.000001 521 Xid 1 548 COMMIT /* XID */
-master-bin.000001 548 Query 1 633 use `d1`; grant select on t to x@y
start transaction;
insert into t values (2);
revoke select on t from x@y;
@@ -38,19 +28,5 @@ s1
show grants for x@y;
Grants for x@y
GRANT USAGE ON *.* TO 'x'@'y'
-show binlog events;
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 4 Format_desc 1 106 Server ver: VERSION, Binlog ver: 4
-master-bin.000001 106 Query 1 193 drop database if exists d1
-master-bin.000001 193 Query 1 272 create database d1
-master-bin.000001 272 Query 1 370 use `d1`; create table t (s1 int) engine=innodb
-master-bin.000001 370 Query 1 436 BEGIN
-master-bin.000001 436 Query 1 521 use `d1`; insert into t values (1)
-master-bin.000001 521 Xid 1 548 COMMIT /* XID */
-master-bin.000001 548 Query 1 633 use `d1`; grant select on t to x@y
-master-bin.000001 633 Query 1 699 BEGIN
-master-bin.000001 699 Query 1 784 use `d1`; insert into t values (2)
-master-bin.000001 784 Xid 1 811 COMMIT /* XID */
-master-bin.000001 811 Query 1 899 use `d1`; revoke select on t from x@y
drop user x@y;
drop database d1;
diff --git a/mysql-test/suite/rpl/r/rpl_bug33931.result b/mysql-test/suite/rpl/r/rpl_bug33931.result
index a17941f6ba9..292922a1afd 100644
--- a/mysql-test/suite/rpl/r/rpl_bug33931.result
+++ b/mysql-test/suite/rpl/r/rpl_bug33931.result
@@ -4,43 +4,5 @@ stop slave;
reset slave;
SET GLOBAL debug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init";
start slave;
-show slave status;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File
-Read_Master_Log_Pos 4
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File
-Slave_IO_Running No
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno #
-Last_Error Failed during slave thread initialization
-Skip_Counter 0
-Exec_Master_Log_Pos 0
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
-Last_IO_Error
-Last_SQL_Errno #
-Last_SQL_Error Failed during slave thread initialization
+Last_SQL_Error = Failed during slave thread initialization
SET GLOBAL debug="";
diff --git a/mysql-test/suite/rpl/r/rpl_change_master.result b/mysql-test/suite/rpl/r/rpl_change_master.result
index c06c1201e3d..883feb42b3f 100644
--- a/mysql-test/suite/rpl/r/rpl_change_master.result
+++ b/mysql-test/suite/rpl/r/rpl_change_master.result
@@ -10,86 +10,8 @@ n
stop slave sql_thread;
insert into t1 values(1);
insert into t1 values(2);
-stop slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running No
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+include/stop_slave.inc
change master to master_user='root';
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running No
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
start slave;
select * from t1;
n
diff --git a/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result b/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result
index 6c8d35619e5..1485389204b 100644
--- a/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result
@@ -50,45 +50,7 @@ a
SELECT * FROM t3;
a
3
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
*** Test lock wait timeout ***
include/stop_slave.inc
@@ -112,52 +74,14 @@ SELECT * FROM t3;
a
3
3
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
*** Test lock wait timeout and purged relay logs ***
SET @my_max_relay_log_size= @@global.max_relay_log_size;
SET global max_relay_log_size=0;
include/stop_slave.inc
DELETE FROM t2;
-CHANGE MASTER TO MASTER_LOG_POS=440;
+CHANGE MASTER TO MASTER_LOG_POS=MASTER_POS_BEGIN;
BEGIN;
SELECT * FROM t1 FOR UPDATE;
a
@@ -179,45 +103,7 @@ a
3
3
3
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
*** Clean up ***
DROP TABLE t1,t2,t3;
diff --git a/mysql-test/suite/rpl/r/rpl_do_grant.result b/mysql-test/suite/rpl/r/rpl_do_grant.result
index cb339f0a212..0d51f771a90 100644
--- a/mysql-test/suite/rpl/r/rpl_do_grant.result
+++ b/mysql-test/suite/rpl/r/rpl_do_grant.result
@@ -89,6 +89,7 @@ show grants for rpl_do_grant2@localhost;
ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost'
show grants for rpl_do_grant2@localhost;
ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost'
+call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
DROP DATABASE IF EXISTS bug42217_db;
CREATE DATABASE bug42217_db;
GRANT CREATE ROUTINE ON bug42217_db.* TO 'create_rout_db'@'localhost'
@@ -165,9 +166,14 @@ USE bug42217_db;
DROP FUNCTION upgrade_del_func;
DROP FUNCTION upgrade_alter_func;
DROP DATABASE bug42217_db;
-call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
stop slave;
DROP USER 'create_rout_db'@'localhost';
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
######## BUG#49119 #######
### i) test case from the 'how to repeat section'
stop slave;
diff --git a/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result b/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result
index 4c6323a61db..aa1a573d052 100644
--- a/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result
+++ b/mysql-test/suite/rpl/r/rpl_dual_pos_advance.result
@@ -6,9 +6,9 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
reset master;
change master to master_host="127.0.0.1",master_port=SLAVE_PORT,master_user="root";
-start slave;
+include/start_slave.inc
create table t1 (n int);
-stop slave;
+include/stop_slave.inc
create table t2 (n int);
show tables;
Tables_in_test
@@ -22,20 +22,20 @@ insert into t3 values(2);
insert into t3 values(3);
commit;
insert into t3 values(4);
-start slave until master_log_file="slave-bin.000001",master_log_pos=195;
+start slave until master_log_file="MASTER_LOG_FILE",master_log_pos=MASTER_LOG_POS;
Warnings:
Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart
show tables;
Tables_in_test
t1
t2
-start slave until master_log_file="slave-bin.000001",master_log_pos=438;
+start slave until master_log_file="MASTER_LOG_FILE",master_log_pos=MASTER_LOG_POS;
Warnings:
Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart
select * from t3;
n
1
-start slave until master_log_file="slave-bin.000001",master_log_pos=663;
+start slave until master_log_file="MASTER_LOG_FILE",master_log_pos=MASTER_LOG_POS;
Warnings:
Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart
select * from t3;
@@ -43,7 +43,7 @@ n
1
2
3
-start slave;
+include/start_slave.inc
create table t4 (n int);
create table t5 (n int);
create table t6 (n int);
@@ -55,6 +55,6 @@ t3
t4
t5
t6
-stop slave;
+include/stop_slave.inc
reset slave;
drop table t1,t2,t3,t4,t5,t6;
diff --git a/mysql-test/suite/rpl/r/rpl_empty_master_crash.result b/mysql-test/suite/rpl/r/rpl_empty_master_crash.result
index f0d84f85069..f71411c68dd 100644
--- a/mysql-test/suite/rpl/r/rpl_empty_master_crash.result
+++ b/mysql-test/suite/rpl/r/rpl_empty_master_crash.result
@@ -4,7 +4,6 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
-SHOW SLAVE STATUS;
load table t1 from master;
ERROR 08S01: Error connecting to master: Master is not configured
load table t1 from master;
diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result
index 63154383e8c..48fd0366c26 100644
--- a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result
@@ -54,45 +54,7 @@ a b c
3 4 QA TESTING
*** Start Slave ***
START SLAVE;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
STOP SLAVE;
RESET SLAVE;
SELECT * FROM t2 ORDER BY a;
@@ -119,49 +81,12 @@ set @b1 = 'b1';
set @b1 = concat(@b1,@b1);
INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TESTING');
********************************************
-*** Expect slave to fail with Error 1522 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t3 ***
DROP TABLE t3;
*** Create t4 on slave ***
@@ -181,49 +106,12 @@ START SLAVE;
INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'),
(30000.22,4,'QA TESTING');
********************************************
-*** Expect slave to fail with Error 1522 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t4 ***
DROP TABLE t4;
*** Create t5 on slave ***
@@ -243,49 +131,12 @@ START SLAVE;
INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098),
(2,'JOE',300.01,0,'b2b2',1.0000009);
********************************************
-*** Expect slave to fail with Error 1522 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t5 ***
DROP TABLE t5;
*** Create t6 on slave ***
@@ -304,47 +155,9 @@ START SLAVE;
INSERT INTO t6 () VALUES(1,'Kyle',200.23,1),
(2,'JOE',300.01,0);
********************************************
-*** Expect slave to fail with Error 1522 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
+Last_SQL_Error = Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
*** Drop t6 ***
DROP TABLE t6;
@@ -440,49 +253,12 @@ set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1);
INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
********************************************
-*** Expect slave to fail with Error 1522 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t10 ***
DROP TABLE t10;
*** Create t11 on slave ***
@@ -501,49 +277,12 @@ set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1);
INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
********************************************
-*** Expect slave to fail with Error 1522 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t11 ***
DROP TABLE t11;
*** Create t12 on slave ***
@@ -753,47 +492,10 @@ ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5;
********************************************
*** Expect slave to fail with Error 1060 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1060
-Last_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1060
-Last_SQL_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 1;
+include/start_slave.inc
*** Try to insert in master ****
INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2);
SELECT * FROM t15 ORDER BY c1;
@@ -891,48 +593,11 @@ START SLAVE;
*** Master Data Insert ***
INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX');
********************************************
-*** Expect slave to fail with Error 1522 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
** DROP table t17 ***
DROP TABLE t17;
diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result
index d80ac5eea2c..80b18ee4bd7 100644
--- a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result
@@ -54,45 +54,7 @@ a b c
3 4 QA TESTING
*** Start Slave ***
START SLAVE;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
STOP SLAVE;
RESET SLAVE;
SELECT * FROM t2 ORDER BY a;
@@ -119,49 +81,12 @@ set @b1 = 'b1';
set @b1 = concat(@b1,@b1);
INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TESTING');
********************************************
-*** Expect slave to fail with Error 1522 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t3 ***
DROP TABLE t3;
*** Create t4 on slave ***
@@ -181,49 +106,12 @@ START SLAVE;
INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'),
(30000.22,4,'QA TESTING');
********************************************
-*** Expect slave to fail with Error 1522 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t4 ***
DROP TABLE t4;
*** Create t5 on slave ***
@@ -243,49 +131,12 @@ START SLAVE;
INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098),
(2,'JOE',300.01,0,'b2b2',1.0000009);
********************************************
-*** Expect slave to fail with Error 1522 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t5 ***
DROP TABLE t5;
*** Create t6 on slave ***
@@ -304,47 +155,9 @@ START SLAVE;
INSERT INTO t6 () VALUES(1,'Kyle',200.23,1),
(2,'JOE',300.01,0);
********************************************
-*** Expect slave to fail with Error 1522 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
+Last_SQL_Error = Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
*** Drop t6 ***
DROP TABLE t6;
@@ -440,49 +253,12 @@ set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1);
INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
********************************************
-*** Expect slave to fail with Error 1522 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t10 ***
DROP TABLE t10;
*** Create t11 on slave ***
@@ -501,49 +277,12 @@ set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1);
INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
********************************************
-*** Expect slave to fail with Error 1522 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t11 ***
DROP TABLE t11;
*** Create t12 on slave ***
@@ -753,47 +492,10 @@ ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5;
********************************************
*** Expect slave to fail with Error 1060 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1060
-Last_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1060
-Last_SQL_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 1;
+include/start_slave.inc
*** Try to insert in master ****
INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2);
SELECT * FROM t15 ORDER BY c1;
@@ -891,48 +593,11 @@ START SLAVE;
*** Master Data Insert ***
INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX');
********************************************
-*** Expect slave to fail with Error 1522 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
** DROP table t17 ***
DROP TABLE t17;
diff --git a/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result b/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result
index ad67f96db71..e8535a0bc5e 100644
--- a/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result
@@ -91,49 +91,7 @@ f1 f2 f3 f4
27 27 27 next
29 29 29 second
30 30 30 next
-
-* Show Slave Status *
-
-show slave status;;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-
+Checking that both slave threads are running.
***** Testing Altering table def scenario *****
@@ -465,50 +423,12 @@ delete from t2;
delete from t3;
delete from t4;
delete from t31;
+select * from t31;
+f1 f2 f3 f4
** Check slave status **
-select * from t31;
-f1 f2 f3 f4
-show slave status;;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
****************************************
* columns in master at middle of table *
@@ -541,50 +461,13 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
(3,@b1,DEFAULT,'QA',DEFAULT);
********************************************
-*** Expect slave to fail with Error 1523 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t10 ***
DROP TABLE t10;
@@ -616,50 +499,13 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
(3,@b1,DEFAULT,'QA',DEFAULT);
********************************************
-*** Expect slave to fail with Error 1523 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t11 ***
DROP TABLE t11;
@@ -770,45 +616,7 @@ c1 c3 hex(c4) c5 c6
************
* Bug30415 *
************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1091
-Last_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1091
-Last_SQL_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
+Last_SQL_Error = Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
STOP SLAVE;
RESET SLAVE;
@@ -856,45 +664,7 @@ c1 hex(c4) c5 c6 c7 c2
*** Expect slave to fail with Error 1054 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1054
-Last_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1054
-Last_SQL_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
+Last_SQL_Error = Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
STOP SLAVE;
RESET SLAVE;
@@ -942,45 +712,7 @@ c1 hex(c4) c5 c6 c7
*** BUG 30434 ***
*****************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1072
-Last_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1072
-Last_SQL_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
+Last_SQL_Error = Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
STOP SLAVE;
RESET SLAVE;
@@ -1232,49 +964,7 @@ f1 f2 f3 f4
27 27 27 next
29 29 29 second
30 30 30 next
-
-* Show Slave Status *
-
-show slave status;;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-
+Checking that both slave threads are running.
***** Testing Altering table def scenario *****
@@ -1606,50 +1296,12 @@ delete from t2;
delete from t3;
delete from t4;
delete from t31;
+select * from t31;
+f1 f2 f3 f4
** Check slave status **
-select * from t31;
-f1 f2 f3 f4
-show slave status;;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
****************************************
* columns in master at middle of table *
@@ -1682,50 +1334,13 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
(3,@b1,DEFAULT,'QA',DEFAULT);
********************************************
-*** Expect slave to fail with Error 1523 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t10 ***
DROP TABLE t10;
@@ -1757,50 +1372,13 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
(3,@b1,DEFAULT,'QA',DEFAULT);
********************************************
-*** Expect slave to fail with Error 1523 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t11 ***
DROP TABLE t11;
@@ -1911,45 +1489,7 @@ c1 c3 hex(c4) c5 c6
************
* Bug30415 *
************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1091
-Last_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1091
-Last_SQL_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
+Last_SQL_Error = Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
STOP SLAVE;
RESET SLAVE;
@@ -1997,45 +1537,7 @@ c1 hex(c4) c5 c6 c7 c2
*** Expect slave to fail with Error 1054 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1054
-Last_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1054
-Last_SQL_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
+Last_SQL_Error = Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
STOP SLAVE;
RESET SLAVE;
@@ -2083,45 +1585,7 @@ c1 hex(c4) c5 c6 c7
*** BUG 30434 ***
*****************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1072
-Last_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1072
-Last_SQL_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
+Last_SQL_Error = Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
STOP SLAVE;
RESET SLAVE;
@@ -2373,49 +1837,7 @@ f1 f2 f3 f4
27 27 27 next
29 29 29 second
30 30 30 next
-
-* Show Slave Status *
-
-show slave status;;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-
+Checking that both slave threads are running.
***** Testing Altering table def scenario *****
@@ -2747,50 +2169,12 @@ delete from t2;
delete from t3;
delete from t4;
delete from t31;
+select * from t31;
+f1 f2 f3 f4
** Check slave status **
-select * from t31;
-f1 f2 f3 f4
-show slave status;;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
****************************************
* columns in master at middle of table *
@@ -2823,50 +2207,13 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
(3,@b1,DEFAULT,'QA',DEFAULT);
********************************************
-*** Expect slave to fail with Error 1523 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t10 ***
DROP TABLE t10;
@@ -2898,50 +2245,13 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
(3,@b1,DEFAULT,'QA',DEFAULT);
********************************************
-*** Expect slave to fail with Error 1523 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t11 ***
DROP TABLE t11;
@@ -3052,45 +2362,7 @@ c1 c3 hex(c4) c5 c6
************
* Bug30415 *
************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1091
-Last_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1091
-Last_SQL_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
+Last_SQL_Error = Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
STOP SLAVE;
RESET SLAVE;
@@ -3138,45 +2410,7 @@ c1 hex(c4) c5 c6 c7 c2
*** Expect slave to fail with Error 1054 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1054
-Last_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1054
-Last_SQL_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
+Last_SQL_Error = Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
STOP SLAVE;
RESET SLAVE;
@@ -3224,45 +2458,7 @@ c1 hex(c4) c5 c6 c7
*** BUG 30434 ***
*****************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1072
-Last_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1072
-Last_SQL_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
+Last_SQL_Error = Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
STOP SLAVE;
RESET SLAVE;
diff --git a/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result b/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result
index 8859a8e24e3..f360a8847eb 100644
--- a/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result
@@ -91,49 +91,7 @@ f1 f2 f3 f4
27 27 27 next
29 29 29 second
30 30 30 next
-
-* Show Slave Status *
-
-show slave status;;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-
+Checking that both slave threads are running.
***** Testing Altering table def scenario *****
@@ -465,50 +423,12 @@ delete from t2;
delete from t3;
delete from t4;
delete from t31;
+select * from t31;
+f1 f2 f3 f4
** Check slave status **
-select * from t31;
-f1 f2 f3 f4
-show slave status;;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
****************************************
* columns in master at middle of table *
@@ -541,50 +461,13 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
(3,@b1,DEFAULT,'QA',DEFAULT);
********************************************
-*** Expect slave to fail with Error 1523 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t10 ***
DROP TABLE t10;
@@ -616,50 +499,13 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
(3,@b1,DEFAULT,'QA',DEFAULT);
********************************************
-*** Expect slave to fail with Error 1523 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t11 ***
DROP TABLE t11;
@@ -770,45 +616,7 @@ c1 c3 hex(c4) c5 c6
************
* Bug30415 *
************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1091
-Last_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1091
-Last_SQL_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
+Last_SQL_Error = Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
STOP SLAVE;
RESET SLAVE;
@@ -856,45 +664,7 @@ c1 hex(c4) c5 c6 c7 c2
*** Expect slave to fail with Error 1054 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1054
-Last_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1054
-Last_SQL_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
+Last_SQL_Error = Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
STOP SLAVE;
RESET SLAVE;
@@ -942,45 +712,7 @@ c1 hex(c4) c5 c6 c7
*** BUG 30434 ***
*****************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1072
-Last_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1072
-Last_SQL_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
+Last_SQL_Error = Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
STOP SLAVE;
RESET SLAVE;
@@ -1232,49 +964,7 @@ f1 f2 f3 f4
27 27 27 next
29 29 29 second
30 30 30 next
-
-* Show Slave Status *
-
-show slave status;;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-
+Checking that both slave threads are running.
***** Testing Altering table def scenario *****
@@ -1606,50 +1296,12 @@ delete from t2;
delete from t3;
delete from t4;
delete from t31;
+select * from t31;
+f1 f2 f3 f4
** Check slave status **
-select * from t31;
-f1 f2 f3 f4
-show slave status;;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
****************************************
* columns in master at middle of table *
@@ -1682,50 +1334,13 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
(3,@b1,DEFAULT,'QA',DEFAULT);
********************************************
-*** Expect slave to fail with Error 1523 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t10 ***
DROP TABLE t10;
@@ -1757,50 +1372,13 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
(3,@b1,DEFAULT,'QA',DEFAULT);
********************************************
-*** Expect slave to fail with Error 1523 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t11 ***
DROP TABLE t11;
@@ -1911,45 +1489,7 @@ c1 c3 hex(c4) c5 c6
************
* Bug30415 *
************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1091
-Last_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1091
-Last_SQL_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
+Last_SQL_Error = Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
STOP SLAVE;
RESET SLAVE;
@@ -1997,45 +1537,7 @@ c1 hex(c4) c5 c6 c7 c2
*** Expect slave to fail with Error 1054 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1054
-Last_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1054
-Last_SQL_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
+Last_SQL_Error = Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
STOP SLAVE;
RESET SLAVE;
@@ -2083,45 +1585,7 @@ c1 hex(c4) c5 c6 c7
*** BUG 30434 ***
*****************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1072
-Last_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1072
-Last_SQL_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
+Last_SQL_Error = Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
STOP SLAVE;
RESET SLAVE;
@@ -2373,49 +1837,7 @@ f1 f2 f3 f4
27 27 27 next
29 29 29 second
30 30 30 next
-
-* Show Slave Status *
-
-show slave status;;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-
+Checking that both slave threads are running.
***** Testing Altering table def scenario *****
@@ -2747,50 +2169,12 @@ delete from t2;
delete from t3;
delete from t4;
delete from t31;
+select * from t31;
+f1 f2 f3 f4
** Check slave status **
-select * from t31;
-f1 f2 f3 f4
-show slave status;;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
****************************************
* columns in master at middle of table *
@@ -2823,50 +2207,13 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
(3,@b1,DEFAULT,'QA',DEFAULT);
********************************************
-*** Expect slave to fail with Error 1523 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t10 ***
DROP TABLE t10;
@@ -2898,50 +2245,13 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
(3,@b1,DEFAULT,'QA',DEFAULT);
********************************************
-*** Expect slave to fail with Error 1523 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t11 ***
DROP TABLE t11;
@@ -3052,45 +2362,7 @@ c1 c3 hex(c4) c5 c6
************
* Bug30415 *
************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1091
-Last_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1091
-Last_SQL_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
+Last_SQL_Error = Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
STOP SLAVE;
RESET SLAVE;
@@ -3138,45 +2410,7 @@ c1 hex(c4) c5 c6 c7 c2
*** Expect slave to fail with Error 1054 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1054
-Last_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1054
-Last_SQL_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
+Last_SQL_Error = Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
STOP SLAVE;
RESET SLAVE;
@@ -3224,45 +2458,7 @@ c1 hex(c4) c5 c6 c7
*** BUG 30434 ***
*****************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1072
-Last_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1072
-Last_SQL_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
+Last_SQL_Error = Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
STOP SLAVE;
RESET SLAVE;
diff --git a/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result b/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result
index 7eddaabc636..5f1f72a9a3a 100644
--- a/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result
+++ b/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result
@@ -49,82 +49,82 @@ UPDATE t7 LEFT JOIN (t8, t4, t1) ON (t7.id=t8.id and t7.id=t4.id and t7.id=t1.id
UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1'
-set global sql_slave_skip_counter=1;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
include/start_slave.inc
UPDATE t1 LEFT JOIN (t4, t7) ON (t1.id=t4.id and t1.id=t7.id) SET a=0 where t1.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t7) ON (t1.id=t4.id and t1.id=t7.id) SET a=0 where t1.id=1'
-set global sql_slave_skip_counter=1;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
include/start_slave.inc
UPDATE t1 LEFT JOIN (t2, t4, t7) ON (t1.id=t2.id and t1.id=t4.id and t1.id=t7.id) SET a=0, b=0 where t1.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t2, t4, t7) ON (t1.id=t2.id and t1.id=t4.id and t1.id=t7.id) SET a=0, b=0 where t1.id=1'
-set global sql_slave_skip_counter=1;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
include/start_slave.inc
UPDATE t1 LEFT JOIN (t2, t3, t7) ON (t1.id=t2.id and t1.id=t3.id and t1.id=t7.id) SET a=0, b=0, c=0 where t1.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t2, t3, t7) ON (t1.id=t2.id and t1.id=t3.id and t1.id=t7.id) SET a=0, b=0, c=0 where t1.id=1'
-set global sql_slave_skip_counter=1;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
include/start_slave.inc
UPDATE t1 LEFT JOIN t7 ON (t1.id=t7.id) SET a=0, g=0 where t1.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t7 ON (t1.id=t7.id) SET a=0, g=0 where t1.id=1'
-set global sql_slave_skip_counter=1;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
include/start_slave.inc
UPDATE t7 LEFT JOIN t1 ON (t1.id=t7.id) SET a=0, g=0 where t7.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN t1 ON (t1.id=t7.id) SET a=0, g=0 where t7.id=1'
-set global sql_slave_skip_counter=1;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
include/start_slave.inc
UPDATE t1 LEFT JOIN (t4, t5, t7) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t7.id) SET a=0, g=0 where t1.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t5, t7) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t7.id) SET a=0, g=0 where t1.id=1'
-set global sql_slave_skip_counter=1;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
include/start_slave.inc
UPDATE t1 LEFT JOIN (t4, t7, t8) ON (t1.id=t4.id and t1.id=t7.id and t1.id=t8.id) SET a=0, g=0 where t1.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t7, t8) ON (t1.id=t4.id and t1.id=t7.id and t1.id=t8.id) SET a=0, g=0 where t1.id=1'
-set global sql_slave_skip_counter=1;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
include/start_slave.inc
UPDATE t1 LEFT JOIN (t7, t8, t9) ON (t1.id=t7.id and t1.id=t8.id and t1.id=t9.id) SET a=0, g=0, h=0, i=0 where t1.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t7, t8, t9) ON (t1.id=t7.id and t1.id=t8.id and t1.id=t9.id) SET a=0, g=0, h=0, i=0 where t1.id=1'
-set global sql_slave_skip_counter=1;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
include/start_slave.inc
UPDATE t7 LEFT JOIN (t1, t2, t3) ON (t7.id=t1.id and t7.id=t2.id and t7.id=t3.id) SET g=0, a=0, b=0, c=0 where t7.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t1, t2, t3) ON (t7.id=t1.id and t7.id=t2.id and t7.id=t3.id) SET g=0, a=0, b=0, c=0 where t7.id=1'
-set global sql_slave_skip_counter=1;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
include/start_slave.inc
UPDATE t7 LEFT JOIN (t4, t5, t3) ON (t7.id=t4.id and t7.id=t5.id and t7.id=t3.id) SET g=0, c=0 where t7.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t4, t5, t3) ON (t7.id=t4.id and t7.id=t5.id and t7.id=t3.id) SET g=0, c=0 where t7.id=1'
-set global sql_slave_skip_counter=1;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
include/start_slave.inc
UPDATE t7 LEFT JOIN (t8, t9, t3) ON (t7.id=t8.id and t7.id=t9.id and t7.id=t3.id) SET g=0, h=0, i=0, c=0 where t7.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t8, t9, t3) ON (t7.id=t8.id and t7.id=t9.id and t7.id=t3.id) SET g=0, h=0, i=0, c=0 where t7.id=1'
-set global sql_slave_skip_counter=1;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
include/start_slave.inc
UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0, d=0 where t1.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0, d=0 where t1.id=1'
-set global sql_slave_skip_counter=1;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
include/start_slave.inc
UPDATE t1 LEFT JOIN (t4, t5, t6) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t6.id) SET a=0, d=0, e=0, f=0 where t1.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN (t4, t5, t6) ON (t1.id=t4.id and t1.id=t5.id and t1.id=t6.id) SET a=0, d=0, e=0, f=0 where t1.id=1'
-set global sql_slave_skip_counter=1;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
include/start_slave.inc
UPDATE t4 LEFT JOIN (t1, t5, t6) ON (t4.id=t1.id and t4.id=t5.id and t4.id=t6.id) SET a=0, e=0, f=0 where t4.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t4 LEFT JOIN (t1, t5, t6) ON (t4.id=t1.id and t4.id=t5.id and t4.id=t6.id) SET a=0, e=0, f=0 where t4.id=1'
-set global sql_slave_skip_counter=1;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
include/start_slave.inc
UPDATE t7 LEFT JOIN (t1, t4, t2) ON (t7.id=t1.id and t7.id=t4.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1;
--source include/wait_for_slave_sql_error_and_skip.inc
Last_SQL_Error = Error 'Table 'test.t7' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t7 LEFT JOIN (t1, t4, t2) ON (t7.id=t1.id and t7.id=t4.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1'
-set global sql_slave_skip_counter=1;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
include/start_slave.inc
[on slave]
show tables like 't%';
diff --git a/mysql-test/suite/rpl/r/rpl_flushlog_loop.result b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result
index 600ac44fc86..3bb96b669d7 100644
--- a/mysql-test/suite/rpl/r/rpl_flushlog_loop.result
+++ b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result
@@ -19,43 +19,9 @@ stop slave;
change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=SLAVE_PORT;
include/start_slave.inc
+CREATE TABLE t1 (a INT KEY) ENGINE= MyISAM;
+INSERT INTO t1 VALUE(1);
FLUSH LOGS;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port SLAVE_PORT
-Connect_Retry 60
-Master_Log_File slave-bin.000001
-Read_Master_Log_Pos POSITION
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File slave-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos POSITION
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert #
-Last_IO_Errno #
-Last_IO_Error
-Last_SQL_Errno 0
-Last_SQL_Error
+INSERT INTO t1 VALUE(2);
+Checking that both slave threads are running.
+Relay_Log_File relay-log.000003
diff --git a/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result b/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result
index a34c536feb8..432bcfcc94d 100644
--- a/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result
+++ b/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result
@@ -14,7 +14,6 @@ slave is going to hang in get_master_version_and_clock
slave is unblocked
SET DEBUG_SYNC='now SIGNAL signal.get_unix_timestamp';
Check network error happened here
-NETWORK ERROR
set @@global.debug = "-d,'debug_lock.before_get_UNIX_TIMESTAMP'";
stop slave;
SET @@global.debug= "+d,'debug_lock.before_get_SERVER_ID'";
@@ -23,7 +22,6 @@ slave is going to hang in get_master_version_and_clock
slave is unblocked
SET DEBUG_SYNC='now SIGNAL signal.get_server_id';
Check network error happened here
-NETWORK ERROR
set @@global.debug = "-d,'debug_lock.before_get_SERVER_ID'";
set global debug= '';
reset master;
@@ -31,6 +29,5 @@ include/stop_slave.inc
change master to master_port=SLAVE_PORT;
start slave;
*** must be having the replicate-same-server-id IO thread error ***
-Slave_IO_Errno= 1593
-Slave_IO_Error= Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it).
+Last_IO_Error = Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it).
SET DEBUG_SYNC= 'RESET';
diff --git a/mysql-test/suite/rpl/r/rpl_grant.result b/mysql-test/suite/rpl/r/rpl_grant.result
index 1bed6101e3c..285d52b7678 100644
--- a/mysql-test/suite/rpl/r/rpl_grant.result
+++ b/mysql-test/suite/rpl/r/rpl_grant.result
@@ -41,42 +41,3 @@ user host
SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%';
COUNT(*)
0
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
diff --git a/mysql-test/suite/rpl/r/rpl_incident.result b/mysql-test/suite/rpl/r/rpl_incident.result
index c3baabbdbc3..6c226aaf2f7 100644
--- a/mysql-test/suite/rpl/r/rpl_incident.result
+++ b/mysql-test/suite/rpl/r/rpl_incident.result
@@ -19,51 +19,13 @@ a
2
3
4
+Last_SQL_Error = The incident LOST_EVENTS occured on the master. Message: <none>
**** On Slave ****
SELECT * FROM t1;
a
1
2
3
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File #
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1590
-Last_Error The incident LOST_EVENTS occured on the master. Message: <none>
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
-Last_IO_Error
-Last_SQL_Errno 1590
-Last_SQL_Error The incident LOST_EVENTS occured on the master. Message: <none>
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SELECT * FROM t1;
@@ -72,43 +34,5 @@ a
2
3
4
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File #
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000002
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
-Last_IO_Error
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result b/mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result
index fbb1e2355c3..549842198e8 100644
--- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result
+++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result
@@ -136,25 +136,24 @@ ALTER TABLE t2 DROP COLUMN d;
******************** SHOW BINLOG EVENTS ********************
-show binlog events from 1;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Format_desc 1 # Server ver: #
-master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS test_rpl
-master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS test_rpl_1
-master-bin.000001 # Query 1 # CREATE DATABASE test_rpl_1 CHARACTER SET utf8 COLLATE utf8_general_ci
-master-bin.000001 # Query 1 # ALTER DATABASE test_rpl_1 CHARACTER SET latin1 COLLATE latin1_general_ci
-master-bin.000001 # Query 1 # DROP DATABASE test_rpl_1
-master-bin.000001 # Query 1 # CREATE DATABASE test_rpl CHARACTER SET utf8 COLLATE utf8_general_ci
-master-bin.000001 # Query 1 # ALTER DATABASE test_rpl CHARACTER SET latin1 COLLATE latin1_swedish_ci
-master-bin.000001 # Query 1 # use `test_rpl`; CREATE TABLE t0 (a int auto_increment not null, c int not null, PRIMARY KEY(a), KEY index2 (c)) ENGINE=innodb
-master-bin.000001 # Query 1 # use `test_rpl`; ALTER TABLE t0 DROP INDEX index2
-master-bin.000001 # Query 1 # use `test_rpl`; ALTER TABLE t0 ADD COLUMN b char(254)
-master-bin.000001 # Query 1 # use `test_rpl`; ALTER TABLE t0 ADD INDEX index1 (b)
-master-bin.000001 # Query 1 # use `test_rpl`; ALTER TABLE t0 DROP COLUMN c
-master-bin.000001 # Query 1 # use `test_rpl`; RENAME TABLE t0 TO t1
-master-bin.000001 # Query 1 # use `test_rpl`; CREATE TABLE t2 LIKE t1
-master-bin.000001 # Query 1 # use `test_rpl`; ALTER TABLE t2 ADD COLUMN d datetime
-master-bin.000001 # Query 1 # use `test_rpl`; CREATE INDEX index2 on t2 (d)
-master-bin.000001 # Query 1 # use `test_rpl`; CREATE INDEX index3 on t2 (a, d)
-master-bin.000001 # Query 1 # use `test_rpl`; ALTER TABLE t2 DROP COLUMN d
+master-bin.000001 # Query # # DROP DATABASE IF EXISTS test_rpl
+master-bin.000001 # Query # # DROP DATABASE IF EXISTS test_rpl_1
+master-bin.000001 # Query # # CREATE DATABASE test_rpl_1 CHARACTER SET utf8 COLLATE utf8_general_ci
+master-bin.000001 # Query # # ALTER DATABASE test_rpl_1 CHARACTER SET latin1 COLLATE latin1_general_ci
+master-bin.000001 # Query # # DROP DATABASE test_rpl_1
+master-bin.000001 # Query # # CREATE DATABASE test_rpl CHARACTER SET utf8 COLLATE utf8_general_ci
+master-bin.000001 # Query # # ALTER DATABASE test_rpl CHARACTER SET latin1 COLLATE latin1_swedish_ci
+master-bin.000001 # Query # # use `test_rpl`; CREATE TABLE t0 (a int auto_increment not null, c int not null, PRIMARY KEY(a), KEY index2 (c)) ENGINE=innodb
+master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t0 DROP INDEX index2
+master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t0 ADD COLUMN b char(254)
+master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t0 ADD INDEX index1 (b)
+master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t0 DROP COLUMN c
+master-bin.000001 # Query # # use `test_rpl`; RENAME TABLE t0 TO t1
+master-bin.000001 # Query # # use `test_rpl`; CREATE TABLE t2 LIKE t1
+master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t2 ADD COLUMN d datetime
+master-bin.000001 # Query # # use `test_rpl`; CREATE INDEX index2 on t2 (d)
+master-bin.000001 # Query # # use `test_rpl`; CREATE INDEX index3 on t2 (a, d)
+master-bin.000001 # Query # # use `test_rpl`; ALTER TABLE t2 DROP COLUMN d
drop database test_rpl;
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 58b9d445037..26f2545dd72 100644
--- a/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
+++ b/mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result
@@ -830,278 +830,277 @@ DELETE FROM t2;
******************** SHOW BINLOG EVENTS ********************
-show binlog events from 1;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Format_desc 1 # Server ver: #
-master-bin.000001 # Query 1 # CREATE DATABASE test_rpl
-master-bin.000001 # Query 1 # use `test_rpl`; CREATE TABLE t1 (a int auto_increment not null, b char(254), PRIMARY KEY(a)) ENGINE=innodb
-master-bin.000001 # Query 1 # use `test_rpl`; CREATE TABLE t2 (a int auto_increment not null, b char(254), PRIMARY KEY(a)) ENGINE=innodb
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(2, 't1, text 2')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t2 VALUES(1, 't2, text 1')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 WHERE a = 1
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Table_map 1 # table_id: # (test_rpl.t2)
-master-bin.000001 # Delete_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Table_map 1 # table_id: # (test_rpl.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t2 SELECT * FROM t1
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t2 VALUES (1, 't1, text 1') ON DUPLICATE KEY UPDATE b = 't2, text 1'
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 WHERE a = 2
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2 WHERE a = 2
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Begin_load_query 1 # ;file_id=#;block_len=#
-master-bin.000001 # Execute_load_query 1 # use `test_rpl`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/std_data/rpl_mixed.dat' INTO TABLE `t1` FIELDS TERMINATED BY '|' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, `b`) ;file_id=#
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(2, 't1, text 2')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(3, 't1, text 3')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; REPLACE INTO t1 VALUES(1, 't1, text 11')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Table_map 1 # table_id: # (test_rpl.t1)
-master-bin.000001 # Update_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; REPLACE INTO t1 SET a=3, b='t1, text 33'
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 WHERE a = 2
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 'CCC')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(2, 'DDD')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t2 VALUES(1, 'DDD')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t2 VALUES(2, 'CCC')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t2 VALUES(1, 't2, text 1')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; TRUNCATE t1
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t2 VALUES(1, 't2, text 1')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; UPDATE t1 SET b = 't1, text 1 updated' WHERE a = 1
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; UPDATE t1, t2 SET t1.b = 'test', t2.b = 'test'
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES (1, 'start')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES (3, 'before savepoint s1')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES (5, 'before savepoint s2')
-master-bin.000001 # Query 1 # SAVEPOINT s2
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES (6, 'after savepoint s2')
-master-bin.000001 # Table_map 1 # table_id: # (test_rpl.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 WHERE a = 7
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # use `test_rpl`; CREATE USER 'user_test_rpl'@'localhost' IDENTIFIED BY PASSWORD '*1111111111111111111111111111111111111111'
-master-bin.000001 # Query 1 # use `test_rpl`; GRANT SELECT ON *.* TO 'user_test_rpl'@'localhost'
-master-bin.000001 # Query 1 # use `test_rpl`; REVOKE SELECT ON *.* FROM 'user_test_rpl'@'localhost'
-master-bin.000001 # Query 1 # use `test_rpl`; SET PASSWORD FOR 'user_test_rpl'@'localhost'='*0000000000000000000000000000000000000000'
-master-bin.000001 # Query 1 # use `test_rpl`; RENAME USER 'user_test_rpl'@'localhost' TO 'user_test_rpl_2'@'localhost'
-master-bin.000001 # Query 1 # use `test_rpl`; DROP USER 'user_test_rpl_2'@'localhost'
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(100, 'test')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # use `test_rpl`; ANALYZE TABLE t1
-master-bin.000001 # Query 1 # use `test_rpl`; OPTIMIZE TABLE t1
-master-bin.000001 # Query 1 # use `test_rpl`; REPAIR TABLE t1
-master-bin.000001 # Query 1 # use `test_rpl`; CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
+master-bin.000001 # Query # # CREATE DATABASE test_rpl
+master-bin.000001 # Query # # use `test_rpl`; CREATE TABLE t1 (a int auto_increment not null, b char(254), PRIMARY KEY(a)) ENGINE=innodb
+master-bin.000001 # Query # # use `test_rpl`; CREATE TABLE t2 (a int auto_increment not null, b char(254), PRIMARY KEY(a)) ENGINE=innodb
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(2, 't1, text 2')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t2 VALUES(1, 't2, text 1')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 WHERE a = 1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test_rpl.t2)
+master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test_rpl.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t2 SELECT * FROM t1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t2 VALUES (1, 't1, text 1') ON DUPLICATE KEY UPDATE b = 't2, text 1'
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 WHERE a = 2
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2 WHERE a = 2
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
+master-bin.000001 # Execute_load_query # # use `test_rpl`; LOAD DATA INFILE 'MYSQLTEST_VARDIR/std_data/rpl_mixed.dat' INTO TABLE `t1` FIELDS TERMINATED BY '|' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, `b`) ;file_id=#
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(2, 't1, text 2')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(3, 't1, text 3')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; REPLACE INTO t1 VALUES(1, 't1, text 11')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test_rpl.t1)
+master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; REPLACE INTO t1 SET a=3, b='t1, text 33'
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 WHERE a = 2
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 'CCC')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(2, 'DDD')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t2 VALUES(1, 'DDD')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t2 VALUES(2, 'CCC')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t2 VALUES(1, 't2, text 1')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; TRUNCATE t1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 't1, text 1')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t2 VALUES(1, 't2, text 1')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; UPDATE t1 SET b = 't1, text 1 updated' WHERE a = 1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; UPDATE t1, t2 SET t1.b = 'test', t2.b = 'test'
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES (1, 'start')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES (3, 'before savepoint s1')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+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 # Table_map # # table_id: # (test_rpl.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 WHERE a = 7
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # use `test_rpl`; CREATE USER 'user_test_rpl'@'localhost' IDENTIFIED BY PASSWORD '*1111111111111111111111111111111111111111'
+master-bin.000001 # Query # # use `test_rpl`; GRANT SELECT ON *.* TO 'user_test_rpl'@'localhost'
+master-bin.000001 # Query # # use `test_rpl`; REVOKE SELECT ON *.* FROM 'user_test_rpl'@'localhost'
+master-bin.000001 # Query # # use `test_rpl`; SET PASSWORD FOR 'user_test_rpl'@'localhost'='*0000000000000000000000000000000000000000'
+master-bin.000001 # Query # # use `test_rpl`; RENAME USER 'user_test_rpl'@'localhost' TO 'user_test_rpl_2'@'localhost'
+master-bin.000001 # Query # # use `test_rpl`; DROP USER 'user_test_rpl_2'@'localhost'
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(100, 'test')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # use `test_rpl`; ANALYZE TABLE t1
+master-bin.000001 # Query # # use `test_rpl`; OPTIMIZE TABLE t1
+master-bin.000001 # Query # # use `test_rpl`; REPAIR TABLE t1
+master-bin.000001 # Query # # use `test_rpl`; CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
BEGIN
UPDATE t1 SET b = 'test' WHERE a = 201;
END
-master-bin.000001 # Query 1 # use `test_rpl`; CREATE DEFINER=`root`@`localhost` PROCEDURE `p2`()
+master-bin.000001 # Query # # use `test_rpl`; CREATE DEFINER=`root`@`localhost` PROCEDURE `p2`()
BEGIN
UPDATE t1 SET b = UUID() WHERE a = 202;
END
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(201, 'test 201')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; UPDATE t1 SET b = 'test' WHERE a = 201
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(202, 'test 202')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Table_map 1 # table_id: # (test_rpl.t1)
-master-bin.000001 # Update_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1 WHERE a = 202
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # use `test_rpl`; ALTER PROCEDURE p1 COMMENT 'p1'
-master-bin.000001 # Query 1 # use `test_rpl`; DROP PROCEDURE p1
-master-bin.000001 # Query 1 # use `test_rpl`; DROP PROCEDURE p2
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # use `test_rpl`; CREATE DEFINER=`root`@`localhost` TRIGGER tr1 BEFORE INSERT ON t1
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(201, 'test 201')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; UPDATE t1 SET b = 'test' WHERE a = 201
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(202, 'test 202')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test_rpl.t1)
+master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1 WHERE a = 202
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # use `test_rpl`; ALTER PROCEDURE p1 COMMENT 'p1'
+master-bin.000001 # Query # # use `test_rpl`; DROP PROCEDURE p1
+master-bin.000001 # Query # # use `test_rpl`; DROP PROCEDURE p2
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # use `test_rpl`; CREATE DEFINER=`root`@`localhost` TRIGGER tr1 BEFORE INSERT ON t1
FOR EACH ROW BEGIN
INSERT INTO t2 SET a = NEW.a, b = NEW.b;
END
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Table_map 1 # table_id: # (test_rpl.t1)
-master-bin.000001 # Table_map 1 # table_id: # (test_rpl.t2)
-master-bin.000001 # Write_rows 1 # table_id: #
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # use `test_rpl`; DROP TRIGGER tr1
-master-bin.000001 # Query 1 # use `test_rpl`; GRANT EVENT ON *.* TO 'root'@'localhost'
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 'test1')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # use `test_rpl`; CREATE DEFINER=`root`@`localhost` EVENT e1 ON SCHEDULE EVERY '1' SECOND COMMENT 'e_second_comment' DO DELETE FROM t1
-master-bin.000001 # Query 1 # use `test_rpl`; ALTER EVENT e1 RENAME TO e2
-master-bin.000001 # Query 1 # use `test_rpl`; DROP EVENT e2
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(1, 'test1')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; INSERT INTO t1 VALUES(2, 'test2')
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # use `test_rpl`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS SELECT * FROM t1 WHERE a = 1
-master-bin.000001 # Query 1 # 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 1 # use `test_rpl`; ALTER ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS SELECT * FROM t1 WHERE a = 2
-master-bin.000001 # Query 1 # use `test_rpl`; DROP VIEW v1
-master-bin.000001 # Query 1 # use `test_rpl`; DROP VIEW v2
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
-master-bin.000001 # Xid 1 # #
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2
-master-bin.000001 # Xid 1 # #
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test_rpl.t1)
+master-bin.000001 # Table_map # # table_id: # (test_rpl.t2)
+master-bin.000001 # Write_rows # # table_id: #
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # use `test_rpl`; DROP TRIGGER tr1
+master-bin.000001 # Query # # use `test_rpl`; GRANT EVENT ON *.* TO 'root'@'localhost'
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 'test1')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # use `test_rpl`; CREATE DEFINER=`root`@`localhost` EVENT e1 ON SCHEDULE EVERY '1' SECOND COMMENT 'e_second_comment' DO DELETE FROM t1
+master-bin.000001 # Query # # use `test_rpl`; ALTER EVENT e1 RENAME TO e2
+master-bin.000001 # Query # # use `test_rpl`; DROP EVENT e2
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(1, 'test1')
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; INSERT INTO t1 VALUES(2, 'test2')
+master-bin.000001 # Xid # # COMMIT /* XID */
+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 # 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`; ALTER ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS SELECT * FROM t1 WHERE a = 2
+master-bin.000001 # Query # # use `test_rpl`; DROP VIEW v1
+master-bin.000001 # Query # # use `test_rpl`; DROP VIEW v2
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t1
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test_rpl`; DELETE FROM t2
+master-bin.000001 # Xid # # COMMIT /* XID */
drop database test_rpl;
diff --git a/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result b/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result
index 75180334c28..daefee9c669 100644
--- a/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result
+++ b/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result
@@ -11,45 +11,7 @@ SELECT * FROM t1;
a b
1 10
2 2
-show slave status;;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1105
-Last_Error Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10'
-Skip_Counter 0
-Exec_Master_Log_Pos 246
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
-Last_IO_Error
-Last_SQL_Errno 1105
-Last_SQL_Error Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10'
+Last_SQL_Error = Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10'
SELECT * FROM t1;
a b
stop slave;
@@ -94,49 +56,7 @@ id field_1 field_2 field_3
4 4 d 4d
5 5 e 5e
6 6 f 6f
-show slave status;;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1105
-Last_Error Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1 (field_1, field_2, field_3)
-SELECT t2.field_a, t2.field_b, t2.field_c
-FROM t2
-ON DUPLICATE KEY UPDATE
-t1.field_3 = t2.field_c'
-Skip_Counter 0
-Exec_Master_Log_Pos 1278
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno 0
-Last_IO_Error
-Last_SQL_Errno 1105
-Last_SQL_Error Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1 (field_1, field_2, field_3)
+Last_SQL_Error = Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1 (field_1, field_2, field_3)
SELECT t2.field_a, t2.field_b, t2.field_c
FROM t2
ON DUPLICATE KEY UPDATE
diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result b/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
index ba0aa847cf7..9acc1ad93ac 100644
--- a/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
+++ b/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
@@ -6,85 +6,9 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (1,10);
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos 290
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos 290
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE t1;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos 560
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1593
-Last_Error Fatal error: Not enough memory
-Skip_Counter 0
-Exec_Master_Log_Pos 325
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1593
-Last_SQL_Error Fatal error: Not enough memory
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Fatal error: Not enough memory
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
-START SLAVE;
+include/start_slave.inc
DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/r/rpl_log_pos.result b/mysql-test/suite/rpl/r/rpl_log_pos.result
index 85fa4c10eac..d9f02f6e82f 100644
--- a/mysql-test/suite/rpl/r/rpl_log_pos.result
+++ b/mysql-test/suite/rpl/r/rpl_log_pos.result
@@ -9,87 +9,11 @@ show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
include/stop_slave.inc
-change master to master_log_pos=75;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running No
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+change master to master_log_pos=MASTER_LOG_POS;
+Read_Master_Log_Pos 75
start slave;
+Last_IO_Error = Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master'
include/stop_slave.inc
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos 75
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running No
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos 75
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
@@ -97,7 +21,7 @@ create table if not exists t1 (n int);
drop table if exists t1;
create table t1 (n int);
insert into t1 values (1),(2),(3);
-change master to master_log_pos=4;
+change master to master_log_pos=MASTER_LOG_POS;
start slave;
select * from t1 ORDER BY n;
n
diff --git a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result
index 2e707fb62c1..6bb9b139057 100644
--- a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result
+++ b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result
@@ -14,63 +14,22 @@ MIXED MIXED
CREATE TABLE t1 (a INT, b LONG);
INSERT INTO t1 VALUES (1,1), (2,2);
INSERT INTO t1 VALUES (3,UUID()), (4,UUID());
-SHOW BINLOG EVENTS;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (a INT, b LONG)
-master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Query 1 # COMMIT
+master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG)
+master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
**** On Slave ****
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos 594
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos 594
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert #
-Last_IO_Errno #
-Last_IO_Error
-Last_SQL_Errno 0
-Last_SQL_Error
-SHOW BINLOG EVENTS;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-slave-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (a INT, b LONG)
-slave-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
-slave-bin.000001 # Query 1 # BEGIN
-slave-bin.000001 # Table_map 1 # table_id: # (test.t1)
-slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-slave-bin.000001 # Query 1 # COMMIT
+slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG)
+slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
+slave-bin.000001 # Query # # BEGIN
+slave-bin.000001 # Table_map # # table_id: # (test.t1)
+slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+slave-bin.000001 # Query # # COMMIT
DROP TABLE IF EXISTS t1;
SET @@global.binlog_format= @old_binlog_format;
diff --git a/mysql-test/suite/rpl/r/rpl_replicate_do.result b/mysql-test/suite/rpl/r/rpl_replicate_do.result
index 33088ee2ec8..637047a883b 100644
--- a/mysql-test/suite/rpl/r/rpl_replicate_do.result
+++ b/mysql-test/suite/rpl/r/rpl_replicate_do.result
@@ -26,45 +26,7 @@ n
select * from t11;
ERROR 42S02: Table 'test.t11' doesn't exist
drop table if exists t1,t2,t11;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
Replicate_Do_Table test.t1
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
create table t1 (ts timestamp);
set one_shot time_zone='met';
insert into t1 values('2005-08-12 00:00:00');
diff --git a/mysql-test/suite/rpl/r/rpl_rotate_logs.result b/mysql-test/suite/rpl/r/rpl_rotate_logs.result
index 013ba87ec0b..b50c7cebcab 100644
--- a/mysql-test/suite/rpl/r/rpl_rotate_logs.result
+++ b/mysql-test/suite/rpl/r/rpl_rotate_logs.result
@@ -14,45 +14,9 @@ create temporary table temp_table (a char(80) not null);
insert into temp_table values ("testing temporary tables");
create table t1 (s text);
insert into t1 values('Could not break slave'),('Tried hard');
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 60
Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
select * from t1;
s
Could not break slave
@@ -93,45 +57,9 @@ show binary logs;
Log_name File_size
master-bin.000003 #
insert into t2 values (65);
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 60
Master_Log_File master-bin.000003
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
Relay_Master_Log_File master-bin.000003
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
select * from t2;
m
34
@@ -157,45 +85,9 @@ master-bin.000005 # <Binlog_Do_DB> <Binlog_Ignore_DB>
select * from t4;
a
testing temporary tables part 2
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 60
Master_Log_File master-bin.000005
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
Relay_Master_Log_File master-bin.000005
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
lock tables t3 read;
select count(*) from t3 where n >= 4;
count(*)
diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result
index 7920b9a981d..458ae53e79c 100644
--- a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result
+++ b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result
@@ -56,14 +56,13 @@ DELETE FROM t1;
INSERT INTO t1 VALUES (1),(2);
DELETE FROM t1 WHERE a = 0;
UPDATE t1 SET a=99 WHERE a = 0;
-SHOW BINLOG EVENTS;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4
-master-bin.000001 106 Query 1 192 use `test`; CREATE TABLE t1 (a INT)
-master-bin.000001 192 Query 1 260 BEGIN
-master-bin.000001 260 Table_map 1 301 table_id: # (test.t1)
-master-bin.000001 301 Write_rows 1 340 table_id: # flags: STMT_END_F
-master-bin.000001 340 Query 1 409 COMMIT
+master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT)
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
DROP TABLE t1;
================ Test for BUG#17620 ================
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result
index a980092ac37..a247c3a6039 100644
--- a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result
@@ -436,8 +436,7 @@ DELETE FROM t1;
SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
COUNT(*) 0
set @@global.slave_exec_mode= default;
-Last_SQL_Error
-
+Checking that both slave threads are running.
SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
COUNT(*) 0
**** Test for BUG#37076 ****
@@ -487,8 +486,7 @@ Comparing tables master:test.t2 and slave:test.t2
[expecting slave to stop]
INSERT INTO t3 VALUES (1, "", 1);
INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2);
-Last_SQL_Error
-Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.
+Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.
RESET MASTER;
STOP SLAVE;
RESET SLAVE;
@@ -500,8 +498,7 @@ Comparing tables master:test.t4 and slave:test.t4
[expecting slave to stop]
INSERT INTO t5 VALUES (1, "", 1);
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
-Last_SQL_Error
-Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size.
+Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size.
RESET MASTER;
STOP SLAVE;
RESET SLAVE;
@@ -509,8 +506,7 @@ START SLAVE;
[expecting slave to stop]
INSERT INTO t6 VALUES (1, "", 1);
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
-Last_SQL_Error
-Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size.
+Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size.
RESET MASTER;
STOP SLAVE;
RESET SLAVE;
diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result
index ea0c322fe6d..fefe8e969dc 100644
--- a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result
@@ -436,8 +436,7 @@ DELETE FROM t1;
SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
COUNT(*) 0
set @@global.slave_exec_mode= default;
-Last_SQL_Error
-
+Checking that both slave threads are running.
SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
COUNT(*) 0
**** Test for BUG#37076 ****
@@ -487,8 +486,7 @@ Comparing tables master:test.t2 and slave:test.t2
[expecting slave to stop]
INSERT INTO t3 VALUES (1, "", 1);
INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2);
-Last_SQL_Error
-Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.
+Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.
RESET MASTER;
STOP SLAVE;
RESET SLAVE;
@@ -500,8 +498,7 @@ Comparing tables master:test.t4 and slave:test.t4
[expecting slave to stop]
INSERT INTO t5 VALUES (1, "", 1);
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
-Last_SQL_Error
-Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size.
+Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size.
RESET MASTER;
STOP SLAVE;
RESET SLAVE;
@@ -509,8 +506,7 @@ START SLAVE;
[expecting slave to stop]
INSERT INTO t6 VALUES (1, "", 1);
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
-Last_SQL_Error
-Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size.
+Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size.
RESET MASTER;
STOP SLAVE;
RESET SLAVE;
diff --git a/mysql-test/suite/rpl/r/rpl_row_colSize.result b/mysql-test/suite/rpl/r/rpl_row_colSize.result
index 6d002a722f1..417bc65641a 100644
--- a/mysql-test/suite/rpl/r/rpl_row_colSize.result
+++ b/mysql-test/suite/rpl/r/rpl_row_colSize.result
@@ -18,45 +18,7 @@ CREATE TABLE t1 (a DECIMAL(20, 10));
RESET MASTER;
INSERT INTO t1 VALUES (901251.90125);
START SLAVE;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 10, test.t1 on slave has size 3. Master's column size should be <= the slave's column size.
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 10, test.t1 on slave has size 3. Master's column size should be <= the slave's column size.
+Last_SQL_Error = Table definition on master and slave does not match: Column 0 size mismatch - master has size 10, test.t1 on slave has size 3. Master's column size should be <= the slave's column size.
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -72,45 +34,7 @@ CREATE TABLE t1 (a DECIMAL(27, 18));
RESET MASTER;
INSERT INTO t1 VALUES (901251.90125);
START SLAVE;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 12, test.t1 on slave has size 12. Master's column size should be <= the slave's column size.
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 12, test.t1 on slave has size 12. Master's column size should be <= the slave's column size.
+Last_SQL_Error = Table definition on master and slave does not match: Column 0 size mismatch - master has size 12, test.t1 on slave has size 12. Master's column size should be <= the slave's column size.
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -126,45 +50,7 @@ CREATE TABLE t1 (a NUMERIC(20, 10));
RESET MASTER;
INSERT INTO t1 VALUES (901251.90125);
START SLAVE;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 10, test.t1 on slave has size 3. Master's column size should be <= the slave's column size.
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 10, test.t1 on slave has size 3. Master's column size should be <= the slave's column size.
+Last_SQL_Error = Table definition on master and slave does not match: Column 0 size mismatch - master has size 10, test.t1 on slave has size 3. Master's column size should be <= the slave's column size.
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -181,45 +67,7 @@ CREATE TABLE t1 (a FLOAT(47));
RESET MASTER;
INSERT INTO t1 VALUES (901251.90125);
START SLAVE;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 5, test.t1 has type 4
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 5, test.t1 has type 4
+Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 5, test.t1 has type 4
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -236,45 +84,7 @@ CREATE TABLE t1 (a BIT(64));
RESET MASTER;
INSERT INTO t1 VALUES (B'10101');
START SLAVE;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 8, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 8, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
+Last_SQL_Error = Table definition on master and slave does not match: Column 0 size mismatch - master has size 8, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -290,45 +100,7 @@ CREATE TABLE t1 (a BIT(12));
RESET MASTER;
INSERT INTO t1 VALUES (B'10101');
START SLAVE;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 2. Master's column size should be <= the slave's column size.
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 2. Master's column size should be <= the slave's column size.
+Last_SQL_Error = Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 2. Master's column size should be <= the slave's column size.
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -345,45 +117,7 @@ CREATE TABLE t1 (a SET('1','2','3','4','5','6','7','8','9'));
RESET MASTER;
INSERT INTO t1 VALUES ('4');
START SLAVE;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
+Last_SQL_Error = Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -400,45 +134,7 @@ CREATE TABLE t1 (a CHAR(20));
RESET MASTER;
INSERT INTO t1 VALUES ('This is a test.');
START SLAVE;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 20, test.t1 on slave has size 11. Master's column size should be <= the slave's column size.
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 20, test.t1 on slave has size 11. Master's column size should be <= the slave's column size.
+Last_SQL_Error = Table definition on master and slave does not match: Column 0 size mismatch - master has size 20, test.t1 on slave has size 11. Master's column size should be <= the slave's column size.
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -486,45 +182,7 @@ CREATE TABLE t1 (a ENUM(
RESET MASTER;
INSERT INTO t1 VALUES ('44');
START SLAVE;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
+Last_SQL_Error = Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -541,45 +199,7 @@ CREATE TABLE t1 (a VARCHAR(2000));
RESET MASTER;
INSERT INTO t1 VALUES ('This is a test.');
START SLAVE;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2000, test.t1 on slave has size 100. Master's column size should be <= the slave's column size.
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2000, test.t1 on slave has size 100. Master's column size should be <= the slave's column size.
+Last_SQL_Error = Table definition on master and slave does not match: Column 0 size mismatch - master has size 2000, test.t1 on slave has size 100. Master's column size should be <= the slave's column size.
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -595,45 +215,7 @@ CREATE TABLE t1 (a VARCHAR(200));
RESET MASTER;
INSERT INTO t1 VALUES ('This is a test.');
START SLAVE;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 200, test.t1 on slave has size 10. Master's column size should be <= the slave's column size.
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 200, test.t1 on slave has size 10. Master's column size should be <= the slave's column size.
+Last_SQL_Error = Table definition on master and slave does not match: Column 0 size mismatch - master has size 200, test.t1 on slave has size 10. Master's column size should be <= the slave's column size.
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -649,45 +231,7 @@ CREATE TABLE t1 (a VARCHAR(2000));
RESET MASTER;
INSERT INTO t1 VALUES ('This is a test.');
START SLAVE;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2000, test.t1 on slave has size 1000. Master's column size should be <= the slave's column size.
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2000, test.t1 on slave has size 1000. Master's column size should be <= the slave's column size.
+Last_SQL_Error = Table definition on master and slave does not match: Column 0 size mismatch - master has size 2000, test.t1 on slave has size 1000. Master's column size should be <= the slave's column size.
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -704,45 +248,7 @@ CREATE TABLE t1 (a LONGBLOB);
RESET MASTER;
INSERT INTO t1 VALUES ('This is a test.');
START SLAVE;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 4, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 4, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
+Last_SQL_Error = Table definition on master and slave does not match: Column 0 size mismatch - master has size 4, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
SELECT COUNT(*) FROM t1;
COUNT(*)
0
diff --git a/mysql-test/suite/rpl/r/rpl_row_create_table.result b/mysql-test/suite/rpl/r/rpl_row_create_table.result
index 8a1b7a805aa..e480ff3dfe9 100644
--- a/mysql-test/suite/rpl/r/rpl_row_create_table.result
+++ b/mysql-test/suite/rpl/r/rpl_row_create_table.result
@@ -13,31 +13,12 @@ CREATE TABLE t1 (a INT, b INT);
CREATE TABLE t2 (a INT, b INT) ENGINE=Merge;
CREATE TABLE t3 (a INT, b INT) CHARSET=utf8;
CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8;
-SHOW BINLOG EVENTS FROM 106;
-Log_name #
-Pos 106
-Event_type Query
-Server_id #
-End_log_pos 199
-Info use `test`; CREATE TABLE t1 (a INT, b INT)
-Log_name #
-Pos 199
-Event_type Query
-Server_id #
-End_log_pos 305
-Info use `test`; CREATE TABLE t2 (a INT, b INT) ENGINE=Merge
-Log_name #
-Pos 305
-Event_type Query
-Server_id #
-End_log_pos 411
-Info use `test`; CREATE TABLE t3 (a INT, b INT) CHARSET=utf8
-Log_name #
-Pos 411
-Event_type Query
-Server_id #
-End_log_pos 530
-Info use `test`; CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b INT)
+master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a INT, b INT) ENGINE=Merge
+master-bin.000001 # Query # # use `test`; CREATE TABLE t3 (a INT, b INT) CHARSET=utf8
+master-bin.000001 # Query # # use `test`; CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8
**** On Master ****
SHOW CREATE TABLE t1;
Table t1
@@ -137,7 +118,7 @@ RESET MASTER;
include/start_slave.inc
CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
ERROR 23000: Duplicate entry '2' for key 'b'
-SHOW BINLOG EVENTS FROM 106;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
CREATE TABLE t7 (a INT, b INT UNIQUE);
INSERT INTO t7 SELECT a,b FROM tt3;
@@ -147,13 +128,13 @@ a b
1 2
2 4
3 6
-SHOW BINLOG EVENTS FROM 106;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-# 106 Query # 206 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE)
-# 206 Query # 274 BEGIN
-# 274 Table_map # 316 table_id: # (test.t7)
-# 316 Write_rows # 372 table_id: # flags: STMT_END_F
-# 372 Query # 443 ROLLBACK
+master-bin.000001 # Query # # use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE)
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t7)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # ROLLBACK
SELECT * FROM t7 ORDER BY a,b;
a b
1 2
@@ -171,12 +152,12 @@ INSERT INTO t7 SELECT a,b FROM tt4;
ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
-SHOW BINLOG EVENTS FROM 106;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-# 106 Query # 174 BEGIN
-# 174 Table_map # 216 table_id: # (test.t7)
-# 216 Write_rows # 272 table_id: # flags: STMT_END_F
-# 272 Query # 341 COMMIT
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t7)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
SELECT * FROM t7 ORDER BY a,b;
a b
1 2
@@ -216,10 +197,10 @@ Create Table CREATE TABLE `t9` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-SHOW BINLOG EVENTS FROM 106;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-# 106 Query # 192 use `test`; CREATE TABLE t8 LIKE t4
-# 192 Query # 331 use `test`; CREATE TABLE `t9` (
+master-bin.000001 # Query # # use `test`; CREATE TABLE t8 LIKE t4
+master-bin.000001 # Query # # use `test`; CREATE TABLE `t9` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
)
@@ -289,38 +270,38 @@ a
1
2
3
-SHOW BINLOG EVENTS FROM 106;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-# 106 Query # 192 use `test`; CREATE TABLE t1 (a INT)
-# 192 Query # 260 BEGIN
-# 260 Table_map # 301 table_id: # (test.t1)
-# 301 Write_rows # 345 table_id: # flags: STMT_END_F
-# 345 Query # 414 COMMIT
-# 414 Query # 482 BEGIN
-# 482 Query # 607 use `test`; CREATE TABLE `t2` (
+master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT)
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB
-# 607 Table_map # 648 table_id: # (test.t2)
-# 648 Write_rows # 692 table_id: # flags: STMT_END_F
-# 692 Xid # 719 COMMIT /* XID */
-# 719 Query # 787 BEGIN
-# 787 Query # 912 use `test`; CREATE TABLE `t3` (
+master-bin.000001 # Table_map # # table_id: # (test.t2)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TABLE `t3` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB
-# 912 Table_map # 953 table_id: # (test.t3)
-# 953 Write_rows # 997 table_id: # flags: STMT_END_F
-# 997 Xid # 1024 COMMIT /* XID */
-# 1024 Query # 1092 BEGIN
-# 1092 Query # 1217 use `test`; CREATE TABLE `t4` (
+master-bin.000001 # Table_map # # table_id: # (test.t3)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; CREATE TABLE `t4` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB
-# 1217 Table_map # 1258 table_id: # (test.t4)
-# 1258 Write_rows # 1302 table_id: # flags: STMT_END_F
-# 1302 Xid # 1329 COMMIT /* XID */
-# 1329 Query # 1397 BEGIN
-# 1397 Table_map # 1438 table_id: # (test.t1)
-# 1438 Write_rows # 1482 table_id: # flags: STMT_END_F
-# 1482 Query # 1551 COMMIT
+master-bin.000001 # Table_map # # table_id: # (test.t4)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
SHOW TABLES;
Tables_in_test
t1
@@ -374,20 +355,20 @@ a
4
6
9
-SHOW BINLOG EVENTS FROM 106;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-# 106 Query # 192 use `test`; CREATE TABLE t1 (a INT)
-# 192 Query # 260 BEGIN
-# 260 Table_map # 301 table_id: # (test.t1)
-# 301 Write_rows # 345 table_id: # flags: STMT_END_F
-# 345 Query # 414 COMMIT
-# 414 Query # 514 use `test`; CREATE TABLE t2 (a INT) ENGINE=INNODB
-# 514 Query # 582 BEGIN
-# 582 Table_map # 623 table_id: # (test.t2)
-# 623 Write_rows # 667 table_id: # flags: STMT_END_F
-# 667 Table_map # 708 table_id: # (test.t2)
-# 708 Write_rows # 747 table_id: # flags: STMT_END_F
-# 747 Xid # 774 COMMIT /* XID */
+master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT)
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a INT) ENGINE=INNODB
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t2)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t2)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
SELECT * FROM t2 ORDER BY a;
a
1
@@ -413,14 +394,14 @@ Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
SELECT * FROM t2 ORDER BY a;
a
-SHOW BINLOG EVENTS FROM 106;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-# 106 Query # 174 BEGIN
-# 174 Table_map # 215 table_id: # (test.t2)
-# 215 Write_rows # 259 table_id: # flags: STMT_END_F
-# 259 Table_map # 300 table_id: # (test.t2)
-# 300 Write_rows # 339 table_id: # flags: STMT_END_F
-# 339 Query # 410 ROLLBACK
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t2)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Table_map # # table_id: # (test.t2)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # ROLLBACK
SELECT * FROM t2 ORDER BY a;
a
DROP TABLE t1,t2;
diff --git a/mysql-test/suite/rpl/r/rpl_row_drop.result b/mysql-test/suite/rpl/r/rpl_row_drop.result
index 89654ebf165..048e07271b3 100644
--- a/mysql-test/suite/rpl/r/rpl_row_drop.result
+++ b/mysql-test/suite/rpl/r/rpl_row_drop.result
@@ -41,12 +41,11 @@ t1
t2
**** On Master ****
DROP TABLE t1,t2;
-SHOW BINLOG EVENTS;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 4 Format_desc 1 106 Server ver: VERSION, Binlog ver: 4
-master-bin.000001 106 Query 1 192 use `test`; CREATE TABLE t1 (a int)
-master-bin.000001 192 Query 1 278 use `test`; CREATE TABLE t2 (a int)
-master-bin.000001 278 Query 1 382 use `test`; DROP TABLE `t1` /* generated by server */
+master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a int)
+master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a int)
+master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
SHOW TABLES;
Tables_in_test
t2
diff --git a/mysql-test/suite/rpl/r/rpl_row_disabled_slave_key.result b/mysql-test/suite/rpl/r/rpl_row_find_row.result
index 01e3dfd6508..69516b47b7d 100644
--- a/mysql-test/suite/rpl/r/rpl_row_disabled_slave_key.result
+++ b/mysql-test/suite/rpl/r/rpl_row_find_row.result
@@ -24,3 +24,15 @@ INSERT INTO t VALUES (1,2,4);
INSERT INTO t VALUES (4,3,4);
DELETE FROM t;
DROP TABLE t;
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+CREATE TABLE t1 (c1 INT NOT NULL, c2 INT NOT NULL, c3 INT, UNIQUE KEY(c1,c3), KEY(c2));
+INSERT INTO t1(c1,c2) VALUES(1,1);
+INSERT INTO t1(c1,c2) VALUES(1,2);
+UPDATE t1 SET c1=1000 WHERE c2=2;
+Comparing tables master:test.t1 and slave:test.t1
+DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result b/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result
index 18a5dbfccc1..fe2fb1d9da2 100644
--- a/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result
+++ b/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result
@@ -12,16 +12,12 @@ create table t4 (a int);
insert into t4 select * from t3;
rename table t1 to t5, t2 to t1;
flush no_write_to_binlog tables;
-SHOW BINLOG EVENTS FROM 925 ;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1
+master-bin.000001 # Query # # use `test`; rename table t1 to t5, t2 to t1
select * from t3;
a
flush tables;
-SHOW BINLOG EVENTS FROM 925 ;
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1
-master-bin.000001 # Query 1 # use `test`; flush tables
select * from t3;
a
stop slave;
diff --git a/mysql-test/suite/rpl/r/rpl_row_log.result b/mysql-test/suite/rpl/r/rpl_row_log.result
index 9593b009d1f..0f648539c47 100644
--- a/mysql-test/suite/rpl/r/rpl_row_log.result
+++ b/mysql-test/suite/rpl/r/rpl_row_log.result
@@ -7,7 +7,7 @@ start slave;
include/stop_slave.inc
reset master;
reset slave;
-start slave;
+include/start_slave.inc
create table t1(n int not null auto_increment primary key)ENGINE=MyISAM;
insert into t1 values (NULL);
drop table t1;
@@ -16,30 +16,29 @@ load data infile 'LOAD_FILE' into table t1 ignore 1 lines;
select count(*) from t1;
count(*)
69
-show binlog events;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Query 1 # COMMIT
-master-bin.000001 # Query 1 # use `test`; drop table t1
-master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Query 1 # COMMIT
-show binlog events from 106 limit 1;
+master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Query # # use `test`; drop table t1
+master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
+show binlog events from <binlog_start> limit 1;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
-show binlog events from 106 limit 2;
+master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
+show binlog events from <binlog_start> limit 2;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
-master-bin.000001 # Query 1 # BEGIN
-show binlog events from 106 limit 2,1;
+master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
+master-bin.000001 # Query # # BEGIN
+show binlog events from <binlog_start> limit 2,1;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
+master-bin.000001 # Table_map # # table_id: # (test.t1)
flush logs;
create table t3 (a int)ENGINE=MyISAM;
select * from t1 order by 1 asc;
@@ -203,15 +202,14 @@ master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Rotate # # master-bin.000002;pos=4
-show binlog events in 'master-bin.000002';
+show binlog events in 'master-bin.000002' from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM
-master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM
-master-bin.000002 # Query 1 # BEGIN
-master-bin.000002 # Table_map 1 # table_id: # (test.t2)
-master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000002 # Query 1 # COMMIT
+master-bin.000002 # Query # # use `test`; create table t3 (a int)ENGINE=MyISAM
+master-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=MyISAM
+master-bin.000002 # Query # # BEGIN
+master-bin.000002 # Table_map # # table_id: # (test.t2)
+master-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000002 # Query # # COMMIT
show binary logs;
Log_name File_size
master-bin.000001 #
@@ -220,69 +218,29 @@ show binary logs;
Log_name File_size
slave-bin.000001 #
slave-bin.000002 #
-show binlog events in 'slave-bin.000001' from 4;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
-slave-bin.000001 # Query 1 # BEGIN
-slave-bin.000001 # Table_map 1 # table_id: # (test.t1)
-slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-slave-bin.000001 # Query 1 # COMMIT
-slave-bin.000001 # Query 1 # use `test`; drop table t1
-slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
-slave-bin.000001 # Query 1 # BEGIN
-slave-bin.000001 # Table_map 1 # table_id: # (test.t1)
-slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-slave-bin.000001 # Query 1 # COMMIT
-slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM
-slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
-show binlog events in 'slave-bin.000002' from 4;
+slave-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
+slave-bin.000001 # Query # # BEGIN
+slave-bin.000001 # Table_map # # table_id: # (test.t1)
+slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+slave-bin.000001 # Query # # COMMIT
+slave-bin.000001 # Query # # use `test`; drop table t1
+slave-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
+slave-bin.000001 # Query # # BEGIN
+slave-bin.000001 # Table_map # # table_id: # (test.t1)
+slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+slave-bin.000001 # Query # # COMMIT
+slave-bin.000001 # Query # # use `test`; create table t3 (a int)ENGINE=MyISAM
+slave-bin.000001 # Rotate # # slave-bin.000002;pos=4
+show binlog events in 'slave-bin.000002' from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM
-slave-bin.000002 # Query 1 # BEGIN
-slave-bin.000002 # Table_map 1 # table_id: # (test.t2)
-slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
-slave-bin.000002 # Query 1 # COMMIT
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000002
-Read_Master_Log_Pos 516
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000002
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos 516
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+slave-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=MyISAM
+slave-bin.000002 # Query # # BEGIN
+slave-bin.000002 # Table_map # # table_id: # (test.t2)
+slave-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F
+slave-bin.000002 # Query # # COMMIT
+Checking that both slave threads are running.
show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result
index 8526bad558b..ff189e676cc 100644
--- a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result
@@ -7,7 +7,7 @@ start slave;
include/stop_slave.inc
reset master;
reset slave;
-start slave;
+include/start_slave.inc
create table t1(n int not null auto_increment primary key)ENGINE=InnoDB;
insert into t1 values (NULL);
drop table t1;
@@ -16,30 +16,29 @@ load data infile 'LOAD_FILE' into table t1 ignore 1 lines;
select count(*) from t1;
count(*)
69
-show binlog events;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Xid 1 # COMMIT /* XID */
-master-bin.000001 # Query 1 # use `test`; drop table t1
-master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Xid 1 # COMMIT /* XID */
-show binlog events from 106 limit 1;
+master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # use `test`; drop table t1
+master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Xid # # COMMIT /* XID */
+show binlog events from <binlog_start> limit 1;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
-show binlog events from 106 limit 2;
+master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
+show binlog events from <binlog_start> limit 2;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
-master-bin.000001 # Query 1 # BEGIN
-show binlog events from 106 limit 2,1;
+master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
+master-bin.000001 # Query # # BEGIN
+show binlog events from <binlog_start> limit 2,1;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
+master-bin.000001 # Table_map # # table_id: # (test.t1)
flush logs;
create table t3 (a int)ENGINE=InnoDB;
select * from t1 order by 1 asc;
@@ -203,15 +202,14 @@ master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Rotate # # master-bin.000002;pos=4
-show binlog events in 'master-bin.000002';
+show binlog events in 'master-bin.000002' from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=InnoDB
-master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=InnoDB
-master-bin.000002 # Query 1 # BEGIN
-master-bin.000002 # Table_map 1 # table_id: # (test.t2)
-master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000002 # Xid 1 # COMMIT /* XID */
+master-bin.000002 # Query # # use `test`; create table t3 (a int)ENGINE=InnoDB
+master-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=InnoDB
+master-bin.000002 # Query # # BEGIN
+master-bin.000002 # Table_map # # table_id: # (test.t2)
+master-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000002 # Xid # # COMMIT /* XID */
show binary logs;
Log_name File_size
master-bin.000001 #
@@ -220,69 +218,29 @@ show binary logs;
Log_name File_size
slave-bin.000001 #
slave-bin.000002 #
-show binlog events in 'slave-bin.000001' from 4;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
-slave-bin.000001 # Query 1 # BEGIN
-slave-bin.000001 # Table_map 1 # table_id: # (test.t1)
-slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-slave-bin.000001 # Xid 1 # COMMIT /* XID */
-slave-bin.000001 # Query 1 # use `test`; drop table t1
-slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB
-slave-bin.000001 # Query 1 # BEGIN
-slave-bin.000001 # Table_map 1 # table_id: # (test.t1)
-slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-slave-bin.000001 # Xid 1 # COMMIT /* XID */
-slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=InnoDB
-slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
-show binlog events in 'slave-bin.000002' from 4;
+slave-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
+slave-bin.000001 # Query # # BEGIN
+slave-bin.000001 # Table_map # # table_id: # (test.t1)
+slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+slave-bin.000001 # Xid # # COMMIT /* XID */
+slave-bin.000001 # Query # # use `test`; drop table t1
+slave-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB
+slave-bin.000001 # Query # # BEGIN
+slave-bin.000001 # Table_map # # table_id: # (test.t1)
+slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+slave-bin.000001 # Xid # # COMMIT /* XID */
+slave-bin.000001 # Query # # use `test`; create table t3 (a int)ENGINE=InnoDB
+slave-bin.000001 # Rotate # # slave-bin.000002;pos=4
+show binlog events in 'slave-bin.000002' from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=InnoDB
-slave-bin.000002 # Query 1 # BEGIN
-slave-bin.000002 # Table_map 1 # table_id: # (test.t2)
-slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
-slave-bin.000002 # Xid 1 # COMMIT /* XID */
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000002
-Read_Master_Log_Pos 474
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000002
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos 474
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+slave-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=InnoDB
+slave-bin.000002 # Query # # BEGIN
+slave-bin.000002 # Table_map # # table_id: # (test.t2)
+slave-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F
+slave-bin.000002 # Xid # # COMMIT /* XID */
+Checking that both slave threads are running.
show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result b/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result
index 2215b34814e..db06cb6d3de 100644
--- a/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result
+++ b/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result
@@ -21,45 +21,7 @@ select @@global.max_relay_log_size;
@@global.max_relay_log_size
4096
start slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
#
# Test 2
#
@@ -69,45 +31,7 @@ set global max_relay_log_size=(5*4096);
select @@global.max_relay_log_size;
@@global.max_relay_log_size 20480
start slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
#
# Test 3: max_relay_log_size = 0
#
@@ -117,90 +41,13 @@ set global max_relay_log_size=0;
select @@global.max_relay_log_size;
@@global.max_relay_log_size 0
start slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
#
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
#
stop slave;
reset slave;
flush logs;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File
-Slave_IO_Running No
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
#
# Test 5
#
@@ -208,89 +55,13 @@ reset slave;
start slave;
flush logs;
create table t1 (a int);
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
#
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
#
flush logs;
drop table t1;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
flush logs;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
diff --git a/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result b/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result
new file mode 100644
index 00000000000..c461cafbd7c
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result
@@ -0,0 +1,46 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+## case #1 - last_null_bit_pos==0 in record_compare without X bit
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 );
+INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 );
+UPDATE t1 SET c5 = 'a';
+Comparing tables master:test.t1 and slave:test.t1
+DROP TABLE t1;
+## case #1.1 - last_null_bit_pos==0 in record_compare with X bit
+## (1 column less and no varchar)
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 bigint(20) DEFAULT 0, c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 );
+INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 );
+UPDATE t1 SET c5 = 'a';
+Comparing tables master:test.t1 and slave:test.t1
+DROP TABLE t1;
+## case #2 - X bit is wrongly set.
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+CREATE TABLE t1 (c1 int, c2 varchar(1) default '') ENGINE=InnoDB DEFAULT CHARSET= latin1;
+INSERT INTO t1(c1) VALUES (10);
+INSERT INTO t1(c1) VALUES (NULL);
+UPDATE t1 SET c1= 0;
+Comparing tables master:test.t1 and slave:test.t1
+DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result b/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result
new file mode 100644
index 00000000000..38fbe486d2e
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result
@@ -0,0 +1,60 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+## case #1 - last_null_bit_pos==0 in record_compare without X bit
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 );
+INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 );
+UPDATE t1 SET c5 = 'a';
+Comparing tables master:test.t1 and slave:test.t1
+DROP TABLE t1;
+## case #1.1 - last_null_bit_pos==0 in record_compare with X bit
+## (1 column less and no varchar)
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 bigint(20) DEFAULT 0, c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 );
+INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 );
+UPDATE t1 SET c5 = 'a';
+Comparing tables master:test.t1 and slave:test.t1
+DROP TABLE t1;
+## case #2 - X bit is wrongly set.
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+CREATE TABLE t1 (c1 int, c2 varchar(1) default '') ENGINE=MyISAM DEFAULT CHARSET= latin1;
+INSERT INTO t1(c1) VALUES (10);
+INSERT INTO t1(c1) VALUES (NULL);
+UPDATE t1 SET c1= 0;
+Comparing tables master:test.t1 and slave:test.t1
+DROP TABLE t1;
+## coverage purposes - Field_bits
+## 1 X bit + 2 Null bits + 5 bits => last_null_bit_pos==0
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bit(5)) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+INSERT INTO t1(c1,c2) VALUES (10, b'1');
+INSERT INTO t1(c1,c2) VALUES (NULL, b'1');
+UPDATE t1 SET c1= 0;
+Comparing tables master:test.t1 and slave:test.t1
+DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/r/rpl_row_reset_slave.result b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result
index fa40d8760a8..7bf09df31ca 100644
--- a/mysql-test/suite/rpl/r/rpl_row_reset_slave.result
+++ b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result
@@ -4,196 +4,37 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-stop slave;
-change master to master_user='test';
-SHOW SLAVE STATUS;
-Slave_IO_State #
Master_Host 127.0.0.1
+include/stop_slave.inc
+change master to master_user='test';
Master_User test
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running No
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-reset slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
Master_Host 127.0.0.1
+reset slave;
Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File
-Slave_IO_Running No
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-start slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
Master_Host 127.0.0.1
+include/start_slave.inc
Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-stop slave;
+Master_Host 127.0.0.1
+include/stop_slave.inc
reset slave;
-start slave;
+include/start_slave.inc
create temporary table t1 (a int);
-stop slave;
+include/stop_slave.inc
reset slave;
-start slave;
+include/start_slave.inc
show status like 'slave_open_temp_tables';
Variable_name Value
Slave_open_temp_tables 0
-stop slave;
+include/stop_slave.inc
reset slave;
-*** errno must be zero: 0 ***
change master to master_user='impossible_user_name';
start slave;
-ONE
-1
include/stop_slave.inc
change master to master_user='root';
include/start_slave.inc
-*** last errno must be zero: 0 ***
-*** last error must be blank: ***
include/stop_slave.inc
change master to master_user='impossible_user_name';
start slave;
-ONE
-1
include/stop_slave.inc
reset slave;
-*** io last errno must be zero: 0 ***
-*** io last error must be blank: ***
-*** sql last errno must be zero: 0 ***
-*** sql last error must be blank: ***
diff --git a/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result
index bb9865ab2d1..2b83bffd85f 100644
--- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result
@@ -118,214 +118,27 @@ a b
SELECT * FROM t2;
a
2
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error <Last_Error>
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno <Last_IO_Errno>
-Last_IO_Error <Last_IO_Error>
-Last_SQL_Errno 0
-Last_SQL_Error <Last_SQL_Error>
+Checking that both slave threads are running.
INSERT INTO t9 VALUES (4);
INSERT INTO t4 VALUES (4);
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error <Last_Error>
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno <Last_IO_Errno>
-Last_IO_Error <Last_IO_Error>
-Last_SQL_Errno 1535
-Last_SQL_Error <Last_SQL_Error>
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
INSERT INTO t9 VALUES (5);
INSERT INTO t5 VALUES (5,10,25);
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error <Last_Error>
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno <Last_IO_Errno>
-Last_IO_Error <Last_IO_Error>
-Last_SQL_Errno 1535
-Last_SQL_Error <Last_SQL_Error>
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
INSERT INTO t9 VALUES (6);
INSERT INTO t6 VALUES (6,12,36);
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error <Last_Error>
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno <Last_IO_Errno>
-Last_IO_Error <Last_IO_Error>
-Last_SQL_Errno 1535
-Last_SQL_Error <Last_SQL_Error>
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
INSERT INTO t9 VALUES (6);
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error <Last_Error>
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno <Last_IO_Errno>
-Last_IO_Error <Last_IO_Error>
-Last_SQL_Errno 0
-Last_SQL_Error <Last_SQL_Error>
+Checking that both slave threads are running.
INSERT INTO t7 VALUES (1),(2),(3);
INSERT INTO t8 VALUES (1),(2),(3);
SELECT * FROM t7 ORDER BY a;
diff --git a/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result
index f606a28c2d9..a42530c354d 100644
--- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result
@@ -118,214 +118,27 @@ a b
SELECT * FROM t2;
a
2
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error <Last_Error>
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno <Last_IO_Errno>
-Last_IO_Error <Last_IO_Error>
-Last_SQL_Errno 0
-Last_SQL_Error <Last_SQL_Error>
+Checking that both slave threads are running.
INSERT INTO t9 VALUES (4);
INSERT INTO t4 VALUES (4);
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error <Last_Error>
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno <Last_IO_Errno>
-Last_IO_Error <Last_IO_Error>
-Last_SQL_Errno 1535
-Last_SQL_Error <Last_SQL_Error>
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
INSERT INTO t9 VALUES (5);
INSERT INTO t5 VALUES (5,10,25);
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error <Last_Error>
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno <Last_IO_Errno>
-Last_IO_Error <Last_IO_Error>
-Last_SQL_Errno 1535
-Last_SQL_Error <Last_SQL_Error>
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
INSERT INTO t9 VALUES (6);
INSERT INTO t6 VALUES (6,12,36);
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error <Last_Error>
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno <Last_IO_Errno>
-Last_IO_Error <Last_IO_Error>
-Last_SQL_Errno 1535
-Last_SQL_Error <Last_SQL_Error>
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
INSERT INTO t9 VALUES (6);
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error <Last_Error>
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno <Last_IO_Errno>
-Last_IO_Error <Last_IO_Error>
-Last_SQL_Errno 0
-Last_SQL_Error <Last_SQL_Error>
+Checking that both slave threads are running.
INSERT INTO t7 VALUES (1),(2),(3);
INSERT INTO t8 VALUES (1),(2),(3);
SELECT * FROM t7 ORDER BY a;
diff --git a/mysql-test/suite/rpl/r/rpl_row_until.result b/mysql-test/suite/rpl/r/rpl_row_until.result
index ad54450af74..81aeb0d645b 100644
--- a/mysql-test/suite/rpl/r/rpl_row_until.result
+++ b/mysql-test/suite/rpl/r/rpl_row_until.result
@@ -20,188 +20,32 @@ n
2
3
4
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos MASTER_POS_DROP_T1
-Relay_Log_Space #
-Until_Condition Master
-Until_Log_File master-bin.000001
-Until_Log_Pos MASTER_POS_DROP_T1
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-START SLAVE UNTIL MASTER_LOG_FILE='master-no-such-bin.000001', MASTER_LOG_POS=291;
+START SLAVE UNTIL MASTER_LOG_FILE='master-no-such-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS;
SELECT * FROM t1;
n
1
2
3
4
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos MASTER_POS_DROP_T1
-Relay_Log_Space #
-Until_Condition Master
-Until_Log_File master-no-such-bin.000001
-Until_Log_Pos 291
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000002', RELAY_LOG_POS=relay_pos_insert1_t2
SELECT * FROM t2;
n
1
2
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos MASTER_POS_INSERT1_T2
-Relay_Log_Space #
-Until_Condition Relay
-Until_Log_File slave-relay-bin.000002
-Until_Log_Pos RELAY_POS_INSERT1_T2
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
START SLAVE;
include/stop_slave.inc
START SLAVE SQL_THREAD UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=master_pos_create_t2
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running No
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos MASTER_POS_DROP_T2
-Relay_Log_Space #
-Until_Condition Master
-Until_Log_File master-bin.000001
-Until_Log_Pos MASTER_POS_CREATE_T2
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-START SLAVE UNTIL MASTER_LOG_FILE='master-bin', MASTER_LOG_POS=561;
+START SLAVE UNTIL MASTER_LOG_FILE='master-bin', MASTER_LOG_POS=MASTER_LOG_POS;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
-START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=561, RELAY_LOG_POS=12;
+START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS, RELAY_LOG_POS=RELAY_LOG_POS;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001';
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000009';
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
-START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000002', MASTER_LOG_POS=561;
+START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000002', MASTER_LOG_POS=MASTER_LOG_POS;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
START SLAVE;
-START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=740;
+START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS;
Warnings:
Note 1254 Slave is already running
diff --git a/mysql-test/suite/rpl/r/rpl_skip_error.result b/mysql-test/suite/rpl/r/rpl_skip_error.result
index d955859f030..0aa8069a38c 100644
--- a/mysql-test/suite/rpl/r/rpl_skip_error.result
+++ b/mysql-test/suite/rpl/r/rpl_skip_error.result
@@ -31,45 +31,7 @@ n
3
7
8
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
==== Clean Up ====
drop table t1;
create table t1(a int primary key);
@@ -84,45 +46,7 @@ select * from t1;
a
1
2
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
==== Clean Up ====
drop table t1;
==== Using Innodb ====
diff --git a/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result b/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result
index e2efcf08d7a..c3c4f7c015a 100644
--- a/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result
+++ b/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result
@@ -10,45 +10,6 @@ insert into t1(b) values (1);
insert into t1(b) values (2);
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
commit;
-show slave status;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_MYPORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 9
-Last_Error Error in Begin_load_query event: write to '../../tmp/SQL_LOAD.data' failed
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 9
-Last_SQL_Error Error in Begin_load_query event: write to '../../tmp/SQL_LOAD.data' failed
drop table t1;
drop table t1;
call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' .Errcode: 9. Error_code: 3");
diff --git a/mysql-test/suite/rpl/r/rpl_slave_skip.result b/mysql-test/suite/rpl/r/rpl_slave_skip.result
index 6148de5d954..a4067fb7983 100644
--- a/mysql-test/suite/rpl/r/rpl_slave_skip.result
+++ b/mysql-test/suite/rpl/r/rpl_slave_skip.result
@@ -42,46 +42,7 @@ c d
2 8
3 18
**** On Slave ****
-START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=762;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos 1115
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos 762
-Relay_Log_Space #
-Until_Condition Master
-Until_Log_File master-bin.000001
-Until_Log_Pos 762
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SELECT * FROM t1;
@@ -104,48 +65,9 @@ show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # User var # # @`foo`=12
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES(@foo, 2*@foo)
-START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=106;
+START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos 248
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos 248
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
**** On Master ****
DROP TABLE t1, t2;
SET SESSION BINLOG_FORMAT=ROW;
diff --git a/mysql-test/suite/rpl/r/rpl_sp.result b/mysql-test/suite/rpl/r/rpl_sp.result
index 631369b2b74..8f06653f8ab 100644
--- a/mysql-test/suite/rpl/r/rpl_sp.result
+++ b/mysql-test/suite/rpl/r/rpl_sp.result
@@ -409,110 +409,110 @@ return 0;
end|
use mysqltest;
set @a:= mysqltest2.f1();
-show binlog events in 'master-bin.000001' from 106;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # drop database if exists mysqltest1
-master-bin.000001 # Query 1 # create database mysqltest1
-master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a varchar(100))
-master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` PROCEDURE `foo`()
+master-bin.000001 # Query # # drop database if exists mysqltest1
+master-bin.000001 # Query # # create database mysqltest1
+master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a varchar(100))
+master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` PROCEDURE `foo`()
begin
declare b int;
set b = 8;
insert into t1 values (b);
insert into t1 values (unix_timestamp());
end
-master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values ( NAME_CONST('b',8))
-master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (unix_timestamp())
-master-bin.000001 # Query 1 # use `mysqltest1`; delete from t1
-master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` PROCEDURE `foo2`()
+master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values ( NAME_CONST('b',8))
+master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values (unix_timestamp())
+master-bin.000001 # Query # # use `mysqltest1`; delete from t1
+master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` PROCEDURE `foo2`()
select * from mysqltest1.t1
-master-bin.000001 # Query 1 # use `mysqltest1`; alter procedure foo2 contains sql
-master-bin.000001 # Query 1 # use `mysqltest1`; drop table t1
-master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a int)
-master-bin.000001 # Query 1 # use `mysqltest1`; create table t2 like t1
-master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` PROCEDURE `foo3`()
+master-bin.000001 # Query # # use `mysqltest1`; alter procedure foo2 contains sql
+master-bin.000001 # Query # # use `mysqltest1`; drop table t1
+master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int)
+master-bin.000001 # Query # # use `mysqltest1`; create table t2 like t1
+master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` PROCEDURE `foo3`()
DETERMINISTIC
insert into t1 values (15)
-master-bin.000001 # Query 1 # use `mysqltest1`; grant CREATE ROUTINE, EXECUTE on mysqltest1.* to "zedjzlcsjhd"@127.0.0.1
-master-bin.000001 # Query 1 # use `mysqltest1`; grant SELECT on mysqltest1.t1 to "zedjzlcsjhd"@127.0.0.1
-master-bin.000001 # Query 1 # use `mysqltest1`; grant SELECT, INSERT on mysqltest1.t2 to "zedjzlcsjhd"@127.0.0.1
-master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`zedjzlcsjhd`@`127.0.0.1` PROCEDURE `foo4`()
+master-bin.000001 # Query # # use `mysqltest1`; grant CREATE ROUTINE, EXECUTE on mysqltest1.* to "zedjzlcsjhd"@127.0.0.1
+master-bin.000001 # Query # # use `mysqltest1`; grant SELECT on mysqltest1.t1 to "zedjzlcsjhd"@127.0.0.1
+master-bin.000001 # Query # # use `mysqltest1`; grant SELECT, INSERT on mysqltest1.t2 to "zedjzlcsjhd"@127.0.0.1
+master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`zedjzlcsjhd`@`127.0.0.1` PROCEDURE `foo4`()
DETERMINISTIC
begin
insert into t2 values(3);
insert into t1 values (5);
end
-master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(3)
-master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (15)
-master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(3)
-master-bin.000001 # Query 1 # use `mysqltest1`; alter procedure foo4 sql security invoker
-master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(3)
-master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (5)
-master-bin.000001 # Query 1 # use `mysqltest1`; delete from t2
-master-bin.000001 # Query 1 # use `mysqltest1`; alter table t2 add unique (a)
-master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo4
-master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` PROCEDURE `foo4`()
+master-bin.000001 # Query # # use `mysqltest1`; insert into t2 values(3)
+master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values (15)
+master-bin.000001 # Query # # use `mysqltest1`; insert into t2 values(3)
+master-bin.000001 # Query # # use `mysqltest1`; alter procedure foo4 sql security invoker
+master-bin.000001 # Query # # use `mysqltest1`; insert into t2 values(3)
+master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values (5)
+master-bin.000001 # Query # # use `mysqltest1`; delete from t2
+master-bin.000001 # Query # # use `mysqltest1`; alter table t2 add unique (a)
+master-bin.000001 # Query # # use `mysqltest1`; drop procedure foo4
+master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` PROCEDURE `foo4`()
DETERMINISTIC
begin
insert into t2 values(20),(20);
end
-master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(20),(20)
-master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo4
-master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo
-master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo2
-master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo3
-master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` FUNCTION `fn1`(x int) RETURNS int(11)
+master-bin.000001 # Query # # use `mysqltest1`; insert into t2 values(20),(20)
+master-bin.000001 # Query # # use `mysqltest1`; drop procedure foo4
+master-bin.000001 # Query # # use `mysqltest1`; drop procedure foo
+master-bin.000001 # Query # # use `mysqltest1`; drop procedure foo2
+master-bin.000001 # Query # # use `mysqltest1`; drop procedure foo3
+master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` FUNCTION `fn1`(x int) RETURNS int(11)
DETERMINISTIC
begin
insert into t1 values (x);
return x+2;
end
-master-bin.000001 # Query 1 # use `mysqltest1`; delete t1,t2 from t1,t2
-master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(20)
-master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(fn1(21))
-master-bin.000001 # Query 1 # use `mysqltest1`; drop function fn1
-master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` FUNCTION `fn1`() RETURNS int(11)
+master-bin.000001 # Query # # use `mysqltest1`; delete t1,t2 from t1,t2
+master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(20)
+master-bin.000001 # Query # # use `mysqltest1`; insert into t2 values(fn1(21))
+master-bin.000001 # Query # # use `mysqltest1`; drop function fn1
+master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` FUNCTION `fn1`() RETURNS int(11)
NO SQL
begin
return unix_timestamp();
end
-master-bin.000001 # Query 1 # use `mysqltest1`; delete from t1
-master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values(fn1())
-master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`zedjzlcsjhd`@`127.0.0.1` FUNCTION `fn2`() RETURNS int(11)
+master-bin.000001 # Query # # use `mysqltest1`; delete from t1
+master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(fn1())
+master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`zedjzlcsjhd`@`127.0.0.1` FUNCTION `fn2`() RETURNS int(11)
NO SQL
begin
return unix_timestamp();
end
-master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` FUNCTION `fn3`() RETURNS int(11)
+master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` FUNCTION `fn3`() RETURNS int(11)
READS SQL DATA
begin
return 0;
end
-master-bin.000001 # Query 1 # use `mysqltest1`; delete from t2
-master-bin.000001 # Query 1 # use `mysqltest1`; alter table t2 add unique (a)
-master-bin.000001 # Query 1 # use `mysqltest1`; drop function fn1
-master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` FUNCTION `fn1`(x int) RETURNS int(11)
+master-bin.000001 # Query # # use `mysqltest1`; delete from t2
+master-bin.000001 # Query # # use `mysqltest1`; alter table t2 add unique (a)
+master-bin.000001 # Query # # use `mysqltest1`; drop function fn1
+master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` FUNCTION `fn1`(x int) RETURNS int(11)
begin
insert into t2 values(x),(x);
return 10;
end
-master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(100)
-master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(20)
-master-bin.000001 # Query 1 # use `mysqltest1`; delete from t1
-master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger trg before insert on t1 for each row set new.a= 10
-master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (1)
-master-bin.000001 # Query 1 # use `mysqltest1`; delete from t1
-master-bin.000001 # Query 1 # use `mysqltest1`; drop trigger trg
-master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (1)
-master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` PROCEDURE `foo`()
+master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(100)
+master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(20)
+master-bin.000001 # Query # # use `mysqltest1`; delete from t1
+master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger trg before insert on t1 for each row set new.a= 10
+master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values (1)
+master-bin.000001 # Query # # use `mysqltest1`; delete from t1
+master-bin.000001 # Query # # use `mysqltest1`; drop trigger trg
+master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values (1)
+master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` PROCEDURE `foo`()
READS SQL DATA
select * from t1
-master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo
-master-bin.000001 # Query 1 # use `mysqltest1`; drop function fn1
-master-bin.000001 # Query 1 # drop database mysqltest1
-master-bin.000001 # Query 1 # drop user "zedjzlcsjhd"@127.0.0.1
-master-bin.000001 # Query 1 # use `test`; drop function if exists f1
-master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
+master-bin.000001 # Query # # use `mysqltest1`; drop procedure foo
+master-bin.000001 # Query # # use `mysqltest1`; drop function fn1
+master-bin.000001 # Query # # drop database mysqltest1
+master-bin.000001 # Query # # drop user "zedjzlcsjhd"@127.0.0.1
+master-bin.000001 # Query # # use `test`; drop function if exists f1
+master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
READS SQL DATA
begin
declare var integer;
@@ -522,41 +522,41 @@ fetch c into var;
close c;
return var;
end
-master-bin.000001 # Query 1 # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 as a
-master-bin.000001 # Query 1 # use `test`; create table t1 (a int)
-master-bin.000001 # Query 1 # use `test`; insert into t1 (a) values (f1())
-master-bin.000001 # Query 1 # use `test`; drop view v1
-master-bin.000001 # Query 1 # use `test`; drop function f1
-master-bin.000001 # Query 1 # use `test`; DROP PROCEDURE IF EXISTS p1
-master-bin.000001 # Query 1 # use `test`; DROP TABLE IF EXISTS t1
-master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1(col VARCHAR(10))
-master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`(arg VARCHAR(10))
+master-bin.000001 # Query # # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 as a
+master-bin.000001 # Query # # use `test`; create table t1 (a int)
+master-bin.000001 # Query # # use `test`; insert into t1 (a) values (f1())
+master-bin.000001 # Query # # use `test`; drop view v1
+master-bin.000001 # Query # # use `test`; drop function f1
+master-bin.000001 # Query # # use `test`; DROP PROCEDURE IF EXISTS p1
+master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
+master-bin.000001 # Query # # use `test`; CREATE TABLE t1(col VARCHAR(10))
+master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`(arg VARCHAR(10))
INSERT INTO t1 VALUES(arg)
-master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES( NAME_CONST('arg',_latin1'test' COLLATE 'latin1_swedish_ci'))
-master-bin.000001 # Query 1 # use `test`; DROP PROCEDURE p1
-master-bin.000001 # Query 1 # use `test`; DROP PROCEDURE IF EXISTS p1
-master-bin.000001 # Query 1 # use `test`; DROP FUNCTION IF EXISTS f1
-master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
+master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES( NAME_CONST('arg',_latin1'test' COLLATE 'latin1_swedish_ci'))
+master-bin.000001 # Query # # use `test`; DROP PROCEDURE p1
+master-bin.000001 # Query # # use `test`; DROP PROCEDURE IF EXISTS p1
+master-bin.000001 # Query # # use `test`; DROP FUNCTION IF EXISTS f1
+master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
SET @a = 1
-master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
+master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
RETURN 0
-master-bin.000001 # Query 1 # use `test`; DROP PROCEDURE p1
-master-bin.000001 # Query 1 # use `test`; DROP FUNCTION f1
-master-bin.000001 # Query 1 # use `test`; drop table t1
-master-bin.000001 # Query 1 # drop database if exists mysqltest
-master-bin.000001 # Query 1 # drop database if exists mysqltest2
-master-bin.000001 # Query 1 # create database mysqltest
-master-bin.000001 # Query 1 # create database mysqltest2
-master-bin.000001 # Query 1 # use `mysqltest2`; create table t ( t integer )
-master-bin.000001 # Query 1 # use `mysqltest2`; CREATE DEFINER=`root`@`localhost` PROCEDURE `mysqltest`.`test`()
+master-bin.000001 # Query # # use `test`; DROP PROCEDURE p1
+master-bin.000001 # Query # # use `test`; DROP FUNCTION f1
+master-bin.000001 # Query # # use `test`; drop table t1
+master-bin.000001 # Query # # drop database if exists mysqltest
+master-bin.000001 # Query # # drop database if exists mysqltest2
+master-bin.000001 # Query # # create database mysqltest
+master-bin.000001 # Query # # create database mysqltest2
+master-bin.000001 # Query # # use `mysqltest2`; create table t ( t integer )
+master-bin.000001 # Query # # use `mysqltest2`; CREATE DEFINER=`root`@`localhost` PROCEDURE `mysqltest`.`test`()
begin end
-master-bin.000001 # Query 1 # use `mysqltest2`; insert into t values ( 1 )
-master-bin.000001 # Query 1 # use `mysqltest2`; CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
+master-bin.000001 # Query # # use `mysqltest2`; insert into t values ( 1 )
+master-bin.000001 # Query # # use `mysqltest2`; CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
begin
insert into t values (1);
return 0;
end
-master-bin.000001 # Query 1 # use `mysqltest`; SELECT `mysqltest2`.`f1`()
+master-bin.000001 # Query # # use `mysqltest`; SELECT `mysqltest2`.`f1`()
set @@global.log_bin_trust_routine_creators= @old_log_bin_trust_routine_creators;
Warnings:
Warning 1287 '@@log_bin_trust_routine_creators' is deprecated and will be removed in a future release. Please use '@@log_bin_trust_function_creators' instead
diff --git a/mysql-test/suite/rpl/r/rpl_ssl.result b/mysql-test/suite/rpl/r/rpl_ssl.result
index d188dd353ce..1af4c5e227c 100644
--- a/mysql-test/suite/rpl/r/rpl_ssl.result
+++ b/mysql-test/suite/rpl/r/rpl_ssl.result
@@ -19,89 +19,23 @@ insert into t1 values(1);
select * from t1;
t
1
-show slave status;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User replssl
-Master_Port MASTER_MYPORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
Master_SSL_Allowed Yes
-Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem
Master_SSL_CA_Path
+Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem
Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem
-Master_SSL_Cipher
Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
STOP SLAVE;
select * from t1;
t
1
insert into t1 values (NULL);
-show slave status;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User replssl
-Master_Port MASTER_MYPORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
Master_SSL_Allowed Yes
-Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem
Master_SSL_CA_Path
+Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem
Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem
-Master_SSL_Cipher
Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
drop user replssl@localhost;
drop table t1;
End of 5.0 tests
diff --git a/mysql-test/suite/rpl/r/rpl_ssl1.result b/mysql-test/suite/rpl/r/rpl_ssl1.result
index 74d2550cdaf..5b4aa126c77 100644
--- a/mysql-test/suite/rpl/r/rpl_ssl1.result
+++ b/mysql-test/suite/rpl/r/rpl_ssl1.result
@@ -18,89 +18,23 @@ start slave;
select * from t1;
t
1
-show slave status;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User replssl
-Master_Port MASTER_MYPORT
-Connect_Retry 1
-Master_Log_File #
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File #
-Slave_IO_Running #
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
Master_SSL_Allowed Yes
-Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem
Master_SSL_CA_Path
+Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem
Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem
-Master_SSL_Cipher
Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
stop slave;
change master to master_user='root',master_password='', master_ssl=0;
start slave;
drop user replssl@localhost;
drop table t1;
-show slave status;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_MYPORT
-Connect_Retry 1
-Master_Log_File #
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File #
-Slave_IO_Running #
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
Master_SSL_Allowed No
-Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem
Master_SSL_CA_Path
+Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem
Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem
-Master_SSL_Cipher
Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
stop slave;
change master to
master_host="localhost",
@@ -116,43 +50,10 @@ on slave
select * from t1;
t
1
-show slave status;
-Slave_IO_State #
-Master_Host localhost
-Master_User root
-Master_Port MASTER_MYPORT
-Connect_Retry 1
-Master_Log_File #
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File #
-Slave_IO_Running #
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
Master_SSL_Allowed Yes
-Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem
Master_SSL_CA_Path
+Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem
Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem
-Master_SSL_Cipher
Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert Yes
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
drop table t1;
diff --git a/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result b/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result
index ea2a9ce9a79..fe2fb1d9da2 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result
@@ -12,16 +12,12 @@ create table t4 (a int);
insert into t4 select * from t3;
rename table t1 to t5, t2 to t1;
flush no_write_to_binlog tables;
-SHOW BINLOG EVENTS FROM 684 ;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1
+master-bin.000001 # Query # # use `test`; rename table t1 to t5, t2 to t1
select * from t3;
a
flush tables;
-SHOW BINLOG EVENTS FROM 684 ;
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1
-master-bin.000001 # Query 1 # use `test`; flush tables
select * from t3;
a
stop slave;
diff --git a/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result b/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result
index 70aeb733769..1c24b2ca15b 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result
@@ -52,18 +52,18 @@ CREATE TABLE t1(a int, UNIQUE(a));
INSERT DELAYED IGNORE INTO t1 VALUES(1);
INSERT DELAYED IGNORE INTO t1 VALUES(1);
flush table t1;
-show binlog events in 'master-bin.000002' LIMIT 2,2;
+show binlog events in 'master-bin.000002' from <binlog_start> limit 1,2;
Log_name Pos Event_type Server_id End_log_pos Info
-x x x x x use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
-x x x x x use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
+master-bin.000002 # Query # # use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
+master-bin.000002 # Query # # use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
select * from t1;
a
1
On slave
-show binlog events in 'slave-bin.000002' LIMIT 2,2;
+show binlog events in 'slave-bin.000002' from <binlog_start> limit 1,2;
Log_name Pos Event_type Server_id End_log_pos Info
-x x x x x use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
-x x x x x use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
+slave-bin.000002 # Query # # use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
+slave-bin.000002 # Query # # use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
select * from t1;
a
1
@@ -112,24 +112,14 @@ id name
USE test;
DROP SCHEMA mysqlslap;
use test;
-FLUSH LOGS;
-FLUSH LOGS;
CREATE TABLE t1(a int, UNIQUE(a));
INSERT DELAYED IGNORE INTO t1 VALUES(1);
INSERT DELAYED IGNORE INTO t1 VALUES(1);
flush table t1;
-show binlog events in 'master-bin.000002' LIMIT 2,2;
-Log_name Pos Event_type Server_id End_log_pos Info
-x x x x x use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
-x x x x x use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
select * from t1;
a
1
On slave
-show binlog events in 'slave-bin.000002' LIMIT 2,2;
-Log_name Pos Event_type Server_id End_log_pos Info
-x x x x x use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
-x x x x x use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
select * from t1;
a
1
diff --git a/mysql-test/suite/rpl/r/rpl_stm_log.result b/mysql-test/suite/rpl/r/rpl_stm_log.result
index 47556a33e97..d73a689969f 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_log.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_log.result
@@ -7,7 +7,7 @@ start slave;
include/stop_slave.inc
reset master;
reset slave;
-start slave;
+include/start_slave.inc
create table t1(n int not null auto_increment primary key)ENGINE=MyISAM;
insert into t1 values (NULL);
drop table t1;
@@ -16,26 +16,25 @@ load data infile 'LOAD_FILE' into table t1 ignore 1 lines;
select count(*) from t1;
count(*)
69
-show binlog events;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
-master-bin.000001 # Intvar 1 # INSERT_ID=1
-master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL)
-master-bin.000001 # Query 1 # use `test`; drop table t1
-master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
-master-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581
-master-bin.000001 # Execute_load_query 1 # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' IGNORE 1 LINES (`word`) ;file_id=1
-show binlog events from 106 limit 1;
+master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
+master-bin.000001 # Intvar # # INSERT_ID=1
+master-bin.000001 # Query # # use `test`; insert into t1 values (NULL)
+master-bin.000001 # Query # # use `test`; drop table t1
+master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
+master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
+master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' IGNORE 1 LINES (`word`) ;file_id=#
+show binlog events from <binlog_start> limit 1;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
-show binlog events from 106 limit 2;
+master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
+show binlog events from <binlog_start> limit 2;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
-master-bin.000001 # Intvar 1 # INSERT_ID=1
-show binlog events from 106 limit 2,1;
+master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
+master-bin.000001 # Intvar # # INSERT_ID=1
+show binlog events from <binlog_start> limit 2,1;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL)
+master-bin.000001 # Query # # use `test`; insert into t1 values (NULL)
flush logs;
create table t3 (a int)ENGINE=MyISAM;
select * from t1 order by 1 asc;
@@ -195,12 +194,11 @@ master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not nul
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' IGNORE 1 LINES (`word`) ;file_id=#
master-bin.000001 # Rotate # # master-bin.000002;pos=4
-show binlog events in 'master-bin.000002';
+show binlog events in 'master-bin.000002' from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM
-master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM
-master-bin.000002 # Query 1 # use `test`; insert into t2 values (1)
+master-bin.000002 # Query # # use `test`; create table t3 (a int)ENGINE=MyISAM
+master-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=MyISAM
+master-bin.000002 # Query # # use `test`; insert into t2 values (1)
show binary logs;
Log_name File_size
master-bin.000001 #
@@ -209,62 +207,22 @@ show binary logs;
Log_name File_size
slave-bin.000001 #
slave-bin.000002 #
-show binlog events in 'slave-bin.000001' from 4;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
-slave-bin.000001 # Intvar 1 # INSERT_ID=1
-slave-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL)
-slave-bin.000001 # Query 1 # use `test`; drop table t1
-slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
-slave-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581
-slave-bin.000001 # Execute_load_query 1 # use `test`; LOAD DATA INFILE '../../tmp/SQL_LOAD-2-1-1.data' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' IGNORE 1 LINES (`word`) ;file_id=1
-slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM
-slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
-show binlog events in 'slave-bin.000002' from 4;
+slave-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
+slave-bin.000001 # Intvar # # INSERT_ID=1
+slave-bin.000001 # Query # # use `test`; insert into t1 values (NULL)
+slave-bin.000001 # Query # # use `test`; drop table t1
+slave-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
+slave-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
+slave-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../tmp/SQL_LOAD-2-1-1.data' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' IGNORE 1 LINES (`word`) ;file_id=#
+slave-bin.000001 # Query # # use `test`; create table t3 (a int)ENGINE=MyISAM
+slave-bin.000001 # Rotate # # slave-bin.000002;pos=4
+show binlog events in 'slave-bin.000002' from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM
-slave-bin.000002 # Query 1 # use `test`; insert into t2 values (1)
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000002
-Read_Master_Log_Pos 392
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000002
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos 392
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+slave-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=MyISAM
+slave-bin.000002 # Query # # use `test`; insert into t2 values (1)
+Checking that both slave threads are running.
show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result b/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result
index 2215b34814e..db06cb6d3de 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result
@@ -21,45 +21,7 @@ select @@global.max_relay_log_size;
@@global.max_relay_log_size
4096
start slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
#
# Test 2
#
@@ -69,45 +31,7 @@ set global max_relay_log_size=(5*4096);
select @@global.max_relay_log_size;
@@global.max_relay_log_size 20480
start slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
#
# Test 3: max_relay_log_size = 0
#
@@ -117,90 +41,13 @@ set global max_relay_log_size=0;
select @@global.max_relay_log_size;
@@global.max_relay_log_size 0
start slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
#
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
#
stop slave;
reset slave;
flush logs;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File
-Slave_IO_Running No
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
#
# Test 5
#
@@ -208,89 +55,13 @@ reset slave;
start slave;
flush logs;
create table t1 (a int);
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
#
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
#
flush logs;
drop table t1;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
flush logs;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
diff --git a/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result b/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result
index 03223166f44..2ecaf2c90ae 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result
@@ -868,3 +868,24 @@ DROP TABLE nt_4;
DROP PROCEDURE pc_i_tt_3;
DROP FUNCTION f1;
DROP FUNCTION f2;
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+CREATE TABLE `t1` (
+`c1` int(10) unsigned NOT NULL AUTO_INCREMENT,
+`c2` tinyint(1) unsigned DEFAULT NULL,
+`c3` varchar(300) DEFAULT NULL,
+`c4` int(10) unsigned NOT NULL,
+`c5` int(10) unsigned DEFAULT NULL,
+PRIMARY KEY (`c1`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+ALTER TABLE `t1` Engine=InnoDB;
+SET AUTOCOMMIT=0;
+INSERT INTO t1 (c1,c2,c3,c4,c5) VALUES (1, 1, 'X', 1, NULL);
+COMMIT;
+ROLLBACK;
+SET AUTOCOMMIT=1;
+Comparing tables master:test.t1 and slave:test.t1
+DROP TABLE `t1`;
diff --git a/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result
index 78d9d7c41eb..1fc189975ef 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result
@@ -4,196 +4,37 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-stop slave;
-change master to master_user='test';
-SHOW SLAVE STATUS;
-Slave_IO_State #
Master_Host 127.0.0.1
+include/stop_slave.inc
+change master to master_user='test';
Master_User test
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running No
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-reset slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
Master_Host 127.0.0.1
+reset slave;
Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File
-Slave_IO_Running No
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-start slave;
-SHOW SLAVE STATUS;
-Slave_IO_State #
Master_Host 127.0.0.1
+include/start_slave.inc
Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-stop slave;
+Master_Host 127.0.0.1
+include/stop_slave.inc
reset slave;
-start slave;
+include/start_slave.inc
create temporary table t1 (a int);
-stop slave;
+include/stop_slave.inc
reset slave;
-start slave;
+include/start_slave.inc
show status like 'slave_open_temp_tables';
Variable_name Value
Slave_open_temp_tables 1
-stop slave;
+include/stop_slave.inc
reset slave;
-*** errno must be zero: 0 ***
change master to master_user='impossible_user_name';
start slave;
-ONE
-1
include/stop_slave.inc
change master to master_user='root';
include/start_slave.inc
-*** last errno must be zero: 0 ***
-*** last error must be blank: ***
include/stop_slave.inc
change master to master_user='impossible_user_name';
start slave;
-ONE
-1
include/stop_slave.inc
reset slave;
-*** io last errno must be zero: 0 ***
-*** io last error must be blank: ***
-*** sql last errno must be zero: 0 ***
-*** sql last error must be blank: ***
diff --git a/mysql-test/suite/rpl/r/rpl_stm_until.result b/mysql-test/suite/rpl/r/rpl_stm_until.result
index 644baba0335..118d31d78c8 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_until.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_until.result
@@ -17,199 +17,43 @@ insert into t2 values (3),(4);
drop table t2;
==== Replicate one event at a time on slave ====
[on slave]
-start slave until master_log_file='master-bin.000001', master_log_pos=323;
+start slave until master_log_file='MASTER_LOG_FILE', master_log_pos=MASTER_LOG_POS;
select * from t1;
n
1
2
3
4
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition Master
-Until_Log_File master-bin.000001
-Until_Log_Pos 323
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
+start slave until master_log_file='master-no-such-bin.000001', master_log_pos=MASTER_LOG_POS;
select * from t1;
n
1
2
3
4
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition Master
-Until_Log_File master-no-such-bin.000001
-Until_Log_Pos 291
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
-start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746;
+start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=RELAY_LOG_POS;
select * from t2;
n
1
2
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition Relay
-Until_Log_File slave-relay-bin.000004
-Until_Log_Pos 746
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
start slave;
[on master]
[on slave]
include/stop_slave.inc
-start slave until master_log_file='master-bin.000001', master_log_pos=776;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition Master
-Until_Log_File master-bin.000001
-Until_Log_Pos 776
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+start slave until master_log_file='MASTER_LOG_FILE', master_log_pos=MASTER_LOG_POS;
==== Test various error conditions ====
-start slave until master_log_file='master-bin', master_log_pos=561;
+start slave until master_log_file='master-bin', master_log_pos=MASTER_LOG_POS;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
-start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;
+start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_LOG_POS, relay_log_pos=RELAY_LOG_POS;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
start slave until master_log_file='master-bin.000001';
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
start slave until relay_log_file='slave-relay-bin.000002';
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
-start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561;
+start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=MASTER_LOG_POS;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
start slave sql_thread;
-start slave until master_log_file='master-bin.000001', master_log_pos=776;
+start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_LOG_POS;
Warnings:
Note 1254 Slave is already running
include/stop_slave.inc
@@ -230,7 +74,7 @@ insert into t1 set a=null;
select count(*) as two from t1;
two
2
-start slave until master_log_file='master-bin.000001', master_log_pos= UNTIL_POS;;
+start slave until master_log_file='MASTER_LOG_FILE', master_log_pos= UNTIL_POS;;
slave stopped at the prescribed position
select 0 as zero;
zero
diff --git a/mysql-test/suite/rpl/r/rpl_temporary_errors.result b/mysql-test/suite/rpl/r/rpl_temporary_errors.result
index e5d9ea5837c..023f9a850ab 100644
--- a/mysql-test/suite/rpl/r/rpl_temporary_errors.result
+++ b/mysql-test/suite/rpl/r/rpl_temporary_errors.result
@@ -40,46 +40,65 @@ a b
2 2
3 3
4 4
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
DROP TABLE t1;
**** On Master ****
+SET SQL_LOG_BIN= 0;
DROP TABLE t1;
+SET SQL_LOG_BIN= 1;
+SET SESSION BINLOG_FORMAT=MIXED;
+CREATE TABLE t_myisam (id INT, PRIMARY KEY (id)) engine= MyIsam;
+INSERT INTO t_myisam (id) VALUES(1);
+CREATE TABLE t_innodb (id INT) engine= Innodb;
+INSERT INTO t_innodb (id) VALUES(1);
+BEGIN;
+INSERT INTO t_innodb(id) VALUES(2);
+INSERT INTO t_myisam(id) VALUES(3);
+CREATE TEMPORARY TABLE x (id INT);
+INSERT INTO t_myisam(id) VALUES(4),(1);
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+INSERT INTO t_innodb(id) VALUES(5);
+COMMIT;
+SELECT * FROM t_innodb;
+id
+1
+2
+5
+SELECT * FROM t_myisam;
+id
+1
+3
+4
+SELECT * FROM t_innodb;
+id
+1
+2
+5
+SELECT * FROM t_myisam;
+id
+1
+3
+4
+BEGIN;
+CREATE TEMPORARY TABLE tmp2 SELECT * FROM t_innodb;
+INSERT INTO t_innodb(id) VALUES(1);
+INSERT INTO t_innodb(id) VALUES(1);
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO t_innodb(id) VALUES(2)
+master-bin.000001 # Query # # use `test`; INSERT INTO t_myisam(id) VALUES(3)
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE x (id INT)
+master-bin.000001 # Query # # use `test`; INSERT INTO t_myisam(id) VALUES(4),(1)
+master-bin.000001 # Query # # use `test`; INSERT INTO t_innodb(id) VALUES(5)
+master-bin.000001 # Xid # # COMMIT /* XID */
+master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tmp2 SELECT * FROM t_innodb
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Query # # use `test`; INSERT INTO t_innodb(id) VALUES(1)
+master-bin.000001 # Query # # use `test`; INSERT INTO t_innodb(id) VALUES(1)
+master-bin.000001 # Query # # ROLLBACK
+DROP TABLE t_myisam, t_innodb;
STOP SLAVE;
diff --git a/mysql-test/suite/rpl/t/rpl_000015-slave.opt b/mysql-test/suite/rpl/t/rpl_000015-slave.opt
deleted file mode 100644
index 28bc753dd56..00000000000
--- a/mysql-test/suite/rpl/t/rpl_000015-slave.opt
+++ /dev/null
@@ -1 +0,0 @@
---server-id=22 --master-connect-retry=7
diff --git a/mysql-test/suite/rpl/t/rpl_000015.cnf b/mysql-test/suite/rpl/t/rpl_000015.cnf
deleted file mode 100644
index 46f8af242c2..00000000000
--- a/mysql-test/suite/rpl/t/rpl_000015.cnf
+++ /dev/null
@@ -1,2 +0,0 @@
-!include ../rpl_1slave_base.cnf
-
diff --git a/mysql-test/suite/rpl/t/rpl_000015.test b/mysql-test/suite/rpl/t/rpl_000015.test
deleted file mode 100644
index 45a43cd38d0..00000000000
--- a/mysql-test/suite/rpl/t/rpl_000015.test
+++ /dev/null
@@ -1,40 +0,0 @@
--- source include/have_log_bin.inc
-#####################
-# Change Author: JBM
-# Change Date: 2006-01-17
-# Change: added order by in select
-#####################
-
-connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
-connect (slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK);
-connection master;
-reset master;
-source include/show_master_status.inc;
-save_master_pos;
-connection slave;
-reset slave;
-source include/show_slave_status2.inc;
-
-change master to master_host='127.0.0.1';
-# The following needs to be cleaned up when change master is fixed
-source include/show_slave_status2.inc;
---replace_result $MASTER_MYPORT MASTER_PORT
-eval change master to master_host='127.0.0.1',master_user='root',
- master_password='',master_port=$MASTER_MYPORT;
-source include/show_slave_status2.inc;
-start slave;
-sync_with_master;
-source include/show_slave_status2.inc;
-connection master;
---disable_warnings
-drop table if exists t1;
---enable_warnings
-create table t1 (n int, PRIMARY KEY(n));
-insert into t1 values (10),(45),(90);
-sync_slave_with_master;
-connection slave;
-SELECT * FROM t1 ORDER BY n;
-connection master;
-SELECT * FROM t1 ORDER BY n;
-drop table t1;
-sync_slave_with_master;
diff --git a/mysql-test/suite/rpl/t/rpl_binlog_grant.test b/mysql-test/suite/rpl/t/rpl_binlog_grant.test
index 31163927ce2..4c6402359fe 100644
--- a/mysql-test/suite/rpl/t/rpl_binlog_grant.test
+++ b/mysql-test/suite/rpl/t/rpl_binlog_grant.test
@@ -20,26 +20,24 @@ set @@autocommit=0;
start transaction;
insert into t values (1);
grant select on t to x@y;
+let $wait_binlog_event= grant select;
+source include/wait_for_binlog_event.inc;
#
# There is no active transaction here
#
rollback;
show grants for x@y;
---replace_result $VERSION VERSION
---replace_regex /\/\* xid=.* \*\//\/* XID *\//
-show binlog events;
start transaction;
insert into t values (2);
revoke select on t from x@y;
+let $wait_binlog_event= revoke select;
+source include/wait_for_binlog_event.inc;
#
# There is no active transaction here
#
commit;
select * from t;
show grants for x@y;
---replace_result $VERSION VERSION
---replace_regex /\/\* xid=.* \*\//\/* XID *\//
-show binlog events;
drop user x@y;
drop database d1;
--sync_slave_with_master
diff --git a/mysql-test/suite/rpl/t/rpl_bug33931.test b/mysql-test/suite/rpl/t/rpl_bug33931.test
index 1316ddb7401..3327a36622c 100644
--- a/mysql-test/suite/rpl/t/rpl_bug33931.test
+++ b/mysql-test/suite/rpl/t/rpl_bug33931.test
@@ -37,9 +37,10 @@ connection slave;
#
source include/wait_for_slave_to_stop.inc;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 19 # 23 # 33 # 37 #
-query_vertical show slave status;
+# 1593 = ER_SLAVE_FATAL_ERROR
+--let $slave_sql_errno= 1593
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error.inc
#
# Cleanup
diff --git a/mysql-test/suite/rpl/t/rpl_change_master.test b/mysql-test/suite/rpl/t/rpl_change_master.test
index d0cd40e2e11..33bd9d51b11 100644
--- a/mysql-test/suite/rpl/t/rpl_change_master.test
+++ b/mysql-test/suite/rpl/t/rpl_change_master.test
@@ -19,10 +19,26 @@ let $slave_param= Read_Master_Log_Pos;
let $slave_param_value= query_get_value(SHOW MASTER STATUS, Position, 1);
connection slave;
source include/wait_for_slave_param.inc;
-stop slave;
-source include/show_slave_status2.inc;
+source include/stop_slave.inc;
+
+let $read_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1);
+let $exec_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
+if (`SELECT $read_pos = $exec_pos`)
+{
+ source include/show_rpl_debug_info.inc;
+ echo 'Read_Master_Log_Pos: $read_pos' == 'Exec_Master_Log_Pos: $exec_pos';
+ die Failed because Read_Master_Log_Pos is equal to Exec_Master_Log_Pos;
+}
change master to master_user='root';
-source include/show_slave_status2.inc;
+let $read_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1);
+let $exec_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
+if (`SELECT $read_pos <> $exec_pos`)
+{
+ source include/show_rpl_debug_info.inc;
+ echo 'Read_Master_Log_Pos: $read_pos' <> 'Exec_Master_Log_Pos: $exec_pos';
+ die Failed because Read_Master_Log_Pos is not equal to Exec_Master_Log_Pos;
+}
+
start slave;
sync_with_master;
select * from t1;
diff --git a/mysql-test/suite/rpl/t/rpl_critical_errors.test b/mysql-test/suite/rpl/t/rpl_critical_errors.test
index b35cd305f92..aa1f251b738 100644
--- a/mysql-test/suite/rpl/t/rpl_critical_errors.test
+++ b/mysql-test/suite/rpl/t/rpl_critical_errors.test
@@ -53,15 +53,13 @@ KILL QUERY 2;
connection slave;
# Here the slave will only stop if the query above actually started
-# inserting some rows into t2. Otherwise, it will hang forever.
---source include/wait_for_slave_to_stop.inc
+# inserting some rows into t2. Otherwise, it will hang forever. ... and there
+# the error code should be 1317 (ER_QUERY_INTERRUPTED)
+--let $slave_sql_errno= 1317
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error.inc
# The following should be 0
SELECT COUNT(*) FROM t2;
-# ... and there the error code should be 1317 (ER_QUERY_INTERRUPTED)
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 7 # 8 # 9 # 20 # 22 # 23 # 33 #
-query_vertical SHOW SLAVE STATUS;
-
enable_parsing;
diff --git a/mysql-test/suite/rpl/t/rpl_do_grant.test b/mysql-test/suite/rpl/t/rpl_do_grant.test
index 29e1eb5e1c6..b0799b57f6a 100644
--- a/mysql-test/suite/rpl/t/rpl_do_grant.test
+++ b/mysql-test/suite/rpl/t/rpl_do_grant.test
@@ -120,6 +120,9 @@ show grants for rpl_do_grant2@localhost;
# BUG42217 mysql.procs_priv does not get replicated
#####################################################
connection master;
+call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
+sync_slave_with_master;
+connection master;
--disable_warnings
DROP DATABASE IF EXISTS bug42217_db;
@@ -129,8 +132,8 @@ CREATE DATABASE bug42217_db;
GRANT CREATE ROUTINE ON bug42217_db.* TO 'create_rout_db'@'localhost'
IDENTIFIED BY 'create_rout_db' WITH GRANT OPTION;
-sync_slave_with_master;
-connection master;
+-- sync_slave_with_master
+-- connection master
connect (create_rout_db_master, localhost, create_rout_db, create_rout_db, bug42217_db,$MASTER_MYPORT,);
connect (create_rout_db_slave, localhost, create_rout_db, create_rout_db, bug42217_db, $SLAVE_MYPORT,);
@@ -210,18 +213,26 @@ DROP FUNCTION upgrade_del_func;
DROP FUNCTION upgrade_alter_func;
DROP DATABASE bug42217_db;
-call mtr.add_suppression("Slave: Operation DROP USER failed for 'create_rout_db'@'localhost' Error_code: 1396");
-
-sync_slave_with_master;
-
+-- sync_slave_with_master
# Drop the user that was already dropped on the slave
connection slave;
--disable_warnings
stop slave;
connection master;
+
+# user was already dropped in the slave before
+# so no need to wait for the slave to replicate
+# this statement (if it did and we later synced
+# the slave it would end up in an error anyway)
DROP USER 'create_rout_db'@'localhost';
+
--enable_warnings
+# finish entire clean up (remove binlogs)
+# so that we leave a pristine environment for the
+# following tests
+-- source include/master-slave-reset.inc
+
# BUG#49119: Master crashes when executing 'REVOKE ... ON
# {PROCEDURE|FUNCTION} FROM ...'
#
diff --git a/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test b/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test
index 9efb3d16d2b..ab1de6a2e9f 100644
--- a/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test
+++ b/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test
@@ -21,52 +21,51 @@ connection master;
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval change master to master_host="127.0.0.1",master_port=$SLAVE_MYPORT,master_user="root";
-start slave;
+source include/start_slave.inc;
# now we test it
connection slave;
create table t1 (n int);
+let $master_log_file= query_get_value(SHOW MASTER STATUS, File, 1);
+let $master_log_pos_1= query_get_value(SHOW MASTER STATUS, Position, 1);
+let $master_log_pos_1= `SELECT $master_log_pos_1 + 3`;
-save_master_pos;
-connection master;
-sync_with_master;
+sync_slave_with_master master;
#
# BUG#13861 - START SLAVE UNTIL may stop 1 evnt too late if
# log-slave-updates and circul repl
#
-stop slave;
+source include/stop_slave.inc;
create table t2 (n int); # create one ignored event
-save_master_pos;
-connection slave;
-sync_with_master;
-
-connection slave;
+sync_slave_with_master;
show tables;
-save_master_pos;
-
create table t3 (n int) engine=innodb;
+let $master_log_pos_2= query_get_value(SHOW MASTER STATUS, Position, 1);
+let $master_log_pos_2= `SELECT $master_log_pos_2 + 5`;
set @a=1;
insert into t3 values(@a);
+let $master_log_pos_3= query_get_value(SHOW MASTER STATUS, Position, 1);
+let $master_log_pos_3= `SELECT $master_log_pos_3 + 5`;
begin;
insert into t3 values(2);
insert into t3 values(3);
commit;
insert into t3 values(4);
-
connection master;
# bug is that START SLAVE UNTIL may stop too late, we test that by
# asking it to stop before creation of t3.
-start slave until master_log_file="slave-bin.000001",master_log_pos=195;
+--replace_result $master_log_file MASTER_LOG_FILE $master_log_pos_1 MASTER_LOG_POS
+eval start slave until master_log_file="$master_log_file",master_log_pos=$master_log_pos_1;
--source include/wait_for_slave_sql_to_stop.inc
# then BUG#13861 causes t3 to show up below (because stopped too
@@ -75,16 +74,18 @@ start slave until master_log_file="slave-bin.000001",master_log_pos=195;
show tables;
# ensure that we do not break set @a=1; insert into t3 values(@a);
-start slave until master_log_file="slave-bin.000001",master_log_pos=438;
+--replace_result $master_log_file MASTER_LOG_FILE $master_log_pos_2 MASTER_LOG_POS
+eval start slave until master_log_file="$master_log_file",master_log_pos=$master_log_pos_2;
--source include/wait_for_slave_sql_to_stop.inc
select * from t3;
# ensure that we do not break transaction
-start slave until master_log_file="slave-bin.000001",master_log_pos=663;
+--replace_result $master_log_file MASTER_LOG_FILE $master_log_pos_3 MASTER_LOG_POS
+eval start slave until master_log_file="$master_log_file",master_log_pos=$master_log_pos_3;
--source include/wait_for_slave_sql_to_stop.inc
select * from t3;
-start slave;
+source include/start_slave.inc;
# BUG#13023 is that Exec_master_log_pos may stay too low "forever":
@@ -94,31 +95,20 @@ create table t4 (n int); # create 3 ignored events
create table t5 (n int);
create table t6 (n int);
-save_master_pos;
-connection slave;
-sync_with_master;
-
-connection slave;
-
-save_master_pos;
-
-connection master;
+sync_slave_with_master;
+sync_slave_with_master master;
# then BUG#13023 caused hang below ("master" looks behind, while it's
# not in terms of updates done).
-sync_with_master;
-
show tables;
# cleanup
-stop slave;
+source include/stop_slave.inc;
reset slave;
drop table t1,t2,t3,t4,t5,t6;
-save_master_pos;
-connection slave;
-sync_with_master;
+sync_slave_with_master;
# End of 4.1 tests
diff --git a/mysql-test/suite/rpl/t/rpl_empty_master_crash.test b/mysql-test/suite/rpl/t/rpl_empty_master_crash.test
index f8e7870ae3c..863b450a6d9 100644
--- a/mysql-test/suite/rpl/t/rpl_empty_master_crash.test
+++ b/mysql-test/suite/rpl/t/rpl_empty_master_crash.test
@@ -1,7 +1,5 @@
source include/master-slave.inc;
-source include/show_slave_status.inc;
-
#
# Load table should not succeed on the master as this is not a slave
#
diff --git a/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test b/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test
index bf71ffbfd1e..aa2dee0fe57 100644
--- a/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test
+++ b/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test
@@ -126,7 +126,7 @@ connection master;
# Parameters for include/wait_for_slave_sql_error_and_skip.inc:
# Ask it to show SQL error message.
-let $show_sql_error= 1;
+let $show_slave_sql_error= 1;
# The expected error will always be 1146 (ER_NO_SUCH_TABLE).
let $slave_sql_errno= 1146;
diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test
index a8befe612c2..487f910ba2b 100644
--- a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test
+++ b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test
@@ -36,7 +36,6 @@ source include/start_slave.inc;
# 2. Insert into t1 on slave (2nd) when the event (1st) for t1 replicated.
# 3. Master waits until the event (2nd) for t1 will be replicated.
---disable_query_log
CREATE TABLE t1 (a INT KEY) ENGINE= MyISAM;
let $wait_binlog_event= CREATE TABLE t1;
--source include/wait_for_binlog_event.inc
@@ -44,31 +43,20 @@ sync_slave_with_master;
connection master;
INSERT INTO t1 VALUE(1);
---enable_query_log
FLUSH LOGS;
-let $slave_param_value= query_get_value(SHOW MASTER STATUS, Position, 1);
-
-connection slave;
-let $slave_param= Exec_Master_Log_Pos;
-source include/wait_for_slave_param.inc;
+sync_slave_with_master;
---disable_query_log
INSERT INTO t1 VALUE(2);
let $slave_param_value= query_get_value(SHOW MASTER STATUS, Position, 1);
---enable_query_log
-
-connection master;
-let $slave_param= Exec_Master_Log_Pos;
-source include/wait_for_slave_param.inc;
-
---enable_query_log
+sync_slave_with_master master;
#
-# Show status of slave
+# Check that the master server's slave threads are still running and show
+# Relay_Log_File
#
---replace_result $SLAVE_MYPORT SLAVE_PORT $slave_param_value POSITION
---replace_column 1 # 8 # 9 # 16 # 23 # 33 # 34 # 35 #
---query_vertical SHOW SLAVE STATUS
+--source include/check_slave_is_running.inc
+--let status_items= Relay_Log_File
+--source include/show_slave_status.inc
--disable_query_log
connection master;
diff --git a/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test b/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
index 4a9276d9880..28f13c17042 100644
--- a/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
+++ b/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
@@ -57,14 +57,10 @@ source include/stop_slave.inc;
eval change master to master_port=$SLAVE_MYPORT;
start slave;
-let $slave_param= Last_IO_Errno;
-let $slave_param_value= 1593;
-source include/wait_for_slave_param.inc;
--echo *** must be having the replicate-same-server-id IO thread error ***
-let $last_io_errno= query_get_value("show slave status", Last_IO_Errno, 1);
-let $last_io_error= query_get_value("show slave status", Last_IO_Error, 1);
-echo Slave_IO_Errno= $last_io_errno;
-echo Slave_IO_Error= $last_io_error;
+let $slave_io_errno= 1593;
+let $show_slave_io_error= 1;
+source include/wait_for_slave_io_error.inc;
# cleanup
diff --git a/mysql-test/suite/rpl/t/rpl_grant.test b/mysql-test/suite/rpl/t/rpl_grant.test
index 50b243eab92..6fbdafc0f9c 100644
--- a/mysql-test/suite/rpl/t/rpl_grant.test
+++ b/mysql-test/suite/rpl/t/rpl_grant.test
@@ -36,5 +36,3 @@ sync_slave_with_master;
--echo **** On Slave ****
SELECT user,host FROM mysql.user WHERE user like 'dummy%';
SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%';
-
-source include/show_slave_status2.inc;
diff --git a/mysql-test/suite/rpl/t/rpl_incident.test b/mysql-test/suite/rpl/t/rpl_incident.test
index 66893ebb93f..08096d03c11 100644
--- a/mysql-test/suite/rpl/t/rpl_incident.test
+++ b/mysql-test/suite/rpl/t/rpl_incident.test
@@ -16,6 +16,7 @@ SELECT * FROM t1;
connection slave;
# Wait until SQL thread stops with error LOST_EVENT on master
let $slave_sql_errno= 1590;
+let $show_slave_sql_error= 1;
source include/wait_for_slave_sql_error.inc;
# The 4 should not be inserted into the table, since the incident log
@@ -23,10 +24,6 @@ source include/wait_for_slave_sql_error.inc;
--echo **** On Slave ****
SELECT * FROM t1;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 6 # 7 # 8 # 9 # 22 # 23 # 33 #
---query_vertical SHOW SLAVE STATUS
-
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
--sync_with_master
@@ -35,9 +32,7 @@ START SLAVE;
# should be running. We should also have rotated to a new binary log.
SELECT * FROM t1;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 6 # 7 # 8 # 9 # 22 # 23 # 33 #
---query_vertical SHOW SLAVE STATUS
+source include/check_slave_is_running.inc;
connection master;
DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test b/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test
index b300603f454..5b31b094b62 100644
--- a/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test
+++ b/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test
@@ -26,9 +26,11 @@ INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10;
SELECT * FROM t1;
connection slave;
--source include/wait_for_slave_sql_to_stop.inc
-# show the error message
---replace_column 1 # 4 # 7 # 8 # 9 # 23 # 33 #
---query_vertical show slave status;
+# show the error message
+#1105 = ER_UNKNOWN_ERROR
+--let $slave_sql_errno= 1105
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error.inc
# show that it was not replicated
SELECT * FROM t1;
@@ -81,8 +83,10 @@ SELECT * FROM t1;
connection slave;
--source include/wait_for_slave_sql_to_stop.inc
# show the error message
---replace_column 1 # 4 # 7 # 8 # 9 # 23 # 33 #
---query_vertical show slave status;
+#1105 = ER_UNKNOWN_ERROR
+--let $slave_sql_errno= 1105
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error.inc
# show that it was not replicated
SELECT * FROM t1;
connection master;
diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test b/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test
index b7d9995c834..e80fc160d8f 100644
--- a/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test
+++ b/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test
@@ -8,7 +8,6 @@ connection master;
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (1,10);
sync_slave_with_master;
-source include/show_slave_status.inc;
# Now we feed it a load data infile, which should make it stop with a
# fatal error.
@@ -16,12 +15,9 @@ connection master;
LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE t1;
connection slave;
-wait_for_slave_to_stop;
-source include/show_slave_status.inc;
-
-connection slave;
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
-START SLAVE;
+let $slave_sql_errno= 1593;
+let $show_slave_sql_error= 1;
+source include/wait_for_slave_sql_error_and_skip.inc;
connection master;
DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/t/rpl_log_pos.test b/mysql-test/suite/rpl/t/rpl_log_pos.test
index 48effa00b64..239ddc5c8d4 100644
--- a/mysql-test/suite/rpl/t/rpl_log_pos.test
+++ b/mysql-test/suite/rpl/t/rpl_log_pos.test
@@ -16,14 +16,16 @@ source include/show_master_status.inc;
sync_slave_with_master;
source include/stop_slave.inc;
+--replace_result 75 MASTER_LOG_POS
change master to master_log_pos=75;
-source include/show_slave_status2.inc;
+let $status_items= Read_Master_Log_Pos;
+source include/show_slave_status.inc;
start slave;
-source include/wait_for_slave_sql_to_start.inc;
-source include/wait_for_slave_io_to_stop.inc;
+let $slave_io_errno= 1236;
+let $show_slave_io_error= 1;
+source include/wait_for_slave_io_error.inc;
source include/stop_slave.inc;
-source include/show_slave_status.inc;
connection master;
source include/show_master_status.inc;
create table if not exists t1 (n int);
@@ -32,6 +34,7 @@ create table t1 (n int);
insert into t1 values (1),(2),(3);
save_master_pos;
connection slave;
+--replace_result 4 MASTER_LOG_POS
change master to master_log_pos=4;
start slave;
sync_with_master;
diff --git a/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test b/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test
index 8863c9d4ac7..ec50311fc7c 100644
--- a/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test
+++ b/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test
@@ -15,20 +15,10 @@ SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT;
CREATE TABLE t1 (a INT, b LONG);
INSERT INTO t1 VALUES (1,1), (2,2);
INSERT INTO t1 VALUES (3,UUID()), (4,UUID());
-let $VERSION=`select version()`;
---replace_result $VERSION VERSION
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS;
+source include/show_binlog_events.inc;
sync_slave_with_master;
--echo **** On Slave ****
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 23 # 33 # 34 # 35 #
---query_vertical SHOW SLAVE STATUS
---replace_result $VERSION VERSION
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS;
+source include/show_binlog_events.inc;
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql
--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql
diff --git a/mysql-test/suite/rpl/t/rpl_replicate_do.test b/mysql-test/suite/rpl/t/rpl_replicate_do.test
index fea168ee9f1..382e198aaf9 100644
--- a/mysql-test/suite/rpl/t/rpl_replicate_do.test
+++ b/mysql-test/suite/rpl/t/rpl_replicate_do.test
@@ -31,10 +31,8 @@ save_master_pos;
connection slave;
sync_with_master;
# show slave status, just to see of it prints replicate-do-table
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
-query_vertical SHOW SLAVE STATUS;
-
+let $status_items= Replicate_Do_Table;
+source include/show_slave_status.inc;
#
# BUG#12542
# TEST: "SET ONE_SHOT should always be executed on slave"
diff --git a/mysql-test/suite/rpl/t/rpl_rotate_logs.test b/mysql-test/suite/rpl/t/rpl_rotate_logs.test
index f67c880bf26..e8bcc904e4c 100644
--- a/mysql-test/suite/rpl/t/rpl_rotate_logs.test
+++ b/mysql-test/suite/rpl/t/rpl_rotate_logs.test
@@ -66,7 +66,9 @@ insert into temp_table values ("testing temporary tables");
create table t1 (s text);
insert into t1 values('Could not break slave'),('Tried hard');
sync_slave_with_master;
-source include/show_slave_status2.inc;
+let $status_items= Master_Log_File, Relay_Master_Log_File;
+source include/show_slave_status.inc;
+source include/check_slave_is_running.inc;
select * from t1;
connection master;
flush logs;
@@ -136,7 +138,8 @@ purge master logs before (@time_for_purge);
source include/show_binary_logs.inc;
insert into t2 values (65);
sync_slave_with_master;
-source include/show_slave_status2.inc;
+source include/show_slave_status.inc;
+source include/check_slave_is_running.inc;
select * from t2;
#
@@ -166,7 +169,8 @@ connection slave;
sync_with_master;
select * from t4;
-source include/show_slave_status2.inc;
+source include/show_slave_status.inc;
+source include/check_slave_is_running.inc;
# because of concurrent insert, the table may not be up to date
# if we do not lock
lock tables t3 read;
diff --git a/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test b/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test
index 2ee7c62f282..2bf5a01a71f 100644
--- a/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test
+++ b/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test
@@ -48,9 +48,7 @@ DELETE FROM t1;
INSERT INTO t1 VALUES (1),(2);
DELETE FROM t1 WHERE a = 0;
UPDATE t1 SET a=99 WHERE a = 0;
---replace_result $SERVER_VERSION SERVER_VERSION
---replace_regex /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS;
+source include/show_binlog_events.inc;
DROP TABLE t1;
--sync_slave_with_master
diff --git a/mysql-test/suite/rpl/t/rpl_row_create_table.test b/mysql-test/suite/rpl/t/rpl_row_create_table.test
index e30982da605..a72ca75e975 100644
--- a/mysql-test/suite/rpl/t/rpl_row_create_table.test
+++ b/mysql-test/suite/rpl/t/rpl_row_create_table.test
@@ -36,9 +36,7 @@ CREATE TABLE t1 (a INT, b INT);
CREATE TABLE t2 (a INT, b INT) ENGINE=Merge;
CREATE TABLE t3 (a INT, b INT) CHARSET=utf8;
CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8;
---replace_column 1 # 4 #
---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
---query_vertical SHOW BINLOG EVENTS FROM 106
+--source include/show_binlog_events.inc
--echo **** On Master ****
--query_vertical SHOW CREATE TABLE t1
--query_vertical SHOW CREATE TABLE t2
@@ -74,9 +72,7 @@ connection master;
--error ER_DUP_ENTRY
CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
# Shouldn't be written to the binary log
---replace_column 1 # 4 #
---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 106;
+--source include/show_binlog_events.inc
# Test that INSERT-SELECT works the same way as for SBR.
CREATE TABLE t7 (a INT, b INT UNIQUE);
@@ -84,9 +80,7 @@ CREATE TABLE t7 (a INT, b INT UNIQUE);
INSERT INTO t7 SELECT a,b FROM tt3;
SELECT * FROM t7 ORDER BY a,b;
# Should be written to the binary log
---replace_column 1 # 4 #
---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 106;
+--source include/show_binlog_events.inc
sync_slave_with_master;
SELECT * FROM t7 ORDER BY a,b;
@@ -98,9 +92,7 @@ INSERT INTO tt4 VALUES (4,8), (5,10), (6,12);
BEGIN;
INSERT INTO t7 SELECT a,b FROM tt4;
ROLLBACK;
---replace_column 1 # 4 #
---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 106;
+--source include/show_binlog_events.inc
SELECT * FROM t7 ORDER BY a,b;
sync_slave_with_master;
SELECT * FROM t7 ORDER BY a,b;
@@ -116,9 +108,7 @@ CREATE TEMPORARY TABLE tt7 SELECT 1;
--echo **** On Master ****
--query_vertical SHOW CREATE TABLE t8
--query_vertical SHOW CREATE TABLE t9
---replace_column 1 # 4 #
---replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 106;
+--source include/show_binlog_events.inc
sync_slave_with_master;
--echo **** On Slave ****
--query_vertical SHOW CREATE TABLE t8
@@ -160,9 +150,7 @@ SELECT * FROM t1 ORDER BY a;
SELECT * FROM t2 ORDER BY a;
SELECT * FROM t3 ORDER BY a;
SELECT * FROM t4 ORDER BY a;
---replace_column 1 # 4 #
---replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 106;
+--source include/show_binlog_events.inc
sync_slave_with_master;
SHOW TABLES;
SELECT * FROM t1 ORDER BY a;
@@ -202,9 +190,7 @@ INSERT INTO t2 SELECT a+2 FROM tt1;
COMMIT;
SELECT * FROM t2 ORDER BY a;
---replace_column 1 # 4 #
---replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 106;
+--source include/show_binlog_events.inc
sync_slave_with_master;
SELECT * FROM t2 ORDER BY a;
@@ -225,9 +211,7 @@ INSERT INTO t2 SELECT a+2 FROM tt2;
ROLLBACK;
SELECT * FROM t2 ORDER BY a;
---replace_column 1 # 4 #
---replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 106;
+source include/show_binlog_events.inc;
sync_slave_with_master;
SELECT * FROM t2 ORDER BY a;
diff --git a/mysql-test/suite/rpl/t/rpl_row_drop.test b/mysql-test/suite/rpl/t/rpl_row_drop.test
index 20c217a7c3a..d18ebc2846b 100644
--- a/mysql-test/suite/rpl/t/rpl_row_drop.test
+++ b/mysql-test/suite/rpl/t/rpl_row_drop.test
@@ -30,10 +30,7 @@ connection master;
--echo **** On Master ****
# Should drop the non-temporary table t1 and the temporary table t2
DROP TABLE t1,t2;
-let $VERSION=`select version()`;
---replace_result $VERSION VERSION
---replace_regex /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS;
+source include/show_binlog_events.inc;
SHOW TABLES;
sync_slave_with_master;
--echo **** On Slave ****
diff --git a/mysql-test/suite/rpl/t/rpl_row_disabled_slave_key.test b/mysql-test/suite/rpl/t/rpl_row_find_row.test
index 1d7e134f4f4..9163ab54406 100644
--- a/mysql-test/suite/rpl/t/rpl_row_disabled_slave_key.test
+++ b/mysql-test/suite/rpl/t/rpl_row_find_row.test
@@ -71,3 +71,34 @@ DELETE FROM t;
DROP TABLE t;
-- sync_slave_with_master
+
+#
+# BUG#53893: RBR: nullable unique key can lead to out-of-sync slave
+#
+
+#
+# We insert two rows. Both with part of UNIQUE KEY set to null.
+# Then we update the last row inserted. On master the correct
+# row is updated. On the slave the wrong row would be updated
+# because the engine would look it up by the NULL Unique KEY.
+# As a consquence, the wrong row would be updated.
+#
+
+-- connection master
+-- source include/master-slave-reset.inc
+-- connection master
+
+CREATE TABLE t1 (c1 INT NOT NULL, c2 INT NOT NULL, c3 INT, UNIQUE KEY(c1,c3), KEY(c2));
+INSERT INTO t1(c1,c2) VALUES(1,1);
+INSERT INTO t1(c1,c2) VALUES(1,2);
+UPDATE t1 SET c1=1000 WHERE c2=2;
+-- sync_slave_with_master
+
+-- let $diff_table_1=master:test.t1
+-- let $diff_table_2=slave:test.t1
+-- source include/diff_tables.inc
+
+-- connection master
+DROP TABLE t1;
+-- sync_slave_with_master
+
diff --git a/mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test b/mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test
new file mode 100644
index 00000000000..67e4c4fb14d
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test
@@ -0,0 +1,10 @@
+-- source include/have_binlog_format_row.inc
+-- source include/master-slave.inc
+-- source include/have_innodb.inc
+
+#
+# BUG#52868 Wrong handling of NULL value during update, replication out of sync
+#
+
+-- let $engine= InnoDB
+-- source extra/rpl_tests/rpl_record_compare.test
diff --git a/mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test b/mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test
new file mode 100644
index 00000000000..43fa99a51da
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test
@@ -0,0 +1,31 @@
+-- source include/have_binlog_format_row.inc
+-- source include/master-slave.inc
+
+#
+# BUG#52868 Wrong handling of NULL value during update, replication out of sync
+#
+
+-- let $engine= MyISAM
+-- source extra/rpl_tests/rpl_record_compare.test
+
+-- echo ## coverage purposes - Field_bits
+-- echo ## 1 X bit + 2 Null bits + 5 bits => last_null_bit_pos==0
+## Added here because AFAIK it's only MyISAM and NDB that use Field_bits
+
+-- source include/master-slave-reset.inc
+-- connection master
+
+-- eval CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bit(5)) ENGINE=$engine DEFAULT CHARSET=latin1
+
+INSERT INTO t1(c1,c2) VALUES (10, b'1');
+INSERT INTO t1(c1,c2) VALUES (NULL, b'1');
+UPDATE t1 SET c1= 0;
+-- sync_slave_with_master
+
+-- let $diff_table_1= master:test.t1
+-- let $diff_table_2= slave:test.t1
+-- source include/diff_tables.inc
+
+-- connection master
+DROP TABLE t1;
+-- sync_slave_with_master
diff --git a/mysql-test/suite/rpl/t/rpl_row_until.test b/mysql-test/suite/rpl/t/rpl_row_until.test
index fe859218ed3..9e3cbbd325a 100644
--- a/mysql-test/suite/rpl/t/rpl_row_until.test
+++ b/mysql-test/suite/rpl/t/rpl_row_until.test
@@ -15,6 +15,7 @@ DROP TABLE t1;
# Save master log postion for query DROP TABLE t1
save_master_pos;
let $master_pos_drop_t1= query_get_value(SHOW BINLOG EVENTS, Pos, 7);
+let $master_log_file= query_get_value(SHOW BINLOG EVENTS, Log_name, 7);
CREATE TABLE t2(n INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
# Save master log postion for query CREATE TABLE t2
@@ -46,26 +47,28 @@ eval CHANGE MASTER TO MASTER_USER='root', MASTER_CONNECT_RETRY=1, MASTER_HOST='1
# Try to replicate all queries until drop of t1
connection slave;
-echo START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=master_pos_drop_t1;
+echo START SLAVE UNTIL MASTER_LOG_FILE='$master_log_file', MASTER_LOG_POS=master_pos_drop_t1;
--disable_query_log
-eval START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=$master_pos_drop_t1;
+eval START SLAVE UNTIL MASTER_LOG_FILE='$master_log_file', MASTER_LOG_POS=$master_pos_drop_t1;
--enable_query_log
--source include/wait_for_slave_sql_to_stop.inc
# Here table should be still not deleted
SELECT * FROM t1;
---replace_result $master_pos_drop_t1 MASTER_POS_DROP_T1
---replace_column 1 # 4 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
-query_vertical SHOW SLAVE STATUS;
+--let $slave_param= Exec_Master_Log_Pos
+--let $slave_param_value= $master_pos_drop_t1
+--source include/check_slave_param.inc
# This should fail right after start
+--replace_result 291 MASTER_LOG_POS
START SLAVE UNTIL MASTER_LOG_FILE='master-no-such-bin.000001', MASTER_LOG_POS=291;
--source include/wait_for_slave_sql_to_stop.inc
# again this table should be still not deleted
SELECT * FROM t1;
---replace_result $master_pos_drop_t1 MASTER_POS_DROP_T1
---replace_column 1 # 4 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
-query_vertical SHOW SLAVE STATUS;
+
+--let $slave_param= Exec_Master_Log_Pos
+--let $slave_param_value= $master_pos_drop_t1
+--source include/check_slave_param.inc
# Try replicate all up to and not including the second insert to t2;
echo START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000002', RELAY_LOG_POS=relay_pos_insert1_t2;
@@ -74,9 +77,10 @@ eval START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000002', RELAY_LOG_POS=$r
--enable_query_log
--source include/wait_for_slave_sql_to_stop.inc
SELECT * FROM t2;
---replace_result $relay_pos_insert1_t2 RELAY_POS_INSERT1_T2 $master_pos_insert1_t2 MASTER_POS_INSERT1_T2
---replace_column 1 # 4 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
-query_vertical SHOW SLAVE STATUS;
+
+--let $slave_param= Exec_Master_Log_Pos
+--let $slave_param_value= $master_pos_insert1_t2
+--source include/check_slave_param.inc
# clean up
START SLAVE;
@@ -86,31 +90,34 @@ sync_slave_with_master;
--source include/stop_slave.inc
# This should stop immediately as we are already there
-echo START SLAVE SQL_THREAD UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=master_pos_create_t2;
+echo START SLAVE SQL_THREAD UNTIL MASTER_LOG_FILE='$master_log_file', MASTER_LOG_POS=master_pos_create_t2;
--disable_query_log
-eval START SLAVE SQL_THREAD UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=$master_pos_create_t2;
+eval START SLAVE SQL_THREAD UNTIL MASTER_LOG_FILE='$master_log_file', MASTER_LOG_POS=$master_pos_create_t2;
--enable_query_log
let $slave_param= Until_Log_Pos;
let $slave_param_value= $master_pos_create_t2;
--source include/wait_for_slave_param.inc
--source include/wait_for_slave_sql_to_stop.inc
# here the sql slave thread should be stopped
---replace_result bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004
---replace_result $master_pos_create_t2 MASTER_POS_CREATE_T2 $master_pos_drop_t2 MASTER_POS_DROP_T2
---replace_column 1 # 4 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
-query_vertical SHOW SLAVE STATUS;
+--let $slave_param= Exec_Master_Log_Pos
+--let $slave_param_value= $master_pos_drop_t2
+--source include/check_slave_param.inc
#testing various error conditions
+--replace_result 561 MASTER_LOG_POS
--error 1277
START SLAVE UNTIL MASTER_LOG_FILE='master-bin', MASTER_LOG_POS=561;
+--replace_result 561 MASTER_LOG_POS 12 RELAY_LOG_POS
--error 1277
START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=561, RELAY_LOG_POS=12;
--error 1277
START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001';
--error 1277
START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000009';
+--replace_result 561 MASTER_LOG_POS
--error 1277
START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000002', MASTER_LOG_POS=561;
# Warning should be given for second command
START SLAVE;
+--replace_result 740 MASTER_LOG_POS
START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=740;
diff --git a/mysql-test/suite/rpl/t/rpl_skip_error.test b/mysql-test/suite/rpl/t/rpl_skip_error.test
index 9c6aa3dcb57..8d176ac0c3b 100644
--- a/mysql-test/suite/rpl/t/rpl_skip_error.test
+++ b/mysql-test/suite/rpl/t/rpl_skip_error.test
@@ -55,7 +55,7 @@ insert into t1 values (7), (8), (9);
--echo [on slave]
sync_slave_with_master;
select * from t1 order by n;
-source include/show_slave_status2.inc;
+source include/check_slave_is_running.inc;
--echo ==== Clean Up ====
connection master;
@@ -78,7 +78,7 @@ insert into t1 values (1), (2), (3);
--echo [on slave]
sync_slave_with_master;
select * from t1;
-source include/show_slave_status2.inc;
+source include/check_slave_is_running.inc;
--echo ==== Clean Up ====
diff --git a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test
index 437e1ebb92d..22309c33724 100644
--- a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test
+++ b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test
@@ -31,12 +31,9 @@ commit;
# Catch Error
##########################################################################
connection slave;
-source include/wait_for_slave_sql_to_stop.inc;
-
---replace_result $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
---replace_regex /SQL_LOAD-[0-9]-[0-9]-[0-9]*/SQL_LOAD/
-query_vertical show slave status;
+# Errno 9 is what we get although it's wrong (see BUG#52768).
+--let $slave_sql_errno= 9
+--source include/wait_for_slave_sql_error.inc
##########################################################################
# Clean up
diff --git a/mysql-test/suite/rpl/t/rpl_slave_skip.test b/mysql-test/suite/rpl/t/rpl_slave_skip.test
index c5ee6793277..4c5930d74fe 100644
--- a/mysql-test/suite/rpl/t/rpl_slave_skip.test
+++ b/mysql-test/suite/rpl/t/rpl_slave_skip.test
@@ -14,6 +14,7 @@ CREATE TABLE t1 (a INT, b INT);
CREATE TABLE t2 (c INT, d INT);
INSERT INTO t1 VALUES (1,1),(2,4),(3,9);
INSERT INTO t2 VALUES (1,1),(2,8),(3,27);
+let $master_log_pos= query_get_value(SHOW MASTER STATUS, Position, 1);
UPDATE t1,t2 SET b = d, d = b * 2 WHERE a = c;
source include/show_binlog_events.inc;
@@ -21,16 +22,17 @@ source include/show_binlog_events.inc;
SELECT * FROM t1;
SELECT * FROM t2;
save_master_pos;
-
--echo **** On Slave ****
connection slave;
# Stop when reaching the the first table map event.
-START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=762;
+--replace_result $master_log_pos MASTER_LOG_POS
+eval START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=$master_log_pos;
source include/wait_for_slave_sql_to_stop.inc;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 23 # 33 # 35 # 36 #
-query_vertical SHOW SLAVE STATUS;
+let $slave_param= Exec_Master_Log_Pos;
+let $slave_param_value= $master_log_pos;
+source include/check_slave_param.inc;
+source include/check_slave_no_error.inc;
# Now we skip *one* table map event. If the execution starts right
# after that table map event, *one* of the involved tables will be
@@ -53,19 +55,18 @@ RESET MASTER;
SET SESSION BINLOG_FORMAT=STATEMENT;
SET @foo = 12;
+let $master_log_pos= query_get_value(SHOW MASTER STATUS, Position, 1);
INSERT INTO t1 VALUES(@foo, 2*@foo);
save_master_pos;
source include/show_binlog_events.inc;
connection slave;
-START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=106;
+--replace_result $master_log_pos MASTER_LOG_POS
+eval START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=$master_log_pos;
source include/wait_for_slave_sql_to_stop.inc;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
sync_with_master;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 23 # 33 # 35 # 36 #
-query_vertical SHOW SLAVE STATUS;
--echo **** On Master ****
connection master;
diff --git a/mysql-test/suite/rpl/t/rpl_sp.test b/mysql-test/suite/rpl/t/rpl_sp.test
index 9be630e9ae8..243136a0d38 100644
--- a/mysql-test/suite/rpl/t/rpl_sp.test
+++ b/mysql-test/suite/rpl/t/rpl_sp.test
@@ -568,9 +568,7 @@ connection master;
# Final inspection which verifies how all statements of this test file
# were written to the binary log.
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/
-show binlog events in 'master-bin.000001' from 106;
+--source include/show_binlog_events.inc
# Restore log_bin_trust_function_creators to its original value.
diff --git a/mysql-test/suite/rpl/t/rpl_ssl.test b/mysql-test/suite/rpl/t/rpl_ssl.test
index 7e256390e25..803b08eeec5 100644
--- a/mysql-test/suite/rpl/t/rpl_ssl.test
+++ b/mysql-test/suite/rpl/t/rpl_ssl.test
@@ -30,9 +30,9 @@ select * from t1;
# The slave is synced and waiting/reading from master
# SHOW SLAVE STATUS will show "Waiting for master to send event"
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
-query_vertical show slave status;
+let $status_items= Master_SSL_Allowed, Master_SSL_CA_Path, Master_SSL_CA_File, Master_SSL_Cert, Master_SSL_Key;
+source include/show_slave_status.inc;
+source include/check_slave_is_running.inc;
# Stop the slave, as reported in bug#21871 it would hang
STOP SLAVE;
@@ -70,9 +70,8 @@ let $master_count= `select count(*) from t1`;
sync_slave_with_master;
--source include/wait_for_slave_to_start.inc
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
-query_vertical show slave status;
+source include/show_slave_status.inc;
+source include/check_slave_is_running.inc;
let $slave_count= `select count(*) from t1`;
diff --git a/mysql-test/suite/rpl/t/rpl_ssl1.test b/mysql-test/suite/rpl/t/rpl_ssl1.test
index b5355d737d5..eca6a8cf46e 100644
--- a/mysql-test/suite/rpl/t/rpl_ssl1.test
+++ b/mysql-test/suite/rpl/t/rpl_ssl1.test
@@ -45,9 +45,9 @@ sync_with_master;
select * from t1;
#checking show slave status
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # 35 # 36 #
-query_vertical show slave status;
+let $status_items= Master_SSL_Allowed, Master_SSL_CA_Path, Master_SSL_CA_File, Master_SSL_Cert, Master_SSL_Key;
+source include/show_slave_status.inc;
+source include/check_slave_is_running.inc;
#checking if replication works without ssl also performing clean up
stop slave;
@@ -59,10 +59,8 @@ drop table t1;
save_master_pos;
connection slave;
sync_with_master;
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # 35 # 36 #
-query_vertical show slave status;
-
+source include/show_slave_status.inc;
+source include/check_slave_is_running.inc;
# End of 4.1 tests
# Start replication with ssl_verify_server_cert turned on
@@ -89,9 +87,8 @@ echo on slave;
select * from t1;
#checking show slave status
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # 35 # 36 #
-query_vertical show slave status;
+source include/show_slave_status.inc;
+--source include/check_slave_is_running.inc
connection master;
drop table t1;
diff --git a/mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test b/mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test
index 0097fde874a..4086fd03ca1 100644
--- a/mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test
+++ b/mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test
@@ -3,3 +3,41 @@
--source include/have_innodb.inc
--source extra/rpl_tests/rpl_mixing_engines.test
+
+#
+# BUG#49522: Replication problem with mixed MyISAM/InnoDB
+#
+
+-- source include/master-slave-reset.inc
+-- connection master
+
+CREATE TABLE `t1` (
+ `c1` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `c2` tinyint(1) unsigned DEFAULT NULL,
+ `c3` varchar(300) DEFAULT NULL,
+ `c4` int(10) unsigned NOT NULL,
+ `c5` int(10) unsigned DEFAULT NULL,
+ PRIMARY KEY (`c1`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+
+-- sync_slave_with_master
+ALTER TABLE `t1` Engine=InnoDB;
+
+-- connection master
+SET AUTOCOMMIT=0;
+
+INSERT INTO t1 (c1,c2,c3,c4,c5) VALUES (1, 1, 'X', 1, NULL);
+COMMIT;
+ROLLBACK;
+SET AUTOCOMMIT=1;
+
+-- sync_slave_with_master
+
+-- let $diff_table_1=master:test.t1
+-- let $diff_table_2=slave:test.t1
+-- source include/diff_tables.inc
+
+-- connection master
+DROP TABLE `t1`;
+-- sync_slave_with_master
+
+-- source include/master-slave-end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_stm_until.test b/mysql-test/suite/rpl/t/rpl_stm_until.test
index ae03ebe8b76..ee9501681a1 100644
--- a/mysql-test/suite/rpl/t/rpl_stm_until.test
+++ b/mysql-test/suite/rpl/t/rpl_stm_until.test
@@ -34,9 +34,12 @@ sync_slave_with_master;
connection master;
create table t1(n int not null auto_increment primary key);
insert into t1 values (1),(2),(3),(4);
+let $master_log_pos_1= query_get_value(SHOW MASTER STATUS, Position, 1);
+let $master_log_file= query_get_value(SHOW MASTER STATUS, File, 1);
drop table t1;
create table t2(n int not null auto_increment primary key);
insert into t2 values (1),(2);
+let $master_log_pos_2= query_get_value(SHOW MASTER STATUS, Position, 1);
insert into t2 values (3),(4);
drop table t2;
@@ -45,27 +48,39 @@ drop table t2;
# try to replicate all queries until drop of t1
--echo [on slave]
connection slave;
-start slave until master_log_file='master-bin.000001', master_log_pos=323;
+--replace_result $master_log_file MASTER_LOG_FILE $master_log_pos_1 MASTER_LOG_POS
+eval start slave until master_log_file='$master_log_file', master_log_pos=$master_log_pos_1;
--source include/wait_for_slave_io_to_start.inc
--source include/wait_for_slave_sql_to_stop.inc
# here table should be still not deleted
select * from t1;
-source include/show_slave_status2.inc;
+--let $slave_param= Exec_Master_Log_Pos
+--let $slave_param_value= $master_log_pos_1
+--source include/check_slave_param.inc
# this should fail right after start
+--replace_result 291 MASTER_LOG_POS
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
--source include/wait_for_slave_io_to_start.inc
--source include/wait_for_slave_sql_to_stop.inc
# again this table should be still not deleted
select * from t1;
-source include/show_slave_status2.inc;
+--let $slave_param= Exec_Master_Log_Pos
+--let $slave_param_value= $master_log_pos_1
+--source include/check_slave_param.inc
+let $relay_log_file= slave-relay-bin.000004;
+let $master_log_pos= $master_log_pos_2;
+source include/get_relay_log_pos.inc;
# try replicate all up to and not including the second insert to t2;
-start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746;
+--replace_result $relay_log_pos RELAY_LOG_POS
+eval start slave until relay_log_file='$relay_log_file', relay_log_pos=$relay_log_pos;
--source include/wait_for_slave_io_to_start.inc
--source include/wait_for_slave_sql_to_stop.inc
select * from t2;
-source include/show_slave_status2.inc;
+--let $slave_param= Exec_Master_Log_Pos
+--let $slave_param_value= $master_log_pos
+--source include/check_slave_param.inc
# clean up
start slave;
@@ -75,27 +90,34 @@ connection master;
sync_slave_with_master;
--source include/stop_slave.inc
+--let $exec_log_pos_1= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1)
# this should stop immediately as we are already there
-start slave until master_log_file='master-bin.000001', master_log_pos=776;
+--replace_result $master_log_file MASTER_LOG_FILE $master_log_pos_2 MASTER_LOG_POS
+eval start slave until master_log_file='$master_log_file', master_log_pos=$master_log_pos_2;
--source include/wait_for_slave_io_to_start.inc
--source include/wait_for_slave_sql_to_stop.inc
---replace_result bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004
-source include/show_slave_status2.inc;
+--let $slave_param= Exec_Master_Log_Pos
+--let $slave_param_value= $exec_log_pos_1
+--source include/check_slave_param.inc
--echo ==== Test various error conditions ====
+--replace_result 561 MASTER_LOG_POS
--error 1277
start slave until master_log_file='master-bin', master_log_pos=561;
+--replace_result 561 MASTER_LOG_POS 12 RELAY_LOG_POS
--error 1277
start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;
--error 1277
start slave until master_log_file='master-bin.000001';
--error 1277
start slave until relay_log_file='slave-relay-bin.000002';
+--replace_result 561 MASTER_LOG_POS
--error 1277
start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561;
# Warning should be given for second command
start slave sql_thread;
+--replace_result 776 MASTER_LOG_POS
start slave until master_log_file='master-bin.000001', master_log_pos=776;
#
@@ -144,8 +166,8 @@ insert into t1 set a=null;
select count(*) as two from t1;
connection slave;
---replace_result $until_pos UNTIL_POS;
-eval start slave until master_log_file='master-bin.000001', master_log_pos= $until_pos;
+--replace_result $master_log_file MASTER_LOG_FILE $until_pos UNTIL_POS;
+eval start slave until master_log_file='$master_log_file', master_log_pos= $until_pos;
source include/wait_for_slave_sql_to_stop.inc;
let $slave_exec_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
--echo slave stopped at the prescribed position
diff --git a/mysql-test/suite/rpl/t/rpl_temporary_errors.test b/mysql-test/suite/rpl/t/rpl_temporary_errors.test
index ad0e6174c54..9b3c9296e69 100644
--- a/mysql-test/suite/rpl/t/rpl_temporary_errors.test
+++ b/mysql-test/suite/rpl/t/rpl_temporary_errors.test
@@ -1,4 +1,5 @@
source include/master-slave.inc;
+source include/have_innodb.inc;
call mtr.add_suppression("Deadlock found");
@@ -25,12 +26,51 @@ sync_slave_with_master;
set @@global.slave_exec_mode= default;
SHOW STATUS LIKE 'Slave_retried_transactions';
SELECT * FROM t1;
-source include/show_slave_status2.inc;
+source include/check_slave_is_running.inc;
DROP TABLE t1;
--echo **** On Master ****
connection master;
+SET SQL_LOG_BIN= 0;
DROP TABLE t1;
+SET SQL_LOG_BIN= 1;
+
+# BUG#Bug #53259 Unsafe statement binlogged in statement format w/MyIsam temp tables
+#
+SET SESSION BINLOG_FORMAT=MIXED;
+CREATE TABLE t_myisam (id INT, PRIMARY KEY (id)) engine= MyIsam;
+INSERT INTO t_myisam (id) VALUES(1);
+CREATE TABLE t_innodb (id INT) engine= Innodb;
+INSERT INTO t_innodb (id) VALUES(1);
+
+let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1);
+BEGIN;
+INSERT INTO t_innodb(id) VALUES(2);
+INSERT INTO t_myisam(id) VALUES(3);
+CREATE TEMPORARY TABLE x (id INT);
+--error 1062
+INSERT INTO t_myisam(id) VALUES(4),(1);
+INSERT INTO t_innodb(id) VALUES(5);
+COMMIT;
+
+SELECT * FROM t_innodb;
+SELECT * FROM t_myisam;
+
+--sync_slave_with_master
+
+SELECT * FROM t_innodb;
+SELECT * FROM t_myisam;
+
+--connection master
+
+BEGIN;
+CREATE TEMPORARY TABLE tmp2 SELECT * FROM t_innodb;
+INSERT INTO t_innodb(id) VALUES(1);
+INSERT INTO t_innodb(id) VALUES(1);
+ROLLBACK;
+source include/show_binlog_events.inc;
+
+DROP TABLE t_myisam, t_innodb;
# We must wait for the slave to stop.
# Otherwise the warnings in the error log about deadlock may be written to
diff --git a/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test b/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test
index 56924a2efe9..d8c6ae5ade8 100644
--- a/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test
+++ b/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test
@@ -10,4 +10,3 @@ source include/have_binlog_format_row.inc;
LET $ENGINE_TYPE= MyISAM;
source extra/rpl_tests/rpl_tmp_table_and_DDL.test;
-
diff --git a/mysql-test/suite/rpl_ndb/my.cnf b/mysql-test/suite/rpl_ndb/my.cnf
index 58fec36eedd..426608fc7fa 100644
--- a/mysql-test/suite/rpl_ndb/my.cnf
+++ b/mysql-test/suite/rpl_ndb/my.cnf
@@ -18,6 +18,8 @@ mysqld=
ndbcluster
# Turn on bin logging
log-bin= master-bin
+# Cluster only supports row format
+binlog-format= row
[mysqld.1.1]
@@ -41,6 +43,8 @@ master-connect-retry= 1
log-bin= slave-bin
relay-log= slave-relay-bin
+# Cluster only supports row format
+binlog-format= row
init-rpl-role= slave
log-slave-updates
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result
index b16a63ec5ad..d43165e2b5e 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result
@@ -140,45 +140,7 @@ set GLOBAL slave_transaction_retries=1;
**** On Master ****
UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1;
**** On Slave ****
-SHOW SLAVE STATUS;;
-Slave_IO_State <Slave_IO_State>
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos <Read_Master_Log_Pos>
-Relay_Log_File <Relay_Log_File>
-Relay_Log_Pos <Relay_Log_Pos>
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table <Replicate_Ignore_Table>
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno <Last_Errno>
-Last_Error <Last_Error>
-Skip_Counter 0
-Exec_Master_Log_Pos <Exec_Master_Log_Pos>
-Relay_Log_Space <Relay_Log_Space>
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master <Seconds_Behind_Master>
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno <Last_IO_Errno>
-Last_IO_Error <Last_IO_Error>
-Last_SQL_Errno <Last_SQL_Errno>
-Last_SQL_Error <Last_SQL_Error>
+Last_SQL_Error = Could not execute Write_rows event on table test.t1; Got temporary error 266 'Time-out in NDB, probably caused by deadlock' from NDB, Error_code: 1297; Lock wait timeout exceeded; try restarting transaction, Error_code: 1205; handler error HA_ERR_LOCK_WAIT_TIMEOUT; the event's master log master-bin.000001, end_log_pos 6834
set GLOBAL slave_transaction_retries=10;
include/start_slave.inc
select * from t1 order by nid;
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result
index 2daacb351a9..dfbd7a37d8e 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result
@@ -17,87 +17,11 @@ SELECT * FROM t1 ORDER BY a;
a b
1 2
2 3
-show slave status;;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
SELECT * FROM t1 ORDER BY a;
a b
1 2
2 3
-show slave status;;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 60
-Master_Log_File slave-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File slave-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
STOP SLAVE;
DROP TABLE t1;
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result
index b6f32668c42..99438d663bb 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result
@@ -14,45 +14,7 @@ INSERT INTO t1 VALUES (2,3);
STOP SLAVE;
CHANGE MASTER TO MASTER_HOST="127.0.0.1",MASTER_PORT=SLAVE_PORT,MASTER_USER="root";
START SLAVE;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port SLAVE_PORT
-Connect_Retry 60
-Master_Log_File slave-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File slave-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
SELECT * FROM t1 ORDER BY a;
a b
1 2
@@ -63,43 +25,5 @@ SELECT * FROM t1 ORDER BY a;
a b
1 2
2 3
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
DROP TABLE t1;
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result
index f514bf7a75b..1a79affabe6 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result
@@ -54,45 +54,7 @@ a b c
3 4 QA TESTING
*** Start Slave ***
START SLAVE;
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
STOP SLAVE;
RESET SLAVE;
SELECT * FROM t2 ORDER BY a;
@@ -119,49 +81,12 @@ set @b1 = 'b1';
set @b1 = concat(@b1,@b1);
INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TESTING');
********************************************
-*** Expect slave to fail with Error 1522 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t3 ***
DROP TABLE t3;
*** Create t4 on slave ***
@@ -181,49 +106,12 @@ START SLAVE;
INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'),
(30000.22,4,'QA TESTING');
********************************************
-*** Expect slave to fail with Error 1522 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t4 ***
DROP TABLE t4;
*** Create t5 on slave ***
@@ -243,49 +131,12 @@ START SLAVE;
INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098),
(2,'JOE',300.01,0,'b2b2',1.0000009);
********************************************
-*** Expect slave to fail with Error 1522 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t5 ***
DROP TABLE t5;
*** Create t6 on slave ***
@@ -304,47 +155,9 @@ START SLAVE;
INSERT INTO t6 () VALUES(1,'Kyle',200.23,1),
(2,'JOE',300.01,0);
********************************************
-*** Expect slave to fail with Error 1522 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
+Last_SQL_Error = Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
*** Drop t6 ***
DROP TABLE t6;
@@ -416,49 +229,12 @@ set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1);
INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
********************************************
-*** Expect slave to fail with Error 1522 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t10 ***
DROP TABLE t10;
*** Create t11 on slave ***
@@ -477,49 +253,12 @@ set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1);
INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
********************************************
-*** Expect slave to fail with Error 1522 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
*** Drop t11 ***
DROP TABLE t11;
*** Create t12 on slave ***
@@ -729,47 +468,10 @@ ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5;
********************************************
*** Expect slave to fail with Error 1060 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1060
-Last_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1060
-Last_SQL_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5'
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 1;
+include/start_slave.inc
*** Try to insert in master ****
INSERT INTO t15 () VALUES(5,2.00,'Replication Testing',@b1,'Buda',2);
SELECT * FROM t15 ORDER BY c1;
@@ -867,48 +569,11 @@ START SLAVE;
*** Master Data Insert ***
INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX');
********************************************
-*** Expect slave to fail with Error 1522 ***
+*** Expect slave to fail with Error 1535 ***
********************************************
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port #
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos #
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running No
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 1535
-Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
-Skip_Counter 0
-Exec_Master_Log_Pos #
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 1535
-Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
-START SLAVE;
+--source include/wait_for_slave_sql_error_and_skip.inc
+Last_SQL_Error = Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
+include/start_slave.inc
** DROP table t17 ***
DROP TABLE t17;
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result
index e2fee391bab..e2755c04f28 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result
@@ -32,16 +32,11 @@ SELECT * FROM t1 ORDER BY c3;
c1 c2 c3
row3 C 3
row4 D 4
-SHOW SLAVE STATUS;
-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
-<Slave_IO_State> 127.0.0.1 root MASTER_PORT 1 master-bin.000001 <Read_Master_Log_Pos> <Relay_Log_File> <Relay_Log_Pos> master-bin.000001 Yes Yes <Replicate_Ignore_Table> 0 0 <Exec_Master_Log_Pos> <Relay_Log_Space> None 0 No <Seconds_Behind_Master> No <Last_IO_Errno> <Last_IO_Error> 0
+Checking that both slave threads are running.
STOP SLAVE;
CHANGE MASTER TO
master_log_file = 'master-bin.000001',
master_log_pos = <the_pos> ;
-SHOW SLAVE STATUS;
-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
-<Slave_IO_State> 127.0.0.1 root MASTER_PORT 1 master-bin.000001 <Read_Master_Log_Pos> <Relay_Log_File> <Relay_Log_Pos> master-bin.000001 No No <Replicate_Ignore_Table> 0 0 <Exec_Master_Log_Pos> <Relay_Log_Space> None 0 No <Seconds_Behind_Master> No <Last_IO_Errno> <Last_IO_Error> 0
START SLAVE;
SELECT * FROM t1 ORDER BY c3;
c1 c2 c3
@@ -67,7 +62,5 @@ COMMIT;
SELECT * FROM t1;
c1 c2 c3
row2 new on slave 2
-SHOW SLAVE STATUS;
-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
-<Slave_IO_State> 127.0.0.1 root MASTER_PORT 1 master-bin.000001 <Read_Master_Log_Pos> <Relay_Log_File> <Relay_Log_Pos> master-bin.000001 Yes Yes <Replicate_Ignore_Table> 0 0 <Exec_Master_Log_Pos> <Relay_Log_Space> None 0 No <Seconds_Behind_Master> <Last_IO_Errno> <Last_IO_Error> 0
+Checking that both slave threads are running.
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result
index 540c430e757..85ecb13bd66 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result
@@ -7,7 +7,7 @@ start slave;
include/stop_slave.inc
reset master;
reset slave;
-start slave;
+include/start_slave.inc
create table t1(n int not null auto_increment primary key)ENGINE=NDB;
insert into t1 values (NULL);
drop table t1;
@@ -16,34 +16,33 @@ load data infile 'LOAD_FILE' into table t1 ignore 1 lines;
select count(*) from t1;
count(*)
69
-show binlog events;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status)
-master-bin.000001 # Write_rows 1 # table_id: #
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Query 1 # COMMIT
-master-bin.000001 # Query 1 # use `test`; drop table t1
-master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=NDB
-master-bin.000001 # Query 1 # BEGIN
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
-master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status)
-master-bin.000001 # Write_rows 1 # table_id: #
-master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Query 1 # COMMIT
-show binlog events from 106 limit 1;
+master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
+master-bin.000001 # Write_rows # # table_id: #
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Query # # use `test`; drop table t1
+master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=NDB
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
+master-bin.000001 # Write_rows # # table_id: #
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
+show binlog events from <binlog_start> limit 1;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
-show binlog events from 106 limit 2;
+master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
+show binlog events from <binlog_start> limit 2;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
-master-bin.000001 # Query 1 # BEGIN
-show binlog events from 106 limit 2,1;
+master-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
+master-bin.000001 # Query # # BEGIN
+show binlog events from <binlog_start> limit 2,1;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Table_map 1 # table_id: # (test.t1)
+master-bin.000001 # Table_map # # table_id: # (test.t1)
flush logs;
create table t3 (a int)ENGINE=NDB;
select * from t1 order by 1 asc;
@@ -211,17 +210,16 @@ master-bin.000001 # Write_rows # # table_id: #
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Rotate # # master-bin.000002;pos=4
-show binlog events in 'master-bin.000002';
+show binlog events in 'master-bin.000002' from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
-master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=NDB
-master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=NDB
-master-bin.000002 # Query 1 # BEGIN
-master-bin.000002 # Table_map 1 # table_id: # (test.t2)
-master-bin.000002 # Table_map 1 # table_id: # (mysql.ndb_apply_status)
-master-bin.000002 # Write_rows 1 # table_id: #
-master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
-master-bin.000002 # Query 1 # COMMIT
+master-bin.000002 # Query # # use `test`; create table t3 (a int)ENGINE=NDB
+master-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=NDB
+master-bin.000002 # Query # # BEGIN
+master-bin.000002 # Table_map # # table_id: # (test.t2)
+master-bin.000002 # Table_map # # table_id: # (mysql.ndb_apply_status)
+master-bin.000002 # Write_rows # # table_id: #
+master-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000002 # Query # # COMMIT
show binary logs;
Log_name File_size
master-bin.000001 #
@@ -230,75 +228,35 @@ show binary logs;
Log_name File_size
slave-bin.000001 #
slave-bin.000002 #
-show binlog events in 'slave-bin.000001' from 4;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
-slave-bin.000001 # Query 2 # BEGIN
-slave-bin.000001 # Table_map 2 # table_id: # (test.t1)
-slave-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status)
-slave-bin.000001 # Write_rows 2 # table_id: #
-slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-slave-bin.000001 # Query 2 # COMMIT
-slave-bin.000001 # Query 1 # use `test`; drop table t1
-slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=NDB
-slave-bin.000001 # Query 2 # BEGIN
-slave-bin.000001 # Table_map 2 # table_id: # (test.t1)
-slave-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status)
-slave-bin.000001 # Write_rows 2 # table_id: #
-slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
-slave-bin.000001 # Query 2 # COMMIT
-slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=NDB
-slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
-show binlog events in 'slave-bin.000002' from 4;
+slave-bin.000001 # Query # # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
+slave-bin.000001 # Query # # BEGIN
+slave-bin.000001 # Table_map # # table_id: # (test.t1)
+slave-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
+slave-bin.000001 # Write_rows # # table_id: #
+slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+slave-bin.000001 # Query # # COMMIT
+slave-bin.000001 # Query # # use `test`; drop table t1
+slave-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=NDB
+slave-bin.000001 # Query # # BEGIN
+slave-bin.000001 # Table_map # # table_id: # (test.t1)
+slave-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
+slave-bin.000001 # Write_rows # # table_id: #
+slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+slave-bin.000001 # Query # # COMMIT
+slave-bin.000001 # Query # # use `test`; create table t3 (a int)ENGINE=NDB
+slave-bin.000001 # Rotate # # slave-bin.000002;pos=4
+show binlog events in 'slave-bin.000002' from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=NDB
-slave-bin.000002 # Query 2 # BEGIN
-slave-bin.000002 # Table_map 2 # table_id: # (test.t2)
-slave-bin.000002 # Table_map 2 # table_id: # (mysql.ndb_apply_status)
-slave-bin.000002 # Write_rows 2 # table_id: #
-slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
-slave-bin.000002 # Query 2 # COMMIT
-SHOW SLAVE STATUS;
-Slave_IO_State #
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000002
-Read_Master_Log_Pos 623
-Relay_Log_File #
-Relay_Log_Pos #
-Relay_Master_Log_File master-bin.000002
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table #
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos 623
-Relay_Log_Space #
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master #
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno #
-Last_IO_Error #
-Last_SQL_Errno 0
-Last_SQL_Error
+slave-bin.000002 # Query # # use `test`; create table t2 (n int)ENGINE=NDB
+slave-bin.000002 # Query # # BEGIN
+slave-bin.000002 # Table_map # # table_id: # (test.t2)
+slave-bin.000002 # Table_map # # table_id: # (mysql.ndb_apply_status)
+slave-bin.000002 # Write_rows # # table_id: #
+slave-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F
+slave-bin.000002 # Query # # COMMIT
+Checking that both slave threads are running.
show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
DROP TABLE t1;
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result
index da60b0bbbbf..7caa88a16a1 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_engines_transactions.result
@@ -341,6 +341,25 @@ ROLLBACK;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
SET AUTOCOMMIT = 1;
+---- Mixed statements Innodb ----
+BEGIN;
+INSERT INTO tndb VALUES (147);
+INSERT INTO tinnodb SELECT * FROM tndb ORDER BY a DESC LIMIT 1;
+COMMIT;
+INSERT INTO tndb VALUES (148);
+BEGIN;
+INSERT INTO tinnodb SELECT * FROM tndb ORDER BY a DESC LIMIT 1;
+INSERT INTO tndb VALUES (149);
+COMMIT;
+BEGIN;
+INSERT INTO tndb VALUES (150);
+INSERT INTO tmyisam SELECT * FROM tndb ORDER BY a DESC LIMIT 1;
+COMMIT;
+INSERT INTO tndb VALUES (151);
+BEGIN;
+INSERT INTO tmyisam SELECT * FROM tndb ORDER BY a DESC LIMIT 1;
+INSERT INTO tndb VALUES (152);
+COMMIT;
==== Verify the result ====
SELECT * FROM tmyisam ORDER BY a;
a
@@ -393,6 +412,8 @@ a
140
142
146
+150
+151
SELECT * FROM tinnodb ORDER BY a;
a
1
@@ -420,6 +441,8 @@ a
120
125
127
+147
+148
SELECT * FROM tndb ORDER BY a;
a
2
@@ -447,6 +470,12 @@ a
121
123
126
+147
+148
+149
+150
+151
+152
[on slave]
Comparing tables master:test.tmyisam and slave:test.tmyisam
Comparing tables master:test.tinnodb and slave:test.tinnodb
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result
new file mode 100644
index 00000000000..92fda774da5
--- /dev/null
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result
@@ -0,0 +1,286 @@
+==== Initialization ====
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+---- setup master ----
+CREATE TABLE myisam_innodb (a INT) ENGINE=MYISAM;
+CREATE TABLE innodb_myisam (a INT) ENGINE=INNODB;
+CREATE TABLE myisam_ndb (a INT) ENGINE=MYISAM;
+CREATE TABLE ndb_myisam (a INT) ENGINE=NDB;
+CREATE TABLE innodb_ndb (a INT) ENGINE=INNODB;
+CREATE TABLE ndb_innodb (a INT) ENGINE=NDB;
+SHOW CREATE TABLE myisam_innodb;
+Table Create Table
+myisam_innodb CREATE TABLE `myisam_innodb` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SHOW CREATE TABLE innodb_myisam;
+Table Create Table
+innodb_myisam CREATE TABLE `innodb_myisam` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SHOW CREATE TABLE myisam_ndb;
+Table Create Table
+myisam_ndb CREATE TABLE `myisam_ndb` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SHOW CREATE TABLE ndb_myisam;
+Table Create Table
+ndb_myisam CREATE TABLE `ndb_myisam` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1
+SHOW CREATE TABLE innodb_ndb;
+Table Create Table
+innodb_ndb CREATE TABLE `innodb_ndb` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SHOW CREATE TABLE ndb_innodb;
+Table Create Table
+ndb_innodb CREATE TABLE `ndb_innodb` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1
+---- setup slave with different engines ----
+DROP TABLE myisam_innodb, innodb_myisam;
+DROP TABLE myisam_ndb, ndb_myisam;
+DROP TABLE innodb_ndb, ndb_innodb;
+CREATE TABLE myisam_innodb (a INT) ENGINE=INNODB;
+CREATE TABLE innodb_myisam (a INT) ENGINE=MYISAM;
+CREATE TABLE myisam_ndb (a INT) ENGINE=NDB;
+CREATE TABLE ndb_myisam (a INT) ENGINE=MYISAM;
+CREATE TABLE innodb_ndb (a INT) ENGINE=NDB;
+CREATE TABLE ndb_innodb (a INT) ENGINE=INNODB;
+SHOW CREATE TABLE myisam_innodb;
+Table Create Table
+myisam_innodb CREATE TABLE `myisam_innodb` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SHOW CREATE TABLE innodb_myisam;
+Table Create Table
+innodb_myisam CREATE TABLE `innodb_myisam` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SHOW CREATE TABLE myisam_ndb;
+Table Create Table
+myisam_ndb CREATE TABLE `myisam_ndb` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1
+SHOW CREATE TABLE ndb_myisam;
+Table Create Table
+ndb_myisam CREATE TABLE `ndb_myisam` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SHOW CREATE TABLE innodb_ndb;
+Table Create Table
+innodb_ndb CREATE TABLE `innodb_ndb` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1
+SHOW CREATE TABLE ndb_innodb;
+Table Create Table
+ndb_innodb CREATE TABLE `ndb_innodb` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+==== AUTOCOMMIT=0, transactions ====
+---- COMMIT ----
+SET AUTOCOMMIT = 0;
+BEGIN;
+INSERT INTO myisam_innodb VALUES (1);
+INSERT INTO myisam_innodb VALUES (2);
+COMMIT;
+BEGIN;
+INSERT INTO innodb_myisam VALUES (3);
+INSERT INTO innodb_myisam VALUES (4);
+COMMIT;
+BEGIN;
+INSERT INTO myisam_ndb VALUES (5);
+INSERT INTO myisam_ndb VALUES (6);
+COMMIT;
+BEGIN;
+INSERT INTO ndb_myisam VALUES (7);
+INSERT INTO ndb_myisam VALUES (8);
+COMMIT;
+BEGIN;
+INSERT INTO ndb_innodb VALUES (9);
+INSERT INTO ndb_innodb VALUES (10);
+COMMIT;
+BEGIN;
+INSERT INTO innodb_ndb VALUES (11);
+INSERT INTO innodb_ndb VALUES (12);
+COMMIT;
+---- ROLLBACK ----
+BEGIN;
+INSERT INTO myisam_innodb VALUES (13);
+INSERT INTO myisam_innodb VALUES (14);
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+BEGIN;
+INSERT INTO innodb_myisam VALUES (15);
+INSERT INTO innodb_myisam VALUES (16);
+ROLLBACK;
+BEGIN;
+INSERT INTO myisam_ndb VALUES (17);
+INSERT INTO myisam_ndb VALUES (18);
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+BEGIN;
+INSERT INTO ndb_myisam VALUES (19);
+INSERT INTO ndb_myisam VALUES (20);
+ROLLBACK;
+BEGIN;
+INSERT INTO ndb_innodb VALUES (21);
+INSERT INTO ndb_innodb VALUES (22);
+ROLLBACK;
+BEGIN;
+INSERT INTO innodb_ndb VALUES (23);
+INSERT INTO innodb_ndb VALUES (24);
+ROLLBACK;
+==== AUTOCOMMIT=1, transactions ====
+---- COMMIT ----
+SET AUTOCOMMIT = 1;
+BEGIN;
+INSERT INTO myisam_innodb VALUES (25);
+INSERT INTO myisam_innodb VALUES (26);
+COMMIT;
+BEGIN;
+INSERT INTO innodb_myisam VALUES (27);
+INSERT INTO innodb_myisam VALUES (28);
+COMMIT;
+BEGIN;
+INSERT INTO myisam_ndb VALUES (29);
+INSERT INTO myisam_ndb VALUES (30);
+COMMIT;
+BEGIN;
+INSERT INTO ndb_myisam VALUES (31);
+INSERT INTO ndb_myisam VALUES (32);
+COMMIT;
+BEGIN;
+INSERT INTO ndb_innodb VALUES (33);
+INSERT INTO ndb_innodb VALUES (34);
+COMMIT;
+BEGIN;
+INSERT INTO innodb_ndb VALUES (35);
+INSERT INTO innodb_ndb VALUES (36);
+COMMIT;
+---- ROLLBACK ----
+BEGIN;
+INSERT INTO myisam_innodb VALUES (37);
+INSERT INTO myisam_innodb VALUES (38);
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+BEGIN;
+INSERT INTO innodb_myisam VALUES (39);
+INSERT INTO innodb_myisam VALUES (40);
+ROLLBACK;
+BEGIN;
+INSERT INTO myisam_ndb VALUES (41);
+INSERT INTO myisam_ndb VALUES (42);
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+BEGIN;
+INSERT INTO ndb_myisam VALUES (43);
+INSERT INTO ndb_myisam VALUES (44);
+ROLLBACK;
+BEGIN;
+INSERT INTO ndb_innodb VALUES (45);
+INSERT INTO ndb_innodb VALUES (46);
+ROLLBACK;
+BEGIN;
+INSERT INTO innodb_ndb VALUES (47);
+INSERT INTO innodb_ndb VALUES (48);
+ROLLBACK;
+==== AUTOCOMMIT=1, single statements ====
+INSERT INTO myisam_innodb VALUES (49);
+INSERT INTO myisam_innodb VALUES (50);
+INSERT INTO innodb_myisam VALUES (51);
+INSERT INTO innodb_myisam VALUES (52);
+INSERT INTO myisam_ndb VALUES (53);
+INSERT INTO myisam_ndb VALUES (54);
+INSERT INTO ndb_myisam VALUES (55);
+INSERT INTO ndb_myisam VALUES (56);
+INSERT INTO ndb_innodb VALUES (57);
+INSERT INTO ndb_innodb VALUES (58);
+INSERT INTO innodb_ndb VALUES (59);
+INSERT INTO innodb_ndb VALUES (60);
+==== AUTOCOMMIT=0, single statements, myisam on master ====
+SET AUTOCOMMIT = 0;
+INSERT INTO myisam_innodb VALUES (61);
+INSERT INTO myisam_innodb VALUES (62);
+INSERT INTO myisam_ndb VALUES (63);
+INSERT INTO myisam_ndb VALUES (64);
+==== Show results ====
+SELECT * FROM myisam_innodb ORDER BY a;
+a
+1
+2
+13
+14
+25
+26
+37
+38
+49
+50
+61
+62
+SELECT * FROM innodb_myisam ORDER BY a;
+a
+3
+4
+27
+28
+51
+52
+SELECT * FROM myisam_ndb ORDER BY a;
+a
+5
+6
+17
+18
+29
+30
+41
+42
+53
+54
+63
+64
+SELECT * FROM ndb_myisam ORDER BY a;
+a
+7
+8
+31
+32
+55
+56
+SELECT * FROM innodb_ndb ORDER BY a;
+a
+11
+12
+35
+36
+59
+60
+SELECT * FROM ndb_innodb ORDER BY a;
+a
+9
+10
+33
+34
+57
+58
+Comparing tables master:test.myisam_innodb and slave:test.myisam_innodb
+Comparing tables master:test.innodb_myisam and slave:test.innodb_myisam
+Comparing tables master:test.myisam_ndb and slave:test.myisam_ndb
+Comparing tables master:test.ndb_myisam and slave:test.ndb_myisam
+Comparing tables master:test.innodb_ndb and slave:test.innodb_ndb
+Comparing tables master:test.ndb_innodb and slave:test.ndb_innodb
+==== Clean up ====
+drop table myisam_innodb, innodb_myisam;
+drop table myisam_ndb, ndb_myisam;
+drop table innodb_ndb, ndb_innodb;
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result
index f8eb5ebdd89..05524ae1ae3 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_multi.result
@@ -29,8 +29,8 @@ FROM mysql.ndb_binlog_index WHERE epoch = <the_epoch> ;
106 master-bin.000001
CHANGE MASTER TO
master_port=<MASTER_PORT1>,
-master_log_file = 'master-bin.000001',
-master_log_pos = 106 ;
+master_log_file = 'MASTER_LOG_FILE',
+master_log_pos = MASTER_LOG_POS ;
start slave;
INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4);
DELETE FROM t1 WHERE c3 = 1;
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result
index 675a69d17a4..367738b21e5 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result
@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+SET binlog_format = STATEMENT;
*** Test 1 ***
@@ -26,21 +27,21 @@ from mysql.ndb_apply_status;
# since insert is done with transactional engine, expect a BEGIN
# at <start_pos>
-show binlog events from <start_pos> limit 1;
+show binlog events from <binlog_start> limit 1;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 <start_pos> Query 1 # BEGIN
+master-bin.000001 # Query # # BEGIN
# Now the insert, one step after
-show binlog events from <start_pos> limit 1,1;
+show binlog events from <binlog_start> limit 1,1;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Query 1 # use `test`; insert into t1 values (1,2)
+master-bin.000001 # Query # # use `test`; insert into t1 values (1,2)
# and the COMMIT should be at <end_pos>
-show binlog events from <start_pos> limit 2,1;
+show binlog events from <binlog_start> limit 2,1;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Xid 1 <end_pos> COMMIT /* XID */
+master-bin.000001 # Xid # # COMMIT /* XID */
begin;
insert into t1 values (2,3);
@@ -51,18 +52,18 @@ select @log_name:=log_name, @start_pos:=start_pos, @end_pos:=end_pos
from mysql.ndb_apply_status;
@log_name:=log_name @start_pos:=start_pos @end_pos:=end_pos
<log_name> <start_pos> <end_pos>
-show binlog events from <start_pos> limit 1;
+show binlog events from <binlog_start> limit 1;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 <start_pos> Query 1 # BEGIN
+master-bin.000001 # Query # # BEGIN
-show binlog events from <start_pos> limit 1,2;
+show binlog events from <binlog_start> limit 1,2;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; insert into t1 values (2,3)
master-bin.000001 # Query # # use `test`; insert into t2 values (3,4)
-show binlog events from <start_pos> limit 3,1;
+show binlog events from <binlog_start> limit 3,1;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Xid 1 <end_pos> COMMIT /* XID */
+master-bin.000001 # Xid # # COMMIT /* XID */
DROP TABLE test.t1, test.t2;
SHOW TABLES;
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result
index 3ef5e2b7e53..49d068d5fe4 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result
@@ -68,45 +68,7 @@ CHANGE MASTER TO
master_log_file = 'master-bin.000001',
master_log_pos = <the_pos> ;
START SLAVE;
-SHOW SLAVE STATUS;
-Slave_IO_State <Slave_IO_State>
-Master_Host 127.0.0.1
-Master_User root
-Master_Port MASTER_PORT
-Connect_Retry 1
-Master_Log_File master-bin.000001
-Read_Master_Log_Pos <Read_Master_Log_Pos>
-Relay_Log_File <Relay_Log_File>
-Relay_Log_Pos <Relay_Log_Pos>
-Relay_Master_Log_File master-bin.000001
-Slave_IO_Running Yes
-Slave_SQL_Running Yes
-Replicate_Do_DB
-Replicate_Ignore_DB
-Replicate_Do_Table
-Replicate_Ignore_Table <Replicate_Ignore_Table>
-Replicate_Wild_Do_Table
-Replicate_Wild_Ignore_Table
-Last_Errno 0
-Last_Error
-Skip_Counter 0
-Exec_Master_Log_Pos <Exec_Master_Log_Pos>
-Relay_Log_Space <Relay_Log_Space>
-Until_Condition None
-Until_Log_File
-Until_Log_Pos 0
-Master_SSL_Allowed No
-Master_SSL_CA_File
-Master_SSL_CA_Path
-Master_SSL_Cert
-Master_SSL_Cipher
-Master_SSL_Key
-Seconds_Behind_Master <Seconds_Behind_Master>
-Master_SSL_Verify_Server_Cert No
-Last_IO_Errno <Last_IO_Errno>
-Last_IO_Error <Last_IO_Error>
-Last_SQL_Errno 0
-Last_SQL_Error
+Checking that both slave threads are running.
SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3;
hex(c1) hex(c2) c3
1 1 row1
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result
index 409397cb3d1..04a75bf3479 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result
@@ -436,8 +436,7 @@ DELETE FROM t1;
SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
COUNT(*) 0
set @@global.slave_exec_mode= default;
-Last_SQL_Error
-
+Checking that both slave threads are running.
SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
COUNT(*) 0
**** Test for BUG#37076 ****
@@ -487,8 +486,7 @@ Comparing tables master:test.t2 and slave:test.t2
[expecting slave to stop]
INSERT INTO t3 VALUES (1, "", 1);
INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2);
-Last_SQL_Error
-Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.
+Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.
RESET MASTER;
STOP SLAVE;
RESET SLAVE;
@@ -500,8 +498,7 @@ Comparing tables master:test.t4 and slave:test.t4
[expecting slave to stop]
INSERT INTO t5 VALUES (1, "", 1);
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
-Last_SQL_Error
-Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size.
+Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size.
RESET MASTER;
STOP SLAVE;
RESET SLAVE;
@@ -509,8 +506,7 @@ START SLAVE;
[expecting slave to stop]
INSERT INTO t6 VALUES (1, "", 1);
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
-Last_SQL_Error
-Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size.
+Last_SQL_Error = Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size.
RESET MASTER;
STOP SLAVE;
RESET SLAVE;
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result b/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result
index d6c57aed41b..14d3baee1b0 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result
@@ -27,18 +27,17 @@ SELECT * FROM t1 ORDER BY a,b;
a b
**** On Master ****
DROP TABLE t1;
-SHOW BINLOG EVENTS;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4
-master-bin.000001 106 Query 1 223 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
-master-bin.000001 223 Query 1 287 BEGIN
-master-bin.000001 287 Table_map 1 330 table_id: # (test.t1)
-master-bin.000001 330 Table_map 1 392 table_id: # (mysql.ndb_apply_status)
-master-bin.000001 392 Write_rows 1 451 table_id: #
-master-bin.000001 451 Write_rows 1 498 table_id: # flags: STMT_END_F
-master-bin.000001 498 Query 1 563 COMMIT
-master-bin.000001 563 Query 1 643 use `test`; TRUNCATE TABLE t1
-master-bin.000001 643 Query 1 719 use `test`; DROP TABLE t1
+master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
+master-bin.000001 # Write_rows # # table_id: #
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
+master-bin.000001 # Query # # use `test`; DROP TABLE t1
**** On Master ****
CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB;
INSERT INTO t1 VALUES (1,1), (2,2);
@@ -63,29 +62,28 @@ a b
3 3
**** On Master ****
DROP TABLE t1;
-SHOW BINLOG EVENTS;
+show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4
-master-bin.000001 106 Query 1 223 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
-master-bin.000001 223 Query 1 287 BEGIN
-master-bin.000001 287 Table_map 1 330 table_id: # (test.t1)
-master-bin.000001 330 Table_map 1 392 table_id: # (mysql.ndb_apply_status)
-master-bin.000001 392 Write_rows 1 451 table_id: #
-master-bin.000001 451 Write_rows 1 498 table_id: # flags: STMT_END_F
-master-bin.000001 498 Query 1 563 COMMIT
-master-bin.000001 563 Query 1 643 use `test`; TRUNCATE TABLE t1
-master-bin.000001 643 Query 1 719 use `test`; DROP TABLE t1
-master-bin.000001 719 Query 1 836 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
-master-bin.000001 836 Query 1 900 BEGIN
-master-bin.000001 900 Table_map 1 943 table_id: # (test.t1)
-master-bin.000001 943 Table_map 1 1005 table_id: # (mysql.ndb_apply_status)
-master-bin.000001 1005 Write_rows 1 1064 table_id: #
-master-bin.000001 1064 Write_rows 1 1111 table_id: # flags: STMT_END_F
-master-bin.000001 1111 Query 1 1176 COMMIT
-master-bin.000001 1176 Query 1 1240 BEGIN
-master-bin.000001 1240 Table_map 1 1283 table_id: # (test.t1)
-master-bin.000001 1283 Table_map 1 1345 table_id: # (mysql.ndb_apply_status)
-master-bin.000001 1345 Write_rows 1 1404 table_id: #
-master-bin.000001 1404 Delete_rows 1 1443 table_id: # flags: STMT_END_F
-master-bin.000001 1443 Query 1 1508 COMMIT
-master-bin.000001 1508 Query 1 1584 use `test`; DROP TABLE t1
+master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
+master-bin.000001 # Write_rows # # table_id: #
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
+master-bin.000001 # Query # # use `test`; DROP TABLE t1
+master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
+master-bin.000001 # Write_rows # # table_id: #
+master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
+master-bin.000001 # Write_rows # # table_id: #
+master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Query # # use `test`; DROP TABLE t1
diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test
index 5903cd223ad..c03738bc48b 100644
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test
@@ -191,10 +191,11 @@ connection slave;
source include/wait_for_slave_sql_to_stop.inc;
# Replication should have stopped, since max retries were not enough.
-# verify with show slave status
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 19 <Last_Errno> 20 <Last_Error> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36 <Last_IO_Error> 37 <Last_SQL_Errno> 38 <Last_SQL_Error>
---query_vertical SHOW SLAVE STATUS;
+# verify with show slave status
+# 1205 = ER_LOCK_WAIT_TIMEOUT
+--let $slave_sql_errno= 1205
+--let $show_slave_sql_error= 1
+--source include/wait_for_slave_sql_error.inc
# now set max retries high enough to succeed, and start slave again
set GLOBAL slave_transaction_retries=10;
diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test
index 7b8497d8dab..e63b7c5e8ff 100644
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test
@@ -16,9 +16,7 @@ START SLAVE;
--connection slave
CREATE TABLE t1 (a int key, b int) ENGINE=ndb;
#CREATE TABLE t2 (a int key, b int) ENGINE=ndb;
---save_master_pos
---connection master
---sync_with_master
+sync_slave_with_master master;
# now we should have a table on the master as well
SHOW TABLES;
@@ -30,25 +28,19 @@ INSERT INTO t1 VALUES (2,3);
# ensure data has propagated both ways
--connection slave
---save_master_pos
---connection master
---sync_with_master
+sync_slave_with_master master;
--sync_slave_with_master
# connect to slave and ensure data it there.
--connection slave
SELECT * FROM t1 ORDER BY a;
#SELECT * FROM t2 ORDER BY a;
-# BUG#34654 Last_IO_Errno is not reset - Mask columns 35 and 36
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
---query_vertical show slave status;
+source include/check_slave_is_running.inc;
# connect to master and ensure data it there.
--connection master
SELECT * FROM t1 ORDER BY a;
#SELECT * FROM t2 ORDER BY a;
-# BUG#34654 Last_IO_Errno is not reset - Mask columns 35 and 36
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
---query_vertical show slave status;
+source include/check_slave_is_running.inc;
# stop replication on "master" as not to replicate
# shutdown circularly, eg drop table
diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test
index eb04dc2e260..8b0f869c1a3 100644
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test
@@ -38,9 +38,7 @@ eval CHANGE MASTER TO MASTER_HOST="127.0.0.1",MASTER_PORT=$SLAVE_MYPORT,MASTER_U
START SLAVE;
connection slave;
-save_master_pos;
-connection master;
-sync_with_master;
+sync_slave_with_master master;
# The statement is disabled since it cannot reliably show the same
# info all the time. Use it for debug purposes.
@@ -48,9 +46,7 @@ sync_with_master;
#SHOW BINLOG EVENTS;
# Check that there is no error in replication
---replace_result $SLAVE_MYPORT SLAVE_PORT
---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
-query_vertical SHOW SLAVE STATUS;
+source include/check_slave_is_running.inc;
# Check that we have the data on the master
SELECT * FROM t1 ORDER BY a;
@@ -75,9 +71,7 @@ sync_with_master;
SELECT * FROM t1 ORDER BY a;
# Check that there is no error in replication
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
-query_vertical SHOW SLAVE STATUS;
+source include/check_slave_is_running.inc;
-- connection master
DROP TABLE t1;
diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test
index 3133ad34f0c..99c9df40094 100644
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test
@@ -39,12 +39,9 @@ SELECT * FROM t1 ORDER BY c3;
# check that we have it on the slave
--sync_slave_with_master
---connection slave
SELECT * FROM t1 ORDER BY c3;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36 <Last_IO_Error>
-SHOW SLAVE STATUS;
+source include/check_slave_is_running.inc;
# stop slave and reset position to before the last changes
STOP SLAVE;
@@ -53,9 +50,7 @@ eval CHANGE MASTER TO
master_log_file = '$the_file',
master_log_pos = $the_pos ;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36 <Last_IO_Error>
-SHOW SLAVE STATUS;
+source include/check_slave_no_error.inc;
# start the slave again
# -> same events should have been applied again
@@ -67,7 +62,6 @@ START SLAVE;
--connection master
SELECT * FROM t1 ORDER BY c3;
--sync_slave_with_master
---connection slave
SELECT * FROM t1 ORDER BY c3;
STOP SLAVE;
@@ -106,9 +100,7 @@ COMMIT;
--sync_slave_with_master
--connection slave
SELECT * FROM t1;
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 34 <Last_IO_Errno> 35 <Last_IO_Error>
-SHOW SLAVE STATUS;
+source include/check_slave_is_running.inc;
connection master;
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test
index 14b76722fa6..22ccabe3745 100644
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_engines_transactions.test
@@ -415,6 +415,29 @@ ROLLBACK;
SET AUTOCOMMIT = 1;
+--echo ---- Mixed statements Innodb ----
+
+BEGIN;
+INSERT INTO tndb VALUES (147);
+INSERT INTO tinnodb SELECT * FROM tndb ORDER BY a DESC LIMIT 1;
+COMMIT;
+
+INSERT INTO tndb VALUES (148);
+BEGIN;
+INSERT INTO tinnodb SELECT * FROM tndb ORDER BY a DESC LIMIT 1;
+INSERT INTO tndb VALUES (149);
+COMMIT;
+
+BEGIN;
+INSERT INTO tndb VALUES (150);
+INSERT INTO tmyisam SELECT * FROM tndb ORDER BY a DESC LIMIT 1;
+COMMIT;
+
+INSERT INTO tndb VALUES (151);
+BEGIN;
+INSERT INTO tmyisam SELECT * FROM tndb ORDER BY a DESC LIMIT 1;
+INSERT INTO tndb VALUES (152);
+COMMIT;
--echo ==== Verify the result ====
diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-master.opt
new file mode 100644
index 00000000000..b74354b22e1
--- /dev/null
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-master.opt
@@ -0,0 +1 @@
+--innodb --ndbcluster
diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-slave.opt
new file mode 100644
index 00000000000..bbb86b2991b
--- /dev/null
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables-slave.opt
@@ -0,0 +1 @@
+--innodb --ndbcluster --replicate-ignore-table=mysql.ndb_apply_status
diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test
new file mode 100644
index 00000000000..7d7cd5770cf
--- /dev/null
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test
@@ -0,0 +1,349 @@
+# ==== Purpose ====
+#
+# Test replication of transactions on tables which have different
+# engines on master and slave. This tests all combinations of innodb,
+# myisam, and ndb.
+#
+# ==== Method ====
+#
+# Set up six tables, each being innodb, myisam, or innodb on master,
+# and another of innodb, myisam, or innodb on slave. For each table,
+# do the following:
+#
+# - committed and rollback'ed transactions, with autocommit on and
+# off
+# - non-transactions with autocommit on
+# - non-transactions with autocommit off, where the master table is
+# myisam.
+#
+# Note: we are running the slave with
+# --replicate-ignore-table=mysql.ndb_apply_status . See BUG#34557 for
+# explanation.
+#
+# ==== Related bugs ====
+#
+# BUG#26395: if crash during autocommit update to transactional table on master, slave fails
+# BUG#29288: myisam transactions replicated to a transactional slave leaves slave unstable
+# BUG#34557: Row-based replication from ndb to non-ndb gives error on slave
+# BUG#34600: Rolled-back punch transactions not replicated correctly
+#
+# ==== Todo ====
+#
+# We should eventually try transactions touching two tables which are
+# of different engines on the same server (so that we try, e.g. punch
+# transactions; cf BUG#34600). However, that will make the test much
+# bigger (9 master-slave engine combinations [myisam->myisam,
+# myisam->ndb, etc]. To try all combinations of one or more such
+# tables means 2^9-1=511 transactions. We need to multiplied by 5
+# since we want to test committed/rollback'ed transactions
+# with/without AUTOCOMMIT, as well as non-transactions with
+# autocommit). We'd have to write a script to produce the test case.
+
+
+--echo ==== Initialization ====
+
+--source include/have_ndb.inc
+--source include/have_innodb.inc
+--source include/ndb_master-slave.inc
+
+--echo ---- setup master ----
+
+CREATE TABLE myisam_innodb (a INT) ENGINE=MYISAM;
+CREATE TABLE innodb_myisam (a INT) ENGINE=INNODB;
+CREATE TABLE myisam_ndb (a INT) ENGINE=MYISAM;
+CREATE TABLE ndb_myisam (a INT) ENGINE=NDB;
+CREATE TABLE innodb_ndb (a INT) ENGINE=INNODB;
+CREATE TABLE ndb_innodb (a INT) ENGINE=NDB;
+
+SHOW CREATE TABLE myisam_innodb;
+SHOW CREATE TABLE innodb_myisam;
+SHOW CREATE TABLE myisam_ndb;
+SHOW CREATE TABLE ndb_myisam;
+SHOW CREATE TABLE innodb_ndb;
+SHOW CREATE TABLE ndb_innodb;
+
+--echo ---- setup slave with different engines ----
+
+sync_slave_with_master;
+
+DROP TABLE myisam_innodb, innodb_myisam;
+DROP TABLE myisam_ndb, ndb_myisam;
+DROP TABLE innodb_ndb, ndb_innodb;
+
+CREATE TABLE myisam_innodb (a INT) ENGINE=INNODB;
+CREATE TABLE innodb_myisam (a INT) ENGINE=MYISAM;
+CREATE TABLE myisam_ndb (a INT) ENGINE=NDB;
+CREATE TABLE ndb_myisam (a INT) ENGINE=MYISAM;
+CREATE TABLE innodb_ndb (a INT) ENGINE=NDB;
+CREATE TABLE ndb_innodb (a INT) ENGINE=INNODB;
+
+SHOW CREATE TABLE myisam_innodb;
+SHOW CREATE TABLE innodb_myisam;
+SHOW CREATE TABLE myisam_ndb;
+SHOW CREATE TABLE ndb_myisam;
+SHOW CREATE TABLE innodb_ndb;
+SHOW CREATE TABLE ndb_innodb;
+
+connection master;
+
+
+--echo ==== AUTOCOMMIT=0, transactions ====
+
+--echo ---- COMMIT ----
+
+SET AUTOCOMMIT = 0;
+
+BEGIN;
+INSERT INTO myisam_innodb VALUES (1);
+INSERT INTO myisam_innodb VALUES (2);
+COMMIT;
+sync_slave_with_master;
+connection master;
+BEGIN;
+INSERT INTO innodb_myisam VALUES (3);
+INSERT INTO innodb_myisam VALUES (4);
+COMMIT;
+sync_slave_with_master;
+connection master;
+
+BEGIN;
+INSERT INTO myisam_ndb VALUES (5);
+INSERT INTO myisam_ndb VALUES (6);
+COMMIT;
+sync_slave_with_master;
+connection master;
+BEGIN;
+INSERT INTO ndb_myisam VALUES (7);
+INSERT INTO ndb_myisam VALUES (8);
+COMMIT;
+sync_slave_with_master;
+connection master;
+
+BEGIN;
+INSERT INTO ndb_innodb VALUES (9);
+INSERT INTO ndb_innodb VALUES (10);
+COMMIT;
+sync_slave_with_master;
+connection master;
+BEGIN;
+INSERT INTO innodb_ndb VALUES (11);
+INSERT INTO innodb_ndb VALUES (12);
+COMMIT;
+sync_slave_with_master;
+connection master;
+
+--echo ---- ROLLBACK ----
+
+BEGIN;
+INSERT INTO myisam_innodb VALUES (13);
+INSERT INTO myisam_innodb VALUES (14);
+ROLLBACK;
+sync_slave_with_master;
+connection master;
+BEGIN;
+INSERT INTO innodb_myisam VALUES (15);
+INSERT INTO innodb_myisam VALUES (16);
+ROLLBACK;
+sync_slave_with_master;
+connection master;
+
+BEGIN;
+INSERT INTO myisam_ndb VALUES (17);
+INSERT INTO myisam_ndb VALUES (18);
+ROLLBACK;
+sync_slave_with_master;
+connection master;
+BEGIN;
+INSERT INTO ndb_myisam VALUES (19);
+INSERT INTO ndb_myisam VALUES (20);
+ROLLBACK;
+sync_slave_with_master;
+connection master;
+
+BEGIN;
+INSERT INTO ndb_innodb VALUES (21);
+INSERT INTO ndb_innodb VALUES (22);
+ROLLBACK;
+sync_slave_with_master;
+connection master;
+BEGIN;
+INSERT INTO innodb_ndb VALUES (23);
+INSERT INTO innodb_ndb VALUES (24);
+ROLLBACK;
+sync_slave_with_master;
+connection master;
+
+
+--echo ==== AUTOCOMMIT=1, transactions ====
+
+--echo ---- COMMIT ----
+
+SET AUTOCOMMIT = 1;
+
+BEGIN;
+INSERT INTO myisam_innodb VALUES (25);
+INSERT INTO myisam_innodb VALUES (26);
+COMMIT;
+sync_slave_with_master;
+connection master;
+BEGIN;
+INSERT INTO innodb_myisam VALUES (27);
+INSERT INTO innodb_myisam VALUES (28);
+COMMIT;
+sync_slave_with_master;
+connection master;
+
+BEGIN;
+INSERT INTO myisam_ndb VALUES (29);
+INSERT INTO myisam_ndb VALUES (30);
+COMMIT;
+sync_slave_with_master;
+connection master;
+BEGIN;
+INSERT INTO ndb_myisam VALUES (31);
+INSERT INTO ndb_myisam VALUES (32);
+COMMIT;
+sync_slave_with_master;
+connection master;
+
+BEGIN;
+INSERT INTO ndb_innodb VALUES (33);
+INSERT INTO ndb_innodb VALUES (34);
+COMMIT;
+sync_slave_with_master;
+connection master;
+BEGIN;
+INSERT INTO innodb_ndb VALUES (35);
+INSERT INTO innodb_ndb VALUES (36);
+COMMIT;
+sync_slave_with_master;
+connection master;
+
+--echo ---- ROLLBACK ----
+
+BEGIN;
+INSERT INTO myisam_innodb VALUES (37);
+INSERT INTO myisam_innodb VALUES (38);
+ROLLBACK;
+sync_slave_with_master;
+connection master;
+BEGIN;
+INSERT INTO innodb_myisam VALUES (39);
+INSERT INTO innodb_myisam VALUES (40);
+ROLLBACK;
+sync_slave_with_master;
+connection master;
+
+BEGIN;
+INSERT INTO myisam_ndb VALUES (41);
+INSERT INTO myisam_ndb VALUES (42);
+ROLLBACK;
+sync_slave_with_master;
+connection master;
+BEGIN;
+INSERT INTO ndb_myisam VALUES (43);
+INSERT INTO ndb_myisam VALUES (44);
+ROLLBACK;
+sync_slave_with_master;
+connection master;
+
+BEGIN;
+INSERT INTO ndb_innodb VALUES (45);
+INSERT INTO ndb_innodb VALUES (46);
+ROLLBACK;
+sync_slave_with_master;
+connection master;
+BEGIN;
+INSERT INTO innodb_ndb VALUES (47);
+INSERT INTO innodb_ndb VALUES (48);
+ROLLBACK;
+sync_slave_with_master;
+connection master;
+
+
+--echo ==== AUTOCOMMIT=1, single statements ====
+
+INSERT INTO myisam_innodb VALUES (49);
+INSERT INTO myisam_innodb VALUES (50);
+sync_slave_with_master;
+connection master;
+INSERT INTO innodb_myisam VALUES (51);
+INSERT INTO innodb_myisam VALUES (52);
+sync_slave_with_master;
+connection master;
+
+INSERT INTO myisam_ndb VALUES (53);
+INSERT INTO myisam_ndb VALUES (54);
+sync_slave_with_master;
+connection master;
+INSERT INTO ndb_myisam VALUES (55);
+INSERT INTO ndb_myisam VALUES (56);
+sync_slave_with_master;
+connection master;
+
+INSERT INTO ndb_innodb VALUES (57);
+INSERT INTO ndb_innodb VALUES (58);
+sync_slave_with_master;
+connection master;
+INSERT INTO innodb_ndb VALUES (59);
+INSERT INTO innodb_ndb VALUES (60);
+sync_slave_with_master;
+connection master;
+
+
+--echo ==== AUTOCOMMIT=0, single statements, myisam on master ====
+
+SET AUTOCOMMIT = 0;
+
+# This tests BUG#29288.
+INSERT INTO myisam_innodb VALUES (61);
+INSERT INTO myisam_innodb VALUES (62);
+sync_slave_with_master;
+connection master;
+
+INSERT INTO myisam_ndb VALUES (63);
+INSERT INTO myisam_ndb VALUES (64);
+sync_slave_with_master;
+connection master;
+
+
+--echo ==== Show results ====
+
+SELECT * FROM myisam_innodb ORDER BY a;
+SELECT * FROM innodb_myisam ORDER BY a;
+SELECT * FROM myisam_ndb ORDER BY a;
+SELECT * FROM ndb_myisam ORDER BY a;
+SELECT * FROM innodb_ndb ORDER BY a;
+SELECT * FROM ndb_innodb ORDER BY a;
+
+let $diff_table_1=master:test.myisam_innodb;
+let $diff_table_2=slave:test.myisam_innodb;
+source include/diff_tables.inc;
+
+let $diff_table_1=master:test.innodb_myisam;
+let $diff_table_2=slave:test.innodb_myisam;
+source include/diff_tables.inc;
+
+let $diff_table_1=master:test.myisam_ndb;
+let $diff_table_2=slave:test.myisam_ndb;
+source include/diff_tables.inc;
+
+let $diff_table_1=master:test.ndb_myisam;
+let $diff_table_2=slave:test.ndb_myisam;
+source include/diff_tables.inc;
+
+let $diff_table_1=master:test.innodb_ndb;
+let $diff_table_2=slave:test.innodb_ndb;
+source include/diff_tables.inc;
+
+let $diff_table_1=master:test.ndb_innodb;
+let $diff_table_2=slave:test.ndb_innodb;
+source include/diff_tables.inc;
+
+
+--echo ==== Clean up ====
+
+drop table myisam_innodb, innodb_myisam;
+drop table myisam_ndb, ndb_myisam;
+drop table innodb_ndb, ndb_innodb;
+sync_slave_with_master;
diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test
index eb128cfa2ce..e9107fd90bd 100644
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test
@@ -39,7 +39,7 @@ let $the_file= `SELECT @the_file` ;
# now connect the slave to the _other_ "master"
connection slave;
---replace_result $MASTER_MYPORT1 <MASTER_PORT1>
+--replace_result $MASTER_MYPORT1 <MASTER_PORT1> $the_pos MASTER_LOG_POS $the_file MASTER_LOG_FILE
eval CHANGE MASTER TO
master_port=$MASTER_MYPORT1,
master_log_file = '$the_file',
diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test
index bf7f1eed7b2..7c65e04717a 100644
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test
@@ -27,9 +27,11 @@
--disable_query_log
--source include/have_ndb.inc
--source include/have_innodb.inc
---source include/have_binlog_format_statement.inc
--source include/ndb_master-slave.inc
--enable_query_log
+
+# statement format is supported because master uses innodb
+SET binlog_format = STATEMENT;
let $off_set = 6;
let $rpl_format = 'SBR';
--source extra/rpl_tests/rpl_ndb_apply_status.test
diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test
index 88572c3e9a2..b91ff198c51 100644
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test
@@ -70,10 +70,7 @@ START SLAVE;
#
--connection master
--sync_slave_with_master
---connection slave
---replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36 <Last_IO_Error>
-query_vertical SHOW SLAVE STATUS;
+--source include/check_slave_is_running.inc
SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3;
SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1;
@@ -85,7 +82,6 @@ SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1;
--connection master
DROP DATABASE ndbsynctest;
--sync_slave_with_master
---connection slave
STOP SLAVE;
#
diff --git a/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test b/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test
index f8933b3744d..898bf310dc5 100644
--- a/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test
+++ b/mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test
@@ -39,10 +39,7 @@ SELECT * FROM t1 ORDER BY a,b;
--echo **** On Master ****
connection master;
DROP TABLE t1;
-let SERVER_VERSION=`select version()`;
---replace_regex /\/\* xid=[0-9]+ \*\//\/* xid= *\// /table_id: [0-9]+/table_id: #/
---replace_result $SERVER_VERSION SERVER_VERSION
-SHOW BINLOG EVENTS;
+source include/show_binlog_events.inc;
--echo **** On Master ****
connection master;
@@ -64,8 +61,6 @@ SELECT * FROM t1 ORDER BY a,b;
--echo **** On Master ****
connection master;
DROP TABLE t1;
---replace_regex /table_id: [0-9]+/table_id: #/
---replace_result $SERVER_VERSION SERVER_VERSION
-SHOW BINLOG EVENTS;
+source include/show_binlog_events.inc;
-- source include/master-slave-end.inc
diff --git a/mysql-test/suite/sys_vars/r/slow_query_log_func.result b/mysql-test/suite/sys_vars/r/slow_query_log_func.result
index eb7efe4a004..fb650399597 100644
--- a/mysql-test/suite/sys_vars/r/slow_query_log_func.result
+++ b/mysql-test/suite/sys_vars/r/slow_query_log_func.result
@@ -36,5 +36,78 @@ SELECT count(*) > 0 FROM mysql.slow_log;
count(*) > 0
1
DROP PROCEDURE p_test;
+Bug53191 Lock_time in slow log is negative when logging stored routines
+TRUNCATE mysql.slow_log;
+CREATE TABLE t1 (c0 INT PRIMARY KEY AUTO_INCREMENT, c1 TIMESTAMP, c2 TIMESTAMP);
+CREATE FUNCTION f_slow_now() RETURNS TIMESTAMP
+BEGIN
+DO SLEEP(2);
+RETURN NOW();
+END//
+CREATE FUNCTION f_slow_current_time() RETURNS TIME
+BEGIN
+DO SLEEP(2);
+RETURN CURRENT_TIME();
+END
+//
+INSERT INTO t1 (c1,c2) VALUES (now(), f_slow_now())//
+CREATE TRIGGER tf_before BEFORE INSERT ON t1
+FOR EACH ROW BEGIN
+SET new.c2 = f_slow_now();
+END//
+CREATE PROCEDURE p1()
+BEGIN
+INSERT INTO t1 (c1,c2) values (now(),now());
+DO SLEEP(2);
+INSERT INTO t1 (c1,c2) values (now(),now());
+end//
+INSERT INTO t1 (c1,c2) VALUES (now(), now());
+CALL p1();
+SELECT c1-c2 FROM t1;
+c1-c2
+0
+0
+0
+0
+*** There shouldn't less than 1 s difference between each row
+SELECT t1.c1-self.c1 > 1 FROM t1, t1 as self WHERE t1.c0=self.c0+1 ORDER BY t1.c0;
+t1.c1-self.c1 > 1
+1
+1
+1
+DROP TRIGGER tf_before;
+DROP FUNCTION f_slow_now;
+DROP FUNCTION f_slow_current_time;
+DROP TABLE t1;
+DROP TABLE IF EXISTS t1;
+Warnings:
+Note 1051 Unknown table 't1'
+CREATE TABLE t1(c1 INT) ENGINE=MyISAM;
+DROP PROCEDURE IF EXISTS p1;
+CREATE PROCEDURE p1()
+BEGIN
+INSERT INTO t1 VALUES (1);
+SELECT COUNT(*) FROM t1 WHERE c1= 1;
+UPDATE t1 SET c1=c1*2;
+END|
+Connection 2
+LOCK TABLE t1 WRITE;
+Back to default connection
+CALL p1();
+Wait three seconds and unlock the table
+UNLOCK TABLES;
+COUNT(*)
+1
+Slow log:
+**** 1 == we have slow log entries
+SELECT count(*) > 0 FROM mysql.slow_log;
+count(*) > 0
+1
+**** 0 == None of the entries have a lock time greater than 10 s
+SELECT count(*) FROM mysql.slow_log WHERE lock_time > 10;
+count(*)
+0
+DROP TABLE t1;
+DROP PROCEDURE p1;
SET @@global.log_output = @global_log_output;
SET @global.slow_query_log = @global_slow_query_log;
diff --git a/mysql-test/suite/sys_vars/r/tx_isolation_func.result b/mysql-test/suite/sys_vars/r/tx_isolation_func.result
index 2242525f14b..6b4c990c71c 100644
--- a/mysql-test/suite/sys_vars/r/tx_isolation_func.result
+++ b/mysql-test/suite/sys_vars/r/tx_isolation_func.result
@@ -95,10 +95,7 @@ a b
22 10
24 10
INSERT INTO t1 VALUES(23, 23);
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
INSERT INTO t1 VALUES(25, 25);
-ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-Bug: Only even rows are being locked, error 1205 should'nt have occured
SELECT * FROM t1;
a b
2 10
@@ -109,7 +106,9 @@ a b
18 10
20 10
22 10
+23 23
24 10
+25 25
COMMIT;
** Connection con0 **
COMMIT;
@@ -144,7 +143,9 @@ a b
18 10
20 10
22 10
+23 23
24 10
+25 25
INSERT INTO t1 VALUES(5, 5);
INSERT INTO t1 VALUES(7, 7);
SELECT * FROM t1;
@@ -159,7 +160,9 @@ a b
18 10
20 10
22 10
+23 23
24 10
+25 25
COMMIT;
** Connection con0 **
COMMIT;
@@ -196,7 +199,9 @@ a b
18 11
20 11
22 11
+23 23
24 11
+25 25
INSERT INTO t1 VALUES(9, 9);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
INSERT INTO t1 VALUES(13, 13);
@@ -214,7 +219,9 @@ a b
18 11
20 11
22 11
+23 23
24 11
+25 25
COMMIT;
** Connection con0 **
COMMIT;
@@ -225,6 +232,8 @@ SELECT * FROM t1 WHERE a IN (2,4,6,8,10,12,14,16,18,20,22,24,26) = 0 FOR UPDATE;
a b
5 5
7 7
+23 23
+25 25
UPDATE t1 SET b = 13 WHERE a IN (2,4,6,8,10,12,14,16,18,20,22,24,26) = 0;
** Connection con1 **
START TRANSACTION;
@@ -240,7 +249,9 @@ a b
18 12
20 12
22 12
+23 23
24 12
+25 25
INSERT INTO t1 VALUES(9, 9);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
INSERT INTO t1 VALUES(13, 13);
@@ -258,7 +269,9 @@ a b
18 12
20 12
22 12
+23 23
24 12
+25 25
COMMIT;
** Connection con0 **
COMMIT;
@@ -273,7 +286,9 @@ a b
18 12
20 12
22 12
+23 13
24 12
+25 13
UPDATE t1 SET b = 14 WHERE a IN (2,4,6,8) = 0;
** Connection con1 **
START TRANSACTION;
@@ -289,7 +304,9 @@ a b
18 12
20 12
22 12
+23 13
24 12
+25 13
INSERT INTO t1 VALUES(9, 9);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
INSERT INTO t1 VALUES(13, 13);
@@ -307,7 +324,9 @@ a b
18 12
20 12
22 12
+23 13
24 12
+25 13
COMMIT;
** Connection con0 **
COMMIT;
diff --git a/mysql-test/suite/sys_vars/t/slow_query_log_func.test b/mysql-test/suite/sys_vars/t/slow_query_log_func.test
index 250d5210c46..dd202ec20ff 100644
--- a/mysql-test/suite/sys_vars/t/slow_query_log_func.test
+++ b/mysql-test/suite/sys_vars/t/slow_query_log_func.test
@@ -51,8 +51,93 @@ CALL p_test();
SELECT count(*) > 0 FROM mysql.slow_log;
DROP PROCEDURE p_test;
+#==============================================================================
+--echo Bug53191 Lock_time in slow log is negative when logging stored routines
+#==============================================================================
+TRUNCATE mysql.slow_log;
+connect (con2,localhost,root,,);
+connection default;
+
+CREATE TABLE t1 (c0 INT PRIMARY KEY AUTO_INCREMENT, c1 TIMESTAMP, c2 TIMESTAMP);
+delimiter //;
+CREATE FUNCTION f_slow_now() RETURNS TIMESTAMP
+BEGIN
+ DO SLEEP(2);
+ RETURN NOW();
+END//
+
+CREATE FUNCTION f_slow_current_time() RETURNS TIME
+BEGIN
+ DO SLEEP(2);
+ RETURN CURRENT_TIME();
+END
+//
+
+INSERT INTO t1 (c1,c2) VALUES (now(), f_slow_now())//
+
+CREATE TRIGGER tf_before BEFORE INSERT ON t1
+FOR EACH ROW BEGIN
+ SET new.c2 = f_slow_now();
+END//
+
+CREATE PROCEDURE p1()
+BEGIN
+ INSERT INTO t1 (c1,c2) values (now(),now());
+ DO SLEEP(2);
+ INSERT INTO t1 (c1,c2) values (now(),now());
+end//
+
+delimiter ;//
+
+INSERT INTO t1 (c1,c2) VALUES (now(), now());
+CALL p1();
+
+SELECT c1-c2 FROM t1;
+--echo *** There shouldn't less than 1 s difference between each row
+SELECT t1.c1-self.c1 > 1 FROM t1, t1 as self WHERE t1.c0=self.c0+1 ORDER BY t1.c0;
+
+DROP TRIGGER tf_before;
+DROP FUNCTION f_slow_now;
+DROP FUNCTION f_slow_current_time;
+DROP TABLE t1;
+
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(c1 INT) ENGINE=MyISAM;
+DROP PROCEDURE IF EXISTS p1;
+delimiter |;
+CREATE PROCEDURE p1()
+BEGIN
+ INSERT INTO t1 VALUES (1);
+ SELECT COUNT(*) FROM t1 WHERE c1= 1;
+ UPDATE t1 SET c1=c1*2;
+END|
+delimiter ;|
+
+--echo Connection 2
+connection con2;
+LOCK TABLE t1 WRITE;
+
+--echo Back to default connection
+connection default;
+send CALL p1();
+
+--echo Wait three seconds and unlock the table
+connection con2;
+sleep 3;
+UNLOCK TABLES;
+connection default;
+reap;
+--echo Slow log:
+--echo **** 1 == we have slow log entries
+SELECT count(*) > 0 FROM mysql.slow_log;
+--echo **** 0 == None of the entries have a lock time greater than 10 s
+SELECT count(*) FROM mysql.slow_log WHERE lock_time > 10;
+disconnect con2;
+DROP TABLE t1;
+DROP PROCEDURE p1;
+
-#restore
+#================================================================== Restore
SET @@global.log_output = @global_log_output;
SET @global.slow_query_log = @global_slow_query_log;
diff --git a/mysql-test/suite/sys_vars/t/tx_isolation_func.test b/mysql-test/suite/sys_vars/t/tx_isolation_func.test
index 1fd2e323db8..7072de6b086 100644
--- a/mysql-test/suite/sys_vars/t/tx_isolation_func.test
+++ b/mysql-test/suite/sys_vars/t/tx_isolation_func.test
@@ -134,12 +134,9 @@ START TRANSACTION;
SELECT * FROM t1;
---error ER_LOCK_WAIT_TIMEOUT
INSERT INTO t1 VALUES(23, 23);
---error ER_LOCK_WAIT_TIMEOUT
INSERT INTO t1 VALUES(25, 25);
---echo Bug: Only even rows are being locked, error 1205 should'nt have occured
SELECT * FROM t1;
diff --git a/mysql-test/t/alter_table-big.test b/mysql-test/t/alter_table-big.test
index 1dcc1f1c9bd..e007a3a55e0 100644
--- a/mysql-test/t/alter_table-big.test
+++ b/mysql-test/t/alter_table-big.test
@@ -31,7 +31,9 @@ create table t2 (i int);
# statement execution, so we don't need many rows in 't1' to make
# this test repeatable.
alter table t1 disable keys;
+--disable_warnings
insert into t1 values (RAND()*1000, RAND()*1000, RAND()*1000);
+--enable_warnings
# Later we use binlog to check the order in which statements are
# executed so let us reset it first.
@@ -50,8 +52,7 @@ connection default;
--reap
set session debug="-d,sleep_alter_enable_indexes";
# Check that statements were executed/binlogged in correct order.
---replace_column 2 # 5 #
-show binlog events in 'master-bin.000001' from 106;
+source include/show_binlog_events.inc;
# Clean up
drop tables t1, t2;
@@ -111,8 +112,7 @@ drop table t3;
set session debug="-d,sleep_alter_before_main_binlog";
# Check that all statements were logged in correct order
---replace_column 2 # 5 #
-show binlog events in 'master-bin.000001' from 106;
+source include/show_binlog_events.inc;
--echo End of 5.1 tests
diff --git a/mysql-test/t/bug39022.test b/mysql-test/t/bug39022.test
index 268b207e0e5..6056dbf0e7b 100644
--- a/mysql-test/t/bug39022.test
+++ b/mysql-test/t/bug39022.test
@@ -24,7 +24,7 @@ START TRANSACTION;
connection thread2;
--echo # in thread2
REPLACE INTO t2 VALUES (-17);
-SELECT d FROM t2,t1 WHERE d=(SELECT MAX(a) FROM t1 WHERE t1.a > t2.d);
+SELECT d FROM t2,t1 WHERE d=(SELECT MAX(a) FROM t1 WHERE t1.a > t2.d) LOCK IN SHARE MODE;
connection thread1;
--echo # in thread1
@@ -37,14 +37,14 @@ START TRANSACTION;
REPLACE INTO t1(a,b) VALUES (65,-50);
REPLACE INTO t2 VALUES (-91);
send;
-SELECT d FROM t2,t1 WHERE d=(SELECT MAX(a) FROM t1 WHERE t1.a > t2.d); #waits
+SELECT d FROM t2,t1 WHERE d=(SELECT MAX(a) FROM t1 WHERE t1.a > t2.d) LOCK IN SHARE MODE; #waits
connection thread1;
--echo # in thread1
--echo # should not crash
--error ER_LOCK_DEADLOCK
-SELECT d FROM t2,t1 WHERE d=(SELECT MAX(a) FROM t1 WHERE t1.a > t2.d); #crashes
+SELECT d FROM t2,t1 WHERE d=(SELECT MAX(a) FROM t1 WHERE t1.a > t2.d) LOCK IN SHARE MODE; #crashes
connection thread2;
--echo # in thread2
diff --git a/mysql-test/t/create-big.test b/mysql-test/t/create-big.test
index 6cd6326cdb8..e1dfbbd4ac4 100644
--- a/mysql-test/t/create-big.test
+++ b/mysql-test/t/create-big.test
@@ -305,8 +305,7 @@ connection default;
show create table t2;
drop table t2;
# Let us check that statements were executed/binlogged in correct order
---replace_column 2 # 5 #
-show binlog events in 'master-bin.000001' from 106;
+source include/show_binlog_events.inc;
# Now let us check the gap between check for target table
# existance and copying of .frm file.
@@ -330,8 +329,7 @@ drop table t1;
connection default;
--reap
drop table t2;
---replace_column 2 # 5 #
-show binlog events in 'master-bin.000001' from 106;
+source include/show_binlog_events.inc;
# And now he gap between copying of .frm file and ha_create_table() call.
create table t1 (i int);
@@ -359,8 +357,7 @@ drop table t1;
connection default;
--reap
drop table t2;
---replace_column 2 # 5 #
-show binlog events in 'master-bin.000001' from 106;
+source include/show_binlog_events.inc;
# Finally we check the gap between ha_create_table() and binlogging
create table t1 (i int);
@@ -386,7 +383,6 @@ drop table t1;
connection default;
--reap
drop table t2;
---replace_column 2 # 5 #
-show binlog events in 'master-bin.000001' from 106;
+source include/show_binlog_events.inc;
set session debug="-d,sleep_create_like_before_binlogging";
diff --git a/mysql-test/t/ctype_cp932_binlog_stm.test b/mysql-test/t/ctype_cp932_binlog_stm.test
index 89df33a6df5..f3038ccfa61 100644
--- a/mysql-test/t/ctype_cp932_binlog_stm.test
+++ b/mysql-test/t/ctype_cp932_binlog_stm.test
@@ -7,6 +7,7 @@
#
# Bug#18293: Values in stored procedure written to binlog unescaped
#
+let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
delimiter |;
CREATE TABLE t4 (s1 CHAR(50) CHARACTER SET latin1,
@@ -22,7 +23,7 @@ CALL bug18293("Foo's a Bar", _cp932 0xED40ED41ED42, 47.93)|
SELECT HEX(s1),HEX(s2),d FROM t4|
DROP PROCEDURE bug18293|
DROP TABLE t4|
-SHOW BINLOG EVENTS FROM 370|
+source include/show_binlog_events.inc|
delimiter ;|
--echo End of 5.0 tests
diff --git a/mysql-test/t/delete.test b/mysql-test/t/delete.test
index 7bbc470137a..5a0e86568f3 100644
--- a/mysql-test/t/delete.test
+++ b/mysql-test/t/delete.test
@@ -374,5 +374,17 @@ DELETE IGNORE FROM t1;
DROP TABLE t1;
+--echo #
+--echo # Bug #53450: Crash/assertion
+--echo # "virtual int ha_myisam::index_first(uchar*)") at assert.c:81
+--echo #
+
+CREATE TABLE t1 (a INT, b INT, c INT,
+ INDEX(a), INDEX(b), INDEX(c));
+INSERT INTO t1 VALUES (1,2,3), (4,5,6), (7,8,9);
+
+DELETE FROM t1 WHERE a = 10 OR b = 20 ORDER BY c LIMIT 1;
+
+DROP TABLE t1;
--echo End of 5.1 tests
diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def
index c1a22adf091..cede26f555a 100644
--- a/mysql-test/t/disabled.def
+++ b/mysql-test/t/disabled.def
@@ -11,5 +11,6 @@
##############################################################################
kill : Bug#37780 2008-12-03 HHunger need some changes to be robust enough for pushbuild.
query_cache_28249 : Bug#43861 2009-03-25 main.query_cache_28249 fails sporadically
-# partition_innodb_plugin : Bug#53307 2010-04-30 VasilDimov valgrind warnings
-# ps_3innodb : Bug#53309 2010-04-30 VasilDimov valgrind warnings
+partition_innodb_plugin : Bug#53307 2010-04-30 VasilDimov valgrind warnings
+main.mysqlhotcopy_myisam : bug#54129 2010-06-04 Horst
+main.mysqlhotcopy_archive: bug#54129 2010-06-04 Horst
diff --git a/mysql-test/t/error_simulation.test b/mysql-test/t/error_simulation.test
index 7cd16a6bc5a..f6edacfaa29 100644
--- a/mysql-test/t/error_simulation.test
+++ b/mysql-test/t/error_simulation.test
@@ -45,6 +45,49 @@ SHOW CREATE TABLE t1;
SELECT * FROM t1;
DROP TABLE t1;
+--echo #
+--echo # Bug#42064: low memory crash when importing hex strings, in Item_hex_string::Item_hex_string
+--echo #
+
+CREATE TABLE t1(a BLOB);
+
+SET SESSION debug="+d,bug42064_simulate_oom";
+# May fail with either ER_OUT_OF_RESOURCES or EE_OUTOFMEMORY
+--error ER_OUT_OF_RESOURCES, 5
+INSERT INTO t1 VALUES("");
+SET SESSION debug=DEFAULT;
+
+DROP TABLE t1;
+
+-- echo #
+-- echo # Bug#41660: Sort-index_merge for non-first join table may require
+-- echo # O(#scans) memory
+-- echo #
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (0), (1), (2), (3), (4), (5), (6), (7), (8), (9);
+
+CREATE TABLE t2 (a INT, b INT, filler CHAR(100), KEY(a), KEY(b));
+INSERT INTO t2 SELECT 1000, 1000, 'filler' FROM t1 A, t1 B, t1 C;
+INSERT INTO t2 VALUES (1, 1, 'data');
+
+--echo # the example query uses LEFT JOIN only for the sake of being able to
+--echo # demonstrate the issue with a very small dataset. (left outer join
+--echo # disables the use of join buffering, so we get the second table
+--echo # re-scanned for every record in the outer table. if we used inner join,
+--echo # we would need to have thousands of records and/or more columns in both
+--echo # tables so that the join buffer is filled and re-scans are triggered).
+
+SET SESSION debug = '+d,only_one_Unique_may_be_created';
+
+--replace_column 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x
+EXPLAIN
+SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 );
+SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 );
+
+SET SESSION debug = DEFAULT;
+
+DROP TABLE t1, t2;
--echo #
--echo # End of 5.1 tests
diff --git a/mysql-test/t/events_scheduling.test b/mysql-test/t/events_scheduling.test
index 041a2def490..5f16f8bea6a 100644
--- a/mysql-test/t/events_scheduling.test
+++ b/mysql-test/t/events_scheduling.test
@@ -108,6 +108,32 @@ DROP TABLE table_1;
DROP TABLE table_2;
DROP TABLE table_3;
DROP TABLE table_4;
+
+-- echo
+-- echo Bug #50087 Interval arithmetic for Event_queue_element is not portable.
+-- echo
+
+CREATE TABLE t1(a int);
+
+CREATE EVENT e1 ON SCHEDULE EVERY 1 MONTH
+STARTS NOW() - INTERVAL 1 MONTH
+ENDS NOW() + INTERVAL 2 MONTH
+ON COMPLETION PRESERVE
+DO
+ INSERT INTO t1 VALUES (1);
+
+CREATE EVENT e2 ON SCHEDULE EVERY 1 MONTH
+STARTS NOW()
+ENDS NOW() + INTERVAL 11 MONTH
+ON COMPLETION PRESERVE
+DO
+ INSERT INTO t1 VALUES (1);
+
+DROP TABLE t1;
+DROP EVENT e1;
+DROP EVENT e2;
+
+
DROP DATABASE events_test;
SET GLOBAL event_scheduler=@event_scheduler;
diff --git a/mysql-test/t/explain.test b/mysql-test/t/explain.test
index ba6be72dbdc..b635a1b2968 100644
--- a/mysql-test/t/explain.test
+++ b/mysql-test/t/explain.test
@@ -213,4 +213,19 @@ EXPLAIN SELECT 1 FROM t1 WHERE a = (SELECT 1 FROM t1 t JOIN t2 WHERE b <= 1 AND
DROP TABLE t1, t2;
+--echo #
+--echo # Bug #48573: difference of index selection between rpm binary and
+--echo # .tar.gz, windows vs linux..
+--echo #
+
+CREATE TABLE t1(c1 INT, c2 INT, c4 INT, c5 INT, KEY(c2, c5), KEY(c2, c4, c5));
+INSERT INTO t1 VALUES(4, 1, 1, 1);
+INSERT INTO t1 VALUES(3, 1, 1, 1);
+INSERT INTO t1 VALUES(2, 1, 1, 1);
+INSERT INTO t1 VALUES(1, 1, 1, 1);
+
+EXPLAIN SELECT c1 FROM t1 WHERE c2 = 1 AND c4 = 1 AND c5 = 1;
+
+DROP TABLE t1;
+
--echo End of 5.1 tests.
diff --git a/mysql-test/t/flush_block_commit_notembedded.test b/mysql-test/t/flush_block_commit_notembedded.test
index aea38250218..b774d7ec069 100644
--- a/mysql-test/t/flush_block_commit_notembedded.test
+++ b/mysql-test/t/flush_block_commit_notembedded.test
@@ -28,14 +28,14 @@ INSERT t1 VALUES (1);
--echo # Switch to connection con2
connection con2;
FLUSH TABLES WITH READ LOCK;
-SHOW MASTER STATUS;
+--source include/show_binlog_events.inc
--echo # Switch to connection con1
connection con1;
send COMMIT;
--echo # Switch to connection con2
connection con2;
sleep 1;
-SHOW MASTER STATUS;
+--source include/show_binlog_events.inc
UNLOCK TABLES;
--echo # Switch to connection con1
connection con1;
diff --git a/mysql-test/t/func_in.test b/mysql-test/t/func_in.test
index 61ae812d874..6efeb2866e6 100644
--- a/mysql-test/t/func_in.test
+++ b/mysql-test/t/func_in.test
@@ -540,5 +540,20 @@ EXPLAIN SELECT * FROM t1 WHERE c_char IN (NULL, NULL);
DROP TABLE t1;
--echo #
+--echo # Bug#54477: Crash on IN / CASE with NULL arguments
+--echo #
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1), (2);
+
+SELECT 1 IN (NULL, a) FROM t1;
+
+SELECT a IN (a, a) FROM t1 GROUP BY a WITH ROLLUP;
+
+SELECT CASE a WHEN a THEN a END FROM t1 GROUP BY a WITH ROLLUP;
+
+DROP TABLE t1;
+
+--echo #
--echo End of 5.1 tests
diff --git a/mysql-test/t/func_isnull.test b/mysql-test/t/func_isnull.test
index 6218efb882f..d3ad4614998 100644
--- a/mysql-test/t/func_isnull.test
+++ b/mysql-test/t/func_isnull.test
@@ -13,3 +13,18 @@ select * from t1 where isnull(to_days(mydate));
drop table t1;
# End of 4.1 tests
+
+--echo #
+--echo # Bug#53933 crash when using uncacheable subquery in the having clause of outer query
+--echo #
+
+CREATE TABLE t1 (f1 INT);
+INSERT INTO t1 VALUES (0),(0);
+
+SELECT ISNULL((SELECT GET_LOCK('Bug#53933', 0) FROM t1 GROUP BY f1)) AS f2
+FROM t1 GROUP BY f1 HAVING f2 = f2;
+SELECT RELEASE_LOCK('Bug#53933');
+
+DROP TABLE t1;
+
+--echo End of 5.0 tests
diff --git a/mysql-test/t/func_like.test b/mysql-test/t/func_like.test
index 741ea5533da..1204d04d9a0 100644
--- a/mysql-test/t/func_like.test
+++ b/mysql-test/t/func_like.test
@@ -112,5 +112,19 @@ select 'andre%' like 'andreÊ%' escape 'Ê';
#
select _cp1251'andre%' like convert('andreÊ%' using cp1251) escape 'Ê';
-#
-# End of 4.1 tests
+
+--echo End of 4.1 tests
+
+
+--echo #
+--echo # Bug #54575: crash when joining tables with unique set column
+--echo #
+CREATE TABLE t1(a SET('a') NOT NULL, UNIQUE KEY(a));
+CREATE TABLE t2(b INT PRIMARY KEY);
+INSERT INTO t1 VALUES ();
+INSERT INTO t2 VALUES (1), (2), (3);
+SELECT 1 FROM t2 JOIN t1 ON 1 LIKE a GROUP BY a;
+DROP TABLE t1, t2;
+
+
+--echo End of 5.1 tests
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test
index e6ea5ecc7f6..c5b27ee1a62 100644
--- a/mysql-test/t/group_by.test
+++ b/mysql-test/t/group_by.test
@@ -1205,6 +1205,21 @@ SELECT (SELECT t2.a FROM t2 WHERE t2.a = t1.a) aa, b, COUNT( b)
DROP TABLE t1, t2;
+
+--echo #
+--echo # Bug#52051: Aggregate functions incorrectly returns NULL from outer
+--echo # join query
+--echo #
+CREATE TABLE t1 (a INT PRIMARY KEY);
+CREATE TABLE t2 (a INT PRIMARY KEY);
+INSERT INTO t2 VALUES (1), (2);
+EXPLAIN SELECT MIN(t2.a) FROM t2 LEFT JOIN t1 ON t2.a = t1.a;
+SELECT MIN(t2.a) FROM t2 LEFT JOIN t1 ON t2.a = t1.a;
+EXPLAIN SELECT MAX(t2.a) FROM t2 LEFT JOIN t1 ON t2.a = t1.a;
+SELECT MAX(t2.a) FROM t2 LEFT JOIN t1 ON t2.a = t1.a;
+DROP TABLE t1, t2;
+
+
--echo #
--echo # End of 5.1 tests
diff --git a/mysql-test/t/group_min_max.test b/mysql-test/t/group_min_max.test
index b06f0c09fc5..8ab7e1c9cb4 100644
--- a/mysql-test/t/group_min_max.test
+++ b/mysql-test/t/group_min_max.test
@@ -1085,4 +1085,19 @@ INSERT INTO t1 VALUES (1), (2), (3);
--source include/min_null_cond.inc
DROP TABLE t1;
+--echo #
+--echo # Bug#53859: Valgrind: opt_sum_query(TABLE_LIST*, List<Item>&, Item*) at
+--echo # opt_sum.cc:305
+--echo #
+CREATE TABLE t1 ( a INT, KEY (a) );
+INSERT INTO t1 VALUES (1), (2), (3);
+
+SELECT MIN( a ) AS min_a
+FROM t1
+WHERE a > 1 AND a IS NULL
+ORDER BY min_a;
+
+DROP TABLE t1;
+
+
--echo End of 5.1 tests
diff --git a/mysql-test/t/handler_myisam.test b/mysql-test/t/handler_myisam.test
index 868ba14480a..e78072ef8a0 100644
--- a/mysql-test/t/handler_myisam.test
+++ b/mysql-test/t/handler_myisam.test
@@ -48,4 +48,53 @@ HANDLER t1 READ a NEXT;
HANDLER t1 CLOSE;
DROP TABLE t1;
+
+--echo #
+--echo # Bug #54007: assert in ha_myisam::index_next , HANDLER
+--echo #
+CREATE TABLE t1(a INT, b INT, PRIMARY KEY(a), KEY b(b), KEY ab(a, b));
+
+HANDLER t1 OPEN;
+HANDLER t1 READ FIRST;
+HANDLER t1 READ `PRIMARY` NEXT;
+HANDLER t1 READ ab NEXT;
+HANDLER t1 READ b NEXT;
+HANDLER t1 READ NEXT;
+HANDLER t1 CLOSE;
+
+INSERT INTO t1 VALUES (2, 20), (1, 10), (4, 40), (3, 30);
+HANDLER t1 OPEN;
+HANDLER t1 READ FIRST;
+HANDLER t1 READ NEXT;
+HANDLER t1 READ `PRIMARY` NEXT;
+HANDLER t1 READ `PRIMARY` NEXT;
+HANDLER t1 READ ab NEXT;
+HANDLER t1 READ ab NEXT;
+HANDLER t1 READ b NEXT;
+HANDLER t1 READ b NEXT;
+HANDLER t1 READ b NEXT;
+HANDLER t1 READ b NEXT;
+HANDLER t1 READ b NEXT;
+HANDLER t1 READ NEXT;
+HANDLER t1 READ NEXT;
+HANDLER t1 READ NEXT;
+HANDLER t1 CLOSE;
+
+HANDLER t1 OPEN;
+HANDLER t1 READ FIRST;
+HANDLER t1 READ `PRIMARY` PREV;
+HANDLER t1 READ `PRIMARY` PREV;
+HANDLER t1 READ b PREV;
+HANDLER t1 READ b PREV;
+HANDLER t1 CLOSE;
+
+HANDLER t1 OPEN;
+HANDLER t1 READ FIRST;
+HANDLER t1 READ `PRIMARY` PREV LIMIT 3;
+HANDLER t1 READ b NEXT LIMIT 5;
+HANDLER t1 CLOSE;
+
+DROP TABLE t1;
+
+
--echo End of 5.1 tests
diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test
index 10bc3645898..4cef8615cd2 100644
--- a/mysql-test/t/information_schema.test
+++ b/mysql-test/t/information_schema.test
@@ -1413,6 +1413,15 @@ DROP USER nonpriv;
DROP TABLE db1.t1;
DROP DATABASE db1;
+--echo
+--echo Bug#54422 query with = 'variables'
+--echo
+
+CREATE TABLE variables(f1 INT);
+SELECT COLUMN_DEFAULT, TABLE_NAME
+FROM INFORMATION_SCHEMA.COLUMNS
+WHERE INFORMATION_SCHEMA.COLUMNS.TABLE_NAME = 'variables';
+DROP TABLE variables;
--echo End of 5.1 tests.
diff --git a/mysql-test/t/innodb_mysql_lock2.test b/mysql-test/t/innodb_mysql_lock2.test
new file mode 100644
index 00000000000..79698bcd898
--- /dev/null
+++ b/mysql-test/t/innodb_mysql_lock2.test
@@ -0,0 +1,803 @@
+# This test covers behavior for InnoDB tables.
+--source include/have_innodb.inc
+# This test requires statement/mixed mode binary logging.
+# Row-based mode puts weaker serializability requirements
+# so weaker locks are acquired for it.
+--source include/have_binlog_format_mixed_or_statement.inc
+# Save the initial number of concurrent sessions.
+--source include/count_sessions.inc
+
+--echo #
+--echo # Test how do we handle locking in various cases when
+--echo # we read data from InnoDB tables.
+--echo #
+--echo # In fact by performing this test we check two things:
+--echo # 1) That SQL-layer correctly determine type of thr_lock.c
+--echo # lock to be acquired/passed to InnoDB engine.
+--echo # 2) That InnoDB engine correctly interprets this lock
+--echo # type and takes necessary row locks or does not
+--echo # take them if they are not necessary.
+--echo #
+
+--echo # This test makes sense only in REPEATABLE-READ mode as
+--echo # in SERIALIZABLE mode all statements that read data take
+--echo # shared lock on them to enforce its semantics.
+select @@session.tx_isolation;
+
+--echo # Prepare playground by creating tables, views,
+--echo # routines and triggers used in tests.
+connect (con1, localhost, root,,);
+connection default;
+--disable_warnings
+drop table if exists t0, t1, t2, t3, t4, t5, te;
+drop view if exists v1, v2;
+drop procedure if exists p1;
+drop procedure if exists p2;
+drop function if exists f1;
+drop function if exists f2;
+drop function if exists f3;
+drop function if exists f4;
+drop function if exists f5;
+drop function if exists f6;
+drop function if exists f7;
+drop function if exists f8;
+drop function if exists f9;
+drop function if exists f10;
+drop function if exists f11;
+drop function if exists f12;
+drop function if exists f13;
+drop function if exists f14;
+drop function if exists f15;
+--enable_warnings
+create table t1 (i int primary key) engine=innodb;
+insert into t1 values (1), (2), (3), (4), (5);
+create table t2 (j int primary key) engine=innodb;
+insert into t2 values (1), (2), (3), (4), (5);
+create table t3 (k int primary key) engine=innodb;
+insert into t3 values (1), (2), (3);
+create table t4 (l int primary key) engine=innodb;
+insert into t4 values (1);
+create table t5 (l int primary key) engine=innodb;
+insert into t5 values (1);
+create table te(e int primary key);
+insert into te values (1);
+create view v1 as select i from t1;
+create view v2 as select j from t2 where j in (select i from t1);
+create procedure p1(k int) insert into t2 values (k);
+delimiter |;
+create function f1() returns int
+begin
+ declare j int;
+ select i from t1 where i = 1 into j;
+ return j;
+end|
+create function f2() returns int
+begin
+ declare k int;
+ select i from t1 where i = 1 into k;
+ insert into t2 values (k + 5);
+ return 0;
+end|
+create function f3() returns int
+begin
+ return (select i from t1 where i = 3);
+end|
+create function f4() returns int
+begin
+ if (select i from t1 where i = 3) then
+ return 1;
+ else
+ return 0;
+ end if;
+end|
+create function f5() returns int
+begin
+ insert into t2 values ((select i from t1 where i = 1) + 5);
+ return 0;
+end|
+create function f6() returns int
+begin
+ declare k int;
+ select i from v1 where i = 1 into k;
+ return k;
+end|
+create function f7() returns int
+begin
+ declare k int;
+ select j from v2 where j = 1 into k;
+ return k;
+end|
+create function f8() returns int
+begin
+ declare k int;
+ select i from v1 where i = 1 into k;
+ insert into t2 values (k+5);
+ return k;
+end|
+create function f9() returns int
+begin
+ update v2 set j=j+10 where j=1;
+ return 1;
+end|
+create function f10() returns int
+begin
+ return f1();
+end|
+create function f11() returns int
+begin
+ declare k int;
+ set k= f1();
+ insert into t2 values (k+5);
+ return k;
+end|
+create function f12(p int) returns int
+begin
+ insert into t2 values (p);
+ return p;
+end|
+create function f13(p int) returns int
+begin
+ return p;
+end|
+create procedure p2(inout p int)
+begin
+ select i from t1 where i = 1 into p;
+end|
+create function f14() returns int
+begin
+ declare k int;
+ call p2(k);
+ insert into t2 values (k+5);
+ return k;
+end|
+create function f15() returns int
+begin
+ declare k int;
+ call p2(k);
+ return k;
+end|
+create trigger t4_bi before insert on t4 for each row
+begin
+ declare k int;
+ select i from t1 where i=1 into k;
+ set new.l= k+1;
+end|
+create trigger t4_bu before update on t4 for each row
+begin
+ if (select i from t1 where i=1) then
+ set new.l= 2;
+ end if;
+end|
+--echo # Trigger below uses insertion of duplicate key in 'te'
+--echo # table as a way to abort delete operation.
+create trigger t4_bd before delete on t4 for each row
+begin
+ if !(select i from v1 where i=1) then
+ insert into te values (1);
+ end if;
+end|
+create trigger t5_bi before insert on t5 for each row
+begin
+ set new.l= f1()+1;
+end|
+create trigger t5_bu before update on t5 for each row
+begin
+ declare j int;
+ call p2(j);
+ set new.l= j + 1;
+end|
+delimiter ;|
+
+--echo #
+--echo # Set common variables to be used by scripts called below.
+--echo #
+let $con_aux= con1;
+let $table= t1;
+
+
+--echo #
+--echo # 1. Statements that read tables and do not use subqueries.
+--echo #
+
+--echo #
+--echo # 1.1 Simple SELECT statement.
+--echo #
+--echo # No locks are necessary as this statement won't be written
+--echo # to the binary log and InnoDB supports snapshots.
+let $statement= select * from t1;
+--source include/check_no_row_lock.inc
+
+--echo #
+--echo # 1.2 Multi-UPDATE statement.
+--echo #
+--echo # Has to take shared locks on rows in the table being read as this
+--echo # statement will be written to the binary log and therefore should
+--echo # be serialized with concurrent statements.
+let $statement= update t2, t1 set j= j - 1 where i = j;
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+
+--echo #
+--echo # 1.3 Multi-DELETE statement.
+--echo #
+--echo # The above is true for this statement as well.
+let $statement= delete t2 from t1, t2 where i = j;
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+
+--echo #
+--echo # 1.4 DESCRIBE statement.
+--echo #
+--echo # This statement does not really read data from the
+--echo # target table and thus does not take any lock on it.
+--echo # We check this for completeness of coverage.
+let $statement= describe t1;
+--source include/check_no_row_lock.inc
+
+--echo #
+--echo # 1.5 SHOW statements.
+--echo #
+--echo # The above is true for SHOW statements as well.
+let $statement= show create table t1;
+--source include/check_no_row_lock.inc
+let $statement= show keys from t1;
+--source include/check_no_row_lock.inc
+
+
+--echo #
+--echo # 2. Statements which read tables through subqueries.
+--echo #
+
+--echo #
+--echo # 2.1 CALL with a subquery.
+--echo #
+--echo # A strong lock is not necessary as this statement is not
+--echo # written to the binary log as a whole (it is written
+--echo # statement-by-statement) and thanks to MVCC we can always get
+--echo # versions of rows prior to the update that has locked them.
+--echo # But in practice InnoDB does locking reads for all statements
+--echo # other than SELECT (unless it is a READ-COMITTED mode or
+--echo # innodb_locks_unsafe_for_binlog is ON).
+let $statement= call p1((select i + 5 from t1 where i = 1));
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+
+--echo #
+--echo # 2.2 CREATE TABLE with a subquery.
+--echo #
+--echo # Has to take shared locks on rows in the table being read as
+--echo # this statement is written to the binary log and therefore
+--echo # should be serialized with concurrent statements.
+let $statement= create table t0 engine=innodb select * from t1;
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+drop table t0;
+let $statement= create table t0 engine=innodb select j from t2 where j in (select i from t1);
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+drop table t0;
+
+--echo #
+--echo # 2.3 DELETE with a subquery.
+--echo #
+--echo # The above is true for this statement as well.
+let $statement= delete from t2 where j in (select i from t1);
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+
+--echo #
+--echo # 2.4 MULTI-DELETE with a subquery.
+--echo #
+--echo # Same is true for this statement as well.
+let $statement= delete t2 from t3, t2 where k = j and j in (select i from t1);
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+
+--echo #
+--echo # 2.5 DO with a subquery.
+--echo #
+--echo # In theory should not take row locks as it is not logged.
+--echo # In practice InnoDB takes shared row locks.
+let $statement= do (select i from t1 where i = 1);
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+
+--echo #
+--echo # 2.6 INSERT with a subquery.
+--echo #
+--echo # Has to take shared locks on rows in the table being read as
+--echo # this statement is written to the binary log and therefore
+--echo # should be serialized with concurrent statements.
+let $statement= insert into t2 select i+5 from t1;
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+let $statement= insert into t2 values ((select i+5 from t1 where i = 4));
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+
+--echo #
+--echo # 2.7 LOAD DATA with a subquery.
+--echo #
+--echo # The above is true for this statement as well.
+let $statement= load data infile '../../std_data/rpl_loaddata.dat' into table t2 (@a, @b) set j= @b + (select i from t1 where i = 1);
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+
+--echo #
+--echo # 2.8 REPLACE with a subquery.
+--echo #
+--echo # Same is true for this statement as well.
+let $statement= replace into t2 select i+5 from t1;
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+let $statement= replace into t2 values ((select i+5 from t1 where i = 4));
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+
+--echo #
+--echo # 2.9 SELECT with a subquery.
+--echo #
+--echo # Locks are not necessary as this statement is not written
+--echo # to the binary log and thanks to MVCC we can always get
+--echo # versions of rows prior to the update that has locked them.
+--echo #
+--echo # Also serves as a test case for bug #46947 "Embedded SELECT
+--echo # without FOR UPDATE is causing a lock".
+let $statement= select * from t2 where j in (select i from t1);
+--source include/check_no_row_lock.inc
+
+--echo #
+--echo # 2.10 SET with a subquery.
+--echo #
+--echo # In theory should not require locking as it is not written
+--echo # to the binary log. In practice InnoDB acquires shared row
+--echo # locks.
+let $statement= set @a:= (select i from t1 where i = 1);
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+
+--echo #
+--echo # 2.11 SHOW with a subquery.
+--echo #
+--echo # Similarly to the previous case, in theory should not require locking
+--echo # as it is not written to the binary log. In practice InnoDB
+--echo # acquires shared row locks.
+let $statement= show tables from test where Tables_in_test = 't2' and (select i from t1 where i = 1);
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+let $statement= show columns from t2 where (select i from t1 where i = 1);
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+
+--echo #
+--echo # 2.12 UPDATE with a subquery.
+--echo #
+--echo # Has to take shared locks on rows in the table being read as
+--echo # this statement is written to the binary log and therefore
+--echo # should be serialized with concurrent statements.
+let $statement= update t2 set j= j-10 where j in (select i from t1);
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+
+--echo #
+--echo # 2.13 MULTI-UPDATE with a subquery.
+--echo #
+--echo # Same is true for this statement as well.
+let $statement= update t2, t3 set j= j -10 where j=k and j in (select i from t1);
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+
+
+--echo #
+--echo # 3. Statements which read tables through a view.
+--echo #
+
+--echo #
+--echo # 3.1 SELECT statement which uses some table through a view.
+--echo #
+--echo # Since this statement is not written to the binary log
+--echo # and old version of rows are accessible thanks to MVCC,
+--echo # no locking is necessary.
+let $statement= select * from v1;
+--source include/check_no_row_lock.inc
+let $statement= select * from v2;
+--source include/check_no_row_lock.inc
+let $statement= select * from t2 where j in (select i from v1);
+--source include/check_no_row_lock.inc
+let $statement= select * from t3 where k in (select j from v2);
+--source include/check_no_row_lock.inc
+
+--echo #
+--echo # 3.2 Statements which modify a table and use views.
+--echo #
+--echo # Since such statements are going to be written to the binary
+--echo # log they need to be serialized against concurrent statements
+--echo # and therefore should take shared row locks on data read.
+let $statement= update t2 set j= j-10 where j in (select i from v1);
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+let $statement= update t3 set k= k-10 where k in (select j from v2);
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+let $statement= update t2, v1 set j= j-10 where j = i;
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+let $statement= update v2 set j= j-10 where j = 3;
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+
+
+--echo #
+--echo # 4. Statements which read tables through stored functions.
+--echo #
+
+--echo #
+--echo # 4.1 SELECT/SET with a stored function which does not
+--echo # modify data and uses SELECT in its turn.
+--echo #
+--echo # Calls to such functions won't get into the binary log and
+--echo # thus don't need to acquire strong locks.
+--echo # In 5.5 due to fix for bug #53921 "Wrong locks for SELECTs
+--echo # used stored functions may lead to broken SBR" strong locks
+--echo # are taken (we accepted it as a trade-off for this fix).
+let $statement= select f1();
+let $wait_statement= select i from t1 where i = 1 into j;
+--source include/check_no_row_lock.inc
+let $statement= set @a:= f1();
+let $wait_statement= select i from t1 where i = 1 into j;
+--source include/check_no_row_lock.inc
+
+--echo #
+--echo # 4.2 INSERT (or other statement which modifies data) with
+--echo # a stored function which does not modify data and uses
+--echo # SELECT.
+--echo #
+--echo # Since such statement is written to the binary log it should
+--echo # be serialized with concurrent statements affecting the data
+--echo # it uses. Therefore it should take row locks on the data
+--echo # it reads.
+--echo # But due to bug #53921 "Wrong locks for SELECTs used stored
+--echo # functions may lead to broken SBR" no lock is taken.
+let $statement= insert into t2 values (f1() + 5);
+let $wait_statement= select i from t1 where i = 1 into j;
+--source include/check_no_row_lock.inc
+
+--echo #
+--echo # 4.3 SELECT/SET with a stored function which
+--echo # reads and modifies data.
+--echo #
+--echo # Since a call to such function is written to the binary log,
+--echo # it should be serialized with concurrent statements affecting
+--echo # the data it uses. Hence, row locks on the data read
+--echo # should be taken.
+--echo # But due to bug #53921 "Wrong locks for SELECTs used stored
+--echo # functions may lead to broken SBR" no lock is taken.
+let $statement= select f2();
+let $wait_statement= select i from t1 where i = 1 into k;
+--source include/check_no_row_lock.inc
+let $statement= set @a:= f2();
+let $wait_statement= select i from t1 where i = 1 into k;
+--source include/check_no_row_lock.inc
+
+--echo #
+--echo # 4.4. SELECT/SET with a stored function which does not
+--echo # modify data and reads a table through subselect
+--echo # in a control construct.
+--echo #
+--echo # Again, in theory a call to this function won't get to the
+--echo # binary log and thus no locking is needed. But in practice
+--echo # we don't detect this fact early enough (get_lock_type_for_table())
+--echo # to avoid taking row locks.
+let $statement= select f3();
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+let $statement= set @a:= f3();
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+let $statement= select f4();
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+let $statement= set @a:= f4();
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+
+--echo #
+--echo # 4.5. INSERT (or other statement which modifies data) with
+--echo # a stored function which does not modify data and reads
+--echo # the table through a subselect in one of its control
+--echo # constructs.
+--echo #
+--echo # Since such statement is written to the binary log it should
+--echo # be serialized with concurrent statements affecting data it
+--echo # uses. Therefore it should take row locks on the data
+--echo # it reads.
+let $statement= insert into t2 values (f3() + 5);
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+let $statement= insert into t2 values (f4() + 6);
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+
+--echo #
+--echo # 4.6 SELECT/SET which uses a stored function with
+--echo # DML which reads a table via a subquery.
+--echo #
+--echo # Since call to such function is written to the binary log
+--echo # it should be serialized with concurrent statements.
+--echo # Hence reads should take row locks.
+let $statement= select f5();
+let $wait_statement= insert into t2 values ((select i from t1 where i = 1) + 5);
+--source include/check_shared_row_lock.inc
+let $statement= set @a:= f5();
+let $wait_statement= insert into t2 values ((select i from t1 where i = 1) + 5);
+--source include/check_shared_row_lock.inc
+
+--echo #
+--echo # 4.7 SELECT/SET which uses a stored function which
+--echo # doesn't modify data and reads tables through
+--echo # a view.
+--echo #
+--echo # Once again, in theory, calls to such functions won't
+--echo # get into the binary log and thus don't need row
+--echo # locks. In practice this fact is discovered
+--echo # too late to have any effect.
+--echo # But due to bug #53921 "Wrong locks for SELECTs used stored
+--echo # functions may lead to broken SBR" no lock is taken
+--echo # in case of simple SELECT.
+let $statement= select f6();
+let $wait_statement= select i from v1 where i = 1 into k;
+--source include/check_no_row_lock.inc
+let $statement= set @a:= f6();
+let $wait_statement= select i from v1 where i = 1 into k;
+--source include/check_no_row_lock.inc
+let $statement= select f7();
+let $wait_statement= select j from v2 where j = 1 into k;
+--source include/check_shared_row_lock.inc
+let $statement= set @a:= f7();
+let $wait_statement= select j from v2 where j = 1 into k;
+--source include/check_shared_row_lock.inc
+
+--echo #
+--echo # 4.8 INSERT which uses stored function which
+--echo # doesn't modify data and reads a table
+--echo # through a view.
+--echo #
+--echo # Since such statement is written to the binary log and
+--echo # should be serialized with concurrent statements affecting
+--echo # the data it uses. Therefore it should take row locks on
+--echo # the rows it reads.
+--echo # But due to bug #53921 "Wrong locks for SELECTs used stored
+--echo # functions may lead to broken SBR" no lock is taken
+--echo # in case of simple SELECT.
+let $statement= insert into t3 values (f6() + 5);
+let $wait_statement= select i from v1 where i = 1 into k;
+--source include/check_no_row_lock.inc
+let $statement= insert into t3 values (f7() + 5);
+let $wait_statement= select j from v2 where j = 1 into k;
+--source include/check_shared_row_lock.inc
+
+
+--echo #
+--echo # 4.9 SELECT which uses a stored function which
+--echo # modifies data and reads tables through a view.
+--echo #
+--echo # Since a call to such function is written to the binary log
+--echo # it should be serialized with concurrent statements.
+--echo # Hence, reads should take row locks.
+--echo # But due to bug #53921 "Wrong locks for SELECTs used stored
+--echo # functions may lead to broken SBR" no lock is taken
+--echo # in case of simple SELECT.
+let $statement= select f8();
+let $wait_statement= select i from v1 where i = 1 into k;
+--source include/check_no_row_lock.inc
+let $statement= select f9();
+let $wait_statement= update v2 set j=j+10 where j=1;
+--source include/check_shared_row_lock.inc
+
+--echo #
+--echo # 4.10 SELECT which uses stored function which doesn't modify
+--echo # data and reads a table indirectly, by calling another
+--echo # function.
+--echo #
+--echo # Calls to such functions won't get into the binary log and
+--echo # thus don't need to acquire strong locks.
+--echo # In 5.5 due to fix for bug #53921 "Wrong locks for SELECTs
+--echo # used stored functions may lead to broken SBR" strong locks
+--echo # are taken (we accepted it as a trade-off for this fix).
+let $statement= select f10();
+let $wait_statement= select i from t1 where i = 1 into j;
+--source include/check_no_row_lock.inc
+
+--echo #
+--echo # 4.11 INSERT which uses a stored function which doesn't modify
+--echo # data and reads a table indirectly, by calling another
+--echo # function.
+--echo #
+--echo # Since such statement is written to the binary log, it should
+--echo # be serialized with concurrent statements affecting the data it
+--echo # uses. Therefore it should take row locks on data it reads.
+--echo # But due to bug #53921 "Wrong locks for SELECTs used stored
+--echo # functions may lead to broken SBR" no lock is taken.
+let $statement= insert into t2 values (f10() + 5);
+let $wait_statement= select i from t1 where i = 1 into j;
+--source include/check_no_row_lock.inc
+
+--echo #
+--echo # 4.12 SELECT which uses a stored function which modifies
+--echo # data and reads a table indirectly, by calling another
+--echo # function.
+--echo #
+--echo # Since a call to such function is written to the binary log
+--echo # it should be serialized from concurrent statements.
+--echo # Hence, reads should take row locks.
+--echo # But due to bug #53921 "Wrong locks for SELECTs used stored
+--echo # functions may lead to broken SBR" no lock is taken.
+let $statement= select f11();
+let $wait_statement= select i from t1 where i = 1 into j;
+--source include/check_no_row_lock.inc
+
+--echo #
+--echo # 4.13 SELECT that reads a table through a subquery passed
+--echo # as a parameter to a stored function which modifies
+--echo # data.
+--echo #
+--echo # Even though a call to this function is written to the
+--echo # binary log, values of its parameters are written as literals.
+--echo # So there is no need to acquire row locks on rows used in
+--echo # the subquery.
+--echo # But due to the fact that in 5.1 for prelocked statements
+--echo # THD::in_lock_tables is set to TRUE we acquire strong locks
+--echo # (see also bug#44613 "SELECT statement inside FUNCTION takes
+--echo # a shared lock" [sic!!!]).
+let $statement= select f12((select i+10 from t1 where i=1));
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+
+--echo #
+--echo # 4.14 INSERT that reads a table via a subquery passed
+--echo # as a parameter to a stored function which doesn't
+--echo # modify data.
+--echo #
+--echo # Since this statement is written to the binary log it should
+--echo # be serialized with concurrent statements affecting the data it
+--echo # uses. Therefore it should take row locks on the data it reads.
+let $statement= insert into t2 values (f13((select i+10 from t1 where i=1)));
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+
+
+--echo #
+--echo # 5. Statements that read tables through stored procedures.
+--echo #
+
+--echo #
+--echo # 5.1 CALL statement which reads a table via SELECT.
+--echo #
+--echo # Since neither this statement nor its components are
+--echo # written to the binary log, there is no need to take
+--echo # row locks on the data it reads.
+let $statement= call p2(@a);
+--source include/check_no_row_lock.inc
+
+--echo #
+--echo # 5.2 Function that modifies data and uses CALL,
+--echo # which reads a table through SELECT.
+--echo #
+--echo # Since a call to such function is written to the binary
+--echo # log, it should be serialized with concurrent statements.
+--echo # Hence, in this case reads should take row locks on data.
+--echo # But due to bug #53921 "Wrong locks for SELECTs used stored
+--echo # functions may lead to broken SBR" no lock is taken.
+let $statement= select f14();
+let $wait_statement= select i from t1 where i = 1 into p;
+--source include/check_no_row_lock.inc
+
+--echo #
+--echo # 5.3 SELECT that calls a function that doesn't modify data and
+--echo # uses a CALL statement that reads a table via SELECT.
+--echo #
+--echo # Calls to such functions won't get into the binary log and
+--echo # thus don't need to acquire strong locks.
+--echo # In 5.5 due to fix for bug #53921 "Wrong locks for SELECTs
+--echo # used stored functions may lead to broken SBR" strong locks
+--echo # are taken (we accepted it as a trade-off for this fix).
+let $statement= select f15();
+let $wait_statement= select i from t1 where i = 1 into p;
+--source include/check_no_row_lock.inc
+
+--echo #
+--echo # 5.4 INSERT which calls function which doesn't modify data and
+--echo # uses CALL statement which reads table through SELECT.
+--echo #
+--echo # Since such statement is written to the binary log it should
+--echo # be serialized with concurrent statements affecting data it
+--echo # uses. Therefore it should take row locks on data it reads.
+--echo # But due to bug #53921 "Wrong locks for SELECTs used stored
+--echo # functions may lead to broken SBR" no lock is taken.
+let $statement= insert into t2 values (f15()+5);
+let $wait_statement= select i from t1 where i = 1 into p;
+--source include/check_no_row_lock.inc
+
+
+--echo #
+--echo # 6. Statements that use triggers.
+--echo #
+
+--echo #
+--echo # 6.1 Statement invoking a trigger that reads table via SELECT.
+--echo #
+--echo # Since this statement is written to the binary log it should
+--echo # be serialized with concurrent statements affecting the data
+--echo # it uses. Therefore, it should take row locks on the data
+--echo # it reads.
+--echo # But due to bug #53921 "Wrong locks for SELECTs used stored
+--echo # functions may lead to broken SBR" no lock is taken.
+let $statement= insert into t4 values (2);
+let $wait_statement= select i from t1 where i=1 into k;
+--source include/check_no_row_lock.inc
+
+--echo #
+--echo # 6.2 Statement invoking a trigger that reads table through
+--echo # a subquery in a control construct.
+--echo #
+--echo # The above is true for this statement as well.
+let $statement= update t4 set l= 2 where l = 1;
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+
+--echo #
+--echo # 6.3 Statement invoking a trigger that reads a table through
+--echo # a view.
+--echo #
+--echo # And for this statement.
+let $statement= delete from t4 where l = 1;
+let $wait_statement= $statement;
+--source include/check_shared_row_lock.inc
+
+--echo #
+--echo # 6.4 Statement invoking a trigger that reads a table through
+--echo # a stored function.
+--echo #
+--echo # And for this statement.
+--echo # But due to bug #53921 "Wrong locks for SELECTs used stored
+--echo # functions may lead to broken SBR" no lock is taken.
+let $statement= insert into t5 values (2);
+let $wait_statement= select i from t1 where i = 1 into j;
+--source include/check_no_row_lock.inc
+
+--echo #
+--echo # 6.5 Statement invoking a trigger that reads a table through
+--echo # stored procedure.
+--echo #
+--echo # And for this statement.
+--echo # But due to bug #53921 "Wrong locks for SELECTs used stored
+--echo # functions may lead to broken SBR" no lock is taken.
+let $statement= update t5 set l= 2 where l = 1;
+let $wait_statement= select i from t1 where i = 1 into p;
+--source include/check_no_row_lock.inc
+
+--echo # Clean-up.
+drop function f1;
+drop function f2;
+drop function f3;
+drop function f4;
+drop function f5;
+drop function f6;
+drop function f7;
+drop function f8;
+drop function f9;
+drop function f10;
+drop function f11;
+drop function f12;
+drop function f13;
+drop function f14;
+drop function f15;
+drop view v1, v2;
+drop procedure p1;
+drop procedure p2;
+drop table t1, t2, t3, t4, t5, te;
+disconnect con1;
+
+# Check that all connections opened by test cases in this file are really
+# gone so execution of other tests won't be affected by their presence.
+--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test
index e3d68d71603..cf881e6aaa2 100644
--- a/mysql-test/t/join_outer.test
+++ b/mysql-test/t/join_outer.test
@@ -913,4 +913,72 @@ WHERE (COALESCE(t1.f1, t2.f1), f3) IN ((1, 3), (2, 2));
DROP TABLE t1, t2;
+--echo #
+--echo # Bug#52357: Assertion failed: join->best_read in greedy_search
+--echo # optimizer_search_depth=0
+--echo #
+CREATE TABLE t1( a INT );
+
+INSERT INTO t1 VALUES (1),(2);
+SET optimizer_search_depth = 0;
+
+--echo # Should not core dump on query preparation
+EXPLAIN
+SELECT 1
+FROM t1 tt3 LEFT OUTER JOIN t1 tt4 ON 1
+ LEFT OUTER JOIN t1 tt5 ON 1
+ LEFT OUTER JOIN t1 tt6 ON 1
+ LEFT OUTER JOIN t1 tt7 ON 1
+ LEFT OUTER JOIN t1 tt8 ON 1
+ RIGHT OUTER JOIN t1 tt2 ON 1
+ RIGHT OUTER JOIN t1 tt1 ON 1
+ STRAIGHT_JOIN t1 tt9 ON 1;
+
+SET optimizer_search_depth = DEFAULT;
+DROP TABLE t1;
+
+--echo #
+--echo # Bug#46091 STRAIGHT_JOIN + RIGHT JOIN returns different result
+--echo #
+CREATE TABLE t1 (f1 INT NOT NULL);
+INSERT INTO t1 VALUES (9),(0);
+
+CREATE TABLE t2 (f1 INT NOT NULL);
+INSERT INTO t2 VALUES
+(5),(3),(0),(3),(1),(0),(1),(7),(1),(0),(0),(8),(4),(9),(0),(2),(0),(8),(5),(1);
+
+SELECT STRAIGHT_JOIN COUNT(*) FROM t1 TA1
+RIGHT JOIN t2 TA2 JOIN t2 TA3 ON TA2.f1 ON TA3.f1;
+
+EXPLAIN SELECT STRAIGHT_JOIN COUNT(*) FROM t1 TA1
+RIGHT JOIN t2 TA2 JOIN t2 TA3 ON TA2.f1 ON TA3.f1;
+
+DROP TABLE t1, t2;
+
+--echo #
+--echo # Bug#48971 Segfault in add_found_match_trig_cond () at sql_select.cc:5990
+--echo #
+CREATE TABLE t1(f1 INT, PRIMARY KEY (f1));
+INSERT INTO t1 VALUES (1),(2);
+
+EXPLAIN EXTENDED SELECT STRAIGHT_JOIN jt1.f1 FROM t1 AS jt1
+ LEFT JOIN t1 AS jt2
+ RIGHT JOIN t1 AS jt3
+ JOIN t1 AS jt4 ON 1
+ LEFT JOIN t1 AS jt5 ON 1
+ ON 1
+ RIGHT JOIN t1 AS jt6 ON jt6.f1
+ ON 1;
+
+EXPLAIN EXTENDED SELECT STRAIGHT_JOIN jt1.f1 FROM t1 AS jt1
+ RIGHT JOIN t1 AS jt2
+ RIGHT JOIN t1 AS jt3
+ JOIN t1 AS jt4 ON 1
+ LEFT JOIN t1 AS jt5 ON 1
+ ON 1
+ RIGHT JOIN t1 AS jt6 ON jt6.f1
+ ON 1;
+
+DROP TABLE t1;
+
--echo End of 5.1 tests
diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test
index 126bd5c8838..e24f0b16705 100644
--- a/mysql-test/t/loaddata.test
+++ b/mysql-test/t/loaddata.test
@@ -560,4 +560,24 @@ let $MYSQLD_DATADIR= `select @@datadir`;
remove_file $MYSQLD_DATADIR/test/t1.txt;
+--echo #
+--echo # Bug #52512 : Assertion `! is_set()' in
+--echo # Diagnostics_area::set_ok_status on LOAD DATA
+--echo #
+
+connect (con1,localhost,root,,test);
+
+CREATE TABLE t1 (id INT NOT NULL);
+--send LOAD DATA LOCAL INFILE 'tb.txt' INTO TABLE t1
+# please keep this is a spearate test file : it's important to have no
+# commands after this one
+
+connection default;
+dirty_close con1;
+
+connect (con1,localhost,root,,test);
+DROP TABLE t1;
+connection default;
+disconnect con1;
+
--echo End of 5.1 tests
diff --git a/mysql-test/t/lock_sync.test b/mysql-test/t/lock_sync.test
new file mode 100644
index 00000000000..17f8abb75f3
--- /dev/null
+++ b/mysql-test/t/lock_sync.test
@@ -0,0 +1,867 @@
+#
+# Locking related tests which use DEBUG_SYNC facility.
+#
+--source include/have_debug_sync.inc
+# This test requires statement/mixed mode binary logging.
+# Row-based mode puts weaker serializability requirements
+# so weaker locks are acquired for it.
+--source include/have_binlog_format_mixed_or_statement.inc
+
+# Save the initial number of concurrent sessions.
+--source include/count_sessions.inc
+
+
+--echo #
+--echo # Test how we handle locking in various cases when
+--echo # we read data from MyISAM tables.
+--echo #
+--echo # In this test we mostly check that the SQL-layer correctly
+--echo # determines the type of thr_lock.c lock for a table being
+--echo # read.
+--echo # I.e. that it disallows concurrent inserts when the statement
+--echo # is going to be written to the binary log and therefore
+--echo # should be serialized, and allows concurrent inserts when
+--echo # such serialization is not necessary (e.g. when
+--echo # the statement is not written to binary log).
+--echo #
+
+--echo # Force concurrent inserts to be performed even if the table
+--echo # has gaps. This allows to simplify clean up in scripts
+--echo # used below (instead of backing up table being inserted
+--echo # into and then restoring it from backup at the end of the
+--echo # script we can simply delete rows which were inserted).
+set @old_concurrent_insert= @@global.concurrent_insert;
+set @@global.concurrent_insert= 2;
+select @@global.concurrent_insert;
+
+--echo # Prepare playground by creating tables, views,
+--echo # routines and triggers used in tests.
+connect (con1, localhost, root,,);
+connect (con2, localhost, root,,);
+connection default;
+--disable_warnings
+drop table if exists t0, t1, t2, t3, t4, t5, te;
+drop view if exists v1, v2;
+drop procedure if exists p1;
+drop procedure if exists p2;
+drop function if exists f1;
+drop function if exists f2;
+drop function if exists f3;
+drop function if exists f4;
+drop function if exists f5;
+drop function if exists f6;
+drop function if exists f7;
+drop function if exists f8;
+drop function if exists f9;
+drop function if exists f10;
+drop function if exists f11;
+drop function if exists f12;
+drop function if exists f13;
+drop function if exists f14;
+drop function if exists f15;
+--enable_warnings
+create table t1 (i int primary key);
+insert into t1 values (1), (2), (3), (4), (5);
+create table t2 (j int primary key);
+insert into t2 values (1), (2), (3), (4), (5);
+create table t3 (k int primary key);
+insert into t3 values (1), (2), (3);
+create table t4 (l int primary key);
+insert into t4 values (1);
+create table t5 (l int primary key);
+insert into t5 values (1);
+create table te(e int primary key);
+insert into te values (1);
+create view v1 as select i from t1;
+create view v2 as select j from t2 where j in (select i from t1);
+create procedure p1(k int) insert into t2 values (k);
+delimiter |;
+create function f1() returns int
+begin
+ declare j int;
+ select i from t1 where i = 1 into j;
+ return j;
+end|
+create function f2() returns int
+begin
+ declare k int;
+ select i from t1 where i = 1 into k;
+ insert into t2 values (k + 5);
+ return 0;
+end|
+create function f3() returns int
+begin
+ return (select i from t1 where i = 3);
+end|
+create function f4() returns int
+begin
+ if (select i from t1 where i = 3) then
+ return 1;
+ else
+ return 0;
+ end if;
+end|
+create function f5() returns int
+begin
+ insert into t2 values ((select i from t1 where i = 1) + 5);
+ return 0;
+end|
+create function f6() returns int
+begin
+ declare k int;
+ select i from v1 where i = 1 into k;
+ return k;
+end|
+create function f7() returns int
+begin
+ declare k int;
+ select j from v2 where j = 1 into k;
+ return k;
+end|
+create function f8() returns int
+begin
+ declare k int;
+ select i from v1 where i = 1 into k;
+ insert into t2 values (k+5);
+ return k;
+end|
+create function f9() returns int
+begin
+ update v2 set j=j+10 where j=1;
+ return 1;
+end|
+create function f10() returns int
+begin
+ return f1();
+end|
+create function f11() returns int
+begin
+ declare k int;
+ set k= f1();
+ insert into t2 values (k+5);
+ return k;
+end|
+create function f12(p int) returns int
+begin
+ insert into t2 values (p);
+ return p;
+end|
+create function f13(p int) returns int
+begin
+ return p;
+end|
+create procedure p2(inout p int)
+begin
+ select i from t1 where i = 1 into p;
+end|
+create function f14() returns int
+begin
+ declare k int;
+ call p2(k);
+ insert into t2 values (k+5);
+ return k;
+end|
+create function f15() returns int
+begin
+ declare k int;
+ call p2(k);
+ return k;
+end|
+create trigger t4_bi before insert on t4 for each row
+begin
+ declare k int;
+ select i from t1 where i=1 into k;
+ set new.l= k+1;
+end|
+create trigger t4_bu before update on t4 for each row
+begin
+ if (select i from t1 where i=1) then
+ set new.l= 2;
+ end if;
+end|
+--echo # Trigger below uses insertion of duplicate key in 'te'
+--echo # table as a way to abort delete operation.
+create trigger t4_bd before delete on t4 for each row
+begin
+ if !(select i from v1 where i=1) then
+ insert into te values (1);
+ end if;
+end|
+create trigger t5_bi before insert on t5 for each row
+begin
+ set new.l= f1()+1;
+end|
+create trigger t5_bu before update on t5 for each row
+begin
+ declare j int;
+ call p2(j);
+ set new.l= j + 1;
+end|
+delimiter ;|
+
+--echo #
+--echo # Set common variables to be used by the scripts
+--echo # called below.
+--echo #
+let $con_aux1= con1;
+let $con_aux2= con2;
+let $table= t1;
+
+--echo # Switch to connection 'con1'.
+connection con1;
+--echo # Cache all functions used in the tests below so statements
+--echo # calling them won't need to open and lock mysql.proc table
+--echo # and we can assume that each statement locks its tables
+--echo # once during its execution.
+--disable_result_log
+show create procedure p1;
+show create procedure p2;
+show create function f1;
+show create function f2;
+show create function f3;
+show create function f4;
+show create function f5;
+show create function f6;
+show create function f7;
+show create function f8;
+show create function f9;
+show create function f10;
+show create function f11;
+show create function f12;
+show create function f13;
+show create function f14;
+show create function f15;
+--enable_result_log
+--echo # Switch back to connection 'default'.
+connection default;
+
+--echo #
+--echo # 1. Statements that read tables and do not use subqueries.
+--echo #
+
+--echo #
+--echo # 1.1 Simple SELECT statement.
+--echo #
+--echo # No locks are necessary as this statement won't be written
+--echo # to the binary log and thanks to how MyISAM works SELECT
+--echo # will see version of the table prior to concurrent insert.
+let $statement= select * from t1;
+let $restore_table= ;
+--source include/check_concurrent_insert.inc
+
+--echo #
+--echo # 1.2 Multi-UPDATE statement.
+--echo #
+--echo # Has to take shared locks on rows in the table being read as this
+--echo # statement will be written to the binary log and therefore should
+--echo # be serialized with concurrent statements.
+let $statement= update t2, t1 set j= j - 1 where i = j;
+let $restore_table= t2;
+--source include/check_no_concurrent_insert.inc
+
+--echo #
+--echo # 1.3 Multi-DELETE statement.
+--echo #
+--echo # The above is true for this statement as well.
+let $statement= delete t2 from t1, t2 where i = j;
+let $restore_table= t2;
+--source include/check_no_concurrent_insert.inc
+
+--echo #
+--echo # 1.4 DESCRIBE statement.
+--echo #
+--echo # This statement does not really read data from the
+--echo # target table and thus does not take any lock on it.
+--echo # We check this for completeness of coverage.
+lock table t1 write;
+--echo # Switching to connection 'con1'.
+connection con1;
+--echo # This statement should not be blocked.
+--disable_result_log
+describe t1;
+--enable_result_log
+--echo # Switching to connection 'default'.
+connection default;
+unlock tables;
+
+--echo #
+--echo # 1.5 SHOW statements.
+--echo #
+--echo # The above is true for SHOW statements as well.
+lock table t1 write;
+--echo # Switching to connection 'con1'.
+connection con1;
+--echo # These statements should not be blocked.
+# The below test for SHOW CREATE TABLE is disabled until bug 52593
+# "SHOW CREATE TABLE is blocked if table is locked for write by another
+# connection" is fixed.
+--disable_parsing
+show create table t1;
+--enable_parsing
+--disable_result_log
+show keys from t1;
+--enable_result_log
+--echo # Switching to connection 'default'.
+connection default;
+unlock tables;
+
+
+--echo #
+--echo # 2. Statements which read tables through subqueries.
+--echo #
+
+--echo #
+--echo # 2.1 CALL with a subquery.
+--echo #
+--echo # In theory strong lock is not necessary as this statement
+--echo # is not written to the binary log as a whole (it is written
+--echo # statement-by-statement). But in practice in 5.1 for
+--echo # almost everything except SELECT we take strong lock.
+let $statement= call p1((select i + 5 from t1 where i = 1));
+let $restore_table= t2;
+--source include/check_no_concurrent_insert.inc
+
+--echo #
+--echo # 2.2 CREATE TABLE with a subquery.
+--echo #
+--echo # Has to take a strong lock on the table being read as
+--echo # this statement is written to the binary log and therefore
+--echo # should be serialized with concurrent statements.
+let $statement= create table t0 select * from t1;
+let $restore_table= ;
+--source include/check_no_concurrent_insert.inc
+drop table t0;
+let $statement= create table t0 select j from t2 where j in (select i from t1);
+let $restore_table= ;
+--source include/check_no_concurrent_insert.inc
+drop table t0;
+
+--echo #
+--echo # 2.3 DELETE with a subquery.
+--echo #
+--echo # The above is true for this statement as well.
+let $statement= delete from t2 where j in (select i from t1);
+let $restore_table= t2;
+--source include/check_no_concurrent_insert.inc
+
+--echo #
+--echo # 2.4 MULTI-DELETE with a subquery.
+--echo #
+--echo # Same is true for this statement as well.
+let $statement= delete t2 from t3, t2 where k = j and j in (select i from t1);
+let $restore_table= t2;
+--source include/check_no_concurrent_insert.inc
+
+
+--echo #
+--echo # 2.5 DO with a subquery.
+--echo #
+--echo # In theory strong lock is not necessary as it is not logged.
+--echo # But in practice in 5.1 for almost everything except SELECT
+--echo # we take strong lock.
+let $statement= do (select i from t1 where i = 1);
+let $restore_table= ;
+--source include/check_no_concurrent_insert.inc
+
+--echo #
+--echo # 2.6 INSERT with a subquery.
+--echo #
+--echo # Has to take a strong lock on the table being read as
+--echo # this statement is written to the binary log and therefore
+--echo # should be serialized with concurrent inserts.
+let $statement= insert into t2 select i+5 from t1;
+let $restore_table= t2;
+--source include/check_no_concurrent_insert.inc
+let $statement= insert into t2 values ((select i+5 from t1 where i = 4));
+let $restore_table= t2;
+--source include/check_no_concurrent_insert.inc
+
+--echo #
+--echo # 2.7 LOAD DATA with a subquery.
+--echo #
+--echo # The above is true for this statement as well.
+let $statement= load data infile '../../std_data/rpl_loaddata.dat' into table t2 (@a, @b) set j= @b + (select i from t1 where i = 1);
+let $restore_table= t2;
+--source include/check_no_concurrent_insert.inc
+
+--echo #
+--echo # 2.8 REPLACE with a subquery.
+--echo #
+--echo # Same is true for this statement as well.
+let $statement= replace into t2 select i+5 from t1;
+let $restore_table= t2;
+--source include/check_no_concurrent_insert.inc
+let $statement= replace into t2 values ((select i+5 from t1 where i = 4));
+let $restore_table= t2;
+--source include/check_no_concurrent_insert.inc
+
+--echo #
+--echo # 2.9 SELECT with a subquery.
+--echo #
+--echo # Strong locks are not necessary as this statement is not written
+--echo # to the binary log and thanks to how MyISAM works this statement
+--echo # sees a version of the table prior to the concurrent insert.
+let $statement= select * from t2 where j in (select i from t1);
+let $restore_table= ;
+--source include/check_concurrent_insert.inc
+
+--echo #
+--echo # 2.10 SET with a subquery.
+--echo #
+--echo # In theory the same is true for this statement as well.
+--echo # But in practice in 5.1 we acquire strong lock in this
+--echo # case as well.
+let $statement= set @a:= (select i from t1 where i = 1);
+let $restore_table= ;
+--source include/check_no_concurrent_insert.inc
+
+--echo #
+--echo # 2.11 SHOW with a subquery.
+--echo #
+--echo # The same is true for this statement too.
+let $statement= show tables from test where Tables_in_test = 't2' and (select i from t1 where i = 1);
+let $restore_table= ;
+--source include/check_no_concurrent_insert.inc
+let $statement= show columns from t2 where (select i from t1 where i = 1);
+let $restore_table= ;
+--source include/check_no_concurrent_insert.inc
+
+--echo #
+--echo # 2.12 UPDATE with a subquery.
+--echo #
+--echo # Has to take a strong lock on the table being read as
+--echo # this statement is written to the binary log and therefore
+--echo # should be serialized with concurrent inserts.
+let $statement= update t2 set j= j-10 where j in (select i from t1);
+let $restore_table= t2;
+--source include/check_no_concurrent_insert.inc
+
+--echo #
+--echo # 2.13 MULTI-UPDATE with a subquery.
+--echo #
+--echo # Same is true for this statement as well.
+let $statement= update t2, t3 set j= j -10 where j=k and j in (select i from t1);
+let $restore_table= t2;
+--source include/check_no_concurrent_insert.inc
+
+
+--echo #
+--echo # 3. Statements which read tables through a view.
+--echo #
+
+--echo #
+--echo # 3.1 SELECT statement which uses some table through a view.
+--echo #
+--echo # Since this statement is not written to the binary log and
+--echo # an old version of the table is accessible thanks to how MyISAM
+--echo # handles concurrent insert, no locking is necessary.
+let $statement= select * from v1;
+let $restore_table= ;
+--source include/check_concurrent_insert.inc
+let $statement= select * from v2;
+let $restore_table= ;
+--source include/check_concurrent_insert.inc
+let $statement= select * from t2 where j in (select i from v1);
+let $restore_table= ;
+--source include/check_concurrent_insert.inc
+let $statement= select * from t3 where k in (select j from v2);
+let $restore_table= ;
+--source include/check_concurrent_insert.inc
+
+--echo #
+--echo # 3.2 Statements which modify a table and use views.
+--echo #
+--echo # Since such statements are going to be written to the binary
+--echo # log they need to be serialized against concurrent statements
+--echo # and therefore should take strong locks on the data read.
+let $statement= update t2 set j= j-10 where j in (select i from v1);
+let $restore_table= t2;
+--source include/check_no_concurrent_insert.inc
+let $statement= update t3 set k= k-10 where k in (select j from v2);
+let $restore_table= t2;
+--source include/check_no_concurrent_insert.inc
+let $statement= update t2, v1 set j= j-10 where j = i;
+let $restore_table= t2;
+--source include/check_no_concurrent_insert.inc
+let $statement= update v2 set j= j-10 where j = 3;
+let $restore_table= t2;
+--source include/check_no_concurrent_insert.inc
+
+
+--echo #
+--echo # 4. Statements which read tables through stored functions.
+--echo #
+
+--echo #
+--echo # 4.1 SELECT/SET with a stored function which does not
+--echo # modify data and uses SELECT in its turn.
+--echo #
+--echo # Calls to such functions won't get into the binary log and
+--echo # thus don't need to acquire strong locks.
+--echo # In 5.5 due to fix for bug #53921 "Wrong locks for SELECTs
+--echo # used stored functions may lead to broken SBR" strong locks
+--echo # are taken (we accepted it as a trade-off for this fix).
+let $statement= select f1();
+let $restore_table= ;
+--source include/check_concurrent_insert.inc
+let $statement= set @a:= f1();
+let $restore_table= ;
+--source include/check_concurrent_insert.inc
+
+--echo #
+--echo # 4.2 INSERT (or other statement which modifies data) with
+--echo # a stored function which does not modify data and uses
+--echo # SELECT.
+--echo #
+--echo # Since such statement is written to the binary log it should
+--echo # be serialized with concurrent statements affecting the data
+--echo # it uses. Therefore it should take strong lock on the data
+--echo # it reads.
+--echo # But due to bug #53921 "Wrong locks for SELECTs used stored
+--echo # functions may lead to broken SBR" weak locks are taken.
+let $statement= insert into t2 values (f1() + 5);
+let $restore_table= t2;
+--source include/check_concurrent_insert.inc
+
+--echo #
+--echo # 4.3 SELECT/SET with a stored function which
+--echo # reads and modifies data.
+--echo #
+--echo # Since a call to such function is written to the binary log,
+--echo # it should be serialized with concurrent statements affecting
+--echo # the data it uses. Hence, a strong lock on the data read
+--echo # should be taken.
+--echo # But due to bug #53921 "Wrong locks for SELECTs used stored
+--echo # functions may lead to broken SBR" weak locks are taken.
+let $statement= select f2();
+let $restore_table= t2;
+--source include/check_concurrent_insert.inc
+let $statement= set @a:= f2();
+let $restore_table= t2;
+--source include/check_concurrent_insert.inc
+
+--echo #
+--echo # 4.4. SELECT/SET with a stored function which does not
+--echo # modify data and reads a table through subselect
+--echo # in a control construct.
+--echo #
+--echo # Again, in theory a call to this function won't get to the
+--echo # binary log and thus no strong lock is needed. But in practice
+--echo # we don't detect this fact early enough (get_lock_type_for_table())
+--echo # to avoid taking a strong lock.
+let $statement= select f3();
+let $restore_table= ;
+--source include/check_no_concurrent_insert.inc
+let $statement= set @a:= f3();
+let $restore_table= ;
+--source include/check_no_concurrent_insert.inc
+let $statement= select f4();
+let $restore_table= ;
+--source include/check_no_concurrent_insert.inc
+let $statement= set @a:= f4();
+let $restore_table= ;
+--source include/check_no_concurrent_insert.inc
+
+--echo #
+--echo # 4.5. INSERT (or other statement which modifies data) with
+--echo # a stored function which does not modify data and reads
+--echo # the table through a subselect in one of its control
+--echo # constructs.
+--echo #
+--echo # Since such statement is written to the binary log it should
+--echo # be serialized with concurrent statements affecting data it
+--echo # uses. Therefore it should take a strong lock on the data
+--echo # it reads.
+let $statement= insert into t2 values (f3() + 5);
+let $restore_table= t2;
+--source include/check_no_concurrent_insert.inc
+let $statement= insert into t2 values (f4() + 6);
+let $restore_table= t2;
+--source include/check_no_concurrent_insert.inc
+
+--echo #
+--echo # 4.6 SELECT/SET which uses a stored function with
+--echo # DML which reads a table via a subquery.
+--echo #
+--echo # Since call to such function is written to the binary log
+--echo # it should be serialized with concurrent statements.
+--echo # Hence reads should take a strong lock.
+let $statement= select f5();
+let $restore_table= t2;
+--source include/check_no_concurrent_insert.inc
+let $statement= set @a:= f5();
+let $restore_table= t2;
+--source include/check_no_concurrent_insert.inc
+
+--echo #
+--echo # 4.7 SELECT/SET which uses a stored function which
+--echo # doesn't modify data and reads tables through
+--echo # a view.
+--echo #
+--echo # Once again, in theory, calls to such functions won't
+--echo # get into the binary log and thus don't need strong
+--echo # locks. In practice this fact is discovered
+--echo # too late to have any effect.
+--echo # But due to bug #53921 "Wrong locks for SELECTs used stored
+--echo # functions may lead to broken SBR" weak locks are taken
+--echo # in case when simple SELECT is used.
+let $statement= select f6();
+let $restore_table= t2;
+--source include/check_concurrent_insert.inc
+let $statement= set @a:= f6();
+let $restore_table= t2;
+--source include/check_concurrent_insert.inc
+let $statement= select f7();
+let $restore_table= t2;
+--source include/check_no_concurrent_insert.inc
+let $statement= set @a:= f7();
+let $restore_table= t2;
+--source include/check_no_concurrent_insert.inc
+
+--echo #
+--echo # 4.8 INSERT which uses stored function which
+--echo # doesn't modify data and reads a table
+--echo # through a view.
+--echo #
+--echo # Since such statement is written to the binary log and
+--echo # should be serialized with concurrent statements affecting
+--echo # the data it uses. Therefore it should take a strong lock on
+--echo # the table it reads.
+--echo # But due to bug #53921 "Wrong locks for SELECTs used stored
+--echo # functions may lead to broken SBR" weak locks are taken
+--echo # in case when simple SELECT is used.
+let $statement= insert into t3 values (f6() + 5);
+let $restore_table= t3;
+--source include/check_concurrent_insert.inc
+let $statement= insert into t3 values (f7() + 5);
+let $restore_table= t3;
+--source include/check_no_concurrent_insert.inc
+
+
+--echo #
+--echo # 4.9 SELECT which uses a stored function which
+--echo # modifies data and reads tables through a view.
+--echo #
+--echo # Since a call to such function is written to the binary log
+--echo # it should be serialized with concurrent statements.
+--echo # Hence, reads should take strong locks.
+--echo # But due to bug #53921 "Wrong locks for SELECTs used stored
+--echo # functions may lead to broken SBR" weak locks are taken
+--echo # in case when simple SELECT is used.
+let $statement= select f8();
+let $restore_table= t2;
+--source include/check_concurrent_insert.inc
+let $statement= select f9();
+let $restore_table= t2;
+--source include/check_no_concurrent_insert.inc
+
+--echo #
+--echo # 4.10 SELECT which uses a stored function which doesn't modify
+--echo # data and reads a table indirectly, by calling another
+--echo # function.
+--echo #
+--echo # Calls to such functions won't get into the binary log and
+--echo # thus don't need to acquire strong locks.
+--echo # In 5.5 due to fix for bug #53921 "Wrong locks for SELECTs
+--echo # used stored functions may lead to broken SBR" strong locks
+--echo # are taken (we accepted it as a trade-off for this fix).
+let $statement= select f10();
+let $restore_table= ;
+--source include/check_concurrent_insert.inc
+
+--echo #
+--echo # 4.11 INSERT which uses a stored function which doesn't modify
+--echo # data and reads a table indirectly, by calling another
+--echo # function.
+--echo #
+--echo # Since such statement is written to the binary log, it should
+--echo # be serialized with concurrent statements affecting the data it
+--echo # uses. Therefore it should take strong locks on data it reads.
+--echo # But due to bug #53921 "Wrong locks for SELECTs used stored
+--echo # functions may lead to broken SBR" weak locks are taken.
+let $statement= insert into t2 values (f10() + 5);
+let $restore_table= t2;
+--source include/check_concurrent_insert.inc
+
+--echo #
+--echo # 4.12 SELECT which uses a stored function which modifies
+--echo # data and reads a table indirectly, by calling another
+--echo # function.
+--echo #
+--echo # Since a call to such function is written to the binary log
+--echo # it should be serialized from concurrent statements.
+--echo # Hence, read should take a strong lock.
+--echo # But due to bug #53921 "Wrong locks for SELECTs used stored
+--echo # functions may lead to broken SBR" weak locks are taken.
+let $statement= select f11();
+let $restore_table= t2;
+--source include/check_concurrent_insert.inc
+
+--echo #
+--echo # 4.13 SELECT that reads a table through a subquery passed
+--echo # as a parameter to a stored function which modifies
+--echo # data.
+--echo #
+--echo # Even though a call to this function is written to the
+--echo # binary log, values of its parameters are written as literals.
+--echo # So there is no need to acquire strong locks for tables used in
+--echo # the subquery.
+let $statement= select f12((select i+10 from t1 where i=1));
+let $restore_table= t2;
+--source include/check_concurrent_insert.inc
+
+--echo #
+--echo # 4.14 INSERT that reads a table via a subquery passed
+--echo # as a parameter to a stored function which doesn't
+--echo # modify data.
+--echo #
+--echo # Since this statement is written to the binary log it should
+--echo # be serialized with concurrent statements affecting the data it
+--echo # uses. Therefore it should take strong locks on the data it reads.
+let $statement= insert into t2 values (f13((select i+10 from t1 where i=1)));
+let $restore_table= t2;
+--source include/check_no_concurrent_insert.inc
+
+
+--echo #
+--echo # 5. Statements that read tables through stored procedures.
+--echo #
+
+--echo #
+--echo # 5.1 CALL statement which reads a table via SELECT.
+--echo #
+--echo # Since neither this statement nor its components are
+--echo # written to the binary log, there is no need to take
+--echo # strong locks on the data it reads.
+let $statement= call p2(@a);
+let $restore_table= ;
+--source include/check_concurrent_insert.inc
+
+--echo #
+--echo # 5.2 Function that modifies data and uses CALL,
+--echo # which reads a table through SELECT.
+--echo #
+--echo # Since a call to such function is written to the binary
+--echo # log, it should be serialized with concurrent statements.
+--echo # Hence, in this case reads should take strong locks on data.
+--echo # But due to bug #53921 "Wrong locks for SELECTs used stored
+--echo # functions may lead to broken SBR" weak locks are taken.
+let $statement= select f14();
+let $restore_table= t2;
+--source include/check_concurrent_insert.inc
+
+--echo #
+--echo # 5.3 SELECT that calls a function that doesn't modify data and
+--echo # uses a CALL statement that reads a table via SELECT.
+--echo #
+--echo # Calls to such functions won't get into the binary log and
+--echo # thus don't need to acquire strong locks.
+--echo # In 5.5 due to fix for bug #53921 "Wrong locks for SELECTs
+--echo # used stored functions may lead to broken SBR" strong locks
+--echo # are taken (we accepted it as a trade-off for this fix).
+let $statement= select f15();
+let $restore_table= ;
+--source include/check_concurrent_insert.inc
+
+--echo #
+--echo # 5.4 INSERT which calls function which doesn't modify data and
+--echo # uses CALL statement which reads table through SELECT.
+--echo #
+--echo # Since such statement is written to the binary log it should
+--echo # be serialized with concurrent statements affecting data it
+--echo # uses. Therefore it should take strong locks on data it reads.
+--echo # But due to bug #53921 "Wrong locks for SELECTs used stored
+--echo # functions may lead to broken SBR" weak locks are taken.
+let $statement= insert into t2 values (f15()+5);
+let $restore_table= t2;
+--source include/check_concurrent_insert.inc
+
+
+--echo #
+--echo # 6. Statements that use triggers.
+--echo #
+
+--echo #
+--echo # 6.1 Statement invoking a trigger that reads table via SELECT.
+--echo #
+--echo # Since this statement is written to the binary log it should
+--echo # be serialized with concurrent statements affecting the data
+--echo # it uses. Therefore, it should take strong locks on the data
+--echo # it reads.
+--echo # But due to bug #53921 "Wrong locks for SELECTs used stored
+--echo # functions may lead to broken SBR" weak locks are taken.
+let $statement= insert into t4 values (2);
+let $restore_table= t4;
+--source include/check_concurrent_insert.inc
+
+--echo #
+--echo # 6.2 Statement invoking a trigger that reads table through
+--echo # a subquery in a control construct.
+--echo #
+--echo # The above is true for this statement as well.
+let $statement= update t4 set l= 2 where l = 1;
+let $restore_table= t4;
+--source include/check_no_concurrent_insert.inc
+
+--echo #
+--echo # 6.3 Statement invoking a trigger that reads a table through
+--echo # a view.
+--echo #
+--echo # And for this statement.
+let $statement= delete from t4 where l = 1;
+let $restore_table= t4;
+--source include/check_no_concurrent_insert.inc
+
+--echo #
+--echo # 6.4 Statement invoking a trigger that reads a table through
+--echo # a stored function.
+--echo #
+--echo # And for this statement.
+--echo # But due to bug #53921 "Wrong locks for SELECTs used stored
+--echo # functions may lead to broken SBR" weak locks are taken.
+let $statement= insert into t5 values (2);
+let $restore_table= t5;
+--source include/check_concurrent_insert.inc
+
+--echo #
+--echo # 6.5 Statement invoking a trigger that reads a table through
+--echo # stored procedure.
+--echo #
+--echo # And for this statement.
+--echo # But due to bug #53921 "Wrong locks for SELECTs used stored
+--echo # functions may lead to broken SBR" weak locks are taken.
+let $statement= update t5 set l= 2 where l = 1;
+let $restore_table= t5;
+--source include/check_concurrent_insert.inc
+
+
+--echo # Clean-up.
+drop function f1;
+drop function f2;
+drop function f3;
+drop function f4;
+drop function f5;
+drop function f6;
+drop function f7;
+drop function f8;
+drop function f9;
+drop function f10;
+drop function f11;
+drop function f12;
+drop function f13;
+drop function f14;
+drop function f15;
+drop view v1, v2;
+drop procedure p1;
+drop procedure p2;
+drop table t1, t2, t3, t4, t5, te;
+
+disconnect con1;
+disconnect con2;
+
+set @@global.concurrent_insert= @old_concurrent_insert;
+
+
+# Check that all connections opened by test cases in this file are really
+# gone so execution of other tests won't be affected by their presence.
+--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/t/log_state.test b/mysql-test/t/log_state.test
index e40dd1e3491..05e17dc9fa7 100644
--- a/mysql-test/t/log_state.test
+++ b/mysql-test/t/log_state.test
@@ -362,6 +362,42 @@ if(!$fixed_bug38124)
}
+###########################################################################
+
+--echo #
+--echo # Bug #49756 Rows_examined is always 0 in the slow query log
+--echo # for update statements
+--echo #
+
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = "TABLE";
+SET GLOBAL slow_query_log = ON;
+SET GLOBAL long_query_time = 0.001;
+
+# clear slow_log of any residual slow queries
+TRUNCATE TABLE mysql.slow_log;
+CREATE TABLE t1 (a INT);
+CREATE TABLE t2 (b INT, PRIMARY KEY (b));
+INSERT INTO t2 VALUES (3),(4);
+
+connect (con2,localhost,root,,);
+INSERT INTO t1 VALUES (1+sleep(.01)),(2);
+INSERT INTO t1 SELECT b+sleep(.01) from t2;
+UPDATE t1 SET a=a+sleep(.01) WHERE a>2;
+UPDATE t1 SET a=a+sleep(.01) ORDER BY a DESC;
+UPDATE t2 set b=b+sleep(.01) limit 1;
+UPDATE t1 SET a=a+sleep(.01) WHERE a in (SELECT b from t2);
+DELETE FROM t1 WHERE a=a+sleep(.01) ORDER BY a LIMIT 2;
+
+SELECT rows_examined,sql_text FROM mysql.slow_log;
+disconnect con2;
+connection default;
+DROP TABLE t1,t2;
+TRUNCATE TABLE mysql.slow_log;
+
+--echo # end of bug#49756
+
+
--echo End of 5.1 tests
--enable_ps_protocol
@@ -376,6 +412,8 @@ disconnect con1;
connection default;
# Reset global system variables to initial values if forgotten somewhere above.
+SET GLOBAL long_query_time = DEFAULT;
+SET GLOBAL log_output = @old_log_output;
SET global general_log = @old_general_log;
SET global general_log_file = @old_general_log_file;
SET global slow_query_log = @old_slow_query_log;
diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test
index b32a329f827..87e952dd069 100644
--- a/mysql-test/t/multi_update.test
+++ b/mysql-test/t/multi_update.test
@@ -589,7 +589,8 @@ reset master;
UPDATE t2,t1 SET t2.a=t1.a+2;
# check
select * from t2 /* must be (3,1), (4,4) */;
-show master status /* there must be the UPDATE query event */;
+let wait_binlog_event= UPDATE;
+source include/wait_for_binlog_event.inc;
# B. testing multi_update::send_error() ineffective update
# (as there is a policy described at mysql_update() still go to binlog)
@@ -600,7 +601,8 @@ insert into t2 values (1,2),(3,4),(4,4);
reset master;
--error ER_DUP_ENTRY
UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a;
-show master status /* there must be the UPDATE query event */;
+let wait_binlog_event= UPDATE;
+source include/wait_for_binlog_event.inc;
# cleanup
drop table t1, t2;
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test
index 02923bd6e6f..f1a00368e12 100644
--- a/mysql-test/t/mysqldump.test
+++ b/mysql-test/t/mysqldump.test
@@ -2134,6 +2134,35 @@ SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
SET NAMES default;
DROP TABLE t1, t2;
+###########################################################################
+
+--echo #
+--echo # Bug #53088: mysqldump with -T & --default-character-set set
+--echo # truncates text/blob to 766 chars
+--echo #
+--echo # Also see outfile_loaddata.test
+--echo #
+
+CREATE TABLE t1 (a BLOB) CHARSET latin1;
+CREATE TABLE t2 LIKE t1;
+
+let $table= t1;
+let $dir= $MYSQLTEST_VARDIR/tmp;
+let $file= $dir/$table.txt;
+let $length= 800;
+
+--eval INSERT INTO t1 VALUES (REPEAT('.', $length))
+
+--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --default-character-set=latin1 --tab=$dir/ test $table
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+
+--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET latin1
+--remove_file $file
+
+--echo # should be $length
+SELECT LENGTH(a) FROM t2;
+
+DROP TABLE t1, t2;
###########################################################################
--echo #
diff --git a/mysql-test/t/mysqlhotcopy_archive.test b/mysql-test/t/mysqlhotcopy_archive.test
new file mode 100644
index 00000000000..4bfad3ce138
--- /dev/null
+++ b/mysql-test/t/mysqlhotcopy_archive.test
@@ -0,0 +1,8 @@
+# Test of mysqlhotcopy (perl script)
+# Author: Horst Hunger
+# Created: 2010-05-10
+
+--source include/have_archive.inc
+let $engine= archive;
+--source include/mysqlhotcopy.inc
+--exit
diff --git a/mysql-test/t/mysqlhotcopy_myisam.test b/mysql-test/t/mysqlhotcopy_myisam.test
new file mode 100644
index 00000000000..adf26e42245
--- /dev/null
+++ b/mysql-test/t/mysqlhotcopy_myisam.test
@@ -0,0 +1,7 @@
+# Test of mysqlhotcopy (perl script)
+# Author: Horst Hunger
+# Created: 2010-05-10
+
+let $engine= MyISAM;
+--source include/mysqlhotcopy.inc
+--exit
diff --git a/mysql-test/t/outfile_loaddata.test b/mysql-test/t/outfile_loaddata.test
index 3f62acbd214..26760f9a1b2 100644
--- a/mysql-test/t/outfile_loaddata.test
+++ b/mysql-test/t/outfile_loaddata.test
@@ -251,6 +251,40 @@ SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
SET NAMES default;
DROP TABLE t1, t2;
+###########################################################################
+
+--echo #
+--echo # Bug #53088: mysqldump with -T & --default-character-set set
+--echo # truncates text/blob to 766 chars
+--echo #
+--echo # Also see mysqldump.test
+--echo #
+
+CREATE TABLE t1 (a BLOB) CHARSET latin1;
+CREATE TABLE t2 LIKE t1;
+
+let $file= '$MYSQLTEST_VARDIR/tmp/bug53088.txt';
+let $length= 800;
+
+--eval INSERT INTO t1 VALUES (REPEAT('.', $length))
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval SELECT * INTO OUTFILE $file CHARACTER SET latin1 FROM t1
+
+--echo # should be greater than $length
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval SELECT LENGTH(LOAD_FILE($file))
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval LOAD DATA INFILE $file INTO TABLE t2
+
+--remove_file $MYSQLTEST_VARDIR/tmp/bug53088.txt
+
+--echo # should be $length
+SELECT LENGTH(a) FROM t2;
+
+DROP TABLE t1, t2;
+
###########################################################################
--echo # End of 5.1 tests.
diff --git a/mysql-test/t/partition_error.test b/mysql-test/t/partition_error.test
index 8da8f54b774..434392c2e28 100644
--- a/mysql-test/t/partition_error.test
+++ b/mysql-test/t/partition_error.test
@@ -7,7 +7,36 @@
--disable_warnings
drop table if exists t1;
--enable_warnings
-
+
+let $MYSQLD_DATADIR= `SELECT @@datadir`;
+
+--echo #
+--echo # Bug#49161: Out of memory; restart server and try again (needed 2 bytes)
+--echo #
+CREATE TABLE t1 (a INT) PARTITION BY HASH (a);
+FLUSH TABLES;
+--remove_file $MYSQLD_DATADIR/test/t1.par
+--replace_result $MYSQLD_DATADIR ./
+CHECK TABLE t1;
+--error ER_UNKNOWN_ERROR
+SELECT * FROM t1;
+--echo # Note that it is currently impossible to drop a partitioned table
+--echo # without the .par file
+--error ER_BAD_TABLE_ERROR
+DROP TABLE t1;
+--remove_file $MYSQLD_DATADIR/test/t1.frm
+--remove_file $MYSQLD_DATADIR/test/t1#P#p0.MYI
+--remove_file $MYSQLD_DATADIR/test/t1#P#p0.MYD
+
+--echo #
+--echo # Bug#49477: Assertion `0' failed in ha_partition.cc:5530
+--echo # with temporary table and partitions
+--echo #
+CREATE TABLE t1 (a INT) PARTITION BY HASH(a);
+--error ER_PARTITION_NO_TEMPORARY
+CREATE TEMPORARY TABLE tmp_t1 LIKE t1;
+DROP TABLE t1;
+
--echo #
--echo # Bug#50392: insert_id is not reset for partitioned tables
--echo # auto_increment on duplicate entry
@@ -158,7 +187,6 @@ partitions 3
partition x2 tablespace ts2,
partition x3 tablespace ts3);
-let $MYSQLD_DATADIR= `select @@datadir`;
select load_file('$MYSQLD_DATADIR/test/t1.par');
#
# Partition by hash, invalid field in function
diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test
index 5d5ad180f1a..2d2a6f75d73 100644
--- a/mysql-test/t/range.test
+++ b/mysql-test/t/range.test
@@ -1313,4 +1313,45 @@ SELECT * FROM t1 FORCE INDEX (PRIMARY)
DROP TABLE t1;
+--echo #
+--echo # Bug#50939: Loose Index Scan unduly relies on engine to remember range
+--echo # endpoints
+--echo #
+CREATE TABLE t1 (
+ a INT,
+ b INT,
+ KEY ( a, b )
+) PARTITION BY HASH (a) PARTITIONS 1;
+
+CREATE TABLE t2 (
+ a INT,
+ b INT,
+ KEY ( a, b )
+);
+
+INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
+
+INSERT INTO t1 SELECT a + 5, b + 5 FROM t1;
+INSERT INTO t1 SELECT a + 10, b + 10 FROM t1;
+INSERT INTO t1 SELECT a + 20, b + 20 FROM t1;
+INSERT INTO t1 SELECT a + 40, b + 40 FROM t1;
+
+INSERT INTO t2 SELECT * FROM t1;
+
+--echo # plans should be identical
+EXPLAIN SELECT a, MAX(b) FROM t1 WHERE a IN (10,100) GROUP BY a;
+EXPLAIN SELECT a, MAX(b) FROM t2 WHERE a IN (10,100) GROUP BY a;
+
+FLUSH status;
+SELECT a, MAX(b) FROM t1 WHERE a IN (10, 100) GROUP BY a;
+--echo # Should be no more than 4 reads.
+SHOW status LIKE 'handler_read_key';
+
+FLUSH status;
+SELECT a, MAX(b) FROM t2 WHERE a IN (10, 100) GROUP BY a;
+--echo # Should be no more than 4 reads.
+SHOW status LIKE 'handler_read_key';
+
+DROP TABLE t1, t2;
+
--echo End of 5.1 tests
diff --git a/mysql-test/t/renamedb.test b/mysql-test/t/renamedb.test
index 84315090b7a..71d0c127058 100644
--- a/mysql-test/t/renamedb.test
+++ b/mysql-test/t/renamedb.test
@@ -44,7 +44,7 @@ ALTER DATABASE `#mysql41#not-supported` UPGRADE DATA DIRECTORY NAME;
--error ER_WRONG_USAGE
ALTER DATABASE `#mysql51#not-yet` UPGRADE DATA DIRECTORY NAME;
---error ER_WRONG_USAGE
+--error ER_WRONG_DB_NAME
ALTER DATABASE `#mysql50#` UPGRADE DATA DIRECTORY NAME;
--error ER_BAD_DB_ERROR
diff --git a/mysql-test/t/schema.test b/mysql-test/t/schema.test
index a08d9b38935..a63402bbb83 100644
--- a/mysql-test/t/schema.test
+++ b/mysql-test/t/schema.test
@@ -4,6 +4,9 @@
# Drop mysqltest1 database, as it can left from the previous tests.
#
+# Save the initial number of concurrent sessions.
+--source include/count_sessions.inc
+
--disable_warnings
drop database if exists mysqltest1;
--enable_warnings
@@ -12,3 +15,47 @@ create schema foo;
show create schema foo;
show schemas;
drop schema foo;
+
+
+--echo #
+--echo # Bug#54360 Deadlock DROP/ALTER/CREATE DATABASE with open HANDLER
+--echo #
+
+CREATE DATABASE db1;
+CREATE TABLE db1.t1 (a INT);
+INSERT INTO db1.t1 VALUES (1), (2);
+
+--echo # Connection con1
+connect (con1, localhost, root);
+HANDLER db1.t1 OPEN;
+
+--echo # Connection default
+connection default;
+--echo # Sending:
+--send DROP DATABASE db1
+
+--echo # Connection con2
+connect (con2, localhost, root);
+--echo # Waiting for 'DROP DATABASE db1' to sync in.
+let $wait_condition=SELECT COUNT(*)=1 FROM information_schema.processlist
+ WHERE state='Waiting for table' AND info='DROP DATABASE db1';
+--source include/wait_condition.inc
+
+--echo # Connection con1
+connection con1;
+# All these statements before resulted in deadlock.
+CREATE DATABASE db2;
+ALTER DATABASE db2 DEFAULT CHARACTER SET utf8;
+DROP DATABASE db2;
+
+--echo # Connection default
+connection default;
+--echo # Reaping: DROP DATABASE db1
+--reap
+disconnect con1;
+disconnect con2;
+
+
+# Check that all connections opened by test cases in this file are really
+# gone so execution of other tests won't be affected by their presence.
+--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index f61db538fb4..db08aad0df0 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -4077,4 +4077,15 @@ SELECT * FROM t1 WHERE 102 < c;
DROP TABLE t1;
+--echo #
+--echo # Bug #54459: Assertion failed: param.sort_length,
+--echo # file .\filesort.cc, line 149 (part II)
+--echo #
+CREATE TABLE t1(a ENUM('') NOT NULL);
+INSERT INTO t1 VALUES (), (), ();
+EXPLAIN SELECT 1 FROM t1 ORDER BY a COLLATE latin1_german2_ci;
+SELECT 1 FROM t1 ORDER BY a COLLATE latin1_german2_ci;
+DROP TABLE t1;
+
+
--echo End of 5.1 tests
diff --git a/mysql-test/t/sp_trans_log.test b/mysql-test/t/sp_trans_log.test
index 2f2b84a9bef..5eccbf81fef 100644
--- a/mysql-test/t/sp_trans_log.test
+++ b/mysql-test/t/sp_trans_log.test
@@ -34,8 +34,8 @@ end|
reset master|
--error ER_DUP_ENTRY
insert into t2 values (bug23333(),1)|
---replace_column 2 # 5 # 6 #
-show binlog events from 106 /* with fixes for #23333 will show there is the query */|
+# with fixes for 23333 will show there is the query */|
+--source include/show_binlog_events.inc
select count(*),@a from t1 /* must be 1,1 */|
delimiter ;|
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test
index ffbd56c198d..89be351312d 100644
--- a/mysql-test/t/subselect.test
+++ b/mysql-test/t/subselect.test
@@ -3711,3 +3711,28 @@ GROUP BY
DROP TABLE t3;
DROP TABLE t2;
DROP TABLE t1;
+
+
+--echo #
+--echo # Bug #52711: Segfault when doing EXPLAIN SELECT with
+--echo # union...order by (select... where...)
+--echo #
+
+CREATE TABLE t1 (a VARCHAR(10), FULLTEXT KEY a (a));
+INSERT INTO t1 VALUES (1),(2);
+CREATE TABLE t2 (b INT);
+INSERT INTO t2 VALUES (1),(2);
+
+--echo # Should not crash
+--disable_result_log
+EXPLAIN
+SELECT * FROM t2 UNION SELECT * FROM t2
+ ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE));
+
+--echo # Should not crash
+SELECT * FROM t2 UNION SELECT * FROM t2
+ ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE));
+DROP TABLE t1,t2;
+--enable_result_log
+
+--echo End of 5.1 tests
diff --git a/mysql-test/t/type_time.test b/mysql-test/t/type_time.test
index 5bb521601e5..34331b72688 100644
--- a/mysql-test/t/type_time.test
+++ b/mysql-test/t/type_time.test
@@ -88,5 +88,15 @@ INSERT INTO t1 VALUES ('0:00:00');
SELECT CAST(c AS TIME) FROM t1;
DROP TABLE t1;
-
--echo End of 5.0 tests
+
+--echo #
+--echo # Bug#53942 valgrind warnings with timestamp() function and incomplete datetime values
+--echo #
+
+CREATE TABLE t1(f1 TIME);
+INSERT INTO t1 VALUES ('23:38:57');
+SELECT TIMESTAMP(f1,'1') FROM t1;
+DROP TABLE t1;
+
+--echo End of 5.1 tests
diff --git a/mysql-test/t/upgrade.test b/mysql-test/t/upgrade.test
index e390e8a1253..a7b9a1531ff 100644
--- a/mysql-test/t/upgrade.test
+++ b/mysql-test/t/upgrade.test
@@ -137,3 +137,37 @@ select * from `a-b-c`.v1;
--enable_ps_protocol
drop database `a-b-c`;
use test;
+
+--echo # End of 5.0 tests
+
+--echo #
+--echo # Bug #53804: serious flaws in the alter database .. upgrade data
+--echo # directory name command
+--echo #
+
+--error ER_BAD_DB_ERROR
+ALTER DATABASE `#mysql50#:` UPGRADE DATA DIRECTORY NAME;
+--error ER_WRONG_DB_NAME
+ALTER DATABASE `#mysql50#.` UPGRADE DATA DIRECTORY NAME;
+--error ER_WRONG_DB_NAME
+ALTER DATABASE `#mysql50#../` UPGRADE DATA DIRECTORY NAME;
+--error ER_WRONG_DB_NAME
+ALTER DATABASE `#mysql50#../..` UPGRADE DATA DIRECTORY NAME;
+--error ER_WRONG_DB_NAME
+ALTER DATABASE `#mysql50#../../` UPGRADE DATA DIRECTORY NAME;
+--error ER_WRONG_DB_NAME
+ALTER DATABASE `#mysql50#./blablabla` UPGRADE DATA DIRECTORY NAME;
+--error ER_WRONG_DB_NAME
+ALTER DATABASE `#mysql50#../blablabla` UPGRADE DATA DIRECTORY NAME;
+--error ER_WRONG_DB_NAME
+ALTER DATABASE `#mysql50#/` UPGRADE DATA DIRECTORY NAME;
+--error ER_WRONG_DB_NAME
+ALTER DATABASE `#mysql50#/.` UPGRADE DATA DIRECTORY NAME;
+
+--error ER_WRONG_DB_NAME
+USE `#mysql50#.`;
+--error ER_WRONG_DB_NAME
+USE `#mysql50#../blablabla`;
+
+--echo # End of 5.1 tests
+
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test
index 94dba1e8ff6..3e9dc5e39d3 100644
--- a/mysql-test/t/variables.test
+++ b/mysql-test/t/variables.test
@@ -362,7 +362,7 @@ set global table_open_cache=100;
set storage_engine=myisam;
set global thread_cache_size=100;
set timestamp=1, timestamp=default;
-set tmp_table_size=100;
+set tmp_table_size=1024;
set tx_isolation="READ-COMMITTED";
set wait_timeout=100;
set log_warnings=1;
@@ -778,6 +778,21 @@ show variables like 'hostname';
--echo # Test 'myisam_mmap_size' option is not dynamic
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@myisam_mmap_size= 500M;
+
+
+--echo #
+--echo # Bug #52315: utc_date() crashes when system time > year 2037
+--echo #
+
+--error 0, ER_UNKNOWN_ERROR
+SET TIMESTAMP=2*1024*1024*1024;
+--echo #Should not crash
+--disable_result_log
+SELECT UTC_DATE();
+--enable_result_log
+SET TIMESTAMP=DEFAULT;
+
+
--echo End of 5.0 tests
#
diff --git a/mysql-test/t/variables_debug.test b/mysql-test/t/variables_debug.test
index 8f2bde7ae42..12f5d2e6ca5 100644
--- a/mysql-test/t/variables_debug.test
+++ b/mysql-test/t/variables_debug.test
@@ -1,5 +1,7 @@
--source include/have_debug.inc
+SET @old_debug = @@GLOBAL.debug;
+
#
# Bug#34678 @@debug variable's incremental mode
#
@@ -21,5 +23,6 @@ SELECT @@global.debug;
SET GLOBAL debug='';
SELECT @@global.debug;
+SET GLOBAL debug=@old_debug;
--echo End of 5.1 tests
diff --git a/mysql-test/valgrind.supp b/mysql-test/valgrind.supp
index 72882acd3cd..67179571953 100644
--- a/mysql-test/valgrind.supp
+++ b/mysql-test/valgrind.supp
@@ -1023,3 +1023,9 @@
fun:__libc_res_nsend
fun:__libc_res_nquery
}
+
+{
+ buf_buddy_relocate peeking (space,page) in potentially free blocks
+ Memcheck:Addr1
+ fun:buf_buddy_relocate
+}