873.2.35
by Monty Taylor
Update tests based on how Toru's latest patch changes create table statements. |
1 |
DROP TABLE IF EXISTS t1;
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
2 |
CREATE TABLE t1 (col1 INT);
|
970.2.5
by Padraig O'Sullivan
Added extra comments to parts of test cases that were modified for this bug |
3 |
INSERT INTO t1 VALUES(-2147483648);
|
4 |
INSERT INTO t1 VALUES (0);
|
|
5 |
INSERT INTO t1 VALUES (2147483647);
|
|
6 |
INSERT INTO t1 VALUES ('-2147483648');
|
|
7 |
INSERT INTO t1 VALUES ('2147483647');
|
|
8 |
INSERT INTO t1 VALUES (-2147483648.0);
|
|
9 |
INSERT INTO t1 VALUES (2147483647.0);
|
|
1
by brian
clean slate |
10 |
INSERT INTO t1 (col1) VALUES(-2147483649);
|
11 |
ERROR 22003: Out of range value for column 'col1' at row 1
|
|
12 |
INSERT INTO t1 (col1) VALUES(2147643648);
|
|
13 |
ERROR 22003: Out of range value for column 'col1' at row 1
|
|
14 |
INSERT INTO t1 (col1) VALUES('-2147483649');
|
|
15 |
ERROR 22003: Out of range value for column 'col1' at row 1
|
|
16 |
INSERT INTO t1 (col1) VALUES('2147643648');
|
|
17 |
ERROR 22003: Out of range value for column 'col1' at row 1
|
|
18 |
INSERT INTO t1 (col1) VALUES(-2147483649.0);
|
|
19 |
ERROR 22003: Out of range value for column 'col1' at row 1
|
|
20 |
INSERT INTO t1 (col1) VALUES(2147643648.0);
|
|
21 |
ERROR 22003: Out of range value for column 'col1' at row 1
|
|
22 |
UPDATE t1 SET col1 = col1 - 50 WHERE col1 < 0;
|
|
23 |
ERROR 22003: Out of range value for column 'col1' at row 1
|
|
24 |
UPDATE t1 SET col1 =col1 / 0 WHERE col1 > 0;
|
|
25 |
ERROR 22012: Division by 0
|
|
26 |
UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0;
|
|
27 |
ERROR 22012: Division by 0
|
|
28 |
INSERT INTO t1 (col1) VALUES ('');
|
|
29 |
ERROR HY000: Incorrect integer value: '' for column 'col1' at row 1
|
|
30 |
INSERT INTO t1 (col1) VALUES ('a59b');
|
|
31 |
ERROR HY000: Incorrect integer value: 'a59b' for column 'col1' at row 1
|
|
32 |
INSERT INTO t1 (col1) VALUES ('1a');
|
|
33 |
ERROR 01000: Data truncated for column 'col1' at row 1
|
|
34 |
INSERT IGNORE INTO t1 (col1) VALUES ('2a');
|
|
35 |
Warnings:
|
|
36 |
Warning 1265 Data truncated for column 'col1' at row 1
|
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
37 |
INSERT IGNORE INTO t1 values (1/0);
|
38 |
Warnings:
|
|
39 |
Error 1365 Division by 0
|
|
970.2.5
by Padraig O'Sullivan
Added extra comments to parts of test cases that were modified for this bug |
40 |
INSERT IGNORE INTO t1 values (-2147483649);
|
41 |
Warnings:
|
|
42 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
43 |
INSERT IGNORE INTO t1 values (2147643648);
|
|
44 |
Warnings:
|
|
45 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
46 |
INSERT IGNORE INTO t1 values ('-2147483649');
|
|
47 |
Warnings:
|
|
48 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
49 |
INSERT IGNORE INTO t1 values ('2147643648');
|
|
50 |
Warnings:
|
|
51 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
52 |
INSERT IGNORE INTO t1 values (-2147483649.0);
|
|
53 |
Warnings:
|
|
54 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
55 |
INSERT IGNORE INTO t1 values (2147643648.0);
|
|
56 |
Warnings:
|
|
57 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
1
by brian
clean slate |
58 |
SELECT * FROM t1;
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
59 |
col1
|
60 |
-2147483648
|
|
61 |
0
|
|
62 |
2147483647
|
|
63 |
-2147483648
|
|
64 |
2147483647
|
|
65 |
-2147483648
|
|
66 |
2147483647
|
|
67 |
2
|
|
68 |
NULL
|
|
69 |
-2147483648
|
|
70 |
2147483647
|
|
71 |
-2147483648
|
|
72 |
2147483647
|
|
73 |
-2147483648
|
|
74 |
2147483647
|
|
1
by brian
clean slate |
75 |
DROP TABLE t1;
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
76 |
CREATE TABLE t1 (col1 BIGINT);
|
970.2.5
by Padraig O'Sullivan
Added extra comments to parts of test cases that were modified for this bug |
77 |
INSERT INTO t1 VALUES (-9223372036854775808);
|
78 |
INSERT INTO t1 VALUES (0);
|
|
79 |
INSERT INTO t1 VALUES (9223372036854775807);
|
|
80 |
INSERT INTO t1 VALUES ('-9223372036854775808');
|
|
81 |
INSERT INTO t1 VALUES ('9223372036854775807');
|
|
82 |
INSERT INTO t1 VALUES (-9223372036854774000.0);
|
|
83 |
INSERT INTO t1 VALUES (9223372036854775700.0);
|
|
1
by brian
clean slate |
84 |
INSERT INTO t1 (col1) VALUES(-9223372036854775809);
|
85 |
ERROR 22003: Out of range value for column 'col1' at row 1
|
|
86 |
INSERT INTO t1 (col1) VALUES('-9223372036854775809');
|
|
87 |
ERROR 22003: Out of range value for column 'col1' at row 1
|
|
88 |
INSERT INTO t1 (col1) VALUES('9223372036854775808');
|
|
89 |
ERROR 22003: Out of range value for column 'col1' at row 1
|
|
90 |
INSERT INTO t1 (col1) VALUES(-9223372036854785809.0);
|
|
91 |
ERROR 22003: Out of range value for column 'col1' at row 1
|
|
92 |
INSERT INTO t1 (col1) VALUES(9223372036854785808.0);
|
|
93 |
ERROR 22003: Out of range value for column 'col1' at row 1
|
|
94 |
UPDATE t1 SET col1 =col1 / 0 WHERE col1 > 0;
|
|
95 |
ERROR 22012: Division by 0
|
|
96 |
UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0;
|
|
97 |
ERROR 22012: Division by 0
|
|
98 |
INSERT INTO t1 (col1) VALUES ('');
|
|
99 |
ERROR HY000: Incorrect integer value: '' for column 'col1' at row 1
|
|
100 |
INSERT INTO t1 (col1) VALUES ('a59b');
|
|
101 |
ERROR HY000: Incorrect integer value: 'a59b' for column 'col1' at row 1
|
|
102 |
INSERT INTO t1 (col1) VALUES ('1a');
|
|
103 |
ERROR 01000: Data truncated for column 'col1' at row 1
|
|
104 |
INSERT IGNORE INTO t1 (col1) VALUES ('2a');
|
|
105 |
Warnings:
|
|
106 |
Warning 1265 Data truncated for column 'col1' at row 1
|
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
107 |
INSERT IGNORE INTO t1 values (1/0);
|
108 |
Warnings:
|
|
109 |
Error 1365 Division by 0
|
|
970.2.5
by Padraig O'Sullivan
Added extra comments to parts of test cases that were modified for this bug |
110 |
INSERT IGNORE INTO t1 VALUES (-9223372036854775809);
|
111 |
Warnings:
|
|
112 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
113 |
INSERT IGNORE INTO t1 VALUES (9223372036854775808);
|
|
114 |
INSERT IGNORE INTO t1 VALUES ('-9223372036854775809');
|
|
115 |
Warnings:
|
|
116 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
117 |
INSERT IGNORE INTO t1 VALUES ('9223372036854775808');
|
|
118 |
Warnings:
|
|
119 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
120 |
INSERT IGNORE INTO t1 VALUES (-9223372036854785809.0);
|
|
121 |
Warnings:
|
|
122 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
123 |
INSERT IGNORE INTO t1 VALUES (9223372036854785808.0);
|
|
124 |
Warnings:
|
|
125 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
1
by brian
clean slate |
126 |
SELECT * FROM t1;
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
127 |
col1
|
128 |
-9223372036854775808
|
|
129 |
0
|
|
130 |
9223372036854775807
|
|
131 |
-9223372036854775808
|
|
132 |
9223372036854775807
|
|
133 |
-9223372036854774000
|
|
134 |
9223372036854775700
|
|
135 |
2
|
|
136 |
NULL
|
|
137 |
-9223372036854775808
|
|
138 |
-9223372036854775808
|
|
139 |
-9223372036854775808
|
|
140 |
9223372036854775807
|
|
141 |
-9223372036854775808
|
|
142 |
9223372036854775807
|
|
1
by brian
clean slate |
143 |
DROP TABLE t1;
|
144 |
CREATE TABLE t1 (col1 NUMERIC(4,2));
|
|
970.2.5
by Padraig O'Sullivan
Added extra comments to parts of test cases that were modified for this bug |
145 |
INSERT INTO t1 VALUES (10.55);
|
146 |
INSERT INTO t1 VALUES (10.5555);
|
|
147 |
ERROR 01000: Data truncated for column 'col1' at row 1
|
|
148 |
INSERT INTO t1 VALUES (0);
|
|
149 |
INSERT INTO t1 VALUES (-10.55);
|
|
150 |
INSERT INTO t1 VALUES (-10.5555);
|
|
151 |
ERROR 01000: Data truncated for column 'col1' at row 1
|
|
152 |
INSERT INTO t1 VALUES (11);
|
|
153 |
INSERT INTO t1 VALUES (1e+01);
|
|
154 |
INSERT INTO t1 VALUES ('10.55');
|
|
155 |
INSERT INTO t1 VALUES ('10.5555');
|
|
156 |
ERROR 01000: Data truncated for column 'col1' at row 1
|
|
157 |
INSERT INTO t1 VALUES ('-10.55');
|
|
158 |
INSERT INTO t1 VALUES ('-10.5555');
|
|
159 |
ERROR 01000: Data truncated for column 'col1' at row 1
|
|
160 |
INSERT INTO t1 VALUES ('11');
|
|
161 |
INSERT INTO t1 VALUES ('1e+01');
|
|
1
by brian
clean slate |
162 |
INSERT INTO t1 VALUES (101.55);
|
163 |
ERROR 22003: Out of range value for column 'col1' at row 1
|
|
164 |
INSERT INTO t1 VALUES (101);
|
|
165 |
ERROR 22003: Out of range value for column 'col1' at row 1
|
|
166 |
INSERT INTO t1 VALUES (-101.55);
|
|
167 |
ERROR 22003: Out of range value for column 'col1' at row 1
|
|
168 |
INSERT INTO t1 VALUES (1010.55);
|
|
169 |
ERROR 22003: Out of range value for column 'col1' at row 1
|
|
170 |
INSERT INTO t1 VALUES (1010);
|
|
171 |
ERROR 22003: Out of range value for column 'col1' at row 1
|
|
172 |
INSERT INTO t1 VALUES ('101.55');
|
|
173 |
ERROR 22003: Out of range value for column 'col1' at row 1
|
|
174 |
INSERT INTO t1 VALUES ('101');
|
|
175 |
ERROR 22003: Out of range value for column 'col1' at row 1
|
|
176 |
INSERT INTO t1 VALUES ('-101.55');
|
|
177 |
ERROR 22003: Out of range value for column 'col1' at row 1
|
|
178 |
INSERT INTO t1 VALUES ('-1010.55');
|
|
179 |
ERROR 22003: Out of range value for column 'col1' at row 1
|
|
180 |
INSERT INTO t1 VALUES ('-100E+1');
|
|
181 |
ERROR 22003: Out of range value for column 'col1' at row 1
|
|
182 |
INSERT INTO t1 VALUES ('-100E');
|
|
183 |
ERROR HY000: Incorrect decimal value: '-100E' for column 'col1' at row 1
|
|
184 |
UPDATE t1 SET col1 =col1 * 50000 WHERE col1 =11;
|
|
970.2.5
by Padraig O'Sullivan
Added extra comments to parts of test cases that were modified for this bug |
185 |
ERROR 22003: Out of range value for column 'col1' at row 4
|
1
by brian
clean slate |
186 |
UPDATE t1 SET col1 =col1 / 0 WHERE col1 > 0;
|
187 |
ERROR 22012: Division by 0
|
|
188 |
UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0;
|
|
189 |
ERROR 22012: Division by 0
|
|
190 |
INSERT INTO t1 (col1) VALUES ('');
|
|
191 |
ERROR HY000: Incorrect decimal value: '' for column 'col1' at row 1
|
|
192 |
INSERT INTO t1 (col1) VALUES ('a59b');
|
|
193 |
ERROR HY000: Incorrect decimal value: 'a59b' for column 'col1' at row 1
|
|
194 |
INSERT INTO t1 (col1) VALUES ('1a');
|
|
195 |
ERROR HY000: Incorrect decimal value: '1a' for column 'col1' at row 1
|
|
196 |
INSERT IGNORE INTO t1 (col1) VALUES ('2a');
|
|
197 |
Warnings:
|
|
970.2.4
by Padraig O'Sullivan
Updating 1 more test result based on my fix. |
198 |
Warning 1265 Data truncated for column 'col1' at row 1
|
1
by brian
clean slate |
199 |
INSERT IGNORE INTO t1 values (1/0);
|
200 |
Warnings:
|
|
201 |
Error 1365 Division by 0
|
|
970.2.5
by Padraig O'Sullivan
Added extra comments to parts of test cases that were modified for this bug |
202 |
INSERT IGNORE INTO t1 VALUES (1000);
|
203 |
Warnings:
|
|
204 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
205 |
INSERT IGNORE INTO t1 VALUES (-1000);
|
|
206 |
Warnings:
|
|
207 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
208 |
INSERT IGNORE INTO t1 VALUES ('1000');
|
|
209 |
Warnings:
|
|
210 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
211 |
INSERT IGNORE INTO t1 VALUES ('-1000');
|
|
212 |
Warnings:
|
|
213 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
214 |
INSERT IGNORE INTO t1 VALUES (1000.0);
|
|
215 |
Warnings:
|
|
216 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
217 |
INSERT IGNORE INTO t1 VALUES (-1000.0);
|
|
218 |
Warnings:
|
|
219 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
1
by brian
clean slate |
220 |
UPDATE IGNORE t1 SET col1=1/NULL where col1=0;
|
221 |
SELECT * FROM t1;
|
|
222 |
col1
|
|
942.3.1
by Vladimir Kolesnikov
test generalizations |
223 |
-10.55
|
224 |
-10.55
|
|
971.1.17
by Monty Taylor
Merged Padraig. |
225 |
-99.99
|
226 |
-99.99
|
|
227 |
-99.99
|
|
228 |
10.00
|
|
229 |
10.00
|
|
230 |
10.55
|
|
231 |
10.55
|
|
232 |
11.00
|
|
233 |
11.00
|
|
234 |
99.99
|
|
942.3.1
by Vladimir Kolesnikov
test generalizations |
235 |
99.99
|
236 |
99.99
|
|
237 |
99.99
|
|
238 |
NULL
|
|
239 |
NULL
|
|
1
by brian
clean slate |
240 |
DROP TABLE t1;
|
241 |
CREATE TABLE t1 (col1 CHAR(5), col2 VARCHAR(6));
|
|
970.2.5
by Padraig O'Sullivan
Added extra comments to parts of test cases that were modified for this bug |
242 |
INSERT INTO t1 VALUES ('hello', 'hello');
|
243 |
INSERT INTO t1 VALUES ('he', 'he');
|
|
244 |
INSERT INTO t1 VALUES ('hello ', 'hello ');
|
|
1
by brian
clean slate |
245 |
Warnings:
|
970.2.5
by Padraig O'Sullivan
Added extra comments to parts of test cases that were modified for this bug |
246 |
Note 1265 Data truncated for column 'col1' at row 1
|
1
by brian
clean slate |
247 |
INSERT INTO t1 (col1) VALUES ('hellobob');
|
248 |
ERROR 22001: Data too long for column 'col1' at row 1
|
|
249 |
INSERT INTO t1 (col2) VALUES ('hellobob');
|
|
250 |
ERROR 22001: Data too long for column 'col2' at row 1
|
|
251 |
INSERT INTO t1 (col2) VALUES ('hello ');
|
|
252 |
Warnings:
|
|
253 |
Note 1265 Data truncated for column 'col2' at row 1
|
|
254 |
UPDATE t1 SET col1 ='hellobob' WHERE col1 ='he';
|
|
255 |
ERROR 22001: Data too long for column 'col1' at row 2
|
|
256 |
UPDATE t1 SET col2 ='hellobob' WHERE col2 ='he';
|
|
257 |
ERROR 22001: Data too long for column 'col2' at row 2
|
|
258 |
INSERT IGNORE INTO t1 VALUES ('hellobob', 'hellobob');
|
|
259 |
Warnings:
|
|
260 |
Warning 1265 Data truncated for column 'col1' at row 1
|
|
261 |
Warning 1265 Data truncated for column 'col2' at row 1
|
|
262 |
UPDATE IGNORE t1 SET col2 ='hellotrudy' WHERE col2 ='he';
|
|
263 |
Warnings:
|
|
264 |
Warning 1265 Data truncated for column 'col2' at row 2
|
|
265 |
SELECT * FROM t1;
|
|
266 |
col1 col2
|
|
942.3.1
by Vladimir Kolesnikov
test generalizations |
267 |
NULL hello
|
268 |
he hellot
|
|
1
by brian
clean slate |
269 |
hello hello
|
270 |
hello hello
|
|
271 |
hello hellob
|
|
272 |
DROP TABLE t1;
|
|
273 |
CREATE TABLE t1 (col1 enum('red','blue','green'));
|
|
970.2.5
by Padraig O'Sullivan
Added extra comments to parts of test cases that were modified for this bug |
274 |
INSERT INTO t1 VALUES ('red');
|
275 |
INSERT INTO t1 VALUES ('blue');
|
|
276 |
INSERT INTO t1 VALUES ('green');
|
|
1
by brian
clean slate |
277 |
INSERT INTO t1 (col1) VALUES ('yellow');
|
934.4.1
by Jay Pipes
Fixes ENUM field type to throw an error on bad data input. 0 is now not |
278 |
ERROR HY000: Received an invalid enum value 'yellow'.
|
1
by brian
clean slate |
279 |
INSERT INTO t1 (col1) VALUES ('redd');
|
934.4.1
by Jay Pipes
Fixes ENUM field type to throw an error on bad data input. 0 is now not |
280 |
ERROR HY000: Received an invalid enum value 'redd'.
|
1
by brian
clean slate |
281 |
INSERT INTO t1 VALUES ('');
|
934.4.1
by Jay Pipes
Fixes ENUM field type to throw an error on bad data input. 0 is now not |
282 |
ERROR HY000: Received an invalid enum value ''.
|
1
by brian
clean slate |
283 |
UPDATE t1 SET col1 ='yellow' WHERE col1 ='green';
|
934.4.1
by Jay Pipes
Fixes ENUM field type to throw an error on bad data input. 0 is now not |
284 |
ERROR HY000: Received an invalid enum value 'yellow'.
|
1
by brian
clean slate |
285 |
INSERT IGNORE INTO t1 VALUES ('yellow');
|
934.4.1
by Jay Pipes
Fixes ENUM field type to throw an error on bad data input. 0 is now not |
286 |
ERROR HY000: Received an invalid enum value 'yellow'.
|
1
by brian
clean slate |
287 |
UPDATE IGNORE t1 SET col1 ='yellow' WHERE col1 ='blue';
|
934.4.1
by Jay Pipes
Fixes ENUM field type to throw an error on bad data input. 0 is now not |
288 |
ERROR HY000: Received an invalid enum value 'yellow'.
|
1
by brian
clean slate |
289 |
SELECT * FROM t1;
|
290 |
col1
|
|
291 |
red
|
|
934.4.1
by Jay Pipes
Fixes ENUM field type to throw an error on bad data input. 0 is now not |
292 |
blue
|
1
by brian
clean slate |
293 |
green
|
294 |
DROP TABLE t1;
|
|
295 |
CREATE TABLE t1 (col1 INT NOT NULL, col2 CHAR(5) NOT NULL, col3 DATE NOT NULL);
|
|
296 |
INSERT INTO t1 VALUES (100, 'hello', '2004-08-20');
|
|
297 |
INSERT INTO t1 (col1,col2,col3) VALUES (101, 'hell2', '2004-08-21');
|
|
298 |
INSERT INTO t1 (col1,col2,col3) VALUES (NULL, '', '2004-01-01');
|
|
299 |
ERROR 23000: Column 'col1' cannot be null
|
|
300 |
INSERT INTO t1 (col1,col2,col3) VALUES (102, NULL, '2004-01-01');
|
|
301 |
ERROR 23000: Column 'col2' cannot be null
|
|
302 |
INSERT INTO t1 VALUES (103,'',NULL);
|
|
303 |
ERROR 23000: Column 'col3' cannot be null
|
|
304 |
UPDATE t1 SET col1=NULL WHERE col1 =100;
|
|
305 |
ERROR 23000: Column 'col1' cannot be null
|
|
306 |
UPDATE t1 SET col2 =NULL WHERE col2 ='hello';
|
|
307 |
ERROR 23000: Column 'col2' cannot be null
|
|
308 |
UPDATE t1 SET col2 =NULL where col3 IS NOT NULL;
|
|
309 |
ERROR 23000: Column 'col2' cannot be null
|
|
310 |
INSERT IGNORE INTO t1 values (NULL,NULL,NULL);
|
|
311 |
Warnings:
|
|
312 |
Warning 1048 Column 'col1' cannot be null
|
|
313 |
Warning 1048 Column 'col2' cannot be null
|
|
314 |
Warning 1048 Column 'col3' cannot be null
|
|
315 |
SELECT * FROM t1;
|
|
316 |
col1 col2 col3
|
|
317 |
100 hello 2004-08-20
|
|
318 |
101 hell2 2004-08-21
|
|
319 |
0 0000-00-00
|
|
320 |
DROP TABLE t1;
|
|
321 |
CREATE TABLE t1 (col1 INT NOT NULL default 99, col2 CHAR(6) NOT NULL);
|
|
322 |
SHOW CREATE TABLE t1;
|
|
323 |
Table Create Table
|
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
324 |
t1 CREATE TABLE `t1` (
|
873.2.35
by Monty Taylor
Update tests based on how Toru's latest patch changes create table statements. |
325 |
`col1` int NOT NULL DEFAULT '99',
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
326 |
`col2` varchar(6) NOT NULL
|
942.3.1
by Vladimir Kolesnikov
test generalizations |
327 |
) ENGINE=DEFAULT
|
1
by brian
clean slate |
328 |
INSERT INTO t1 VALUES (1, 'hello');
|
329 |
INSERT INTO t1 (col2) VALUES ('hello2');
|
|
330 |
INSERT INTO t1 (col2) VALUES (NULL);
|
|
331 |
ERROR 23000: Column 'col2' cannot be null
|
|
332 |
INSERT INTO t1 (col1) VALUES (2);
|
|
333 |
ERROR HY000: Field 'col2' doesn't have a default value
|
|
334 |
INSERT INTO t1 VALUES(default(col1),default(col2));
|
|
335 |
ERROR HY000: Field 'col2' doesn't have a default value
|
|
336 |
INSERT INTO t1 (col1) SELECT 1;
|
|
337 |
ERROR HY000: Field 'col2' doesn't have a default value
|
|
338 |
INSERT INTO t1 SELECT 1,NULL;
|
|
339 |
ERROR 23000: Column 'col2' cannot be null
|
|
340 |
INSERT IGNORE INTO t1 values (NULL,NULL);
|
|
341 |
Warnings:
|
|
342 |
Warning 1048 Column 'col1' cannot be null
|
|
343 |
Warning 1048 Column 'col2' cannot be null
|
|
344 |
INSERT IGNORE INTO t1 (col1) values (3);
|
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
345 |
ERROR HY000: Field 'col2' doesn't have a default value
|
1
by brian
clean slate |
346 |
INSERT IGNORE INTO t1 () values ();
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
347 |
ERROR HY000: Field 'col2' doesn't have a default value
|
1
by brian
clean slate |
348 |
SELECT * FROM t1;
|
349 |
col1 col2
|
|
350 |
1 hello
|
|
351 |
99 hello2
|
|
352 |
0
|
|
353 |
DROP TABLE t1;
|
|
354 |
create table t1 (charcol char(255), varcharcol varchar(255),
|
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
355 |
varbinarycol varbinary(255));
|
1
by brian
clean slate |
356 |
insert into t1 (charcol) values (repeat('x',256));
|
357 |
ERROR 22001: Data too long for column 'charcol' at row 1
|
|
358 |
insert into t1 (varcharcol) values (repeat('x',256));
|
|
359 |
ERROR 22001: Data too long for column 'varcharcol' at row 1
|
|
360 |
insert into t1 (varbinarycol) values (repeat('x',256));
|
|
361 |
ERROR 22001: Data too long for column 'varbinarycol' at row 1
|
|
362 |
select * from t1;
|
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
363 |
charcol varcharcol varbinarycol
|
1
by brian
clean slate |
364 |
drop table t1;
|
365 |
create table t1 (col1 char(3), col2 integer);
|
|
366 |
insert into t1 (col1) values (cast(1000 as char(3)));
|
|
367 |
ERROR 22007: Truncated incorrect CHAR(3) value: '1000'
|
|
368 |
insert into t1 (col1) values (cast(1000E+0 as char(3)));
|
|
369 |
ERROR 22007: Truncated incorrect CHAR(3) value: '1000'
|
|
370 |
insert into t1 (col1) values (cast(1000.0 as char(3)));
|
|
371 |
ERROR 22007: Truncated incorrect CHAR(3) value: '1000.0'
|
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
372 |
insert into t1 (col2) values (cast('abc' as DECIMAL));
|
373 |
ERROR 22007: Truncated incorrect DECIMAL value: 'abc'
|
|
1
by brian
clean slate |
374 |
insert into t1 (col2) values (10E+0 + 'a');
|
375 |
ERROR 22007: Truncated incorrect DOUBLE value: 'a'
|
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
376 |
insert into t1 (col2) values ('10a');
|
377 |
ERROR 01000: Data truncated for column 'col2' at row 1
|
|
378 |
insert into t1 (col2) values (cast('10a' as DECIMAL));
|
|
379 |
insert into t1 (col2) values (cast('10' as DECIMAL));
|
|
380 |
insert into t1 (col2) values (cast('10' as DECIMAL));
|
|
1
by brian
clean slate |
381 |
insert into t1 (col2) values (10E+0 + '0 ');
|
382 |
select * from t1;
|
|
383 |
col1 col2
|
|
384 |
NULL 10
|
|
385 |
NULL 10
|
|
386 |
NULL 10
|
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
387 |
NULL 10
|
388 |
drop table t1;
|
|
389 |
CREATE TABLE t1 (i int not null);
|
|
390 |
INSERT INTO t1 VALUES ();
|
|
391 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
392 |
INSERT INTO t1 VALUES (DEFAULT);
|
|
393 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
394 |
INSERT INTO t1 VALUES (DEFAULT(i));
|
|
395 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
396 |
ALTER TABLE t1 ADD j int;
|
|
397 |
INSERT INTO t1 SET j = 1;
|
|
398 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
399 |
INSERT INTO t1 SET j = 1, i = DEFAULT;
|
|
400 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
401 |
INSERT INTO t1 SET j = 1, i = DEFAULT(i);
|
|
402 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
403 |
INSERT INTO t1 VALUES (DEFAULT,1);
|
|
404 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
405 |
DROP TABLE t1;
|
|
406 |
CREATE TABLE t1 (i int not null);
|
|
407 |
INSERT INTO t1 VALUES ();
|
|
408 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
409 |
INSERT INTO t1 VALUES (DEFAULT);
|
|
410 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
411 |
INSERT INTO t1 VALUES (DEFAULT(i));
|
|
412 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
413 |
ALTER TABLE t1 ADD j int;
|
|
414 |
INSERT INTO t1 SET j = 1;
|
|
415 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
416 |
INSERT INTO t1 SET j = 1, i = DEFAULT;
|
|
417 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
418 |
INSERT INTO t1 SET j = 1, i = DEFAULT(i);
|
|
419 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
420 |
INSERT INTO t1 VALUES (DEFAULT,1);
|
|
421 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
422 |
DROP TABLE t1;
|
|
1
by brian
clean slate |
423 |
create table t1(a varchar(65537));
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
424 |
ERROR 42000: Column length too big for column 'a' (max = 16383); use BLOB or TEXT instead
|
1
by brian
clean slate |
425 |
create table t1(a varbinary(65537));
|
426 |
ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead
|
|
427 |
create table t1(a int, b date not null);
|
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
428 |
alter table t1 modify a bigint not null;
|
1
by brian
clean slate |
429 |
show create table t1;
|
430 |
Table Create Table
|
|
431 |
t1 CREATE TABLE `t1` (
|
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
432 |
`a` bigint NOT NULL,
|
1
by brian
clean slate |
433 |
`b` date NOT NULL
|
942.3.1
by Vladimir Kolesnikov
test generalizations |
434 |
) ENGINE=DEFAULT
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
435 |
drop table t1;
|
1
by brian
clean slate |
436 |
create table t1(a int, b timestamp);
|
437 |
alter table t1 add primary key(a);
|
|
438 |
show create table t1;
|
|
439 |
Table Create Table
|
|
440 |
t1 CREATE TABLE `t1` (
|
|
896.3.6
by Stewart Smith
Read Fields out of proto instead of FRM. |
441 |
`a` int NOT NULL,
|
907.1.5
by Jay Pipes
Fixed remaining test cases. TIMESTAMP with no default is NULL, DEFAULT NULL, not auto-set |
442 |
`b` timestamp NULL DEFAULT NULL,
|
1
by brian
clean slate |
443 |
PRIMARY KEY (`a`)
|
942.3.1
by Vladimir Kolesnikov
test generalizations |
444 |
) ENGINE=DEFAULT
|
1
by brian
clean slate |
445 |
drop table t1;
|
446 |
create table t1(a int, b timestamp default 20050102030405);
|
|
447 |
alter table t1 add primary key(a);
|
|
448 |
show create table t1;
|
|
449 |
Table Create Table
|
|
450 |
t1 CREATE TABLE `t1` (
|
|
896.3.6
by Stewart Smith
Read Fields out of proto instead of FRM. |
451 |
`a` int NOT NULL,
|
907.1.5
by Jay Pipes
Fixed remaining test cases. TIMESTAMP with no default is NULL, DEFAULT NULL, not auto-set |
452 |
`b` timestamp NULL DEFAULT '2005-01-02 03:04:05',
|
1
by brian
clean slate |
453 |
PRIMARY KEY (`a`)
|
942.3.1
by Vladimir Kolesnikov
test generalizations |
454 |
) ENGINE=DEFAULT
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
455 |
drop table t1;
|
1
by brian
clean slate |
456 |
create table t1 (date date not null);
|
457 |
create table t2 select date from t1;
|
|
458 |
show create table t2;
|
|
459 |
Table Create Table
|
|
460 |
t2 CREATE TABLE `t2` (
|
|
461 |
`date` date NOT NULL
|
|
942.3.1
by Vladimir Kolesnikov
test generalizations |
462 |
) ENGINE=DEFAULT
|
1
by brian
clean slate |
463 |
drop table t2,t1;
|
464 |
create table t1 (i int)
|
|
465 |
comment '123456789*123456789*123456789*123456789*123456789*123456789*';
|
|
466 |
show create table t1;
|
|
467 |
Table Create Table
|
|
468 |
t1 CREATE TABLE `t1` (
|
|
873.2.35
by Monty Taylor
Update tests based on how Toru's latest patch changes create table statements. |
469 |
`i` int DEFAULT NULL
|
942.3.1
by Vladimir Kolesnikov
test generalizations |
470 |
) ENGINE=DEFAULT COMMENT='123456789*123456789*123456789*123456789*123456789*123456789*'
|
1
by brian
clean slate |
471 |
drop table t1;
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
472 |
create table t1(col1 int, col2 int,
|
473 |
col3 int, col4 int,
|
|
474 |
col7 int, col8 int,
|
|
475 |
col9 bigint, col10 bigint);
|
|
1
by brian
clean slate |
476 |
insert into t1(col1) values('-');
|
477 |
ERROR HY000: Incorrect integer value: '-' for column 'col1' at row 1
|
|
478 |
insert into t1(col2) values('+');
|
|
479 |
ERROR HY000: Incorrect integer value: '+' for column 'col2' at row 1
|
|
480 |
insert into t1(col3) values('-');
|
|
481 |
ERROR HY000: Incorrect integer value: '-' for column 'col3' at row 1
|
|
482 |
insert into t1(col4) values('+');
|
|
483 |
ERROR HY000: Incorrect integer value: '+' for column 'col4' at row 1
|
|
484 |
insert into t1(col7) values('-');
|
|
485 |
ERROR HY000: Incorrect integer value: '-' for column 'col7' at row 1
|
|
486 |
insert into t1(col8) values('+');
|
|
487 |
ERROR HY000: Incorrect integer value: '+' for column 'col8' at row 1
|
|
488 |
insert into t1(col9) values('-');
|
|
489 |
ERROR HY000: Incorrect integer value: '-' for column 'col9' at row 1
|
|
490 |
insert into t1(col10) values('+');
|
|
491 |
ERROR HY000: Incorrect integer value: '+' for column 'col10' at row 1
|
|
492 |
drop table t1;
|
|
493 |
create table t1 (f1 enum('a','a'));
|
|
494 |
ERROR HY000: Column 'f1' has duplicated value 'a' in ENUM
|
|
495 |
End of 5.0 tests
|