~drizzle-trunk/drizzle/development

1 by brian
clean slate
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);
685.4.14 by Jay Pipes
Fixes odbc.test. We don't support the SQL_NO_CACHE keyword
19
SELECT a, last_insert_id() FROM t1 WHERE a IS NULL;
1 by brian
clean slate
20
a	last_insert_id()
21
1	1
685.4.14 by Jay Pipes
Fixes odbc.test. We don't support the SQL_NO_CACHE keyword
22
SELECT a, last_insert_id() FROM t1 WHERE a IS NULL;
1 by brian
clean slate
23
a	last_insert_id()
685.4.14 by Jay Pipes
Fixes odbc.test. We don't support the SQL_NO_CACHE keyword
24
SELECT a, last_insert_id() FROM t1;
1 by brian
clean slate
25
a	last_insert_id()
26
1	1
27
DROP TABLE t1;