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

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.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
STOP SLAVE;
 
8
SET @my_sql_mode= @@global.sql_mode;
 
9
SET GLOBAL SQL_MODE='STRICT_ALL_TABLES';
 
10
START SLAVE;
 
11
CREATE TABLE t1_int (a INT PRIMARY KEY, b INT) ENGINE='MyISAM';
 
12
CREATE TABLE t1_bit (a INT PRIMARY KEY, b INT) ENGINE='MyISAM';
 
13
CREATE TABLE t1_char (a INT PRIMARY KEY, b INT) ENGINE='MyISAM';
 
14
CREATE TABLE t1_nodef (a INT PRIMARY KEY, b INT) ENGINE='MyISAM';
 
15
CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE='MyISAM';
 
16
CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE='MyISAM';
 
17
CREATE TABLE t4 (a INT) ENGINE='MyISAM';
 
18
CREATE TABLE t5 (a INT, b INT, c INT) ENGINE='MyISAM';
 
19
CREATE TABLE t6 (a INT, b INT, c INT) ENGINE='MyISAM';
 
20
CREATE TABLE t7 (a INT NOT NULL) ENGINE='MyISAM';
 
21
CREATE TABLE t8 (a INT NOT NULL) ENGINE='MyISAM';
 
22
CREATE TABLE t9 (a INT) ENGINE='MyISAM';
 
23
ALTER TABLE t1_int ADD x INT DEFAULT 42;
 
24
ALTER TABLE t1_bit
 
25
ADD x BIT(3) DEFAULT b'011',
 
26
ADD y BIT(5) DEFAULT b'10101',
 
27
ADD z BIT(2) DEFAULT b'10';
 
28
ALTER TABLE t1_char ADD x CHAR(20) DEFAULT 'Just a test';
 
29
ALTER TABLE t1_nodef ADD x INT NOT NULL, ADD y INT NOT NULL, ADD z INT NOT NULL;
 
30
ALTER TABLE t2 DROP b;
 
31
ALTER TABLE t4 MODIFY a FLOAT;
 
32
ALTER TABLE t5 MODIFY b FLOAT;
 
33
ALTER TABLE t6 MODIFY c FLOAT;
 
34
ALTER TABLE t7 ADD e1 INT, ADD e2 INT, ADD e3 INT, ADD e4 INT,
 
35
ADD e5 INT, ADD e6 INT, ADD e7 INT, ADD e8 INT;
 
36
ALTER TABLE t8 ADD e1 INT NOT NULL DEFAULT 0, ADD e2 INT NOT NULL DEFAULT 0,
 
37
ADD e3 INT NOT NULL DEFAULT 0, ADD e4 INT NOT NULL DEFAULT 0,
 
38
ADD e5 INT NOT NULL DEFAULT 0, ADD e6 INT NOT NULL DEFAULT 0,
 
39
ADD e7 INT NOT NULL DEFAULT 0, ADD e8 INT NOT NULL DEFAULT 0;
 
40
set @@global.slave_exec_mode= 'IDEMPOTENT';
 
41
INSERT INTO t1_int  VALUES (2, 4, 4711);
 
42
INSERT INTO t1_char VALUES (2, 4, 'Foo is a bar');
 
43
INSERT INTO t1_bit  VALUES (2, 4, b'101', b'11100', b'01');
 
44
**** On Master ****
 
45
INSERT INTO t1_int VALUES (1,2);
 
46
INSERT INTO t1_int VALUES (2,5);
 
47
INSERT INTO t1_bit VALUES (1,2);
 
48
INSERT INTO t1_bit VALUES (2,5);
 
49
INSERT INTO t1_char VALUES (1,2);
 
50
INSERT INTO t1_char VALUES (2,5);
 
51
SELECT * FROM t1_int ORDER BY a;
 
52
a       b
 
53
1       2
 
54
2       5
 
55
SELECT * FROM t1_bit ORDER BY a;
 
56
a       b
 
57
1       2
 
58
2       5
 
59
SELECT * FROM t1_char ORDER BY a;
 
60
a       b
 
61
1       2
 
62
2       5
 
63
**** On Slave ****
 
64
set @@global.slave_exec_mode= default;
 
65
SELECT a,b,x FROM t1_int ORDER BY a;
 
66
a       b       x
 
67
1       2       42
 
68
2       5       4711
 
69
SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a;
 
70
a       b       HEX(x)  HEX(y)  HEX(z)
 
71
1       2       3       15      2
 
72
2       5       5       1C      1
 
