summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb
diff options
context:
space:
mode:
authorJimmy Yang <jimmy.yang@oracle.com>2010-06-24 01:20:25 -0700
committerJimmy Yang <jimmy.yang@oracle.com>2010-06-24 01:20:25 -0700
commitac0fd9af594c81fd9b368694844b48f5345e052e (patch)
tree72957e3669324c2358ae3607799a7323f7aa640c /mysql-test/suite/innodb
parent3dea5854c94ebbe7c4fa57ca8b51e98867d913b1 (diff)
downloadmariadb-git-ac0fd9af594c81fd9b368694844b48f5345e052e.tar.gz
Fix Bug #54044 Create temporary tables and using innodb crashes.
Diffstat (limited to 'mysql-test/suite/innodb')
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug54044.result3
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug54044.test11
2 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/r/innodb_bug54044.result b/mysql-test/suite/innodb/r/innodb_bug54044.result
new file mode 100644
index 00000000000..9574381d8e1
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb_bug54044.result
@@ -0,0 +1,3 @@
+CREATE TEMPORARY TABLE TABLE_54044 ENGINE = INNODB
+AS SELECT IF(NULL IS NOT NULL, NULL, NULL);
+ERROR HY000: Can't create table 'test.TABLE_54044' (errno: -1)
diff --git a/mysql-test/suite/innodb/t/innodb_bug54044.test b/mysql-test/suite/innodb/t/innodb_bug54044.test
new file mode 100644
index 00000000000..824450ae1a6
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_bug54044.test
@@ -0,0 +1,11 @@
+# This is the test for bug #54044. Special handle MYSQL_TYPE_NULL type
+# during create table, so it will not trigger assertion failure.
+
+--source include/have_innodb.inc
+
+# This 'create table' operation should fail because of
+# using NULL datatype
+--error ER_CANT_CREATE_TABLE
+CREATE TEMPORARY TABLE TABLE_54044 ENGINE = INNODB
+ AS SELECT IF(NULL IS NOT NULL, NULL, NULL);
+