~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
stop slave;
 
2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 
3
reset master;
 
4
reset slave;
 
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 
6
start slave;
 
7
DROP DATABASE IF EXISTS db1;
 
8
CREATE DATABASE db1;
 
9
use db1;
 
10
CREATE TABLE db1.t1 (a INT) ENGINE=InnoDB;
 
11
CREATE TABLE db1.t2 (s CHAR(255)) ENGINE=MyISAM;
 
12
include/stop_slave.inc
 
13
[on master]
 
14
CREATE PROCEDURE db1.p1 ()
 
15
BEGIN
 
16
INSERT INTO t1 VALUES (1);
 
17
INSERT INTO t1 VALUES (2);
 
18
INSERT INTO t1 VALUES (3);
 
19
INSERT INTO t1 VALUES (4);
 
20
INSERT INTO t1 VALUES (5);
 
21
END//
 
22
CREATE PROCEDURE db1.p2 ()
 
23
BEGIN
 
24
INSERT INTO t1 VALUES (6);
 
25
INSERT INTO t1 VALUES (7);
 
26
INSERT INTO t1 VALUES (8);
 
27
INSERT INTO t1 VALUES (9);
 
28
INSERT INTO t1 VALUES (10);
 
29
INSERT INTO t2 VALUES ('executed db1.p2()');
 
30
END//
 
31
INSERT INTO db1.t2 VALUES ('before call db1.p1()');
 
32
use test;
 
33
BEGIN;
 
34
CALL db1.p1();
 
35
COMMIT;
 
36
INSERT INTO db1.t2 VALUES ('after call db1.p1()');
 
37
SELECT * FROM db1.t1;
 
38
a
 
39
1
 
40
2
 
41
3
 
42
4
 
43
5
 
44
SELECT * FROM db1.t2;
 
45
s
 
46
before call db1.p1()
 
47
after call db1.p1()
 
48
[on slave]
 
49
start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_POS;
 
50
#
 
51
# If we got non-zero here, then we're suffering BUG#43263
 
52
#
 
53
SELECT 0 as 'Must be 0';
 
54
Must be 0
 
55
0
 
56
SELECT * from db1.t1;
 
57
a
 
58
1
 
59
2
 
60
3
 
61
4
 
62
5
 
63
SELECT * from db1.t2;
 
64
s
 
65
before call db1.p1()
 
66
[on master]
 
67
INSERT INTO db1.t2 VALUES ('before call db1.p2()');
 
68
BEGIN;
 
69
CALL db1.p2();
 
70
ROLLBACK;
 
71
INSERT INTO db1.t2 VALUES ('after call db1.p2()');
 
72
SELECT * FROM db1.t1;
 
73
a
 
74
1
 
75
2
 
76
3
 
77
4
 
78
5
 
79
SELECT * FROM db1.t2;
 
80
s
 
81
before call db1.p1()
 
82
after call db1.p1()
 
83
before call db1.p2()
 
84
executed db1.p2()
 
85
after call db1.p2()
 
86
[on slave]
 
87
start slave until master_log_file='master-bin.000001', master_log_pos=MASTER_POS;
 
88
#
 
89
# If we got non-zero here, then we're suffering BUG#43263
 
90
#
 
91
SELECT 0 as 'Must be 0';
 
92
Must be 0
 
93
0
 
94
SELECT * from db1.t1;
 
95
a
 
96
1
 
97
2
 
98
3
 
99
4
 
100
5
 
101
SELECT * from db1.t2;
 
102
s
 
103
before call db1.p1()
 
104
executed db1.p2()
 
105
#
 
106
# Clean up
 
107
#
 
108
DROP DATABASE db1;
 
109
DROP DATABASE db1;