73
SELECT a,b,x FROM t1_char ORDER BY a;
 
74
a       b       x
 
75
1       2       Just a test
 
76
2       5       Foo is a bar
 
77
**** On Master ****
 
78
UPDATE t1_int  SET b=2*b WHERE a=2;
 
79
UPDATE t1_char SET b=2*b WHERE a=2;
 
80
UPDATE t1_bit  SET b=2*b WHERE a=2;
 
81
SELECT * FROM t1_int ORDER BY a;
 
82
a       b
 
83
1       2
 
84
2       10
 
85
SELECT * FROM t1_bit ORDER BY a;
 
86
a       b
 
87
1       2
 
88
2       10
 
89
SELECT * FROM t1_char ORDER BY a;
 
90
a       b
 
91
1       2
 
92
2       10
 
93
**** On Slave ****
 
94
SELECT a,b,x FROM t1_int ORDER BY a;
 
95
a       b       x
 
96
1       2       42
 
97
2       10      4711
 
98
SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a;
 
99
a       b       HEX(x)  HEX(y)  HEX(z)
 
100
1       2       3       15      2
 
101
2       10      5       1C      1
 
102
SELECT a,b,x FROM t1_char ORDER BY a;
 
103
a       b       x
 
104
1       2       Just a test
 
105
2       10      Foo is a bar
 
106
INSERT INTO t9 VALUES (2);
 
107
INSERT INTO t1_nodef VALUES (1,2);
 
108
select count(*) from t1_nodef;
 
109
count(*)
 
110
1
 
111
INSERT INTO t9 VALUES (2);
 
112
**** On Master ****
 
113
INSERT INTO t2 VALUES (2,4);
 
114
SELECT * FROM t2;
 
115
a       b
 
116
2       4
 
117
**** On Slave ****
 
118
SELECT * FROM t2;
 
119
a
 
120
2
 
121
SHOW SLAVE STATUS;
 
122
Slave_IO_State  #
 
123
Master_Host     127.0.0.1
 
124
Master_User     root
 
125
Master_Port     #
 
126
Connect_Retry   1
 
127
Master_Log_File master-bin.000001
 
128
Read_Master_Log_Pos     #
 
129
Relay_Log_File  #
 
130
Relay_Log_Pos   #
 
131
Relay_Master_Log_File   master-bin.000001
 
132
Slave_IO_Running        Yes
 
133
Slave_SQL_Running       Yes
 
134
Replicate_Do_DB 
 
135
Replicate_Ignore_DB     
 
136
Replicate_Do_Table      
 
137
Replicate_Ignore_Table  
 
138
Replicate_Wild_Do_Table 
 
139
Replicate_Wild_Ignore_Table     
 
140
Last_Errno      0
 
141
Last_Error      <Last_Error>
 
142
Skip_Counter    0
 
143
Exec_Master_Log_Pos     #
 
144
Relay_Log_Space #
 
145
Until_Condition None
 
146
Until_Log_File  
 
147
Until_Log_Pos   0
 
148
Master_SSL_Allowed      No
 
149
Master_SSL_CA_File      
 
150
Master_SSL_CA_Path      
 
151
Master_SSL_Cert 
 
152
Master_SSL_Cipher       
 
153
Master_SSL_Key  
 
154
Seconds_Behind_Master   #
 
155
Master_SSL_Verify_Server_Cert   No
 
156
Last_IO_Errno   <Last_IO_Errno>
 
157
Last_IO_Error   <Last_IO_Error>
 
158
Last_SQL_Errno  0
 
159
Last_SQL_Error  <Last_SQL_Error>
 
160
INSERT INTO t9 VALUES (4);
 
161
INSERT INTO t4 VALUES (4);
 
162
SHOW SLAVE STATUS;
 
163
Slave_IO_State  #
 
164
Master_Host     127.0.0.1
 
165
Master_User     root
 
166
Master_Port     #
 
167
Connect_Retry   1
 
168
Master_Log_File master-bin.000001
 
169
Read_Master_Log_Pos     #
 
170
Relay_Log_File  #
 
171
Relay_Log_Pos   #
 
172
Relay_Master_Log_File   master-bin.000001
 
173
Slave_IO_Running        Yes
 
174
Slave_SQL_Running       No
 
175
Replicate_Do_DB 
 
176
Replicate_Ignore_DB     
 
177
Replicate_Do_Table      
 
178
Replicate_Ignore_Table  
 
179
Replicate_Wild_Do_Table 
 
180
Replicate_Wild_Ignore_Table     
 
