summaryrefslogtreecommitdiff
path: root/mysql-test/t/odbc.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/odbc.test')
-rw-r--r--mysql-test/t/odbc.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/odbc.test b/mysql-test/t/odbc.test
new file mode 100644
index 00000000000..4629a08fd3f
--- /dev/null
+++ b/mysql-test/t/odbc.test
@@ -0,0 +1,17 @@
+#
+# Test some ODBC compatibility
+#
+
+select {fn length("hello")}, { date "1997-10-20" };
+
+#
+# Test retreiving row with last insert_id value.
+#
+
+create table t1 (a int not null auto_increment,b int not null,primary key (a,b));
+insert into t1 SET A=NULL,B=1;
+insert into t1 SET a=null,b=2;
+select * from t1 where a is null and b=2;
+select * from t1 where a is null;
+explain select * from t1 where b is null;
+drop table t1;