1
by brian
clean slate |
1 |
DROP TABLE IF EXISTS t1, t2;
|
2 |
select format(1.5555,0),format(123.5555,1),format(1234.5555,2),format(12345.55555,3),format(123456.5555,4),format(1234567.5555,5),format("12345.2399",2);
|
|
3 |
format(1.5555,0) format(123.5555,1) format(1234.5555,2) format(12345.55555,3) format(123456.5555,4) format(1234567.5555,5) format("12345.2399",2)
|
|
4 |
2 123.6 1,234.56 12,345.556 123,456.5555 1,234,567.55550 12,345.24
|
|
5 |
select length(format('nan', 2)) > 0;
|
|
6 |
length(format('nan', 2)) > 0
|
|
7 |
1
|
|
8 |
Warnings:
|
|
9 |
Warning 1292 Truncated incorrect DOUBLE value: 'nan'
|
|
10 |
select concat("$",format(2500,2));
|
|
11 |
concat("$",format(2500,2))
|
|
12 |
$2,500.00
|
|
13 |
create table t1 ( a timestamp );
|
|
14 |
insert into t1 values ( '2004-01-06 12:34' );
|
|
15 |
select a from t1 where left(a+0,6) in ( left(20040106,6) );
|
|
16 |
a
|
|
17 |
2004-01-06 12:34:00
|
|
18 |
select a from t1 where left(a+0,6) = ( left(20040106,6) );
|
|
19 |
a
|
|
20 |
2004-01-06 12:34:00
|
|
21 |
select a from t1 where right(a+0,6) in ( right(20040106123400,6) );
|
|
22 |
a
|
|
23 |
2004-01-06 12:34:00
|
|
24 |
select a from t1 where right(a+0,6) = ( right(20040106123400,6) );
|
|
25 |
a
|
|
26 |
2004-01-06 12:34:00
|
|
27 |
select a from t1 where mid(a+0,6,3) in ( mid(20040106123400,6,3) );
|
|
28 |
a
|
|
29 |
2004-01-06 12:34:00
|
|
30 |
select a from t1 where mid(a+0,6,3) = ( mid(20040106123400,6,3) );
|
|
31 |
a
|
|
32 |
2004-01-06 12:34:00
|
|
33 |
drop table t1;
|
|
34 |
End of 4.1 tests
|
|
35 |
create table t1 as select uuid(), length(uuid());
|
|
36 |
show create table t1;
|
|
37 |
Table Create Table
|
|
38 |
t1 CREATE TABLE `t1` (
|
|
873.2.35
by Monty Taylor
Update tests based on how Toru's latest patch changes create table statements. |
39 |
`uuid()` varchar(36) DEFAULT NULL,
|
40 |
`length(uuid())` int DEFAULT NULL
|
|
942.3.1
by Vladimir Kolesnikov
test generalizations |
41 |
) ENGINE=DEFAULT
|
512
by Brian Aker
Adding back more test cases. |
42 |
drop table t1;
|
1
by brian
clean slate |
43 |
End of 5.0 tests
|
44 |
select connection_id() > 0;
|
|
45 |
connection_id() > 0
|
|
46 |
1
|
|
47 |
End of tests
|