181
Last_Errno      1535
 
182
Last_Error      <Last_Error>
 
183
Skip_Counter    0
 
184
Exec_Master_Log_Pos     #
 
185
Relay_Log_Space #
 
186
Until_Condition None
 
187
Until_Log_File  
 
188
Until_Log_Pos   0
 
189
Master_SSL_Allowed      No
 
190
Master_SSL_CA_File      
 
191
Master_SSL_CA_Path      
 
192
Master_SSL_Cert 
 
193
Master_SSL_Cipher       
 
194
Master_SSL_Key  
 
195
Seconds_Behind_Master   #
 
196
Master_SSL_Verify_Server_Cert   No
 
197
Last_IO_Errno   <Last_IO_Errno>
 
198
Last_IO_Error   <Last_IO_Error>
 
199
Last_SQL_Errno  1535
 
200
Last_SQL_Error  <Last_SQL_Error>
 
201
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 
202
START SLAVE;
 
203
INSERT INTO t9 VALUES (5);
 
204
INSERT INTO t5 VALUES (5,10,25);
 
205
SHOW SLAVE STATUS;
 
206
Slave_IO_State  #
 
207
Master_Host     127.0.0.1
 
208
Master_User     root
 
209
Master_Port     #
 
210
Connect_Retry   1
 
211
Master_Log_File master-bin.000001
 
212
Read_Master_Log_Pos     #
 
213
Relay_Log_File  #
 
214
Relay_Log_Pos   #
 
215
Relay_Master_Log_File   master-bin.000001
 
216
Slave_IO_Running        Yes
 
217
Slave_SQL_Running       No
 
218
Replicate_Do_DB 
 
219
Replicate_Ignore_DB     
 
220
Replicate_Do_Table      
 
221
Replicate_Ignore_Table  
 
222
Replicate_Wild_Do_Table 
 
223
Replicate_Wild_Ignore_Table     
 
224
Last_Errno      1535
 
225
Last_Error      <Last_Error>
 
226
Skip_Counter    0
 
227
Exec_Master_Log_Pos     #
 
228
Relay_Log_Space #
 
229
Until_Condition None
 
230
Until_Log_File  
 
231
Until_Log_Pos   0
 
232
Master_SSL_Allowed      No
 
233
Master_SSL_CA_File      
 
234
Master_SSL_CA_Path      
 
235
Master_SSL_Cert 
 
236
Master_SSL_Cipher       
 
237
Master_SSL_Key  
 
238
Seconds_Behind_Master   #
 
239
Master_SSL_Verify_Server_Cert   No
 
240
Last_IO_Errno   <Last_IO_Errno>
 
241
Last_IO_Error   <Last_IO_Error>
 
242
Last_SQL_Errno  1535
 
243
Last_SQL_Error  <Last_SQL_Error>
 
244
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 
245
START SLAVE;
 
246
INSERT INTO t9 VALUES (6);
 
247
INSERT INTO t6 VALUES (6,12,36);
 
248
SHOW SLAVE STATUS;
 
249
Slave_IO_State  #
 
250
Master_Host     127.0.0.1
 
251
Master_User     root
 
252
Master_Port     #
 
253
Connect_Retry   1
 
254
Master_Log_File master-bin.000001
 
255
Read_Master_Log_Pos     #
 
256
Relay_Log_File  #
 
257
Relay_Log_Pos   #
 
258
Relay_Master_Log_File   master-bin.000001
 
259
Slave_IO_Running        Yes
 
260
Slave_SQL_Running       No
 
261
Replicate_Do_DB 
 
262
Replicate_Ignore_DB     
 
263
Replicate_Do_Table      
 
264
Replicate_Ignore_Table  
 
265
Replicate_Wild_Do_Table 
 
266
Replicate_Wild_Ignore_Table     
 
267
Last_Errno      1535
 
268
Last_Error      <Last_Error>
 
269
Skip_Counter    0
 
270
Exec_Master_Log_Pos     #
 
271
Relay_Log_Space #
 
272
Until_Condition None
 
273
Until_Log_File  
 
274
Until_Log_Pos   0
 
275
Master_SSL_Allowed      No
 
276
Master_SSL_CA_File      
 
277
Master_SSL_CA_Path      
 
278
Master_SSL_Cert 
 
279
Master_SSL_Cipher       
 
280
Master_SSL_Key  
 
281
Seconds_Behind_Master   #
 
282
Master_SSL_Verify_Server_Cert   No
 
