~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/func_if.test

  • Committer: Brian Aker
  • Date: 2010-05-27 01:25:56 UTC
  • mfrom: (1567.1.4 new-staging)
  • Revision ID: brian@gaz-20100527012556-5zgkirkl7swbigd6
Merge of Brian, Paul. PBXT compile issue, and test framework cleanup. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
# Simple IF tests
10
10
#
11
11
 
12
 
select IF(0,"ERROR","this"),IF(1,"is","ERROR"),IF(NULL,"ERROR","a"),IF(1,2,3)|0,IF(1,2.0,3.0)+0 ;
 
12
select IF(0,"ERROR","this"),IF(1,"is","ERROR"),IF(NULL,"ERROR","a"),IF(1,2.0,3.0)+0 ;
13
13
 
14
14
#
15
15
# Test of IF and case-sensitiveness
16
16
#
17
 
CREATE TABLE t1 (st varchar(255) NOT NULL, u int(11) NOT NULL) ENGINE=MyISAM;
 
17
CREATE TEMPORARY TABLE t1 (st varchar(255) NOT NULL, u int NOT NULL) ENGINE=MyISAM;
18
18
INSERT INTO t1 VALUES ('a',1),('A',1),('aa',1),('AA',1),('a',1),('aaa',0),('BBB',0);
19
19
select if(1,st,st) s from t1 order by s;
20
20
select if(u=1,st,st) s from t1 order by s;
66
66
# Bug #9669 Ordering on IF function with FROM_UNIXTIME function fails
67
67
#
68
68
CREATE TABLE `t1` (
69
 
  `id` int(11) NOT NULL ,
70
 
  `date` int(10) default NULL,
 
69
  `id` int NOT NULL ,
 
70
  `date` int default NULL,
71
71
  `text` varchar(32) NOT NULL
72
72
);
73
73
INSERT INTO t1 VALUES (1,1110000000,'Day 1'),(2,1111000000,'Day 2'),(3,1112000000,'Day 3');
102
102
# Bug#24532 (The return data type of IS TRUE is different from similar
103
103
# operations)
104
104
#
105
 
# IF(x, unsigned, unsigned) should be unsigned.
 
105
# IF(x,,) should be.
106
106
#
107
107
 
108
108
select if(0, 18446744073709551610, 18446744073709551610);