diff options
author | unknown <mats@mysql.com> | 2006-02-24 16:19:55 +0100 |
---|---|---|
committer | unknown <mats@mysql.com> | 2006-02-24 16:19:55 +0100 |
commit | 613fb54f95f440baa02ba31fbc317c2a880f3513 (patch) | |
tree | e45e91976dfa93a26c07b19e063f5073126ba2d2 | |
parent | 738a1ca08db810aa37069da149aa21590292caac (diff) | |
download | mariadb-git-613fb54f95f440baa02ba31fbc317c2a880f3513.tar.gz |
WL#3023 (RBR: Use locks in a statement-like manner):
Adaptions to make it work with NDB.
mysql-test/extra/binlog_tests/binlog.test:
Using replace_regex to remove table id.
mysql-test/extra/binlog_tests/blackhole.test:
Using replace_regex to remove table id.
mysql-test/extra/binlog_tests/ctype_cp932.test:
Using replace_regex to remove table id.
mysql-test/extra/binlog_tests/ctype_cp932_binlog.test:
Using replace_regex to remove table id.
mysql-test/extra/binlog_tests/ctype_ucs_binlog.test:
Using replace_regex to remove table id.
mysql-test/extra/binlog_tests/drop_temp_table.test:
Using replace_regex to remove table id.
mysql-test/extra/binlog_tests/insert_select-binlog.test:
Using replace_regex to remove table id.
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
Using replace_regex to remove table id.
mysql-test/extra/rpl_tests/rpl_flsh_tbls.test:
Using replace_regex to remove table id.
mysql-test/extra/rpl_tests/rpl_log.test:
Using replace_regex to remove table id.
mysql-test/extra/rpl_tests/rpl_multi_query.test:
Using replace_regex to remove table id.
mysql-test/extra/rpl_tests/rpl_row_charset.test:
Using replace_regex to remove table id.
mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test:
Using replace_regex to remove table id.
mysql-test/extra/rpl_tests/rpl_stm_charset.test:
Using replace_regex to remove table id.
mysql-test/include/rpl_row_basic.inc:
Removing sync with master on cleanup since there are engines that does
not work in a "syncronized" fashion on dropping tables.
mysql-test/r/binlog_row_binlog.result:
Result change
mysql-test/r/binlog_row_blackhole.result:
Result change
mysql-test/r/binlog_row_ctype_cp932.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/ctype_cp932_binlog_row.result:
Result change
mysql-test/r/rpl_row_basic_11bugs.result:
Result change
mysql-test/r/rpl_row_basic_2myisam.result:
Result change
mysql-test/r/rpl_row_basic_3innodb.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_log.result:
Result change
mysql-test/r/rpl_row_log_innodb.result:
Result change
mysql-test/r/rpl_row_max_relay_size.result:
Result change
mysql-test/r/rpl_row_sp008.result:
Result change
mysql-test/t/binlog_stm_binlog.test:
Using replace_regex to remove table id.
mysql-test/t/ndb_binlog_ddl_multi.test:
Using replace_regex to remove table id.
mysql-test/t/ndb_binlog_ignore_db.test:
Using replace_regex to remove table id.
mysql-test/t/rpl_heap.test:
Using replace_regex to remove table id.
mysql-test/t/rpl_loaddata_s.test:
Using replace_regex to remove table id.
mysql-test/t/rpl_ndb_blob.test:
Using replace_regex to remove table id.
mysql-test/t/rpl_ndb_disk.test:
Using replace_regex to remove table id.
mysql-test/t/rpl_row_basic_11bugs.test:
Using replace_regex to remove table id.
mysql-test/t/rpl_row_create_table.test:
Using replace_regex to remove table id.
mysql-test/t/rpl_row_drop.test:
Using replace_regex to remove table id.
mysql-test/t/rpl_row_sp008.test:
Using replace_regex to remove table id.
mysql-test/t/rpl_sp.test:
Using replace_regex to remove table id.
mysql-test/t/sp.test:
Using replace_regex to remove table id.
mysql-test/t/sp_notembedded.test:
Using replace_regex to remove table id.
mysql-test/t/user_var-binlog.test:
Using replace_regex to remove table id.
sql/ha_ndbcluster_binlog.cc:
Assign_new_table_id() now takes table share.
Removed gratuitous friend declaration of ndb_add_binlog_index().
Turning of binlogging during execution of ndb_add_binlog_index().
sql/handler.h:
Removed gratuitous friend declaration of ndb_add_binlog_index().
sql/log.cc:
Adding debug printout.
sql/log_event.cc:
Closing thread tables on dummy event.
sql/rpl_injector.cc:
Added support for new locking scheme.
sql/rpl_injector.h:
Added support for new locking scheme.
53 files changed, 647 insertions, 503 deletions
diff --git a/mysql-test/extra/binlog_tests/binlog.test b/mysql-test/extra/binlog_tests/binlog.test index 8eb1dcb7dc3..46d012f123b 100644 --- a/mysql-test/extra/binlog_tests/binlog.test +++ b/mysql-test/extra/binlog_tests/binlog.test @@ -21,6 +21,7 @@ insert t2 values (5); commit; # first COMMIT must be Query_log_event, second - Xid_log_event --replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events from 102; drop table t1,t2; @@ -42,6 +43,8 @@ while ($1) commit; drop table t1; --replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events in 'master-bin.000001' from 102; --replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events in 'master-bin.000002' from 102; diff --git a/mysql-test/extra/binlog_tests/blackhole.test b/mysql-test/extra/binlog_tests/blackhole.test index 7e03dc9ed57..3d1614b4035 100644 --- a/mysql-test/extra/binlog_tests/blackhole.test +++ b/mysql-test/extra/binlog_tests/blackhole.test @@ -122,6 +122,7 @@ select * from t3; let $VERSION=`select version()`; --replace_result $VERSION VERSION --replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events; drop table t1,t2,t3; @@ -143,4 +144,5 @@ rollback; set autocommit=1; --replace_result $VERSION VERSION --replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events; diff --git a/mysql-test/extra/binlog_tests/ctype_cp932.test b/mysql-test/extra/binlog_tests/ctype_cp932.test index 6fb91e9ae50..890aa701918 100644 --- a/mysql-test/extra/binlog_tests/ctype_cp932.test +++ b/mysql-test/extra/binlog_tests/ctype_cp932.test @@ -415,6 +415,7 @@ SET @var1= x'8300'; # code (and I have used it to test the fix) until there is some way to # exercise this code from mysql-test-run. EXECUTE stmt1 USING @var1; +--replace_regex /table_id: [0-9]+/table_id: #/ SHOW BINLOG EVENTS FROM 102; SELECT HEX(f1) FROM t1; DROP table t1; diff --git a/mysql-test/extra/binlog_tests/ctype_cp932_binlog.test b/mysql-test/extra/binlog_tests/ctype_cp932_binlog.test index a17f8f827a6..5e93d6e126e 100644 --- a/mysql-test/extra/binlog_tests/ctype_cp932_binlog.test +++ b/mysql-test/extra/binlog_tests/ctype_cp932_binlog.test @@ -27,6 +27,7 @@ SET @var1= x'8300'; # exercise this code from mysql-test-run. EXECUTE stmt1 USING @var1; --replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ SHOW BINLOG EVENTS FROM 102; SELECT HEX(f1) FROM t1; DROP table t1; diff --git a/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test b/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test index 940310e4499..afe594b8d36 100644 --- a/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test +++ b/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test @@ -9,6 +9,7 @@ create table t2 (c char(30)) charset=ucs2; set @v=convert('abc' using ucs2); reset master; insert into t2 values (@v); +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events from 102; # more important than SHOW BINLOG EVENTS, mysqlbinlog (where we # absolutely need variables names to be quoted and strings to be diff --git a/mysql-test/extra/binlog_tests/drop_temp_table.test b/mysql-test/extra/binlog_tests/drop_temp_table.test index bc06de4096c..9c8647395bf 100644 --- a/mysql-test/extra/binlog_tests/drop_temp_table.test +++ b/mysql-test/extra/binlog_tests/drop_temp_table.test @@ -25,6 +25,7 @@ select get_lock("a",10); let $VERSION=`select version()`; --replace_result $VERSION VERSION --replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events; drop database `drop-temp+table-test`; diff --git a/mysql-test/extra/binlog_tests/insert_select-binlog.test b/mysql-test/extra/binlog_tests/insert_select-binlog.test index d4041f86ab5..a01dae5934b 100644 --- a/mysql-test/extra/binlog_tests/insert_select-binlog.test +++ b/mysql-test/extra/binlog_tests/insert_select-binlog.test @@ -15,6 +15,7 @@ insert into t1 select * from t2; # verify the binlog : let $VERSION=`select version()`; --replace_result $VERSION VERSION +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events; select * from t1; drop table t1, t2; @@ -29,6 +30,7 @@ create table t2(unique(a)) select a from t1; # The above should produce an error, *and* not appear in the binlog let $VERSION=`select version()`; --replace_result $VERSION VERSION +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events; drop table t1; diff --git a/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test b/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test index 0de20ed8be8..18f620829ec 100644 --- a/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test +++ b/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test @@ -30,6 +30,7 @@ insert into t2 select * from t1; commit; --replace_column 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events from 102; delete from t1; @@ -43,6 +44,7 @@ insert into t2 select * from t1; rollback; --replace_column 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events from 102; delete from t1; @@ -58,6 +60,7 @@ rollback to savepoint my_savepoint; commit; --replace_column 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events from 102; delete from t1; @@ -75,6 +78,7 @@ commit; select a from t1 order by a; # check that savepoints work :) --replace_column 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events from 102; # and when ROLLBACK is not explicit? @@ -96,6 +100,7 @@ connection con2; # logging has been done, we use a user lock. select get_lock("a",10); --replace_column 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events from 102; # and when not in a transact1on? @@ -107,6 +112,7 @@ insert into t1 values(9); insert into t2 select * from t1; --replace_column 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events from 102; # Check that when the query updat1ng the MyISAM table is the first in the @@ -119,11 +125,13 @@ insert into t1 values(10); # first make t1 non-empty begin; insert into t2 select * from t1; --replace_column 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events from 102; insert into t1 values(11); commit; --replace_column 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events from 102; @@ -142,6 +150,7 @@ insert into t2 select * from t1; commit; --replace_column 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events from 102; delete from t1; @@ -154,6 +163,7 @@ insert into t2 select * from t1; rollback; --replace_column 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events from 102; delete from t1; @@ -169,6 +179,7 @@ rollback to savepoint my_savepoint; commit; --replace_column 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events from 102; delete from t1; @@ -186,6 +197,7 @@ commit; select a from t1 order by a; # check that savepoints work :) --replace_column 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events from 102; # Test for BUG#5714, where a MyISAM update in the transaction used to @@ -246,6 +258,7 @@ disconnect con2; connection con3; select get_lock("lock1",60); --replace_column 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events from 102; do release_lock("lock1"); drop table t0,t2; diff --git a/mysql-test/extra/rpl_tests/rpl_flsh_tbls.test b/mysql-test/extra/rpl_tests/rpl_flsh_tbls.test index c5db667e29b..cfa943228fa 100644 --- a/mysql-test/extra/rpl_tests/rpl_flsh_tbls.test +++ b/mysql-test/extra/rpl_tests/rpl_flsh_tbls.test @@ -19,6 +19,7 @@ flush no_write_to_binlog tables; # Check that it's not in the binlog. --replace_result $SERVER_VERSION SERVER_VERSION --replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ eval SHOW BINLOG EVENTS FROM $rename_event_pos ; # Check that the master is not confused. select * from t3; @@ -27,6 +28,7 @@ flush tables; # Check that it's in the binlog. --replace_result $SERVER_VERSION SERVER_VERSION --replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ eval SHOW BINLOG EVENTS FROM $rename_event_pos ; save_master_pos; connection slave; diff --git a/mysql-test/extra/rpl_tests/rpl_log.test b/mysql-test/extra/rpl_tests/rpl_log.test index 7f1c50aaf0e..b942ad29679 100644 --- a/mysql-test/extra/rpl_tests/rpl_log.test +++ b/mysql-test/extra/rpl_tests/rpl_log.test @@ -39,16 +39,16 @@ select count(*) from t1; drop table t1; --replace_result $VERSION VERSION --replace_column 2 # 5 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ show binlog events; --replace_column 2 # 5 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ show binlog events from 102 limit 1; --replace_column 2 # 5 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ show binlog events from 102 limit 2; --replace_column 2 # 5 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ show binlog events from 102 limit 2,1; flush logs; @@ -91,11 +91,11 @@ insert into t1 values (1); drop table t1; --replace_result $VERSION VERSION --replace_column 2 # 5 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ show binlog events; --replace_result $VERSION VERSION --replace_column 2 # 5 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ show binlog events in 'master-bin.000002'; show binary logs; save_master_pos; @@ -105,11 +105,11 @@ sync_with_master; show binary logs; --replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION --replace_column 2 # 5 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ show binlog events in 'slave-bin.000001' from 4; --replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION --replace_column 2 # 5 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ show binlog events in 'slave-bin.000002' from 4; --replace_result $MASTER_MYPORT MASTER_PORT --replace_column 1 # 8 # 9 # 16 # 23 # 33 # diff --git a/mysql-test/extra/rpl_tests/rpl_multi_query.test b/mysql-test/extra/rpl_tests/rpl_multi_query.test index a0062bd04bf..30a83886a86 100644 --- a/mysql-test/extra/rpl_tests/rpl_multi_query.test +++ b/mysql-test/extra/rpl_tests/rpl_multi_query.test @@ -24,6 +24,7 @@ sync_slave_with_master; select * from mysqltest.t1; connection master; --replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events from 102; drop database mysqltest; sync_slave_with_master; diff --git a/mysql-test/extra/rpl_tests/rpl_row_charset.test b/mysql-test/extra/rpl_tests/rpl_row_charset.test index c2a7cda4333..2533806983f 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_charset.test +++ b/mysql-test/extra/rpl_tests/rpl_row_charset.test @@ -114,6 +114,7 @@ connection master; drop database mysqltest2; drop database mysqltest3; --replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events from 102; sync_slave_with_master; @@ -162,7 +163,7 @@ select hex(c1), hex(c2) from t1; connection master; # Let's have a look at generated SETs. ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +#--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR #--exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000001 drop table t1; sync_slave_with_master; diff --git a/mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test b/mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test index fc899f1fa5f..8425ecf55a6 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test +++ b/mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test @@ -14,6 +14,7 @@ sync_slave_with_master; connection master; --replace_result $VERSION VERSION +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events; sync_slave_with_master; select * from t1; diff --git a/mysql-test/extra/rpl_tests/rpl_stm_charset.test b/mysql-test/extra/rpl_tests/rpl_stm_charset.test index e5209a9b9ac..d29a82cfd31 100644 --- a/mysql-test/extra/rpl_tests/rpl_stm_charset.test +++ b/mysql-test/extra/rpl_tests/rpl_stm_charset.test @@ -110,6 +110,7 @@ connection master; drop database mysqltest2; drop database mysqltest3; --replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events from 102; sync_slave_with_master; diff --git a/mysql-test/include/rpl_row_basic.inc b/mysql-test/include/rpl_row_basic.inc index 9f1cc186388..ea2c4c1688c 100644 --- a/mysql-test/include/rpl_row_basic.inc +++ b/mysql-test/include/rpl_row_basic.inc @@ -174,22 +174,16 @@ SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; connection master; eval CREATE TABLE t7 (C1 INT PRIMARY KEY, C2 INT) ENGINE = $type ; sync_slave_with_master; ---disable_query_log -SELECT "--- on slave: original values ---" AS ""; ---enable_query_log +--echo --- on slave: original values --- INSERT INTO t7 VALUES (1,3), (2,6), (3,9); SELECT * FROM t7 ORDER BY C1; connection master; ---disable_query_log -SELECT "--- on master: new values inserted ---" AS ""; ---enable_query_log +--echo --- on master: new values inserted --- INSERT INTO t7 VALUES (1,2), (2,4), (3,6); SELECT * FROM t7 ORDER BY C1; sync_slave_with_master; ---disable_query_log -SELECT "--- on slave: old values should be overwritten by replicated values ---" AS ""; ---enable_query_log +--echo --- on slave: old values should be overwritten by replicated values --- SELECT * FROM t7 ORDER BY C1; # @@ -197,42 +191,33 @@ SELECT * FROM t7 ORDER BY C1; # causing a conflict for a key that is not "last". # connection master; ---disable_query_log -SELECT "--- on master ---" AS ""; ---enable_query_log -DROP TABLE t7; -eval CREATE TABLE t7 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = $type ; +--echo --- on master --- +eval CREATE TABLE t8 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = $type ; # First we make sure that the constraints are correctly set. -INSERT INTO t7 VALUES (99,99,99); +INSERT INTO t8 VALUES (99,99,99); --error 1062 -INSERT INTO t7 VALUES (99,22,33); +INSERT INTO t8 VALUES (99,22,33); --error 1062 -INSERT INTO t7 VALUES (11,99,33); +INSERT INTO t8 VALUES (11,99,33); --error 1062 -INSERT INTO t7 VALUES (11,22,99); -SELECT * FROM t7 ORDER BY a; +INSERT INTO t8 VALUES (11,22,99); +SELECT * FROM t8 ORDER BY a; sync_slave_with_master; ---disable_query_log -SELECT "--- on slave ---" AS ""; ---enable_query_log -SELECT * FROM t7 ORDER BY a; -INSERT INTO t7 VALUES (1,2,3), (2,4,6), (3,6,9); -SELECT * FROM t7 ORDER BY a; +--echo --- on slave --- +SELECT * FROM t8 ORDER BY a; +INSERT INTO t8 VALUES (1,2,3), (2,4,6), (3,6,9); +SELECT * FROM t8 ORDER BY a; connection master; ---disable_query_log -SELECT "--- on master ---" AS ""; ---enable_query_log +--echo --- on master --- # We insert a row that will cause conflict on the primary key but not # on the other keys. -INSERT INTO t7 VALUES (2,4,8); +INSERT INTO t8 VALUES (2,4,8); sync_slave_with_master; ---disable_query_log -SELECT "--- on slave ---" AS ""; ---enable_query_log -SELECT * FROM t7 ORDER BY a; +--echo --- on slave --- +SELECT * FROM t8 ORDER BY a; # # Test conflicting operations when changing in a table referenced by a @@ -245,5 +230,4 @@ SELECT * FROM t7 ORDER BY a; # connection master; -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; -sync_slave_with_master; +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8; diff --git a/mysql-test/r/binlog_row_binlog.result b/mysql-test/r/binlog_row_binlog.result index df69ca29b2f..6cb086109b4 100644 --- a/mysql-test/r/binlog_row_binlog.result +++ b/mysql-test/r/binlog_row_binlog.result @@ -13,12 +13,12 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=bdb master-bin.000001 # Query 1 # use `test`; create table t2 (a int) engine=innodb master-bin.000001 # Query 1 # use `test`; BEGIN -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # use `test`; COMMIT master-bin.000001 # Query 1 # use `test`; BEGIN -master-bin.000001 # Table_map 1 # test.t2 -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (test.t2) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Xid 1 # COMMIT /* xid= */ drop table t1,t2; reset master; @@ -30,206 +30,206 @@ show binlog events in 'master-bin.000001' from 102; 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 # use `test`; BEGIN -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Xid 1 # COMMIT /* xid= */ master-bin.000001 # Rotate 1 # master-bin.000002;pos=4 show binlog events in 'master-bin.000002' from 102; diff --git a/mysql-test/r/binlog_row_blackhole.result b/mysql-test/r/binlog_row_blackhole.result index 7b1e64b00d8..aa5c943de00 100644 --- a/mysql-test/r/binlog_row_blackhole.result +++ b/mysql-test/r/binlog_row_blackhole.result @@ -109,33 +109,33 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 master-bin.000001 # Query 1 # use `test`; drop table t1,t2 master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=blackhole -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # use `test`; COMMIT -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # use `test`; COMMIT -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # use `test`; COMMIT -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # use `test`; COMMIT -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # use `test`; COMMIT master-bin.000001 # Query 1 # use `test`; create table t2 (a varchar(200)) engine=blackhole -master-bin.000001 # Table_map 1 # test.t2 -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (test.t2) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # use `test`; COMMIT master-bin.000001 # Query 1 # use `test`; alter table t1 add b int master-bin.000001 # Query 1 # use `test`; alter table t1 drop b master-bin.000001 # Query 1 # use `test`; create table t3 like t1 -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # use `test`; COMMIT -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # use `test`; COMMIT drop table t1,t2,t3; reset master; @@ -153,6 +153,6 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 master-bin.000001 # Query 1 # use `test`; create table t1 (a int) engine=blackhole master-bin.000001 # Query 1 # use `test`; BEGIN -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # use `test`; COMMIT diff --git a/mysql-test/r/binlog_row_ctype_cp932.result b/mysql-test/r/binlog_row_ctype_cp932.result index 6d213158ef6..4e0ba6f6a20 100644 --- a/mysql-test/r/binlog_row_ctype_cp932.result +++ b/mysql-test/r/binlog_row_ctype_cp932.result @@ -11323,8 +11323,8 @@ EXECUTE stmt1 USING @var1; SHOW BINLOG EVENTS FROM 102; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 102 Query 1 189 use `test`; CREATE TABLE t1(f1 blob) -master-bin.000001 189 Table_map 1 228 test.t1 -master-bin.000001 228 Write_rows 1 262 +master-bin.000001 189 Table_map 1 228 table_id: # (test.t1) +master-bin.000001 228 Write_rows 1 262 table_id: # flags: STMT_END_F SELECT HEX(f1) FROM t1; HEX(f1) 8300 @@ -11366,4 +11366,3 @@ col1 a a a -drop table t1; diff --git a/mysql-test/r/binlog_row_ctype_ucs.result b/mysql-test/r/binlog_row_ctype_ucs.result index 12f7062d38a..5feb17cde13 100644 --- a/mysql-test/r/binlog_row_ctype_ucs.result +++ b/mysql-test/r/binlog_row_ctype_ucs.result @@ -5,8 +5,8 @@ reset master; insert into t2 values (@v); show binlog events from 102; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 102 Table_map 1 141 test.t2 -master-bin.000001 141 Write_rows 1 231 +master-bin.000001 102 Table_map 1 141 table_id: # (test.t2) +master-bin.000001 141 Write_rows 1 231 table_id: # flags: STMT_END_F /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; ROLLBACK; diff --git a/mysql-test/r/binlog_row_insert_select.result b/mysql-test/r/binlog_row_insert_select.result index 27c515e5781..870d255d004 100644 --- a/mysql-test/r/binlog_row_insert_select.result +++ b/mysql-test/r/binlog_row_insert_select.result @@ -4,12 +4,12 @@ create table t2(a int); insert into t2 values(1),(2); reset master; insert into t1 select * from t2; -ERROR 23000: Duplicate entry '2' for key 1 +ERROR 23000: Duplicate entry '2' for key 'a' show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 102 Server ver: VERSION, Binlog ver: 4 -master-bin.000001 102 Table_map 1 141 test.t1 -master-bin.000001 141 Write_rows 1 175 +master-bin.000001 102 Table_map 1 141 table_id: # (test.t1) +master-bin.000001 141 Write_rows 1 175 table_id: # flags: STMT_END_F select * from t1; a 1 @@ -19,7 +19,7 @@ create table t1(a int); insert into t1 values(1),(1); reset master; create table t2(unique(a)) select a from t1; -ERROR 23000: Duplicate entry '1' for key 1 +ERROR 23000: Duplicate entry '1' for key 'a' show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 102 Server ver: VERSION, Binlog ver: 4 diff --git a/mysql-test/r/binlog_row_mix_innodb_myisam.result b/mysql-test/r/binlog_row_mix_innodb_myisam.result index 4ebbec4a424..324527fa036 100644 --- a/mysql-test/r/binlog_row_mix_innodb_myisam.result +++ b/mysql-test/r/binlog_row_mix_innodb_myisam.result @@ -9,10 +9,10 @@ commit; show binlog events from 102; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 102 Query 1 # use `test`; BEGIN -master-bin.000001 170 Table_map 1 # test.t1 -master-bin.000001 209 Write_rows 1 # -master-bin.000001 243 Table_map 1 # test.t2 -master-bin.000001 282 Write_rows 1 # +master-bin.000001 170 Table_map 1 # table_id: # (test.t1) +master-bin.000001 209 Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 243 Table_map 1 # table_id: # (test.t2) +master-bin.000001 282 Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 316 Xid 1 # COMMIT /* xid= */ delete from t1; delete from t2; @@ -26,10 +26,10 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back show binlog events from 102; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 102 Query 1 # use `test`; BEGIN -master-bin.000001 170 Table_map 1 # test.t1 -master-bin.000001 209 Write_rows 1 # -master-bin.000001 243 Table_map 1 # test.t2 -master-bin.000001 282 Write_rows 1 # +master-bin.000001 170 Table_map 1 # table_id: # (test.t1) +master-bin.000001 209 Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 243 Table_map 1 # table_id: # (test.t2) +master-bin.000001 282 Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 316 Query 1 # use `test`; ROLLBACK delete from t1; delete from t2; @@ -46,13 +46,13 @@ commit; show binlog events from 102; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 102 Query 1 # use `test`; BEGIN -master-bin.000001 170 Table_map 1 # test.t1 -master-bin.000001 209 Write_rows 1 # +master-bin.000001 170 Table_map 1 # table_id: # (test.t1) +master-bin.000001 209 Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 243 Query 1 # use `test`; savepoint my_savepoint -master-bin.000001 328 Table_map 1 # test.t1 -master-bin.000001 367 Write_rows 1 # -master-bin.000001 401 Table_map 1 # test.t2 -master-bin.000001 440 Write_rows 1 # +master-bin.000001 328 Table_map 1 # table_id: # (test.t1) +master-bin.000001 367 Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 401 Table_map 1 # table_id: # (test.t2) +master-bin.000001 440 Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 479 Query 1 # use `test`; rollback to savepoint my_savepoint master-bin.000001 576 Xid 1 # COMMIT /* xid= */ delete from t1; @@ -75,16 +75,16 @@ a show binlog events from 102; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 102 Query 1 # use `test`; BEGIN -master-bin.000001 170 Table_map 1 # test.t1 -master-bin.000001 209 Write_rows 1 # +master-bin.000001 170 Table_map 1 # table_id: # (test.t1) +master-bin.000001 209 Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 243 Query 1 # use `test`; savepoint my_savepoint -master-bin.000001 328 Table_map 1 # test.t1 -master-bin.000001 367 Write_rows 1 # -master-bin.000001 401 Table_map 1 # test.t2 -master-bin.000001 440 Write_rows 1 # +master-bin.000001 328 Table_map 1 # table_id: # (test.t1) +master-bin.000001 367 Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 401 Table_map 1 # table_id: # (test.t2) +master-bin.000001 440 Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 479 Query 1 # use `test`; rollback to savepoint my_savepoint -master-bin.000001 576 Table_map 1 # test.t1 -master-bin.000001 615 Write_rows 1 # +master-bin.000001 576 Table_map 1 # table_id: # (test.t1) +master-bin.000001 615 Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 649 Xid 1 # COMMIT /* xid= */ delete from t1; delete from t2; @@ -101,10 +101,10 @@ get_lock("a",10) show binlog events from 102; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 102 Query 1 # use `test`; BEGIN -master-bin.000001 170 Table_map 1 # test.t1 -master-bin.000001 209 Write_rows 1 # -master-bin.000001 243 Table_map 1 # test.t2 -master-bin.000001 282 Write_rows 1 # +master-bin.000001 170 Table_map 1 # table_id: # (test.t1) +master-bin.000001 209 Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 243 Table_map 1 # table_id: # (test.t2) +master-bin.000001 282 Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 316 Query 1 # use `test`; ROLLBACK delete from t1; delete from t2; @@ -113,11 +113,11 @@ insert into t1 values(9); insert into t2 select * from t1; show binlog events from 102; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 102 Table_map 1 # test.t1 -master-bin.000001 141 Write_rows 1 # +master-bin.000001 102 Table_map 1 # table_id: # (test.t1) +master-bin.000001 141 Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 175 Xid 1 # COMMIT /* xid= */ -master-bin.000001 202 Table_map 1 # test.t2 -master-bin.000001 241 Write_rows 1 # +master-bin.000001 202 Table_map 1 # table_id: # (test.t2) +master-bin.000001 241 Write_rows 1 # table_id: # flags: STMT_END_F delete from t1; delete from t2; reset master; @@ -126,23 +126,23 @@ begin; insert into t2 select * from t1; show binlog events from 102; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 102 Table_map 1 # test.t1 -master-bin.000001 141 Write_rows 1 # +master-bin.000001 102 Table_map 1 # table_id: # (test.t1) +master-bin.000001 141 Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 175 Xid 1 # COMMIT /* xid= */ -master-bin.000001 202 Table_map 1 # test.t2 -master-bin.000001 241 Write_rows 1 # +master-bin.000001 202 Table_map 1 # table_id: # (test.t2) +master-bin.000001 241 Write_rows 1 # table_id: # flags: STMT_END_F insert into t1 values(11); commit; show binlog events from 102; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 102 Table_map 1 # test.t1 -master-bin.000001 141 Write_rows 1 # +master-bin.000001 102 Table_map 1 # table_id: # (test.t1) +master-bin.000001 141 Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 175 Xid 1 # COMMIT /* xid= */ -master-bin.000001 202 Table_map 1 # test.t2 -master-bin.000001 241 Write_rows 1 # +master-bin.000001 202 Table_map 1 # table_id: # (test.t2) +master-bin.000001 241 Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 275 Query 1 # use `test`; BEGIN -master-bin.000001 343 Table_map 1 # test.t1 -master-bin.000001 382 Write_rows 1 # +master-bin.000001 343 Table_map 1 # table_id: # (test.t1) +master-bin.000001 382 Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 416 Xid 1 # COMMIT /* xid= */ alter table t2 engine=INNODB; delete from t1; @@ -155,10 +155,10 @@ commit; show binlog events from 102; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 102 Query 1 # use `test`; BEGIN -master-bin.000001 170 Table_map 1 # test.t1 -master-bin.000001 209 Write_rows 1 # -master-bin.000001 243 Table_map 1 # test.t2 -master-bin.000001 282 Write_rows 1 # +master-bin.000001 170 Table_map 1 # table_id: # (test.t1) +master-bin.000001 209 Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 243 Table_map 1 # table_id: # (test.t2) +master-bin.000001 282 Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 316 Xid 1 # COMMIT /* xid= */ delete from t1; delete from t2; @@ -182,8 +182,8 @@ commit; show binlog events from 102; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 102 Query 1 # use `test`; BEGIN -master-bin.000001 170 Table_map 1 # test.t1 -master-bin.000001 209 Write_rows 1 # +master-bin.000001 170 Table_map 1 # table_id: # (test.t1) +master-bin.000001 209 Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 243 Xid 1 # COMMIT /* xid= */ delete from t1; delete from t2; @@ -203,14 +203,14 @@ a show binlog events from 102; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 102 Query 1 # use `test`; BEGIN -master-bin.000001 170 Table_map 1 # test.t1 -master-bin.000001 209 Write_rows 1 # -master-bin.000001 243 Table_map 1 # test.t1 -master-bin.000001 282 Write_rows 1 # +master-bin.000001 170 Table_map 1 # table_id: # (test.t1) +master-bin.000001 209 Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 243 Table_map 1 # table_id: # (test.t1) +master-bin.000001 282 Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 316 Xid 1 # COMMIT /* xid= */ delete from t1; delete from t2; -alter table t2 type=MyISAM; +alter table t2 engine=MyISAM; insert into t1 values (1); begin; select * from t1 for update; @@ -257,31 +257,31 @@ get_lock("lock1",60) show binlog events from 102; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 102 Query 1 # use `test`; BEGIN -master-bin.000001 170 Table_map 1 # test.t1 -master-bin.000001 209 Write_rows 1 # -master-bin.000001 243 Table_map 1 # test.t1 -master-bin.000001 282 Write_rows 1 # +master-bin.000001 170 Table_map 1 # table_id: # (test.t1) +master-bin.000001 209 Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 243 Table_map 1 # table_id: # (test.t1) +master-bin.000001 282 Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 316 Xid 1 # COMMIT /* xid= */ -master-bin.000001 343 Table_map 1 # test.t1 +master-bin.000001 343 Table_map 1 # table_id: # (test.t1) master-bin.000001 382 Query 1 # use `test`; delete from t1 master-bin.000001 459 Xid 1 # COMMIT /* xid= */ -master-bin.000001 486 Table_map 1 # test.t2 +master-bin.000001 486 Table_map 1 # table_id: # (test.t2) master-bin.000001 525 Query 1 # use `test`; delete from t2 master-bin.000001 602 Xid 1 # COMMIT /* xid= */ -master-bin.000001 629 Query 1 # use `test`; alter table t2 type=MyISAM -master-bin.000001 718 Table_map 1 # test.t1 -master-bin.000001 757 Write_rows 1 # -master-bin.000001 791 Xid 1 # COMMIT /* xid= */ -master-bin.000001 818 Query 1 # use `test`; BEGIN -master-bin.000001 886 Table_map 1 # test.t1 -master-bin.000001 925 Write_rows 1 # -master-bin.000001 954 Xid 1 # COMMIT /* xid= */ -master-bin.000001 981 Query 1 # use `test`; drop table t1,t2 -master-bin.000001 1060 Query 1 # use `test`; create table t0 (n int) -master-bin.000001 1146 Table_map 1 # test.t0 -master-bin.000001 1185 Write_rows 1 # -master-bin.000001 1219 Table_map 1 # test.t0 -master-bin.000001 1258 Write_rows 1 # -master-bin.000001 1292 Query 1 # use `test`; create table t2 (n int) engine=innodb +master-bin.000001 629 Query 1 # use `test`; alter table t2 engine=MyISAM +master-bin.000001 720 Table_map 1 # table_id: # (test.t1) +master-bin.000001 759 Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 793 Xid 1 # COMMIT /* xid= */ +master-bin.000001 820 Query 1 # use `test`; BEGIN +master-bin.000001 888 Table_map 1 # table_id: # (test.t1) +master-bin.000001 927 Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 956 Xid 1 # COMMIT /* xid= */ +master-bin.000001 983 Query 1 # use `test`; drop table t1,t2 +master-bin.000001 1062 Query 1 # use `test`; create table t0 (n int) +master-bin.000001 1148 Table_map 1 # table_id: # (test.t0) +master-bin.000001 1187 Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 1221 Table_map 1 # table_id: # (test.t0) +master-bin.000001 1260 Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 1294 Query 1 # use `test`; create table t2 (n int) engine=innodb do release_lock("lock1"); drop table t0,t2; diff --git a/mysql-test/r/ctype_cp932_binlog_row.result b/mysql-test/r/ctype_cp932_binlog_row.result index 913e8125619..f1a64241fbb 100644 --- a/mysql-test/r/ctype_cp932_binlog_row.result +++ b/mysql-test/r/ctype_cp932_binlog_row.result @@ -9,8 +9,8 @@ EXECUTE stmt1 USING @var1; SHOW BINLOG EVENTS FROM 102; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1(f1 blob) -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F SELECT HEX(f1) FROM t1; HEX(f1) 8300 diff --git a/mysql-test/r/rpl_row_basic_11bugs.result b/mysql-test/r/rpl_row_basic_11bugs.result index 772a22babfe..4e8c1ad1c9b 100644 --- a/mysql-test/r/rpl_row_basic_11bugs.result +++ b/mysql-test/r/rpl_row_basic_11bugs.result @@ -28,8 +28,8 @@ INSERT INTO t2 VALUES (3,3), (4,4); SHOW BINLOG EVENTS FROM 102; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 102 Query 1 195 use `test`; CREATE TABLE t1 (a INT, b INT) -master-bin.000001 195 Table_map 1 235 test.t1 -master-bin.000001 235 Write_rows 1 282 +master-bin.000001 195 Table_map 1 235 table_id: # (test.t1) +master-bin.000001 235 Write_rows 1 282 table_id: # flags: STMT_END_F **** On Slave **** SHOW DATABASES; Database diff --git a/mysql-test/r/rpl_row_basic_2myisam.result b/mysql-test/r/rpl_row_basic_2myisam.result index 12a8d8282e3..a6877b27b95 100644 --- a/mysql-test/r/rpl_row_basic_2myisam.result +++ b/mysql-test/r/rpl_row_basic_2myisam.result @@ -363,7 +363,6 @@ SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; C1 HEX(B1) HEX(B2) 1 NULL 0 CREATE TABLE t7 (C1 INT PRIMARY KEY, C2 INT) ENGINE = 'MYISAM' ; - --- on slave: original values --- INSERT INTO t7 VALUES (1,3), (2,6), (3,9); SELECT * FROM t7 ORDER BY C1; @@ -371,7 +370,6 @@ C1 C2 1 3 2 6 3 9 - --- on master: new values inserted --- INSERT INTO t7 VALUES (1,2), (2,4), (3,6); SELECT * FROM t7 ORDER BY C1; @@ -379,48 +377,42 @@ C1 C2 1 2 2 4 3 6 - --- on slave: old values should be overwritten by replicated values --- SELECT * FROM t7 ORDER BY C1; C1 C2 1 2 2 4 3 6 - --- on master --- -DROP TABLE t7; -CREATE TABLE t7 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = 'MYISAM' ; -INSERT INTO t7 VALUES (99,99,99); -INSERT INTO t7 VALUES (99,22,33); -ERROR 23000: Duplicate entry '99' for key 1 -INSERT INTO t7 VALUES (11,99,33); -ERROR 23000: Duplicate entry '99' for key 2 -INSERT INTO t7 VALUES (11,22,99); -ERROR 23000: Duplicate entry '99' for key 3 -SELECT * FROM t7 ORDER BY a; +CREATE TABLE t8 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = 'MYISAM' ; +INSERT INTO t8 VALUES (99,99,99); +INSERT INTO t8 VALUES (99,22,33); +ERROR 23000: Duplicate entry '99' for key 'PRIMARY' +INSERT INTO t8 VALUES (11,99,33); +ERROR 23000: Duplicate entry '99' for key 'b' +INSERT INTO t8 VALUES (11,22,99); +ERROR 23000: Duplicate entry '99' for key 'c' +SELECT * FROM t8 ORDER BY a; a b c 99 99 99 - --- on slave --- -SELECT * FROM t7 ORDER BY a; +SELECT * FROM t8 ORDER BY a; a b c 99 99 99 -INSERT INTO t7 VALUES (1,2,3), (2,4,6), (3,6,9); -SELECT * FROM t7 ORDER BY a; +INSERT INTO t8 VALUES (1,2,3), (2,4,6), (3,6,9); +SELECT * FROM t8 ORDER BY a; a b c 1 2 3 2 4 6 3 6 9 99 99 99 - --- on master --- -INSERT INTO t7 VALUES (2,4,8); - +INSERT INTO t8 VALUES (2,4,8); --- on slave --- -SELECT * FROM t7 ORDER BY a; +SELECT * FROM t8 ORDER BY a; a b c 1 2 3 2 4 8 3 6 9 99 99 99 -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8; diff --git a/mysql-test/r/rpl_row_basic_3innodb.result b/mysql-test/r/rpl_row_basic_3innodb.result index ed9b231e1a1..4c6ec627db5 100644 --- a/mysql-test/r/rpl_row_basic_3innodb.result +++ b/mysql-test/r/rpl_row_basic_3innodb.result @@ -363,7 +363,6 @@ SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1; C1 HEX(B1) HEX(B2) 1 NULL 0 CREATE TABLE t7 (C1 INT PRIMARY KEY, C2 INT) ENGINE = 'INNODB' ; - --- on slave: original values --- INSERT INTO t7 VALUES (1,3), (2,6), (3,9); SELECT * FROM t7 ORDER BY C1; @@ -371,7 +370,6 @@ C1 C2 1 3 2 6 3 9 - --- on master: new values inserted --- INSERT INTO t7 VALUES (1,2), (2,4), (3,6); SELECT * FROM t7 ORDER BY C1; @@ -379,48 +377,42 @@ C1 C2 1 2 2 4 3 6 - --- on slave: old values should be overwritten by replicated values --- SELECT * FROM t7 ORDER BY C1; C1 C2 1 2 2 4 3 6 - --- on master --- -DROP TABLE t7; -CREATE TABLE t7 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = 'INNODB' ; -INSERT INTO t7 VALUES (99,99,99); -INSERT INTO t7 VALUES (99,22,33); -ERROR 23000: Duplicate entry '99' for key 1 -INSERT INTO t7 VALUES (11,99,33); -ERROR 23000: Duplicate entry '99' for key 2 -INSERT INTO t7 VALUES (11,22,99); -ERROR 23000: Duplicate entry '99' for key 3 -SELECT * FROM t7 ORDER BY a; +CREATE TABLE t8 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = 'INNODB' ; +INSERT INTO t8 VALUES (99,99,99); +INSERT INTO t8 VALUES (99,22,33); +ERROR 23000: Duplicate entry '99' for key 'PRIMARY' +INSERT INTO t8 VALUES (11,99,33); +ERROR 23000: Duplicate entry '99' for key 'b' +INSERT INTO t8 VALUES (11,22,99); +ERROR 23000: Duplicate entry '99' for key 'c' +SELECT * FROM t8 ORDER BY a; a b c 99 99 99 - --- on slave --- -SELECT * FROM t7 ORDER BY a; +SELECT * FROM t8 ORDER BY a; a b c 99 99 99 -INSERT INTO t7 VALUES (1,2,3), (2,4,6), (3,6,9); -SELECT * FROM t7 ORDER BY a; +INSERT INTO t8 VALUES (1,2,3), (2,4,6), (3,6,9); +SELECT * FROM t8 ORDER BY a; a b c 1 2 3 2 4 6 3 6 9 99 99 99 - --- on master --- -INSERT INTO t7 VALUES (2,4,8); - +INSERT INTO t8 VALUES (2,4,8); --- on slave --- -SELECT * FROM t7 ORDER BY a; +SELECT * FROM t8 ORDER BY a; a b c 1 2 3 2 4 8 3 6 9 99 99 99 -DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7; +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8; diff --git a/mysql-test/r/rpl_row_charset.result b/mysql-test/r/rpl_row_charset.result index 4108d0c6d90..060dffbfe2e 100644 --- a/mysql-test/r/rpl_row_charset.result +++ b/mysql-test/r/rpl_row_charset.result @@ -112,46 +112,56 @@ drop database mysqltest3; show binlog events from 102; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # drop database if exists mysqltest2 -master-bin.000001 # Table_map 1 # mysql.proc -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (mysql.proc) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (mysql.event) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # drop database if exists mysqltest3 -master-bin.000001 # Table_map 1 # mysql.proc -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (mysql.proc) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (mysql.event) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # create database mysqltest2 character set latin2 master-bin.000001 # Query 1 # create database mysqltest3 master-bin.000001 # Query 1 # drop database mysqltest3 -master-bin.000001 # Table_map 1 # mysql.proc -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (mysql.proc) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (mysql.event) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # create database mysqltest3 master-bin.000001 # Query 1 # use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100)) -master-bin.000001 # Table_map 1 # mysqltest2.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # mysqltest2.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # mysqltest2.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # mysqltest2.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # mysqltest2.t1 -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # use `mysqltest2`; truncate table t1 -master-bin.000001 # Table_map 1 # mysqltest2.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # mysqltest2.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # mysqltest2.t1 -master-bin.000001 # Write_rows 1 # -master-bin.000001 # Table_map 1 # mysqltest2.t1 -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # use `mysqltest2`; truncate table t1 -master-bin.000001 # Table_map 1 # mysqltest2.t1 -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (mysqltest2.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # drop database mysqltest2 -master-bin.000001 # Table_map 1 # mysql.proc -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (mysql.proc) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (mysql.event) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # drop database mysqltest3 -master-bin.000001 # Table_map 1 # mysql.proc -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (mysql.proc) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (mysql.event) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F select "--- --global--" as ""; --- --global-- diff --git a/mysql-test/r/rpl_row_create_table.result b/mysql-test/r/rpl_row_create_table.result index 0a443d243ac..e35dcc2abb5 100644 --- a/mysql-test/r/rpl_row_create_table.result +++ b/mysql-test/r/rpl_row_create_table.result @@ -126,12 +126,12 @@ NULL 4 2 NULL 5 10 NULL 6 12 CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3; -ERROR 23000: Duplicate entry '2' for key 1 +ERROR 23000: Duplicate entry '2' for key 'b' SHOW BINLOG EVENTS FROM 1326; Log_name Pos Event_type Server_id End_log_pos Info CREATE TABLE t7 (a INT, b INT UNIQUE); INSERT INTO t7 SELECT a,b FROM tt3; -ERROR 23000: Duplicate entry '2' for key 1 +ERROR 23000: Duplicate entry '2' for key 'b' SELECT * FROM t7 ORDER BY a,b; a b 1 2 @@ -140,8 +140,8 @@ a b SHOW BINLOG EVENTS FROM 1326; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 1326 Query 1 1426 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE) -master-bin.000001 1426 Table_map 1 1466 test.t7 -master-bin.000001 1466 Write_rows 1 1522 +master-bin.000001 1426 Table_map 1 1466 table_id: # (test.t7) +master-bin.000001 1466 Write_rows 1 1522 table_id: # flags: STMT_END_F SELECT * FROM t7 ORDER BY a,b; a b 1 2 @@ -156,8 +156,8 @@ Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back SHOW BINLOG EVENTS FROM 1522; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 1522 Table_map 1 1562 test.t7 -master-bin.000001 1562 Write_rows 1 1618 +master-bin.000001 1522 Table_map 1 1562 table_id: # (test.t7) +master-bin.000001 1562 Write_rows 1 1618 table_id: # flags: STMT_END_F SELECT * FROM t7 ORDER BY a,b; a b 1 2 diff --git a/mysql-test/r/rpl_row_delayed_ins.result b/mysql-test/r/rpl_row_delayed_ins.result index 7ed817b5780..b93aaae9112 100644 --- a/mysql-test/r/rpl_row_delayed_ins.result +++ b/mysql-test/r/rpl_row_delayed_ins.result @@ -16,8 +16,8 @@ show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 102 Server ver: VERSION, Binlog ver: 4 master-bin.000001 102 Query 1 222 use `test`; create table t1(a int not null primary key) engine=myisam -master-bin.000001 222 Table_map 1 261 test.t1 -master-bin.000001 261 Write_rows 1 305 +master-bin.000001 222 Table_map 1 261 table_id: # (test.t1) +master-bin.000001 261 Write_rows 1 305 table_id: # flags: STMT_END_F master-bin.000001 305 Query 1 380 use `test`; flush tables select * from t1; a diff --git a/mysql-test/r/rpl_row_log.result b/mysql-test/r/rpl_row_log.result index a5317975302..1265ff930f1 100644 --- a/mysql-test/r/rpl_row_log.result +++ b/mysql-test/r/rpl_row_log.result @@ -21,12 +21,12 @@ show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # use `test`; drop table t1 master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # use `test`; drop table t1 show binlog events from 102 limit 1; Log_name Pos Event_type Server_id End_log_pos Info @@ -34,10 +34,10 @@ master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_in show binlog events from 102 limit 2; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM -master-bin.000001 # Table_map 1 # test.t1 +master-bin.000001 # Table_map 1 # table_id: # (test.t1) show binlog events from 102 limit 2,1; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F flush logs; create table t5 (a int)ENGINE=MyISAM; drop table t5; @@ -51,42 +51,44 @@ show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # use `test`; drop table t1 master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Query 1 # use `test`; drop table t1 master-bin.000001 # Rotate 1 # master-bin.000002;pos=4 show binlog events in 'master-bin.000002'; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000002 # Table_map 1 # table_id: # (mysql.slow_log) +master-bin.000002 # Table_map 1 # table_id: # (mysql.general_log) master-bin.000002 # Query 1 # use `test`; create table t5 (a int)ENGINE=MyISAM master-bin.000002 # Query 1 # use `test`; drop table t5 master-bin.000002 # Query 1 # use `test`; create table t1 (n int)ENGINE=MyISAM -master-bin.000002 # Table_map 1 # test.t1 -master-bin.000002 # Write_rows 1 # +master-bin.000002 # Table_map 1 # table_id: # (test.t1) +master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000002 # Query 1 # use `test`; drop table t1 show binary logs; Log_name File_size master-bin.000001 1332 -master-bin.000002 525 +master-bin.000002 635 start slave; show binary logs; Log_name File_size slave-bin.000001 1506 -slave-bin.000002 350 +slave-bin.000002 460 show binlog events in 'slave-bin.000001' from 4; Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM -slave-bin.000001 # Table_map 1 # test.t1 -slave-bin.000001 # Write_rows 1 # +slave-bin.000001 # Table_map 1 # table_id: # (test.t1) +slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F slave-bin.000001 # Query 1 # use `test`; drop table t1 slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM -slave-bin.000001 # Table_map 1 # test.t1 -slave-bin.000001 # Write_rows 1 # +slave-bin.000001 # Table_map 1 # table_id: # (test.t1) +slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F slave-bin.000001 # Query 1 # use `test`; drop table t1 slave-bin.000001 # Query 1 # use `test`; create table t5 (a int)ENGINE=MyISAM slave-bin.000001 # Query 1 # use `test`; drop table t5 @@ -94,12 +96,14 @@ slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4 show binlog events in 'slave-bin.000002' from 4; Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 +slave-bin.000002 # Table_map 2 # table_id: # (mysql.slow_log) +slave-bin.000002 # Table_map 2 # table_id: # (mysql.general_log) slave-bin.000002 # Query 1 # use `test`; create table t1 (n int)ENGINE=MyISAM -slave-bin.000002 # Table_map 1 # test.t1 -slave-bin.000002 # Write_rows 1 # +slave-bin.000002 # Table_map 1 # table_id: # (test.t1) +slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F slave-bin.000002 # Query 1 # use `test`; drop table t1 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 525 # # master-bin.000002 Yes Yes # 0 0 525 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 635 # # master-bin.000002 Yes Yes # 0 0 635 # None 0 No # show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log diff --git a/mysql-test/r/rpl_row_log_innodb.result b/mysql-test/r/rpl_row_log_innodb.result index 52b5219cf43..6c378bede1b 100644 --- a/mysql-test/r/rpl_row_log_innodb.result +++ b/mysql-test/r/rpl_row_log_innodb.result @@ -21,13 +21,13 @@ show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Xid 1 # COMMIT /* XID */ master-bin.000001 # Query 1 # use `test`; drop table t1 master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Xid 1 # COMMIT /* XID */ master-bin.000001 # Query 1 # use `test`; drop table t1 show binlog events from 102 limit 1; @@ -36,10 +36,10 @@ master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_in show binlog events from 102 limit 2; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB -master-bin.000001 # Table_map 1 # test.t1 +master-bin.000001 # Table_map 1 # table_id: # (test.t1) show binlog events from 102 limit 2,1; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F flush logs; create table t5 (a int)ENGINE=InnoDB; drop table t5; @@ -53,46 +53,48 @@ show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Xid 1 # COMMIT /* XID */ master-bin.000001 # Query 1 # use `test`; drop table t1 master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB -master-bin.000001 # Table_map 1 # test.t1 -master-bin.000001 # Write_rows 1 # +master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Xid 1 # COMMIT /* XID */ master-bin.000001 # Query 1 # use `test`; drop table t1 master-bin.000001 # Rotate 1 # master-bin.000002;pos=4 show binlog events in 'master-bin.000002'; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000002 # Table_map 1 # table_id: # (mysql.slow_log) +master-bin.000002 # Table_map 1 # table_id: # (mysql.general_log) master-bin.000002 # Query 1 # use `test`; create table t5 (a int)ENGINE=InnoDB master-bin.000002 # Query 1 # use `test`; drop table t5 master-bin.000002 # Query 1 # use `test`; create table t1 (n int)ENGINE=InnoDB -master-bin.000002 # Table_map 1 # test.t1 -master-bin.000002 # Write_rows 1 # +master-bin.000002 # Table_map 1 # table_id: # (test.t1) +master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000002 # Xid 1 # COMMIT /* XID */ master-bin.000002 # Query 1 # use `test`; drop table t1 show binary logs; Log_name File_size master-bin.000001 1386 -master-bin.000002 552 +master-bin.000002 662 start slave; show binary logs; Log_name File_size slave-bin.000001 1560 -slave-bin.000002 377 +slave-bin.000002 487 show binlog events in 'slave-bin.000001' from 4; Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB -slave-bin.000001 # Table_map 1 # test.t1 -slave-bin.000001 # Write_rows 1 # +slave-bin.000001 # Table_map 1 # table_id: # (test.t1) +slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F slave-bin.000001 # Xid 1 # COMMIT /* XID */ slave-bin.000001 # Query 1 # use `test`; drop table t1 slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB -slave-bin.000001 # Table_map 1 # test.t1 -slave-bin.000001 # Write_rows 1 # +slave-bin.000001 # Table_map 1 # table_id: # (test.t1) +slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F slave-bin.000001 # Xid 1 # COMMIT /* XID */ slave-bin.000001 # Query 1 # use `test`; drop table t1 slave-bin.000001 # Query 1 # use `test`; create table t5 (a int)ENGINE=InnoDB @@ -101,13 +103,15 @@ slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4 show binlog events in 'slave-bin.000002' from 4; Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 +slave-bin.000002 # Table_map 2 # table_id: # (mysql.slow_log) +slave-bin.000002 # Table_map 2 # table_id: # (mysql.general_log) slave-bin.000002 # Query 1 # use `test`; create table t1 (n int)ENGINE=InnoDB -slave-bin.000002 # Table_map 1 # test.t1 -slave-bin.000002 # Write_rows 1 # +slave-bin.000002 # Table_map 1 # table_id: # (test.t1) +slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F slave-bin.000002 # Xid 1 # COMMIT /* XID */ slave-bin.000002 # Query 1 # use `test`; drop table t1 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 552 # # master-bin.000002 Yes Yes # 0 0 552 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 662 # # master-bin.000002 Yes Yes # 0 0 662 # None 0 No # show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log diff --git a/mysql-test/r/rpl_row_max_relay_size.result b/mysql-test/r/rpl_row_max_relay_size.result index 6146d623ec5..b7afe0b0515 100644 --- a/mysql-test/r/rpl_row_max_relay_size.result +++ b/mysql-test/r/rpl_row_max_relay_size.result @@ -58,4 +58,4 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File flush logs; show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000002 102 <Binlog_Ignore_DB> +master-bin.000002 212 <Binlog_Ignore_DB> diff --git a/mysql-test/r/rpl_row_sp008.result b/mysql-test/r/rpl_row_sp008.result index 57606e26f19..633709e83ca 100644 --- a/mysql-test/r/rpl_row_sp008.result +++ b/mysql-test/r/rpl_row_sp008.result @@ -35,11 +35,11 @@ master-bin.000001 4 Format_desc 1 102 Server ver: VERSION, Binlog ver: 4 master-bin.000001 102 Query 1 193 use `test`; DROP TABLE IF EXISTS test.t2 master-bin.000001 193 Query 1 299 use `test`; CREATE TABLE test.t1 (a INT,PRIMARY KEY(a)) master-bin.000001 299 Query 1 405 use `test`; CREATE TABLE test.t2 (a INT,PRIMARY KEY(a)) -master-bin.000001 405 Table_map 1 444 test.t1 -master-bin.000001 444 Write_rows 1 483 -master-bin.000001 483 Table_map 1 540 mysql.proc -master-bin.000001 540 Write_rows 1 723 -master-bin.000001 723 Table_map 1 762 test.t2 -master-bin.000001 762 Write_rows 1 796 +master-bin.000001 405 Table_map 1 444 table_id: # (test.t1) +master-bin.000001 444 Write_rows 1 483 table_id: # flags: STMT_END_F +master-bin.000001 483 Table_map 1 540 table_id: # (mysql.proc) +master-bin.000001 540 Write_rows 1 723 table_id: # flags: STMT_END_F +master-bin.000001 723 Table_map 1 762 table_id: # (test.t2) +master-bin.000001 762 Write_rows 1 796 table_id: # flags: STMT_END_F DROP PROCEDURE IF EXISTS test.p1; DROP TABLE IF EXISTS test.t1; diff --git a/mysql-test/t/binlog_stm_binlog.test b/mysql-test/t/binlog_stm_binlog.test index 826ce54ae2c..f22e7e45aea 100644 --- a/mysql-test/t/binlog_stm_binlog.test +++ b/mysql-test/t/binlog_stm_binlog.test @@ -5,7 +5,7 @@ create table t1 (a int, b int) engine=innodb; begin; insert into t1 values (1,2); commit; ---replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/ show binlog events; drop table t1; diff --git a/mysql-test/t/ndb_binlog_ddl_multi.test b/mysql-test/t/ndb_binlog_ddl_multi.test index 3aa3b9469fd..e75bd8ab201 100644 --- a/mysql-test/t/ndb_binlog_ddl_multi.test +++ b/mysql-test/t/ndb_binlog_ddl_multi.test @@ -35,11 +35,13 @@ create table t1 (a int primary key) engine=ndb; create table t2 (a int primary key) engine=ndb; --replace_result $binlog_start <binlog_start> --replace_column 2 # 4 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ --eval show binlog events from $binlog_start --connection server1 --replace_result $binlog_start <binlog_start> --replace_column 2 # 4 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ --eval show binlog events from $binlog_start @@ -55,6 +57,7 @@ alter table t2 add column (b int); --connections server1 --replace_result $binlog_start <binlog_start> --replace_column 2 # 4 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ --eval show binlog events from $binlog_start @@ -75,6 +78,7 @@ drop table mysqltest.t1; --connection server1 --replace_result $binlog_start <binlog_start> --replace_column 2 # 4 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ --eval show binlog events from $binlog_start @@ -93,6 +97,7 @@ create table t1 (a int primary key) engine=ndb; --connection server2 --replace_result $binlog_start <binlog_start> --replace_column 2 # 4 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ --eval show binlog events from $binlog_start --connection server2 @@ -146,4 +151,5 @@ drop table t1; --connection server2 --replace_result $binlog_start <binlog_start> --replace_column 2 # 4 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ --eval show binlog events from $binlog_start diff --git a/mysql-test/t/ndb_binlog_ignore_db.test b/mysql-test/t/ndb_binlog_ignore_db.test index a46266f209a..82a261ffe13 100644 --- a/mysql-test/t/ndb_binlog_ignore_db.test +++ b/mysql-test/t/ndb_binlog_ignore_db.test @@ -14,6 +14,7 @@ create table t1 (a int primary key, b int) engine=ndb; insert into t1 values (1, 1); --replace_result $binlog_start <binlog_start> --replace_column 2 # 4 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ --eval show binlog events from $binlog_start drop database mysqltest; diff --git a/mysql-test/t/rpl_heap.test b/mysql-test/t/rpl_heap.test index 2436b851a03..b35983ad4d7 100644 --- a/mysql-test/t/rpl_heap.test +++ b/mysql-test/t/rpl_heap.test @@ -22,6 +22,7 @@ create table t1 engine=HEAP select 10 as a; insert into t1 values(11); save_master_pos; --replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events from 79; connection slave; reset slave; @@ -40,6 +41,7 @@ select * from t1; select * from t1 limit 10; save_master_pos; --replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events in 'master-bin.002' from 79; connection slave; diff --git a/mysql-test/t/rpl_loaddata_s.test b/mysql-test/t/rpl_loaddata_s.test index 8e2bf012bc9..72a5d1a8ec1 100644 --- a/mysql-test/t/rpl_loaddata_s.test +++ b/mysql-test/t/rpl_loaddata_s.test @@ -21,6 +21,7 @@ connection slave; sync_with_master; select count(*) from test.t1; # check that LOAD was replicated --replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events from 102; # should be nothing # Cleanup diff --git a/mysql-test/t/rpl_ndb_blob.test b/mysql-test/t/rpl_ndb_blob.test index c31b629b9f8..97f3591cfaa 100644 --- a/mysql-test/t/rpl_ndb_blob.test +++ b/mysql-test/t/rpl_ndb_blob.test @@ -90,4 +90,5 @@ drop table t1; --connection master let $VERSION=`select version()`; --replace_result $VERSION VERSION +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events; diff --git a/mysql-test/t/rpl_ndb_disk.test b/mysql-test/t/rpl_ndb_disk.test index f1aa1ee2bf1..0e8e4124100 100644 --- a/mysql-test/t/rpl_ndb_disk.test +++ b/mysql-test/t/rpl_ndb_disk.test @@ -69,6 +69,7 @@ select * from t1 order by pk1; --connection master let $VERSION=`select version()`; --replace_result $VERSION VERSION +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events; # diff --git a/mysql-test/t/rpl_row_basic_11bugs.test b/mysql-test/t/rpl_row_basic_11bugs.test index 67fa11b76a0..d098723644f 100644 --- a/mysql-test/t/rpl_row_basic_11bugs.test +++ b/mysql-test/t/rpl_row_basic_11bugs.test @@ -17,6 +17,7 @@ USE test_ignore; CREATE TABLE t2 (a INT, b INT); SHOW TABLES; INSERT INTO t2 VALUES (3,3), (4,4); +--replace_regex /table_id: [0-9]+/table_id: #/ SHOW BINLOG EVENTS FROM 102; sync_slave_with_master; --echo **** On Slave **** diff --git a/mysql-test/t/rpl_row_create_table.test b/mysql-test/t/rpl_row_create_table.test index 52373b8278c..6897dc5c718 100644 --- a/mysql-test/t/rpl_row_create_table.test +++ b/mysql-test/t/rpl_row_create_table.test @@ -26,6 +26,7 @@ CREATE TABLE t2 (a INT, b INT) ENGINE=Merge; CREATE TABLE t3 (a INT, b INT) CHARSET=utf8; CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8; --replace_column 1 # 4 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ --query_vertical SHOW BINLOG EVENTS FROM 212 --echo **** On Master **** --query_vertical SHOW CREATE TABLE t1 @@ -60,6 +61,7 @@ connection master; --error 1062 CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3; # Shouldn't be written to the binary log +--replace_regex /table_id: [0-9]+/table_id: #/ SHOW BINLOG EVENTS FROM 1326; # Test that INSERT-SELECT works the same way as for SBR. @@ -68,6 +70,7 @@ CREATE TABLE t7 (a INT, b INT UNIQUE); INSERT INTO t7 SELECT a,b FROM tt3; SELECT * FROM t7 ORDER BY a,b; # Should be written to the binary log +--replace_regex /table_id: [0-9]+/table_id: #/ SHOW BINLOG EVENTS FROM 1326; sync_slave_with_master; SELECT * FROM t7 ORDER BY a,b; @@ -78,6 +81,7 @@ INSERT INTO tt4 VALUES (4,8), (5,10), (6,12); BEGIN; INSERT INTO t7 SELECT a,b FROM tt4; ROLLBACK; +--replace_regex /table_id: [0-9]+/table_id: #/ SHOW BINLOG EVENTS FROM 1522; SELECT * FROM t7 ORDER BY a,b; sync_slave_with_master; @@ -91,6 +95,7 @@ CREATE TEMPORARY TABLE tt6 LIKE tt4; --echo **** On Master **** --query_vertical SHOW CREATE TABLE t8 --query_vertical SHOW CREATE TABLE t9 +--replace_regex /table_id: [0-9]+/table_id: #/ SHOW BINLOG EVENTS FROM 1618; sync_slave_with_master; --echo **** On Slave **** diff --git a/mysql-test/t/rpl_row_drop.test b/mysql-test/t/rpl_row_drop.test index 816bd108b88..20c217a7c3a 100644 --- a/mysql-test/t/rpl_row_drop.test +++ b/mysql-test/t/rpl_row_drop.test @@ -32,6 +32,7 @@ connection master; DROP TABLE t1,t2; let $VERSION=`select version()`; --replace_result $VERSION VERSION +--replace_regex /table_id: [0-9]+/table_id: #/ SHOW BINLOG EVENTS; SHOW TABLES; sync_slave_with_master; diff --git a/mysql-test/t/rpl_row_sp008.test b/mysql-test/t/rpl_row_sp008.test index 611062543e0..ea837dccd5a 100644 --- a/mysql-test/t/rpl_row_sp008.test +++ b/mysql-test/t/rpl_row_sp008.test @@ -49,6 +49,7 @@ SELECT * FROM test.t2; connection master; let $VERSION=`select version()`; --replace_result $VERSION VERSION +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events; # Cleanup diff --git a/mysql-test/t/rpl_sp.test b/mysql-test/t/rpl_sp.test index 73f14bd49b3..de26fd24174 100644 --- a/mysql-test/t/rpl_sp.test +++ b/mysql-test/t/rpl_sp.test @@ -343,6 +343,7 @@ drop trigger trg; insert into t1 values (1); select * from t1; --replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events in 'master-bin.000001' from 102; sync_slave_with_master; select * from t1; diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index 45de4010535..9a5b435d504 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -2583,6 +2583,7 @@ begin show warnings; end| --disable_parsing +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events; show storage engines; show master status; diff --git a/mysql-test/t/sp_notembedded.test b/mysql-test/t/sp_notembedded.test index f7ba9803fda..5ba78473f8b 100644 --- a/mysql-test/t/sp_notembedded.test +++ b/mysql-test/t/sp_notembedded.test @@ -15,6 +15,7 @@ begin show grants for 'root'@'localhost'; end| --disable_parsing +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events; show storage engines; show master status; diff --git a/mysql-test/t/user_var-binlog.test b/mysql-test/t/user_var-binlog.test index a7726c990f1..7f1561b925b 100644 --- a/mysql-test/t/user_var-binlog.test +++ b/mysql-test/t/user_var-binlog.test @@ -14,6 +14,7 @@ set @var1= "';aaa"; SET @var2=char(ascii('a')); insert into t1 values (@var1),(@var2); --replace_column 2 # 5 # +--replace_regex /table_id: [0-9]+/table_id: #/ show binlog events from 102; # more important than SHOW BINLOG EVENTS, mysqlbinlog (where we # absolutely need variables names to be quoted and strings to be diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc index 06f946b013c..52ab3afcba1 100644 --- a/sql/ha_ndbcluster_binlog.cc +++ b/sql/ha_ndbcluster_binlog.cc @@ -310,7 +310,7 @@ void ndbcluster_binlog_init_share(NDB_SHARE *share, TABLE *_table) table= 0; break; } - assign_new_table_id(table); + assign_new_table_id(table_share); if (!table->record[1] || table->record[1] == table->record[0]) { table->record[1]= alloc_root(&table->mem_root, @@ -1620,15 +1620,20 @@ static int open_binlog_index(THD *thd, TABLE_LIST *tables, /* Insert one row in the cluster_replication.binlog_index - - declared friend in handler.h to be able to call write_row directly - so that this insert is not replicated */ int ndb_add_binlog_index(THD *thd, void *_row) { Binlog_index_row &row= *(Binlog_index_row *) _row; int error= 0; bool need_reopen; + + /* + Turn of binlogging to prevent the table changes to be written to + the binary log. + */ + ulong saved_options= thd->options; + thd->options&= ~(OPTION_BIN_LOG); + for ( ; ; ) /* loop for need_reopen */ { if (!binlog_index && open_binlog_index(thd, &binlog_tables, &binlog_index)) @@ -1663,7 +1668,7 @@ int ndb_add_binlog_index(THD *thd, void *_row) binlog_index->field[6]->store(row.n_schemaops); int r; - if ((r= binlog_index->file->write_row(binlog_index->record[0]))) + if ((r= binlog_index->file->ha_write_row(binlog_index->record[0]))) { sql_print_error("NDB Binlog: Writing row to binlog_index: %d", r); error= -1; @@ -1672,10 +1677,12 @@ int ndb_add_binlog_index(THD *thd, void *_row) mysql_unlock_tables(thd, thd->lock); thd->lock= 0; + thd->options= saved_options; return 0; add_binlog_index_err: close_thread_tables(thd); binlog_index= 0; + thd->options= saved_options; return error; } diff --git a/sql/handler.h b/sql/handler.h index dd445637b9f..37bf5335077 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -1907,8 +1907,6 @@ public: { return COMPATIBLE_DATA_NO; } private: - friend int ndb_add_binlog_index(THD *, void *); - /* Row-level primitives for storage engines. These should be overridden by the storage engine class. To call these methods, use diff --git a/sql/log.cc b/sql/log.cc index c2fadb9d845..2b75bda2d70 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -2680,6 +2680,8 @@ int MYSQL_LOG::flush_and_set_pending_rows_event(THD *thd, Rows_log_event* event) DBUG_ASSERT(trx_data); + DBUG_PRINT("info", ("trx_data->pending=%p", trx_data->pending)); + if (Rows_log_event* pending= trx_data->pending) { IO_CACHE *file= &log_file; diff --git a/sql/log_event.cc b/sql/log_event.cc index 9fbb29bbc8c..944190c6d20 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -5268,8 +5268,8 @@ int Rows_log_event::exec_event(st_relay_log_info *rli) /* If m_table_id == ULONG_MAX, then we have a dummy event that does not contain any data. In that case, we just remove all tables in - the tables_to_lock list, step the relay log position, and return - with success. + the tables_to_lock list, close the thread tables, step the relay + log position, and return with success. */ if (m_table_id == ULONG_MAX) { @@ -5280,6 +5280,7 @@ int Rows_log_event::exec_event(st_relay_log_info *rli) DBUG_ASSERT(get_flags(STMT_END_F)); rli->clear_tables_to_lock(); + close_thread_tables(thd); thd->clear_error(); rli->inc_event_relay_log_pos(); DBUG_RETURN(0); @@ -5414,12 +5415,16 @@ int Rows_log_event::exec_event(st_relay_log_info *rli) DBUG_ASSERT(row_end != NULL); // cannot happen DBUG_ASSERT(row_end <= (const char*)m_rows_end); +#if 0 /* in_use can have been set to NULL in close_tables_for_reopen */ THD* old_thd= table->in_use; if (!table->in_use) table->in_use= thd; +#endif error= do_exec_row(table); +#if 0 table->in_use = old_thd; +#endif switch (error) { /* Some recoverable errors */ @@ -5599,14 +5604,12 @@ bool Rows_log_event::write_data_body(IO_CACHE*file) #if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT) void Rows_log_event::pack_info(Protocol *protocol) { -#ifdef DBUG_RBR char buf[256]; char const *const flagstr= get_flags(STMT_END_F) ? " flags: STMT_END_F" : ""; my_size_t bytes= snprintf(buf, sizeof(buf), "table_id: %lu%s", m_table_id, flagstr); protocol->store(buf, bytes, &my_charset_bin); -#endif } #endif @@ -6009,17 +6012,11 @@ bool Table_map_log_event::write_data_body(IO_CACHE *file) #if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT) void Table_map_log_event::pack_info(Protocol *protocol) { -#ifdef DBUG_RBR char buf[256]; my_size_t bytes= snprintf(buf, sizeof(buf), "table_id: %lu (%s.%s)", m_table_id, m_dbnam, m_tblnam); protocol->store(buf, bytes, &my_charset_bin); -#else - char buf[256]; - my_size_t bytes= snprintf(buf, sizeof(buf), "%s.%s", m_dbnam, m_tblnam); - protocol->store(buf, bytes, &my_charset_bin); -#endif } #endif diff --git a/sql/rpl_injector.cc b/sql/rpl_injector.cc index a69dea9a158..a69cfc2b75f 100644 --- a/sql/rpl_injector.cc +++ b/sql/rpl_injector.cc @@ -26,7 +26,7 @@ /* inline since it's called below */ inline injector::transaction::transaction(MYSQL_LOG *log, THD *thd) - : m_thd(thd) + : m_state(START_STATE), m_thd(thd) { /* Default initialization of m_start_pos (which initializes it to garbage). @@ -64,12 +64,31 @@ int injector::transaction::commit() DBUG_RETURN(0); } +int injector::transaction::use_table(server_id_type sid, table tbl) +{ + DBUG_ENTER("injector::transaction::use_table"); + + int error; + + if ((error= check_state(TABLE_STATE))) + DBUG_RETURN(error); + + m_thd->set_server_id(sid); + error= m_thd->binlog_write_table_map(tbl.get_table(), + tbl.is_transactional()); + DBUG_RETURN(error); +} + int injector::transaction::write_row (server_id_type sid, table tbl, MY_BITMAP const* cols, size_t colcnt, record_type record) { DBUG_ENTER("injector::transaction::write_row(...)"); + + if (int error= check_state(ROW_STATE)) + DBUG_RETURN(error); + m_thd->set_server_id(sid); m_thd->binlog_write_row(tbl.get_table(), tbl.is_transactional(), cols, colcnt, record); @@ -82,6 +101,10 @@ int injector::transaction::delete_row(server_id_type sid, table tbl, record_type record) { DBUG_ENTER("injector::transaction::delete_row(...)"); + + if (int error= check_state(ROW_STATE)) + DBUG_RETURN(error); + m_thd->set_server_id(sid); m_thd->binlog_delete_row(tbl.get_table(), tbl.is_transactional(), cols, colcnt, record); @@ -94,6 +117,10 @@ int injector::transaction::update_row(server_id_type sid, table tbl, record_type before, record_type after) { DBUG_ENTER("injector::transaction::update_row(...)"); + + if (int error= check_state(ROW_STATE)) + DBUG_RETURN(error); + m_thd->set_server_id(sid); m_thd->binlog_update_row(tbl.get_table(), tbl.is_transactional(), cols, colcnt, before, after); diff --git a/sql/rpl_injector.h b/sql/rpl_injector.h index 32d3fdd1a78..50a0a56dd9b 100644 --- a/sql/rpl_injector.h +++ b/sql/rpl_injector.h @@ -160,6 +160,24 @@ public: } /* + + DESCRIPTION + + Register table for use within the transaction. All tables + that are going to be used need to be registered before being + used below. The member function will fail with an error if + use_table() is called after any *_row() function has been + called for the transaction. + + RETURN VALUE + + 0 All OK + >0 Failure + + */ + int use_table(server_id_type sid, table tbl); + + /* Add a 'write row' entry to the transaction. */ int write_row (server_id_type sid, table tbl, @@ -219,6 +237,62 @@ public: } } + enum enum_state + { + START_STATE, /* Start state */ + TABLE_STATE, /* At least one table has been registered */ + ROW_STATE, /* At least one row has been registered */ + STATE_COUNT /* State count and sink state */ + } m_state; + + /* + Check and update the state. + + PARAMETER(S) + + target_state + The state we are moving to: TABLE_STATE if we are + writing a table and ROW_STATE if we are writing a row. + + DESCRIPTION + + The internal state will be updated to the target state if + and only if it is a legal move. The only legal moves are: + + START_STATE -> START_STATE + START_STATE -> TABLE_STATE + TABLE_STATE -> TABLE_STATE + TABLE_STATE -> ROW_STATE + + That is: + - It is not possible to write any row before having written at + least one table + - It is not possible to write a table after at least one row + has been written + + RETURN VALUE + + 0 All OK + -1 Incorrect call sequence + */ + int check_state(enum_state const target_state) + { + static char const *state_name[] = { + "START_STATE", "TABLE_STATE", "ROW_STATE", "STATE_COUNT" + }; + + DBUG_ASSERT(0 <= target_state && target_state <= STATE_COUNT); + DBUG_PRINT("info", ("In state %s", state_name[m_state])); + + if (m_state <= target_state && target_state <= m_state + 1 && + m_state < STATE_COUNT) + m_state= target_state; + else + m_state= STATE_COUNT; + return m_state == STATE_COUNT ? 1 : 0; + } + + binlog_pos m_start_pos; THD *m_thd; }; |