From: John Embretsen Date: November 17 2008 1:56pm Subject: [REVIEW] First batch of Falcon wrappers for replication tests List-Archive: http://lists.mysql.com/falcon/186 Message-Id: <49217824.3030505@Sun.COM> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary_(ID_OMK0TwQaEsGHgZnLqBzcrg)" --Boundary_(ID_OMK0TwQaEsGHgZnLqBzcrg) Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7BIT Hi, I have implemented a first batch of Falcon-specific wrappers around existing "engine-independent" replication tests in the rpl test suite (based on advice from the replication team). Patch is available for review here: http://lists.mysql.com/commits/58936 (Silence will be interpreted as "OK to push".) With the patch applied, the default test suite (which includes these tests) ran cleanly on my Linux test host. Global commit message is included below for those of you who are tired of clicking: --- commit-message start --- Falcon wrappers for 'engine-independent' replication tests (first batch). Adding 6 new Falcon-specific wrappers to the rpl test suite: rpl_extraCol_falcon rpl_extraColmaster_falcon rpl_locktrans_falcon rpl_relay_space_falcon rpl_row_blob_falcon rpl_truncate_falcon Falcon wrappers are based on existing test wrappers for InnoDB and MyISAM. Note that Falcon does not support statement-based replicaton. This is accounted for in these test wrappers. Test results verified by comparing to corresponding innodb and myisam results. --- commit-message end --- (Request for review also sent to internal mailing list for the replication development team) NOTE: Once this (if pushed) is merged into the mysql-6.0-rpl branch (or vice versa) some of the tests need to be updated due to changes in the rpl branch that have not been merged into 6.0 main: - Fix for Bug#38350 (Many tests don't clean up after themselves on exit.) - http://lists.mysql.com/commits/50006 (e: "extending SHOW SLAVE STATUS with a new line listing ignored servers") The attached patch (falcon-rpl-testresult-fix-for-merge.diff) should fix the merge issues identified above. -- John --Boundary_(ID_OMK0TwQaEsGHgZnLqBzcrg) Content-type: text/x-patch; name=falcon-rpl-testresult-fix-for-merge.diff Content-transfer-encoding: 7BIT Content-disposition: inline; filename=falcon-rpl-testresult-fix-for-merge.diff === modified file 'mysql-test/suite/rpl/r/rpl_extraCol_falcon.result' --- mysql-test/suite/rpl/r/rpl_extraCol_falcon.result 2008-11-17 13:24:41 +0000 +++ mysql-test/suite/rpl/r/rpl_extraCol_falcon.result 2008-11-17 13:26:50 +0000 @@ -92,6 +92,8 @@ Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size. +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; SELECT * FROM t2 ORDER BY a; @@ -159,6 +161,8 @@ Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t3 *** @@ -221,6 +225,8 @@ Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t4 *** @@ -283,6 +289,8 @@ Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t5 *** @@ -344,6 +352,8 @@ Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; *** Drop t6 *** DROP TABLE t6; @@ -453,6 +463,8 @@ Last_IO_Error # Last_SQL_Errno 1364 Last_SQL_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 331 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Create t10 on slave *** @@ -512,6 +524,8 @@ Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t10 *** @@ -573,6 +587,8 @@ Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t11 *** @@ -823,6 +839,8 @@ Last_IO_Error # Last_SQL_Errno 1060 Last_SQL_Error Error 'Duplicate column name 'c6'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; *** Try to insert in master **** @@ -963,6 +981,8 @@ Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; ** DROP table t17 *** === modified file 'mysql-test/suite/rpl/r/rpl_extraColmaster_falcon.result' --- mysql-test/suite/rpl/r/rpl_extraColmaster_falcon.result 2008-11-17 13:24:41 +0000 +++ mysql-test/suite/rpl/r/rpl_extraColmaster_falcon.result 2008-11-17 13:26:24 +0000 @@ -132,6 +132,8 @@ Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 ***** Testing Altering table def scenario ***** @@ -506,6 +508,8 @@ Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 **************************************** * columns in master at middle of table * @@ -580,6 +584,8 @@ Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -655,6 +661,8 @@ Last_IO_Error # Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15 +Replicate_Ignore_Server_Ids +Master_Server_Id 1 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -806,6 +814,8 @@ Last_IO_Error # Last_SQL_Errno 1091 Last_SQL_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; @@ -892,6 +902,8 @@ Last_IO_Error # Last_SQL_Errno 1054 Last_SQL_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; @@ -978,6 +990,8 @@ Last_IO_Error # Last_SQL_Errno 1072 Last_SQL_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)' +Replicate_Ignore_Server_Ids +Master_Server_Id 1 STOP SLAVE; RESET SLAVE; === modified file 'mysql-test/suite/rpl/r/rpl_locktrans_falcon.result' --- mysql-test/suite/rpl/r/rpl_locktrans_falcon.result 2008-11-17 13:24:41 +0000 +++ mysql-test/suite/rpl/r/rpl_locktrans_falcon.result 2008-11-17 13:26:01 +0000 @@ -437,3 +437,5 @@ Last_IO_Error Last_SQL_Errno 0 Last_SQL_Error +Replicate_Ignore_Server_Ids +Master_Server_Id 1 === modified file 'mysql-test/suite/rpl/r/rpl_truncate_falcon.result' --- mysql-test/suite/rpl/r/rpl_truncate_falcon.result 2008-11-17 13:24:41 +0000 +++ mysql-test/suite/rpl/r/rpl_truncate_falcon.result 2008-11-17 13:25:25 +0000 @@ -10,6 +10,8 @@ RESET SLAVE; START SLAVE; **** On Master **** +SET @old_session_binlog_format= @@session.binlog_format; +SET @old_global_binlog_format= @@global.binlog_format; SET SESSION BINLOG_FORMAT=ROW; SET GLOBAL BINLOG_FORMAT=ROW; CREATE TABLE t1 (a INT, b LONG) ENGINE=Falcon; @@ -47,12 +49,16 @@ master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; DROP TABLE t1 RESET MASTER; +SET @@session.binlog_format= @old_session_binlog_format; +SET @@global.binlog_format= @old_global_binlog_format; STOP SLAVE; DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1; RESET SLAVE; START SLAVE; **** On Master **** +SET @old_session_binlog_format= @@session.binlog_format; +SET @old_global_binlog_format= @@global.binlog_format; SET SESSION BINLOG_FORMAT=ROW; SET GLOBAL BINLOG_FORMAT=ROW; CREATE TABLE t1 (a INT, b LONG) ENGINE=Falcon; @@ -92,3 +98,5 @@ master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; DROP TABLE t1 RESET MASTER; +SET @@session.binlog_format= @old_session_binlog_format; +SET @@global.binlog_format= @old_global_binlog_format; --Boundary_(ID_OMK0TwQaEsGHgZnLqBzcrg)--