List:Commits« Previous MessageNext Message »
From:Mats Kindahl Date:February 22 2007 1:15pm
Subject:bk commit into 5.1 tree (mats:1.2409) BUG#23171
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of mats. When mats does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-02-22 13:15:19+01:00, mats@romeo.(none) +5 -0
  BUG#23171 (Illegal group log position):
  Adding test cases to verify the behavior.

  mysql-test/extra/rpl_tests/rpl_skip.test@stripped, 2007-02-22 13:15:15+01:00,
mats@romeo.(none) +194 -0
    New BitKeeper file ``mysql-test/extra/rpl_tests/rpl_skip.test''

  mysql-test/extra/rpl_tests/rpl_skip.test@stripped, 2007-02-22 13:15:15+01:00,
mats@romeo.(none) +0 -0

  mysql-test/r/rpl_skip_innodb.result@stripped, 2007-02-22 13:15:15+01:00, mats@romeo.(none)
+522 -0
    New BitKeeper file ``mysql-test/r/rpl_skip_innodb.result''

  mysql-test/r/rpl_skip_innodb.result@stripped, 2007-02-22 13:15:15+01:00, mats@romeo.(none) +0
-0

  mysql-test/r/rpl_skip_myisam.result@stripped, 2007-02-22 13:15:15+01:00, mats@romeo.(none)
+480 -0
    New BitKeeper file ``mysql-test/r/rpl_skip_myisam.result''

  mysql-test/r/rpl_skip_myisam.result@stripped, 2007-02-22 13:15:15+01:00, mats@romeo.(none) +0
-0

  mysql-test/t/rpl_skip_innodb.test@stripped, 2007-02-22 13:15:15+01:00, mats@romeo.(none) +2
-0
    New BitKeeper file ``mysql-test/t/rpl_skip_innodb.test''

  mysql-test/t/rpl_skip_innodb.test@stripped, 2007-02-22 13:15:15+01:00, mats@romeo.(none) +0
-0

  mysql-test/t/rpl_skip_myisam.test@stripped, 2007-02-22 13:15:15+01:00, mats@romeo.(none) +2
-0
    New BitKeeper file ``mysql-test/t/rpl_skip_myisam.test''

  mysql-test/t/rpl_skip_myisam.test@stripped, 2007-02-22 13:15:15+01:00, mats@romeo.(none) +0
-0

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	mats
# Host:	romeo.(none)
# Root:	/home/bk/b23171-mysql-5.1-new-rpl
--- New file ---
+++ mysql-test/extra/rpl_tests/rpl_skip.test	07/02/22 13:15:15
#
# Testing that skipping events on the slave works as expected.
#

-- source include/have_innodb.inc
-- source include/master-slave.inc

let $SERVER_VERSION=`select version()`;

connection master;
RESET MASTER;
connection slave;
STOP SLAVE;
RESET SLAVE;
START SLAVE;

# We create a big blob on the master
connection master;
set @blob = '0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF';
set @blob = concat(@blob,@blob,@blob,@blob);

# We create two tables on master (and slave) and drop one on the
# slave. That will cause the slave to stop when trying to write to the
# undefined table, and we can test skipping.
connection master;
eval CREATE TABLE t1 (a INT, b BLOB) ENGINE=$engine_type;
eval CREATE TABLE t2 (a INT, b BLOB) ENGINE=$engine_type;
sync_slave_with_master;
DROP TABLE t1;

# Now we test that the slave stops at the change to t1 and that when
# we skip it only one event (the statement consists of two), the slave
# will skip the entire statement, start executing on the insert into
# to t2, and still be running when that statement has been applied.

connection master;
INSERT INTO t1 VALUES (1,@blob);
INSERT INTO t2 VALUES (1,@blob);

# For debug purposes
SHOW BINLOG EVENTS;

save_master_pos;
connection slave;
wait_for_slave_to_stop;
--replace_column 1 # 23 # 33 #
--replace_result $MASTER_MYPORT MASTER_MYPORT
--query_vertical SHOW SLAVE STATUS
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
sync_with_master;
SHOW TABLES;
SELECT a FROM t2 ORDER BY a;
--replace_column 1 # 23 # 33 #
--replace_result $MASTER_MYPORT MASTER_MYPORT
--query_vertical SHOW SLAVE STATUS

