Commit 43c4a4c3 authored by hezx@mail.hezx.com's avatar hezx@mail.hezx.com

Post merge fix

parent 772ff3d4
--let $binlog_start=98 --let $binlog_start=106
--replace_result $binlog_start <binlog_start> --replace_result $binlog_start <binlog_start>
--replace_column 2 # 5 # --replace_column 2 # 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
......
...@@ -12,15 +12,15 @@ load data infile 'MYSQLTEST_VARDIR/tmp/bug30435_5k.txt' into table t2; ...@@ -12,15 +12,15 @@ load data infile 'MYSQLTEST_VARDIR/tmp/bug30435_5k.txt' into table t2;
select count(*) from t2 /* 5 000 */; select count(*) from t2 /* 5 000 */;
count(*) count(*)
5000 5000
show binlog events in 'master-bin.000002' from 98; show binlog events in 'master-bin.000002' from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info 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 # Query # # 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 # Begin_load_query # # ;file_id=#;block_len=#
master-bin.000002 7412 Append_block 1 # ;file_id=1;block_len=7168 master-bin.000002 # Append_block # # ;file_id=#;block_len=#
master-bin.000002 14603 Append_block 1 # ;file_id=1;block_len=2048 master-bin.000002 # Append_block # # ;file_id=#;block_len=#
master-bin.000002 16674 Append_block 1 # ;file_id=1;block_len=7168 master-bin.000002 # Append_block # # ;file_id=#;block_len=#
master-bin.000002 23865 Append_block 1 # ;file_id=1;block_len=341 master-bin.000002 # Append_block # # ;file_id=#;block_len=#
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 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 */; select count(*) from t2 /* 5 000 */;
count(*) count(*)
5000 5000
......
...@@ -5,6 +5,9 @@ reset slave; ...@@ -5,6 +5,9 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave; start slave;
reset master; 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'; delete from mysql.user where Host='fakehost';
create user 'foo'@'fakehost'; create user 'foo'@'fakehost';
create user 'foo'@'fakehost', 'bar'@'fakehost'; create user 'foo'@'fakehost', 'bar'@'fakehost';
...@@ -31,12 +34,11 @@ drop user 'not_exist_user1'@'fakehost', 'not_exist_user2'@'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' ERROR HY000: Operation DROP USER failed for 'not_exist_user1'@'fakehost','not_exist_user2'@'fakehost'
select Host,User from mysql.user where Host='fakehost'; select Host,User from mysql.user where Host='fakehost';
Host User Host User
show binlog events from 98; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info 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 # Query # # use `test`; create user 'foo'@'fakehost'
master-bin.000001 205 Query 1 # use `test`; create user 'foo'@'fakehost' master-bin.000001 # Query # # use `test`; create user 'foo'@'fakehost', 'bar'@'fakehost'
master-bin.000001 296 Query 1 # use `test`; create user 'foo'@'fakehost', 'bar'@'fakehost' master-bin.000001 # Query # # use `test`; rename user 'foo'@'fakehost' to 'foofoo'@'fakehost'
master-bin.000001 405 Query 1 # 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 519 Query 1 # 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 686 Query 1 # use `test`; drop user 'foofoo'@'fakehost' master-bin.000001 # Query # # use `test`; drop user 'not_exist_user1'@'fakehost', 'barbar'@'fakehost'
master-bin.000001 778 Query 1 # use `test`; drop user 'not_exist_user1'@'fakehost', 'barbar'@'fakehost'
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
# BUG#33413 show binlog events fails if binlog has event size of close # BUG#33413 show binlog events fails if binlog has event size of close
# to max_allowed_packet # to max_allowed_packet
source include/have_binlog_format_mixed_or_statement.inc;
source include/master-slave.inc; source include/master-slave.inc;
source include/have_innodb.inc; source include/have_innodb.inc;
...@@ -33,10 +34,10 @@ eval load data infile '$MYSQLTEST_VARDIR/tmp/bug30435_5k.txt' into table t2; ...@@ -33,10 +34,10 @@ eval load data infile '$MYSQLTEST_VARDIR/tmp/bug30435_5k.txt' into table t2;
select count(*) from t2 /* 5 000 */; select count(*) from t2 /* 5 000 */;
# the binglog will show fragmented Append_block events # the binglog will show fragmented Append_block events
--let $binlog_start=98 --let $binlog_start=106
--replace_column 5 # --replace_column 2 # 4 # 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// --replace_regex /\/\* xid=.* \*\//\/* XID *\// /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $binlog_start <binlog_start>
--eval show binlog events in 'master-bin.000002' from $binlog_start --eval show binlog events in 'master-bin.000002' from $binlog_start
......
...@@ -7,8 +7,11 @@ reset master; ...@@ -7,8 +7,11 @@ reset master;
# #
# remove all users will be used in the test # 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'; delete from mysql.user where Host='fakehost';
sync_slave_with_master;
# #
# Test create user # Test create user
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment