~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/odbc.test

  • Committer: Monty Taylor
  • Date: 2008-10-09 22:38:27 UTC
  • mto: This revision was merged to the branch mainline in revision 497.
  • Revision ID: monty@inaugust.com-20081009223827-bc9gvpiplsmvpwyq
Moved test() to its own file.
Made a new function to possibly replace int10_to_str.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Initialise
2
 
--disable_warnings
3
 
drop table if exists t1;
4
 
--enable_warnings
5
 
 
6
 
#
7
 
# Test some ODBC compatibility
8
 
#
9
 
 
10
 
select {fn length("hello")}, { date "1997-10-20" };
11
 
 
12
 
#
13
 
# Test retreiving row with last insert_id value.
14
 
#
15
 
 
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;
22
 
drop table t1;
23
 
 
24
 
#
25
 
# Bug #14553: NULL in WHERE resets LAST_INSERT_ID
26
 
#
27
 
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY);
28
 
INSERT INTO t1 VALUES (NULL);
29
 
SELECT a, last_insert_id() FROM t1 WHERE a IS NULL;
30
 
SELECT a, last_insert_id() FROM t1 WHERE a IS NULL;
31
 
SELECT a, last_insert_id() FROM t1;
32
 
DROP TABLE t1;
33
 
 
34
 
# End of 4.1 tests