~linuxjedi/drizzle/trunk-bug-667053

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/t/rpl_row_sp010.test

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#############################################################################
 
2
# Original Author: JBM                                                      #
 
3
# Original Date: Aug/18/2005                                                #
 
4
# Update: 08/29/2005 remove sleep added master pos save and sync            #
 
5
#############################################################################
 
6
#TEST: Taken and modfied from http://bugs.mysql.com/bug.php?id=11126        #
 
7
#############################################################################
 
8
 
 
9
# Includes
 
10
-- source include/have_binlog_format_row.inc
 
11
-- source include/master-slave.inc
 
12
 
 
13
 
 
14
# Begin clean up test section
 
15
connection master;
 
16
--disable_warnings
 
17
DROP PROCEDURE IF EXISTS test.p1;
 
18
DROP PROCEDURE IF EXISTS test.p2;
 
19
DROP PROCEDURE IF EXISTS test.p3;
 
20
DROP PROCEDURE IF EXISTS test.p4;
 
21
DROP TABLE IF EXISTS test.t1;
 
22
DROP TABLE IF EXISTS test.t2;
 
23
 
 
24
 
 
25
# Begin test section 1 
 
26
delimiter |;
 
27
CREATE PROCEDURE test.p1()
 
28
BEGIN
 
29
  INSERT INTO test.t1 VALUES(2);
 
30
END|
 
31
CREATE PROCEDURE test.p2()
 
32
BEGIN
 
33
  DROP TEMPORARY TABLE IF EXISTS test.t1;
 
34
  CREATE TEMPORARY TABLE test.t1 (a int, PRIMARY KEY(a));
 
35
  INSERT INTO test.t1 VALUES(1);
 
36
  CALL test.p1();
 
37
END|
 
38
delimiter ;|
 
39
CALL test.p2();
 
40
SELECT * FROM test.t1 ORDER BY a;
 
41
 
 
42
save_master_pos;
 
43
connection slave;
 
44
sync_with_master;
 
45
show tables;
 
46
 
 
47
connection master;
 
48
delimiter |;
 
49
CREATE PROCEDURE test.p3()
 
50
BEGIN
 
51
  INSERT INTO test.t2 VALUES(7);
 
52
END|
 
53
CREATE PROCEDURE test.p4()
 
54
BEGIN
 
55
  DROP TABLE IF EXISTS test.t2;
 
56
  CREATE TABLE test.t2 (a int, PRIMARY KEY(a));
 
57
  INSERT INTO test.t2 VALUES(6);
 
58
  CALL test.p3();
 
59
END|
 
60
delimiter ;|
 
61
CALL test.p4();
 
62
SELECT * FROM test.t2 ORDER BY a;
 
63
 
 
64
save_master_pos;
 
65
connection slave;
 
66
sync_with_master;
 
67
SELECT * FROM test.t2 ORDER BY a;
 
68
 
 
69
# Cleanup
 
70
connection master;
 
71
#show binlog events;
 
72
DROP PROCEDURE IF EXISTS test.p1;
 
73
DROP PROCEDURE IF EXISTS test.p2;
 
74
DROP PROCEDURE IF EXISTS test.p3;
 
75
DROP PROCEDURE IF EXISTS test.p4;
 
76
DROP TABLE IF EXISTS test.t1;
 
77
DROP TABLE IF EXISTS test.t2;
 
78
sync_slave_with_master;
 
79
 
 
80
# End of 5.0 test case