Commit 828801bb authored by unknown's avatar unknown

Fix for non-deterministic behavior of SELECTs and VIEWs


mysql-test/suite/rpl/include/rpl_mixed_check_select.inc:
  Added ORDER BY for SELECT
mysql-test/suite/rpl/include/rpl_mixed_check_view.inc:
  Added ORDER BY for VIEW
mysql-test/suite/rpl/include/rpl_mixed_dml.inc:
  Added ORDER BY for SELECT
mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result:
  Updated result file
parent 1590fa13
...@@ -7,15 +7,15 @@ ...@@ -7,15 +7,15 @@
--echo ==========MASTER========== --echo ==========MASTER==========
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
sync_slave_with_master; sync_slave_with_master;
--echo ==========SLAVE=========== --echo ==========SLAVE===========
USE test_rpl; USE test_rpl;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
connection master; connection master;
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
--echo ==========MASTER========== --echo ==========MASTER==========
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
SELECT * FROM v1; SELECT * FROM v1 ORDER BY a;
sync_slave_with_master; sync_slave_with_master;
--echo ==========SLAVE=========== --echo ==========SLAVE===========
USE test_rpl; USE test_rpl;
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
SELECT * FROM v1; SELECT * FROM v1 ORDER BY a;
connection master; connection master;
...@@ -54,7 +54,7 @@ DELETE FROM t2 WHERE a = 2; ...@@ -54,7 +54,7 @@ DELETE FROM t2 WHERE a = 2;
--exec cp ./suite/rpl/data/rpl_mixed.dat $MYSQLTEST_VARDIR/tmp/ --exec cp ./suite/rpl/data/rpl_mixed.dat $MYSQLTEST_VARDIR/tmp/
LOAD DATA INFILE '../tmp/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ; LOAD DATA INFILE '../tmp/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;
--exec rm $MYSQLTEST_VARDIR/tmp/rpl_mixed.dat --exec rm $MYSQLTEST_VARDIR/tmp/rpl_mixed.dat
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
--source suite/rpl/include/rpl_mixed_check_select.inc --source suite/rpl/include/rpl_mixed_check_select.inc
--source suite/rpl/include/rpl_mixed_clear_tables.inc --source suite/rpl/include/rpl_mixed_clear_tables.inc
...@@ -75,7 +75,7 @@ DELETE FROM t1 WHERE a = 2; ...@@ -75,7 +75,7 @@ DELETE FROM t1 WHERE a = 2;
--echo --echo
--echo ******************** SELECT ******************** --echo ******************** SELECT ********************
INSERT INTO t1 VALUES(1, 't1, text 1'); INSERT INTO t1 VALUES(1, 't1, text 1');
SELECT * FROM t1 WHERE b <> UUID(); SELECT * FROM t1 WHERE b <> UUID() ORDER BY a;
--source suite/rpl/include/rpl_mixed_clear_tables.inc --source suite/rpl/include/rpl_mixed_clear_tables.inc
# JOIN # JOIN
...@@ -85,8 +85,8 @@ INSERT INTO t1 VALUES(1, 'CCC'); ...@@ -85,8 +85,8 @@ INSERT INTO t1 VALUES(1, 'CCC');
INSERT INTO t1 VALUES(2, 'DDD'); INSERT INTO t1 VALUES(2, 'DDD');
INSERT INTO t2 VALUES(1, 'DDD'); INSERT INTO t2 VALUES(1, 'DDD');
INSERT INTO t2 VALUES(2, 'CCC'); INSERT INTO t2 VALUES(2, 'CCC');
SELECT * FROM t1 LEFT JOIN t2 ON t1.a = t2.a; SELECT * FROM t1 LEFT JOIN t2 ON t1.a = t2.a ORDER BY t1.a,t2.a;
SELECT * FROM t1 INNER JOIN t2 ON t1.b = t2.b; SELECT * FROM t1 INNER JOIN t2 ON t1.b = t2.b ORDER BY t1.a,t2.a;
--source suite/rpl/include/rpl_mixed_clear_tables.inc --source suite/rpl/include/rpl_mixed_clear_tables.inc
# UNION # UNION
......
...@@ -41,26 +41,26 @@ DELETE FROM t2 WHERE b <> UUID(); ...@@ -41,26 +41,26 @@ DELETE FROM t2 WHERE b <> UUID();
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
2 t1, text 2 2 t1, text 2
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
==========SLAVE=========== ==========SLAVE===========
USE test_rpl; USE test_rpl;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
2 t1, text 2 2 t1, text 2
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
DELETE FROM t1; DELETE FROM t1;
DELETE FROM t2; DELETE FROM t2;
...@@ -76,13 +76,13 @@ DELETE FROM t2 WHERE a = 2; ...@@ -76,13 +76,13 @@ DELETE FROM t2 WHERE a = 2;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 t1, text 1 1 t1, text 1
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
1 t2, text 1 1 t2, text 1
==========SLAVE=========== ==========SLAVE===========
...@@ -90,13 +90,13 @@ USE test_rpl; ...@@ -90,13 +90,13 @@ USE test_rpl;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 t1, text 1 1 t1, text 1
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
1 t2, text 1 1 t2, text 1
DELETE FROM t1; DELETE FROM t1;
...@@ -104,7 +104,7 @@ DELETE FROM t2; ...@@ -104,7 +104,7 @@ DELETE FROM t2;
******************** LOAD DATA INFILE ******************** ******************** LOAD DATA INFILE ********************
LOAD DATA INFILE '../tmp/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ; LOAD DATA INFILE '../tmp/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
10 line A 10 line A
20 line B 20 line B
...@@ -113,7 +113,7 @@ a b ...@@ -113,7 +113,7 @@ a b
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
3 3
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
10 line A 10 line A
20 line B 20 line B
...@@ -121,14 +121,14 @@ a b ...@@ -121,14 +121,14 @@ a b
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
==========SLAVE=========== ==========SLAVE===========
USE test_rpl; USE test_rpl;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
3 3
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
10 line A 10 line A
20 line B 20 line B
...@@ -136,7 +136,7 @@ a b ...@@ -136,7 +136,7 @@ a b
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
DELETE FROM t1; DELETE FROM t1;
DELETE FROM t2; DELETE FROM t2;
...@@ -153,35 +153,35 @@ DELETE FROM t1 WHERE a = 2; ...@@ -153,35 +153,35 @@ DELETE FROM t1 WHERE a = 2;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
2 2
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 t1, text 11 1 t1, text 11
3 t1, text 33 3 t1, text 33
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
==========SLAVE=========== ==========SLAVE===========
USE test_rpl; USE test_rpl;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
2 2
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 t1, text 11 1 t1, text 11
3 t1, text 33 3 t1, text 33
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
DELETE FROM t1; DELETE FROM t1;
DELETE FROM t2; DELETE FROM t2;
******************** SELECT ******************** ******************** SELECT ********************
INSERT INTO t1 VALUES(1, 't1, text 1'); INSERT INTO t1 VALUES(1, 't1, text 1');
SELECT * FROM t1 WHERE b <> UUID(); SELECT * FROM t1 WHERE b <> UUID() ORDER BY a;
a b a b
1 t1, text 1 1 t1, text 1
DELETE FROM t1; DELETE FROM t1;
...@@ -192,11 +192,11 @@ INSERT INTO t1 VALUES(1, 'CCC'); ...@@ -192,11 +192,11 @@ INSERT INTO t1 VALUES(1, 'CCC');
INSERT INTO t1 VALUES(2, 'DDD'); INSERT INTO t1 VALUES(2, 'DDD');
INSERT INTO t2 VALUES(1, 'DDD'); INSERT INTO t2 VALUES(1, 'DDD');
INSERT INTO t2 VALUES(2, 'CCC'); INSERT INTO t2 VALUES(2, 'CCC');
SELECT * FROM t1 LEFT JOIN t2 ON t1.a = t2.a; SELECT * FROM t1 LEFT JOIN t2 ON t1.a = t2.a ORDER BY t1.a,t2.a;
a b a b a b a b
1 CCC 1 DDD 1 CCC 1 DDD
2 DDD 2 CCC 2 DDD 2 CCC
SELECT * FROM t1 INNER JOIN t2 ON t1.b = t2.b; SELECT * FROM t1 INNER JOIN t2 ON t1.b = t2.b ORDER BY t1.a,t2.a;
a b a b a b a b
1 CCC 2 CCC 1 CCC 2 CCC
2 DDD 1 DDD 2 DDD 1 DDD
...@@ -219,50 +219,50 @@ INSERT INTO t1 VALUES(1, 't1, text 1'); ...@@ -219,50 +219,50 @@ INSERT INTO t1 VALUES(1, 't1, text 1');
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 t1, text 1 1 t1, text 1
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
==========SLAVE=========== ==========SLAVE===========
USE test_rpl; USE test_rpl;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 t1, text 1 1 t1, text 1
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
TRUNCATE t1; TRUNCATE t1;
==========MASTER========== ==========MASTER==========
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
==========SLAVE=========== ==========SLAVE===========
USE test_rpl; USE test_rpl;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
DELETE FROM t1; DELETE FROM t1;
DELETE FROM t2; DELETE FROM t2;
...@@ -275,13 +275,13 @@ UPDATE t1 SET b = 't1, text 1 updated' WHERE a = 1; ...@@ -275,13 +275,13 @@ UPDATE t1 SET b = 't1, text 1 updated' WHERE a = 1;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 t1, text 1 updated 1 t1, text 1 updated
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
1 t2, text 1 1 t2, text 1
==========SLAVE=========== ==========SLAVE===========
...@@ -289,13 +289,13 @@ USE test_rpl; ...@@ -289,13 +289,13 @@ USE test_rpl;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 t1, text 1 updated 1 t1, text 1 updated
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
1 t2, text 1 1 t2, text 1
UPDATE t1, t2 SET t1.b = 'test', t2.b = 'test'; UPDATE t1, t2 SET t1.b = 'test', t2.b = 'test';
...@@ -303,13 +303,13 @@ UPDATE t1, t2 SET t1.b = 'test', t2.b = 'test'; ...@@ -303,13 +303,13 @@ UPDATE t1, t2 SET t1.b = 'test', t2.b = 'test';
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 test 1 test
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
1 test 1 test
==========SLAVE=========== ==========SLAVE===========
...@@ -317,13 +317,13 @@ USE test_rpl; ...@@ -317,13 +317,13 @@ USE test_rpl;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 test 1 test
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
1 test 1 test
DELETE FROM t1; DELETE FROM t1;
...@@ -349,26 +349,26 @@ COMMIT; ...@@ -349,26 +349,26 @@ COMMIT;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 start 1 start
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
==========SLAVE=========== ==========SLAVE===========
USE test_rpl; USE test_rpl;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 start 1 start
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 VALUES (2, 'rollback'); INSERT INTO t1 VALUES (2, 'rollback');
...@@ -377,26 +377,26 @@ ROLLBACK; ...@@ -377,26 +377,26 @@ ROLLBACK;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 start 1 start
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
==========SLAVE=========== ==========SLAVE===========
USE test_rpl; USE test_rpl;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 start 1 start
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 VALUES (3, 'before savepoint s1'); INSERT INTO t1 VALUES (3, 'before savepoint s1');
...@@ -407,27 +407,27 @@ ROLLBACK TO SAVEPOINT s1; ...@@ -407,27 +407,27 @@ ROLLBACK TO SAVEPOINT s1;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
2 2
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 start 1 start
3 before savepoint s1 3 before savepoint s1
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
==========SLAVE=========== ==========SLAVE===========
USE test_rpl; USE test_rpl;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 start 1 start
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 VALUES (5, 'before savepoint s2'); INSERT INTO t1 VALUES (5, 'before savepoint s2');
...@@ -441,7 +441,7 @@ DELETE FROM t1 WHERE a = 7; ...@@ -441,7 +441,7 @@ DELETE FROM t1 WHERE a = 7;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
4 4
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 start 1 start
3 before savepoint s1 3 before savepoint s1
...@@ -450,14 +450,14 @@ a b ...@@ -450,14 +450,14 @@ a b
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
==========SLAVE=========== ==========SLAVE===========
USE test_rpl; USE test_rpl;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
4 4
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 start 1 start
3 before savepoint s1 3 before savepoint s1
...@@ -466,7 +466,7 @@ a b ...@@ -466,7 +466,7 @@ a b
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
DELETE FROM t1; DELETE FROM t1;
DELETE FROM t2; DELETE FROM t2;
...@@ -610,28 +610,28 @@ DELETE FROM t1 WHERE a = 202; ...@@ -610,28 +610,28 @@ DELETE FROM t1 WHERE a = 202;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
2 2
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
100 test 100 test
201 test 201 test
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
==========SLAVE=========== ==========SLAVE===========
USE test_rpl; USE test_rpl;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
2 2
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
100 test 100 test
201 test 201 test
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
ALTER PROCEDURE p1 COMMENT 'p1'; ALTER PROCEDURE p1 COMMENT 'p1';
DROP PROCEDURE p1; DROP PROCEDURE p1;
...@@ -649,13 +649,13 @@ INSERT INTO t1 VALUES (1, 'test'); ...@@ -649,13 +649,13 @@ INSERT INTO t1 VALUES (1, 'test');
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 test 1 test
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
1 test 1 test
==========SLAVE=========== ==========SLAVE===========
...@@ -663,13 +663,13 @@ USE test_rpl; ...@@ -663,13 +663,13 @@ USE test_rpl;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 test 1 test
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
1 test 1 test
DELETE FROM t1; DELETE FROM t1;
...@@ -694,51 +694,51 @@ test_rpl e1 @ SYSTEM RECURRING NULL 1 # # NULL SLAVESIDE_DISABLED 1 latin1 latin ...@@ -694,51 +694,51 @@ test_rpl e1 @ SYSTEM RECURRING NULL 1 # # NULL SLAVESIDE_DISABLED 1 latin1 latin
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 test1 1 test1
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
==========SLAVE=========== ==========SLAVE===========
USE test_rpl; USE test_rpl;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 test1 1 test1
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
==========MASTER========== ==========MASTER==========
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 test1 1 test1
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
==========SLAVE=========== ==========SLAVE===========
USE test_rpl; USE test_rpl;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 test1 1 test1
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
ALTER EVENT e1 RENAME TO e2; ALTER EVENT e1 RENAME TO e2;
==========MASTER========== ==========MASTER==========
...@@ -754,26 +754,26 @@ test_rpl e2 @ SYSTEM RECURRING NULL 1 # # NULL SLAVESIDE_DISABLED 1 latin1 latin ...@@ -754,26 +754,26 @@ test_rpl e2 @ SYSTEM RECURRING NULL 1 # # NULL SLAVESIDE_DISABLED 1 latin1 latin
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 test1 1 test1
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
==========SLAVE=========== ==========SLAVE===========
USE test_rpl; USE test_rpl;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
1 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 test1 1 test1
SELECT COUNT(*) FROM t2; SELECT COUNT(*) FROM t2;
COUNT(*) COUNT(*)
0 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
DROP EVENT e2; DROP EVENT e2;
==========MASTER========== ==========MASTER==========
...@@ -795,7 +795,7 @@ CREATE VIEW v2 AS SELECT * FROM t1 WHERE b <> UUID(); ...@@ -795,7 +795,7 @@ CREATE VIEW v2 AS SELECT * FROM t1 WHERE b <> UUID();
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where (`t1`.`a` = 1) latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where (`t1`.`a` = 1) latin1 latin1_swedish_ci
SELECT * FROM v1; SELECT * FROM v1 ORDER BY a;
a b a b
1 test1 1 test1
==========SLAVE=========== ==========SLAVE===========
...@@ -803,7 +803,7 @@ USE test_rpl; ...@@ -803,7 +803,7 @@ USE test_rpl;
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where (`t1`.`a` = 1) latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where (`t1`.`a` = 1) latin1 latin1_swedish_ci
SELECT * FROM v1; SELECT * FROM v1 ORDER BY a;
a b a b
1 test1 1 test1
ALTER VIEW v1 AS SELECT * FROM t1 WHERE a = 2; ALTER VIEW v1 AS SELECT * FROM t1 WHERE a = 2;
...@@ -811,7 +811,7 @@ ALTER VIEW v1 AS SELECT * FROM t1 WHERE a = 2; ...@@ -811,7 +811,7 @@ ALTER VIEW v1 AS SELECT * FROM t1 WHERE a = 2;
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where (`t1`.`a` = 2) latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where (`t1`.`a` = 2) latin1 latin1_swedish_ci
SELECT * FROM v1; SELECT * FROM v1 ORDER BY a;
a b a b
2 test2 2 test2
==========SLAVE=========== ==========SLAVE===========
...@@ -819,7 +819,7 @@ USE test_rpl; ...@@ -819,7 +819,7 @@ USE test_rpl;
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where (`t1`.`a` = 2) latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` where (`t1`.`a` = 2) latin1 latin1_swedish_ci
SELECT * FROM v1; SELECT * FROM v1 ORDER BY a;
a b a b
2 test2 2 test2
DROP VIEW v1; DROP VIEW v1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment