1
#############################################################################
2
# Original Author: JBM #
3
# Original Date: Aug/13/2005 Created from Bug 12335 #
4
#############################################################################
6
# Begin clean up test section
9
DROP PROCEDURE IF EXISTS test.p1;
10
DROP PROCEDURE IF EXISTS test.p2;
11
DROP TABLE IF EXISTS test.t1;
15
# Begin test section 1
17
eval CREATE TABLE test.t1(a INT,PRIMARY KEY(a))ENGINE=$engine_type;
20
CREATE PROCEDURE test.p1()
22
INSERT INTO test.t1 VALUES (4);
23
SELECT get_lock("test", 100);
24
UPDATE test.t1 set a=a+4 WHERE a=4;
26
CREATE PROCEDURE test.p2()
28
UPDATE test.t1 SET a=a+1;
32
SELECT get_lock("test", 200);
38
# To make sure tha the call on master1 arrived at the get_lock
41
SELECT release_lock("test");
42
SELECT * FROM test.t1;
44
# Added sleep for use with NDB to ensure that
45
# the injector thread will populate log before
46
# we switch to the slave.
48
sync_slave_with_master;
50
SELECT * FROM test.t1;
53
DROP TABLE IF EXISTS test.t1;
54
eval CREATE TABLE test.t1(a INT,PRIMARY KEY(a))ENGINE=$engine_type;
57
SELECT * FROM test.t1;
59
sync_slave_with_master;
61
SELECT * FROM test.t1;
63
#show binlog events from 720;
65
DROP PROCEDURE IF EXISTS test.p1;
66
DROP PROCEDURE IF EXISTS test.p2;
67
DROP TABLE IF EXISTS test.t1;
68
sync_slave_with_master;
70
# End of 5.0 test case