From 9b728dde4ba1e237a41d29b6c6e87f150f6438dd Mon Sep 17 00:00:00 2001 From: "mats@kindahl-laptop.dnsalias.net" <> Date: Fri, 9 Nov 2007 09:13:47 +0100 Subject: [PATCH] Fixing some tests to make the replication team tree green. --- mysql-test/suite/rpl/r/rpl_found_rows.result | 29 ++++++++++++-------- mysql-test/suite/rpl/t/rpl_found_rows.test | 25 ++++++++++------- 2 files changed, 32 insertions(+), 22 deletions(-) diff --git a/mysql-test/suite/rpl/r/rpl_found_rows.result b/mysql-test/suite/rpl/r/rpl_found_rows.result index cec5071eecd..7e757a1d141 100644 --- a/mysql-test/suite/rpl/r/rpl_found_rows.result +++ b/mysql-test/suite/rpl/r/rpl_found_rows.result @@ -28,12 +28,12 @@ a 1 SELECT FOUND_ROWS() INTO @a; INSERT INTO logtbl VALUES(1,2,@a); -SELECT * FROM logtbl WHERE sect = 1; +SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test; sect test count 1 1 183 1 2 3 **** On Slave **** -SELECT * FROM logtbl WHERE sect = 1; +SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test; sect test count 1 1 183 1 2 3 @@ -61,13 +61,13 @@ a 7 SELECT FOUND_ROWS() INTO @found_rows; CALL just_log(2,3,@found_rows); -SELECT * FROM logtbl WHERE sect = 2; +SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test; sect test count 2 1 3 2 2 183 2 3 183 **** On Slave **** -SELECT * FROM logtbl WHERE sect = 2; +SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test; sect test count 2 1 3 2 2 183 @@ -87,12 +87,12 @@ SELECT FOUND_ROWS() INTO @found_rows; SELECT log_rows(3,1,@found_rows), log_rows(3,2,@found_rows); log_rows(3,1,@found_rows) log_rows(3,2,@found_rows) 183 183 -SELECT * FROM logtbl WHERE sect = 3; +SELECT * FROM logtbl WHERE sect = 3 ORDER BY sect,test; sect test count 3 1 183 3 2 183 **** On Slave **** -SELECT * FROM logtbl WHERE sect = 3; +SELECT * FROM logtbl WHERE sect = 3 ORDER BY sect,test; sect test count 3 1 183 3 2 183 @@ -115,6 +115,7 @@ CREATE PROCEDURE just_log(sect INT, test INT) BEGIN INSERT INTO logtbl VALUES (sect,test,FOUND_ROWS()); END $$ **** On Master 1 **** +SET BINLOG_FORMAT=MIXED; SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1; a 7 @@ -134,14 +135,14 @@ SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1; a 7 CALL just_log(1,4); -SELECT * FROM logtbl WHERE sect = 1; +SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test; sect test count 1 1 183 1 2 183 1 3 3 1 4 183 **** On Slave **** -SELECT * FROM logtbl WHERE sect = 1; +SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test; sect test count 1 1 183 1 2 183 @@ -201,28 +202,32 @@ SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1; a 7 INSERT INTO t2 VALUES (2,5), (2,6); -SELECT * FROM logtbl WHERE sect = 2; +SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test; sect test count 2 1 3 2 2 3 2 3 3 2 4 3 2 5 183 -2 6 183 2 5 183 +2 6 183 2 6 0 2 6 183 2 7 0 -SELECT * FROM logtbl WHERE sect = 2; +SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test; sect test count 2 1 3 2 2 3 2 3 3 2 4 3 2 5 183 -2 6 183 2 5 183 +2 6 183 2 6 0 2 6 183 2 7 0 DROP TABLE t1, logtbl; +DROP PROCEDURE just_log; +DROP PROCEDURE log_me; +DROP PROCEDURE log_me_inner; +DROP FUNCTION log_rows; diff --git a/mysql-test/suite/rpl/t/rpl_found_rows.test b/mysql-test/suite/rpl/t/rpl_found_rows.test index 5d67b2ba6b7..f868061c951 100644 --- a/mysql-test/suite/rpl/t/rpl_found_rows.test +++ b/mysql-test/suite/rpl/t/rpl_found_rows.test @@ -44,10 +44,10 @@ SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a < 5 ORDER BY a LIMIT 1; SELECT FOUND_ROWS() INTO @a; INSERT INTO logtbl VALUES(1,2,@a); -SELECT * FROM logtbl WHERE sect = 1; +SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test; --echo **** On Slave **** sync_slave_with_master; -SELECT * FROM logtbl WHERE sect = 1; +SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test; --echo ==== 1.2. Stored procedure ==== @@ -81,10 +81,10 @@ SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1; SELECT FOUND_ROWS() INTO @found_rows; CALL just_log(2,3,@found_rows); -SELECT * FROM logtbl WHERE sect = 2; +SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test; --echo **** On Slave **** sync_slave_with_master; -SELECT * FROM logtbl WHERE sect = 2; +SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test; --echo ==== 1.3. Stored functions ==== --echo **** On Master **** @@ -102,10 +102,10 @@ SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1; SELECT FOUND_ROWS() INTO @found_rows; SELECT log_rows(3,1,@found_rows), log_rows(3,2,@found_rows); -SELECT * FROM logtbl WHERE sect = 3; +SELECT * FROM logtbl WHERE sect = 3 ORDER BY sect,test; --echo **** On Slave **** sync_slave_with_master; -SELECT * FROM logtbl WHERE sect = 3; +SELECT * FROM logtbl WHERE sect = 3 ORDER BY sect,test; --echo ==== 1.9. Cleanup ==== --echo **** On Master **** @@ -139,6 +139,7 @@ sync_slave_with_master; --echo **** On Master 1 **** connection master1; +SET BINLOG_FORMAT=MIXED; SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1; CALL just_log(1,1); @@ -161,10 +162,10 @@ CALL just_log(1,4); sync_slave_with_master; connection master; -SELECT * FROM logtbl WHERE sect = 1; +SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test; --echo **** On Slave **** sync_slave_with_master; -SELECT * FROM logtbl WHERE sect = 1; +SELECT * FROM logtbl WHERE sect = 1 ORDER BY sect,test; --echo ==== 2.1. Checking a stored function ==== --echo **** On Master **** @@ -241,11 +242,15 @@ END $$ SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a > 5 ORDER BY a LIMIT 1; INSERT INTO t2 VALUES (2,5), (2,6); -SELECT * FROM logtbl WHERE sect = 2; +SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test; sync_slave_with_master; -SELECT * FROM logtbl WHERE sect = 2; +SELECT * FROM logtbl WHERE sect = 2 ORDER BY sect,test; connection master; DROP TABLE t1, logtbl; +DROP PROCEDURE just_log; +DROP PROCEDURE log_me; +DROP PROCEDURE log_me_inner; +DROP FUNCTION log_rows; sync_slave_with_master;