~mdcallag/+junk/5.1-map

« back to all changes in this revision

Viewing changes to mysql-test/t/rpl_row_create_table.test

  • Committer: msvensson at pilot
  • Date: 2007-04-24 09:11:45 UTC
  • mfrom: (2469.1.106)
  • Revision ID: sp1r-msvensson@pilot.blaudden-20070424091145-10463
Merge pilot.blaudden:/home/msvensson/mysql/my51-m-mysql_upgrade
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
# Set the default storage engine to different values on master and
22
22
# slave. We need to stop the slave for the server variable to take
23
23
# effect, since the variable is only read on start-up.
24
 
connection slave;
 
24
sync_slave_with_master;
25
25
--disable_query_log
26
26
set @storage_engine = @@global.storage_engine;
27
27
STOP SLAVE;
34
34
CREATE TABLE t2 (a INT, b INT) ENGINE=Merge;
35
35
CREATE TABLE t3 (a INT, b INT) CHARSET=utf8;
36
36
CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8;
37
 
--replace_column 1 # 4 # 5 #
 
37
--replace_column 1 # 4 #
38
38
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
39
 
--query_vertical SHOW BINLOG EVENTS FROM 212
 
39
--query_vertical SHOW BINLOG EVENTS FROM 216
40
40
--echo **** On Master ****
41
41
--query_vertical SHOW CREATE TABLE t1
42
42
--query_vertical SHOW CREATE TABLE t2
70
70
--error ER_DUP_ENTRY_WITH_KEY_NAME
71
71
CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
72
72
# Shouldn't be written to the binary log
 
73
--replace_column 1 # 4 #
73
74
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
74
 
SHOW BINLOG EVENTS FROM 1118;
 
75
SHOW BINLOG EVENTS FROM 1098;
75
76
 
76
77
# Test that INSERT-SELECT works the same way as for SBR.
77
78
CREATE TABLE t7 (a INT, b INT UNIQUE);
79
80
INSERT INTO t7 SELECT a,b FROM tt3;
80
81
SELECT * FROM t7 ORDER BY a,b;
81
82
# Should be written to the binary log
 
83
--replace_column 1 # 4 #
82
84
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
83
 
SHOW BINLOG EVENTS FROM 1118;
 
85
SHOW BINLOG EVENTS FROM 1098;
84
86
sync_slave_with_master;
85
87
SELECT * FROM t7 ORDER BY a,b;
86
88
 
90
92
BEGIN;
91
93
INSERT INTO t7 SELECT a,b FROM tt4;
92
94
ROLLBACK;
 
95
--replace_column 1 # 4 #
93
96
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
94
 
SHOW BINLOG EVENTS FROM 1314;
 
97
SHOW BINLOG EVENTS FROM 1294;
95
98
SELECT * FROM t7 ORDER BY a,b;
96
99
sync_slave_with_master;
97
100
SELECT * FROM t7 ORDER BY a,b;
105
108
--echo **** On Master ****
106
109
--query_vertical SHOW CREATE TABLE t8
107
110
--query_vertical SHOW CREATE TABLE t9
 
111
--replace_column 1 # 4 #
108
112
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
109
 
SHOW BINLOG EVENTS FROM 1410;
 
113
SHOW BINLOG EVENTS FROM 1390;
110
114
sync_slave_with_master;
111
115
--echo **** On Slave ****
112
116
--query_vertical SHOW CREATE TABLE t8
156
160
SELECT * FROM t2 ORDER BY a;
157
161
SELECT * FROM t3 ORDER BY a;
158
162
SELECT * FROM t4 ORDER BY a;
 
163
--replace_column 1 # 4 #
159
164
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
160
165
SHOW BINLOG EVENTS;
161
166
sync_slave_with_master;
201
206
COMMIT;
202
207
 
203
208
SELECT * FROM t2 ORDER BY a;
 
209
--replace_column 1 # 4 #
204
210
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
205
211
SHOW BINLOG EVENTS;
206
212
sync_slave_with_master;
219
225
ROLLBACK;
220
226
 
221
227
SELECT * FROM t2 ORDER BY a;
 
228
--replace_column 1 # 4 #
222
229
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
223
 
SHOW BINLOG EVENTS FROM 627;
 
230
SHOW BINLOG EVENTS FROM 631;
224
231
sync_slave_with_master;
225
232
SELECT * FROM t2 ORDER BY a;
226
233