mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / r / odbc.result
blob5629d3dab3305ec7c29fa84a5246685648c506f2
1 drop table if exists t1;
2 select {fn length("hello")}, { date "1997-10-20" };
3 {fn length("hello")}    1997-10-20
4 5       1997-10-20
5 create table t1 (a int not null auto_increment,b int not null,primary key (a,b));
6 insert into t1 SET A=NULL,B=1;
7 insert into t1 SET a=null,b=2;
8 select * from t1 where a is null and b=2;
9 a       b
10 2       2
11 select * from t1 where a is null;
12 a       b
13 explain select * from t1 where b is null;
14 id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
15 1       SIMPLE  NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE
16 drop table t1;
17 CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY);
18 INSERT INTO t1 VALUES (NULL);
19 SELECT sql_no_cache a, last_insert_id() FROM t1 WHERE a IS NULL;
20 a       last_insert_id()
21 1       1
22 SELECT sql_no_cache a, last_insert_id() FROM t1 WHERE a IS NULL;
23 a       last_insert_id()
24 SELECT sql_no_cache a, last_insert_id() FROM t1;
25 a       last_insert_id()
26 1       1
27 DROP TABLE t1;