# Now we create a transaction and test that skipping behaves as
# expected. When skipping into the middle of a statement group, the
# skipping should be to the end of the statement group, and then
# execution should start from that point. We generate three sets of
# inserts to check for beginning, middle, and end of a transaction
# (the last stopping point is actually inside the transaction, but it
# is conceivable that there is logic that handles the last statement
# of a transaction differently).

connection master;
BEGIN;
let $1=3;
while ($1) {
  eval INSERT INTO t1 VALUES (5-$1, @blob);
  eval INSERT INTO t2 VALUES (5-$1, @blob);
  dec $1;
}
COMMIT;

SELECT a FROM t2 ORDER BY a;

# For debug purposes
SHOW BINLOG EVENTS;

save_master_pos;
connection slave;

# This is one more waiting iteration than the inserts done above: the
# first skip will skip the BEGIN statement and stop at the first table
# map event of the transaction.  If the storage engine is
# non-transactional, there will be no BEGIN statement, so we have to
# correct for that.

let $1=`select 4 - ('$engine_type' = 'myisam')`;

while ($1) {
  wait_for_slave_to_stop;
  --replace_column 1 # 23 # 33 #
  --replace_result $MASTER_MYPORT MASTER_MYPORT
  --query_vertical SHOW SLAVE STATUS
  SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
  START SLAVE;
  dec $1;
}

sync_with_master;
--replace_column 1 # 23 # 33 #
--replace_result $MASTER_MYPORT MASTER_MYPORT
--query_vertical SHOW SLAVE STATUS

connection master;
DROP TABLES IF EXISTS t1,t2;
sync_slave_with_master;


#########################################
# Test #2 Skip w/ Triggers BUG #23171
#########################################
connection master;
RESET MASTER;
connection slave;
STOP SLAVE;
RESET SLAVE;
START SLAVE;

connection master;
eval CREATE TABLE t1 ( a INT ) ENGINE=$engine_type;
eval CREATE TABLE t2 ( a INT AUTO_INCREMENT, KEY (a) ) ENGINE=$engine_type;

delimiter |;
create trigger t1_ai after insert on t1 for each row
begin
 insert into t2 values (NULL);
end|
delimiter ;|


--echo **** On Slave ****
sync_slave_with_master;
connection slave;
DROP TABLE t1;

--echo **** On Master ****
connection master;
BEGIN;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
COMMIT;
SELECT a FROM t1 ORDER BY a;
SELECT a FROM t2 ORDER BY a;


# For debug purposes
SHOW BINLOG EVENTS;

--echo **** On Slave ****
real_sleep 3;
connection slave;
--replace_result $MASTER_MYPORT MASTER_MYPORT
--replace_column 1 # 23 # 33 #
--query_vertical SHOW SLAVE STATUS

STOP SLAVE;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
real_sleep 3;
--replace_result $MASTER_MYPORT MASTER_MYPORT
--replace_column 1 # 23 # 33 #
--query_vertical SHOW SLAVE STATUS
SELECT a FROM t2 ORDER BY a;

STOP SLAVE;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
real_sleep 3;
--replace_result $MASTER_MYPORT MASTER_MYPORT
--replace_column 1 # 23 # 33 #
--query_vertical SHOW SLAVE STATUS
SELECT a FROM t2 ORDER BY a;

STOP SLAVE;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
real_sleep 3;
--replace_result $MASTER_MYPORT MASTER_MYPORT
--replace_column 1 # 23 # 33 #
--query_vertical SHOW SLAVE STATUS
SELECT a FROM t2 ORDER BY a;

--disable_warnings
connection master;
drop table if exists t1, t2;
sync_slave_with_master;
--enable_warnings

#End 5.1 test


