mariadb/mysql-test/suite/binlog/r/binlog_stm_binlog.result

828 lines
54 KiB
Text
Raw Normal View History

create table t1 (a int, b int) engine=innodb;
begin;
insert into t1 values (1,2);
commit;
Post merge fixes of result files. mysql-test/r/binlog_stm_binlog.result: Result change. mysql-test/r/binlog_stm_ctype_ucs.result: Result change. mysql-test/r/binlog_stm_insert_select.result: Result change. mysql-test/r/ctype_cp932_binlog_stm.result: Result change. mysql-test/r/flush_block_commit_notembedded.result: Result change. mysql-test/r/rpl_000015.result: Result change. mysql-test/r/rpl_change_master.result: Result change. mysql-test/r/rpl_deadlock_innodb.result: Result change. mysql-test/r/rpl_flushlog_loop.result: Result change. mysql-test/r/rpl_known_bugs_detection.result: Result change. mysql-test/r/rpl_loaddata.result: Result change. mysql-test/r/rpl_loaddata_s.result: Result change. mysql-test/r/rpl_log_pos.result: Result change. mysql-test/r/rpl_rbr_to_sbr.result: Result change. mysql-test/r/rpl_rotate_logs.result: Result change. mysql-test/r/rpl_row_max_relay_size.result: Result change. mysql-test/r/rpl_server_id1.result: Result change. mysql-test/r/rpl_server_id2.result: Result change. mysql-test/r/rpl_sp.result: Result change. mysql-test/r/rpl_stm_charset.result: Result change. mysql-test/r/rpl_stm_flsh_tbls.result: Result change. mysql-test/r/rpl_stm_log.result: Result change. mysql-test/r/rpl_stm_max_relay_size.result: Result change. mysql-test/r/rpl_stm_multi_query.result: Result change. mysql-test/r/rpl_stm_reset_slave.result: Result change. mysql-test/r/rpl_stm_until.result: Result change. mysql-test/r/rpl_switch_stm_row_mixed.result: Result change. mysql-test/r/rpl_truncate_2myisam.result: Result change. mysql-test/r/rpl_truncate_3innodb.result: Result change. mysql-test/r/rpl_truncate_7ndb.result: Result change. mysql-test/r/user_var-binlog.result: Result change.
2007-03-30 04:44:49 +02:00
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
2009-10-01 18:44:53 +02:00
master-bin.000001 4 Format_desc 1 107 Server ver: #, Binlog ver: #
master-bin.000001 107 Query 1 214 use `test`; create table t1 (a int, b int) engine=innodb
master-bin.000001 214 Query 1 282 BEGIN
master-bin.000001 282 Query 1 372 use `test`; insert into t1 values (1,2)
master-bin.000001 372 Xid 1 399 COMMIT /* XID */
drop table t1;
drop table if exists t1, t2;
reset master;
Removed bdb test cases. BitKeeper/deleted/.del-bdb-alter-table-1.result: Rename: mysql-test/r/bdb-alter-table-1.result -> BitKeeper/deleted/.del-bdb-alter-table-1.result BitKeeper/deleted/.del-bdb-alter-table-1.test: Rename: mysql-test/t/bdb-alter-table-1.test -> BitKeeper/deleted/.del-bdb-alter-table-1.test BitKeeper/deleted/.del-bdb-alter-table-2-master.opt: Rename: mysql-test/t/bdb-alter-table-2-master.opt -> BitKeeper/deleted/.del-bdb-alter-table-2-master.opt BitKeeper/deleted/.del-bdb-alter-table-2.result: Rename: mysql-test/r/bdb-alter-table-2.result -> BitKeeper/deleted/.del-bdb-alter-table-2.result BitKeeper/deleted/.del-bdb-alter-table-2.test: Rename: mysql-test/t/bdb-alter-table-2.test -> BitKeeper/deleted/.del-bdb-alter-table-2.test BitKeeper/deleted/.del-bdb-crash.result: Rename: mysql-test/r/bdb-crash.result -> BitKeeper/deleted/.del-bdb-crash.result BitKeeper/deleted/.del-bdb-crash.test: Rename: mysql-test/t/bdb-crash.test -> BitKeeper/deleted/.del-bdb-crash.test BitKeeper/deleted/.del-bdb-deadlock.result: Rename: mysql-test/r/bdb-deadlock.result -> BitKeeper/deleted/.del-bdb-deadlock.result BitKeeper/deleted/.del-bdb-deadlock.test: Rename: mysql-test/t/bdb-deadlock.test -> BitKeeper/deleted/.del-bdb-deadlock.test BitKeeper/deleted/.del-bdb-deadlock.tminus: Rename: mysql-test/t/bdb-deadlock.tminus -> BitKeeper/deleted/.del-bdb-deadlock.tminus BitKeeper/deleted/.del-bdb.result: Rename: mysql-test/r/bdb.result -> BitKeeper/deleted/.del-bdb.result BitKeeper/deleted/.del-bdb.test: Rename: mysql-test/t/bdb.test -> BitKeeper/deleted/.del-bdb.test BitKeeper/deleted/.del-bdb_cache-master.opt~e54093fff2e73631: Rename: mysql-test/t/bdb_cache-master.opt -> BitKeeper/deleted/.del-bdb_cache-master.opt~e54093fff2e73631 BitKeeper/deleted/.del-bdb_cache.result~5767ff4f4b228a66: Rename: mysql-test/r/bdb_cache.result -> BitKeeper/deleted/.del-bdb_cache.result~5767ff4f4b228a66 BitKeeper/deleted/.del-bdb_cache.test~818df448403a5598: Rename: mysql-test/t/bdb_cache.test -> BitKeeper/deleted/.del-bdb_cache.test~818df448403a5598 BitKeeper/deleted/.del-bdb_gis.result: Rename: mysql-test/r/bdb_gis.result -> BitKeeper/deleted/.del-bdb_gis.result BitKeeper/deleted/.del-bdb_gis.test: Rename: mysql-test/t/bdb_gis.test -> BitKeeper/deleted/.del-bdb_gis.test BitKeeper/deleted/.del-have_bdb.inc: Rename: mysql-test/include/have_bdb.inc -> BitKeeper/deleted/.del-have_bdb.inc BitKeeper/deleted/.del-have_bdb.require: Rename: mysql-test/r/have_bdb.require -> BitKeeper/deleted/.del-have_bdb.require BitKeeper/deleted/.del-index_merge_bdb.result: Rename: mysql-test/r/index_merge_bdb.result -> BitKeeper/deleted/.del-index_merge_bdb.result BitKeeper/deleted/.del-index_merge_bdb.test: Rename: mysql-test/t/index_merge_bdb.test -> BitKeeper/deleted/.del-index_merge_bdb.test BitKeeper/deleted/.del-ps_6bdb.result: Rename: mysql-test/r/ps_6bdb.result -> BitKeeper/deleted/.del-ps_6bdb.result BitKeeper/deleted/.del-ps_6bdb.test: Rename: mysql-test/t/ps_6bdb.test -> BitKeeper/deleted/.del-ps_6bdb.test BitKeeper/deleted/.del-rowid_order_bdb.result: Rename: mysql-test/r/rowid_order_bdb.result -> BitKeeper/deleted/.del-rowid_order_bdb.result BitKeeper/deleted/.del-rowid_order_bdb.test: Rename: mysql-test/t/rowid_order_bdb.test -> BitKeeper/deleted/.del-rowid_order_bdb.test BitKeeper/deleted/.del-sql_manager.h: Rename: sql/sql_manager.h -> BitKeeper/deleted/.del-sql_manager.h libmysqld/Makefile.am: Removed bdb from the engine mysql-test/extra/binlog_tests/binlog.test: Removed bdb support mysql-test/r/binlog_stm_binlog.result: Updated results mysql-test/r/ctype_utf8.result: Removed bdb support mysql-test/t/ctype_utf8.test: Removed bdb support sql/CMakeLists.txt: Removed file for Windows build sql/Makefile.am: Removed unneeded include file. sql/sql_manager.cc: Removed include file.
2006-08-11 03:29:25 +02:00
create table t1 (a int) engine=innodb;
create table t2 (a int) engine=innodb;
begin;
insert t1 values (5);
commit;
begin;
insert t2 values (5);
commit;
Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl into romeo.(none):/home/bk/w3464-mysql-5.1-new-rpl client/Makefile.am: Auto merged sql/Makefile.am: Auto merged sql/log_event.cc: Auto merged sql/log_event.h: Auto merged sql/rpl_injector.h: Auto merged sql/sql_parse.cc: Auto merged mysql-test/r/ctype_cp932_binlog_stm.result: Manual merge , mysql-test/r/flush_block_commit_notembedded.result: Manual merge mysql-test/r/rpl_000015.result: Manual merge mysql-test/r/rpl_change_master.result: Manual merge mysql-test/r/rpl_deadlock_innodb.result: Manual merge mysql-test/r/rpl_flushlog_loop.result: Manual merge , mysql-test/r/rpl_loaddata.result: manual merge mysql-test/r/rpl_loaddata_s.result: manual merge , mysql-test/r/rpl_log_pos.result: manual merge mysql-test/r/rpl_ndb_charset.result: manual merge mysql-test/r/rpl_ndb_log.result: manual merge , mysql-test/r/rpl_ndb_multi.result: manual merge mysql-test/r/rpl_rbr_to_sbr.result: manual merge mysql-test/r/rpl_rotate_logs.result: Manual merge mysql-test/r/rpl_row_basic_11bugs.result: Manual merge mysql-test/r/rpl_row_charset.result: Manual merge mysql-test/r/rpl_row_create_table.result: Manual merge mysql-test/r/rpl_row_delayed_ins.result: Manual merge mysql-test/r/rpl_row_drop.result: Manual merge mysql-test/r/rpl_row_flsh_tbls.result: Manual merge mysql-test/r/rpl_row_inexist_tbl.result: Manual merge mysql-test/r/rpl_row_log.result: Manual merge mysql-test/r/rpl_row_log_innodb.result: Manual merge mysql-test/r/rpl_row_max_relay_size.result: Manual merge mysql-test/r/rpl_row_reset_slave.result: Manual merge mysql-test/r/rpl_row_until.result: Manual merge mysql-test/r/rpl_server_id1.result: Manual merge mysql-test/r/rpl_server_id2.result: Manual merge mysql-test/r/rpl_sp.result: Manual merge mysql-test/r/rpl_stm_charset.result: Manual merge mysql-test/r/rpl_stm_flsh_tbls.result: Manual merge mysql-test/r/rpl_stm_log.result: Manual merge mysql-test/r/rpl_stm_max_relay_size.result: Manual merge mysql-test/r/rpl_stm_multi_query.result: Manual merge mysql-test/r/rpl_stm_reset_slave.result: Manual merge mysql-test/r/rpl_stm_until.result: Manual merge mysql-test/r/rpl_switch_stm_row_mixed.result: Manual merge mysql-test/r/rpl_truncate_2myisam.result: Manual merge mysql-test/r/rpl_truncate_3innodb.result: Manual merge mysql-test/r/rpl_truncate_7ndb.result: Manual merge mysql-test/r/user_var-binlog.result: Manual merge mysql-test/t/binlog_row_mix_innodb_myisam.test: Manual merge mysql-test/extra/binlog_tests/binlog.test: Binlog position change. mysql-test/extra/binlog_tests/binlog_insert_delayed.test: Binlog position change. mysql-test/extra/binlog_tests/ctype_cp932_binlog.test: Binlog position change. mysql-test/extra/binlog_tests/ctype_ucs_binlog.test: Binlog position change. mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test: Binlog position change. mysql-test/extra/rpl_tests/rpl_deadlock.test: Binlog position change. mysql-test/extra/rpl_tests/rpl_log.test: Binlog position change. mysql-test/extra/rpl_tests/rpl_multi_query.test: Binlog position change. mysql-test/extra/rpl_tests/rpl_row_charset.test: Binlog position change. mysql-test/extra/rpl_tests/rpl_stm_charset.test: Binlog position change. mysql-test/include/show_binlog_events.inc: Binlog position change. mysql-test/r/binlog_row_binlog.result: Result change mysql-test/r/binlog_row_ctype_ucs.result: Result change mysql-test/r/binlog_row_insert_select.result: Result change mysql-test/r/binlog_row_mix_innodb_myisam.result: Result change mysql-test/r/binlog_stm_binlog.result: Result change mysql-test/r/binlog_stm_ctype_ucs.result: Result change mysql-test/r/binlog_stm_insert_select.result: Result change mysql-test/r/binlog_stm_mix_innodb_myisam.result: Result change mysql-test/r/ctype_cp932_binlog_row.result: Result change mysql-test/t/binlog_stm_mix_innodb_myisam.test: Binlog position change. mysql-test/t/ctype_cp932_binlog_stm.test: Binlog position change. mysql-test/t/mysqlbinlog.test: Binlog position change. mysql-test/t/mysqlbinlog2.test: Binlog position change. mysql-test/t/rpl_loaddata_s.test: Binlog position change. mysql-test/t/rpl_log_pos.test: Binlog position change. mysql-test/t/rpl_row_basic_11bugs.test: Binlog position change. mysql-test/t/rpl_row_create_table.test: Binlog position change. mysql-test/t/rpl_row_flsh_tbls.test: Binlog position change. mysql-test/t/rpl_row_mysqlbinlog.test: Binlog position change. mysql-test/t/rpl_sp.test: Binlog position change. mysql-test/t/rpl_stm_flsh_tbls.test: Binlog position change. mysql-test/t/rpl_switch_stm_row_mixed.test: Binlog position change. mysql-test/t/user_var-binlog.test: Binlog position change. sql/share/errmsg.txt: Merging error messages
2007-03-29 21:38:03 +02:00
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
Post merge fixes of result files. mysql-test/r/binlog_stm_binlog.result: Result change. mysql-test/r/binlog_stm_ctype_ucs.result: Result change. mysql-test/r/binlog_stm_insert_select.result: Result change. mysql-test/r/ctype_cp932_binlog_stm.result: Result change. mysql-test/r/flush_block_commit_notembedded.result: Result change. mysql-test/r/rpl_000015.result: Result change. mysql-test/r/rpl_change_master.result: Result change. mysql-test/r/rpl_deadlock_innodb.result: Result change. mysql-test/r/rpl_flushlog_loop.result: Result change. mysql-test/r/rpl_known_bugs_detection.result: Result change. mysql-test/r/rpl_loaddata.result: Result change. mysql-test/r/rpl_loaddata_s.result: Result change. mysql-test/r/rpl_log_pos.result: Result change. mysql-test/r/rpl_rbr_to_sbr.result: Result change. mysql-test/r/rpl_rotate_logs.result: Result change. mysql-test/r/rpl_row_max_relay_size.result: Result change. mysql-test/r/rpl_server_id1.result: Result change. mysql-test/r/rpl_server_id2.result: Result change. mysql-test/r/rpl_sp.result: Result change. mysql-test/r/rpl_stm_charset.result: Result change. mysql-test/r/rpl_stm_flsh_tbls.result: Result change. mysql-test/r/rpl_stm_log.result: Result change. mysql-test/r/rpl_stm_max_relay_size.result: Result change. mysql-test/r/rpl_stm_multi_query.result: Result change. mysql-test/r/rpl_stm_reset_slave.result: Result change. mysql-test/r/rpl_stm_until.result: Result change. mysql-test/r/rpl_switch_stm_row_mixed.result: Result change. mysql-test/r/rpl_truncate_2myisam.result: Result change. mysql-test/r/rpl_truncate_3innodb.result: Result change. mysql-test/r/rpl_truncate_7ndb.result: Result change. mysql-test/r/user_var-binlog.result: Result change.
2007-03-30 04:44:49 +02:00
master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=innodb
master-bin.000001 # Query # # use `test`; create table t2 (a int) engine=innodb
master-bin.000001 # Query # # BEGIN
Post merge fixes of result files. mysql-test/r/binlog_stm_binlog.result: Result change. mysql-test/r/binlog_stm_ctype_ucs.result: Result change. mysql-test/r/binlog_stm_insert_select.result: Result change. mysql-test/r/ctype_cp932_binlog_stm.result: Result change. mysql-test/r/flush_block_commit_notembedded.result: Result change. mysql-test/r/rpl_000015.result: Result change. mysql-test/r/rpl_change_master.result: Result change. mysql-test/r/rpl_deadlock_innodb.result: Result change. mysql-test/r/rpl_flushlog_loop.result: Result change. mysql-test/r/rpl_known_bugs_detection.result: Result change. mysql-test/r/rpl_loaddata.result: Result change. mysql-test/r/rpl_loaddata_s.result: Result change. mysql-test/r/rpl_log_pos.result: Result change. mysql-test/r/rpl_rbr_to_sbr.result: Result change. mysql-test/r/rpl_rotate_logs.result: Result change. mysql-test/r/rpl_row_max_relay_size.result: Result change. mysql-test/r/rpl_server_id1.result: Result change. mysql-test/r/rpl_server_id2.result: Result change. mysql-test/r/rpl_sp.result: Result change. mysql-test/r/rpl_stm_charset.result: Result change. mysql-test/r/rpl_stm_flsh_tbls.result: Result change. mysql-test/r/rpl_stm_log.result: Result change. mysql-test/r/rpl_stm_max_relay_size.result: Result change. mysql-test/r/rpl_stm_multi_query.result: Result change. mysql-test/r/rpl_stm_reset_slave.result: Result change. mysql-test/r/rpl_stm_until.result: Result change. mysql-test/r/rpl_switch_stm_row_mixed.result: Result change. mysql-test/r/rpl_truncate_2myisam.result: Result change. mysql-test/r/rpl_truncate_3innodb.result: Result change. mysql-test/r/rpl_truncate_7ndb.result: Result change. mysql-test/r/user_var-binlog.result: Result change.
2007-03-30 04:44:49 +02:00
master-bin.000001 # Query # # use `test`; insert t1 values (5)
- Fixing binary log positions - Eliminating some compiler warnings mysql-test/extra/binlog_tests/blackhole.test: Using include file for SHOW BINLOG EVENTS. mysql-test/extra/binlog_tests/drop_temp_table.test: Using include file for SHOW BINLOG EVENTS. mysql-test/extra/binlog_tests/insert_select-binlog.test: Using include file for SHOW BINLOG EVENTS. mysql-test/extra/rpl_tests/rpl_log.test: Using include file for SHOW BINLOG EVENTS. mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test: Using include file for SHOW BINLOG EVENTS. mysql-test/extra/rpl_tests/rpl_truncate_helper.test: Using include file for SHOW BINLOG EVENTS. mysql-test/include/show_binlog_events.inc: Fixing regex replace to handle XIDs as well. mysql-test/r/binlog_row_binlog.result: Result change mysql-test/r/binlog_row_blackhole.result: Result change mysql-test/r/binlog_row_ctype_ucs.result: Result change mysql-test/r/binlog_row_drop_tmp_tbl.result: Result change mysql-test/r/binlog_row_insert_select.result: Result change mysql-test/r/binlog_row_mix_innodb_myisam.result: Result change mysql-test/r/binlog_stm_binlog.result: Result change mysql-test/r/binlog_stm_blackhole.result: Result change mysql-test/r/binlog_stm_drop_tmp_tbl.result: Result change mysql-test/r/binlog_stm_insert_select.result: Result change mysql-test/r/binlog_stm_mix_innodb_myisam.result: Result change mysql-test/r/ctype_cp932_binlog_row.result: Result change mysql-test/r/rpl_ndb_charset.result: Result change mysql-test/r/rpl_ndb_log.result: Result change mysql-test/r/rpl_ndb_multi.result: Result change mysql-test/r/rpl_row_basic_11bugs.result: Result change mysql-test/r/rpl_row_charset.result: Result change mysql-test/r/rpl_row_create_table.result: Result change mysql-test/r/rpl_row_delayed_ins.result: Result change mysql-test/r/rpl_row_drop.result: Result change mysql-test/r/rpl_row_flsh_tbls.result: Result change mysql-test/r/rpl_row_inexist_tbl.result: Result change mysql-test/r/rpl_row_log.result: Result change mysql-test/r/rpl_row_log_innodb.result: Result change mysql-test/r/rpl_row_reset_slave.result: Result change mysql-test/r/rpl_row_until.result: Result change mysql-test/r/rpl_stm_log.result: Result change mysql-test/r/rpl_truncate_2myisam.result: Result change mysql-test/r/rpl_truncate_3innodb.result: Result change mysql-test/r/rpl_udf.result: Result change mysql-test/t/binlog_row_mix_innodb_myisam.test: Fixing binary log position mysql-test/t/binlog_stm_mix_innodb_myisam.test: Fixing binary log position. sql/log_event.cc: Eliminating compiler warnings.
2007-03-30 10:27:08 +02:00
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN
Post merge fixes of result files. mysql-test/r/binlog_stm_binlog.result: Result change. mysql-test/r/binlog_stm_ctype_ucs.result: Result change. mysql-test/r/binlog_stm_insert_select.result: Result change. mysql-test/r/ctype_cp932_binlog_stm.result: Result change. mysql-test/r/flush_block_commit_notembedded.result: Result change. mysql-test/r/rpl_000015.result: Result change. mysql-test/r/rpl_change_master.result: Result change. mysql-test/r/rpl_deadlock_innodb.result: Result change. mysql-test/r/rpl_flushlog_loop.result: Result change. mysql-test/r/rpl_known_bugs_detection.result: Result change. mysql-test/r/rpl_loaddata.result: Result change. mysql-test/r/rpl_loaddata_s.result: Result change. mysql-test/r/rpl_log_pos.result: Result change. mysql-test/r/rpl_rbr_to_sbr.result: Result change. mysql-test/r/rpl_rotate_logs.result: Result change. mysql-test/r/rpl_row_max_relay_size.result: Result change. mysql-test/r/rpl_server_id1.result: Result change. mysql-test/r/rpl_server_id2.result: Result change. mysql-test/r/rpl_sp.result: Result change. mysql-test/r/rpl_stm_charset.result: Result change. mysql-test/r/rpl_stm_flsh_tbls.result: Result change. mysql-test/r/rpl_stm_log.result: Result change. mysql-test/r/rpl_stm_max_relay_size.result: Result change. mysql-test/r/rpl_stm_multi_query.result: Result change. mysql-test/r/rpl_stm_reset_slave.result: Result change. mysql-test/r/rpl_stm_until.result: Result change. mysql-test/r/rpl_switch_stm_row_mixed.result: Result change. mysql-test/r/rpl_truncate_2myisam.result: Result change. mysql-test/r/rpl_truncate_3innodb.result: Result change. mysql-test/r/rpl_truncate_7ndb.result: Result change. mysql-test/r/user_var-binlog.result: Result change.
2007-03-30 04:44:49 +02:00
master-bin.000001 # Query # # use `test`; insert t2 values (5)
- Fixing binary log positions - Eliminating some compiler warnings mysql-test/extra/binlog_tests/blackhole.test: Using include file for SHOW BINLOG EVENTS. mysql-test/extra/binlog_tests/drop_temp_table.test: Using include file for SHOW BINLOG EVENTS. mysql-test/extra/binlog_tests/insert_select-binlog.test: Using include file for SHOW BINLOG EVENTS. mysql-test/extra/rpl_tests/rpl_log.test: Using include file for SHOW BINLOG EVENTS. mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test: Using include file for SHOW BINLOG EVENTS. mysql-test/extra/rpl_tests/rpl_truncate_helper.test: Using include file for SHOW BINLOG EVENTS. mysql-test/include/show_binlog_events.inc: Fixing regex replace to handle XIDs as well. mysql-test/r/binlog_row_binlog.result: Result change mysql-test/r/binlog_row_blackhole.result: Result change mysql-test/r/binlog_row_ctype_ucs.result: Result change mysql-test/r/binlog_row_drop_tmp_tbl.result: Result change mysql-test/r/binlog_row_insert_select.result: Result change mysql-test/r/binlog_row_mix_innodb_myisam.result: Result change mysql-test/r/binlog_stm_binlog.result: Result change mysql-test/r/binlog_stm_blackhole.result: Result change mysql-test/r/binlog_stm_drop_tmp_tbl.result: Result change mysql-test/r/binlog_stm_insert_select.result: Result change mysql-test/r/binlog_stm_mix_innodb_myisam.result: Result change mysql-test/r/ctype_cp932_binlog_row.result: Result change mysql-test/r/rpl_ndb_charset.result: Result change mysql-test/r/rpl_ndb_log.result: Result change mysql-test/r/rpl_ndb_multi.result: Result change mysql-test/r/rpl_row_basic_11bugs.result: Result change mysql-test/r/rpl_row_charset.result: Result change mysql-test/r/rpl_row_create_table.result: Result change mysql-test/r/rpl_row_delayed_ins.result: Result change mysql-test/r/rpl_row_drop.result: Result change mysql-test/r/rpl_row_flsh_tbls.result: Result change mysql-test/r/rpl_row_inexist_tbl.result: Result change mysql-test/r/rpl_row_log.result: Result change mysql-test/r/rpl_row_log_innodb.result: Result change mysql-test/r/rpl_row_reset_slave.result: Result change mysql-test/r/rpl_row_until.result: Result change mysql-test/r/rpl_stm_log.result: Result change mysql-test/r/rpl_truncate_2myisam.result: Result change mysql-test/r/rpl_truncate_3innodb.result: Result change mysql-test/r/rpl_udf.result: Result change mysql-test/t/binlog_row_mix_innodb_myisam.test: Fixing binary log position mysql-test/t/binlog_stm_mix_innodb_myisam.test: Fixing binary log position. sql/log_event.cc: Eliminating compiler warnings.
2007-03-30 10:27:08 +02:00
master-bin.000001 # Xid # # COMMIT /* XID */
drop table t1,t2;
reset master;
create table t1 (n int) engine=innodb;
begin;
commit;
drop table t1;
show binlog events in 'master-bin.000001' from 107;
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)
WL#1012: All changes as one single changeset. This includes both code and test cases. BitKeeper/deleted/.del-ctype_ucs_binlog.result~280d136b1a0bcf17: Delete: mysql-test/r/ctype_ucs_binlog.result BitKeeper/deleted/.del-rpl_delete_all.result~7c050d592614b3f: Delete: mysql-test/r/rpl_delete_all.result BitKeeper/deleted/.del-rpl000013-slave.opt~18266ad8a2403e8d: Delete: mysql-test/t/rpl000013-slave.opt BitKeeper/deleted/.del-rpl_delete_all.test~700a1490277780e0: Delete: mysql-test/t/rpl_delete_all.test mysql-test/extra/binlog_tests/binlog.test: Import patch wl1012.patch mysql-test/extra/binlog_tests/blackhole.test: Import patch wl1012.patch mysql-test/extra/binlog_tests/ctype_cp932.test: Import patch wl1012.patch mysql-test/extra/binlog_tests/ctype_cp932_binlog.test: Import patch wl1012.patch mysql-test/extra/binlog_tests/ctype_ucs_binlog.test: Import patch wl1012.patch mysql-test/extra/binlog_tests/drop_temp_table.test: Import patch wl1012.patch mysql-test/extra/binlog_tests/insert_select-binlog.test: Import patch wl1012.patch mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test: Import patch wl1012.patch mysql-test/extra/rpl_tests/rpl_ddl.test: Import patch wl1012.patch mysql-test/extra/rpl_tests/rpl_deadlock.test: Import patch wl1012.patch mysql-test/extra/rpl_tests/rpl_err_ignoredtable.test: Import patch wl1012.patch mysql-test/extra/rpl_tests/rpl_flsh_tbls.test: Import patch wl1012.patch mysql-test/extra/rpl_tests/rpl_loaddata_m.test: Import patch wl1012.patch mysql-test/extra/rpl_tests/rpl_log.test: Import patch wl1012.patch mysql-test/extra/rpl_tests/rpl_max_relay_size.test: Import patch wl1012.patch mysql-test/extra/rpl_tests/rpl_multi_query.test: Import patch wl1012.patch mysql-test/extra/rpl_tests/rpl_reset_slave.test: Import patch wl1012.patch mysql-test/extra/rpl_tests/rpl_stm_000001.test: Import patch wl1012.patch mysql-test/extra/rpl_tests/rpl_stm_EE_err.test: Import patch wl1012.patch mysql-test/extra/rpl_tests/rpl_stm_charset.test: Import patch wl1012.patch mysql-test/extra/rpl_tests/rpl_user_variables.test: Import patch wl1012.patch mysql-test/r/binlog_stm_binlog.result: Import patch wl1012.patch mysql-test/r/binlog_stm_blackhole.result: Import patch wl1012.patch mysql-test/r/binlog_stm_ctype_cp932.result: Import patch wl1012.patch mysql-test/r/binlog_stm_ctype_ucs.result: Import patch wl1012.patch mysql-test/r/binlog_stm_drop_tmp_tbl.result: Import patch wl1012.patch mysql-test/r/binlog_stm_insert_select.result: Import patch wl1012.patch mysql-test/r/binlog_stm_mix_innodb_myisam.result: Import patch wl1012.patch mysql-test/r/rpl_000012.result: Import patch wl1012.patch mysql-test/r/rpl_000015.result: Import patch wl1012.patch mysql-test/r/rpl_deadlock_innodb.result: Import patch wl1012.patch mysql-test/r/rpl_flushlog_loop.result: Import patch wl1012.patch mysql-test/r/rpl_loaddata_s.result: Import patch wl1012.patch mysql-test/r/rpl_stm_000001.result: Import patch wl1012.patch mysql-test/r/rpl_stm_EE_err.result: Import patch wl1012.patch mysql-test/r/rpl_stm_charset.result: Import patch wl1012.patch mysql-test/r/rpl_stm_ddl.result: Import patch wl1012.patch mysql-test/r/rpl_stm_err_ignoredtable.result: Import patch wl1012.patch mysql-test/r/rpl_stm_flsh_tbls.result: Import patch wl1012.patch mysql-test/r/rpl_stm_loaddata_m.result: Import patch wl1012.patch mysql-test/r/rpl_stm_log.result: Import patch wl1012.patch mysql-test/r/rpl_stm_max_relay_size.result: Import patch wl1012.patch mysql-test/r/rpl_stm_multi_query.result: Import patch wl1012.patch mysql-test/r/rpl_stm_mystery22.result: Import patch wl1012.patch mysql-test/r/rpl_stm_reset_slave.result: Import patch wl1012.patch mysql-test/r/rpl_stm_rewrt_db.result: Import patch wl1012.patch mysql-test/r/rpl_stm_sp.result: Import patch wl1012.patch mysql-test/r/rpl_stm_timezone.result: Import patch wl1012.patch mysql-test/r/rpl_stm_until.result: Import patch wl1012.patch mysql-test/r/rpl_stm_user_variables.result: Import patch wl1012.patch mysql-test/r/rpl_stm_view.result: Import patch wl1012.patch mysql-test/t/binlog_row_binlog-master.opt: Import patch wl1012.patch mysql-test/t/rpl_000012.test: Import patch wl1012.patch mysql-test/t/rpl_000015-slave.sh: Import patch wl1012.patch mysql-test/t/rpl_000015.slave-mi: Import patch wl1012.patch mysql-test/t/rpl_000015.test: Import patch wl1012.patch mysql-test/t/rpl_deadlock_innodb-slave.opt: Import patch wl1012.patch mysql-test/t/rpl_flushlog_loop-master.opt: Import patch wl1012.patch mysql-test/t/rpl_flushlog_loop-master.sh: Import patch wl1012.patch mysql-test/t/rpl_flushlog_loop-slave.opt: Import patch wl1012.patch mysql-test/t/rpl_flushlog_loop-slave.sh: Import patch wl1012.patch mysql-test/t/rpl_flushlog_loop.test: Import patch wl1012.patch mysql-test/t/rpl_loaddata_s-slave.opt: Import patch wl1012.patch mysql-test/t/rpl_loaddata_s.test: Import patch wl1012.patch mysql-test/t/rpl_stm_000001-slave.opt: Import patch wl1012.patch mysql-test/t/rpl_stm_err_ignoredtable-slave.opt: Import patch wl1012.patch mysql-test/t/rpl_stm_loaddata_m-master.opt: Import patch wl1012.patch mysql-test/t/rpl_stm_log-master.opt: Import patch wl1012.patch mysql-test/t/rpl_stm_log-slave.opt: Import patch wl1012.patch mysql-test/t/rpl_stm_mystery22.test: Import patch wl1012.patch mysql-test/t/rpl_stm_rewrt_db-slave.opt: Import patch wl1012.patch mysql-test/t/rpl_stm_rewrt_db.test: Import patch wl1012.patch mysql-test/t/rpl_stm_sp-master.opt: Import patch wl1012.patch mysql-test/t/rpl_stm_sp-slave.opt: Import patch wl1012.patch mysql-test/t/rpl_stm_sp.test: Import patch wl1012.patch mysql-test/t/rpl_stm_timezone-master.opt: Import patch wl1012.patch mysql-test/t/rpl_stm_timezone-slave.opt: Import patch wl1012.patch BUILD/SETUP.sh: Import patch wl1012.patch Makefile.am: Import patch wl1012.patch mysql-test/t/rpl_stm_timezone.test: Import patch wl1012.patch mysql-test/t/rpl_stm_until.test: Import patch wl1012.patch mysql-test/t/rpl_stm_view.test: Import patch wl1012.patch client/Makefile.am: Import patch wl1012.patch client/client_priv.h: Import patch wl1012.patch client/mysqlbinlog.cc: Import patch wl1012.patch configure.in: Import patch wl1012.patch include/Makefile.am: Import patch wl1012.patch include/base64.h: Import patch wl1012.patch include/config-win.h: Import patch wl1012.patch include/my_base.h: Import patch wl1012.patch include/my_global.h: Import patch wl1012.patch mysql-test/Makefile.am: Import patch wl1012.patch mysql-test/mysql-test-run.pl: Import patch wl1012.patch mysql-test/mysql-test-run.sh: Import patch wl1012.patch mysql-test/r/date_formats.result: Import patch wl1012.patch mysql-test/r/flush_block_commit.result: Import patch wl1012.patch mysql-test/r/innodb.result: Import patch wl1012.patch mysql-test/r/rpl000017.result: Import patch wl1012.patch mysql-test/r/rpl_change_master.result: Import patch wl1012.patch mysql-test/r/rpl_commit_after_flush.result: Import patch wl1012.patch mysql-test/r/rpl_create_database.result: Import patch wl1012.patch mysql-test/r/rpl_do_grant.result: Import patch wl1012.patch mysql-test/r/rpl_loaddata.result: Import patch wl1012.patch mysql-test/r/rpl_log_pos.result: Import patch wl1012.patch mysql-test/r/rpl_multi_delete.result: Import patch wl1012.patch mysql-test/r/rpl_multi_update.result: Import patch wl1012.patch mysql-test/r/rpl_openssl.result: Import patch wl1012.patch mysql-test/r/rpl_replicate_do.result: Import patch wl1012.patch mysql-test/r/rpl_rotate_logs.result: Import patch wl1012.patch mysql-test/r/rpl_server_id1.result: Import patch wl1012.patch mysql-test/r/rpl_server_id2.result: Import patch wl1012.patch mysql-test/r/rpl_temporary.result: Import patch wl1012.patch mysql-test/r/user_var-binlog.result: Import patch wl1012.patch mysql-test/t/create_select_tmp.test: Import patch wl1012.patch mysql-test/t/date_formats.test: Import patch wl1012.patch mysql-test/t/disabled.def: Import patch wl1012.patch mysql-test/t/innodb.test: Import patch wl1012.patch mysql-test/t/mysqlbinlog.test: Import patch wl1012.patch mysql-test/t/mysqlbinlog2.test: Import patch wl1012.patch mysql-test/t/rpl000002.test: Import patch wl1012.patch mysql-test/t/rpl000006.test: Import patch wl1012.patch mysql-test/t/rpl000013.test: Import patch wl1012.patch mysql-test/t/rpl000017.test: Import patch wl1012.patch mysql-test/t/rpl_auto_increment.test: Import patch wl1012.patch mysql-test/t/rpl_change_master.test: Import patch wl1012.patch mysql-test/t/rpl_commit_after_flush.test: Import patch wl1012.patch mysql-test/t/rpl_create_database.test: Import patch wl1012.patch mysql-test/t/rpl_do_grant.test: Import patch wl1012.patch mysql-test/t/rpl_drop.test: Import patch wl1012.patch mysql-test/t/rpl_empty_master_crash.test: Import patch wl1012.patch mysql-test/t/rpl_failed_optimize.test: Import patch wl1012.patch mysql-test/t/rpl_heap.test: Import patch wl1012.patch mysql-test/t/rpl_insert_id.test: Import patch wl1012.patch mysql-test/t/rpl_insert_ignore.test: Import patch wl1012.patch mysql-test/t/rpl_loaddata.test: Import patch wl1012.patch mysql-test/t/rpl_log_pos.test: Import patch wl1012.patch mysql-test/t/rpl_multi_delete.test: Import patch wl1012.patch mysql-test/t/rpl_multi_update.test: Import patch wl1012.patch mysql-test/t/rpl_multi_update2.test: Import patch wl1012.patch mysql-test/t/rpl_multi_update3.test: Import patch wl1012.patch mysql-test/t/rpl_openssl.test: Import patch wl1012.patch mysql-test/t/rpl_redirect.test: Import patch wl1012.patch mysql-test/t/rpl_relayrotate.test: Import patch wl1012.patch mysql-test/t/rpl_replicate_do.test: Import patch wl1012.patch mysql-test/t/rpl_rotate_logs.test: Import patch wl1012.patch mysql-test/t/rpl_server_id1.test: Import patch wl1012.patch mysql-test/t/rpl_sp_effects.test: Import patch wl1012.patch mysql-test/t/rpl_temporary.test: Import patch wl1012.patch mysql-test/t/rpl_trigger.test: Import patch wl1012.patch mysql-test/t/sp.test: Import patch wl1012.patch mysql-test/t/user_var-binlog.test: Import patch wl1012.patch mysys/Makefile.am: Import patch wl1012.patch mysys/base64.c: Import patch wl1012.patch sql/Makefile.am: Import patch wl1012.patch sql/ha_innodb.cc: Import patch wl1012.patch sql/ha_innodb.h: Import patch wl1012.patch sql/ha_partition.cc: Import patch wl1012.patch sql/handler.cc: Import patch wl1012.patch sql/handler.h: Import patch wl1012.patch sql/item_sum.cc: Import patch wl1012.patch sql/log.cc: Import patch wl1012.patch sql/log_event.cc: Import patch wl1012.patch sql/log_event.h: Import patch wl1012.patch sql/mysql_priv.h: Import patch wl1012.patch sql/mysqld.cc: Import patch wl1012.patch sql/rpl_filter.h: Import patch wl1012.patch sql/set_var.cc: Import patch wl1012.patch sql/share/errmsg.txt: Import patch wl1012.patch sql/slave.cc: Import patch wl1012.patch sql/slave.h: Import patch wl1012.patch sql/sp.cc: Import patch wl1012.patch sql/sp_head.cc: Import patch wl1012.patch sql/sql_acl.cc: Import patch wl1012.patch sql/sql_base.cc: Import patch wl1012.patch sql/sql_class.cc: Import patch wl1012.patch sql/sql_class.h: Import patch wl1012.patch sql/sql_delete.cc: Import patch wl1012.patch sql/sql_insert.cc: Import patch wl1012.patch sql/sql_lex.h: Import patch wl1012.patch sql/sql_list.h: Import patch wl1012.patch sql/sql_load.cc: Import patch wl1012.patch sql/sql_parse.cc: Import patch wl1012.patch sql/sql_plugin.cc: Import patch wl1012.patch sql/sql_rename.cc: Import patch wl1012.patch sql/sql_repl.h: Import patch wl1012.patch sql/sql_select.cc: Import patch wl1012.patch sql/sql_show.cc: Import patch wl1012.patch sql/sql_table.cc: Import patch wl1012.patch sql/sql_udf.cc: Import patch wl1012.patch sql/sql_union.cc: Import patch wl1012.patch sql/sql_update.cc: Import patch wl1012.patch sql/sql_yacc.yy: Import patch wl1012.patch sql/table.cc: Import patch wl1012.patch sql/table.h: Import patch wl1012.patch storage/innobase/include/lock0lock.h: Import patch wl1012.patch storage/innobase/include/row0mysql.h: Import patch wl1012.patch storage/innobase/include/row0vers.h: Import patch wl1012.patch storage/innobase/lock/lock0lock.c: Import patch wl1012.patch storage/innobase/row/row0mysql.c: Import patch wl1012.patch storage/innobase/row/row0sel.c: Import patch wl1012.patch storage/innobase/row/row0vers.c: Import patch wl1012.patch
2005-12-22 06:39:02 +01:00
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 107;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000002 # Query 1 # use `test`; drop table t1
Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB fix binlog-writing so that end_log_pos is given correctly even within transactions for both SHOW BINLOG and SHOW MASTER STATUS, that is as absolute values (from log start) rather than relative values (from transaction's start). --- Merge sin.intern.azundris.com:/home/tnurnberg/22540/50-22540 into sin.intern.azundris.com:/home/tnurnberg/22540/51-22540 --- Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint into sin.intern.azundris.com:/home/tnurnberg/22540/51-22540 mysql-test/extra/binlog_tests/binlog.test: Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB show that end_log_pos in SHOW BINLOG EVENTS is correct even in transactions. show that SHOW MASTER STATUS returns correct values while in transactions (so that mysqldump --master-data will work correctly). also remove bdb dependency. manual merge mysql-test/r/binlog_stm_binlog.result: Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB show that end_log_pos in SHOW BINLOG EVENTS is correct even in transactions. show that SHOW MASTER STATUS returns correct values while in transactions (so that mysqldump --master-data will work correctly). also remove bdb dependency. manual merge sql/log.cc: Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB fix output for SHOW BINLOG EVENTS so that end_log_pos is given correctly even within transactions. do this by rewriting the commit-buffer in place. manual merge
2007-06-25 11:37:10 +02:00
set @ac = @@autocommit;
set autocommit= 0;
reset master;
create table t1(n int) engine=innodb;
begin;
insert into t1 values (1);
insert into t1 values (2);
insert into t1 values (3);
commit;
drop table t1;
show binlog events from 0;
Log_name Pos Event_type Server_id End_log_pos Info
2009-10-01 18:44:53 +02:00
master-bin.000001 4 Format_desc 1 107 Server version, Binlog ver: 4
master-bin.000001 107 Query 1 206 use `test`; create table t1(n int) engine=innodb
master-bin.000001 206 Query 1 274 BEGIN
master-bin.000001 274 Query 1 362 use `test`; insert into t1 values (1)
master-bin.000001 362 Query 1 450 use `test`; insert into t1 values (2)
master-bin.000001 450 Query 1 538 use `test`; insert into t1 values (3)
master-bin.000001 538 Xid 1 565 COMMIT /* XID */
master-bin.000001 565 Query 1 641 use `test`; drop table t1
Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB previous correction didn't. make sure "tail" is fixed up when filling cache several times; rework formulae. --- Merge sin.intern.azundris.com:/home/tnurnberg/22540/50-22540 into sin.intern.azundris.com:/home/tnurnberg/22540/51-22540 mysql-test/extra/binlog_tests/binlog.test: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB show that fix for absolute end_log_pos in binlog also works when cache is read several times and headers are split across that boundary show that end_log_pos in SHOW BINLOG EVENTS is correct even in transactions. show that SHOW MASTER STATUS returns correct values while in transactions (so that mysqldump --master-data will work correctly). also remove bdb dependency. mysql-test/r/binlog_row_binlog.result: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB show that fix for absolute end_log_pos in binlog also works when cache is read several times and headers are split across that boundary show that end_log_pos in SHOW BINLOG EVENTS is correct even in transactions. show that SHOW MASTER STATUS returns correct values while in transactions (so that mysqldump --master-data will work correctly). also remove bdb dependency. mysql-test/r/binlog_stm_binlog.result: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB show that fix for absolute end_log_pos in binlog also works when cache is read several times and headers are split across that boundary show that end_log_pos in SHOW BINLOG EVENTS is correct even in transactions. show that SHOW MASTER STATUS returns correct values while in transactions (so that mysqldump --master-data will work correctly). also remove bdb dependency. mysql-test/r/rpl_row_create_table.result: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB expect corrent end_log_pos in binlog sql/log.cc: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB previous correction didn't. make sure "tail" is fixed up when filling cache several times; rework formulae.
2007-06-30 03:32:33 +02:00
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;
Log_name Pos Event_type Server_id End_log_pos Info
2009-10-01 18:44:53 +02:00
master-bin.000001 4 Format_desc 1 107 Server version, Binlog ver: 4
master-bin.000001 107 Query 1 207 use `test`; create table t1 (a int) engine=innodb
master-bin.000001 207 Query 1 275 BEGIN
master-bin.000001 275 Query 1 366 use `test`; insert into t1 values( 400 )
master-bin.000001 366 Query 1 457 use `test`; insert into t1 values( 399 )
master-bin.000001 457 Query 1 548 use `test`; insert into t1 values( 398 )
master-bin.000001 548 Query 1 639 use `test`; insert into t1 values( 397 )
master-bin.000001 639 Query 1 730 use `test`; insert into t1 values( 396 )
master-bin.000001 730 Query 1 821 use `test`; insert into t1 values( 395 )
master-bin.000001 821 Query 1 912 use `test`; insert into t1 values( 394 )
master-bin.000001 912 Query 1 1003 use `test`; insert into t1 values( 393 )
master-bin.000001 1003 Query 1 1094 use `test`; insert into t1 values( 392 )
master-bin.000001 1094 Query 1 1185 use `test`; insert into t1 values( 391 )
master-bin.000001 1185 Query 1 1276 use `test`; insert into t1 values( 390 )
master-bin.000001 1276 Query 1 1367 use `test`; insert into t1 values( 389 )
master-bin.000001 1367 Query 1 1458 use `test`; insert into t1 values( 388 )
master-bin.000001 1458 Query 1 1549 use `test`; insert into t1 values( 387 )
master-bin.000001 1549 Query 1 1640 use `test`; insert into t1 values( 386 )
master-bin.000001 1640 Query 1 1731 use `test`; insert into t1 values( 385 )
master-bin.000001 1731 Query 1 1822 use `test`; insert into t1 values( 384 )
master-bin.000001 1822 Query 1 1913 use `test`; insert into t1 values( 383 )
master-bin.000001 1913 Query 1 2004 use `test`; insert into t1 values( 382 )
master-bin.000001 2004 Query 1 2095 use `test`; insert into t1 values( 381 )
master-bin.000001 2095 Query 1 2186 use `test`; insert into t1 values( 380 )
master-bin.000001 2186 Query 1 2277 use `test`; insert into t1 values( 379 )
master-bin.000001 2277 Query 1 2368 use `test`; insert into t1 values( 378 )
master-bin.000001 2368 Query 1 2459 use `test`; insert into t1 values( 377 )
master-bin.000001 2459 Query 1 2550 use `test`; insert into t1 values( 376 )
master-bin.000001 2550 Query 1 2641 use `test`; insert into t1 values( 375 )
master-bin.000001 2641 Query 1 2732 use `test`; insert into t1 values( 374 )
master-bin.000001 2732 Query 1 2823 use `test`; insert into t1 values( 373 )
master-bin.000001 2823 Query 1 2914 use `test`; insert into t1 values( 372 )
master-bin.000001 2914 Query 1 3005 use `test`; insert into t1 values( 371 )
master-bin.000001 3005 Query 1 3096 use `test`; insert into t1 values( 370 )
master-bin.000001 3096 Query 1 3187 use `test`; insert into t1 values( 369 )
master-bin.000001 3187 Query 1 3278 use `test`; insert into t1 values( 368 )
master-bin.000001 3278 Query 1 3369 use `test`; insert into t1 values( 367 )
master-bin.000001 3369 Query 1 3460 use `test`; insert into t1 values( 366 )
master-bin.000001 3460 Query 1 3551 use `test`; insert into t1 values( 365 )
master-bin.000001 3551 Query 1 3642 use `test`; insert into t1 values( 364 )
master-bin.000001 3642 Query 1 3733 use `test`; insert into t1 values( 363 )
master-bin.000001 3733 Query 1 3824 use `test`; insert into t1 values( 362 )
master-bin.000001 3824 Query 1 3915 use `test`; insert into t1 values( 361 )
master-bin.000001 3915 Query 1 4006 use `test`; insert into t1 values( 360 )
master-bin.000001 4006 Query 1 4097 use `test`; insert into t1 values( 359 )
master-bin.000001 4097 Query 1 4188 use `test`; insert into t1 values( 358 )
master-bin.000001 4188 Query 1 4279 use `test`; insert into t1 values( 357 )
master-bin.000001 4279 Query 1 4370 use `test`; insert into t1 values( 356 )
master-bin.000001 4370 Query 1 4461 use `test`; insert into t1 values( 355 )
master-bin.000001 4461 Query 1 4552 use `test`; insert into t1 values( 354 )
master-bin.000001 4552 Query 1 4643 use `test`; insert into t1 values( 353 )
master-bin.000001 4643 Query 1 4734 use `test`; insert into t1 values( 352 )
master-bin.000001 4734 Query 1 4825 use `test`; insert into t1 values( 351 )
master-bin.000001 4825 Query 1 4916 use `test`; insert into t1 values( 350 )
master-bin.000001 4916 Query 1 5007 use `test`; insert into t1 values( 349 )
master-bin.000001 5007 Query 1 5098 use `test`; insert into t1 values( 348 )
master-bin.000001 5098 Query 1 5189 use `test`; insert into t1 values( 347 )
master-bin.000001 5189 Query 1 5280 use `test`; insert into t1 values( 346 )
master-bin.000001 5280 Query 1 5371 use `test`; insert into t1 values( 345 )
master-bin.000001 5371 Query 1 5462 use `test`; insert into t1 values( 344 )
master-bin.000001 5462 Query 1 5553 use `test`; insert into t1 values( 343 )
master-bin.000001 5553 Query 1 5644 use `test`; insert into t1 values( 342 )
master-bin.000001 5644 Query 1 5735 use `test`; insert into t1 values( 341 )
master-bin.000001 5735 Query 1 5826 use `test`; insert into t1 values( 340 )
master-bin.000001 5826 Query 1 5917 use `test`; insert into t1 values( 339 )
master-bin.000001 5917 Query 1 6008 use `test`; insert into t1 values( 338 )
master-bin.000001 6008 Query 1 6099 use `test`; insert into t1 values( 337 )
master-bin.000001 6099 Query 1 6190 use `test`; insert into t1 values( 336 )
master-bin.000001 6190 Query 1 6281 use `test`; insert into t1 values( 335 )
master-bin.000001 6281 Query 1 6372 use `test`; insert into t1 values( 334 )
master-bin.000001 6372 Query 1 6463 use `test`; insert into t1 values( 333 )
master-bin.000001 6463 Query 1 6554 use `test`; insert into t1 values( 332 )
master-bin.000001 6554 Query 1 6645 use `test`; insert into t1 values( 331 )
master-bin.000001 6645 Query 1 6736 use `test`; insert into t1 values( 330 )
master-bin.000001 6736 Query 1 6827 use `test`; insert into t1 values( 329 )
master-bin.000001 6827 Query 1 6918 use `test`; insert into t1 values( 328 )
master-bin.000001 6918 Query 1 7009 use `test`; insert into t1 values( 327 )
master-bin.000001 7009 Query 1 7100 use `test`; insert into t1 values( 326 )
master-bin.000001 7100 Query 1 7191 use `test`; insert into t1 values( 325 )
master-bin.000001 7191 Query 1 7282 use `test`; insert into t1 values( 324 )
master-bin.000001 7282 Query 1 7373 use `test`; insert into t1 values( 323 )
master-bin.000001 7373 Query 1 7464 use `test`; insert into t1 values( 322 )
master-bin.000001 7464 Query 1 7555 use `test`; insert into t1 values( 321 )
master-bin.000001 7555 Query 1 7646 use `test`; insert into t1 values( 320 )
master-bin.000001 7646 Query 1 7737 use `test`; insert into t1 values( 319 )
master-bin.000001 7737 Query 1 7828 use `test`; insert into t1 values( 318 )
master-bin.000001 7828 Query 1 7919 use `test`; insert into t1 values( 317 )
master-bin.000001 7919 Query 1 8010 use `test`; insert into t1 values( 316 )
master-bin.000001 8010 Query 1 8101 use `test`; insert into t1 values( 315 )
master-bin.000001 8101 Query 1 8192 use `test`; insert into t1 values( 314 )
master-bin.000001 8192 Query 1 8283 use `test`; insert into t1 values( 313 )
master-bin.000001 8283 Query 1 8374 use `test`; insert into t1 values( 312 )
master-bin.000001 8374 Query 1 8465 use `test`; insert into t1 values( 311 )
master-bin.000001 8465 Query 1 8556 use `test`; insert into t1 values( 310 )
master-bin.000001 8556 Query 1 8647 use `test`; insert into t1 values( 309 )
master-bin.000001 8647 Query 1 8738 use `test`; insert into t1 values( 308 )
master-bin.000001 8738 Query 1 8829 use `test`; insert into t1 values( 307 )
master-bin.000001 8829 Query 1 8920 use `test`; insert into t1 values( 306 )
master-bin.000001 8920 Query 1 9011 use `test`; insert into t1 values( 305 )
master-bin.000001 9011 Query 1 9102 use `test`; insert into t1 values( 304 )
master-bin.000001 9102 Query 1 9193 use `test`; insert into t1 values( 303 )
master-bin.000001 9193 Query 1 9284 use `test`; insert into t1 values( 302 )
master-bin.000001 9284 Query 1 9375 use `test`; insert into t1 values( 301 )
master-bin.000001 9375 Query 1 9466 use `test`; insert into t1 values( 300 )
master-bin.000001 9466 Query 1 9557 use `test`; insert into t1 values( 299 )
master-bin.000001 9557 Query 1 9648 use `test`; insert into t1 values( 298 )
master-bin.000001 9648 Query 1 9739 use `test`; insert into t1 values( 297 )
master-bin.000001 9739 Query 1 9830 use `test`; insert into t1 values( 296 )
master-bin.000001 9830 Query 1 9921 use `test`; insert into t1 values( 295 )
master-bin.000001 9921 Query 1 10012 use `test`; insert into t1 values( 294 )
master-bin.000001 10012 Query 1 10103 use `test`; insert into t1 values( 293 )
master-bin.000001 10103 Query 1 10194 use `test`; insert into t1 values( 292 )
master-bin.000001 10194 Query 1 10285 use `test`; insert into t1 values( 291 )
master-bin.000001 10285 Query 1 10376 use `test`; insert into t1 values( 290 )
master-bin.000001 10376 Query 1 10467 use `test`; insert into t1 values( 289 )
master-bin.000001 10467 Query 1 10558 use `test`; insert into t1 values( 288 )
master-bin.000001 10558 Query 1 10649 use `test`; insert into t1 values( 287 )
master-bin.000001 10649 Query 1 10740 use `test`; insert into t1 values( 286 )
master-bin.000001 10740 Query 1 10831 use `test`; insert into t1 values( 285 )
master-bin.000001 10831 Query 1 10922 use `test`; insert into t1 values( 284 )
master-bin.000001 10922 Query 1 11013 use `test`; insert into t1 values( 283 )
master-bin.000001 11013 Query 1 11104 use `test`; insert into t1 values( 282 )
master-bin.000001 11104 Query 1 11195 use `test`; insert into t1 values( 281 )
master-bin.000001 11195 Query 1 11286 use `test`; insert into t1 values( 280 )
master-bin.000001 11286 Query 1 11377 use `test`; insert into t1 values( 279 )
master-bin.000001 11377 Query 1 11468 use `test`; insert into t1 values( 278 )
master-bin.000001 11468 Query 1 11559 use `test`; insert into t1 values( 277 )
master-bin.000001 11559 Query 1 11650 use `test`; insert into t1 values( 276 )
master-bin.000001 11650 Query 1 11741 use `test`; insert into t1 values( 275 )
master-bin.000001 11741 Query 1 11832 use `test`; insert into t1 values( 274 )
master-bin.000001 11832 Query 1 11923 use `test`; insert into t1 values( 273 )
master-bin.000001 11923 Query 1 12014 use `test`; insert into t1 values( 272 )
master-bin.000001 12014 Query 1 12105 use `test`; insert into t1 values( 271 )
master-bin.000001 12105 Query 1 12196 use `test`; insert into t1 values( 270 )
master-bin.000001 12196 Query 1 12287 use `test`; insert into t1 values( 269 )
master-bin.000001 12287 Query 1 12378 use `test`; insert into t1 values( 268 )
master-bin.000001 12378 Query 1 12469 use `test`; insert into t1 values( 267 )
master-bin.000001 12469 Query 1 12560 use `test`; insert into t1 values( 266 )
master-bin.000001 12560 Query 1 12651 use `test`; insert into t1 values( 265 )
master-bin.000001 12651 Query 1 12742 use `test`; insert into t1 values( 264 )
master-bin.000001 12742 Query 1 12833 use `test`; insert into t1 values( 263 )
master-bin.000001 12833 Query 1 12924 use `test`; insert into t1 values( 262 )
master-bin.000001 12924 Query 1 13015 use `test`; insert into t1 values( 261 )
master-bin.000001 13015 Query 1 13106 use `test`; insert into t1 values( 260 )
master-bin.000001 13106 Query 1 13197 use `test`; insert into t1 values( 259 )
master-bin.000001 13197 Query 1 13288 use `test`; insert into t1 values( 258 )
master-bin.000001 13288 Query 1 13379 use `test`; insert into t1 values( 257 )
master-bin.000001 13379 Query 1 13470 use `test`; insert into t1 values( 256 )
master-bin.000001 13470 Query 1 13561 use `test`; insert into t1 values( 255 )
master-bin.000001 13561 Query 1 13652 use `test`; insert into t1 values( 254 )
master-bin.000001 13652 Query 1 13743 use `test`; insert into t1 values( 253 )
master-bin.000001 13743 Query 1 13834 use `test`; insert into t1 values( 252 )
master-bin.000001 13834 Query 1 13925 use `test`; insert into t1 values( 251 )
master-bin.000001 13925 Query 1 14016 use `test`; insert into t1 values( 250 )
master-bin.000001 14016 Query 1 14107 use `test`; insert into t1 values( 249 )
master-bin.000001 14107 Query 1 14198 use `test`; insert into t1 values( 248 )
master-bin.000001 14198 Query 1 14289 use `test`; insert into t1 values( 247 )
master-bin.000001 14289 Query 1 14380 use `test`; insert into t1 values( 246 )
master-bin.000001 14380 Query 1 14471 use `test`; insert into t1 values( 245 )
master-bin.000001 14471 Query 1 14562 use `test`; insert into t1 values( 244 )
master-bin.000001 14562 Query 1 14653 use `test`; insert into t1 values( 243 )
master-bin.000001 14653 Query 1 14744 use `test`; insert into t1 values( 242 )
master-bin.000001 14744 Query 1 14835 use `test`; insert into t1 values( 241 )
master-bin.000001 14835 Query 1 14926 use `test`; insert into t1 values( 240 )
master-bin.000001 14926 Query 1 15017 use `test`; insert into t1 values( 239 )
master-bin.000001 15017 Query 1 15108 use `test`; insert into t1 values( 238 )
master-bin.000001 15108 Query 1 15199 use `test`; insert into t1 values( 237 )
master-bin.000001 15199 Query 1 15290 use `test`; insert into t1 values( 236 )
master-bin.000001 15290 Query 1 15381 use `test`; insert into t1 values( 235 )
master-bin.000001 15381 Query 1 15472 use `test`; insert into t1 values( 234 )
master-bin.000001 15472 Query 1 15563 use `test`; insert into t1 values( 233 )
master-bin.000001 15563 Query 1 15654 use `test`; insert into t1 values( 232 )
master-bin.000001 15654 Query 1 15745 use `test`; insert into t1 values( 231 )
master-bin.000001 15745 Query 1 15836 use `test`; insert into t1 values( 230 )
master-bin.000001 15836 Query 1 15927 use `test`; insert into t1 values( 229 )
master-bin.000001 15927 Query 1 16018 use `test`; insert into t1 values( 228 )
master-bin.000001 16018 Query 1 16109 use `test`; insert into t1 values( 227 )
master-bin.000001 16109 Query 1 16200 use `test`; insert into t1 values( 226 )
master-bin.000001 16200 Query 1 16291 use `test`; insert into t1 values( 225 )
master-bin.000001 16291 Query 1 16382 use `test`; insert into t1 values( 224 )
master-bin.000001 16382 Query 1 16473 use `test`; insert into t1 values( 223 )
master-bin.000001 16473 Query 1 16564 use `test`; insert into t1 values( 222 )
master-bin.000001 16564 Query 1 16655 use `test`; insert into t1 values( 221 )
master-bin.000001 16655 Query 1 16746 use `test`; insert into t1 values( 220 )
master-bin.000001 16746 Query 1 16837 use `test`; insert into t1 values( 219 )
master-bin.000001 16837 Query 1 16928 use `test`; insert into t1 values( 218 )
master-bin.000001 16928 Query 1 17019 use `test`; insert into t1 values( 217 )
master-bin.000001 17019 Query 1 17110 use `test`; insert into t1 values( 216 )
master-bin.000001 17110 Query 1 17201 use `test`; insert into t1 values( 215 )
master-bin.000001 17201 Query 1 17292 use `test`; insert into t1 values( 214 )
master-bin.000001 17292 Query 1 17383 use `test`; insert into t1 values( 213 )
master-bin.000001 17383 Query 1 17474 use `test`; insert into t1 values( 212 )
master-bin.000001 17474 Query 1 17565 use `test`; insert into t1 values( 211 )
master-bin.000001 17565 Query 1 17656 use `test`; insert into t1 values( 210 )
master-bin.000001 17656 Query 1 17747 use `test`; insert into t1 values( 209 )
master-bin.000001 17747 Query 1 17838 use `test`; insert into t1 values( 208 )
master-bin.000001 17838 Query 1 17929 use `test`; insert into t1 values( 207 )
master-bin.000001 17929 Query 1 18020 use `test`; insert into t1 values( 206 )
master-bin.000001 18020 Query 1 18111 use `test`; insert into t1 values( 205 )
master-bin.000001 18111 Query 1 18202 use `test`; insert into t1 values( 204 )
master-bin.000001 18202 Query 1 18293 use `test`; insert into t1 values( 203 )
master-bin.000001 18293 Query 1 18384 use `test`; insert into t1 values( 202 )
master-bin.000001 18384 Query 1 18475 use `test`; insert into t1 values( 201 )
master-bin.000001 18475 Query 1 18566 use `test`; insert into t1 values( 200 )
master-bin.000001 18566 Query 1 18657 use `test`; insert into t1 values( 199 )
master-bin.000001 18657 Query 1 18748 use `test`; insert into t1 values( 198 )
master-bin.000001 18748 Query 1 18839 use `test`; insert into t1 values( 197 )
master-bin.000001 18839 Query 1 18930 use `test`; insert into t1 values( 196 )
master-bin.000001 18930 Query 1 19021 use `test`; insert into t1 values( 195 )
master-bin.000001 19021 Query 1 19112 use `test`; insert into t1 values( 194 )
master-bin.000001 19112 Query 1 19203 use `test`; insert into t1 values( 193 )
master-bin.000001 19203 Query 1 19294 use `test`; insert into t1 values( 192 )
master-bin.000001 19294 Query 1 19385 use `test`; insert into t1 values( 191 )
master-bin.000001 19385 Query 1 19476 use `test`; insert into t1 values( 190 )
master-bin.000001 19476 Query 1 19567 use `test`; insert into t1 values( 189 )
master-bin.000001 19567 Query 1 19658 use `test`; insert into t1 values( 188 )
master-bin.000001 19658 Query 1 19749 use `test`; insert into t1 values( 187 )
master-bin.000001 19749 Query 1 19840 use `test`; insert into t1 values( 186 )
master-bin.000001 19840 Query 1 19931 use `test`; insert into t1 values( 185 )
master-bin.000001 19931 Query 1 20022 use `test`; insert into t1 values( 184 )
master-bin.000001 20022 Query 1 20113 use `test`; insert into t1 values( 183 )
master-bin.000001 20113 Query 1 20204 use `test`; insert into t1 values( 182 )
master-bin.000001 20204 Query 1 20295 use `test`; insert into t1 values( 181 )
master-bin.000001 20295 Query 1 20386 use `test`; insert into t1 values( 180 )
master-bin.000001 20386 Query 1 20477 use `test`; insert into t1 values( 179 )
master-bin.000001 20477 Query 1 20568 use `test`; insert into t1 values( 178 )
master-bin.000001 20568 Query 1 20659 use `test`; insert into t1 values( 177 )
master-bin.000001 20659 Query 1 20750 use `test`; insert into t1 values( 176 )
master-bin.000001 20750 Query 1 20841 use `test`; insert into t1 values( 175 )
master-bin.000001 20841 Query 1 20932 use `test`; insert into t1 values( 174 )
master-bin.000001 20932 Query 1 21023 use `test`; insert into t1 values( 173 )
master-bin.000001 21023 Query 1 21114 use `test`; insert into t1 values( 172 )
master-bin.000001 21114 Query 1 21205 use `test`; insert into t1 values( 171 )
master-bin.000001 21205 Query 1 21296 use `test`; insert into t1 values( 170 )
master-bin.000001 21296 Query 1 21387 use `test`; insert into t1 values( 169 )
master-bin.000001 21387 Query 1 21478 use `test`; insert into t1 values( 168 )
master-bin.000001 21478 Query 1 21569 use `test`; insert into t1 values( 167 )
master-bin.000001 21569 Query 1 21660 use `test`; insert into t1 values( 166 )
master-bin.000001 21660 Query 1 21751 use `test`; insert into t1 values( 165 )
master-bin.000001 21751 Query 1 21842 use `test`; insert into t1 values( 164 )
master-bin.000001 21842 Query 1 21933 use `test`; insert into t1 values( 163 )
master-bin.000001 21933 Query 1 22024 use `test`; insert into t1 values( 162 )
master-bin.000001 22024 Query 1 22115 use `test`; insert into t1 values( 161 )
master-bin.000001 22115 Query 1 22206 use `test`; insert into t1 values( 160 )
master-bin.000001 22206 Query 1 22297 use `test`; insert into t1 values( 159 )
master-bin.000001 22297 Query 1 22388 use `test`; insert into t1 values( 158 )
master-bin.000001 22388 Query 1 22479 use `test`; insert into t1 values( 157 )
master-bin.000001 22479 Query 1 22570 use `test`; insert into t1 values( 156 )
master-bin.000001 22570 Query 1 22661 use `test`; insert into t1 values( 155 )
master-bin.000001 22661 Query 1 22752 use `test`; insert into t1 values( 154 )
master-bin.000001 22752 Query 1 22843 use `test`; insert into t1 values( 153 )
master-bin.000001 22843 Query 1 22934 use `test`; insert into t1 values( 152 )
master-bin.000001 22934 Query 1 23025 use `test`; insert into t1 values( 151 )
master-bin.000001 23025 Query 1 23116 use `test`; insert into t1 values( 150 )
master-bin.000001 23116 Query 1 23207 use `test`; insert into t1 values( 149 )
master-bin.000001 23207 Query 1 23298 use `test`; insert into t1 values( 148 )
master-bin.000001 23298 Query 1 23389 use `test`; insert into t1 values( 147 )
master-bin.000001 23389 Query 1 23480 use `test`; insert into t1 values( 146 )
master-bin.000001 23480 Query 1 23571 use `test`; insert into t1 values( 145 )
master-bin.000001 23571 Query 1 23662 use `test`; insert into t1 values( 144 )
master-bin.000001 23662 Query 1 23753 use `test`; insert into t1 values( 143 )
master-bin.000001 23753 Query 1 23844 use `test`; insert into t1 values( 142 )
master-bin.000001 23844 Query 1 23935 use `test`; insert into t1 values( 141 )
master-bin.000001 23935 Query 1 24026 use `test`; insert into t1 values( 140 )
master-bin.000001 24026 Query 1 24117 use `test`; insert into t1 values( 139 )
master-bin.000001 24117 Query 1 24208 use `test`; insert into t1 values( 138 )
master-bin.000001 24208 Query 1 24299 use `test`; insert into t1 values( 137 )
master-bin.000001 24299 Query 1 24390 use `test`; insert into t1 values( 136 )
master-bin.000001 24390 Query 1 24481 use `test`; insert into t1 values( 135 )
master-bin.000001 24481 Query 1 24572 use `test`; insert into t1 values( 134 )
master-bin.000001 24572 Query 1 24663 use `test`; insert into t1 values( 133 )
master-bin.000001 24663 Query 1 24754 use `test`; insert into t1 values( 132 )
master-bin.000001 24754 Query 1 24845 use `test`; insert into t1 values( 131 )
master-bin.000001 24845 Query 1 24936 use `test`; insert into t1 values( 130 )
master-bin.000001 24936 Query 1 25027 use `test`; insert into t1 values( 129 )
master-bin.000001 25027 Query 1 25118 use `test`; insert into t1 values( 128 )
master-bin.000001 25118 Query 1 25209 use `test`; insert into t1 values( 127 )
master-bin.000001 25209 Query 1 25300 use `test`; insert into t1 values( 126 )
master-bin.000001 25300 Query 1 25391 use `test`; insert into t1 values( 125 )
master-bin.000001 25391 Query 1 25482 use `test`; insert into t1 values( 124 )
master-bin.000001 25482 Query 1 25573 use `test`; insert into t1 values( 123 )
master-bin.000001 25573 Query 1 25664 use `test`; insert into t1 values( 122 )
master-bin.000001 25664 Query 1 25755 use `test`; insert into t1 values( 121 )
master-bin.000001 25755 Query 1 25846 use `test`; insert into t1 values( 120 )
master-bin.000001 25846 Query 1 25937 use `test`; insert into t1 values( 119 )
master-bin.000001 25937 Query 1 26028 use `test`; insert into t1 values( 118 )
master-bin.000001 26028 Query 1 26119 use `test`; insert into t1 values( 117 )
master-bin.000001 26119 Query 1 26210 use `test`; insert into t1 values( 116 )
master-bin.000001 26210 Query 1 26301 use `test`; insert into t1 values( 115 )
master-bin.000001 26301 Query 1 26392 use `test`; insert into t1 values( 114 )
master-bin.000001 26392 Query 1 26483 use `test`; insert into t1 values( 113 )
master-bin.000001 26483 Query 1 26574 use `test`; insert into t1 values( 112 )
master-bin.000001 26574 Query 1 26665 use `test`; insert into t1 values( 111 )
master-bin.000001 26665 Query 1 26756 use `test`; insert into t1 values( 110 )
master-bin.000001 26756 Query 1 26847 use `test`; insert into t1 values( 109 )
master-bin.000001 26847 Query 1 26938 use `test`; insert into t1 values( 108 )
master-bin.000001 26938 Query 1 27029 use `test`; insert into t1 values( 107 )
master-bin.000001 27029 Query 1 27120 use `test`; insert into t1 values( 106 )
master-bin.000001 27120 Query 1 27211 use `test`; insert into t1 values( 105 )
master-bin.000001 27211 Query 1 27302 use `test`; insert into t1 values( 104 )
master-bin.000001 27302 Query 1 27393 use `test`; insert into t1 values( 103 )
master-bin.000001 27393 Query 1 27484 use `test`; insert into t1 values( 102 )
master-bin.000001 27484 Query 1 27575 use `test`; insert into t1 values( 101 )
master-bin.000001 27575 Query 1 27666 use `test`; insert into t1 values( 100 )
master-bin.000001 27666 Query 1 27756 use `test`; insert into t1 values( 99 )
master-bin.000001 27756 Query 1 27846 use `test`; insert into t1 values( 98 )
master-bin.000001 27846 Query 1 27936 use `test`; insert into t1 values( 97 )
master-bin.000001 27936 Query 1 28026 use `test`; insert into t1 values( 96 )
master-bin.000001 28026 Query 1 28116 use `test`; insert into t1 values( 95 )
master-bin.000001 28116 Query 1 28206 use `test`; insert into t1 values( 94 )
master-bin.000001 28206 Query 1 28296 use `test`; insert into t1 values( 93 )
master-bin.000001 28296 Query 1 28386 use `test`; insert into t1 values( 92 )
master-bin.000001 28386 Query 1 28476 use `test`; insert into t1 values( 91 )
master-bin.000001 28476 Query 1 28566 use `test`; insert into t1 values( 90 )
master-bin.000001 28566 Query 1 28656 use `test`; insert into t1 values( 89 )
master-bin.000001 28656 Query 1 28746 use `test`; insert into t1 values( 88 )
master-bin.000001 28746 Query 1 28836 use `test`; insert into t1 values( 87 )
master-bin.000001 28836 Query 1 28926 use `test`; insert into t1 values( 86 )
master-bin.000001 28926 Query 1 29016 use `test`; insert into t1 values( 85 )
master-bin.000001 29016 Query 1 29106 use `test`; insert into t1 values( 84 )
master-bin.000001 29106 Query 1 29196 use `test`; insert into t1 values( 83 )
master-bin.000001 29196 Query 1 29286 use `test`; insert into t1 values( 82 )
master-bin.000001 29286 Query 1 29376 use `test`; insert into t1 values( 81 )
master-bin.000001 29376 Query 1 29466 use `test`; insert into t1 values( 80 )
master-bin.000001 29466 Query 1 29556 use `test`; insert into t1 values( 79 )
master-bin.000001 29556 Query 1 29646 use `test`; insert into t1 values( 78 )
master-bin.000001 29646 Query 1 29736 use `test`; insert into t1 values( 77 )
master-bin.000001 29736 Query 1 29826 use `test`; insert into t1 values( 76 )
master-bin.000001 29826 Query 1 29916 use `test`; insert into t1 values( 75 )
master-bin.000001 29916 Query 1 30006 use `test`; insert into t1 values( 74 )
master-bin.000001 30006 Query 1 30096 use `test`; insert into t1 values( 73 )
master-bin.000001 30096 Query 1 30186 use `test`; insert into t1 values( 72 )
master-bin.000001 30186 Query 1 30276 use `test`; insert into t1 values( 71 )
master-bin.000001 30276 Query 1 30366 use `test`; insert into t1 values( 70 )
master-bin.000001 30366 Query 1 30456 use `test`; insert into t1 values( 69 )
master-bin.000001 30456 Query 1 30546 use `test`; insert into t1 values( 68 )
master-bin.000001 30546 Query 1 30636 use `test`; insert into t1 values( 67 )
master-bin.000001 30636 Query 1 30726 use `test`; insert into t1 values( 66 )
master-bin.000001 30726 Query 1 30816 use `test`; insert into t1 values( 65 )
master-bin.000001 30816 Query 1 30906 use `test`; insert into t1 values( 64 )
master-bin.000001 30906 Query 1 30996 use `test`; insert into t1 values( 63 )
master-bin.000001 30996 Query 1 31086 use `test`; insert into t1 values( 62 )
master-bin.000001 31086 Query 1 31176 use `test`; insert into t1 values( 61 )
master-bin.000001 31176 Query 1 31266 use `test`; insert into t1 values( 60 )
master-bin.000001 31266 Query 1 31356 use `test`; insert into t1 values( 59 )
master-bin.000001 31356 Query 1 31446 use `test`; insert into t1 values( 58 )
master-bin.000001 31446 Query 1 31536 use `test`; insert into t1 values( 57 )
master-bin.000001 31536 Query 1 31626 use `test`; insert into t1 values( 56 )
master-bin.000001 31626 Query 1 31716 use `test`; insert into t1 values( 55 )
master-bin.000001 31716 Query 1 31806 use `test`; insert into t1 values( 54 )
master-bin.000001 31806 Query 1 31896 use `test`; insert into t1 values( 53 )
master-bin.000001 31896 Query 1 31986 use `test`; insert into t1 values( 52 )
master-bin.000001 31986 Query 1 32076 use `test`; insert into t1 values( 51 )
master-bin.000001 32076 Query 1 32166 use `test`; insert into t1 values( 50 )
master-bin.000001 32166 Query 1 32256 use `test`; insert into t1 values( 49 )
master-bin.000001 32256 Query 1 32346 use `test`; insert into t1 values( 48 )
master-bin.000001 32346 Query 1 32436 use `test`; insert into t1 values( 47 )
master-bin.000001 32436 Query 1 32526 use `test`; insert into t1 values( 46 )
master-bin.000001 32526 Query 1 32616 use `test`; insert into t1 values( 45 )
master-bin.000001 32616 Query 1 32706 use `test`; insert into t1 values( 44 )
master-bin.000001 32706 Query 1 32796 use `test`; insert into t1 values( 43 )
master-bin.000001 32796 Query 1 32886 use `test`; insert into t1 values( 42 )
master-bin.000001 32886 Query 1 32976 use `test`; insert into t1 values( 41 )
master-bin.000001 32976 Query 1 33066 use `test`; insert into t1 values( 40 )
master-bin.000001 33066 Query 1 33156 use `test`; insert into t1 values( 39 )
master-bin.000001 33156 Query 1 33246 use `test`; insert into t1 values( 38 )
master-bin.000001 33246 Query 1 33336 use `test`; insert into t1 values( 37 )
master-bin.000001 33336 Query 1 33426 use `test`; insert into t1 values( 36 )
master-bin.000001 33426 Query 1 33516 use `test`; insert into t1 values( 35 )
master-bin.000001 33516 Query 1 33606 use `test`; insert into t1 values( 34 )
master-bin.000001 33606 Query 1 33696 use `test`; insert into t1 values( 33 )
master-bin.000001 33696 Query 1 33786 use `test`; insert into t1 values( 32 )
master-bin.000001 33786 Query 1 33876 use `test`; insert into t1 values( 31 )
master-bin.000001 33876 Query 1 33966 use `test`; insert into t1 values( 30 )
master-bin.000001 33966 Query 1 34056 use `test`; insert into t1 values( 29 )
master-bin.000001 34056 Query 1 34146 use `test`; insert into t1 values( 28 )
master-bin.000001 34146 Query 1 34236 use `test`; insert into t1 values( 27 )
master-bin.000001 34236 Query 1 34326 use `test`; insert into t1 values( 26 )
master-bin.000001 34326 Query 1 34416 use `test`; insert into t1 values( 25 )
master-bin.000001 34416 Query 1 34506 use `test`; insert into t1 values( 24 )
master-bin.000001 34506 Query 1 34596 use `test`; insert into t1 values( 23 )
master-bin.000001 34596 Query 1 34686 use `test`; insert into t1 values( 22 )
master-bin.000001 34686 Query 1 34776 use `test`; insert into t1 values( 21 )
master-bin.000001 34776 Query 1 34866 use `test`; insert into t1 values( 20 )
master-bin.000001 34866 Query 1 34956 use `test`; insert into t1 values( 19 )
master-bin.000001 34956 Query 1 35046 use `test`; insert into t1 values( 18 )
master-bin.000001 35046 Query 1 35136 use `test`; insert into t1 values( 17 )
master-bin.000001 35136 Query 1 35226 use `test`; insert into t1 values( 16 )
master-bin.000001 35226 Query 1 35316 use `test`; insert into t1 values( 15 )
master-bin.000001 35316 Query 1 35406 use `test`; insert into t1 values( 14 )
master-bin.000001 35406 Query 1 35496 use `test`; insert into t1 values( 13 )
master-bin.000001 35496 Query 1 35586 use `test`; insert into t1 values( 12 )
master-bin.000001 35586 Query 1 35676 use `test`; insert into t1 values( 11 )
master-bin.000001 35676 Query 1 35766 use `test`; insert into t1 values( 10 )
master-bin.000001 35766 Query 1 35855 use `test`; insert into t1 values( 9 )
master-bin.000001 35855 Query 1 35944 use `test`; insert into t1 values( 8 )
master-bin.000001 35944 Query 1 36033 use `test`; insert into t1 values( 7 )
master-bin.000001 36033 Query 1 36122 use `test`; insert into t1 values( 6 )
master-bin.000001 36122 Query 1 36211 use `test`; insert into t1 values( 5 )
master-bin.000001 36211 Query 1 36300 use `test`; insert into t1 values( 4 )
master-bin.000001 36300 Query 1 36389 use `test`; insert into t1 values( 3 )
master-bin.000001 36389 Query 1 36478 use `test`; insert into t1 values( 2 )
master-bin.000001 36478 Query 1 36567 use `test`; insert into t1 values( 1 )
master-bin.000001 36567 Xid 1 36594 COMMIT /* XID */
master-bin.000001 36594 Rotate 1 36638 master-bin.000002;pos=4
Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB previous correction didn't. make sure "tail" is fixed up when filling cache several times; rework formulae. --- Merge sin.intern.azundris.com:/home/tnurnberg/22540/50-22540 into sin.intern.azundris.com:/home/tnurnberg/22540/51-22540 mysql-test/extra/binlog_tests/binlog.test: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB show that fix for absolute end_log_pos in binlog also works when cache is read several times and headers are split across that boundary show that end_log_pos in SHOW BINLOG EVENTS is correct even in transactions. show that SHOW MASTER STATUS returns correct values while in transactions (so that mysqldump --master-data will work correctly). also remove bdb dependency. mysql-test/r/binlog_row_binlog.result: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB show that fix for absolute end_log_pos in binlog also works when cache is read several times and headers are split across that boundary show that end_log_pos in SHOW BINLOG EVENTS is correct even in transactions. show that SHOW MASTER STATUS returns correct values while in transactions (so that mysqldump --master-data will work correctly). also remove bdb dependency. mysql-test/r/binlog_stm_binlog.result: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB show that fix for absolute end_log_pos in binlog also works when cache is read several times and headers are split across that boundary show that end_log_pos in SHOW BINLOG EVENTS is correct even in transactions. show that SHOW MASTER STATUS returns correct values while in transactions (so that mysqldump --master-data will work correctly). also remove bdb dependency. mysql-test/r/rpl_row_create_table.result: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB expect corrent end_log_pos in binlog sql/log.cc: Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB previous correction didn't. make sure "tail" is fixed up when filling cache several times; rework formulae.
2007-06-30 03:32:33 +02:00
drop table t1;
set global binlog_cache_size=@bcs;
set session autocommit = @ac;
drop table if exists t1;
reset master;
create table t1 (a bigint unsigned, b bigint(20) unsigned);
prepare stmt from "insert into t1 values (?,?)";
set @a= 9999999999999999;
set @b= 14632475938453979136;
execute stmt using @a, @b;
deallocate prepare stmt;
drop table t1;
show binlog events from 0;
Log_name Pos Event_type Server_id End_log_pos Info
2009-10-01 18:44:53 +02:00
master-bin.000001 4 Format_desc 1 107 Server version, Binlog ver: 4
master-bin.000001 107 Query 1 228 use `test`; create table t1 (a bigint unsigned, b bigint(20) unsigned)
master-bin.000001 228 Query 1 296 BEGIN
master-bin.000001 296 Query 1 420 use `test`; insert into t1 values (9999999999999999,14632475938453979136)
master-bin.000001 420 Query 1 489 COMMIT
master-bin.000001 489 Query 1 565 use `test`; drop table t1
2008-10-02 07:56:07 +02:00
reset master;
CREATE DATABASE bug39182 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
USE bug39182;
CREATE TABLE t1 (a VARCHAR(255) COLLATE utf8_unicode_ci)
DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE PROCEDURE p1()
BEGIN
DECLARE s1 VARCHAR(255);
SET s1= "test";
CREATE TEMPORARY TABLE tmp1
SELECT * FROM t1 WHERE a LIKE CONCAT("%", s1, "%");
SELECT
COLLATION(NAME_CONST('s1', _utf8'test')) c1,
COLLATION(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) c2,
COLLATION(s1) c3,
COERCIBILITY(NAME_CONST('s1', _utf8'test')) d1,
COERCIBILITY(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) d2,
COERCIBILITY(s1) d3;
DROP TEMPORARY TABLE tmp1;
END//
CALL p1();
c1 c2 c3 d1 d2 d3
utf8_general_ci utf8_unicode_ci utf8_unicode_ci 2 2 2
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # CREATE DATABASE bug39182 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci
master-bin.000001 # Query # # use `bug39182`; CREATE TABLE t1 (a VARCHAR(255) COLLATE utf8_unicode_ci)
DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
master-bin.000001 # Query # # use `bug39182`; CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
BEGIN
DECLARE s1 VARCHAR(255);
SET s1= "test";
CREATE TEMPORARY TABLE tmp1
SELECT * FROM t1 WHERE a LIKE CONCAT("%", s1, "%");
SELECT
COLLATION(NAME_CONST('s1', _utf8'test')) c1,
COLLATION(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) c2,
COLLATION(s1) c3,
COERCIBILITY(NAME_CONST('s1', _utf8'test')) d1,
COERCIBILITY(NAME_CONST('s1', _utf8'test' COLLATE utf8_unicode_ci)) d2,
COERCIBILITY(s1) d3;
DROP TEMPORARY TABLE tmp1;
END
master-bin.000001 # Query # # use `bug39182`; CREATE TEMPORARY TABLE tmp1
SELECT * FROM t1 WHERE a LIKE CONCAT("%", NAME_CONST('s1',_utf8'test' COLLATE 'utf8_unicode_ci'), "%")
master-bin.000001 # Query # # use `bug39182`; DROP TEMPORARY TABLE tmp1
DROP PROCEDURE p1;
DROP TABLE t1;
DROP DATABASE bug39182;
USE test;
2009-03-25 20:41:16 +01:00
CREATE PROCEDURE p1(IN v1 INT)
BEGIN
CREATE TABLE t1 SELECT v1;
DROP TABLE t1;
END//
CREATE PROCEDURE p2()
BEGIN
DECLARE v1 INT;
CREATE TABLE t1 SELECT v1+1;
DROP TABLE t1;
END//
CREATE PROCEDURE p3(IN v1 INT)
BEGIN
CREATE TABLE t1 SELECT 1 FROM DUAL WHERE v1!=0;
DROP TABLE t1;
END//
CREATE PROCEDURE p4(IN v1 INT)
BEGIN
DECLARE v2 INT;
CREATE TABLE t1 SELECT 1, v1, v2;
DROP TABLE t1;
CREATE TABLE t1 SELECT 1, v1+1, v2;
DROP TABLE t1;
END//
CALL p1(1);
CALL p2();
CALL p3(0);
CALL p4(0);
DROP PROCEDURE p1;
DROP PROCEDURE p2;
DROP PROCEDURE p3;
DROP PROCEDURE p4;
Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB fix binlog-writing so that end_log_pos is given correctly even within transactions for both SHOW BINLOG and SHOW MASTER STATUS, that is as absolute values (from log start) rather than relative values (from transaction's start). --- Merge sin.intern.azundris.com:/home/tnurnberg/22540/50-22540 into sin.intern.azundris.com:/home/tnurnberg/22540/51-22540 --- Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint into sin.intern.azundris.com:/home/tnurnberg/22540/51-22540 mysql-test/extra/binlog_tests/binlog.test: Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB show that end_log_pos in SHOW BINLOG EVENTS is correct even in transactions. show that SHOW MASTER STATUS returns correct values while in transactions (so that mysqldump --master-data will work correctly). also remove bdb dependency. manual merge mysql-test/r/binlog_stm_binlog.result: Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB show that end_log_pos in SHOW BINLOG EVENTS is correct even in transactions. show that SHOW MASTER STATUS returns correct values while in transactions (so that mysqldump --master-data will work correctly). also remove bdb dependency. manual merge sql/log.cc: Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB fix output for SHOW BINLOG EVENTS so that end_log_pos is given correctly even within transactions. do this by rewriting the commit-buffer in place. manual merge
2007-06-25 11:37:10 +02:00
End of 5.0 tests
WL#3146 "less locking in auto_increment": this is a cleanup patch for our current auto_increment handling: new names for auto_increment variables in THD, new methods to manipulate them (see sql_class.h), some move into handler::, causing less backup/restore work when executing substatements. This makes the logic hopefully clearer, less work is is needed in mysql_insert(). By cleaning up, using different variables for different purposes (instead of one for 3 things...), we fix those bugs, which someone may want to fix in 5.0 too: BUG#20339 "stored procedure using LAST_INSERT_ID() does not replicate statement-based" BUG#20341 "stored function inserting into one auto_increment puts bad data in slave" BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY UPDATE" (now if a row is updated, LAST_INSERT_ID() will return its id) and re-fixes: BUG#6880 "LAST_INSERT_ID() value changes during multi-row INSERT" (already fixed differently by Ramil in 4.1) Test of documented behaviour of mysql_insert_id() (there was no test). The behaviour changes introduced are: - LAST_INSERT_ID() now returns "the first autogenerated auto_increment value successfully inserted", instead of "the first autogenerated auto_increment value if any row was successfully inserted", see auto_increment.test. Same for mysql_insert_id(), see mysql_client_test.c. - LAST_INSERT_ID() returns the id of the updated row if ON DUPLICATE KEY UPDATE, see auto_increment.test. Same for mysql_insert_id(), see mysql_client_test.c. - LAST_INSERT_ID() does not change if no autogenerated value was successfully inserted (it used to then be 0), see auto_increment.test. - if in INSERT SELECT no autogenerated value was successfully inserted, mysql_insert_id() now returns the id of the last inserted row (it already did this for INSERT VALUES), see mysql_client_test.c. - if INSERT SELECT uses LAST_INSERT_ID(X), mysql_insert_id() now returns X (it already did this for INSERT VALUES), see mysql_client_test.c. - NDB now behaves like other engines wrt SET INSERT_ID: with INSERT IGNORE, the id passed in SET INSERT_ID is re-used until a row succeeds; SET INSERT_ID influences not only the first row now. Additionally, when unlocking a table we check that the thread is not keeping a next_insert_id (as the table is unlocked that id is potentially out-of-date); forgetting about this next_insert_id is done in a new handler::ha_release_auto_increment(). Finally we prepare for engines capable of reserving finite-length intervals of auto_increment values: we store such intervals in THD. The next step (to be done by the replication team in 5.1) is to read those intervals from THD and actually store them in the statement-based binary log. NDB will be a good engine to test that. mysql-test/extra/binlog_tests/binlog.test: Testing that if INSERT_ID is set to a value too big for the column's type, the binlogged INSERT_ID is the truncated value (important if slave has a column of a "wider" numeric type). Testing binlogging of INSERT_ID with INSERT DELAYED, to be sure that we binlog an INSERT_ID event only for the delayed rows which use one. mysql-test/extra/rpl_tests/rpl_insert_id.test: Testcase for BUG#20339 "stored procedure using LAST_INSERT_ID() does not replicate statement-based". Testcase for BUG#20341 "stored function inserting into one auto_increment puts bad data in slave". mysql-test/extra/rpl_tests/rpl_loaddata.test: Test that LOAD DATA INFILE sets a value for a future LAST_INSERT_ID(). mysql-test/r/auto_increment.result: behaviour change: when INSERT totally fails (not even succeeds partially and then rolls back), don't change last_insert_id(). Behaviour change: LAST_INSERT_ID() is now the first successfully inserted, autogenerated, id. Behaviour change: if INSERT ON DUPLICATE KEY UPDATE, if the table has auto_increment and a row is updated, then LAST_INSERT_ID() returns the id of this row. mysql-test/r/binlog_row_binlog.result: result update mysql-test/r/binlog_stm_binlog.result: result update mysql-test/r/insert.result: result update mysql-test/r/rpl_insert_id.result: result update mysql-test/r/rpl_loaddata.result: result update mysql-test/r/rpl_ndb_auto_inc.result: ndb's behaviour is now like other engines wrt SET INSERT_ID in a multi-row INSERT: - with INSERT IGNORE: the id passed in SET INSERT_ID is re-used until a row succeeds. - generally, SET INSERT_ID sets the first value and other values are simply computed from this first value, instead of previously where the 2nd and subsequent values where not influenced by SET INSERT_ID; this good change is due to the removal of "thd->next_insert_id=0" from ha_ndbcluster. mysql-test/t/auto_increment.test: A testcase of BUG#19243: if ON DUPLICATE KEY UPDATE updates a row, LAST_INSERT_ID() now returns the id of the row. Test of new behaviour of last_insert_id() when no autogenerated value was inserted, or when only some autogenerated value (not the first of them) was inserted. mysql-test/t/insert.test: testing INSERT IGNORE re-using generated values sql/ha_federated.cc: update for new variables. sql/ha_ndbcluster.cc: handler::auto_increment_column_changed not needed, equivalent to (insert_id_for_cur_row > 0). thd->next_insert_id=0 not needed anymore; it was used to force handler::update_auto_increment() to call ha_ndbcluster::get_auto_increment() for each row of a multi-row INSERT, now this happens naturally because NDB says "I have reserved you *one* value" in get_auto_increment(), so handler::update_auto_increment() calls again for next row. sql/handler.cc: More comments, use of new methods and variables. Hopes to be clearer than current code. thd->prev_insert_id not in THD anymore: it is managed locally by inserters (like mysql_insert()). THD::clear_next_insert_id is now equivalent to handler::next_insert_id > 0. get_auto_increment() reserves an interval of values from the engine, uses this interval for next rows of the statement, until interval is exhausted then it asks for another interval (of a bigger size than the first one; size doubles until reaching 65535 then it stays constant). If doing statement-based binlogging, intervals are remembered in a list for storage in the binlog. For "forced" insert_id values (SET INSERT_ID or replication slave), forced_auto_inc_intervals is non-empty and the handler takes its intervals from there, without calling get_auto_increment(). ha_release_auto_increment() resets the handler's auto_increment variables; it calls release_auto_increment() which is handler-dependent and serves to return to the engine any unused tail of the last used interval. If ending a statement, next_insert_id>0 means that autoinc values have been generated or taken from the master's binlog (in a replication slave) so we clear those values read from binlog, so that next top- or sub- statement does not use them. sql/handler.h: handler::auto_increment_changed can be replaced by (handler::insert_id_for_cur_row > 0). THD::next_insert_id moves into handler (more natural, and prepares for the day when we'll support a single statement inserting into two tables - "multi-table INSERT" like we have UPDATE - will this happen?). This move makes the backup/restore of THD::next_insert_id when entering a substatement unneeded, as each substatement has its own handler objects. sql/item_func.cc: new names for variables. For the setting of what mysql_insert_id() will return to the client, LAST_INSERT_ID(X) used to simply pretend that the generated autoinc value for the current row was X, but this led to having no reliable way to know the really generated value, so we now have a bool: thd->arg_of_last_insert_id_function which enables us to know that LAST_INSERT_ID(X) was called (and then X can be found in thd->first_successful_insert_id_in_prev_stmt). sql/log.cc: new variable names for insert_ids. Removing some unused variables in the slow log. sql/log_event.cc: new variable names, comments. Preparing for when master's won't binlog LAST_INSERT_ID if it was 0. sql/set_var.cc: new variable names. The last change repeats how Bar fixed BUG#20392 "INSERT_ID session variable has weird value" in 5.0. sql/sql_class.cc: new variables for insert_id. In THD::cleanup_after_query() we fix BUG#20339 "stored procedure using LAST_INSERT_ID() does not replicate statement-based" (will one want to fix it in 5.0?). Many comments about what stored functions do to auto_increment. In reset|restore_sub_statement_state(), we need to backup less auto_inc variables as some of them have moved to the handler; we backup/restore those which are about the current top- or sub- statement, *not* those about the statement-based binlog (which evolve as the top- and sub-statement execute). Because we split THD::last_insert_id into THD::first_successful_insert_id_in_prev_stmt and THD::auto_inc_intervals_for_binlog (among others), we fix BUG#20341 "stored function inserting into one auto_increment puts bad data in slave": indeed we can afford to not backup/restore THD::auto_inc_intervals_for_binlog (which fixes the bug) while still backing up / restoring THD::first_successful_insert_id_in_prev_stmt (ensuring that the top-level LAST_INSERT_ID() is not affected by INSERTs done by sub-statements, as is desirable and tested in rpl_insert_id.test). sql/sql_class.h: new variables and methods for auto_increment. Some THD members move into handler (those which are really about the table being inserted), some stay in THD (those which are about what a future LAST_INSERT_ID() should return, or about what should be stored into the statement-based binlog). THD::next_insert_id moves to handler::. THD::clear_next_insert_id removed (had become equivalent to next_insert_id > 0). THD::last_insert_id becomes four: THD::first_successful_insert_id_in_cur_stmt, THD::auto_inc_intervals_for_binlog, handler::insert_id_for_cur_row, THD::first_successful_insert_id_in_prev_stmt. THD::current_insert_id becomes: THD::first_successful_insert_id_in_prev_stmt_for_binlog THD::prev_insert_id is removed, handler can just use handler::insert_id_for_cur_row instead (which is more accurate: for the first row, prev_insert_id was set before get_auto_increment was called, so was 0, causing a call to get_auto_increment() for the 2nd row if the 1st row fails; here we don't need the call as insert_id_for_cur_row has the value of the first row). THD::last_insert_id_used becomes: stmt_depends_on_first_row_in_prev_stmt THD::insert_id_used is removed (equivalent to auto_inc_intervals_for_binlog non empty). The interval returned by get_auto_increment() and currently being consumed is handler::auto_inc_interval_for_cur_row. Comments to explain each of them. select_insert::last_insert_id becomes autoinc_value_of_last_inserted_row. sql/sql_insert.cc: the "id" variable is not changed for each row now; it used to compensate for this contradiction: - thd->last_insert_id supposed job was to keep the id of the first row - but it was updated for every row - so mysql_insert() made sure to catch its first value and restore it at the end of stmt. Now THD keeps the first value in first_successful_insert_id_in_cur_stmt, and value of the row in insert_id_for_cur_row. So "id" only serves to fill mysql_insert_id(), as depending on some conditions, "id" must be different values. Prev_insert_id moves from THD to write_record(). We now set LAST_INSERT_ID() in ON DUPLICATE KEY UPDATE too (BUG#19243). In an INSERT DELAYED, we still "reset auto-increment caching" but differently (by calling ha_release_auto_increment()). sql/sql_load.cc: no need to fiddle with "id", THD maintains THD::first_successful_insert_id_in_cur_stmt by itself and correctly now. ha_release_auto_increment() is now (logically) called before we unlock the table. sql/sql_parse.cc: update to new variable names. Assertion that reset_thd_for_next_command() is not called for every substatement of a routine (I'm not against it, but if we do this change, statement-based binlogging needs some adjustments). sql/sql_select.cc: update for new variable names sql/sql_table.cc: next_insert_id not needed in mysql_alter_table(), THD manages. sql/sql_update.cc: update for new variable names. Even though this is UPDATE, an insert id can be generated (by LAST_INSERT_ID(X)) and should be recorded because mysql_insert_id() wants to know about it. sql/structs.h: A class for "discrete" intervals (intervals of integer numbers with a certain increment between them): Discrete_interval, and a class for a list of such intervals: Discrete_intervals_list tests/mysql_client_test.c: tests of behaviour of mysql_insert_id(): there were no such tests, while in our manual we document its behaviour. In comments you'll notice the behaviour changes introduced (there are 5).
2006-07-09 17:52:19 +02:00
reset master;
create table t1 (id tinyint auto_increment primary key);
set insert_id=128;
insert into t1 values(null);
Warnings:
Warning 1264 Out of range value for column 'id' at row 1
select * from t1;
id
127
drop table t1;
create table t1 (a int);
create table if not exists t2 select * from t1;
create temporary table tt1 (a int);
create table if not exists t3 like tt1;
USE mysql;
INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test');
UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@';
DELETE FROM user WHERE host='localhost' AND user='@#@';
use test;
Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl into romeo.(none):/home/bk/w3464-mysql-5.1-new-rpl client/Makefile.am: Auto merged sql/Makefile.am: Auto merged sql/log_event.cc: Auto merged sql/log_event.h: Auto merged sql/rpl_injector.h: Auto merged sql/sql_parse.cc: Auto merged mysql-test/r/ctype_cp932_binlog_stm.result: Manual merge , mysql-test/r/flush_block_commit_notembedded.result: Manual merge mysql-test/r/rpl_000015.result: Manual merge mysql-test/r/rpl_change_master.result: Manual merge mysql-test/r/rpl_deadlock_innodb.result: Manual merge mysql-test/r/rpl_flushlog_loop.result: Manual merge , mysql-test/r/rpl_loaddata.result: manual merge mysql-test/r/rpl_loaddata_s.result: manual merge , mysql-test/r/rpl_log_pos.result: manual merge mysql-test/r/rpl_ndb_charset.result: manual merge mysql-test/r/rpl_ndb_log.result: manual merge , mysql-test/r/rpl_ndb_multi.result: manual merge mysql-test/r/rpl_rbr_to_sbr.result: manual merge mysql-test/r/rpl_rotate_logs.result: Manual merge mysql-test/r/rpl_row_basic_11bugs.result: Manual merge mysql-test/r/rpl_row_charset.result: Manual merge mysql-test/r/rpl_row_create_table.result: Manual merge mysql-test/r/rpl_row_delayed_ins.result: Manual merge mysql-test/r/rpl_row_drop.result: Manual merge mysql-test/r/rpl_row_flsh_tbls.result: Manual merge mysql-test/r/rpl_row_inexist_tbl.result: Manual merge mysql-test/r/rpl_row_log.result: Manual merge mysql-test/r/rpl_row_log_innodb.result: Manual merge mysql-test/r/rpl_row_max_relay_size.result: Manual merge mysql-test/r/rpl_row_reset_slave.result: Manual merge mysql-test/r/rpl_row_until.result: Manual merge mysql-test/r/rpl_server_id1.result: Manual merge mysql-test/r/rpl_server_id2.result: Manual merge mysql-test/r/rpl_sp.result: Manual merge mysql-test/r/rpl_stm_charset.result: Manual merge mysql-test/r/rpl_stm_flsh_tbls.result: Manual merge mysql-test/r/rpl_stm_log.result: Manual merge mysql-test/r/rpl_stm_max_relay_size.result: Manual merge mysql-test/r/rpl_stm_multi_query.result: Manual merge mysql-test/r/rpl_stm_reset_slave.result: Manual merge mysql-test/r/rpl_stm_until.result: Manual merge mysql-test/r/rpl_switch_stm_row_mixed.result: Manual merge mysql-test/r/rpl_truncate_2myisam.result: Manual merge mysql-test/r/rpl_truncate_3innodb.result: Manual merge mysql-test/r/rpl_truncate_7ndb.result: Manual merge mysql-test/r/user_var-binlog.result: Manual merge mysql-test/t/binlog_row_mix_innodb_myisam.test: Manual merge mysql-test/extra/binlog_tests/binlog.test: Binlog position change. mysql-test/extra/binlog_tests/binlog_insert_delayed.test: Binlog position change. mysql-test/extra/binlog_tests/ctype_cp932_binlog.test: Binlog position change. mysql-test/extra/binlog_tests/ctype_ucs_binlog.test: Binlog position change. mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test: Binlog position change. mysql-test/extra/rpl_tests/rpl_deadlock.test: Binlog position change. mysql-test/extra/rpl_tests/rpl_log.test: Binlog position change. mysql-test/extra/rpl_tests/rpl_multi_query.test: Binlog position change. mysql-test/extra/rpl_tests/rpl_row_charset.test: Binlog position change. mysql-test/extra/rpl_tests/rpl_stm_charset.test: Binlog position change. mysql-test/include/show_binlog_events.inc: Binlog position change. mysql-test/r/binlog_row_binlog.result: Result change mysql-test/r/binlog_row_ctype_ucs.result: Result change mysql-test/r/binlog_row_insert_select.result: Result change mysql-test/r/binlog_row_mix_innodb_myisam.result: Result change mysql-test/r/binlog_stm_binlog.result: Result change mysql-test/r/binlog_stm_ctype_ucs.result: Result change mysql-test/r/binlog_stm_insert_select.result: Result change mysql-test/r/binlog_stm_mix_innodb_myisam.result: Result change mysql-test/r/ctype_cp932_binlog_row.result: Result change mysql-test/t/binlog_stm_mix_innodb_myisam.test: Binlog position change. mysql-test/t/ctype_cp932_binlog_stm.test: Binlog position change. mysql-test/t/mysqlbinlog.test: Binlog position change. mysql-test/t/mysqlbinlog2.test: Binlog position change. mysql-test/t/rpl_loaddata_s.test: Binlog position change. mysql-test/t/rpl_log_pos.test: Binlog position change. mysql-test/t/rpl_row_basic_11bugs.test: Binlog position change. mysql-test/t/rpl_row_create_table.test: Binlog position change. mysql-test/t/rpl_row_flsh_tbls.test: Binlog position change. mysql-test/t/rpl_row_mysqlbinlog.test: Binlog position change. mysql-test/t/rpl_sp.test: Binlog position change. mysql-test/t/rpl_stm_flsh_tbls.test: Binlog position change. mysql-test/t/rpl_switch_stm_row_mixed.test: Binlog position change. mysql-test/t/user_var-binlog.test: Binlog position change. sql/share/errmsg.txt: Merging error messages
2007-03-29 21:38:03 +02:00
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
Post merge fixes of result files. mysql-test/r/binlog_stm_binlog.result: Result change. mysql-test/r/binlog_stm_ctype_ucs.result: Result change. mysql-test/r/binlog_stm_insert_select.result: Result change. mysql-test/r/ctype_cp932_binlog_stm.result: Result change. mysql-test/r/flush_block_commit_notembedded.result: Result change. mysql-test/r/rpl_000015.result: Result change. mysql-test/r/rpl_change_master.result: Result change. mysql-test/r/rpl_deadlock_innodb.result: Result change. mysql-test/r/rpl_flushlog_loop.result: Result change. mysql-test/r/rpl_known_bugs_detection.result: Result change. mysql-test/r/rpl_loaddata.result: Result change. mysql-test/r/rpl_loaddata_s.result: Result change. mysql-test/r/rpl_log_pos.result: Result change. mysql-test/r/rpl_rbr_to_sbr.result: Result change. mysql-test/r/rpl_rotate_logs.result: Result change. mysql-test/r/rpl_row_max_relay_size.result: Result change. mysql-test/r/rpl_server_id1.result: Result change. mysql-test/r/rpl_server_id2.result: Result change. mysql-test/r/rpl_sp.result: Result change. mysql-test/r/rpl_stm_charset.result: Result change. mysql-test/r/rpl_stm_flsh_tbls.result: Result change. mysql-test/r/rpl_stm_log.result: Result change. mysql-test/r/rpl_stm_max_relay_size.result: Result change. mysql-test/r/rpl_stm_multi_query.result: Result change. mysql-test/r/rpl_stm_reset_slave.result: Result change. mysql-test/r/rpl_stm_until.result: Result change. mysql-test/r/rpl_switch_stm_row_mixed.result: Result change. mysql-test/r/rpl_truncate_2myisam.result: Result change. mysql-test/r/rpl_truncate_3innodb.result: Result change. mysql-test/r/rpl_truncate_7ndb.result: Result change. mysql-test/r/user_var-binlog.result: Result change.
2007-03-30 04:44:49 +02:00
master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key)
master-bin.000001 # Query # # BEGIN
Post merge fixes of result files. mysql-test/r/binlog_stm_binlog.result: Result change. mysql-test/r/binlog_stm_ctype_ucs.result: Result change. mysql-test/r/binlog_stm_insert_select.result: Result change. mysql-test/r/ctype_cp932_binlog_stm.result: Result change. mysql-test/r/flush_block_commit_notembedded.result: Result change. mysql-test/r/rpl_000015.result: Result change. mysql-test/r/rpl_change_master.result: Result change. mysql-test/r/rpl_deadlock_innodb.result: Result change. mysql-test/r/rpl_flushlog_loop.result: Result change. mysql-test/r/rpl_known_bugs_detection.result: Result change. mysql-test/r/rpl_loaddata.result: Result change. mysql-test/r/rpl_loaddata_s.result: Result change. mysql-test/r/rpl_log_pos.result: Result change. mysql-test/r/rpl_rbr_to_sbr.result: Result change. mysql-test/r/rpl_rotate_logs.result: Result change. mysql-test/r/rpl_row_max_relay_size.result: Result change. mysql-test/r/rpl_server_id1.result: Result change. mysql-test/r/rpl_server_id2.result: Result change. mysql-test/r/rpl_sp.result: Result change. mysql-test/r/rpl_stm_charset.result: Result change. mysql-test/r/rpl_stm_flsh_tbls.result: Result change. mysql-test/r/rpl_stm_log.result: Result change. mysql-test/r/rpl_stm_max_relay_size.result: Result change. mysql-test/r/rpl_stm_multi_query.result: Result change. mysql-test/r/rpl_stm_reset_slave.result: Result change. mysql-test/r/rpl_stm_until.result: Result change. mysql-test/r/rpl_switch_stm_row_mixed.result: Result change. mysql-test/r/rpl_truncate_2myisam.result: Result change. mysql-test/r/rpl_truncate_3innodb.result: Result change. mysql-test/r/rpl_truncate_7ndb.result: Result change. mysql-test/r/user_var-binlog.result: Result change.
2007-03-30 04:44:49 +02:00
master-bin.000001 # Intvar # # INSERT_ID=127
master-bin.000001 # Query # # use `test`; insert into t1 values(null)
master-bin.000001 # Query # # COMMIT
Post merge fixes of result files. mysql-test/r/binlog_stm_binlog.result: Result change. mysql-test/r/binlog_stm_ctype_ucs.result: Result change. mysql-test/r/binlog_stm_insert_select.result: Result change. mysql-test/r/ctype_cp932_binlog_stm.result: Result change. mysql-test/r/flush_block_commit_notembedded.result: Result change. mysql-test/r/rpl_000015.result: Result change. mysql-test/r/rpl_change_master.result: Result change. mysql-test/r/rpl_deadlock_innodb.result: Result change. mysql-test/r/rpl_flushlog_loop.result: Result change. mysql-test/r/rpl_known_bugs_detection.result: Result change. mysql-test/r/rpl_loaddata.result: Result change. mysql-test/r/rpl_loaddata_s.result: Result change. mysql-test/r/rpl_log_pos.result: Result change. mysql-test/r/rpl_rbr_to_sbr.result: Result change. mysql-test/r/rpl_rotate_logs.result: Result change. mysql-test/r/rpl_row_max_relay_size.result: Result change. mysql-test/r/rpl_server_id1.result: Result change. mysql-test/r/rpl_server_id2.result: Result change. mysql-test/r/rpl_sp.result: Result change. mysql-test/r/rpl_stm_charset.result: Result change. mysql-test/r/rpl_stm_flsh_tbls.result: Result change. mysql-test/r/rpl_stm_log.result: Result change. mysql-test/r/rpl_stm_max_relay_size.result: Result change. mysql-test/r/rpl_stm_multi_query.result: Result change. mysql-test/r/rpl_stm_reset_slave.result: Result change. mysql-test/r/rpl_stm_until.result: Result change. mysql-test/r/rpl_switch_stm_row_mixed.result: Result change. mysql-test/r/rpl_truncate_2myisam.result: Result change. mysql-test/r/rpl_truncate_3innodb.result: Result change. mysql-test/r/rpl_truncate_7ndb.result: Result change. mysql-test/r/user_var-binlog.result: Result change.
2007-03-30 04:44:49 +02:00
master-bin.000001 # Query # # use `test`; drop table t1
master-bin.000001 # Query # # use `test`; create table t1 (a int)
master-bin.000001 # Query # # use `test`; create table if not exists t2 select * from t1
master-bin.000001 # Query # # use `test`; create temporary table tt1 (a int)
master-bin.000001 # Query # # use `test`; create table if not exists t3 like tt1
master-bin.000001 # Query # # BEGIN
Post merge fixes of result files. mysql-test/r/binlog_stm_binlog.result: Result change. mysql-test/r/binlog_stm_ctype_ucs.result: Result change. mysql-test/r/binlog_stm_insert_select.result: Result change. mysql-test/r/ctype_cp932_binlog_stm.result: Result change. mysql-test/r/flush_block_commit_notembedded.result: Result change. mysql-test/r/rpl_000015.result: Result change. mysql-test/r/rpl_change_master.result: Result change. mysql-test/r/rpl_deadlock_innodb.result: Result change. mysql-test/r/rpl_flushlog_loop.result: Result change. mysql-test/r/rpl_known_bugs_detection.result: Result change. mysql-test/r/rpl_loaddata.result: Result change. mysql-test/r/rpl_loaddata_s.result: Result change. mysql-test/r/rpl_log_pos.result: Result change. mysql-test/r/rpl_rbr_to_sbr.result: Result change. mysql-test/r/rpl_rotate_logs.result: Result change. mysql-test/r/rpl_row_max_relay_size.result: Result change. mysql-test/r/rpl_server_id1.result: Result change. mysql-test/r/rpl_server_id2.result: Result change. mysql-test/r/rpl_sp.result: Result change. mysql-test/r/rpl_stm_charset.result: Result change. mysql-test/r/rpl_stm_flsh_tbls.result: Result change. mysql-test/r/rpl_stm_log.result: Result change. mysql-test/r/rpl_stm_max_relay_size.result: Result change. mysql-test/r/rpl_stm_multi_query.result: Result change. mysql-test/r/rpl_stm_reset_slave.result: Result change. mysql-test/r/rpl_stm_until.result: Result change. mysql-test/r/rpl_switch_stm_row_mixed.result: Result change. mysql-test/r/rpl_truncate_2myisam.result: Result change. mysql-test/r/rpl_truncate_3innodb.result: Result change. mysql-test/r/rpl_truncate_7ndb.result: Result change. mysql-test/r/user_var-binlog.result: Result change.
2007-03-30 04:44:49 +02:00
master-bin.000001 # Query # # use `mysql`; INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test')
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
Post merge fixes of result files. mysql-test/r/binlog_stm_binlog.result: Result change. mysql-test/r/binlog_stm_ctype_ucs.result: Result change. mysql-test/r/binlog_stm_insert_select.result: Result change. mysql-test/r/ctype_cp932_binlog_stm.result: Result change. mysql-test/r/flush_block_commit_notembedded.result: Result change. mysql-test/r/rpl_000015.result: Result change. mysql-test/r/rpl_change_master.result: Result change. mysql-test/r/rpl_deadlock_innodb.result: Result change. mysql-test/r/rpl_flushlog_loop.result: Result change. mysql-test/r/rpl_known_bugs_detection.result: Result change. mysql-test/r/rpl_loaddata.result: Result change. mysql-test/r/rpl_loaddata_s.result: Result change. mysql-test/r/rpl_log_pos.result: Result change. mysql-test/r/rpl_rbr_to_sbr.result: Result change. mysql-test/r/rpl_rotate_logs.result: Result change. mysql-test/r/rpl_row_max_relay_size.result: Result change. mysql-test/r/rpl_server_id1.result: Result change. mysql-test/r/rpl_server_id2.result: Result change. mysql-test/r/rpl_sp.result: Result change. mysql-test/r/rpl_stm_charset.result: Result change. mysql-test/r/rpl_stm_flsh_tbls.result: Result change. mysql-test/r/rpl_stm_log.result: Result change. mysql-test/r/rpl_stm_max_relay_size.result: Result change. mysql-test/r/rpl_stm_multi_query.result: Result change. mysql-test/r/rpl_stm_reset_slave.result: Result change. mysql-test/r/rpl_stm_until.result: Result change. mysql-test/r/rpl_switch_stm_row_mixed.result: Result change. mysql-test/r/rpl_truncate_2myisam.result: Result change. mysql-test/r/rpl_truncate_3innodb.result: Result change. mysql-test/r/rpl_truncate_7ndb.result: Result change. mysql-test/r/user_var-binlog.result: Result change.
2007-03-30 04:44:49 +02:00
master-bin.000001 # Query # # use `mysql`; UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@'
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
Post merge fixes of result files. mysql-test/r/binlog_stm_binlog.result: Result change. mysql-test/r/binlog_stm_ctype_ucs.result: Result change. mysql-test/r/binlog_stm_insert_select.result: Result change. mysql-test/r/ctype_cp932_binlog_stm.result: Result change. mysql-test/r/flush_block_commit_notembedded.result: Result change. mysql-test/r/rpl_000015.result: Result change. mysql-test/r/rpl_change_master.result: Result change. mysql-test/r/rpl_deadlock_innodb.result: Result change. mysql-test/r/rpl_flushlog_loop.result: Result change. mysql-test/r/rpl_known_bugs_detection.result: Result change. mysql-test/r/rpl_loaddata.result: Result change. mysql-test/r/rpl_loaddata_s.result: Result change. mysql-test/r/rpl_log_pos.result: Result change. mysql-test/r/rpl_rbr_to_sbr.result: Result change. mysql-test/r/rpl_rotate_logs.result: Result change. mysql-test/r/rpl_row_max_relay_size.result: Result change. mysql-test/r/rpl_server_id1.result: Result change. mysql-test/r/rpl_server_id2.result: Result change. mysql-test/r/rpl_sp.result: Result change. mysql-test/r/rpl_stm_charset.result: Result change. mysql-test/r/rpl_stm_flsh_tbls.result: Result change. mysql-test/r/rpl_stm_log.result: Result change. mysql-test/r/rpl_stm_max_relay_size.result: Result change. mysql-test/r/rpl_stm_multi_query.result: Result change. mysql-test/r/rpl_stm_reset_slave.result: Result change. mysql-test/r/rpl_stm_until.result: Result change. mysql-test/r/rpl_switch_stm_row_mixed.result: Result change. mysql-test/r/rpl_truncate_2myisam.result: Result change. mysql-test/r/rpl_truncate_3innodb.result: Result change. mysql-test/r/rpl_truncate_7ndb.result: Result change. mysql-test/r/user_var-binlog.result: Result change.
2007-03-30 04:44:49 +02:00
master-bin.000001 # Query # # use `mysql`; DELETE FROM user WHERE host='localhost' AND user='@#@'
master-bin.000001 # Query # # COMMIT
drop table t1,t2,t3,tt1;
WL#3146 "less locking in auto_increment": this is a cleanup patch for our current auto_increment handling: new names for auto_increment variables in THD, new methods to manipulate them (see sql_class.h), some move into handler::, causing less backup/restore work when executing substatements. This makes the logic hopefully clearer, less work is is needed in mysql_insert(). By cleaning up, using different variables for different purposes (instead of one for 3 things...), we fix those bugs, which someone may want to fix in 5.0 too: BUG#20339 "stored procedure using LAST_INSERT_ID() does not replicate statement-based" BUG#20341 "stored function inserting into one auto_increment puts bad data in slave" BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY UPDATE" (now if a row is updated, LAST_INSERT_ID() will return its id) and re-fixes: BUG#6880 "LAST_INSERT_ID() value changes during multi-row INSERT" (already fixed differently by Ramil in 4.1) Test of documented behaviour of mysql_insert_id() (there was no test). The behaviour changes introduced are: - LAST_INSERT_ID() now returns "the first autogenerated auto_increment value successfully inserted", instead of "the first autogenerated auto_increment value if any row was successfully inserted", see auto_increment.test. Same for mysql_insert_id(), see mysql_client_test.c. - LAST_INSERT_ID() returns the id of the updated row if ON DUPLICATE KEY UPDATE, see auto_increment.test. Same for mysql_insert_id(), see mysql_client_test.c. - LAST_INSERT_ID() does not change if no autogenerated value was successfully inserted (it used to then be 0), see auto_increment.test. - if in INSERT SELECT no autogenerated value was successfully inserted, mysql_insert_id() now returns the id of the last inserted row (it already did this for INSERT VALUES), see mysql_client_test.c. - if INSERT SELECT uses LAST_INSERT_ID(X), mysql_insert_id() now returns X (it already did this for INSERT VALUES), see mysql_client_test.c. - NDB now behaves like other engines wrt SET INSERT_ID: with INSERT IGNORE, the id passed in SET INSERT_ID is re-used until a row succeeds; SET INSERT_ID influences not only the first row now. Additionally, when unlocking a table we check that the thread is not keeping a next_insert_id (as the table is unlocked that id is potentially out-of-date); forgetting about this next_insert_id is done in a new handler::ha_release_auto_increment(). Finally we prepare for engines capable of reserving finite-length intervals of auto_increment values: we store such intervals in THD. The next step (to be done by the replication team in 5.1) is to read those intervals from THD and actually store them in the statement-based binary log. NDB will be a good engine to test that. mysql-test/extra/binlog_tests/binlog.test: Testing that if INSERT_ID is set to a value too big for the column's type, the binlogged INSERT_ID is the truncated value (important if slave has a column of a "wider" numeric type). Testing binlogging of INSERT_ID with INSERT DELAYED, to be sure that we binlog an INSERT_ID event only for the delayed rows which use one. mysql-test/extra/rpl_tests/rpl_insert_id.test: Testcase for BUG#20339 "stored procedure using LAST_INSERT_ID() does not replicate statement-based". Testcase for BUG#20341 "stored function inserting into one auto_increment puts bad data in slave". mysql-test/extra/rpl_tests/rpl_loaddata.test: Test that LOAD DATA INFILE sets a value for a future LAST_INSERT_ID(). mysql-test/r/auto_increment.result: behaviour change: when INSERT totally fails (not even succeeds partially and then rolls back), don't change last_insert_id(). Behaviour change: LAST_INSERT_ID() is now the first successfully inserted, autogenerated, id. Behaviour change: if INSERT ON DUPLICATE KEY UPDATE, if the table has auto_increment and a row is updated, then LAST_INSERT_ID() returns the id of this row. mysql-test/r/binlog_row_binlog.result: result update mysql-test/r/binlog_stm_binlog.result: result update mysql-test/r/insert.result: result update mysql-test/r/rpl_insert_id.result: result update mysql-test/r/rpl_loaddata.result: result update mysql-test/r/rpl_ndb_auto_inc.result: ndb's behaviour is now like other engines wrt SET INSERT_ID in a multi-row INSERT: - with INSERT IGNORE: the id passed in SET INSERT_ID is re-used until a row succeeds. - generally, SET INSERT_ID sets the first value and other values are simply computed from this first value, instead of previously where the 2nd and subsequent values where not influenced by SET INSERT_ID; this good change is due to the removal of "thd->next_insert_id=0" from ha_ndbcluster. mysql-test/t/auto_increment.test: A testcase of BUG#19243: if ON DUPLICATE KEY UPDATE updates a row, LAST_INSERT_ID() now returns the id of the row. Test of new behaviour of last_insert_id() when no autogenerated value was inserted, or when only some autogenerated value (not the first of them) was inserted. mysql-test/t/insert.test: testing INSERT IGNORE re-using generated values sql/ha_federated.cc: update for new variables. sql/ha_ndbcluster.cc: handler::auto_increment_column_changed not needed, equivalent to (insert_id_for_cur_row > 0). thd->next_insert_id=0 not needed anymore; it was used to force handler::update_auto_increment() to call ha_ndbcluster::get_auto_increment() for each row of a multi-row INSERT, now this happens naturally because NDB says "I have reserved you *one* value" in get_auto_increment(), so handler::update_auto_increment() calls again for next row. sql/handler.cc: More comments, use of new methods and variables. Hopes to be clearer than current code. thd->prev_insert_id not in THD anymore: it is managed locally by inserters (like mysql_insert()). THD::clear_next_insert_id is now equivalent to handler::next_insert_id > 0. get_auto_increment() reserves an interval of values from the engine, uses this interval for next rows of the statement, until interval is exhausted then it asks for another interval (of a bigger size than the first one; size doubles until reaching 65535 then it stays constant). If doing statement-based binlogging, intervals are remembered in a list for storage in the binlog. For "forced" insert_id values (SET INSERT_ID or replication slave), forced_auto_inc_intervals is non-empty and the handler takes its intervals from there, without calling get_auto_increment(). ha_release_auto_increment() resets the handler's auto_increment variables; it calls release_auto_increment() which is handler-dependent and serves to return to the engine any unused tail of the last used interval. If ending a statement, next_insert_id>0 means that autoinc values have been generated or taken from the master's binlog (in a replication slave) so we clear those values read from binlog, so that next top- or sub- statement does not use them. sql/handler.h: handler::auto_increment_changed can be replaced by (handler::insert_id_for_cur_row > 0). THD::next_insert_id moves into handler (more natural, and prepares for the day when we'll support a single statement inserting into two tables - "multi-table INSERT" like we have UPDATE - will this happen?). This move makes the backup/restore of THD::next_insert_id when entering a substatement unneeded, as each substatement has its own handler objects. sql/item_func.cc: new names for variables. For the setting of what mysql_insert_id() will return to the client, LAST_INSERT_ID(X) used to simply pretend that the generated autoinc value for the current row was X, but this led to having no reliable way to know the really generated value, so we now have a bool: thd->arg_of_last_insert_id_function which enables us to know that LAST_INSERT_ID(X) was called (and then X can be found in thd->first_successful_insert_id_in_prev_stmt). sql/log.cc: new variable names for insert_ids. Removing some unused variables in the slow log. sql/log_event.cc: new variable names, comments. Preparing for when master's won't binlog LAST_INSERT_ID if it was 0. sql/set_var.cc: new variable names. The last change repeats how Bar fixed BUG#20392 "INSERT_ID session variable has weird value" in 5.0. sql/sql_class.cc: new variables for insert_id. In THD::cleanup_after_query() we fix BUG#20339 "stored procedure using LAST_INSERT_ID() does not replicate statement-based" (will one want to fix it in 5.0?). Many comments about what stored functions do to auto_increment. In reset|restore_sub_statement_state(), we need to backup less auto_inc variables as some of them have moved to the handler; we backup/restore those which are about the current top- or sub- statement, *not* those about the statement-based binlog (which evolve as the top- and sub-statement execute). Because we split THD::last_insert_id into THD::first_successful_insert_id_in_prev_stmt and THD::auto_inc_intervals_for_binlog (among others), we fix BUG#20341 "stored function inserting into one auto_increment puts bad data in slave": indeed we can afford to not backup/restore THD::auto_inc_intervals_for_binlog (which fixes the bug) while still backing up / restoring THD::first_successful_insert_id_in_prev_stmt (ensuring that the top-level LAST_INSERT_ID() is not affected by INSERTs done by sub-statements, as is desirable and tested in rpl_insert_id.test). sql/sql_class.h: new variables and methods for auto_increment. Some THD members move into handler (those which are really about the table being inserted), some stay in THD (those which are about what a future LAST_INSERT_ID() should return, or about what should be stored into the statement-based binlog). THD::next_insert_id moves to handler::. THD::clear_next_insert_id removed (had become equivalent to next_insert_id > 0). THD::last_insert_id becomes four: THD::first_successful_insert_id_in_cur_stmt, THD::auto_inc_intervals_for_binlog, handler::insert_id_for_cur_row, THD::first_successful_insert_id_in_prev_stmt. THD::current_insert_id becomes: THD::first_successful_insert_id_in_prev_stmt_for_binlog THD::prev_insert_id is removed, handler can just use handler::insert_id_for_cur_row instead (which is more accurate: for the first row, prev_insert_id was set before get_auto_increment was called, so was 0, causing a call to get_auto_increment() for the 2nd row if the 1st row fails; here we don't need the call as insert_id_for_cur_row has the value of the first row). THD::last_insert_id_used becomes: stmt_depends_on_first_row_in_prev_stmt THD::insert_id_used is removed (equivalent to auto_inc_intervals_for_binlog non empty). The interval returned by get_auto_increment() and currently being consumed is handler::auto_inc_interval_for_cur_row. Comments to explain each of them. select_insert::last_insert_id becomes autoinc_value_of_last_inserted_row. sql/sql_insert.cc: the "id" variable is not changed for each row now; it used to compensate for this contradiction: - thd->last_insert_id supposed job was to keep the id of the first row - but it was updated for every row - so mysql_insert() made sure to catch its first value and restore it at the end of stmt. Now THD keeps the first value in first_successful_insert_id_in_cur_stmt, and value of the row in insert_id_for_cur_row. So "id" only serves to fill mysql_insert_id(), as depending on some conditions, "id" must be different values. Prev_insert_id moves from THD to write_record(). We now set LAST_INSERT_ID() in ON DUPLICATE KEY UPDATE too (BUG#19243). In an INSERT DELAYED, we still "reset auto-increment caching" but differently (by calling ha_release_auto_increment()). sql/sql_load.cc: no need to fiddle with "id", THD maintains THD::first_successful_insert_id_in_cur_stmt by itself and correctly now. ha_release_auto_increment() is now (logically) called before we unlock the table. sql/sql_parse.cc: update to new variable names. Assertion that reset_thd_for_next_command() is not called for every substatement of a routine (I'm not against it, but if we do this change, statement-based binlogging needs some adjustments). sql/sql_select.cc: update for new variable names sql/sql_table.cc: next_insert_id not needed in mysql_alter_table(), THD manages. sql/sql_update.cc: update for new variable names. Even though this is UPDATE, an insert id can be generated (by LAST_INSERT_ID(X)) and should be recorded because mysql_insert_id() wants to know about it. sql/structs.h: A class for "discrete" intervals (intervals of integer numbers with a certain increment between them): Discrete_interval, and a class for a list of such intervals: Discrete_intervals_list tests/mysql_client_test.c: tests of behaviour of mysql_insert_id(): there were no such tests, while in our manual we document its behaviour. In comments you'll notice the behaviour changes introduced (there are 5).
2006-07-09 17:52:19 +02:00
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
insert delayed into t1 values (207);
insert delayed into t1 values (null);
insert delayed into t1 values (300);
FLUSH TABLES;
Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl into romeo.(none):/home/bk/w3464-mysql-5.1-new-rpl client/Makefile.am: Auto merged sql/Makefile.am: Auto merged sql/log_event.cc: Auto merged sql/log_event.h: Auto merged sql/rpl_injector.h: Auto merged sql/sql_parse.cc: Auto merged mysql-test/r/ctype_cp932_binlog_stm.result: Manual merge , mysql-test/r/flush_block_commit_notembedded.result: Manual merge mysql-test/r/rpl_000015.result: Manual merge mysql-test/r/rpl_change_master.result: Manual merge mysql-test/r/rpl_deadlock_innodb.result: Manual merge mysql-test/r/rpl_flushlog_loop.result: Manual merge , mysql-test/r/rpl_loaddata.result: manual merge mysql-test/r/rpl_loaddata_s.result: manual merge , mysql-test/r/rpl_log_pos.result: manual merge mysql-test/r/rpl_ndb_charset.result: manual merge mysql-test/r/rpl_ndb_log.result: manual merge , mysql-test/r/rpl_ndb_multi.result: manual merge mysql-test/r/rpl_rbr_to_sbr.result: manual merge mysql-test/r/rpl_rotate_logs.result: Manual merge mysql-test/r/rpl_row_basic_11bugs.result: Manual merge mysql-test/r/rpl_row_charset.result: Manual merge mysql-test/r/rpl_row_create_table.result: Manual merge mysql-test/r/rpl_row_delayed_ins.result: Manual merge mysql-test/r/rpl_row_drop.result: Manual merge mysql-test/r/rpl_row_flsh_tbls.result: Manual merge mysql-test/r/rpl_row_inexist_tbl.result: Manual merge mysql-test/r/rpl_row_log.result: Manual merge mysql-test/r/rpl_row_log_innodb.result: Manual merge mysql-test/r/rpl_row_max_relay_size.result: Manual merge mysql-test/r/rpl_row_reset_slave.result: Manual merge mysql-test/r/rpl_row_until.result: Manual merge mysql-test/r/rpl_server_id1.result: Manual merge mysql-test/r/rpl_server_id2.result: Manual merge mysql-test/r/rpl_sp.result: Manual merge mysql-test/r/rpl_stm_charset.result: Manual merge mysql-test/r/rpl_stm_flsh_tbls.result: Manual merge mysql-test/r/rpl_stm_log.result: Manual merge mysql-test/r/rpl_stm_max_relay_size.result: Manual merge mysql-test/r/rpl_stm_multi_query.result: Manual merge mysql-test/r/rpl_stm_reset_slave.result: Manual merge mysql-test/r/rpl_stm_until.result: Manual merge mysql-test/r/rpl_switch_stm_row_mixed.result: Manual merge mysql-test/r/rpl_truncate_2myisam.result: Manual merge mysql-test/r/rpl_truncate_3innodb.result: Manual merge mysql-test/r/rpl_truncate_7ndb.result: Manual merge mysql-test/r/user_var-binlog.result: Manual merge mysql-test/t/binlog_row_mix_innodb_myisam.test: Manual merge mysql-test/extra/binlog_tests/binlog.test: Binlog position change. mysql-test/extra/binlog_tests/binlog_insert_delayed.test: Binlog position change. mysql-test/extra/binlog_tests/ctype_cp932_binlog.test: Binlog position change. mysql-test/extra/binlog_tests/ctype_ucs_binlog.test: Binlog position change. mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test: Binlog position change. mysql-test/extra/rpl_tests/rpl_deadlock.test: Binlog position change. mysql-test/extra/rpl_tests/rpl_log.test: Binlog position change. mysql-test/extra/rpl_tests/rpl_multi_query.test: Binlog position change. mysql-test/extra/rpl_tests/rpl_row_charset.test: Binlog position change. mysql-test/extra/rpl_tests/rpl_stm_charset.test: Binlog position change. mysql-test/include/show_binlog_events.inc: Binlog position change. mysql-test/r/binlog_row_binlog.result: Result change mysql-test/r/binlog_row_ctype_ucs.result: Result change mysql-test/r/binlog_row_insert_select.result: Result change mysql-test/r/binlog_row_mix_innodb_myisam.result: Result change mysql-test/r/binlog_stm_binlog.result: Result change mysql-test/r/binlog_stm_ctype_ucs.result: Result change mysql-test/r/binlog_stm_insert_select.result: Result change mysql-test/r/binlog_stm_mix_innodb_myisam.result: Result change mysql-test/r/ctype_cp932_binlog_row.result: Result change mysql-test/t/binlog_stm_mix_innodb_myisam.test: Binlog position change. mysql-test/t/ctype_cp932_binlog_stm.test: Binlog position change. mysql-test/t/mysqlbinlog.test: Binlog position change. mysql-test/t/mysqlbinlog2.test: Binlog position change. mysql-test/t/rpl_loaddata_s.test: Binlog position change. mysql-test/t/rpl_log_pos.test: Binlog position change. mysql-test/t/rpl_row_basic_11bugs.test: Binlog position change. mysql-test/t/rpl_row_create_table.test: Binlog position change. mysql-test/t/rpl_row_flsh_tbls.test: Binlog position change. mysql-test/t/rpl_row_mysqlbinlog.test: Binlog position change. mysql-test/t/rpl_sp.test: Binlog position change. mysql-test/t/rpl_stm_flsh_tbls.test: Binlog position change. mysql-test/t/rpl_switch_stm_row_mixed.test: Binlog position change. mysql-test/t/user_var-binlog.test: Binlog position change. sql/share/errmsg.txt: Merging error messages
2007-03-29 21:38:03 +02:00
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
Post merge fixes of result files. mysql-test/r/binlog_stm_binlog.result: Result change. mysql-test/r/binlog_stm_ctype_ucs.result: Result change. mysql-test/r/binlog_stm_insert_select.result: Result change. mysql-test/r/ctype_cp932_binlog_stm.result: Result change. mysql-test/r/flush_block_commit_notembedded.result: Result change. mysql-test/r/rpl_000015.result: Result change. mysql-test/r/rpl_change_master.result: Result change. mysql-test/r/rpl_deadlock_innodb.result: Result change. mysql-test/r/rpl_flushlog_loop.result: Result change. mysql-test/r/rpl_known_bugs_detection.result: Result change. mysql-test/r/rpl_loaddata.result: Result change. mysql-test/r/rpl_loaddata_s.result: Result change. mysql-test/r/rpl_log_pos.result: Result change. mysql-test/r/rpl_rbr_to_sbr.result: Result change. mysql-test/r/rpl_rotate_logs.result: Result change. mysql-test/r/rpl_row_max_relay_size.result: Result change. mysql-test/r/rpl_server_id1.result: Result change. mysql-test/r/rpl_server_id2.result: Result change. mysql-test/r/rpl_sp.result: Result change. mysql-test/r/rpl_stm_charset.result: Result change. mysql-test/r/rpl_stm_flsh_tbls.result: Result change. mysql-test/r/rpl_stm_log.result: Result change. mysql-test/r/rpl_stm_max_relay_size.result: Result change. mysql-test/r/rpl_stm_multi_query.result: Result change. mysql-test/r/rpl_stm_reset_slave.result: Result change. mysql-test/r/rpl_stm_until.result: Result change. mysql-test/r/rpl_switch_stm_row_mixed.result: Result change. mysql-test/r/rpl_truncate_2myisam.result: Result change. mysql-test/r/rpl_truncate_3innodb.result: Result change. mysql-test/r/rpl_truncate_7ndb.result: Result change. mysql-test/r/user_var-binlog.result: Result change.
2007-03-30 04:44:49 +02:00
master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key)
master-bin.000001 # Query # # BEGIN
Post merge fixes of result files. mysql-test/r/binlog_stm_binlog.result: Result change. mysql-test/r/binlog_stm_ctype_ucs.result: Result change. mysql-test/r/binlog_stm_insert_select.result: Result change. mysql-test/r/ctype_cp932_binlog_stm.result: Result change. mysql-test/r/flush_block_commit_notembedded.result: Result change. mysql-test/r/rpl_000015.result: Result change. mysql-test/r/rpl_change_master.result: Result change. mysql-test/r/rpl_deadlock_innodb.result: Result change. mysql-test/r/rpl_flushlog_loop.result: Result change. mysql-test/r/rpl_known_bugs_detection.result: Result change. mysql-test/r/rpl_loaddata.result: Result change. mysql-test/r/rpl_loaddata_s.result: Result change. mysql-test/r/rpl_log_pos.result: Result change. mysql-test/r/rpl_rbr_to_sbr.result: Result change. mysql-test/r/rpl_rotate_logs.result: Result change. mysql-test/r/rpl_row_max_relay_size.result: Result change. mysql-test/r/rpl_server_id1.result: Result change. mysql-test/r/rpl_server_id2.result: Result change. mysql-test/r/rpl_sp.result: Result change. mysql-test/r/rpl_stm_charset.result: Result change. mysql-test/r/rpl_stm_flsh_tbls.result: Result change. mysql-test/r/rpl_stm_log.result: Result change. mysql-test/r/rpl_stm_max_relay_size.result: Result change. mysql-test/r/rpl_stm_multi_query.result: Result change. mysql-test/r/rpl_stm_reset_slave.result: Result change. mysql-test/r/rpl_stm_until.result: Result change. mysql-test/r/rpl_switch_stm_row_mixed.result: Result change. mysql-test/r/rpl_truncate_2myisam.result: Result change. mysql-test/r/rpl_truncate_3innodb.result: Result change. mysql-test/r/rpl_truncate_7ndb.result: Result change. mysql-test/r/user_var-binlog.result: Result change.
2007-03-30 04:44:49 +02:00
master-bin.000001 # Intvar # # INSERT_ID=127
master-bin.000001 # Query # # use `test`; insert into t1 values(null)
master-bin.000001 # Query # # COMMIT
Post merge fixes of result files. mysql-test/r/binlog_stm_binlog.result: Result change. mysql-test/r/binlog_stm_ctype_ucs.result: Result change. mysql-test/r/binlog_stm_insert_select.result: Result change. mysql-test/r/ctype_cp932_binlog_stm.result: Result change. mysql-test/r/flush_block_commit_notembedded.result: Result change. mysql-test/r/rpl_000015.result: Result change. mysql-test/r/rpl_change_master.result: Result change. mysql-test/r/rpl_deadlock_innodb.result: Result change. mysql-test/r/rpl_flushlog_loop.result: Result change. mysql-test/r/rpl_known_bugs_detection.result: Result change. mysql-test/r/rpl_loaddata.result: Result change. mysql-test/r/rpl_loaddata_s.result: Result change. mysql-test/r/rpl_log_pos.result: Result change. mysql-test/r/rpl_rbr_to_sbr.result: Result change. mysql-test/r/rpl_rotate_logs.result: Result change. mysql-test/r/rpl_row_max_relay_size.result: Result change. mysql-test/r/rpl_server_id1.result: Result change. mysql-test/r/rpl_server_id2.result: Result change. mysql-test/r/rpl_sp.result: Result change. mysql-test/r/rpl_stm_charset.result: Result change. mysql-test/r/rpl_stm_flsh_tbls.result: Result change. mysql-test/r/rpl_stm_log.result: Result change. mysql-test/r/rpl_stm_max_relay_size.result: Result change. mysql-test/r/rpl_stm_multi_query.result: Result change. mysql-test/r/rpl_stm_reset_slave.result: Result change. mysql-test/r/rpl_stm_until.result: Result change. mysql-test/r/rpl_switch_stm_row_mixed.result: Result change. mysql-test/r/rpl_truncate_2myisam.result: Result change. mysql-test/r/rpl_truncate_3innodb.result: Result change. mysql-test/r/rpl_truncate_7ndb.result: Result change. mysql-test/r/user_var-binlog.result: Result change.
2007-03-30 04:44:49 +02:00
master-bin.000001 # Query # # use `test`; drop table t1
master-bin.000001 # Query # # use `test`; create table t1 (a int)
master-bin.000001 # Query # # use `test`; create table if not exists t2 select * from t1
master-bin.000001 # Query # # use `test`; create temporary table tt1 (a int)
master-bin.000001 # Query # # use `test`; create table if not exists t3 like tt1
master-bin.000001 # Query # # BEGIN
Post merge fixes of result files. mysql-test/r/binlog_stm_binlog.result: Result change. mysql-test/r/binlog_stm_ctype_ucs.result: Result change. mysql-test/r/binlog_stm_insert_select.result: Result change. mysql-test/r/ctype_cp932_binlog_stm.result: Result change. mysql-test/r/flush_block_commit_notembedded.result: Result change. mysql-test/r/rpl_000015.result: Result change. mysql-test/r/rpl_change_master.result: Result change. mysql-test/r/rpl_deadlock_innodb.result: Result change. mysql-test/r/rpl_flushlog_loop.result: Result change. mysql-test/r/rpl_known_bugs_detection.result: Result change. mysql-test/r/rpl_loaddata.result: Result change. mysql-test/r/rpl_loaddata_s.result: Result change. mysql-test/r/rpl_log_pos.result: Result change. mysql-test/r/rpl_rbr_to_sbr.result: Result change. mysql-test/r/rpl_rotate_logs.result: Result change. mysql-test/r/rpl_row_max_relay_size.result: Result change. mysql-test/r/rpl_server_id1.result: Result change. mysql-test/r/rpl_server_id2.result: Result change. mysql-test/r/rpl_sp.result: Result change. mysql-test/r/rpl_stm_charset.result: Result change. mysql-test/r/rpl_stm_flsh_tbls.result: Result change. mysql-test/r/rpl_stm_log.result: Result change. mysql-test/r/rpl_stm_max_relay_size.result: Result change. mysql-test/r/rpl_stm_multi_query.result: Result change. mysql-test/r/rpl_stm_reset_slave.result: Result change. mysql-test/r/rpl_stm_until.result: Result change. mysql-test/r/rpl_switch_stm_row_mixed.result: Result change. mysql-test/r/rpl_truncate_2myisam.result: Result change. mysql-test/r/rpl_truncate_3innodb.result: Result change. mysql-test/r/rpl_truncate_7ndb.result: Result change. mysql-test/r/user_var-binlog.result: Result change.
2007-03-30 04:44:49 +02:00
master-bin.000001 # Query # # use `mysql`; INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test')
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
Post merge fixes of result files. mysql-test/r/binlog_stm_binlog.result: Result change. mysql-test/r/binlog_stm_ctype_ucs.result: Result change. mysql-test/r/binlog_stm_insert_select.result: Result change. mysql-test/r/ctype_cp932_binlog_stm.result: Result change. mysql-test/r/flush_block_commit_notembedded.result: Result change. mysql-test/r/rpl_000015.result: Result change. mysql-test/r/rpl_change_master.result: Result change. mysql-test/r/rpl_deadlock_innodb.result: Result change. mysql-test/r/rpl_flushlog_loop.result: Result change. mysql-test/r/rpl_known_bugs_detection.result: Result change. mysql-test/r/rpl_loaddata.result: Result change. mysql-test/r/rpl_loaddata_s.result: Result change. mysql-test/r/rpl_log_pos.result: Result change. mysql-test/r/rpl_rbr_to_sbr.result: Result change. mysql-test/r/rpl_rotate_logs.result: Result change. mysql-test/r/rpl_row_max_relay_size.result: Result change. mysql-test/r/rpl_server_id1.result: Result change. mysql-test/r/rpl_server_id2.result: Result change. mysql-test/r/rpl_sp.result: Result change. mysql-test/r/rpl_stm_charset.result: Result change. mysql-test/r/rpl_stm_flsh_tbls.result: Result change. mysql-test/r/rpl_stm_log.result: Result change. mysql-test/r/rpl_stm_max_relay_size.result: Result change. mysql-test/r/rpl_stm_multi_query.result: Result change. mysql-test/r/rpl_stm_reset_slave.result: Result change. mysql-test/r/rpl_stm_until.result: Result change. mysql-test/r/rpl_switch_stm_row_mixed.result: Result change. mysql-test/r/rpl_truncate_2myisam.result: Result change. mysql-test/r/rpl_truncate_3innodb.result: Result change. mysql-test/r/rpl_truncate_7ndb.result: Result change. mysql-test/r/user_var-binlog.result: Result change.
2007-03-30 04:44:49 +02:00
master-bin.000001 # Query # # use `mysql`; UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@'
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN
Post merge fixes of result files. mysql-test/r/binlog_stm_binlog.result: Result change. mysql-test/r/binlog_stm_ctype_ucs.result: Result change. mysql-test/r/binlog_stm_insert_select.result: Result change. mysql-test/r/ctype_cp932_binlog_stm.result: Result change. mysql-test/r/flush_block_commit_notembedded.result: Result change. mysql-test/r/rpl_000015.result: Result change. mysql-test/r/rpl_change_master.result: Result change. mysql-test/r/rpl_deadlock_innodb.result: Result change. mysql-test/r/rpl_flushlog_loop.result: Result change. mysql-test/r/rpl_known_bugs_detection.result: Result change. mysql-test/r/rpl_loaddata.result: Result change. mysql-test/r/rpl_loaddata_s.result: Result change. mysql-test/r/rpl_log_pos.result: Result change. mysql-test/r/rpl_rbr_to_sbr.result: Result change. mysql-test/r/rpl_rotate_logs.result: Result change. mysql-test/r/rpl_row_max_relay_size.result: Result change. mysql-test/r/rpl_server_id1.result: Result change. mysql-test/r/rpl_server_id2.result: Result change. mysql-test/r/rpl_sp.result: Result change. mysql-test/r/rpl_stm_charset.result: Result change. mysql-test/r/rpl_stm_flsh_tbls.result: Result change. mysql-test/r/rpl_stm_log.result: Result change. mysql-test/r/rpl_stm_max_relay_size.result: Result change. mysql-test/r/rpl_stm_multi_query.result: Result change. mysql-test/r/rpl_stm_reset_slave.result: Result change. mysql-test/r/rpl_stm_until.result: Result change. mysql-test/r/rpl_switch_stm_row_mixed.result: Result change. mysql-test/r/rpl_truncate_2myisam.result: Result change. mysql-test/r/rpl_truncate_3innodb.result: Result change. mysql-test/r/rpl_truncate_7ndb.result: Result change. mysql-test/r/user_var-binlog.result: Result change.
2007-03-30 04:44:49 +02:00
master-bin.000001 # Query # # use `mysql`; DELETE FROM user WHERE host='localhost' AND user='@#@'
master-bin.000001 # Query # # COMMIT
Post merge fixes of result files. mysql-test/r/binlog_stm_binlog.result: Result change. mysql-test/r/binlog_stm_ctype_ucs.result: Result change. mysql-test/r/binlog_stm_insert_select.result: Result change. mysql-test/r/ctype_cp932_binlog_stm.result: Result change. mysql-test/r/flush_block_commit_notembedded.result: Result change. mysql-test/r/rpl_000015.result: Result change. mysql-test/r/rpl_change_master.result: Result change. mysql-test/r/rpl_deadlock_innodb.result: Result change. mysql-test/r/rpl_flushlog_loop.result: Result change. mysql-test/r/rpl_known_bugs_detection.result: Result change. mysql-test/r/rpl_loaddata.result: Result change. mysql-test/r/rpl_loaddata_s.result: Result change. mysql-test/r/rpl_log_pos.result: Result change. mysql-test/r/rpl_rbr_to_sbr.result: Result change. mysql-test/r/rpl_rotate_logs.result: Result change. mysql-test/r/rpl_row_max_relay_size.result: Result change. mysql-test/r/rpl_server_id1.result: Result change. mysql-test/r/rpl_server_id2.result: Result change. mysql-test/r/rpl_sp.result: Result change. mysql-test/r/rpl_stm_charset.result: Result change. mysql-test/r/rpl_stm_flsh_tbls.result: Result change. mysql-test/r/rpl_stm_log.result: Result change. mysql-test/r/rpl_stm_max_relay_size.result: Result change. mysql-test/r/rpl_stm_multi_query.result: Result change. mysql-test/r/rpl_stm_reset_slave.result: Result change. mysql-test/r/rpl_stm_until.result: Result change. mysql-test/r/rpl_switch_stm_row_mixed.result: Result change. mysql-test/r/rpl_truncate_2myisam.result: Result change. mysql-test/r/rpl_truncate_3innodb.result: Result change. mysql-test/r/rpl_truncate_7ndb.result: Result change. mysql-test/r/user_var-binlog.result: Result change.
2007-03-30 04:44:49 +02:00
master-bin.000001 # Query # # use `test`; drop table t1,t2,t3,tt1
master-bin.000001 # Query # # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam
master-bin.000001 # Query # # BEGIN
Post merge fixes of result files. mysql-test/r/binlog_stm_binlog.result: Result change. mysql-test/r/binlog_stm_ctype_ucs.result: Result change. mysql-test/r/binlog_stm_insert_select.result: Result change. mysql-test/r/ctype_cp932_binlog_stm.result: Result change. mysql-test/r/flush_block_commit_notembedded.result: Result change. mysql-test/r/rpl_000015.result: Result change. mysql-test/r/rpl_change_master.result: Result change. mysql-test/r/rpl_deadlock_innodb.result: Result change. mysql-test/r/rpl_flushlog_loop.result: Result change. mysql-test/r/rpl_known_bugs_detection.result: Result change. mysql-test/r/rpl_loaddata.result: Result change. mysql-test/r/rpl_loaddata_s.result: Result change. mysql-test/r/rpl_log_pos.result: Result change. mysql-test/r/rpl_rbr_to_sbr.result: Result change. mysql-test/r/rpl_rotate_logs.result: Result change. mysql-test/r/rpl_row_max_relay_size.result: Result change. mysql-test/r/rpl_server_id1.result: Result change. mysql-test/r/rpl_server_id2.result: Result change. mysql-test/r/rpl_sp.result: Result change. mysql-test/r/rpl_stm_charset.result: Result change. mysql-test/r/rpl_stm_flsh_tbls.result: Result change. mysql-test/r/rpl_stm_log.result: Result change. mysql-test/r/rpl_stm_max_relay_size.result: Result change. mysql-test/r/rpl_stm_multi_query.result: Result change. mysql-test/r/rpl_stm_reset_slave.result: Result change. mysql-test/r/rpl_stm_until.result: Result change. mysql-test/r/rpl_switch_stm_row_mixed.result: Result change. mysql-test/r/rpl_truncate_2myisam.result: Result change. mysql-test/r/rpl_truncate_3innodb.result: Result change. mysql-test/r/rpl_truncate_7ndb.result: Result change. mysql-test/r/user_var-binlog.result: Result change.
2007-03-30 04:44:49 +02:00
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
Post merge fixes of result files. mysql-test/r/binlog_stm_binlog.result: Result change. mysql-test/r/binlog_stm_ctype_ucs.result: Result change. mysql-test/r/binlog_stm_insert_select.result: Result change. mysql-test/r/ctype_cp932_binlog_stm.result: Result change. mysql-test/r/flush_block_commit_notembedded.result: Result change. mysql-test/r/rpl_000015.result: Result change. mysql-test/r/rpl_change_master.result: Result change. mysql-test/r/rpl_deadlock_innodb.result: Result change. mysql-test/r/rpl_flushlog_loop.result: Result change. mysql-test/r/rpl_known_bugs_detection.result: Result change. mysql-test/r/rpl_loaddata.result: Result change. mysql-test/r/rpl_loaddata_s.result: Result change. mysql-test/r/rpl_log_pos.result: Result change. mysql-test/r/rpl_rbr_to_sbr.result: Result change. mysql-test/r/rpl_rotate_logs.result: Result change. mysql-test/r/rpl_row_max_relay_size.result: Result change. mysql-test/r/rpl_server_id1.result: Result change. mysql-test/r/rpl_server_id2.result: Result change. mysql-test/r/rpl_sp.result: Result change. mysql-test/r/rpl_stm_charset.result: Result change. mysql-test/r/rpl_stm_flsh_tbls.result: Result change. mysql-test/r/rpl_stm_log.result: Result change. mysql-test/r/rpl_stm_max_relay_size.result: Result change. mysql-test/r/rpl_stm_multi_query.result: Result change. mysql-test/r/rpl_stm_reset_slave.result: Result change. mysql-test/r/rpl_stm_until.result: Result change. mysql-test/r/rpl_switch_stm_row_mixed.result: Result change. mysql-test/r/rpl_truncate_2myisam.result: Result change. mysql-test/r/rpl_truncate_3innodb.result: Result change. mysql-test/r/rpl_truncate_7ndb.result: Result change. mysql-test/r/user_var-binlog.result: Result change.
2007-03-30 04:44:49 +02:00
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
Post merge fixes of result files. mysql-test/r/binlog_stm_binlog.result: Result change. mysql-test/r/binlog_stm_ctype_ucs.result: Result change. mysql-test/r/binlog_stm_insert_select.result: Result change. mysql-test/r/ctype_cp932_binlog_stm.result: Result change. mysql-test/r/flush_block_commit_notembedded.result: Result change. mysql-test/r/rpl_000015.result: Result change. mysql-test/r/rpl_change_master.result: Result change. mysql-test/r/rpl_deadlock_innodb.result: Result change. mysql-test/r/rpl_flushlog_loop.result: Result change. mysql-test/r/rpl_known_bugs_detection.result: Result change. mysql-test/r/rpl_loaddata.result: Result change. mysql-test/r/rpl_loaddata_s.result: Result change. mysql-test/r/rpl_log_pos.result: Result change. mysql-test/r/rpl_rbr_to_sbr.result: Result change. mysql-test/r/rpl_rotate_logs.result: Result change. mysql-test/r/rpl_row_max_relay_size.result: Result change. mysql-test/r/rpl_server_id1.result: Result change. mysql-test/r/rpl_server_id2.result: Result change. mysql-test/r/rpl_sp.result: Result change. mysql-test/r/rpl_stm_charset.result: Result change. mysql-test/r/rpl_stm_flsh_tbls.result: Result change. mysql-test/r/rpl_stm_log.result: Result change. mysql-test/r/rpl_stm_max_relay_size.result: Result change. mysql-test/r/rpl_stm_multi_query.result: Result change. mysql-test/r/rpl_stm_reset_slave.result: Result change. mysql-test/r/rpl_stm_until.result: Result change. mysql-test/r/rpl_switch_stm_row_mixed.result: Result change. mysql-test/r/rpl_truncate_2myisam.result: Result change. mysql-test/r/rpl_truncate_3innodb.result: Result change. mysql-test/r/rpl_truncate_7ndb.result: Result change. mysql-test/r/user_var-binlog.result: Result change.
2007-03-30 04:44:49 +02:00
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`; FLUSH TABLES
Fixing problems I identified in my auto_increment work pushed in July (as part of the auto_increment cleanup of WL#3146; let's not be sad, that monster push still removed serious bugs): one problem with INSERT DELAYED (unexpected interval releases), one with stored functions (wrong auto_inc binlogging). These bugs were not released. mysql-test/extra/binlog_tests/binlog_insert_delayed.test: more tests of binlogging of INSERT DELAYED: with multi-row INSERTs. I identified why sleeps are needed to get a repeatable row-based binlogged: because without sleeps rows sometimes get groupped and so generate different row based events. mysql-test/extra/rpl_tests/rpl_foreign_key.test: don't forget to drop tables on slave too, otherwise it leaves an orphan innodb table leading to rpl_insert_id failing sometimes (like in pushbuild "sapsrv2 -max"). mysql-test/extra/rpl_tests/rpl_insert_id.test: testing that if some statement does not update any row, it does not pollute the auto_inc binlog variables of the next statement; the test has to use stored procedures because with plain statements, mysql_reset_thd_for_next_command() does the resetting (and thus there is no problem); mysql_reset_thd_for_next_command() is not called inside routines. mysql-test/r/binlog_row_binlog.result: result additions mysql-test/r/binlog_statement_insert_delayed.result: result additions mysql-test/r/binlog_stm_binlog.result: result additions mysql-test/r/rpl_insert_id.result: result additions mysql-test/r/rpl_loaddata.result: With the change to log.cc reverted, the result changes and is better: the change to log.cc had caused some INSERT_ID events to disappear though they were necessary (but testsuite could not catch that because it's single-threaded). mysql-test/r/rpl_ndb_insert_ignore.result: NDB is now like other engines regarding INSERT IGNORE: autoincrement values which caused a duplicate key are re-used for next row, not lost. rpl_ndb_insert_ignore.result is now identical to rpl_insert_ignore.result. sql/log.cc: LOAD DATA INFILE is binlogged as several events, and the last of them must have the auto_inc id. So it's wrong to reset the auto_inc id after every binlog write (because then it's lost after the first event of LOAD DATA INFILE and so missing for the last one)/ Another problem: MYSQL_LOG::write() is not always called (for example if no row was updated), so we were missing reset in some cases. sql/sp_head.cc: SELECT func1(),func2() generates two binlog events, so needs to clear auto_increment binlog variables after each binlog event (it would be more natural to clear them in the log write code, but LOAD DATA INFILE would suffer from this see the cset comment for log.cc). Without the clearing, the problem is: > exec func1() >> call cleanup_after_query() (which does not clear our vars here) >> binlog SELECT func1() < > exec func2() and so SELECT func2() is binlogged with the auto_inc of SELECT func1(). sql/sql_class.cc: after every statement we should clear auto_inc variables used for binlogging, except if this was a function/trigger (in which case it may be "INSERT SELECT func()", where the cleanup_after_query() executed in func() should not reset the auto_inc binlog variables as they'll be necessary when binlogging the INSERT SELECT later). sql/sql_insert.cc: - as INSERT DELAYED uses the same TABLE object as the delayed_insert system thread, we should not call ha_release_auto_increment() from INSERT DELAYED (and btw it's logical as we reserve nothing as we don't perform the insert). Calling the function caused us to release values being used by the delayed_insert thread. So I do the call only if this is a non-DELAYED INSERT. - Assuming two INSERT DELAYED which get grouped by the delayed_insert thread, the second may use values reserved by the first, which is ok per se, but is a problem in statement-based binlogging: the 2nd INSERT gets binlogged with the "interval start" value of the first INSERT (=> duplicate error in slave). - no reason to ha_release_auto_increment() after every inserted row in INSERT SELECT; more efficient to do it only when the statement ends sql/sql_parse.cc: a comment
2006-09-12 15:42:13 +02:00
insert delayed into t1 values (null),(null),(null),(null);
insert delayed into t1 values (null),(null),(400),(null);
WL#3146 "less locking in auto_increment": this is a cleanup patch for our current auto_increment handling: new names for auto_increment variables in THD, new methods to manipulate them (see sql_class.h), some move into handler::, causing less backup/restore work when executing substatements. This makes the logic hopefully clearer, less work is is needed in mysql_insert(). By cleaning up, using different variables for different purposes (instead of one for 3 things...), we fix those bugs, which someone may want to fix in 5.0 too: BUG#20339 "stored procedure using LAST_INSERT_ID() does not replicate statement-based" BUG#20341 "stored function inserting into one auto_increment puts bad data in slave" BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY UPDATE" (now if a row is updated, LAST_INSERT_ID() will return its id) and re-fixes: BUG#6880 "LAST_INSERT_ID() value changes during multi-row INSERT" (already fixed differently by Ramil in 4.1) Test of documented behaviour of mysql_insert_id() (there was no test). The behaviour changes introduced are: - LAST_INSERT_ID() now returns "the first autogenerated auto_increment value successfully inserted", instead of "the first autogenerated auto_increment value if any row was successfully inserted", see auto_increment.test. Same for mysql_insert_id(), see mysql_client_test.c. - LAST_INSERT_ID() returns the id of the updated row if ON DUPLICATE KEY UPDATE, see auto_increment.test. Same for mysql_insert_id(), see mysql_client_test.c. - LAST_INSERT_ID() does not change if no autogenerated value was successfully inserted (it used to then be 0), see auto_increment.test. - if in INSERT SELECT no autogenerated value was successfully inserted, mysql_insert_id() now returns the id of the last inserted row (it already did this for INSERT VALUES), see mysql_client_test.c. - if INSERT SELECT uses LAST_INSERT_ID(X), mysql_insert_id() now returns X (it already did this for INSERT VALUES), see mysql_client_test.c. - NDB now behaves like other engines wrt SET INSERT_ID: with INSERT IGNORE, the id passed in SET INSERT_ID is re-used until a row succeeds; SET INSERT_ID influences not only the first row now. Additionally, when unlocking a table we check that the thread is not keeping a next_insert_id (as the table is unlocked that id is potentially out-of-date); forgetting about this next_insert_id is done in a new handler::ha_release_auto_increment(). Finally we prepare for engines capable of reserving finite-length intervals of auto_increment values: we store such intervals in THD. The next step (to be done by the replication team in 5.1) is to read those intervals from THD and actually store them in the statement-based binary log. NDB will be a good engine to test that. mysql-test/extra/binlog_tests/binlog.test: Testing that if INSERT_ID is set to a value too big for the column's type, the binlogged INSERT_ID is the truncated value (important if slave has a column of a "wider" numeric type). Testing binlogging of INSERT_ID with INSERT DELAYED, to be sure that we binlog an INSERT_ID event only for the delayed rows which use one. mysql-test/extra/rpl_tests/rpl_insert_id.test: Testcase for BUG#20339 "stored procedure using LAST_INSERT_ID() does not replicate statement-based". Testcase for BUG#20341 "stored function inserting into one auto_increment puts bad data in slave". mysql-test/extra/rpl_tests/rpl_loaddata.test: Test that LOAD DATA INFILE sets a value for a future LAST_INSERT_ID(). mysql-test/r/auto_increment.result: behaviour change: when INSERT totally fails (not even succeeds partially and then rolls back), don't change last_insert_id(). Behaviour change: LAST_INSERT_ID() is now the first successfully inserted, autogenerated, id. Behaviour change: if INSERT ON DUPLICATE KEY UPDATE, if the table has auto_increment and a row is updated, then LAST_INSERT_ID() returns the id of this row. mysql-test/r/binlog_row_binlog.result: result update mysql-test/r/binlog_stm_binlog.result: result update mysql-test/r/insert.result: result update mysql-test/r/rpl_insert_id.result: result update mysql-test/r/rpl_loaddata.result: result update mysql-test/r/rpl_ndb_auto_inc.result: ndb's behaviour is now like other engines wrt SET INSERT_ID in a multi-row INSERT: - with INSERT IGNORE: the id passed in SET INSERT_ID is re-used until a row succeeds. - generally, SET INSERT_ID sets the first value and other values are simply computed from this first value, instead of previously where the 2nd and subsequent values where not influenced by SET INSERT_ID; this good change is due to the removal of "thd->next_insert_id=0" from ha_ndbcluster. mysql-test/t/auto_increment.test: A testcase of BUG#19243: if ON DUPLICATE KEY UPDATE updates a row, LAST_INSERT_ID() now returns the id of the row. Test of new behaviour of last_insert_id() when no autogenerated value was inserted, or when only some autogenerated value (not the first of them) was inserted. mysql-test/t/insert.test: testing INSERT IGNORE re-using generated values sql/ha_federated.cc: update for new variables. sql/ha_ndbcluster.cc: handler::auto_increment_column_changed not needed, equivalent to (insert_id_for_cur_row > 0). thd->next_insert_id=0 not needed anymore; it was used to force handler::update_auto_increment() to call ha_ndbcluster::get_auto_increment() for each row of a multi-row INSERT, now this happens naturally because NDB says "I have reserved you *one* value" in get_auto_increment(), so handler::update_auto_increment() calls again for next row. sql/handler.cc: More comments, use of new methods and variables. Hopes to be clearer than current code. thd->prev_insert_id not in THD anymore: it is managed locally by inserters (like mysql_insert()). THD::clear_next_insert_id is now equivalent to handler::next_insert_id > 0. get_auto_increment() reserves an interval of values from the engine, uses this interval for next rows of the statement, until interval is exhausted then it asks for another interval (of a bigger size than the first one; size doubles until reaching 65535 then it stays constant). If doing statement-based binlogging, intervals are remembered in a list for storage in the binlog. For "forced" insert_id values (SET INSERT_ID or replication slave), forced_auto_inc_intervals is non-empty and the handler takes its intervals from there, without calling get_auto_increment(). ha_release_auto_increment() resets the handler's auto_increment variables; it calls release_auto_increment() which is handler-dependent and serves to return to the engine any unused tail of the last used interval. If ending a statement, next_insert_id>0 means that autoinc values have been generated or taken from the master's binlog (in a replication slave) so we clear those values read from binlog, so that next top- or sub- statement does not use them. sql/handler.h: handler::auto_increment_changed can be replaced by (handler::insert_id_for_cur_row > 0). THD::next_insert_id moves into handler (more natural, and prepares for the day when we'll support a single statement inserting into two tables - "multi-table INSERT" like we have UPDATE - will this happen?). This move makes the backup/restore of THD::next_insert_id when entering a substatement unneeded, as each substatement has its own handler objects. sql/item_func.cc: new names for variables. For the setting of what mysql_insert_id() will return to the client, LAST_INSERT_ID(X) used to simply pretend that the generated autoinc value for the current row was X, but this led to having no reliable way to know the really generated value, so we now have a bool: thd->arg_of_last_insert_id_function which enables us to know that LAST_INSERT_ID(X) was called (and then X can be found in thd->first_successful_insert_id_in_prev_stmt). sql/log.cc: new variable names for insert_ids. Removing some unused variables in the slow log. sql/log_event.cc: new variable names, comments. Preparing for when master's won't binlog LAST_INSERT_ID if it was 0. sql/set_var.cc: new variable names. The last change repeats how Bar fixed BUG#20392 "INSERT_ID session variable has weird value" in 5.0. sql/sql_class.cc: new variables for insert_id. In THD::cleanup_after_query() we fix BUG#20339 "stored procedure using LAST_INSERT_ID() does not replicate statement-based" (will one want to fix it in 5.0?). Many comments about what stored functions do to auto_increment. In reset|restore_sub_statement_state(), we need to backup less auto_inc variables as some of them have moved to the handler; we backup/restore those which are about the current top- or sub- statement, *not* those about the statement-based binlog (which evolve as the top- and sub-statement execute). Because we split THD::last_insert_id into THD::first_successful_insert_id_in_prev_stmt and THD::auto_inc_intervals_for_binlog (among others), we fix BUG#20341 "stored function inserting into one auto_increment puts bad data in slave": indeed we can afford to not backup/restore THD::auto_inc_intervals_for_binlog (which fixes the bug) while still backing up / restoring THD::first_successful_insert_id_in_prev_stmt (ensuring that the top-level LAST_INSERT_ID() is not affected by INSERTs done by sub-statements, as is desirable and tested in rpl_insert_id.test). sql/sql_class.h: new variables and methods for auto_increment. Some THD members move into handler (those which are really about the table being inserted), some stay in THD (those which are about what a future LAST_INSERT_ID() should return, or about what should be stored into the statement-based binlog). THD::next_insert_id moves to handler::. THD::clear_next_insert_id removed (had become equivalent to next_insert_id > 0). THD::last_insert_id becomes four: THD::first_successful_insert_id_in_cur_stmt, THD::auto_inc_intervals_for_binlog, handler::insert_id_for_cur_row, THD::first_successful_insert_id_in_prev_stmt. THD::current_insert_id becomes: THD::first_successful_insert_id_in_prev_stmt_for_binlog THD::prev_insert_id is removed, handler can just use handler::insert_id_for_cur_row instead (which is more accurate: for the first row, prev_insert_id was set before get_auto_increment was called, so was 0, causing a call to get_auto_increment() for the 2nd row if the 1st row fails; here we don't need the call as insert_id_for_cur_row has the value of the first row). THD::last_insert_id_used becomes: stmt_depends_on_first_row_in_prev_stmt THD::insert_id_used is removed (equivalent to auto_inc_intervals_for_binlog non empty). The interval returned by get_auto_increment() and currently being consumed is handler::auto_inc_interval_for_cur_row. Comments to explain each of them. select_insert::last_insert_id becomes autoinc_value_of_last_inserted_row. sql/sql_insert.cc: the "id" variable is not changed for each row now; it used to compensate for this contradiction: - thd->last_insert_id supposed job was to keep the id of the first row - but it was updated for every row - so mysql_insert() made sure to catch its first value and restore it at the end of stmt. Now THD keeps the first value in first_successful_insert_id_in_cur_stmt, and value of the row in insert_id_for_cur_row. So "id" only serves to fill mysql_insert_id(), as depending on some conditions, "id" must be different values. Prev_insert_id moves from THD to write_record(). We now set LAST_INSERT_ID() in ON DUPLICATE KEY UPDATE too (BUG#19243). In an INSERT DELAYED, we still "reset auto-increment caching" but differently (by calling ha_release_auto_increment()). sql/sql_load.cc: no need to fiddle with "id", THD maintains THD::first_successful_insert_id_in_cur_stmt by itself and correctly now. ha_release_auto_increment() is now (logically) called before we unlock the table. sql/sql_parse.cc: update to new variable names. Assertion that reset_thd_for_next_command() is not called for every substatement of a routine (I'm not against it, but if we do this change, statement-based binlogging needs some adjustments). sql/sql_select.cc: update for new variable names sql/sql_table.cc: next_insert_id not needed in mysql_alter_table(), THD manages. sql/sql_update.cc: update for new variable names. Even though this is UPDATE, an insert id can be generated (by LAST_INSERT_ID(X)) and should be recorded because mysql_insert_id() wants to know about it. sql/structs.h: A class for "discrete" intervals (intervals of integer numbers with a certain increment between them): Discrete_interval, and a class for a list of such intervals: Discrete_intervals_list tests/mysql_client_test.c: tests of behaviour of mysql_insert_id(): there were no such tests, while in our manual we document its behaviour. In comments you'll notice the behaviour changes introduced (there are 5).
2006-07-09 17:52:19 +02:00
select * from t1;
a
207
208
300
Fixing problems I identified in my auto_increment work pushed in July (as part of the auto_increment cleanup of WL#3146; let's not be sad, that monster push still removed serious bugs): one problem with INSERT DELAYED (unexpected interval releases), one with stored functions (wrong auto_inc binlogging). These bugs were not released. mysql-test/extra/binlog_tests/binlog_insert_delayed.test: more tests of binlogging of INSERT DELAYED: with multi-row INSERTs. I identified why sleeps are needed to get a repeatable row-based binlogged: because without sleeps rows sometimes get groupped and so generate different row based events. mysql-test/extra/rpl_tests/rpl_foreign_key.test: don't forget to drop tables on slave too, otherwise it leaves an orphan innodb table leading to rpl_insert_id failing sometimes (like in pushbuild "sapsrv2 -max"). mysql-test/extra/rpl_tests/rpl_insert_id.test: testing that if some statement does not update any row, it does not pollute the auto_inc binlog variables of the next statement; the test has to use stored procedures because with plain statements, mysql_reset_thd_for_next_command() does the resetting (and thus there is no problem); mysql_reset_thd_for_next_command() is not called inside routines. mysql-test/r/binlog_row_binlog.result: result additions mysql-test/r/binlog_statement_insert_delayed.result: result additions mysql-test/r/binlog_stm_binlog.result: result additions mysql-test/r/rpl_insert_id.result: result additions mysql-test/r/rpl_loaddata.result: With the change to log.cc reverted, the result changes and is better: the change to log.cc had caused some INSERT_ID events to disappear though they were necessary (but testsuite could not catch that because it's single-threaded). mysql-test/r/rpl_ndb_insert_ignore.result: NDB is now like other engines regarding INSERT IGNORE: autoincrement values which caused a duplicate key are re-used for next row, not lost. rpl_ndb_insert_ignore.result is now identical to rpl_insert_ignore.result. sql/log.cc: LOAD DATA INFILE is binlogged as several events, and the last of them must have the auto_inc id. So it's wrong to reset the auto_inc id after every binlog write (because then it's lost after the first event of LOAD DATA INFILE and so missing for the last one)/ Another problem: MYSQL_LOG::write() is not always called (for example if no row was updated), so we were missing reset in some cases. sql/sp_head.cc: SELECT func1(),func2() generates two binlog events, so needs to clear auto_increment binlog variables after each binlog event (it would be more natural to clear them in the log write code, but LOAD DATA INFILE would suffer from this see the cset comment for log.cc). Without the clearing, the problem is: > exec func1() >> call cleanup_after_query() (which does not clear our vars here) >> binlog SELECT func1() < > exec func2() and so SELECT func2() is binlogged with the auto_inc of SELECT func1(). sql/sql_class.cc: after every statement we should clear auto_inc variables used for binlogging, except if this was a function/trigger (in which case it may be "INSERT SELECT func()", where the cleanup_after_query() executed in func() should not reset the auto_inc binlog variables as they'll be necessary when binlogging the INSERT SELECT later). sql/sql_insert.cc: - as INSERT DELAYED uses the same TABLE object as the delayed_insert system thread, we should not call ha_release_auto_increment() from INSERT DELAYED (and btw it's logical as we reserve nothing as we don't perform the insert). Calling the function caused us to release values being used by the delayed_insert thread. So I do the call only if this is a non-DELAYED INSERT. - Assuming two INSERT DELAYED which get grouped by the delayed_insert thread, the second may use values reserved by the first, which is ok per se, but is a problem in statement-based binlogging: the 2nd INSERT gets binlogged with the "interval start" value of the first INSERT (=> duplicate error in slave). - no reason to ha_release_auto_increment() after every inserted row in INSERT SELECT; more efficient to do it only when the statement ends sql/sql_parse.cc: a comment
2006-09-12 15:42:13 +02:00
301
302
303
304
305
306
400
401
WL#3146 "less locking in auto_increment": this is a cleanup patch for our current auto_increment handling: new names for auto_increment variables in THD, new methods to manipulate them (see sql_class.h), some move into handler::, causing less backup/restore work when executing substatements. This makes the logic hopefully clearer, less work is is needed in mysql_insert(). By cleaning up, using different variables for different purposes (instead of one for 3 things...), we fix those bugs, which someone may want to fix in 5.0 too: BUG#20339 "stored procedure using LAST_INSERT_ID() does not replicate statement-based" BUG#20341 "stored function inserting into one auto_increment puts bad data in slave" BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY UPDATE" (now if a row is updated, LAST_INSERT_ID() will return its id) and re-fixes: BUG#6880 "LAST_INSERT_ID() value changes during multi-row INSERT" (already fixed differently by Ramil in 4.1) Test of documented behaviour of mysql_insert_id() (there was no test). The behaviour changes introduced are: - LAST_INSERT_ID() now returns "the first autogenerated auto_increment value successfully inserted", instead of "the first autogenerated auto_increment value if any row was successfully inserted", see auto_increment.test. Same for mysql_insert_id(), see mysql_client_test.c. - LAST_INSERT_ID() returns the id of the updated row if ON DUPLICATE KEY UPDATE, see auto_increment.test. Same for mysql_insert_id(), see mysql_client_test.c. - LAST_INSERT_ID() does not change if no autogenerated value was successfully inserted (it used to then be 0), see auto_increment.test. - if in INSERT SELECT no autogenerated value was successfully inserted, mysql_insert_id() now returns the id of the last inserted row (it already did this for INSERT VALUES), see mysql_client_test.c. - if INSERT SELECT uses LAST_INSERT_ID(X), mysql_insert_id() now returns X (it already did this for INSERT VALUES), see mysql_client_test.c. - NDB now behaves like other engines wrt SET INSERT_ID: with INSERT IGNORE, the id passed in SET INSERT_ID is re-used until a row succeeds; SET INSERT_ID influences not only the first row now. Additionally, when unlocking a table we check that the thread is not keeping a next_insert_id (as the table is unlocked that id is potentially out-of-date); forgetting about this next_insert_id is done in a new handler::ha_release_auto_increment(). Finally we prepare for engines capable of reserving finite-length intervals of auto_increment values: we store such intervals in THD. The next step (to be done by the replication team in 5.1) is to read those intervals from THD and actually store them in the statement-based binary log. NDB will be a good engine to test that. mysql-test/extra/binlog_tests/binlog.test: Testing that if INSERT_ID is set to a value too big for the column's type, the binlogged INSERT_ID is the truncated value (important if slave has a column of a "wider" numeric type). Testing binlogging of INSERT_ID with INSERT DELAYED, to be sure that we binlog an INSERT_ID event only for the delayed rows which use one. mysql-test/extra/rpl_tests/rpl_insert_id.test: Testcase for BUG#20339 "stored procedure using LAST_INSERT_ID() does not replicate statement-based". Testcase for BUG#20341 "stored function inserting into one auto_increment puts bad data in slave". mysql-test/extra/rpl_tests/rpl_loaddata.test: Test that LOAD DATA INFILE sets a value for a future LAST_INSERT_ID(). mysql-test/r/auto_increment.result: behaviour change: when INSERT totally fails (not even succeeds partially and then rolls back), don't change last_insert_id(). Behaviour change: LAST_INSERT_ID() is now the first successfully inserted, autogenerated, id. Behaviour change: if INSERT ON DUPLICATE KEY UPDATE, if the table has auto_increment and a row is updated, then LAST_INSERT_ID() returns the id of this row. mysql-test/r/binlog_row_binlog.result: result update mysql-test/r/binlog_stm_binlog.result: result update mysql-test/r/insert.result: result update mysql-test/r/rpl_insert_id.result: result update mysql-test/r/rpl_loaddata.result: result update mysql-test/r/rpl_ndb_auto_inc.result: ndb's behaviour is now like other engines wrt SET INSERT_ID in a multi-row INSERT: - with INSERT IGNORE: the id passed in SET INSERT_ID is re-used until a row succeeds. - generally, SET INSERT_ID sets the first value and other values are simply computed from this first value, instead of previously where the 2nd and subsequent values where not influenced by SET INSERT_ID; this good change is due to the removal of "thd->next_insert_id=0" from ha_ndbcluster. mysql-test/t/auto_increment.test: A testcase of BUG#19243: if ON DUPLICATE KEY UPDATE updates a row, LAST_INSERT_ID() now returns the id of the row. Test of new behaviour of last_insert_id() when no autogenerated value was inserted, or when only some autogenerated value (not the first of them) was inserted. mysql-test/t/insert.test: testing INSERT IGNORE re-using generated values sql/ha_federated.cc: update for new variables. sql/ha_ndbcluster.cc: handler::auto_increment_column_changed not needed, equivalent to (insert_id_for_cur_row > 0). thd->next_insert_id=0 not needed anymore; it was used to force handler::update_auto_increment() to call ha_ndbcluster::get_auto_increment() for each row of a multi-row INSERT, now this happens naturally because NDB says "I have reserved you *one* value" in get_auto_increment(), so handler::update_auto_increment() calls again for next row. sql/handler.cc: More comments, use of new methods and variables. Hopes to be clearer than current code. thd->prev_insert_id not in THD anymore: it is managed locally by inserters (like mysql_insert()). THD::clear_next_insert_id is now equivalent to handler::next_insert_id > 0. get_auto_increment() reserves an interval of values from the engine, uses this interval for next rows of the statement, until interval is exhausted then it asks for another interval (of a bigger size than the first one; size doubles until reaching 65535 then it stays constant). If doing statement-based binlogging, intervals are remembered in a list for storage in the binlog. For "forced" insert_id values (SET INSERT_ID or replication slave), forced_auto_inc_intervals is non-empty and the handler takes its intervals from there, without calling get_auto_increment(). ha_release_auto_increment() resets the handler's auto_increment variables; it calls release_auto_increment() which is handler-dependent and serves to return to the engine any unused tail of the last used interval. If ending a statement, next_insert_id>0 means that autoinc values have been generated or taken from the master's binlog (in a replication slave) so we clear those values read from binlog, so that next top- or sub- statement does not use them. sql/handler.h: handler::auto_increment_changed can be replaced by (handler::insert_id_for_cur_row > 0). THD::next_insert_id moves into handler (more natural, and prepares for the day when we'll support a single statement inserting into two tables - "multi-table INSERT" like we have UPDATE - will this happen?). This move makes the backup/restore of THD::next_insert_id when entering a substatement unneeded, as each substatement has its own handler objects. sql/item_func.cc: new names for variables. For the setting of what mysql_insert_id() will return to the client, LAST_INSERT_ID(X) used to simply pretend that the generated autoinc value for the current row was X, but this led to having no reliable way to know the really generated value, so we now have a bool: thd->arg_of_last_insert_id_function which enables us to know that LAST_INSERT_ID(X) was called (and then X can be found in thd->first_successful_insert_id_in_prev_stmt). sql/log.cc: new variable names for insert_ids. Removing some unused variables in the slow log. sql/log_event.cc: new variable names, comments. Preparing for when master's won't binlog LAST_INSERT_ID if it was 0. sql/set_var.cc: new variable names. The last change repeats how Bar fixed BUG#20392 "INSERT_ID session variable has weird value" in 5.0. sql/sql_class.cc: new variables for insert_id. In THD::cleanup_after_query() we fix BUG#20339 "stored procedure using LAST_INSERT_ID() does not replicate statement-based" (will one want to fix it in 5.0?). Many comments about what stored functions do to auto_increment. In reset|restore_sub_statement_state(), we need to backup less auto_inc variables as some of them have moved to the handler; we backup/restore those which are about the current top- or sub- statement, *not* those about the statement-based binlog (which evolve as the top- and sub-statement execute). Because we split THD::last_insert_id into THD::first_successful_insert_id_in_prev_stmt and THD::auto_inc_intervals_for_binlog (among others), we fix BUG#20341 "stored function inserting into one auto_increment puts bad data in slave": indeed we can afford to not backup/restore THD::auto_inc_intervals_for_binlog (which fixes the bug) while still backing up / restoring THD::first_successful_insert_id_in_prev_stmt (ensuring that the top-level LAST_INSERT_ID() is not affected by INSERTs done by sub-statements, as is desirable and tested in rpl_insert_id.test). sql/sql_class.h: new variables and methods for auto_increment. Some THD members move into handler (those which are really about the table being inserted), some stay in THD (those which are about what a future LAST_INSERT_ID() should return, or about what should be stored into the statement-based binlog). THD::next_insert_id moves to handler::. THD::clear_next_insert_id removed (had become equivalent to next_insert_id > 0). THD::last_insert_id becomes four: THD::first_successful_insert_id_in_cur_stmt, THD::auto_inc_intervals_for_binlog, handler::insert_id_for_cur_row, THD::first_successful_insert_id_in_prev_stmt. THD::current_insert_id becomes: THD::first_successful_insert_id_in_prev_stmt_for_binlog THD::prev_insert_id is removed, handler can just use handler::insert_id_for_cur_row instead (which is more accurate: for the first row, prev_insert_id was set before get_auto_increment was called, so was 0, causing a call to get_auto_increment() for the 2nd row if the 1st row fails; here we don't need the call as insert_id_for_cur_row has the value of the first row). THD::last_insert_id_used becomes: stmt_depends_on_first_row_in_prev_stmt THD::insert_id_used is removed (equivalent to auto_inc_intervals_for_binlog non empty). The interval returned by get_auto_increment() and currently being consumed is handler::auto_inc_interval_for_cur_row. Comments to explain each of them. select_insert::last_insert_id becomes autoinc_value_of_last_inserted_row. sql/sql_insert.cc: the "id" variable is not changed for each row now; it used to compensate for this contradiction: - thd->last_insert_id supposed job was to keep the id of the first row - but it was updated for every row - so mysql_insert() made sure to catch its first value and restore it at the end of stmt. Now THD keeps the first value in first_successful_insert_id_in_cur_stmt, and value of the row in insert_id_for_cur_row. So "id" only serves to fill mysql_insert_id(), as depending on some conditions, "id" must be different values. Prev_insert_id moves from THD to write_record(). We now set LAST_INSERT_ID() in ON DUPLICATE KEY UPDATE too (BUG#19243). In an INSERT DELAYED, we still "reset auto-increment caching" but differently (by calling ha_release_auto_increment()). sql/sql_load.cc: no need to fiddle with "id", THD maintains THD::first_successful_insert_id_in_cur_stmt by itself and correctly now. ha_release_auto_increment() is now (logically) called before we unlock the table. sql/sql_parse.cc: update to new variable names. Assertion that reset_thd_for_next_command() is not called for every substatement of a routine (I'm not against it, but if we do this change, statement-based binlogging needs some adjustments). sql/sql_select.cc: update for new variable names sql/sql_table.cc: next_insert_id not needed in mysql_alter_table(), THD manages. sql/sql_update.cc: update for new variable names. Even though this is UPDATE, an insert id can be generated (by LAST_INSERT_ID(X)) and should be recorded because mysql_insert_id() wants to know about it. sql/structs.h: A class for "discrete" intervals (intervals of integer numbers with a certain increment between them): Discrete_interval, and a class for a list of such intervals: Discrete_intervals_list tests/mysql_client_test.c: tests of behaviour of mysql_insert_id(): there were no such tests, while in our manual we document its behaviour. In comments you'll notice the behaviour changes introduced (there are 5).
2006-07-09 17:52:19 +02:00
drop table t1;
reset master;
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 347
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 */;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000002 107
drop table t3;
#
# Bug #45998: database crashes when running "create as select"
#
CREATE DATABASE test1;
USE test1;
DROP DATABASE test1;
CREATE TABLE test.t1(a int);
INSERT INTO test.t1 VALUES (1), (2);
CREATE TABLE test.t2 SELECT * FROM test.t1;
USE test;
DROP TABLES t1, t2;
Bug#46640: output from mysqlbinlog command in 5.1 breaks replication The BINLOG statement was sharing too much code with the slave SQL thread, introduced with the patch for Bug#32407. This caused statements to be logged with the wrong server_id, the id stored inside the events of the BINLOG statement rather than the id of the running server. Fix by rearranging code a bit so that only relevant parts of the code are executed by the BINLOG statement, and the server_id of the server executing the statements will not be overrided by the server_id stored in the 'format description BINLOG statement'. mysql-test/extra/binlog_tests/binlog.test: Added test to verify if the server_id stored in the 'format description BINLOG statement' will override the server_id of the server executing the statements. mysql-test/suite/binlog/r/binlog_row_binlog.result: Test result for bug#46640 mysql-test/suite/binlog/r/binlog_stm_binlog.result: Test result for bug#46640 sql/log_event.cc: Moved rows_event_stmt_clean() call from update_pos() to apply_event(). This in any case makes more sense, and is needed as update_pos() is no longer called when executing BINLOG statements. Moved setting of rli->relay_log.description_event_for_exec from Format_description_log_event::do_update_pos() to Format_description_log_event::do_apply_event() sql/log_event_old.cc: Moved rows_event_stmt_clean() call from update_pos() to apply_event(). This in any case makes more sense, and is needed as update_pos() is no longer called when executing BINLOG statements. sql/slave.cc: The skip flag is no longer needed, as the code path for BINLOG statement has been cleaned up. sql/sql_binlog.cc: Don't invoke the update_pos() code path for the BINLOG statement, as it contains code that is redundant and/or harmful (especially setting thd->server_id).
2009-10-14 03:39:05 +02:00
RESET MASTER;
CREATE TABLE t1 (a INT PRIMARY KEY);
BINLOG '
3u9kSA8KAAAAZgAAAGoAAAABAAQANS4xLjM1LW1hcmlhLWJldGExLWRlYnVnLWxvZwAAAAAAAAAA
AAAAAAAAAAAAAAAAAADe72RIEzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC
';
INSERT INTO t1 VALUES (1);
BINLOG '
3u9kSBMUAAAAKQAAAJEBAAAAABoAAAAAAAAABHRlc3QAAnQxAAEDAAA=
3u9kSBcUAAAAIgAAALMBAAAQABoAAAAAAAEAAf/+AgAAAA==
';
SHOW BINLOG EVENTS;
Log_name Pos Event_type Server_id End_log_pos Info
# # Format_desc 1 # Server ver: #, Binlog ver: #
# # Query 1 # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY)
# # Query 1 # BEGIN
Bug#46640: output from mysqlbinlog command in 5.1 breaks replication The BINLOG statement was sharing too much code with the slave SQL thread, introduced with the patch for Bug#32407. This caused statements to be logged with the wrong server_id, the id stored inside the events of the BINLOG statement rather than the id of the running server. Fix by rearranging code a bit so that only relevant parts of the code are executed by the BINLOG statement, and the server_id of the server executing the statements will not be overrided by the server_id stored in the 'format description BINLOG statement'. mysql-test/extra/binlog_tests/binlog.test: Added test to verify if the server_id stored in the 'format description BINLOG statement' will override the server_id of the server executing the statements. mysql-test/suite/binlog/r/binlog_row_binlog.result: Test result for bug#46640 mysql-test/suite/binlog/r/binlog_stm_binlog.result: Test result for bug#46640 sql/log_event.cc: Moved rows_event_stmt_clean() call from update_pos() to apply_event(). This in any case makes more sense, and is needed as update_pos() is no longer called when executing BINLOG statements. Moved setting of rli->relay_log.description_event_for_exec from Format_description_log_event::do_update_pos() to Format_description_log_event::do_apply_event() sql/log_event_old.cc: Moved rows_event_stmt_clean() call from update_pos() to apply_event(). This in any case makes more sense, and is needed as update_pos() is no longer called when executing BINLOG statements. sql/slave.cc: The skip flag is no longer needed, as the code path for BINLOG statement has been cleaned up. sql/sql_binlog.cc: Don't invoke the update_pos() code path for the BINLOG statement, as it contains code that is redundant and/or harmful (especially setting thd->server_id).
2009-10-14 03:39:05 +02:00
# # Query 1 # use `test`; INSERT INTO t1 VALUES (1)
# # Query 1 # COMMIT
Bug#46640: output from mysqlbinlog command in 5.1 breaks replication The BINLOG statement was sharing too much code with the slave SQL thread, introduced with the patch for Bug#32407. This caused statements to be logged with the wrong server_id, the id stored inside the events of the BINLOG statement rather than the id of the running server. Fix by rearranging code a bit so that only relevant parts of the code are executed by the BINLOG statement, and the server_id of the server executing the statements will not be overrided by the server_id stored in the 'format description BINLOG statement'. mysql-test/extra/binlog_tests/binlog.test: Added test to verify if the server_id stored in the 'format description BINLOG statement' will override the server_id of the server executing the statements. mysql-test/suite/binlog/r/binlog_row_binlog.result: Test result for bug#46640 mysql-test/suite/binlog/r/binlog_stm_binlog.result: Test result for bug#46640 sql/log_event.cc: Moved rows_event_stmt_clean() call from update_pos() to apply_event(). This in any case makes more sense, and is needed as update_pos() is no longer called when executing BINLOG statements. Moved setting of rli->relay_log.description_event_for_exec from Format_description_log_event::do_update_pos() to Format_description_log_event::do_apply_event() sql/log_event_old.cc: Moved rows_event_stmt_clean() call from update_pos() to apply_event(). This in any case makes more sense, and is needed as update_pos() is no longer called when executing BINLOG statements. sql/slave.cc: The skip flag is no longer needed, as the code path for BINLOG statement has been cleaned up. sql/sql_binlog.cc: Don't invoke the update_pos() code path for the BINLOG statement, as it contains code that is redundant and/or harmful (especially setting thd->server_id).
2009-10-14 03:39:05 +02:00
# # Query 1 # BEGIN
# # Table_map 1 # table_id: # (test.t1)
# # Write_rows 1 # table_id: # flags: STMT_END_F
# # Query 1 # COMMIT
DROP TABLE t1;