1drop table if exists t1;
2set @@session.sql_auto_is_null=1;
3select {fn length("hello")}, { date "1997-10-20" };
4{fn length("hello")}	1997-10-20
55	1997-10-20
6create table t1 (a int not null auto_increment,b int not null,primary key (a,b));
7insert into t1 SET A=NULL,B=1;
8insert into t1 SET a=null,b=2;
9select * from t1 where a is null and b=2;
10a	b
11select * from t1 where a is null;
12a	b
132	2
14explain select * from t1 where b is null;
15id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
161	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE
17drop table t1;
18CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY);
19INSERT INTO t1 VALUES (NULL);
20SELECT sql_no_cache a, last_insert_id() FROM t1 WHERE a IS NULL;
21a	last_insert_id()
221	1
23SELECT sql_no_cache a, last_insert_id() FROM t1 WHERE a IS NULL;
24a	last_insert_id()
25SELECT sql_no_cache a, last_insert_id() FROM t1;
26a	last_insert_id()
271	1
28DROP TABLE t1;
29set @@session.sql_auto_is_null=default;
30