--- New file ---
+++ mysql-test/r/rpl_skip_innodb.result	07/02/22 13:15:15
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;
RESET MASTER;
STOP SLAVE;
RESET SLAVE;
START SLAVE;
set @blob = '0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF';
set @blob = concat(@blob,@blob,@blob,@blob);
CREATE TABLE t1 (a INT, b BLOB) ENGINE=innodb;
CREATE TABLE t2 (a INT, b BLOB) ENGINE=innodb;
DROP TABLE t1;
INSERT INTO t1 VALUES (1,@blob);
INSERT INTO t2 VALUES (1,@blob);
SHOW BINLOG EVENTS;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	4	Format_desc	1	102	Server ver: 5.1.15-beta-debug-log, Binlog ver: 4
master-bin.000001	102	Query	1	210	use `test`; CREATE TABLE t1 (a INT, b BLOB)
ENGINE=innodb
master-bin.000001	210	Query	1	318	use `test`; CREATE TABLE t2 (a INT, b BLOB)
ENGINE=innodb
master-bin.000001	318	Table_map	1	40	table_id: 17 (test.t1)
master-bin.000001	358	Write_rows	1	332	table_id: 17 flags: STMT_END_F
master-bin.000001	650	Xid	1	677	COMMIT /* xid=44 */
master-bin.000001	677	Table_map	1	40	table_id: 18 (test.t2)
master-bin.000001	717	Write_rows	1	332	table_id: 18 flags: STMT_END_F
master-bin.000001	1009	Xid	1	1036	COMMIT /* xid=45 */
SHOW SLAVE STATUS;
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_MYPORT
Connect_Retry	1
Master_Log_File	master-bin.000001
Read_Master_Log_Pos	1036
Relay_Log_File	slave-relay-bin.000003
Relay_Log_Pos	460
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	No
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	1146
Last_Error	Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1`
Skip_Counter	0
Exec_Master_Log_Pos	318
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SHOW TABLES;
Tables_in_test
t2
SELECT a FROM t2 ORDER BY a;
a
1
SHOW SLAVE STATUS;
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_MYPORT
Connect_Retry	1
Master_Log_File	master-bin.000001
Read_Master_Log_Pos	1036
Relay_Log_File	slave-relay-bin.000003
Relay_Log_Pos	1178
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	Yes
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	0
Last_Error	
Skip_Counter	0
Exec_Master_Log_Pos	1036
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
BEGIN;
INSERT INTO t1 VALUES (5-3, @blob);
INSERT INTO t2 VALUES (5-3, @blob);
INSERT INTO t1 VALUES (5-2, @blob);
INSERT INTO t2 VALUES (5-2, @blob);
INSERT INTO t1 VALUES (5-1, @blob);
INSERT INTO t2 VALUES (5-1, @blob);
COMMIT;
SELECT a FROM t2 ORDER BY a;
a
1
2
3
4
SHOW BINLOG EVENTS;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	4	Format_desc	1	102	Server ver: 5.1.15-beta-debug-log, Binlog ver: 4
master-bin.000001	102	Query	1	210	use `test`; CREATE TABLE t1 (a INT, b BLOB)
ENGINE=innodb
master-bin.000001	210	Query	1	318	use `test`; CREATE TABLE t2 (a INT, b BLOB)
ENGINE=innodb
master-bin.000001	318	Table_map	1	40	table_id: 17 (test.t1)
master-bin.000001	358	Write_rows	1	332	table_id: 17 flags: STMT_END_F
master-bin.000001	650	Xid	1	677	COMMIT /* xid=44 */
master-bin.000001	677	Table_map	1	40	table_id: 18 (test.t2)
master-bin.000001	717	Write_rows	1	332	table_id: 18 flags: STMT_END_F
master-bin.000001	1009	Xid	1	1036	COMMIT /* xid=45 */
master-bin.000001	1036	Query	1	1104	use `test`; BEGIN
master-bin.000001	1104	Table_map	1	40	table_id: 17 (test.t1)
master-bin.000001	1144	Write_rows	1	332	table_id: 17 flags: STMT_END_F
master-bin.000001	1436	Table_map	1	372	table_id: 18 (test.t2)
master-bin.000001	1476	Write_rows	1	664	table_id: 18 flags: STMT_END_F
master-bin.000001	1768	Table_map	1	704	table_id: 17 (test.t1)
master-bin.000001	1808	Write_rows	1	996	table_id: 17 flags: STMT_END_F
master-bin.000001	2100	Table_map	1	1036	table_id: 18 (test.t2)
master-bin.000001	2140	Write_rows	1	1328	table_id: 18 flags: STMT_END_F
master-bin.000001	2432	Table_map	1	1368	table_id: 17 (test.t1)
master-bin.000001	2472	Write_rows	1	1660	table_id: 17 flags: STMT_END_F
master-bin.000001	2764	Table_map	1	1700	table_id: 18 (test.t2)
master-bin.000001	2804	Write_rows	1	1992	table_id: 18 flags: STMT_END_F
master-bin.000001	3096	Xid	1	3123	COMMIT /* xid=50 */
SHOW SLAVE STATUS;
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_MYPORT
Connect_Retry	1
Master_Log_File	master-bin.000001
Read_Master_Log_Pos	3123
Relay_Log_File	slave-relay-bin.000003
Relay_Log_Pos	1178
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	No
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	1146
Last_Error	Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1`
Skip_Counter	0
Exec_Master_Log_Pos	1036
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SHOW SLAVE STATUS;
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_MYPORT
Connect_Retry	1
Master_Log_File	master-bin.000001
Read_Master_Log_Pos	3123
Relay_Log_File	slave-relay-bin.000003
Relay_Log_Pos	1246
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	No
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	1146
Last_Error	Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1`
Skip_Counter	0
Exec_Master_Log_Pos	1104
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SHOW SLAVE STATUS;
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_MYPORT
Connect_Retry	1
Master_Log_File	master-bin.000001
Read_Master_Log_Pos	3123
Relay_Log_File	slave-relay-bin.000003
Relay_Log_Pos	1910
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	No
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	1146
Last_Error	Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1`
Skip_Counter	0
Exec_Master_Log_Pos	664
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SHOW SLAVE STATUS;
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_MYPORT
Connect_Retry	1
Master_Log_File	master-bin.000001
Read_Master_Log_Pos	3123
Relay_Log_File	slave-relay-bin.000003
Relay_Log_Pos	2574
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	No
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	1146
Last_Error	Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1`
Skip_Counter	0
Exec_Master_Log_Pos	1328
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SHOW SLAVE STATUS;
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_MYPORT
Connect_Retry	1
Master_Log_File	master-bin.000001
Read_Master_Log_Pos	3123
Relay_Log_File	slave-relay-bin.000003
Relay_Log_Pos	3265
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	Yes
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	0
Last_Error	
Skip_Counter	0
Exec_Master_Log_Pos	3123
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
DROP TABLES IF EXISTS t1,t2;
RESET MASTER;
STOP SLAVE;
RESET SLAVE;
START SLAVE;
CREATE TABLE t1 ( a INT ) ENGINE=innodb;
CREATE TABLE t2 ( a INT AUTO_INCREMENT, KEY (a) ) ENGINE=innodb;
create trigger t1_ai after insert on t1 for each row
begin
insert into t2 values (NULL);
end|
**** On Slave ****
DROP TABLE t1;
**** On Master ****
BEGIN;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
COMMIT;
SELECT a FROM t1 ORDER BY a;
a
1
2
SELECT a FROM t2 ORDER BY a;
a
1
2
SHOW BINLOG EVENTS;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	4	Format_desc	1	102	Server ver: 5.1.15-beta-debug-log, Binlog ver: 4
master-bin.000001	102	Query	1	204	use `test`; CREATE TABLE t1 ( a INT ) ENGINE=innodb
master-bin.000001	204	Query	1	330	use `test`; CREATE TABLE t2 ( a INT AUTO_INCREMENT, KEY
(a) ) ENGINE=innodb
master-bin.000001	330	Query	1	512	use `test`; CREATE DEFINER=`root`@`localhost` trigger
t1_ai after insert on t1 for each row
begin
insert into t2 values (NULL);
end
master-bin.000001	512	Query	1	580	use `test`; BEGIN
master-bin.000001	580	Table_map	1	39	table_id: 20 (test.t1)
master-bin.000001	619	Table_map	1	78	table_id: 21 (test.t2)
master-bin.000001	658	Write_rows	1	112	table_id: 20
master-bin.000001	692	Write_rows	1	146	table_id: 21 flags: STMT_END_F
master-bin.000001	726	Table_map	1	185	table_id: 20 (test.t1)
master-bin.000001	765	Table_map	1	224	table_id: 21 (test.t2)
master-bin.000001	804	Write_rows	1	258	table_id: 20
master-bin.000001	838	Write_rows	1	292	table_id: 21 flags: STMT_END_F
master-bin.000001	872	Xid	1	899	COMMIT /* xid=76 */
**** On Slave ****
SHOW SLAVE STATUS;
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_MYPORT
Connect_Retry	1
Master_Log_File	master-bin.000001
Read_Master_Log_Pos	899
Relay_Log_File	slave-relay-bin.000003
Relay_Log_Pos	654
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	No
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	1146
Last_Error	Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1`
Skip_Counter	0
Exec_Master_Log_Pos	512
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
STOP SLAVE;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SHOW SLAVE STATUS;
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_MYPORT
Connect_Retry	1
Master_Log_File	master-bin.000001
Read_Master_Log_Pos	899
Relay_Log_File	slave-relay-bin.000003
Relay_Log_Pos	722
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	No
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	1146
Last_Error	Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1`
Skip_Counter	0
Exec_Master_Log_Pos	580
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
SELECT a FROM t2 ORDER BY a;
a
STOP SLAVE;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SHOW SLAVE STATUS;
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_MYPORT
Connect_Retry	1
Master_Log_File	master-bin.000001
Read_Master_Log_Pos	899
Relay_Log_File	slave-relay-bin.000003
Relay_Log_Pos	868
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	No
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	1146
Last_Error	Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1`
Skip_Counter	0
Exec_Master_Log_Pos	146
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
SELECT a FROM t2 ORDER BY a;
a
1
STOP SLAVE;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SHOW SLAVE STATUS;
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_MYPORT
Connect_Retry	1
Master_Log_File	master-bin.000001
Read_Master_Log_Pos	899
Relay_Log_File	slave-relay-bin.000006
Relay_Log_Pos	244
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	Yes
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	0
Last_Error	
Skip_Counter	0
Exec_Master_Log_Pos	899
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
SELECT a FROM t2 ORDER BY a;
a
1
2
drop table if exists t1, t2;

