1
include/master-slave.inc
3
DROP PROCEDURE IF EXISTS test.p1;
4
DROP TABLE IF EXISTS test.t1;
5
DROP TABLE IF EXISTS test.t2;
6
CREATE TABLE test.t1 (a INT, PRIMARY KEY(a));
7
INSERT INTO test.t1 VALUES (1),(2),(3),(4);
8
CREATE TABLE test.t2 (a INT, PRIMARY KEY(a));
9
CREATE PROCEDURE test.p1 (arg1 CHAR(1))
14
DECLARE cur1 CURSOR FOR SELECT A FROM test.t1 WHERE a % 2;
15
DECLARE continue handler for not found set b = 1;
23
INSERT INTO test.t2 VALUES (c);
31
DECLARE cur2 CURSOR FOR SELECT a FROM test.t1 WHERE NOT a % 2;
32
DECLARE continue handler for not found set b = 1;
40
INSERT INTO test.t2 VALUES (c);
48
SELECT * FROM test.t2 ORDER BY a;
52
SELECT * FROM test.t2 ORDER BY a;
58
select * from test.t2 ORDER BY a;
62
SELECT * FROM test.t2 ORDER BY a;
67
SELECT * FROM test.t2 ORDER BY a;
69
SELECT * FROM test.t2 ORDER BY a;
71
DROP PROCEDURE test.p1;