283
Last_IO_Errno   <Last_IO_Errno>
 
284
Last_IO_Error   <Last_IO_Error>
 
285
Last_SQL_Errno  1535
 
286
Last_SQL_Error  <Last_SQL_Error>
 
287
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
 
288
START SLAVE;
 
289
INSERT INTO t9 VALUES (6);
 
290
SHOW SLAVE STATUS;
 
291
Slave_IO_State  #
 
292
Master_Host     127.0.0.1
 
293
Master_User     root
 
294
Master_Port     #
 
295
Connect_Retry   1
 
296
Master_Log_File master-bin.000001
 
297
Read_Master_Log_Pos     #
 
298
Relay_Log_File  #
 
299
Relay_Log_Pos   #
 
300
Relay_Master_Log_File   master-bin.000001
 
301
Slave_IO_Running        Yes
 
302
Slave_SQL_Running       Yes
 
303
Replicate_Do_DB 
 
304
Replicate_Ignore_DB     
 
305
Replicate_Do_Table      
 
306
Replicate_Ignore_Table  
 
307
Replicate_Wild_Do_Table 
 
308
Replicate_Wild_Ignore_Table     
 
309
Last_Errno      0
 
310
Last_Error      <Last_Error>
 
311
Skip_Counter    0
 
312
Exec_Master_Log_Pos     #
 
313
Relay_Log_Space #
 
314
Until_Condition None
 
315
Until_Log_File  
 
316
Until_Log_Pos   0
 
317
Master_SSL_Allowed      No
 
318
Master_SSL_CA_File      
 
319
Master_SSL_CA_Path      
 
320
Master_SSL_Cert 
 
321
Master_SSL_Cipher       
 
322
Master_SSL_Key  
 
323
Seconds_Behind_Master   #
 
324
Master_SSL_Verify_Server_Cert   No
 
325
Last_IO_Errno   <Last_IO_Errno>
 
326
Last_IO_Error   <Last_IO_Error>
 
327
Last_SQL_Errno  0
 
328
Last_SQL_Error  <Last_SQL_Error>
 
329
INSERT INTO t7 VALUES (1),(2),(3);
 
330
INSERT INTO t8 VALUES (1),(2),(3);
 
331
SELECT * FROM t7 ORDER BY a;
 
332
a
 
333
1
 
334
2
 
335
3
 
336
SELECT * FROM t8 ORDER BY a;
 
337
a
 
338
1
 
339
2
 
340
3
 
341
SELECT * FROM t7 ORDER BY a;
 
342
a       e1      e2      e3      e4      e5      e6      e7      e8
 
343
1       NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
 
344
2       NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
 
345
3       NULL    NULL    NULL    NULL    NULL    NULL    NULL    NULL
 
346
SELECT * FROM t8 ORDER BY a;
 
347
a       e1      e2      e3      e4      e5      e6      e7      e8
 
348
1       0       0       0       0       0       0       0       0
 
349
2       0       0       0       0       0       0       0       0
 
350
3       0       0       0       0       0       0       0       0
 
351
**** On Master ****
 
352
TRUNCATE t1_nodef;
 
353
SET SQL_LOG_BIN=0;
 
354
INSERT INTO t1_nodef VALUES (1,2);
 
355
INSERT INTO t1_nodef VALUES (2,4);
 
356
SET SQL_LOG_BIN=1;
 
357
**** On Slave ****
 
358
INSERT INTO t1_nodef VALUES (1,2,3,4,5);
 
359
INSERT INTO t1_nodef VALUES (2,4,6,8,10);
 
360
**** On Master ****
 
361
UPDATE t1_nodef SET b=2*b WHERE a=1;
 
362
SELECT * FROM t1_nodef ORDER BY a;
 
363
a       b
 
364
1       4
 
365
2       4
 
366
**** On Slave ****
 
367
SELECT * FROM t1_nodef ORDER BY a;
 
368
a       b       x       y       z
 
369
1       4       3       4       5
 
370
2       4       6       8       10
 
371
**** On Master ****
 
372
DELETE FROM t1_nodef WHERE a=2;
 
373
SELECT * FROM t1_nodef ORDER BY a;
 
374
a       b
 
375
1       4
 
376
**** On Slave ****
 
377
SELECT * FROM t1_nodef ORDER BY a;
 
378
a       b       x       y       z
 
379
1       4       3       4       5
 
380
**** Cleanup ****
 
381
DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef;
 
382
DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t7,t8,t9;
 
383
SET @@global.sql_mode= @my_sql_mode;