mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 06:44:16 +01:00
Fixing some tests to make the replication team tree green.
This commit is contained in:
parent
7b833f9eef
commit
9b728dde4b
2 changed files with 32 additions and 22 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue