~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
drop table if exists t1;
2
select floor(5.5),floor(-5.5);
3
floor(5.5)	floor(-5.5)
4
5	-6
5
explain extended select floor(5.5),floor(-5.5);
6
id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
7
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
8
Warnings:
9
Note	1003	select floor(5.5) AS `floor(5.5)`,floor(-(5.5)) AS `floor(-5.5)`
10
select ceiling(5.5),ceiling(-5.5);
11
ceiling(5.5)	ceiling(-5.5)
12
6	-5
13
explain extended select ceiling(5.5),ceiling(-5.5);
14
id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
15
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
16
Warnings:
17
Note	1003	select ceiling(5.5) AS `ceiling(5.5)`,ceiling(-(5.5)) AS `ceiling(-5.5)`
18
select truncate(52.64,1),truncate(52.64,2),truncate(52.64,-1),truncate(52.64,-2), truncate(-52.64,1),truncate(-52.64,-1);
19
truncate(52.64,1)	truncate(52.64,2)	truncate(52.64,-1)	truncate(52.64,-2)	truncate(-52.64,1)	truncate(-52.64,-1)
20
52.6	52.64	50	0	-52.6	-50
21
explain extended select truncate(52.64,1),truncate(52.64,2),truncate(52.64,-1),truncate(52.64,-2), truncate(-52.64,1),truncate(-52.64,-1);
22
id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
23
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
24
Warnings:
25
Note	1003	select truncate(52.64,1) AS `truncate(52.64,1)`,truncate(52.64,2) AS `truncate(52.64,2)`,truncate(52.64,-(1)) AS `truncate(52.64,-1)`,truncate(52.64,-(2)) AS `truncate(52.64,-2)`,truncate(-(52.64),1) AS `truncate(-52.64,1)`,truncate(-(52.64),-(1)) AS `truncate(-52.64,-1)`
26
select round(5.5),round(-5.5);
27
round(5.5)	round(-5.5)
28
6	-6
29
explain extended select round(5.5),round(-5.5);
30
id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
31
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
32
Warnings:
33
Note	1003	select round(5.5,0) AS `round(5.5)`,round(-(5.5),0) AS `round(-5.5)`
34
select round(5.64,1),round(5.64,2),round(5.64,-1),round(5.64,-2);
35
round(5.64,1)	round(5.64,2)	round(5.64,-1)	round(5.64,-2)
36
5.6	5.64	10	0
37
select abs(-10), sign(-5), sign(5), sign(0);
38
abs(-10)	sign(-5)	sign(5)	sign(0)
39
10	-1	1	0
40
explain extended select abs(-10), sign(-5), sign(5), sign(0);
41
id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
42
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
43
Warnings:
44
Note	1003	select abs(-(10)) AS `abs(-10)`,sign(-(5)) AS `sign(-5)`,sign(5) AS `sign(5)`,sign(0) AS `sign(0)`
45
select log(exp(10)),exp(log(sqrt(10))*2),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2);
46
log(exp(10))	exp(log(sqrt(10))*2)	log(-1)	log(NULL)	log(1,1)	log(3,9)	log(-1,2)	log(NULL,2)
1108.5.2 by rm
fix test results so they expect valid precision, rather than more than can be relied upon
47
10	10	NULL	NULL	NULL	2	NULL	NULL
383.4.1 by Jay Pipes
Fixed syntax errors in func_math test and re-enable the test in the make test target
48
Warnings:
49
Error	1365	Division by 0
50
Error	1365	Division by 0
51
Error	1365	Division by 0
1 by brian
clean slate
52
explain extended select log(exp(10)),exp(log(sqrt(10))*2),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2);
53
id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
54
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
55
Warnings:
56
Note	1003	select log(exp(10)) AS `log(exp(10))`,exp((log(sqrt(10)) * 2)) AS `exp(log(sqrt(10))*2)`,log(-(1)) AS `log(-1)`,log(NULL) AS `log(NULL)`,log(1,1) AS `log(1,1)`,log(3,9) AS `log(3,9)`,log(-(1),2) AS `log(-1,2)`,log(NULL,2) AS `log(NULL,2)`
57
select ln(exp(10)),exp(ln(sqrt(10))*2),ln(-1),ln(0),ln(NULL);
58
ln(exp(10))	exp(ln(sqrt(10))*2)	ln(-1)	ln(0)	ln(NULL)
1108.5.2 by rm
fix test results so they expect valid precision, rather than more than can be relied upon
59
10	10	NULL	NULL	NULL
383.4.1 by Jay Pipes
Fixed syntax errors in func_math test and re-enable the test in the make test target
60
Warnings:
61
Error	1365	Division by 0
62
Error	1365	Division by 0
1 by brian
clean slate
63
explain extended select ln(exp(10)),exp(ln(sqrt(10))*2),ln(-1),ln(0),ln(NULL);
64
id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
65
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
66
Warnings:
67
Note	1003	select ln(exp(10)) AS `ln(exp(10))`,exp((ln(sqrt(10)) * 2)) AS `exp(ln(sqrt(10))*2)`,ln(-(1)) AS `ln(-1)`,ln(0) AS `ln(0)`,ln(NULL) AS `ln(NULL)`
68
select log2(8),log2(15),log2(-2),log2(0),log2(NULL);
69
log2(8)	log2(15)	log2(-2)	log2(0)	log2(NULL)
1108.5.2 by rm
fix test results so they expect valid precision, rather than more than can be relied upon
70
3	3.90689059560852	NULL	NULL	NULL
383.4.1 by Jay Pipes
Fixed syntax errors in func_math test and re-enable the test in the make test target
71
Warnings:
72
Error	1365	Division by 0
73
Error	1365	Division by 0
1 by brian
clean slate
74
explain extended select log2(8),log2(15),log2(-2),log2(0),log2(NULL);
75
id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
76
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
77
Warnings:
78
Note	1003	select log2(8) AS `log2(8)`,log2(15) AS `log2(15)`,log2(-(2)) AS `log2(-2)`,log2(0) AS `log2(0)`,log2(NULL) AS `log2(NULL)`
79
select log10(100),log10(18),log10(-4),log10(0),log10(NULL);
80
log10(100)	log10(18)	log10(-4)	log10(0)	log10(NULL)
1108.5.2 by rm
fix test results so they expect valid precision, rather than more than can be relied upon
81
2	1.25527250510331	NULL	NULL	NULL
383.4.1 by Jay Pipes
Fixed syntax errors in func_math test and re-enable the test in the make test target
82
Warnings:
83
Error	1365	Division by 0
84
Error	1365	Division by 0
1 by brian
clean slate
85
explain extended select log10(100),log10(18),log10(-4),log10(0),log10(NULL);
86
id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
87
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
88
Warnings:
89
Note	1003	select log10(100) AS `log10(100)`,log10(18) AS `log10(18)`,log10(-(4)) AS `log10(-4)`,log10(0) AS `log10(0)`,log10(NULL) AS `log10(NULL)`
90
select pow(10,log10(10)),power(2,4);
91
pow(10,log10(10))	power(2,4)
92
10	16
93
explain extended select pow(10,log10(10)),power(2,4);
94
id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
95
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
96
Warnings:
97
Note	1003	select pow(10,log10(10)) AS `pow(10,log10(10))`,pow(2,4) AS `power(2,4)`
98
explain extended select rand(999999),rand();
99
id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
100
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
101
Warnings:
102
Note	1003	select rand(999999) AS `rand(999999)`,rand() AS `rand()`
103
select pi(),format(sin(pi()/2),6),format(cos(pi()/2),6),format(abs(tan(pi())),6),format(cot(1),6),format(asin(1),6),format(acos(0),6),format(atan(1),6);
104
pi()	format(sin(pi()/2),6)	format(cos(pi()/2),6)	format(abs(tan(pi())),6)	format(cot(1),6)	format(asin(1),6)	format(acos(0),6)	format(atan(1),6)
397 by Brian Aker
Remove tiny/small int.
105
3.141593	1.000000	0.000000	0.000000	0.642093	1.570796	1.570796	0.785398
1 by brian
clean slate
106
explain extended select pi(),format(sin(pi()/2),6),format(cos(pi()/2),6),format(abs(tan(pi())),6),format(cot(1),6),format(asin(1),6),format(acos(0),6),format(atan(1),6);
107
id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
108
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
109
Warnings:
397 by Brian Aker
Remove tiny/small int.
110
Note	1003	select pi() AS `pi()`,format(sin((pi() / 2)),6) AS `format(sin(pi()/2),6)`,format(cos((pi() / 2)),6) AS `format(cos(pi()/2),6)`,format(abs(tan(pi())),6) AS `format(abs(tan(pi())),6)`,format((1 / tan(1)),6) AS `format(cot(1),6)`,format(asin(1),6) AS `format(asin(1),6)`,format(acos(0),6) AS `format(acos(0),6)`,format(atan(1),6) AS `format(atan(1),6)`
1 by brian
clean slate
111
select degrees(pi()),radians(360);
112
degrees(pi())	radians(360)
1108.5.2 by rm
fix test results so they expect valid precision, rather than more than can be relied upon
113
180	6.28318530717959
1 by brian
clean slate
114
select format(atan(-2, 2), 6);
115
format(atan(-2, 2), 6)
116
-0.785398
117
select format(atan(pi(), 0), 6);
118
format(atan(pi(), 0), 6)
119
1.570796
120
select format(atan2(-2, 2), 6);
121
format(atan2(-2, 2), 6)
122
-0.785398
123
select format(atan2(pi(), 0), 6);
124
format(atan2(pi(), 0), 6)
125
1.570796
126
SELECT ACOS(1.0);
127
ACOS(1.0)
128
0
129
SELECT ASIN(1.0);
130
ASIN(1.0)
1108.5.2 by rm
fix test results so they expect valid precision, rather than more than can be relied upon
131
1.5707963267949
1 by brian
clean slate
132
SELECT ACOS(0.2*5.0);
133
ACOS(0.2*5.0)
134
0
135
SELECT ACOS(0.5*2.0);
136
ACOS(0.5*2.0)
137
0
138
SELECT ASIN(0.8+0.2);
139
ASIN(0.8+0.2)
1108.5.2 by rm
fix test results so they expect valid precision, rather than more than can be relied upon
140
1.5707963267949
1 by brian
clean slate
141
SELECT ASIN(1.2-0.2);
142
ASIN(1.2-0.2)
1108.5.2 by rm
fix test results so they expect valid precision, rather than more than can be relied upon
143
1.5707963267949
1 by brian
clean slate
144
select format(4.55, 1), format(4.551, 1);
145
format(4.55, 1)	format(4.551, 1)
146
4.6	4.6
147
explain extended select degrees(pi()),radians(360);
148
id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
149
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
150
Warnings:
151
Note	1003	select degrees(pi()) AS `degrees(pi())`,radians(360) AS `radians(360)`
152
select rand(rand);
153
ERROR 42S22: Unknown column 'rand' in 'field list'
154
create table t1 (col1 int, col2 decimal(60,30));
155
insert into t1 values(1,1234567890.12345);
156
select format(col2,7) from t1;
157
format(col2,7)
158
1,234,567,890.1234500
159
select format(col2,8) from t1;
160
format(col2,8)
161
1,234,567,890.12345000
162
insert into t1 values(7,1234567890123456.12345);
163
select format(col2,6) from t1 where col1=7;
164
format(col2,6)
165
1,234,567,890,123,456.123450
166
drop table t1;
167
select ceil(0.09);
168
ceil(0.09)
169
1
170
select ceil(0.000000000000000009);
171
ceil(0.000000000000000009)
172
1
173
create table t1 select round(1, 6);
174
show create table t1;
175
Table	Create Table
176
t1	CREATE TABLE `t1` (
896.3.6 by Stewart Smith
Read Fields out of proto instead of FRM.
177
  `round(1, 6)` int NOT NULL
496.1.4 by Paul McCullagh
Changes to .result files to run both PBXT and InnoDB
178
) ENGINE=X
1 by brian
clean slate
179
select * from t1;
180
round(1, 6)
181
1
182
drop table t1;
183
select abs(-2) * -2;
184
abs(-2) * -2
185
-4
186
CREATE TABLE t1 (a INT);
187
INSERT INTO t1 VALUES (1),(1),(1),(2);
413.2.2 by Brian Aker
Removed UNSIGNED from parser.
188
SELECT RAND(2) * 1000, RAND(a) * 1000 FROM t1;
189
RAND(2) * 1000	RAND(a) * 1000
1108.5.2 by rm
fix test results so they expect valid precision, rather than more than can be relied upon
190
655.586646549019	405.403537121977
191
122.346619258026	405.403537121977
192
644.97318737672	405.403537121977
193
857.826109843167	655.586646549019
413.2.2 by Brian Aker
Removed UNSIGNED from parser.
194
SELECT RAND(2) * 1000, RAND(a) * 1000 FROM t1 WHERE a = 1;
195
RAND(2) * 1000	RAND(a) * 1000
1108.5.2 by rm
fix test results so they expect valid precision, rather than more than can be relied upon
196
655.586646549019	405.403537121977
197
122.346619258026	405.403537121977
198
644.97318737672	405.403537121977
1 by brian
clean slate
199
INSERT INTO t1 VALUES (3);
413.2.2 by Brian Aker
Removed UNSIGNED from parser.
200
SELECT RAND(2) * 1000, RAND(a) * 1000 FROM t1;
201
RAND(2) * 1000	RAND(a) * 1000
1108.5.2 by rm
fix test results so they expect valid precision, rather than more than can be relied upon
202
655.586646549019	405.403537121977
203
122.346619258026	405.403537121977
204
644.97318737672	405.403537121977
205
857.826109843167	655.586646549019
206
354.211017819318	905.76975597606
413.2.2 by Brian Aker
Removed UNSIGNED from parser.
207
SELECT RAND(2) * 1000, RAND(a) * 1000 FROM t1 WHERE a = 1;
208
RAND(2) * 1000	RAND(a) * 1000
1108.5.2 by rm
fix test results so they expect valid precision, rather than more than can be relied upon
209
655.586646549019	405.403537121977
210
122.346619258026	405.403537121977
211
644.97318737672	405.403537121977
1 by brian
clean slate
212
DROP TABLE t1;
213
select round(111,-10);
214
round(111,-10)
215
0
216
select round(-5000111000111000155,-1);
217
round(-5000111000111000155,-1)
218
-5000111000111000160
219
select round(15000111000111000155,-1);
220
round(15000111000111000155,-1)
221
15000111000111000160
222
select truncate(-5000111000111000155,-1);
223
truncate(-5000111000111000155,-1)
224
-5000111000111000150
225
select truncate(15000111000111000155,-1);
226
truncate(15000111000111000155,-1)
227
15000111000111000150
1063.9.3 by Brian Aker
Partial fix for tests for tmp
228
create TEMPORARY table t1
1 by brian
clean slate
229
(f1 varchar(32) not null,
413.2.2 by Brian Aker
Removed UNSIGNED from parser.
230
f2 int not null,
231
f3 int not null default '0')
383.4.1 by Jay Pipes
Fixed syntax errors in func_math test and re-enable the test in the make test target
232
engine=myisam;
1 by brian
clean slate
233
insert into t1 values ('zombie',0,0),('gold',1,10000),('silver',2,10000);
1063.9.3 by Brian Aker
Partial fix for tests for tmp
234
create TEMPORARY table t2
413.2.2 by Brian Aker
Removed UNSIGNED from parser.
235
(f1 int not null,
236
f2 int not null,
237
f3 int not null)
383.4.1 by Jay Pipes
Fixed syntax errors in func_math test and re-enable the test in the make test target
238
engine=myisam;
1 by brian
clean slate
239
insert into t2 values (16777216,16787215,1),(33554432,33564431,2);
240
select format(t2.f2-t2.f1+1,0) from t1,t2
241
where t1.f2 = t2.f3 order by t1.f1;
242
format(t2.f2-t2.f1+1,0)
243
10,000
244
10,000
245
drop table t1, t2;
413.2.2 by Brian Aker
Removed UNSIGNED from parser.
246
select -2, 18446744073709551614, -2;
247
-2	18446744073709551614	-2
248
-2	18446744073709551614	-2
249
select abs(-2), abs(18446744073709551614), abs(-2);
250
abs(-2)	abs(18446744073709551614)	abs(-2)
251
2	18446744073709551614	2
252
select ceiling(-2), ceiling(18446744073709551614), ceiling(-2);
253
ceiling(-2)	ceiling(18446744073709551614)	ceiling(-2)
254
-2	18446744073709551614	-2
255
select floor(-2), floor(18446744073709551614), floor(-2);
256
floor(-2)	floor(18446744073709551614)	floor(-2)
257
-2	18446744073709551614	-2
258
select format(-2, 2), format(18446744073709551614, 2), format(-2, 2);
259
format(-2, 2)	format(18446744073709551614, 2)	format(-2, 2)
260
-2.00	18,446,744,073,709,551,614.00	-2.00
261
select sqrt(-2), sqrt(18446744073709551614), sqrt(-2);
262
sqrt(-2)	sqrt(18446744073709551614)	sqrt(-2)
263
NULL	4294967296	NULL
264
select round(-2, 1), round(18446744073709551614, 1), round(-2, 1);
265
round(-2, 1)	round(18446744073709551614, 1)	round(-2, 1)
266
-2	18446744073709551614	-2
267
select round(4, -2), round(4, 18446744073709551614), round(4, -2);
268
round(4, -2)	round(4, 18446744073709551614)	round(4, -2)
269
0	4	0
270
select truncate(-2, 1), truncate(18446744073709551614, 1), truncate(-2, 1);
271
truncate(-2, 1)	truncate(18446744073709551614, 1)	truncate(-2, 1)
272
-2	18446744073709551614	-2
273
select truncate(4, -2), truncate(4, 18446744073709551614), truncate(4, -2);
274
truncate(4, -2)	truncate(4, 18446744073709551614)	truncate(4, -2)
275
0	4	0
1 by brian
clean slate
276
select round(10000000000000000000, -19), truncate(10000000000000000000, -19);
277
round(10000000000000000000, -19)	truncate(10000000000000000000, -19)
278
10000000000000000000	10000000000000000000
279
select round(1e0, -309), truncate(1e0, -309);
280
round(1e0, -309)	truncate(1e0, -309)
281
0	0
282
select round(1e1,308), truncate(1e1, 308);
283
round(1e1,308)	truncate(1e1, 308)
284
10	10
285
select round(1e1, 2147483648), truncate(1e1, 2147483648);
286
round(1e1, 2147483648)	truncate(1e1, 2147483648)
287
10	10
288
select round(1.1e1, 4294967295), truncate(1.1e1, 4294967295);
289
round(1.1e1, 4294967295)	truncate(1.1e1, 4294967295)
290
11	11
291
select round(1.12e1, 4294967296), truncate(1.12e1, 4294967296);
292
round(1.12e1, 4294967296)	truncate(1.12e1, 4294967296)
293
11.2	11.2
294
select round(1.5, 2147483640), truncate(1.5, 2147483640);
295
round(1.5, 2147483640)	truncate(1.5, 2147483640)
296
1.500000000000000000000000000000	1.500000000000000000000000000000
297
select round(1.5, -2147483649), round(1.5, 2147483648);
298
round(1.5, -2147483649)	round(1.5, 2147483648)
299
0	1.500000000000000000000000000000
300
select truncate(1.5, -2147483649), truncate(1.5, 2147483648);
301
truncate(1.5, -2147483649)	truncate(1.5, 2147483648)
302
0	1.500000000000000000000000000000
303
select round(1.5, -4294967296), round(1.5, 4294967296);
304
round(1.5, -4294967296)	round(1.5, 4294967296)
305
0	1.500000000000000000000000000000
306
select truncate(1.5, -4294967296), truncate(1.5, 4294967296);
307
truncate(1.5, -4294967296)	truncate(1.5, 4294967296)
308
0	1.500000000000000000000000000000
309
select round(1.5, -9223372036854775808), round(1.5, 9223372036854775808);
310
round(1.5, -9223372036854775808)	round(1.5, 9223372036854775808)
383.4.1 by Jay Pipes
Fixed syntax errors in func_math test and re-enable the test in the make test target
311
0	2.000000000000000000000000000000
1 by brian
clean slate
312
select truncate(1.5, -9223372036854775808), truncate(1.5, 9223372036854775808);
313
truncate(1.5, -9223372036854775808)	truncate(1.5, 9223372036854775808)
383.4.1 by Jay Pipes
Fixed syntax errors in func_math test and re-enable the test in the make test target
314
0	1.000000000000000000000000000000
1 by brian
clean slate
315
select round(1.5, 18446744073709551615), truncate(1.5, 18446744073709551615);
316
round(1.5, 18446744073709551615)	truncate(1.5, 18446744073709551615)
383.4.1 by Jay Pipes
Fixed syntax errors in func_math test and re-enable the test in the make test target
317
0.000000000000000000000000000000	0.000000000000000000000000000000
1 by brian
clean slate
318
select round(18446744073709551614, -1), truncate(18446744073709551614, -1);
319
round(18446744073709551614, -1)	truncate(18446744073709551614, -1)
320
18446744073709551610	18446744073709551610
321
select round(4, -4294967200), truncate(4, -4294967200);
322
round(4, -4294967200)	truncate(4, -4294967200)
323
0	0
413.2.2 by Brian Aker
Removed UNSIGNED from parser.
324
select mod(-2, 3), mod(18446744073709551614, 3), mod(-2, 3);
325
mod(-2, 3)	mod(18446744073709551614, 3)	mod(-2, 3)
326
-2	2	-2
327
select mod(5, -2), mod(5, 18446744073709551614), mod(5, -2);
328
mod(5, -2)	mod(5, 18446744073709551614)	mod(5, -2)
329
1	5	1
330
select pow(-2, 5), pow(18446744073709551614, 5), pow(-2, 5);
331
pow(-2, 5)	pow(18446744073709551614, 5)	pow(-2, 5)
332
-32	2.13598703592091e96	-32
397 by Brian Aker
Remove tiny/small int.
333
CREATE TABLE t1 (a timestamp, b varchar(20), c int);
1 by brian
clean slate
334
INSERT INTO t1 VALUES('1998-09-23', 'str1', 1), ('2003-03-25', 'str2', 0);
335
SELECT a DIV 900 y FROM t1 GROUP BY y;
336
y
337
22201025555
338
22255916666
339
SELECT DISTINCT a DIV 900 y FROM t1;
340
y
341
22201025555
342
22255916666
343
SELECT b DIV 900 y FROM t1 GROUP BY y;
344
y
345
0
346
SELECT c DIV 900 y FROM t1 GROUP BY y;
347
y
348
0
349
DROP TABLE t1;
350
CREATE TABLE t1(a LONGBLOB);
351
INSERT INTO t1 VALUES('1'),('2'),('3');
352
SELECT DISTINCT (a DIV 254576881) FROM t1;
353
(a DIV 254576881)
354
0
355
SELECT (a DIV 254576881) FROM t1 UNION ALL 
356
SELECT (a DIV 254576881) FROM t1;
357
(a DIV 254576881)
358
0
359
0
360
0
361
0
362
0
363
0
364
DROP TABLE t1;
365
End of 5.0 tests
366
SELECT 1e308 + 1e308;
367
1e308 + 1e308
368
NULL
369
SELECT -1e308 - 1e308;
370
-1e308 - 1e308
371
NULL
372
SELECT 1e300 * 1e300;
373
1e300 * 1e300
374
NULL
375
SELECT 1e300 / 1e-300;
376
1e300 / 1e-300
377
NULL
378
SELECT EXP(750);
379
EXP(750)
380
NULL
381
SELECT POW(10, 309);
382
POW(10, 309)
383
NULL
384
End of 5.1 tests