--- New file ---
+++ mysql-test/r/rpl_skip_myisam.result	07/02/22 13:15:15
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;
RESET MASTER;
STOP SLAVE;
RESET SLAVE;
START SLAVE;
set @blob = '0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF';
set @blob = concat(@blob,@blob,@blob,@blob);
CREATE TABLE t1 (a INT, b BLOB) ENGINE=myisam;
CREATE TABLE t2 (a INT, b BLOB) ENGINE=myisam;
DROP TABLE t1;
INSERT INTO t1 VALUES (1,@blob);
INSERT INTO t2 VALUES (1,@blob);
SHOW BINLOG EVENTS;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	4	Format_desc	1	102	Server ver: 5.1.15-beta-debug-log, Binlog ver: 4
master-bin.000001	102	Query	1	210	use `test`; CREATE TABLE t1 (a INT, b BLOB)
ENGINE=myisam
master-bin.000001	210	Query	1	318	use `test`; CREATE TABLE t2 (a INT, b BLOB)
ENGINE=myisam
master-bin.000001	318	Table_map	1	358	table_id: 22 (test.t1)
master-bin.000001	358	Write_rows	1	650	table_id: 22 flags: STMT_END_F
master-bin.000001	650	Table_map	1	690	table_id: 23 (test.t2)
master-bin.000001	690	Write_rows	1	982	table_id: 23 flags: STMT_END_F
SHOW SLAVE STATUS;
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_MYPORT
Connect_Retry	1
Master_Log_File	master-bin.000001
Read_Master_Log_Pos	982
Relay_Log_File	slave-relay-bin.000003
Relay_Log_Pos	460
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	No
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	1146
Last_Error	Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1`
Skip_Counter	0
Exec_Master_Log_Pos	318
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SHOW TABLES;
Tables_in_test
t2
SELECT a FROM t2 ORDER BY a;
a
1
SHOW SLAVE STATUS;
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_MYPORT
Connect_Retry	1
Master_Log_File	master-bin.000001
Read_Master_Log_Pos	982
Relay_Log_File	slave-relay-bin.000003
Relay_Log_Pos	1124
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	Yes
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	0
Last_Error	
Skip_Counter	0
Exec_Master_Log_Pos	982
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
BEGIN;
INSERT INTO t1 VALUES (5-3, @blob);
INSERT INTO t2 VALUES (5-3, @blob);
INSERT INTO t1 VALUES (5-2, @blob);
INSERT INTO t2 VALUES (5-2, @blob);
INSERT INTO t1 VALUES (5-1, @blob);
INSERT INTO t2 VALUES (5-1, @blob);
COMMIT;
SELECT a FROM t2 ORDER BY a;
a
1
2
3
4
SHOW BINLOG EVENTS;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	4	Format_desc	1	102	Server ver: 5.1.15-beta-debug-log, Binlog ver: 4
master-bin.000001	102	Query	1	210	use `test`; CREATE TABLE t1 (a INT, b BLOB)
ENGINE=myisam
master-bin.000001	210	Query	1	318	use `test`; CREATE TABLE t2 (a INT, b BLOB)
ENGINE=myisam
master-bin.000001	318	Table_map	1	358	table_id: 22 (test.t1)
master-bin.000001	358	Write_rows	1	650	table_id: 22 flags: STMT_END_F
master-bin.000001	650	Table_map	1	690	table_id: 23 (test.t2)
master-bin.000001	690	Write_rows	1	982	table_id: 23 flags: STMT_END_F
master-bin.000001	982	Table_map	1	1022	table_id: 22 (test.t1)
master-bin.000001	1022	Write_rows	1	1314	table_id: 22 flags: STMT_END_F
master-bin.000001	1314	Table_map	1	1354	table_id: 23 (test.t2)
master-bin.000001	1354	Write_rows	1	1646	table_id: 23 flags: STMT_END_F
master-bin.000001	1646	Table_map	1	1686	table_id: 22 (test.t1)
master-bin.000001	1686	Write_rows	1	1978	table_id: 22 flags: STMT_END_F
master-bin.000001	1978	Table_map	1	2018	table_id: 23 (test.t2)
master-bin.000001	2018	Write_rows	1	2310	table_id: 23 flags: STMT_END_F
master-bin.000001	2310	Table_map	1	2350	table_id: 22 (test.t1)
master-bin.000001	2350	Write_rows	1	2642	table_id: 22 flags: STMT_END_F
master-bin.000001	2642	Table_map	1	2682	table_id: 23 (test.t2)
master-bin.000001	2682	Write_rows	1	2974	table_id: 23 flags: STMT_END_F
SHOW SLAVE STATUS;
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_MYPORT
Connect_Retry	1
Master_Log_File	master-bin.000001
Read_Master_Log_Pos	2974
Relay_Log_File	slave-relay-bin.000003
Relay_Log_Pos	1124
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	No
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	1146
Last_Error	Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1`
Skip_Counter	0
Exec_Master_Log_Pos	982
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SHOW SLAVE STATUS;
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_MYPORT
Connect_Retry	1
Master_Log_File	master-bin.000001
Read_Master_Log_Pos	2974
Relay_Log_File	slave-relay-bin.000003
Relay_Log_Pos	1788
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	No
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	1146
Last_Error	Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1`
Skip_Counter	0
Exec_Master_Log_Pos	1646
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SHOW SLAVE STATUS;
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_MYPORT
Connect_Retry	1
Master_Log_File	master-bin.000001
Read_Master_Log_Pos	2974
Relay_Log_File	slave-relay-bin.000003
Relay_Log_Pos	2452
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	No
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	1146
Last_Error	Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1`
Skip_Counter	0
Exec_Master_Log_Pos	2310
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SHOW SLAVE STATUS;
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_MYPORT
Connect_Retry	1
Master_Log_File	master-bin.000001
Read_Master_Log_Pos	2974
Relay_Log_File	slave-relay-bin.000003
Relay_Log_Pos	3116
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	Yes
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	0
Last_Error	
Skip_Counter	0
Exec_Master_Log_Pos	2974
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
DROP TABLES IF EXISTS t1,t2;
RESET MASTER;
STOP SLAVE;
RESET SLAVE;
START SLAVE;
CREATE TABLE t1 ( a INT ) ENGINE=myisam;
CREATE TABLE t2 ( a INT AUTO_INCREMENT, KEY (a) ) ENGINE=myisam;
create trigger t1_ai after insert on t1 for each row
begin
insert into t2 values (NULL);
end|
**** On Slave ****
DROP TABLE t1;
**** On Master ****
BEGIN;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
COMMIT;
SELECT a FROM t1 ORDER BY a;
a
1
2
SELECT a FROM t2 ORDER BY a;
a
1
2
SHOW BINLOG EVENTS;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	4	Format_desc	1	102	Server ver: 5.1.15-beta-debug-log, Binlog ver: 4
master-bin.000001	102	Query	1	204	use `test`; CREATE TABLE t1 ( a INT ) ENGINE=myisam
master-bin.000001	204	Query	1	330	use `test`; CREATE TABLE t2 ( a INT AUTO_INCREMENT, KEY
(a) ) ENGINE=myisam
master-bin.000001	330	Query	1	512	use `test`; CREATE DEFINER=`root`@`localhost` trigger
t1_ai after insert on t1 for each row
begin
insert into t2 values (NULL);
end
master-bin.000001	512	Table_map	1	551	table_id: 25 (test.t1)
master-bin.000001	551	Table_map	1	590	table_id: 26 (test.t2)
master-bin.000001	590	Write_rows	1	624	table_id: 25
master-bin.000001	624	Write_rows	1	658	table_id: 26 flags: STMT_END_F
master-bin.000001	658	Table_map	1	697	table_id: 25 (test.t1)
master-bin.000001	697	Table_map	1	736	table_id: 26 (test.t2)
master-bin.000001	736	Write_rows	1	770	table_id: 25
master-bin.000001	770	Write_rows	1	804	table_id: 26 flags: STMT_END_F
**** On Slave ****
SHOW SLAVE STATUS;
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_MYPORT
Connect_Retry	1
Master_Log_File	master-bin.000001
Read_Master_Log_Pos	804
Relay_Log_File	slave-relay-bin.000003
Relay_Log_Pos	654
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	No
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	1146
Last_Error	Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1`
Skip_Counter	0
Exec_Master_Log_Pos	512
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
STOP SLAVE;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SHOW SLAVE STATUS;
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_MYPORT
Connect_Retry	1
Master_Log_File	master-bin.000001
Read_Master_Log_Pos	804
Relay_Log_File	slave-relay-bin.000003
Relay_Log_Pos	800
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	No
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	1146
Last_Error	Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1`
Skip_Counter	0
Exec_Master_Log_Pos	658
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
SELECT a FROM t2 ORDER BY a;
a
1
STOP SLAVE;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SHOW SLAVE STATUS;
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_MYPORT
Connect_Retry	1
Master_Log_File	master-bin.000001
Read_Master_Log_Pos	804
Relay_Log_File	slave-relay-bin.000005
Relay_Log_Pos	244
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	Yes
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	0
Last_Error	
Skip_Counter	0
Exec_Master_Log_Pos	804
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
SELECT a FROM t2 ORDER BY a;
a
1
2
STOP SLAVE;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SHOW SLAVE STATUS;
Slave_IO_State	#
Master_Host	127.0.0.1
Master_User	root
Master_Port	MASTER_MYPORT
Connect_Retry	1
Master_Log_File	master-bin.000001
Read_Master_Log_Pos	804
Relay_Log_File	slave-relay-bin.000006
Relay_Log_Pos	244
Relay_Master_Log_File	master-bin.000001
Slave_IO_Running	Yes
Slave_SQL_Running	Yes
Replicate_Do_DB	
Replicate_Ignore_DB	
Replicate_Do_Table	
Replicate_Ignore_Table	
Replicate_Wild_Do_Table	
Replicate_Wild_Ignore_Table	
Last_Errno	0
Last_Error	
Skip_Counter	1
Exec_Master_Log_Pos	804
Relay_Log_Space	#
Until_Condition	None
Until_Log_File	
Until_Log_Pos	0
Master_SSL_Allowed	No
Master_SSL_CA_File	
Master_SSL_CA_Path	
Master_SSL_Cert	
Master_SSL_Cipher	
Master_SSL_Key	
Seconds_Behind_Master	#
SELECT a FROM t2 ORDER BY a;
a
1
2
drop table if exists t1, t2;

--- New file ---
+++ mysql-test/t/rpl_skip_innodb.test	07/02/22 13:15:15
let $engine_type = innodb;
--source extra/rpl_tests/rpl_skip.test

--- New file ---
+++ mysql-test/t/rpl_skip_myisam.test	07/02/22 13:15:15
let $engine_type = myisam;
--source extra/rpl_tests/rpl_skip.test

Thread
bk commit into 5.1 tree (mats:1.2409) BUG#23171Mats Kindahl22 Feb