1
#############################################################################
2
# Original Author: JBM #
3
# Original Date: Aug/13/2005 Created from Bug 12335 #
4
#############################################################################
7
-- source include/have_binlog_format_row.inc
8
-- source include/master-slave.inc
11
# Begin clean up test section
14
DROP PROCEDURE IF EXISTS test.p1;
15
DROP PROCEDURE IF EXISTS test.p2;
16
DROP TABLE IF EXISTS test.t1;
20
# Begin test section 1
22
eval CREATE TABLE test.t1(a INT,PRIMARY KEY(a))ENGINE=$engine_type;
25
CREATE PROCEDURE test.p1()
27
INSERT INTO test.t1 VALUES (4);
28
SELECT get_lock("test", 100);
29
UPDATE test.t1 set a=a+4 WHERE a=4;
31
CREATE PROCEDURE test.p2()
33
UPDATE test.t1 SET a=a+1;
37
SELECT get_lock("test", 200);
43
# To make sure tha the call on master1 arrived at the get_lock
46
SELECT release_lock("test");
47
SELECT * FROM test.t1;
49
# Added sleep for use with NDB to ensure that
50
# the injector thread will populate log before
51
# we switch to the slave.
53
sync_slave_with_master;
55
SELECT * FROM test.t1;
58
DROP TABLE IF EXISTS test.t1;
59
eval CREATE TABLE test.t1(a INT,PRIMARY KEY(a))ENGINE=$engine_type;
62
SELECT * FROM test.t1;
64
sync_slave_with_master;
66
SELECT * FROM test.t1;
68
#show binlog events from 719;
70
DROP PROCEDURE IF EXISTS test.p1;
71
DROP PROCEDURE IF EXISTS test.p2;
72
DROP TABLE IF EXISTS test.t1;
73
sync_slave_with_master;
75
# End of 5.0 test case