1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Bug #30244: row_count/found_rows does not replicate well

The functions ROW_COUNT/FOUND_ROWS are indeed not safe to be used in 
 statement based replication.
 Added code to declare them as such and switch the statement they're in
 to row based logging for mixed mode.
This commit is contained in:
gkodinov/kgeorge@magare.gmz
2007-08-29 14:54:32 +03:00
parent 4c2b95b62c
commit 56b6db1fd2
3 changed files with 59 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (a INT, b INT);
INSERT INTO t1 SELECT 1;
INSERT INTO t1 VALUES (2),(3),(4),(5),(6);
INSERT INTO t2 SELECT 1, ROW_COUNT();
INSERT INTO t1 VALUES (2),(3),(4);
INSERT INTO t2 SELECT 2, ROW_COUNT();
SELECT b FROM t2 ORDER BY a;
b
1
3
SELECT b FROM t2 ORDER BY a;
b
1
3
DROP TABLE t1, t2;