~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/strict.result

  • Committer: Padraig O'Sullivan
  • Date: 2009-04-02 23:58:14 UTC
  • mto: (971.1.17 mordred)
  • mto: This revision was merged to the branch mainline in revision 978.
  • Revision ID: osullivan.padraig@gmail.com-20090402235814-vdor0xv109qjr5j0
Added extra comments to parts of test cases that were modified for this bug
fix based on Jay's review comments. Also split multi-value INSERT statements
into single INSERT statements.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
DROP TABLE IF EXISTS t1;
2
2
CREATE TABLE t1 (col1 INT);
3
 
INSERT INTO t1 VALUES(-2147483648),(0),(2147483647),('-2147483648'),('2147483647'),(-2147483648.0),(2147483647.0);
 
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);
4
10
INSERT INTO t1 (col1) VALUES(-2147483649);
5
11
ERROR 22003: Out of range value for column 'col1' at row 1
6
12
INSERT INTO t1 (col1) VALUES(2147643648);
31
37
INSERT IGNORE INTO t1 values (1/0);
32
38
Warnings:
33
39
Error   1365    Division by 0
34
 
INSERT IGNORE INTO t1 values (-2147483649),(2147643648);
35
 
Warnings:
36
 
Warning 1264    Out of range value for column 'col1' at row 1
37
 
Warning 1264    Out of range value for column 'col1' at row 2
38
 
INSERT IGNORE INTO t1 values ('-2147483649'),('2147643648');
39
 
Warnings:
40
 
Warning 1264    Out of range value for column 'col1' at row 1
41
 
Warning 1264    Out of range value for column 'col1' at row 2
42
 
INSERT IGNORE INTO t1 values (-2147483649.0),(2147643648.0);
43
 
Warnings:
44
 
Warning 1264    Out of range value for column 'col1' at row 1
45
 
Warning 1264    Out of range value for column 'col1' at row 2
 
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
46
58
SELECT * FROM t1;
47
59
col1
48
60
-2147483648
62
74
2147483647
63
75
DROP TABLE t1;
64
76
CREATE TABLE t1 (col1 BIGINT);
65
 
INSERT INTO t1 VALUES(-9223372036854775808),(0),(9223372036854775807);
66
 
INSERT INTO t1 VALUES('-9223372036854775808'),('9223372036854775807');
67
 
INSERT INTO t1 VALUES(-9223372036854774000.0),(9223372036854775700.0);
 
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);
68
84
INSERT INTO t1 (col1) VALUES(-9223372036854775809);
69
85
ERROR 22003: Out of range value for column 'col1' at row 1
70
86
INSERT INTO t1 (col1) VALUES('-9223372036854775809');
91
107
INSERT IGNORE INTO t1 values (1/0);
92
108
Warnings:
93
109
Error   1365    Division by 0
94
 
INSERT IGNORE INTO t1 VALUES(-9223372036854775809),(9223372036854775808);
95
 
Warnings:
96
 
Warning 1264    Out of range value for column 'col1' at row 1
97
 
INSERT IGNORE INTO t1 VALUES('-9223372036854775809'),('9223372036854775808');
98
 
Warnings:
99
 
Warning 1264    Out of range value for column 'col1' at row 1
100
 
Warning 1264    Out of range value for column 'col1' at row 2
101
 
INSERT IGNORE INTO t1 VALUES(-9223372036854785809.0),(9223372036854785808.0);
102
 
Warnings:
103
 
Warning 1264    Out of range value for column 'col1' at row 1
104
 
Warning 1264    Out of range value for column 'col1' at row 2
 
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
105
126
SELECT * FROM t1;
106
127
col1
107
128
-9223372036854775808
121
142
9223372036854775807
122
143
DROP TABLE t1;
123
144
CREATE TABLE t1 (col1 NUMERIC(4,2));
124
 
INSERT INTO t1 VALUES (10.55),(10.55),(0),(-10.55),(-10.55),(11),(1e+01);
125
 
INSERT INTO t1 VALUES ('10.55'),('10.55'),('-10.55'),('-10.55'),('11'),('1e+01');
 
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');
126
162
INSERT INTO t1 VALUES (101.55);
127
163
ERROR 22003: Out of range value for column 'col1' at row 1
128
164
INSERT INTO t1 VALUES (101);
146
182
INSERT INTO t1 VALUES ('-100E');
147
183
ERROR HY000: Incorrect decimal value: '-100E' for column 'col1' at row 1
148
184
UPDATE t1 SET col1 =col1 * 50000 WHERE col1 =11;
149
 
ERROR 22003: Out of range value for column 'col1' at row 6
 
185
ERROR 22003: Out of range value for column 'col1' at row 4
150
186
UPDATE t1 SET col1 =col1 / 0 WHERE col1 > 0;
151
187
ERROR 22012: Division by 0
152
188
UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0;
163
199
INSERT IGNORE INTO t1 values (1/0);
164
200
Warnings:
165
201
Error   1365    Division by 0
166
 
INSERT IGNORE INTO t1 VALUES(1000),(-1000);
167
 
Warnings:
168
 
Warning 1264    Out of range value for column 'col1' at row 1
169
 
Warning 1264    Out of range value for column 'col1' at row 2
170
 
INSERT IGNORE INTO t1 VALUES('1000'),('-1000');
171
 
Warnings:
172
 
Warning 1264    Out of range value for column 'col1' at row 1
173
 
Warning 1264    Out of range value for column 'col1' at row 2
174
 
INSERT IGNORE INTO t1 VALUES(1000.0),(-1000.0);
175
 
Warnings:
176
 
Warning 1264    Out of range value for column 'col1' at row 1
177
 
Warning 1264    Out of range value for column 'col1' at row 2
 
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
178
220
UPDATE IGNORE t1 SET col1=1/NULL where col1=0;
179
221
SELECT * FROM t1;
180
222
col1
181
223
10.55
182
 
10.55
183
224
NULL
184
225
-10.55
185
 
-10.55
186
226
11.00
187
227
10.00
188
228
10.55
189
 
10.55
190
 
-10.55
191
229
-10.55
192
230
11.00
193
231
10.00
201
239
-99.99
202
240
DROP TABLE t1;
203
241
CREATE TABLE t1 (col1 CHAR(5), col2 VARCHAR(6));
204
 
INSERT INTO t1 VALUES ('hello', 'hello'),('he', 'he'),('hello   ', 'hello ');
 
242
INSERT INTO t1 VALUES ('hello', 'hello');
 
243
INSERT INTO t1 VALUES ('he', 'he');
 
244
INSERT INTO t1 VALUES ('hello   ', 'hello ');
205
245
Warnings:
206
 
Note    1265    Data truncated for column 'col1' at row 3
 
246
Note    1265    Data truncated for column 'col1' at row 1
207
247
INSERT INTO t1 (col1) VALUES ('hellobob');
208
248
ERROR 22001: Data too long for column 'col1' at row 1
209
249
INSERT INTO t1 (col2) VALUES ('hellobob');
231
271
hello   hellob
232
272
DROP TABLE t1;
233
273
CREATE TABLE t1 (col1 enum('red','blue','green'));
234
 
INSERT INTO t1 VALUES ('red'),('blue'),('green');
 
274
INSERT INTO t1 VALUES ('red');
 
275
INSERT INTO t1 VALUES ('blue');
 
276
INSERT INTO t1 VALUES ('green');
235
277
INSERT INTO t1 (col1) VALUES ('yellow');
236
278
ERROR HY000: Received an invalid enum value 'yellow'.
237
279
INSERT INTO t1 (col1) VALUES ('redd');