1include/master-slave.inc
2[connection master]
3DROP TABLE IF EXISTS t1;
4**** Testing WL#3228 changes. ****
5*** Create "wider" table on slave ***
6connection slave;
7Checking MYSQL_TYPE_NEWDECIMAL fields
8connection master;
9DROP TABLE IF EXISTS t1;
10Warnings:
11Note	1051	Unknown table 'test.t1'
12connection slave;
13STOP SLAVE;
14RESET SLAVE;
15CREATE TABLE t1 (a DECIMAL(5,2));
16connection master;
17CREATE TABLE t1 (a DECIMAL(20, 10));
18RESET MASTER;
19INSERT INTO t1 VALUES (901251.90125);
20connection slave;
21START SLAVE;
22include/wait_for_slave_sql_error.inc [errno=1677]
23Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'decimal(20,10)' to type 'decimal(5,2)''
24SELECT COUNT(*) FROM t1;
25COUNT(*)
260
27STOP SLAVE;
28RESET SLAVE;
29connection master;
30RESET MASTER;
31connection slave;
32START SLAVE;
33connection master;
34DROP TABLE IF EXISTS t1;
35connection slave;
36STOP SLAVE;
37RESET SLAVE;
38CREATE TABLE t1 (a DECIMAL(27, 9));
39connection master;
40CREATE TABLE t1 (a DECIMAL(27, 18));
41RESET MASTER;
42INSERT INTO t1 VALUES (901251.90125);
43connection slave;
44START SLAVE;
45include/wait_for_slave_sql_error.inc [errno=1677]
46Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'decimal(27,18)' to type 'decimal(27,9)''
47SELECT COUNT(*) FROM t1;
48COUNT(*)
490
50STOP SLAVE;
51RESET SLAVE;
52connection master;
53RESET MASTER;
54connection slave;
55START SLAVE;
56connection master;
57DROP TABLE IF EXISTS t1;
58connection slave;
59STOP SLAVE;
60RESET SLAVE;
61CREATE TABLE t1 (a NUMERIC(5,2));
62connection master;
63CREATE TABLE t1 (a NUMERIC(20, 10));
64RESET MASTER;
65INSERT INTO t1 VALUES (901251.90125);
66connection slave;
67START SLAVE;
68include/wait_for_slave_sql_error.inc [errno=1677]
69Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'decimal(20,10)' to type 'decimal(5,2)''
70SELECT COUNT(*) FROM t1;
71COUNT(*)
720
73STOP SLAVE;
74RESET SLAVE;
75connection master;
76RESET MASTER;
77connection slave;
78START SLAVE;
79Checking MYSQL_TYPE_FLOAT fields
80connection master;
81DROP TABLE IF EXISTS t1;
82connection slave;
83STOP SLAVE;
84RESET SLAVE;
85CREATE TABLE t1 (a FLOAT(20));
86connection master;
87CREATE TABLE t1 (a FLOAT(47));
88RESET MASTER;
89INSERT INTO t1 VALUES (901251.90125);
90connection slave;
91START SLAVE;
92include/wait_for_slave_sql_error.inc [errno=1677]
93Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'double' to type 'float''
94SELECT COUNT(*) FROM t1;
95COUNT(*)
960
97STOP SLAVE;
98RESET SLAVE;
99connection master;
100RESET MASTER;
101connection slave;
102START SLAVE;
103Checking MYSQL_TYPE_BIT fields
104connection master;
105DROP TABLE IF EXISTS t1;
106connection slave;
107STOP SLAVE;
108RESET SLAVE;
109CREATE TABLE t1 (a BIT(5));
110connection master;
111CREATE TABLE t1 (a BIT(64));
112RESET MASTER;
113INSERT INTO t1 VALUES (B'10101');
114connection slave;
115START SLAVE;
116include/wait_for_slave_sql_error.inc [errno=1677]
117Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'bit(64)' to type 'bit(5)''
118SELECT COUNT(*) FROM t1;
119COUNT(*)
1200
121STOP SLAVE;
122RESET SLAVE;
123connection master;
124RESET MASTER;
125connection slave;
126START SLAVE;
127connection master;
128DROP TABLE IF EXISTS t1;
129connection slave;
130STOP SLAVE;
131RESET SLAVE;
132CREATE TABLE t1 (a BIT(11));
133connection master;
134CREATE TABLE t1 (a BIT(12));
135RESET MASTER;
136INSERT INTO t1 VALUES (B'10101');
137connection slave;
138START SLAVE;
139include/wait_for_slave_sql_error.inc [errno=1677]
140Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'bit(12)' to type 'bit(11)''
141SELECT COUNT(*) FROM t1;
142COUNT(*)
1430
144STOP SLAVE;
145RESET SLAVE;
146connection master;
147RESET MASTER;
148connection slave;
149START SLAVE;
150Checking MYSQL_TYPE_SET fields
151connection master;
152DROP TABLE IF EXISTS t1;
153connection slave;
154STOP SLAVE;
155RESET SLAVE;
156CREATE TABLE t1 (a SET('4'));
157connection master;
158CREATE TABLE t1 (a SET('1','2','3','4','5','6','7','8','9'));
159RESET MASTER;
160INSERT INTO t1 VALUES ('4');
161connection slave;
162START SLAVE;
163include/wait_for_slave_sql_error.inc [errno=1677]
164Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'set' to type 'set('4')''
165SELECT COUNT(*) FROM t1;
166COUNT(*)
1670
168STOP SLAVE;
169RESET SLAVE;
170connection master;
171RESET MASTER;
172connection slave;
173START SLAVE;
174Checking MYSQL_TYPE_STRING fields
175connection master;
176DROP TABLE IF EXISTS t1;
177connection slave;
178STOP SLAVE;
179RESET SLAVE;
180CREATE TABLE t1 (a CHAR(10));
181connection master;
182CREATE TABLE t1 (a CHAR(20));
183RESET MASTER;
184INSERT INTO t1 VALUES ('This is a test.');
185connection slave;
186START SLAVE;
187include/wait_for_slave_sql_error.inc [errno=1677]
188Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'char(20 octets)' to type 'char(10 octets) character set latin1''
189SELECT COUNT(*) FROM t1;
190COUNT(*)
1910
192STOP SLAVE;
193RESET SLAVE;
194connection master;
195RESET MASTER;
196connection slave;
197START SLAVE;
198Checking MYSQL_TYPE_ENUM fields
199connection master;
200DROP TABLE IF EXISTS t1;
201connection slave;
202STOP SLAVE;
203RESET SLAVE;
204CREATE TABLE t1 (a ENUM('44','54'));
205connection master;
206CREATE TABLE t1 (a ENUM(
207'01','02','03','04','05','06','07','08','09',
208'11','12','13','14','15','16','17','18','19',
209'21','22','23','24','25','26','27','28','29',
210'31','32','33','34','35','36','37','38','39',
211'41','42','43','44','45','46','47','48','49',
212'51','52','53','54','55','56','57','58','59',
213'61','62','63','64','65','66','67','68','69',
214'71','72','73','74','75','76','77','78','79',
215'81','82','83','84','85','86','87','88','89',
216'91','92','93','94','95','96','97','98','99',
217'101','102','103','104','105','106','107','108','109',
218'111','112','113','114','115','116','117','118','119',
219'121','122','123','124','125','126','127','128','129',
220'131','132','133','134','135','136','137','138','139',
221'141','142','143','144','145','146','147','148','149',
222'151','152','153','154','155','156','157','158','159',
223'161','162','163','164','165','166','167','168','169',
224'171','172','173','174','175','176','177','178','179',
225'181','182','183','184','185','186','187','188','189',
226'191','192','193','194','195','196','197','198','199',
227'201','202','203','204','205','206','207','208','209',
228'211','212','213','214','215','216','217','218','219',
229'221','222','223','224','225','226','227','228','229',
230'231','232','233','234','235','236','237','238','239',
231'241','242','243','244','245','246','247','248','249',
232'251','252','253','254','255','256','257','258','259',
233'261','262','263','264','265','266','267','268','269',
234'271','272','273','274','275','276','277','278','279',
235'281','282','283','284','285','286','287','288','289',
236'291','292','293','294','295','296','297','298','299'
237            ));
238RESET MASTER;
239INSERT INTO t1 VALUES ('44');
240connection slave;
241START SLAVE;
242include/wait_for_slave_sql_error.inc [errno=1677]
243Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'enum' to type 'enum('44','54')''
244SELECT COUNT(*) FROM t1;
245COUNT(*)
2460
247STOP SLAVE;
248RESET SLAVE;
249connection master;
250RESET MASTER;
251connection slave;
252START SLAVE;
253Checking MYSQL_TYPE_VARCHAR fields
254connection master;
255DROP TABLE IF EXISTS t1;
256connection slave;
257STOP SLAVE;
258RESET SLAVE;
259CREATE TABLE t1 (a VARCHAR(100));
260connection master;
261CREATE TABLE t1 (a VARCHAR(2000));
262RESET MASTER;
263INSERT INTO t1 VALUES ('This is a test.');
264connection slave;
265START SLAVE;
266include/wait_for_slave_sql_error.inc [errno=1677]
267Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'varchar(2000 octets)' to type 'varchar(100 octets) character set latin1''
268SELECT COUNT(*) FROM t1;
269COUNT(*)
2700
271STOP SLAVE;
272RESET SLAVE;
273connection master;
274RESET MASTER;
275connection slave;
276START SLAVE;
277connection master;
278DROP TABLE IF EXISTS t1;
279connection slave;
280STOP SLAVE;
281RESET SLAVE;
282CREATE TABLE t1 (a VARCHAR(10));
283connection master;
284CREATE TABLE t1 (a VARCHAR(200));
285RESET MASTER;
286INSERT INTO t1 VALUES ('This is a test.');
287connection slave;
288START SLAVE;
289include/wait_for_slave_sql_error.inc [errno=1677]
290Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'varchar(200 octets)' to type 'varchar(10 octets) character set latin1''
291SELECT COUNT(*) FROM t1;
292COUNT(*)
2930
294STOP SLAVE;
295RESET SLAVE;
296connection master;
297RESET MASTER;
298connection slave;
299START SLAVE;
300connection master;
301DROP TABLE IF EXISTS t1;
302connection slave;
303STOP SLAVE;
304RESET SLAVE;
305CREATE TABLE t1 (a VARCHAR(1000));
306connection master;
307CREATE TABLE t1 (a VARCHAR(2000));
308RESET MASTER;
309INSERT INTO t1 VALUES ('This is a test.');
310connection slave;
311START SLAVE;
312include/wait_for_slave_sql_error.inc [errno=1677]
313Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'varchar(2000 octets)' to type 'varchar(1000 octets) character set latin1''
314SELECT COUNT(*) FROM t1;
315COUNT(*)
3160
317STOP SLAVE;
318RESET SLAVE;
319connection master;
320RESET MASTER;
321connection slave;
322START SLAVE;
323Checking MYSQL_TYPE_BLOB fields
324connection master;
325DROP TABLE IF EXISTS t1;
326connection slave;
327STOP SLAVE;
328RESET SLAVE;
329CREATE TABLE t1 (a TINYBLOB);
330connection master;
331CREATE TABLE t1 (a LONGBLOB);
332RESET MASTER;
333INSERT INTO t1 VALUES ('This is a test.');
334connection slave;
335START SLAVE;
336include/wait_for_slave_sql_error.inc [errno=1677]
337Last_SQL_Error = 'Column 0 of table 'test.t1' cannot be converted from type 'longblob' to type 'tinyblob''
338SELECT COUNT(*) FROM t1;
339COUNT(*)
3400
341STOP SLAVE;
342RESET SLAVE;
343connection master;
344RESET MASTER;
345connection slave;
346START SLAVE;
347connection slave;
348call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 0 ...e mismatch.* error.* 1535");
349call mtr.add_suppression("Slave SQL.*Column 0 of table .test.t1. cannot be converted from type.* error.* 1677");
350*** Cleanup  ***
351connection master;
352DROP TABLE IF EXISTS t1;
353connection slave;
354include/rpl_end.inc
355