2675 He Zhenxing 2008-08-12
Apply tomas's patch to fix rpl_row_basic.test, this can fix BUG#37884,
BUG#38369, enable rpl_row_basic_7ndb test
modified:
mysql-test/extra/rpl_tests/rpl_row_basic.test
mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result
mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result
mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result
mysql-test/suite/rpl_ndb/t/disabled.def
2674 Sven Sandberg 2008-08-06 [merge]
merged 5.1 main -> 5.1-rpl-testfixes
all files automerged without conflict
modified:
mysql-test/extra/binlog_tests/binlog_insert_delayed.test
mysql-test/include/show_binlog_events.inc
mysql-test/suite/binlog/r/binlog_killed_simulate.result
mysql-test/suite/binlog/r/binlog_row_binlog.result
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result
mysql-test/suite/binlog/r/binlog_stm_binlog.result
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
mysql-test/suite/rpl/r/rpl_loaddata_map.result
mysql-test/suite/rpl/r/rpl_stm_log.result
mysql-test/suite/rpl/r/rpl_variables.result
mysql-test/suite/rpl/t/rpl_incident.test
mysql-test/suite/rpl/t/rpl_loaddata_map.test
mysql-test/suite/rpl/t/rpl_trunc_temp.test
mysql-test/suite/rpl/t/rpl_variables.test
=== modified file 'mysql-test/extra/rpl_tests/rpl_row_basic.test'
--- a/mysql-test/extra/rpl_tests/rpl_row_basic.test 2008-07-11 18:51:10 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_row_basic.test 2008-08-12 09:09:36 +0000
@@ -309,52 +309,54 @@ sync_slave_with_master;
# 7. Replicating UTF-8 CHAR(255) to CHAR(255) UTF-8
connection master;
-CREATE TABLE t1 (i INT NOT NULL,
- c CHAR(16) CHARACTER SET utf8 NOT NULL,
- j INT NOT NULL);
-
-CREATE TABLE t2 (i INT NOT NULL,
- c CHAR(16) CHARACTER SET utf8 NOT NULL,
- j INT NOT NULL);
+eval CREATE TABLE t1 (i INT NOT NULL,
+ c CHAR(16) CHARACTER SET utf8 NOT NULL,
+ j INT NOT NULL) ENGINE = $type ;
+
+eval CREATE TABLE t2 (i INT NOT NULL,
+ c CHAR(16) CHARACTER SET utf8 NOT NULL,
+ j INT NOT NULL) ENGINE = $type ;
sync_slave_with_master;
ALTER TABLE t2 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL;
connection master;
-CREATE TABLE t3 (i INT NOT NULL,
- c CHAR(128) CHARACTER SET utf8 NOT NULL,
- j INT NOT NULL);
+eval CREATE TABLE t3 (i INT NOT NULL,
+ c CHAR(128) CHARACTER SET utf8 NOT NULL,
+ j INT NOT NULL) ENGINE = $type ;
sync_slave_with_master;
ALTER TABLE t3 MODIFY c CHAR(16) CHARACTER SET utf8 NOT NULL;
connection master;
-CREATE TABLE t4 (i INT NOT NULL,
- c CHAR(128) CHARACTER SET utf8 NOT NULL,
- j INT NOT NULL);
-
-CREATE TABLE t5 (i INT NOT NULL,
- c CHAR(255) CHARACTER SET utf8 NOT NULL,
- j INT NOT NULL);
+eval CREATE TABLE t4 (i INT NOT NULL,
+ c CHAR(128) CHARACTER SET utf8 NOT NULL,
+ j INT NOT NULL) ENGINE = $type ;
+
+eval CREATE TABLE t5 (i INT NOT NULL,
+ c CHAR(255) CHARACTER SET utf8 NOT NULL,
+ j INT NOT NULL) ENGINE = $type ;
sync_slave_with_master;
ALTER TABLE t5 MODIFY c CHAR(16) CHARACTER SET utf8 NOT NULL;
connection master;
-CREATE TABLE t6 (i INT NOT NULL,
- c CHAR(255) CHARACTER SET utf8 NOT NULL,
- j INT NOT NULL);
+eval CREATE TABLE t6 (i INT NOT NULL,
+ c CHAR(255) CHARACTER SET utf8 NOT NULL,
+ j INT NOT NULL) ENGINE = $type ;
sync_slave_with_master;
ALTER TABLE t6 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL;
connection master;
-CREATE TABLE t7 (i INT NOT NULL,
- c CHAR(255) CHARACTER SET utf8 NOT NULL,
- j INT NOT NULL);
+eval CREATE TABLE t7 (i INT NOT NULL,
+ c CHAR(255) CHARACTER SET utf8 NOT NULL,
+ j INT NOT NULL) ENGINE = $type ;
--echo [expecting slave to replicate correctly]
connection master;
INSERT INTO t1 VALUES (1, "", 1);
INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2);
+sync_slave_with_master;
+
let $diff_table_1=master:test.t1;
let $diff_table_2=slave:test.t1;
source include/diff_tables.inc;
@@ -364,6 +366,8 @@ connection master;
INSERT INTO t2 VALUES (1, "", 1);
INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2);
+sync_slave_with_master;
+
let $diff_table_1=master:test.t2;
let $diff_table_2=slave:test.t2;
source include/diff_tables.inc;
@@ -379,7 +383,11 @@ let $last_error = query_get_value("SHOW
disable_query_log;
eval SELECT "$last_error" AS Last_SQL_Error;
enable_query_log;
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=8;
+connection master;
+RESET MASTER;
+connection slave;
+STOP SLAVE;
+RESET SLAVE;
START SLAVE;
source include/wait_for_slave_to_start.inc;
@@ -388,6 +396,8 @@ connection master;
INSERT INTO t4 VALUES (1, "", 1);
INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2);
+sync_slave_with_master;
+
let $diff_table_1=master:test.t4;
let $diff_table_2=slave:test.t4;
source include/diff_tables.inc;
@@ -403,7 +413,11 @@ let $last_error = query_get_value("SHOW
disable_query_log;
eval SELECT "$last_error" AS Last_SQL_Error;
enable_query_log;
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=8;
+connection master;
+RESET MASTER;
+connection slave;
+STOP SLAVE;
+RESET SLAVE;
START SLAVE;
source include/wait_for_slave_to_start.inc;
@@ -418,7 +432,11 @@ let $last_error = query_get_value("SHOW
disable_query_log;
eval SELECT "$last_error" AS Last_SQL_Error;
enable_query_log;
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=8;
+connection master;
+RESET MASTER;
+connection slave;
+STOP SLAVE;
+RESET SLAVE;
START SLAVE;
source include/wait_for_slave_to_start.inc;
@@ -427,6 +445,8 @@ connection master;
INSERT INTO t7 VALUES (1, "", 1);
INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2);
+sync_slave_with_master;
+
let $diff_table_1=master:test.t7;
let $diff_table_2=slave:test.t7;
source include/diff_tables.inc;
=== modified file 'mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result'
--- a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result 2008-07-11 18:51:10 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result 2008-08-12 09:09:36 +0000
@@ -453,29 +453,29 @@ a b c
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;
CREATE TABLE t1 (i INT NOT NULL,
c CHAR(16) CHARACTER SET utf8 NOT NULL,
-j INT NOT NULL);
+j INT NOT NULL) ENGINE = 'MYISAM' ;
CREATE TABLE t2 (i INT NOT NULL,
c CHAR(16) CHARACTER SET utf8 NOT NULL,
-j INT NOT NULL);
+j INT NOT NULL) ENGINE = 'MYISAM' ;
ALTER TABLE t2 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL;
CREATE TABLE t3 (i INT NOT NULL,
c CHAR(128) CHARACTER SET utf8 NOT NULL,
-j INT NOT NULL);
+j INT NOT NULL) ENGINE = 'MYISAM' ;
ALTER TABLE t3 MODIFY c CHAR(16) CHARACTER SET utf8 NOT NULL;
CREATE TABLE t4 (i INT NOT NULL,
c CHAR(128) CHARACTER SET utf8 NOT NULL,
-j INT NOT NULL);
+j INT NOT NULL) ENGINE = 'MYISAM' ;
CREATE TABLE t5 (i INT NOT NULL,
c CHAR(255) CHARACTER SET utf8 NOT NULL,
-j INT NOT NULL);
+j INT NOT NULL) ENGINE = 'MYISAM' ;
ALTER TABLE t5 MODIFY c CHAR(16) CHARACTER SET utf8 NOT NULL;
CREATE TABLE t6 (i INT NOT NULL,
c CHAR(255) CHARACTER SET utf8 NOT NULL,
-j INT NOT NULL);
+j INT NOT NULL) ENGINE = 'MYISAM' ;
ALTER TABLE t6 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL;
CREATE TABLE t7 (i INT NOT NULL,
c CHAR(255) CHARACTER SET utf8 NOT NULL,
-j INT NOT NULL);
+j INT NOT NULL) ENGINE = 'MYISAM' ;
[expecting slave to replicate correctly]
INSERT INTO t1 VALUES (1, "", 1);
INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2);
@@ -489,7 +489,9 @@ INSERT INTO t3 VALUES (1, "", 1);
INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2);
Last_SQL_Error
Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=8;
+RESET MASTER;
+STOP SLAVE;
+RESET SLAVE;
START SLAVE;
[expecting slave to replicate correctly]
INSERT INTO t4 VALUES (1, "", 1);
@@ -500,14 +502,18 @@ INSERT INTO t5 VALUES (1, "", 1);
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
Last_SQL_Error
Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size.
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=8;
+RESET MASTER;
+STOP SLAVE;
+RESET SLAVE;
START SLAVE;
[expecting slave to stop]
INSERT INTO t6 VALUES (1, "", 1);
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
Last_SQL_Error
Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size.
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=8;
+RESET MASTER;
+STOP SLAVE;
+RESET SLAVE;
START SLAVE;
[expecting slave to replicate correctly]
INSERT INTO t7 VALUES (1, "", 1);
=== modified file 'mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result'
--- a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result 2008-07-11 18:51:10 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result 2008-08-12 09:09:36 +0000
@@ -453,29 +453,29 @@ a b c
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;
CREATE TABLE t1 (i INT NOT NULL,
c CHAR(16) CHARACTER SET utf8 NOT NULL,
-j INT NOT NULL);
+j INT NOT NULL) ENGINE = 'INNODB' ;
CREATE TABLE t2 (i INT NOT NULL,
c CHAR(16) CHARACTER SET utf8 NOT NULL,
-j INT NOT NULL);
+j INT NOT NULL) ENGINE = 'INNODB' ;
ALTER TABLE t2 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL;
CREATE TABLE t3 (i INT NOT NULL,
c CHAR(128) CHARACTER SET utf8 NOT NULL,
-j INT NOT NULL);
+j INT NOT NULL) ENGINE = 'INNODB' ;
ALTER TABLE t3 MODIFY c CHAR(16) CHARACTER SET utf8 NOT NULL;
CREATE TABLE t4 (i INT NOT NULL,
c CHAR(128) CHARACTER SET utf8 NOT NULL,
-j INT NOT NULL);
+j INT NOT NULL) ENGINE = 'INNODB' ;
CREATE TABLE t5 (i INT NOT NULL,
c CHAR(255) CHARACTER SET utf8 NOT NULL,
-j INT NOT NULL);
+j INT NOT NULL) ENGINE = 'INNODB' ;
ALTER TABLE t5 MODIFY c CHAR(16) CHARACTER SET utf8 NOT NULL;
CREATE TABLE t6 (i INT NOT NULL,
c CHAR(255) CHARACTER SET utf8 NOT NULL,
-j INT NOT NULL);
+j INT NOT NULL) ENGINE = 'INNODB' ;
ALTER TABLE t6 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL;
CREATE TABLE t7 (i INT NOT NULL,
c CHAR(255) CHARACTER SET utf8 NOT NULL,
-j INT NOT NULL);
+j INT NOT NULL) ENGINE = 'INNODB' ;
[expecting slave to replicate correctly]
INSERT INTO t1 VALUES (1, "", 1);
INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2);
@@ -489,7 +489,9 @@ INSERT INTO t3 VALUES (1, "", 1);
INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2);
Last_SQL_Error
Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=8;
+RESET MASTER;
+STOP SLAVE;
+RESET SLAVE;
START SLAVE;
[expecting slave to replicate correctly]
INSERT INTO t4 VALUES (1, "", 1);
@@ -500,14 +502,18 @@ INSERT INTO t5 VALUES (1, "", 1);
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
Last_SQL_Error
Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size.
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=8;
+RESET MASTER;
+STOP SLAVE;
+RESET SLAVE;
START SLAVE;
[expecting slave to stop]
INSERT INTO t6 VALUES (1, "", 1);
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
Last_SQL_Error
Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size.
-SET GLOBAL SQL_SLAVE_SKIP_COUNTER=8;
+RESET MASTER;
+STOP SLAVE;
+RESET SLAVE;
START SLAVE;
[expecting slave to replicate correctly]
INSERT INTO t7 VALUES (1, "", 1);
=== modified file 'mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result'
--- a/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result 2008-06-19 13:02:04 +0000
+++ b/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result 2008-08-12 09:09:36 +0000
@@ -437,7 +437,7 @@ SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
COUNT(*) 0
set @@global.slave_exec_mode= default;
Last_SQL_Error
-0
+
SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
COUNT(*) 0
**** Test for BUG#37076 ****
@@ -451,3 +451,72 @@ SELECT * FROM t1;
a b c
2005-11-14 01:01:01 2005-11-14 01:01:02 2005-11-14
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;
+CREATE TABLE t1 (i INT NOT NULL,
+c CHAR(16) CHARACTER SET utf8 NOT NULL,
+j INT NOT NULL) ENGINE = 'NDB' ;
+CREATE TABLE t2 (i INT NOT NULL,
+c CHAR(16) CHARACTER SET utf8 NOT NULL,
+j INT NOT NULL) ENGINE = 'NDB' ;
+ALTER TABLE t2 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL;
+CREATE TABLE t3 (i INT NOT NULL,
+c CHAR(128) CHARACTER SET utf8 NOT NULL,
+j INT NOT NULL) ENGINE = 'NDB' ;
+ALTER TABLE t3 MODIFY c CHAR(16) CHARACTER SET utf8 NOT NULL;
+CREATE TABLE t4 (i INT NOT NULL,
+c CHAR(128) CHARACTER SET utf8 NOT NULL,
+j INT NOT NULL) ENGINE = 'NDB' ;
+CREATE TABLE t5 (i INT NOT NULL,
+c CHAR(255) CHARACTER SET utf8 NOT NULL,
+j INT NOT NULL) ENGINE = 'NDB' ;
+ALTER TABLE t5 MODIFY c CHAR(16) CHARACTER SET utf8 NOT NULL;
+CREATE TABLE t6 (i INT NOT NULL,
+c CHAR(255) CHARACTER SET utf8 NOT NULL,
+j INT NOT NULL) ENGINE = 'NDB' ;
+ALTER TABLE t6 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL;
+CREATE TABLE t7 (i INT NOT NULL,
+c CHAR(255) CHARACTER SET utf8 NOT NULL,
+j INT NOT NULL) ENGINE = 'NDB' ;
+[expecting slave to replicate correctly]
+INSERT INTO t1 VALUES (1, "", 1);
+INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2);
+Comparing tables master:test.t1 and slave:test.t1
+[expecting slave to replicate correctly]
+INSERT INTO t2 VALUES (1, "", 1);
+INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2);
+Comparing tables master:test.t2 and slave:test.t2
+[expecting slave to stop]
+INSERT INTO t3 VALUES (1, "", 1);
+INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2);
+Last_SQL_Error
+Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.
+RESET MASTER;
+STOP SLAVE;
+RESET SLAVE;
+START SLAVE;
+[expecting slave to replicate correctly]
+INSERT INTO t4 VALUES (1, "", 1);
+INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2);
+Comparing tables master:test.t4 and slave:test.t4
+[expecting slave to stop]
+INSERT INTO t5 VALUES (1, "", 1);
+INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
+Last_SQL_Error
+Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size.
+RESET MASTER;
+STOP SLAVE;
+RESET SLAVE;
+START SLAVE;
+[expecting slave to stop]
+INSERT INTO t6 VALUES (1, "", 1);
+INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
+Last_SQL_Error
+Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size.
+RESET MASTER;
+STOP SLAVE;
+RESET SLAVE;
+START SLAVE;
+[expecting slave to replicate correctly]
+INSERT INTO t7 VALUES (1, "", 1);
+INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2);
+Comparing tables master:test.t7 and slave:test.t7
+drop table t1, t2, t3, t4, t5, t6, t7;
=== modified file 'mysql-test/suite/rpl_ndb/t/disabled.def'
--- a/mysql-test/suite/rpl_ndb/t/disabled.def 2008-07-25 10:32:05 +0000
+++ b/mysql-test/suite/rpl_ndb/t/disabled.def 2008-08-12 09:09:36 +0000
@@ -12,6 +12,5 @@
rpl_ndb_circular : Bug#33849 COMMIT event missing in cluster circular replication.
rpl_ndb_circular_simplex : Bug#33849 COMMIT event missing in cluster circular replication.
-rpl_row_basic_7ndb : Bug#38369 rpl_ndb.rpl_row_basic_7ndb fails
# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open
Thread |
---|
• bzr push into mysql-5.1 branch (hezx:2674 to 2675) Bug#37884 Bug#38369 | He Zhenxing | 14 Aug |