summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/t/innodb_bug54044.test
diff options
context:
space:
mode:
authorSreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>2016-07-22 07:33:43 +0530
committerSreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>2016-07-22 07:33:43 +0530
commitac460e584d9706e02ce3dcb86bd994276672b267 (patch)
tree1283bb4cfe561250b205f465225287ad84aa1737 /mysql-test/suite/innodb/t/innodb_bug54044.test
parent54e887b2fe24056b633957e8f9aff9d7f50b5089 (diff)
downloadmariadb-git-ac460e584d9706e02ce3dcb86bd994276672b267.tar.gz
Bug #23280699: MYSQLD GOT SIGNAL 11 IN IS_NULL ON SELECT
FROM I_S Issue: ------ There is a difference in the field type created when the following DDLs are used: 1) CREATE TABLE t0 AS SELECT NULL; 2) CREATE TABLE t0 AS SELECT GREATEST(NULL,NULL); The first statement creates field of type Field_string and the second one creates a field of type Field_null. This creates a problem when the query mentioned in this bug is used. Since the null_ptr is calculated differently for Field_null. Solution: --------- When there is a function returning null in the select list as mentioned above, the field should be of type Field_string. This was fixed in 5.6+ as part of Bug#14021323. This is a backport to mysql-5.5. An incorrect comment in innodb_bug54044.test has been corrected in all versions.
Diffstat (limited to 'mysql-test/suite/innodb/t/innodb_bug54044.test')
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug54044.test11
1 files changed, 5 insertions, 6 deletions
diff --git a/mysql-test/suite/innodb/t/innodb_bug54044.test b/mysql-test/suite/innodb/t/innodb_bug54044.test
index 0bbd7da0065..cfc6f3c3f0a 100644
--- a/mysql-test/suite/innodb/t/innodb_bug54044.test
+++ b/mysql-test/suite/innodb/t/innodb_bug54044.test
@@ -10,10 +10,9 @@ CREATE TEMPORARY TABLE table_54044 ENGINE = INNODB
SHOW CREATE TABLE table_54044;
DROP TABLE table_54044;
-# These 'create table' operations should fail because of
-# using NULL datatype
+# This 'create table' should pass since it uses a Field_string of size 0.
---error ER_CANT_CREATE_TABLE
-CREATE TABLE tmp ENGINE = INNODB AS SELECT COALESCE(NULL, NULL, NULL);
---error ER_CANT_CREATE_TABLE
-CREATE TABLE tmp ENGINE = INNODB AS SELECT GREATEST(NULL, NULL);
+CREATE TABLE tmp ENGINE = INNODB
+ AS SELECT COALESCE(NULL, NULL, NULL), GREATEST(NULL, NULL), NULL;
+SHOW CREATE TABLE tmp;
+DROP TABLE tmp;