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);
|
1812.4.2
by Brian Aker
Fix issue with divide by zero not being an error. |
38 |
ERROR 22012: Division by 0
|
970.2.5
by Padraig O'Sullivan
Added extra comments to parts of test cases that were modified for this bug |
39 |
INSERT IGNORE INTO t1 values (-2147483649);
|
40 |
Warnings:
|
|
41 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
42 |
INSERT IGNORE INTO t1 values (2147643648);
|
|
43 |
Warnings:
|
|
44 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
45 |
INSERT IGNORE INTO t1 values ('-2147483649');
|
|
46 |
Warnings:
|
|
47 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
48 |
INSERT IGNORE INTO t1 values ('2147643648');
|
|
49 |
Warnings:
|
|
50 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
51 |
INSERT IGNORE INTO t1 values (-2147483649.0);
|
|
52 |
Warnings:
|
|
53 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
54 |
INSERT IGNORE INTO t1 values (2147643648.0);
|
|
55 |
Warnings:
|
|
56 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
1
by brian
clean slate |
57 |
SELECT * FROM t1;
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
58 |
col1
|
59 |
-2147483648
|
|
60 |
0
|
|
61 |
2147483647
|
|
62 |
-2147483648
|
|
63 |
2147483647
|
|
64 |
-2147483648
|
|
65 |
2147483647
|
|
66 |
2
|
|
67 |
-2147483648
|
|
68 |
2147483647
|
|
69 |
-2147483648
|
|
70 |
2147483647
|
|
71 |
-2147483648
|
|
72 |
2147483647
|
|
1
by brian
clean slate |
73 |
DROP TABLE t1;
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
74 |
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 |
75 |
INSERT INTO t1 VALUES (-9223372036854775808);
|
76 |
INSERT INTO t1 VALUES (0);
|
|
77 |
INSERT INTO t1 VALUES (9223372036854775807);
|
|
78 |
INSERT INTO t1 VALUES ('-9223372036854775808');
|
|
79 |
INSERT INTO t1 VALUES ('9223372036854775807');
|
|
80 |
INSERT INTO t1 VALUES (-9223372036854774000.0);
|
|
81 |
INSERT INTO t1 VALUES (9223372036854775700.0);
|
|
1
by brian
clean slate |
82 |
INSERT INTO t1 (col1) VALUES(-9223372036854775809);
|
83 |
ERROR 22003: Out of range value for column 'col1' at row 1
|
|
2040.5.1
by kalebral at gmail
enable test as bug 316221 is now resolved |
84 |
INSERT INTO t1 (col1) VALUES(9223372036854775808);
|
85 |
ERROR 22003: Out of range value for column 'col1' at row 1
|
|
1
by brian
clean slate |
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);
|
1812.4.2
by Brian Aker
Fix issue with divide by zero not being an error. |
108 |
ERROR 22012: Division by 0
|
970.2.5
by Padraig O'Sullivan
Added extra comments to parts of test cases that were modified for this bug |
109 |
INSERT IGNORE INTO t1 VALUES (-9223372036854775809);
|
110 |
Warnings:
|
|
111 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
112 |
INSERT IGNORE INTO t1 VALUES (9223372036854775808);
|
|
2008.2.4
by Brian Aker
Merge in additional fixes for sign, plus alter table, plus TIME on |
113 |
Warnings:
|
114 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
970.2.5
by Padraig O'Sullivan
Added extra comments to parts of test cases that were modified for this bug |
115 |
INSERT IGNORE INTO t1 VALUES ('-9223372036854775809');
|
116 |
Warnings:
|
|
117 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
118 |
INSERT IGNORE INTO t1 VALUES ('9223372036854775808');
|
|
119 |
Warnings:
|
|
120 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
121 |
INSERT IGNORE INTO t1 VALUES (-9223372036854785809.0);
|
|
122 |
Warnings:
|
|
123 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
124 |
INSERT IGNORE INTO t1 VALUES (9223372036854785808.0);
|
|
125 |
Warnings:
|
|
126 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
1
by brian
clean slate |
127 |
SELECT * FROM t1;
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
128 |
col1
|
129 |
-9223372036854775808
|
|
130 |
0
|
|
131 |
9223372036854775807
|
|
132 |
-9223372036854775808
|
|
133 |
9223372036854775807
|
|
134 |
-9223372036854774000
|
|
135 |
9223372036854775700
|
|
136 |
2
|
|
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);
|
1812.4.2
by Brian Aker
Fix issue with divide by zero not being an error. |
200 |
ERROR 22012: Division by 0
|
970.2.5
by Padraig O'Sullivan
Added extra comments to parts of test cases that were modified for this bug |
201 |
INSERT IGNORE INTO t1 VALUES (1000);
|
202 |
Warnings:
|
|
203 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
204 |
INSERT IGNORE INTO t1 VALUES (-1000);
|
|
205 |
Warnings:
|
|
206 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
207 |
INSERT IGNORE INTO t1 VALUES ('1000');
|
|
208 |
Warnings:
|
|
209 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
210 |
INSERT IGNORE INTO t1 VALUES ('-1000');
|
|
211 |
Warnings:
|
|
212 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
213 |
INSERT IGNORE INTO t1 VALUES (1000.0);
|
|
214 |
Warnings:
|
|
215 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
216 |
INSERT IGNORE INTO t1 VALUES (-1000.0);
|
|
217 |
Warnings:
|
|
218 |
Warning 1264 Out of range value for column 'col1' at row 1
|
|
1
by brian
clean slate |
219 |
UPDATE IGNORE t1 SET col1=1/NULL where col1=0;
|
220 |
SELECT * FROM t1;
|
|
221 |
col1
|
|
942.3.1
by Vladimir Kolesnikov
test generalizations |
222 |
-10.55
|
223 |
-10.55
|
|
971.1.17
by Monty Taylor
Merged Padraig. |
224 |
-99.99
|
225 |
-99.99
|
|
226 |
-99.99
|
|
227 |
10.00
|
|
228 |
10.00
|
|
229 |
10.55
|
|
230 |
10.55
|
|
231 |
11.00
|
|
232 |
11.00
|
|
233 |
99.99
|
|
942.3.1
by Vladimir Kolesnikov
test generalizations |
234 |
99.99
|
235 |
99.99
|
|
236 |
99.99
|
|
237 |
NULL
|
|
1
by brian
clean slate |
238 |
DROP TABLE t1;
|
239 |
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 |
240 |
INSERT INTO t1 VALUES ('hello', 'hello');
|
241 |
INSERT INTO t1 VALUES ('he', 'he');
|
|
242 |
INSERT INTO t1 VALUES ('hello ', 'hello ');
|
|
1637
by Brian Aker
Merge in changes to call error on bad data input. |
243 |
ERROR 22001: Data too long for column 'col1' at row 1
|
1
by brian
clean slate |
244 |
INSERT INTO t1 (col1) VALUES ('hellobob');
|
245 |
ERROR 22001: Data too long for column 'col1' at row 1
|
|
246 |
INSERT INTO t1 (col2) VALUES ('hellobob');
|
|
247 |
ERROR 22001: Data too long for column 'col2' at row 1
|
|
248 |
INSERT INTO t1 (col2) VALUES ('hello ');
|
|
1637
by Brian Aker
Merge in changes to call error on bad data input. |
249 |
ERROR 22001: Data too long for column 'col2' at row 1
|
1
by brian
clean slate |
250 |
UPDATE t1 SET col1 ='hellobob' WHERE col1 ='he';
|
251 |
ERROR 22001: Data too long for column 'col1' at row 2
|
|
252 |
UPDATE t1 SET col2 ='hellobob' WHERE col2 ='he';
|
|
253 |
ERROR 22001: Data too long for column 'col2' at row 2
|
|
254 |
INSERT IGNORE INTO t1 VALUES ('hellobob', 'hellobob');
|
|
255 |
Warnings:
|
|
1637
by Brian Aker
Merge in changes to call error on bad data input. |
256 |
Error 1406 Data too long for column 'col1' at row 1
|
257 |
Error 1406 Data too long for column 'col2' at row 1
|
|
1
by brian
clean slate |
258 |
UPDATE IGNORE t1 SET col2 ='hellotrudy' WHERE col2 ='he';
|
259 |
Warnings:
|
|
1637
by Brian Aker
Merge in changes to call error on bad data input. |
260 |
Error 1406 Data too long for column 'col2' at row 2
|
1
by brian
clean slate |
261 |
SELECT * FROM t1;
|
262 |
col1 col2
|
|
942.3.1
by Vladimir Kolesnikov
test generalizations |
263 |
he hellot
|
1
by brian
clean slate |
264 |
hello hello
|
265 |
hello hellob
|
|
266 |
DROP TABLE t1;
|
|
267 |
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 |
268 |
INSERT INTO t1 VALUES ('red');
|
269 |
INSERT INTO t1 VALUES ('blue');
|
|
270 |
INSERT INTO t1 VALUES ('green');
|
|
1
by brian
clean slate |
271 |
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 |
272 |
ERROR HY000: Received an invalid enum value 'yellow'.
|
1
by brian
clean slate |
273 |
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 |
274 |
ERROR HY000: Received an invalid enum value 'redd'.
|
1
by brian
clean slate |
275 |
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 |
276 |
ERROR HY000: Received an invalid enum value ''.
|
1
by brian
clean slate |
277 |
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 |
278 |
ERROR HY000: Received an invalid enum value 'yellow'.
|
1
by brian
clean slate |
279 |
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 |
280 |
ERROR HY000: Received an invalid enum value 'yellow'.
|
1
by brian
clean slate |
281 |
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 |
282 |
ERROR HY000: Received an invalid enum value 'yellow'.
|
1
by brian
clean slate |
283 |
SELECT * FROM t1;
|
284 |
col1
|
|
285 |
red
|
|
934.4.1
by Jay Pipes
Fixes ENUM field type to throw an error on bad data input. 0 is now not |
286 |
blue
|
1
by brian
clean slate |
287 |
green
|
288 |
DROP TABLE t1;
|
|
289 |
CREATE TABLE t1 (col1 INT NOT NULL, col2 CHAR(5) NOT NULL, col3 DATE NOT NULL);
|
|
290 |
INSERT INTO t1 VALUES (100, 'hello', '2004-08-20');
|
|
291 |
INSERT INTO t1 (col1,col2,col3) VALUES (101, 'hell2', '2004-08-21');
|
|
292 |
INSERT INTO t1 (col1,col2,col3) VALUES (NULL, '', '2004-01-01');
|
|
293 |
ERROR 23000: Column 'col1' cannot be null
|
|
294 |
INSERT INTO t1 (col1,col2,col3) VALUES (102, NULL, '2004-01-01');
|
|
295 |
ERROR 23000: Column 'col2' cannot be null
|
|
296 |
INSERT INTO t1 VALUES (103,'',NULL);
|
|
297 |
ERROR 23000: Column 'col3' cannot be null
|
|
298 |
UPDATE t1 SET col1=NULL WHERE col1 =100;
|
|
299 |
ERROR 23000: Column 'col1' cannot be null
|
|
300 |
UPDATE t1 SET col2 =NULL WHERE col2 ='hello';
|
|
301 |
ERROR 23000: Column 'col2' cannot be null
|
|
302 |
UPDATE t1 SET col2 =NULL where col3 IS NOT NULL;
|
|
303 |
ERROR 23000: Column 'col2' cannot be null
|
|
304 |
INSERT IGNORE INTO t1 values (NULL,NULL,NULL);
|
|
305 |
Warnings:
|
|
306 |
Warning 1048 Column 'col1' cannot be null
|
|
307 |
Warning 1048 Column 'col2' cannot be null
|
|
308 |
Warning 1048 Column 'col3' cannot be null
|
|
309 |
SELECT * FROM t1;
|
|
310 |
col1 col2 col3
|
|
311 |
100 hello 2004-08-20
|
|
312 |
101 hell2 2004-08-21
|
|
313 |
0 0000-00-00
|
|
314 |
DROP TABLE t1;
|
|
315 |
CREATE TABLE t1 (col1 INT NOT NULL default 99, col2 CHAR(6) NOT NULL);
|
|
316 |
SHOW CREATE TABLE t1;
|
|
317 |
Table Create Table
|
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
318 |
t1 CREATE TABLE `t1` (
|
1743.5.2
by LinuxJedi
Alter many test cases for the new SHOW CREATE TABLE output |
319 |
`col1` INT NOT NULL DEFAULT '99',
|
320 |
`col2` VARCHAR(6) COLLATE utf8_general_ci NOT NULL
|
|
1638.10.88
by Stewart Smith
fix SHOW CREATE TABLE tests for explicit COLLATE in CREATE TABLE |
321 |
) ENGINE=DEFAULT COLLATE = utf8_general_ci
|
1
by brian
clean slate |
322 |
INSERT INTO t1 VALUES (1, 'hello');
|
323 |
INSERT INTO t1 (col2) VALUES ('hello2');
|
|
324 |
INSERT INTO t1 (col2) VALUES (NULL);
|
|
325 |
ERROR 23000: Column 'col2' cannot be null
|
|
326 |
INSERT INTO t1 (col1) VALUES (2);
|
|
327 |
ERROR HY000: Field 'col2' doesn't have a default value
|
|
328 |
INSERT INTO t1 VALUES(default(col1),default(col2));
|
|
329 |
ERROR HY000: Field 'col2' doesn't have a default value
|
|
330 |
INSERT INTO t1 (col1) SELECT 1;
|
|
331 |
ERROR HY000: Field 'col2' doesn't have a default value
|
|
332 |
INSERT INTO t1 SELECT 1,NULL;
|
|
333 |
ERROR 23000: Column 'col2' cannot be null
|
|
334 |
INSERT IGNORE INTO t1 values (NULL,NULL);
|
|
335 |
Warnings:
|
|
336 |
Warning 1048 Column 'col1' cannot be null
|
|
337 |
Warning 1048 Column 'col2' cannot be null
|
|
338 |
INSERT IGNORE INTO t1 (col1) values (3);
|
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
339 |
ERROR HY000: Field 'col2' doesn't have a default value
|
1
by brian
clean slate |
340 |
INSERT IGNORE INTO t1 () values ();
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
341 |
ERROR HY000: Field 'col2' doesn't have a default value
|
1
by brian
clean slate |
342 |
SELECT * FROM t1;
|
343 |
col1 col2
|
|
344 |
1 hello
|
|
345 |
99 hello2
|
|
346 |
0
|
|
347 |
DROP TABLE t1;
|
|
348 |
create table t1 (charcol char(255), varcharcol varchar(255),
|
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
349 |
varbinarycol varbinary(255));
|
1
by brian
clean slate |
350 |
insert into t1 (charcol) values (repeat('x',256));
|
351 |
ERROR 22001: Data too long for column 'charcol' at row 1
|
|
352 |
insert into t1 (varcharcol) values (repeat('x',256));
|
|
353 |
ERROR 22001: Data too long for column 'varcharcol' at row 1
|
|
354 |
insert into t1 (varbinarycol) values (repeat('x',256));
|
|
355 |
ERROR 22001: Data too long for column 'varbinarycol' at row 1
|
|
356 |
select * from t1;
|
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
357 |
charcol varcharcol varbinarycol
|
1
by brian
clean slate |
358 |
drop table t1;
|
359 |
create table t1 (col1 char(3), col2 integer);
|
|
360 |
insert into t1 (col1) values (cast(1000 as char(3)));
|
|
361 |
ERROR 22007: Truncated incorrect CHAR(3) value: '1000'
|
|
362 |
insert into t1 (col1) values (cast(1000E+0 as char(3)));
|
|
363 |
ERROR 22007: Truncated incorrect CHAR(3) value: '1000'
|
|
364 |
insert into t1 (col1) values (cast(1000.0 as char(3)));
|
|
365 |
ERROR 22007: Truncated incorrect CHAR(3) value: '1000.0'
|
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
366 |
insert into t1 (col2) values (cast('abc' as DECIMAL));
|
367 |
ERROR 22007: Truncated incorrect DECIMAL value: 'abc'
|
|
1
by brian
clean slate |
368 |
insert into t1 (col2) values (10E+0 + 'a');
|
369 |
ERROR 22007: Truncated incorrect DOUBLE value: 'a'
|
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
370 |
insert into t1 (col2) values ('10a');
|
371 |
ERROR 01000: Data truncated for column 'col2' at row 1
|
|
372 |
insert into t1 (col2) values (cast('10a' as DECIMAL));
|
|
373 |
insert into t1 (col2) values (cast('10' as DECIMAL));
|
|
374 |
insert into t1 (col2) values (cast('10' as DECIMAL));
|
|
1
by brian
clean slate |
375 |
insert into t1 (col2) values (10E+0 + '0 ');
|
376 |
select * from t1;
|
|
377 |
col1 col2
|
|
378 |
NULL 10
|
|
379 |
NULL 10
|
|
380 |
NULL 10
|
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
381 |
NULL 10
|
382 |
drop table t1;
|
|
383 |
CREATE TABLE t1 (i int not null);
|
|
384 |
INSERT INTO t1 VALUES ();
|
|
385 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
386 |
INSERT INTO t1 VALUES (DEFAULT);
|
|
387 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
388 |
INSERT INTO t1 VALUES (DEFAULT(i));
|
|
389 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
390 |
ALTER TABLE t1 ADD j int;
|
|
391 |
INSERT INTO t1 SET j = 1;
|
|
392 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
393 |
INSERT INTO t1 SET j = 1, i = DEFAULT;
|
|
394 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
395 |
INSERT INTO t1 SET j = 1, i = DEFAULT(i);
|
|
396 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
397 |
INSERT INTO t1 VALUES (DEFAULT,1);
|
|
398 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
399 |
DROP TABLE t1;
|
|
400 |
CREATE TABLE t1 (i int not null);
|
|
401 |
INSERT INTO t1 VALUES ();
|
|
402 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
403 |
INSERT INTO t1 VALUES (DEFAULT);
|
|
404 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
405 |
INSERT INTO t1 VALUES (DEFAULT(i));
|
|
406 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
407 |
ALTER TABLE t1 ADD j int;
|
|
408 |
INSERT INTO t1 SET j = 1;
|
|
409 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
410 |
INSERT INTO t1 SET j = 1, i = DEFAULT;
|
|
411 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
412 |
INSERT INTO t1 SET j = 1, i = DEFAULT(i);
|
|
413 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
414 |
INSERT INTO t1 VALUES (DEFAULT,1);
|
|
415 |
ERROR HY000: Field 'i' doesn't have a default value
|
|
416 |
DROP TABLE t1;
|
|
1
by brian
clean slate |
417 |
create table t1(a varchar(65537));
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
418 |
ERROR 42000: Column length too big for column 'a' (max = 16383); use BLOB or TEXT instead
|
1
by brian
clean slate |
419 |
create table t1(a varbinary(65537));
|
420 |
ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead
|
|
421 |
create table t1(a int, b date not null);
|
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
422 |
alter table t1 modify a bigint not null;
|
1
by brian
clean slate |
423 |
show create table t1;
|
424 |
Table Create Table
|
|
425 |
t1 CREATE TABLE `t1` (
|
|
1743.5.2
by LinuxJedi
Alter many test cases for the new SHOW CREATE TABLE output |
426 |
`a` BIGINT NOT NULL,
|
427 |
`b` DATE NOT NULL
|
|
1638.10.88
by Stewart Smith
fix SHOW CREATE TABLE tests for explicit COLLATE in CREATE TABLE |
428 |
) ENGINE=DEFAULT COLLATE = utf8_general_ci
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
429 |
drop table t1;
|
1
by brian
clean slate |
430 |
create table t1(a int, b timestamp);
|
431 |
alter table t1 add primary key(a);
|
|
432 |
show create table t1;
|
|
433 |
Table Create Table
|
|
434 |
t1 CREATE TABLE `t1` (
|
|
1743.5.2
by LinuxJedi
Alter many test cases for the new SHOW CREATE TABLE output |
435 |
`a` INT NOT NULL,
|
436 |
`b` TIMESTAMP NULL DEFAULT NULL,
|
|
1
by brian
clean slate |
437 |
PRIMARY KEY (`a`)
|
1638.10.88
by Stewart Smith
fix SHOW CREATE TABLE tests for explicit COLLATE in CREATE TABLE |
438 |
) ENGINE=DEFAULT COLLATE = utf8_general_ci
|
1
by brian
clean slate |
439 |
drop table t1;
|
440 |
create table t1(a int, b timestamp default 20050102030405);
|
|
441 |
alter table t1 add primary key(a);
|
|
442 |
show create table t1;
|
|
443 |
Table Create Table
|
|
444 |
t1 CREATE TABLE `t1` (
|
|
1743.5.2
by LinuxJedi
Alter many test cases for the new SHOW CREATE TABLE output |
445 |
`a` INT NOT NULL,
|
446 |
`b` TIMESTAMP NULL DEFAULT '2005-01-02 03:04:05',
|
|
1
by brian
clean slate |
447 |
PRIMARY KEY (`a`)
|
1638.10.88
by Stewart Smith
fix SHOW CREATE TABLE tests for explicit COLLATE in CREATE TABLE |
448 |
) ENGINE=DEFAULT COLLATE = utf8_general_ci
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
449 |
drop table t1;
|
1
by brian
clean slate |
450 |
create table t1 (date date not null);
|
451 |
create table t2 select date from t1;
|
|
452 |
show create table t2;
|
|
453 |
Table Create Table
|
|
454 |
t2 CREATE TABLE `t2` (
|
|
1743.5.2
by LinuxJedi
Alter many test cases for the new SHOW CREATE TABLE output |
455 |
`date` DATE NOT NULL
|
1638.10.88
by Stewart Smith
fix SHOW CREATE TABLE tests for explicit COLLATE in CREATE TABLE |
456 |
) ENGINE=DEFAULT COLLATE = utf8_general_ci
|
1
by brian
clean slate |
457 |
drop table t2,t1;
|
458 |
create table t1 (i int)
|
|
1245.3.4
by Stewart Smith
make the equals of KEY=VALUE required for CREATE TABLE options |
459 |
comment='123456789*123456789*123456789*123456789*123456789*123456789*';
|
1
by brian
clean slate |
460 |
show create table t1;
|
461 |
Table Create Table
|
|
462 |
t1 CREATE TABLE `t1` (
|
|
1743.5.2
by LinuxJedi
Alter many test cases for the new SHOW CREATE TABLE output |
463 |
`i` INT DEFAULT NULL
|
1638.10.88
by Stewart Smith
fix SHOW CREATE TABLE tests for explicit COLLATE in CREATE TABLE |
464 |
) ENGINE=DEFAULT COMMENT='123456789*123456789*123456789*123456789*123456789*123456789*' COLLATE = utf8_general_ci
|
1
by brian
clean slate |
465 |
drop table t1;
|
784.2.1
by Stewart Smith
fix strict test for drizzle. |
466 |
create table t1(col1 int, col2 int,
|
467 |
col3 int, col4 int,
|
|
468 |
col7 int, col8 int,
|
|
469 |
col9 bigint, col10 bigint);
|
|
1
by brian
clean slate |
470 |
insert into t1(col1) values('-');
|
471 |
ERROR HY000: Incorrect integer value: '-' for column 'col1' at row 1
|
|
472 |
insert into t1(col2) values('+');
|
|
473 |
ERROR HY000: Incorrect integer value: '+' for column 'col2' at row 1
|
|
474 |
insert into t1(col3) values('-');
|
|
475 |
ERROR HY000: Incorrect integer value: '-' for column 'col3' at row 1
|
|
476 |
insert into t1(col4) values('+');
|
|
477 |
ERROR HY000: Incorrect integer value: '+' for column 'col4' at row 1
|
|
478 |
insert into t1(col7) values('-');
|
|
479 |
ERROR HY000: Incorrect integer value: '-' for column 'col7' at row 1
|
|
480 |
insert into t1(col8) values('+');
|
|
481 |
ERROR HY000: Incorrect integer value: '+' for column 'col8' at row 1
|
|
482 |
insert into t1(col9) values('-');
|
|
483 |
ERROR HY000: Incorrect integer value: '-' for column 'col9' at row 1
|
|
484 |
insert into t1(col10) values('+');
|
|
485 |
ERROR HY000: Incorrect integer value: '+' for column 'col10' at row 1
|
|
486 |
drop table t1;
|
|
487 |
create table t1 (f1 enum('a','a'));
|
|
488 |
ERROR HY000: Column 'f1' has duplicated value 'a' in ENUM
|
|
489 |
End of 5.0 tests
|