2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
7
DROP PROCEDURE IF EXISTS test.p1;
8
DROP TABLE IF EXISTS test.t2;
9
CREATE TABLE test.t1 (a INT,PRIMARY KEY(a));
10
CREATE TABLE test.t2 (a INT,PRIMARY KEY(a));
11
INSERT INTO test.t1 VALUES(1),(2);
12
CREATE PROCEDURE test.p1()
14
SELECT SQL_CALC_FOUND_ROWS * FROM test.t1 LIMIT 1;
15
INSERT INTO test.t2 VALUES(FOUND_ROWS());
18
< ---- Master selects-- >
19
-------------------------
23
SELECT * FROM test.t2;
27
< ---- Slave selects-- >
28
------------------------
29
SELECT * FROM test.t2;
32
DROP PROCEDURE IF EXISTS test.p1;
33
DROP TABLE IF EXISTS test.t1;
34
DROP TABLE IF EXISTS test.t2;