~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/func_misc.result

  • Committer: Monty Taylor
  • Date: 2008-07-09 19:33:54 UTC
  • mto: (77.6.1 glibclient-merge)
  • mto: This revision was merged to the branch mainline in revision 124.
  • Revision ID: monty@inaugust.com-20080709193354-vi0pemwf40galnll
First step of sql-common removal (the cheap way) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
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` (
39
 
  `uuid()` varchar(36),
40
 
  `length(uuid())` int
41
 
) ENGINE=InnoDB
42
 
drop table t1;
43
 
End of 5.0 tests
44
 
select connection_id() > 0;
45
 
connection_id() > 0
46
 
1
47
 
End of tests