~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/strict.result

Merged Padraig.

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.5555),(0),(-10.55),(-10.5555),(11),(1e+01);
125
 
Warnings:
126
 
Note    1265    Data truncated for column 'col1' at row 2
127
 
Note    1265    Data truncated for column 'col1' at row 5
128
 
INSERT INTO t1 VALUES ('10.55'),('10.5555'),('-10.55'),('-10.5555'),('11'),('1e+01');
129
 
Warnings:
130
 
Note    1265    Data truncated for column 'col1' at row 2
131
 
Note    1265    Data truncated for column 'col1' at row 4
 
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');
132
162
INSERT INTO t1 VALUES (101.55);
133
163
ERROR 22003: Out of range value for column 'col1' at row 1
134
164
INSERT INTO t1 VALUES (101);
152
182
INSERT INTO t1 VALUES ('-100E');
153
183
ERROR HY000: Incorrect decimal value: '-100E' for column 'col1' at row 1
154
184
UPDATE t1 SET col1 =col1 * 50000 WHERE col1 =11;
155
 
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
156
186
UPDATE t1 SET col1 =col1 / 0 WHERE col1 > 0;
157
187
ERROR 22012: Division by 0
158
188
UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0;
165
195
ERROR HY000: Incorrect decimal value: '1a' for column 'col1' at row 1
166
196
INSERT IGNORE INTO t1 (col1) VALUES ('2a');
167
197
Warnings:
168
 
Note    1265    Data truncated for column 'col1' at row 1
 
198
Warning 1265    Data truncated for column 'col1' at row 1
169
199
INSERT IGNORE INTO t1 values (1/0);
170
200
Warnings:
171
201
Error   1365    Division by 0
172
 
INSERT IGNORE INTO t1 VALUES(1000),(-1000);
173
 
Warnings:
174
 
Warning 1264    Out of range value for column 'col1' at row 1
175
 
Warning 1264    Out of range value for column 'col1' at row 2
176
 
INSERT IGNORE INTO t1 VALUES('1000'),('-1000');
177
 
Warnings:
178
 
Warning 1264    Out of range value for column 'col1' at row 1
179
 
Warning 1264    Out of range value for column 'col1' at row 2
180
 
INSERT IGNORE INTO t1 VALUES(1000.0),(-1000.0);
181
 
Warnings:
182
 
Warning 1264    Out of range value for column 'col1' at row 1
183
 
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
184
220
UPDATE IGNORE t1 SET col1=1/NULL where col1=0;
185
221
SELECT * FROM t1;
186
222
col1
187
223
-10.55
188
224
-10.55
189
 
-10.56
190
 
-10.56
191
 
-99.99
192
 
-99.99
193
 
-99.99
194
 
10.00
195
 
10.00
196
 
10.55
197
 
10.55
198
 
10.56
199
 
10.56
200
 
11.00
201
 
11.00
202
 
2.00
 
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
203
235
99.99
204
236
99.99
205
237
99.99
207
239
NULL
208
240
DROP TABLE t1;
209
241
CREATE TABLE t1 (col1 CHAR(5), col2 VARCHAR(6));
210
 
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 ');
211
245
Warnings:
212
 
Note    1265    Data truncated for column 'col1' at row 3
 
246
Note    1265    Data truncated for column 'col1' at row 1
213
247
INSERT INTO t1 (col1) VALUES ('hellobob');
214
248
ERROR 22001: Data too long for column 'col1' at row 1
215
249
INSERT INTO t1 (col2) VALUES ('hellobob');
237
271
hello   hellob
238
272
DROP TABLE t1;
239
273
CREATE TABLE t1 (col1 enum('red','blue','green'));
240
 
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');
241
277
INSERT INTO t1 (col1) VALUES ('yellow');
242
278
ERROR HY000: Received an invalid enum value 'yellow'.
243
279
INSERT INTO t1 (col1) VALUES ('redd');