2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
8
SET @my_sql_mode= @@global.sql_mode;
9
SET GLOBAL SQL_MODE='STRICT_ALL_TABLES';
11
CREATE TABLE t1_int (a INT PRIMARY KEY, b INT) ENGINE='NDB';
12
CREATE TABLE t1_bit (a INT PRIMARY KEY, b INT) ENGINE='NDB';
13
CREATE TABLE t1_char (a INT PRIMARY KEY, b INT) ENGINE='NDB';
14
CREATE TABLE t1_nodef (a INT PRIMARY KEY, b INT) ENGINE='NDB';
15
CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE='NDB';
16
CREATE TABLE t3 (a INT PRIMARY KEY, b INT) ENGINE='NDB';
17
CREATE TABLE t4 (a INT) ENGINE='NDB';
18
CREATE TABLE t5 (a INT, b INT, c INT) ENGINE='NDB';
19
CREATE TABLE t6 (a INT, b INT, c INT) ENGINE='NDB';
20
CREATE TABLE t9 (a INT) ENGINE='NDB';
21
ALTER TABLE t1_int ADD x INT DEFAULT 42;
23
ADD x BIT(3) DEFAULT b'011',
24
ADD y BIT(5) DEFAULT b'10101',
25
ADD z BIT(2) DEFAULT b'10';
26
ALTER TABLE t1_char ADD x CHAR(20) DEFAULT 'Just a test';
27
ALTER TABLE t1_nodef ADD x INT NOT NULL;
28
ALTER TABLE t2 DROP b;
29
ALTER TABLE t4 MODIFY a FLOAT;
30
ALTER TABLE t5 MODIFY b FLOAT;
31
ALTER TABLE t6 MODIFY c FLOAT;
32
INSERT INTO t1_int VALUES (2, 4, 4711);
33
INSERT INTO t1_char VALUES (2, 4, 'Foo is a bar');
34
INSERT INTO t1_bit VALUES (2, 4, b'101', b'11100', b'01');
36
INSERT INTO t1_int VALUES (1,2);
37
INSERT INTO t1_int VALUES (2,5);
38
INSERT INTO t1_bit VALUES (1,2);
39
INSERT INTO t1_bit VALUES (2,5);
40
INSERT INTO t1_char VALUES (1,2);
41
INSERT INTO t1_char VALUES (2,5);
50
SELECT * FROM t1_char;
55
SELECT a,b,x FROM t1_int;
59
SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit;
60
a b HEX(x) HEX(y) HEX(z)
63
SELECT a,b,x FROM t1_char;
68
UPDATE t1_int SET b=2*b WHERE a=2;
69
UPDATE t1_char SET b=2*b WHERE a=2;
70
UPDATE t1_bit SET b=2*b WHERE a=2;
79
SELECT * FROM t1_char;
84
SELECT a,b,x FROM t1_int;
88
SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit;
89
a b HEX(x) HEX(y) HEX(z)
92
SELECT a,b,x FROM t1_char;
96
INSERT INTO t9 VALUES (2);
97
INSERT INTO t1_nodef VALUES (1,2);
100
Master_Host 127.0.0.1
102
Master_Port MASTER_PORT
104
Master_Log_File master-bin.000001
105
Read_Master_Log_Pos #
108
Relay_Master_Log_File master-bin.000001
114
Replicate_Ignore_Table
115
Replicate_Wild_Do_Table
116
Replicate_Wild_Ignore_Table
118
Last_Error Error in Write_rows event: error during transaction execution on table test.t1_nodef
120
Exec_Master_Log_Pos #
125
Master_SSL_Allowed No
131
Seconds_Behind_Master #
132
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
134
INSERT INTO t9 VALUES (2);
135
INSERT INTO t2 VALUES (2,4);
138
Master_Host 127.0.0.1
140
Master_Port MASTER_PORT
142
Master_Log_File master-bin.000001
143
Read_Master_Log_Pos #
146
Relay_Master_Log_File master-bin.000001
152
Replicate_Ignore_Table
153
Replicate_Wild_Do_Table
154
Replicate_Wild_Ignore_Table
156
Last_Error Table width mismatch - received 2 columns, test.t2 has 1 columns
158
Exec_Master_Log_Pos #
163
Master_SSL_Allowed No
169
Seconds_Behind_Master #
170
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
172
INSERT INTO t9 VALUES (4);
173
INSERT INTO t4 VALUES (4);
176
Master_Host 127.0.0.1
178
Master_Port MASTER_PORT
180
Master_Log_File master-bin.000001
181
Read_Master_Log_Pos #
184
Relay_Master_Log_File master-bin.000001
190
Replicate_Ignore_Table
191
Replicate_Wild_Do_Table
192
Replicate_Wild_Ignore_Table
194
Last_Error Column 0 type mismatch - received type 3, test.t4 has type 4
196
Exec_Master_Log_Pos #
201
Master_SSL_Allowed No
207
Seconds_Behind_Master #
208
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
210
INSERT INTO t9 VALUES (5);
211
INSERT INTO t5 VALUES (5,10,25);
214
Master_Host 127.0.0.1
216
Master_Port MASTER_PORT
218
Master_Log_File master-bin.000001
219
Read_Master_Log_Pos #
222
Relay_Master_Log_File master-bin.000001
228
Replicate_Ignore_Table
229
Replicate_Wild_Do_Table
230
Replicate_Wild_Ignore_Table
232
Last_Error Column 1 type mismatch - received type 3, test.t5 has type 4
234
Exec_Master_Log_Pos #
239
Master_SSL_Allowed No
245
Seconds_Behind_Master #
246
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
248
INSERT INTO t9 VALUES (6);
249
INSERT INTO t6 VALUES (6,12,36);
252
Master_Host 127.0.0.1
254
Master_Port MASTER_PORT
256
Master_Log_File master-bin.000001
257
Read_Master_Log_Pos #
260
Relay_Master_Log_File master-bin.000001
266
Replicate_Ignore_Table
267
Replicate_Wild_Do_Table
268
Replicate_Wild_Ignore_Table
270
Last_Error Column 2 type mismatch - received type 3, test.t6 has type 4
272
Exec_Master_Log_Pos #
277
Master_SSL_Allowed No
283
Seconds_Behind_Master #
284
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
286
DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef;
287
DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t9;
288
SET @@global.sql_mode= @my_sql_mode;