diff options
-rw-r--r-- | mysql-test/include/show_binlog_events2.inc | 2 | ||||
-rw-r--r-- | mysql-test/r/rpl_loaddata_map.result | 28 | ||||
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_loaddata_map.result | 28 | ||||
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_user.result (renamed from mysql-test/r/rpl_user.result) | 18 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_loaddata_map-master.opt (renamed from mysql-test/t/rpl_loaddata_map-master.opt) | 0 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_loaddata_map-slave.opt (renamed from mysql-test/t/rpl_loaddata_map-slave.opt) | 0 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_loaddata_map.test (renamed from mysql-test/t/rpl_loaddata_map.test) | 9 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_user.test (renamed from mysql-test/t/rpl_user.test) | 5 |
8 files changed, 48 insertions, 42 deletions
diff --git a/mysql-test/include/show_binlog_events2.inc b/mysql-test/include/show_binlog_events2.inc index fa244c5a5a3..5dd272c562d 100644 --- a/mysql-test/include/show_binlog_events2.inc +++ b/mysql-test/include/show_binlog_events2.inc @@ -1,4 +1,4 @@ ---let $binlog_start=98 +--let $binlog_start=106 --replace_result $binlog_start <binlog_start> --replace_column 2 # 5 # --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ diff --git a/mysql-test/r/rpl_loaddata_map.result b/mysql-test/r/rpl_loaddata_map.result deleted file mode 100644 index 9bb02f5db1b..00000000000 --- a/mysql-test/r/rpl_loaddata_map.result +++ /dev/null @@ -1,28 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -create table t2 (id int not null primary key auto_increment); -select @@session.read_buffer_size - @@session.max_allowed_packet > 0 ; -@@session.read_buffer_size - @@session.max_allowed_packet > 0 -1 -load data infile 'MYSQLTEST_VARDIR/tmp/bug30435_5k.txt' into table t2; -select count(*) from t2 /* 5 000 */; -count(*) -5000 -show binlog events in 'master-bin.000002' from 98; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000002 98 Query 1 # use `test`; create table t2 (id int not null primary key auto_increment) -master-bin.000002 221 Begin_load_query 1 # ;file_id=1;block_len=7168 -master-bin.000002 7412 Append_block 1 # ;file_id=1;block_len=7168 -master-bin.000002 14603 Append_block 1 # ;file_id=1;block_len=2048 -master-bin.000002 16674 Append_block 1 # ;file_id=1;block_len=7168 -master-bin.000002 23865 Append_block 1 # ;file_id=1;block_len=341 -master-bin.000002 24229 Execute_load_query 1 # use `test`; load data infile 'MYSQLTEST_VARDIR/tmp/bug30435_5k.txt' into table t2 ;file_id=1 -select count(*) from t2 /* 5 000 */; -count(*) -5000 -drop table t1, t2; -end of the tests diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_map.result b/mysql-test/suite/rpl/r/rpl_loaddata_map.result new file mode 100644 index 00000000000..4129a88946d --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_loaddata_map.result @@ -0,0 +1,28 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +create table t2 (id int not null primary key auto_increment); +select @@session.read_buffer_size - @@session.max_allowed_packet > 0 ; +@@session.read_buffer_size - @@session.max_allowed_packet > 0 +1 +load data infile 'MYSQLTEST_VARDIR/tmp/bug30435_5k.txt' into table t2; +select count(*) from t2 /* 5 000 */; +count(*) +5000 +show binlog events in 'master-bin.000002' from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000002 # Query # # use `test`; create table t2 (id int not null primary key auto_increment) +master-bin.000002 # Begin_load_query # # ;file_id=#;block_len=# +master-bin.000002 # Append_block # # ;file_id=#;block_len=# +master-bin.000002 # Append_block # # ;file_id=#;block_len=# +master-bin.000002 # Append_block # # ;file_id=#;block_len=# +master-bin.000002 # Append_block # # ;file_id=#;block_len=# +master-bin.000002 # Execute_load_query # # use `test`; load data infile 'MYSQLTEST_VARDIR/tmp/bug30435_5k.txt' into table t2 ;file_id=# +select count(*) from t2 /* 5 000 */; +count(*) +5000 +drop table t1, t2; +end of the tests diff --git a/mysql-test/r/rpl_user.result b/mysql-test/suite/rpl/r/rpl_user.result index 475579e7d33..dd48d513352 100644 --- a/mysql-test/r/rpl_user.result +++ b/mysql-test/suite/rpl/r/rpl_user.result @@ -5,6 +5,9 @@ reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; reset master; +set sql_log_bin=0; +delete from mysql.user where Host='fakehost'; +set sql_log_bin=1; delete from mysql.user where Host='fakehost'; create user 'foo'@'fakehost'; create user 'foo'@'fakehost', 'bar'@'fakehost'; @@ -31,12 +34,11 @@ drop user 'not_exist_user1'@'fakehost', 'not_exist_user2'@'fakehost'; ERROR HY000: Operation DROP USER failed for 'not_exist_user1'@'fakehost','not_exist_user2'@'fakehost' select Host,User from mysql.user where Host='fakehost'; Host User -show binlog events from 98; +show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 98 Query 1 # use `test`; delete from mysql.user where Host='fakehost' -master-bin.000001 205 Query 1 # use `test`; create user 'foo'@'fakehost' -master-bin.000001 296 Query 1 # use `test`; create user 'foo'@'fakehost', 'bar'@'fakehost' -master-bin.000001 405 Query 1 # use `test`; rename user 'foo'@'fakehost' to 'foofoo'@'fakehost' -master-bin.000001 519 Query 1 # use `test`; rename user 'not_exist_user1'@'fakehost' to 'foobar'@'fakehost', 'bar'@'fakehost' to 'barbar'@'fakehost' -master-bin.000001 686 Query 1 # use `test`; drop user 'foofoo'@'fakehost' -master-bin.000001 778 Query 1 # use `test`; drop user 'not_exist_user1'@'fakehost', 'barbar'@'fakehost' +master-bin.000001 # Query # # use `test`; create user 'foo'@'fakehost' +master-bin.000001 # Query # # use `test`; create user 'foo'@'fakehost', 'bar'@'fakehost' +master-bin.000001 # Query # # use `test`; rename user 'foo'@'fakehost' to 'foofoo'@'fakehost' +master-bin.000001 # Query # # use `test`; rename user 'not_exist_user1'@'fakehost' to 'foobar'@'fakehost', 'bar'@'fakehost' to 'barbar'@'fakehost' +master-bin.000001 # Query # # use `test`; drop user 'foofoo'@'fakehost' +master-bin.000001 # Query # # use `test`; drop user 'not_exist_user1'@'fakehost', 'barbar'@'fakehost' diff --git a/mysql-test/t/rpl_loaddata_map-master.opt b/mysql-test/suite/rpl/t/rpl_loaddata_map-master.opt index f3c797b19c8..f3c797b19c8 100644 --- a/mysql-test/t/rpl_loaddata_map-master.opt +++ b/mysql-test/suite/rpl/t/rpl_loaddata_map-master.opt diff --git a/mysql-test/t/rpl_loaddata_map-slave.opt b/mysql-test/suite/rpl/t/rpl_loaddata_map-slave.opt index 95f55bcf7d8..95f55bcf7d8 100644 --- a/mysql-test/t/rpl_loaddata_map-slave.opt +++ b/mysql-test/suite/rpl/t/rpl_loaddata_map-slave.opt diff --git a/mysql-test/t/rpl_loaddata_map.test b/mysql-test/suite/rpl/t/rpl_loaddata_map.test index f3d14278396..be06397a3ca 100644 --- a/mysql-test/t/rpl_loaddata_map.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_map.test @@ -7,6 +7,7 @@ # BUG#33413 show binlog events fails if binlog has event size of close # to max_allowed_packet +source include/have_binlog_format_mixed_or_statement.inc; source include/master-slave.inc; source include/have_innodb.inc; @@ -33,10 +34,10 @@ eval load data infile '$MYSQLTEST_VARDIR/tmp/bug30435_5k.txt' into table t2; select count(*) from t2 /* 5 000 */; # the binglog will show fragmented Append_block events ---let $binlog_start=98 ---replace_column 5 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--let $binlog_start=106 +--replace_column 2 # 4 # 5 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/ +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $binlog_start <binlog_start> --eval show binlog events in 'master-bin.000002' from $binlog_start diff --git a/mysql-test/t/rpl_user.test b/mysql-test/suite/rpl/t/rpl_user.test index 8c85b1e9249..1f5f5bc9fc5 100644 --- a/mysql-test/t/rpl_user.test +++ b/mysql-test/suite/rpl/t/rpl_user.test @@ -7,8 +7,11 @@ reset master; # # remove all users will be used in the test # +set sql_log_bin=0; +delete from mysql.user where Host='fakehost'; +set sql_log_bin=1; +connection slave; delete from mysql.user where Host='fakehost'; -sync_slave_with_master; # # Test create user |