Loading mysql-test/extra/rpl_tests/rpl_row_basic.test +99 −0 Original line number Diff line number Diff line Loading @@ -471,3 +471,102 @@ source include/diff_tables.inc; connection master; drop table t1; sync_slave_with_master; # # BUG#40004: Replication failure with no PK + no indexes # # The test cases are taken from the bug report. It is difficult to # produce a test case that generates a HA_ERR_RECORD_DELETED, so we go # with the test cases we have. connection master; eval CREATE TABLE t1 (a int) ENGINE=$type; INSERT IGNORE INTO t1 VALUES (NULL); INSERT INTO t1 ( a ) VALUES ( 0 ); INSERT INTO t1 ( a ) VALUES ( 9 ); INSERT INTO t1 ( a ) VALUES ( 2 ); INSERT INTO t1 ( a ) VALUES ( 9 ); INSERT INTO t1 ( a ) VALUES ( 5 ); UPDATE t1 SET a = 5 WHERE a = 9; DELETE FROM t1 WHERE a < 6; UPDATE t1 SET a = 9 WHERE a < 3; INSERT INTO t1 ( a ) VALUES ( 3 ); UPDATE t1 SET a = 0 WHERE a < 4; UPDATE t1 SET a = 8 WHERE a < 5; sync_slave_with_master; let $diff_table_1=master:test.t1; let $diff_table_2=slave:test.t1; source include/diff_tables.inc; connection master; drop table t1; sync_slave_with_master; # # Bug #39752: Replication failure on RBR + MyISAM + no PK # # The test cases are taken from the bug report. It is difficult to # produce a test case that generates a HA_ERR_RECORD_DELETED, so we go # with the test cases we have. connection master; --disable_warnings eval CREATE TABLE t1 (a bit) ENGINE=$type; INSERT IGNORE INTO t1 VALUES (NULL); INSERT INTO t1 ( a ) VALUES ( 0 ); UPDATE t1 SET a = 0 WHERE a = 1 LIMIT 3; INSERT INTO t1 ( a ) VALUES ( 5 ); DELETE FROM t1 WHERE a < 2 LIMIT 4; DELETE FROM t1 WHERE a < 9 LIMIT 4; INSERT INTO t1 ( a ) VALUES ( 9 ); UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6; INSERT INTO t1 ( a ) VALUES ( 8 ); UPDATE t1 SET a = 0 WHERE a < 6 LIMIT 0; INSERT INTO t1 ( a ) VALUES ( 4 ); INSERT INTO t1 ( a ) VALUES ( 3 ); UPDATE t1 SET a = 0 WHERE a = 7 LIMIT 6; DELETE FROM t1 WHERE a = 4 LIMIT 7; UPDATE t1 SET a = 9 WHERE a < 2 LIMIT 9; UPDATE t1 SET a = 0 WHERE a < 9 LIMIT 2; DELETE FROM t1 WHERE a < 0 LIMIT 5; INSERT INTO t1 ( a ) VALUES ( 5 ); UPDATE t1 SET a = 4 WHERE a < 6 LIMIT 4; INSERT INTO t1 ( a ) VALUES ( 5 ); UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 8; DELETE FROM t1 WHERE a < 8 LIMIT 8; INSERT INTO t1 ( a ) VALUES ( 6 ); DELETE FROM t1 WHERE a < 6 LIMIT 7; UPDATE t1 SET a = 7 WHERE a = 3 LIMIT 7; UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6; INSERT INTO t1 ( a ) VALUES ( 7 ); DELETE FROM t1 WHERE a < 9 LIMIT 4; INSERT INTO t1 ( a ) VALUES ( 7 ); INSERT INTO t1 ( a ) VALUES ( 6 ); UPDATE t1 SET a = 8 WHERE a = 3 LIMIT 4; DELETE FROM t1 WHERE a = 2 LIMIT 9; DELETE FROM t1 WHERE a = 1 LIMIT 4; UPDATE t1 SET a = 4 WHERE a = 2 LIMIT 7; INSERT INTO t1 ( a ) VALUES ( 0 ); DELETE FROM t1 WHERE a < 3 LIMIT 0; UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2; INSERT INTO t1 ( a ) VALUES ( 1 ); UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3; --enable_warnings sync_slave_with_master; let $diff_table_1=master:test.t1; let $diff_table_2=slave:test.t1; source include/diff_tables.inc; connection master; drop table t1; sync_slave_with_master; mysql-test/r/alter_table.result +12 −0 Original line number Diff line number Diff line Loading @@ -1222,4 +1222,16 @@ ALTER TABLE t1 CHANGE d c varchar(10); affected rows: 0 info: Records: 0 Duplicates: 0 Warnings: 0 DROP TABLE t1; CREATE TABLE t1(a INT AUTO_INCREMENT PRIMARY KEY, b ENUM('a', 'b', 'c') NOT NULL); INSERT INTO t1 (b) VALUES ('a'), ('c'), ('b'), ('b'), ('a'); ALTER TABLE t1 MODIFY b ENUM('a', 'z', 'b', 'c') NOT NULL; SELECT * FROM t1; a b 1 a 2 c 3 b 4 b 5 a DROP TABLE t1; End of 5.1 tests mysql-test/r/binlog_format_basic.result +3 −0 Original line number Diff line number Diff line SELECT @@GLOBAL.binlog_format; @@GLOBAL.binlog_format STATEMENT '#---------------------BS_STVARS_002_01----------------------#' SELECT COUNT(@@GLOBAL.binlog_format); COUNT(@@GLOBAL.binlog_format) Loading mysql-test/r/innodb_mysql.result +9 −0 Original line number Diff line number Diff line Loading @@ -1668,3 +1668,12 @@ explain select a from t2 where a=b; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 index NULL a 10 NULL # Using where; Using index drop table t1, t2; SET SESSION BINLOG_FORMAT=STATEMENT; SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; select @@session.sql_log_bin, @@session.binlog_format, @@session.tx_isolation; @@session.sql_log_bin 1 @@session.binlog_format STATEMENT @@session.tx_isolation READ-COMMITTED CREATE TABLE t1 ( a INT ) ENGINE=InnoDB; INSERT INTO t1 VALUES(1); DROP TABLE t1; mysql-test/r/xa.result +20 −0 Original line number Diff line number Diff line Loading @@ -55,3 +55,23 @@ select * from t1; a 20 drop table t1; drop table if exists t1; create table t1(a int, b int, c varchar(20), primary key(a)) engine = innodb; insert into t1 values(1, 1, 'a'); insert into t1 values(2, 2, 'b'); xa start 'a','b'; update t1 set c = 'aa' where a = 1; xa start 'a','c'; update t1 set c = 'bb' where a = 2; update t1 set c = 'bb' where a = 2; update t1 set c = 'aa' where a = 1; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction select count(*) from t1; count(*) 2 xa end 'a','c'; ERROR XA102: XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected xa rollback 'a','c'; xa start 'a','c'; drop table t1; End of 5.0 tests Loading
mysql-test/extra/rpl_tests/rpl_row_basic.test +99 −0 Original line number Diff line number Diff line Loading @@ -471,3 +471,102 @@ source include/diff_tables.inc; connection master; drop table t1; sync_slave_with_master; # # BUG#40004: Replication failure with no PK + no indexes # # The test cases are taken from the bug report. It is difficult to # produce a test case that generates a HA_ERR_RECORD_DELETED, so we go # with the test cases we have. connection master; eval CREATE TABLE t1 (a int) ENGINE=$type; INSERT IGNORE INTO t1 VALUES (NULL); INSERT INTO t1 ( a ) VALUES ( 0 ); INSERT INTO t1 ( a ) VALUES ( 9 ); INSERT INTO t1 ( a ) VALUES ( 2 ); INSERT INTO t1 ( a ) VALUES ( 9 ); INSERT INTO t1 ( a ) VALUES ( 5 ); UPDATE t1 SET a = 5 WHERE a = 9; DELETE FROM t1 WHERE a < 6; UPDATE t1 SET a = 9 WHERE a < 3; INSERT INTO t1 ( a ) VALUES ( 3 ); UPDATE t1 SET a = 0 WHERE a < 4; UPDATE t1 SET a = 8 WHERE a < 5; sync_slave_with_master; let $diff_table_1=master:test.t1; let $diff_table_2=slave:test.t1; source include/diff_tables.inc; connection master; drop table t1; sync_slave_with_master; # # Bug #39752: Replication failure on RBR + MyISAM + no PK # # The test cases are taken from the bug report. It is difficult to # produce a test case that generates a HA_ERR_RECORD_DELETED, so we go # with the test cases we have. connection master; --disable_warnings eval CREATE TABLE t1 (a bit) ENGINE=$type; INSERT IGNORE INTO t1 VALUES (NULL); INSERT INTO t1 ( a ) VALUES ( 0 ); UPDATE t1 SET a = 0 WHERE a = 1 LIMIT 3; INSERT INTO t1 ( a ) VALUES ( 5 ); DELETE FROM t1 WHERE a < 2 LIMIT 4; DELETE FROM t1 WHERE a < 9 LIMIT 4; INSERT INTO t1 ( a ) VALUES ( 9 ); UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6; INSERT INTO t1 ( a ) VALUES ( 8 ); UPDATE t1 SET a = 0 WHERE a < 6 LIMIT 0; INSERT INTO t1 ( a ) VALUES ( 4 ); INSERT INTO t1 ( a ) VALUES ( 3 ); UPDATE t1 SET a = 0 WHERE a = 7 LIMIT 6; DELETE FROM t1 WHERE a = 4 LIMIT 7; UPDATE t1 SET a = 9 WHERE a < 2 LIMIT 9; UPDATE t1 SET a = 0 WHERE a < 9 LIMIT 2; DELETE FROM t1 WHERE a < 0 LIMIT 5; INSERT INTO t1 ( a ) VALUES ( 5 ); UPDATE t1 SET a = 4 WHERE a < 6 LIMIT 4; INSERT INTO t1 ( a ) VALUES ( 5 ); UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 8; DELETE FROM t1 WHERE a < 8 LIMIT 8; INSERT INTO t1 ( a ) VALUES ( 6 ); DELETE FROM t1 WHERE a < 6 LIMIT 7; UPDATE t1 SET a = 7 WHERE a = 3 LIMIT 7; UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6; INSERT INTO t1 ( a ) VALUES ( 7 ); DELETE FROM t1 WHERE a < 9 LIMIT 4; INSERT INTO t1 ( a ) VALUES ( 7 ); INSERT INTO t1 ( a ) VALUES ( 6 ); UPDATE t1 SET a = 8 WHERE a = 3 LIMIT 4; DELETE FROM t1 WHERE a = 2 LIMIT 9; DELETE FROM t1 WHERE a = 1 LIMIT 4; UPDATE t1 SET a = 4 WHERE a = 2 LIMIT 7; INSERT INTO t1 ( a ) VALUES ( 0 ); DELETE FROM t1 WHERE a < 3 LIMIT 0; UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2; INSERT INTO t1 ( a ) VALUES ( 1 ); UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3; --enable_warnings sync_slave_with_master; let $diff_table_1=master:test.t1; let $diff_table_2=slave:test.t1; source include/diff_tables.inc; connection master; drop table t1; sync_slave_with_master;
mysql-test/r/alter_table.result +12 −0 Original line number Diff line number Diff line Loading @@ -1222,4 +1222,16 @@ ALTER TABLE t1 CHANGE d c varchar(10); affected rows: 0 info: Records: 0 Duplicates: 0 Warnings: 0 DROP TABLE t1; CREATE TABLE t1(a INT AUTO_INCREMENT PRIMARY KEY, b ENUM('a', 'b', 'c') NOT NULL); INSERT INTO t1 (b) VALUES ('a'), ('c'), ('b'), ('b'), ('a'); ALTER TABLE t1 MODIFY b ENUM('a', 'z', 'b', 'c') NOT NULL; SELECT * FROM t1; a b 1 a 2 c 3 b 4 b 5 a DROP TABLE t1; End of 5.1 tests
mysql-test/r/binlog_format_basic.result +3 −0 Original line number Diff line number Diff line SELECT @@GLOBAL.binlog_format; @@GLOBAL.binlog_format STATEMENT '#---------------------BS_STVARS_002_01----------------------#' SELECT COUNT(@@GLOBAL.binlog_format); COUNT(@@GLOBAL.binlog_format) Loading
mysql-test/r/innodb_mysql.result +9 −0 Original line number Diff line number Diff line Loading @@ -1668,3 +1668,12 @@ explain select a from t2 where a=b; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 index NULL a 10 NULL # Using where; Using index drop table t1, t2; SET SESSION BINLOG_FORMAT=STATEMENT; SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; select @@session.sql_log_bin, @@session.binlog_format, @@session.tx_isolation; @@session.sql_log_bin 1 @@session.binlog_format STATEMENT @@session.tx_isolation READ-COMMITTED CREATE TABLE t1 ( a INT ) ENGINE=InnoDB; INSERT INTO t1 VALUES(1); DROP TABLE t1;
mysql-test/r/xa.result +20 −0 Original line number Diff line number Diff line Loading @@ -55,3 +55,23 @@ select * from t1; a 20 drop table t1; drop table if exists t1; create table t1(a int, b int, c varchar(20), primary key(a)) engine = innodb; insert into t1 values(1, 1, 'a'); insert into t1 values(2, 2, 'b'); xa start 'a','b'; update t1 set c = 'aa' where a = 1; xa start 'a','c'; update t1 set c = 'bb' where a = 2; update t1 set c = 'bb' where a = 2; update t1 set c = 'aa' where a = 1; ERROR 40001: Deadlock found when trying to get lock; try restarting transaction select count(*) from t1; count(*) 2 xa end 'a','c'; ERROR XA102: XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected xa rollback 'a','c'; xa start 'a','c'; drop table t1; End of 5.0 tests