3
drop table if exists t1;
7
# Test some ODBC compatibility
10
select {fn length("hello")}, { date "1997-10-20" };
13
# Test retreiving row with last insert_id value.
16
create table t1 (a int not null auto_increment,b int not null,primary key (a,b));
17
insert into t1 SET A=NULL,B=1;
18
insert into t1 SET a=null,b=2;
19
select * from t1 where a is null and b=2;
20
select * from t1 where a is null;
21
explain select * from t1 where b is null;
25
# Bug #14553: NULL in WHERE resets LAST_INSERT_ID
27
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY);
28
INSERT INTO t1 VALUES (NULL);
29
SELECT sql_no_cache a, last_insert_id() FROM t1 WHERE a IS NULL;
30
SELECT sql_no_cache a, last_insert_id() FROM t1 WHERE a IS NULL;
31
SELECT sql_no_cache a, last_insert_id() FROM t1;