mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-5787 Server crashes in in row_mysql_convert_row_to_innobase on CREATE .. SELECT
XtraDB: don't accept MYSQL_TYPE_NULL as a column type
This commit is contained in:
@ -15,3 +15,9 @@ tmp CREATE TABLE `tmp` (
|
||||
`NULL` binary(0) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE tmp;
|
||||
CREATE TABLE t1 (a VARCHAR(3)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES ('foo'),('bar');
|
||||
FLUSH TABLES;
|
||||
CREATE TEMPORARY TABLE tmp ENGINE=InnoDB AS SELECT VALUES(a) FROM t1;
|
||||
ERROR HY000: Can't create table `test`.`tmp` (errno: -1 "Internal error < 0 (Not system error)")
|
||||
DROP TABLE t1;
|
||||
|
@ -10,10 +10,17 @@ 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
|
||||
|
||||
CREATE TABLE tmp ENGINE = INNODB AS SELECT COALESCE(NULL, NULL, NULL), GREATEST(NULL, NULL), NULL;
|
||||
SHOW CREATE TABLE tmp;
|
||||
DROP TABLE tmp;
|
||||
|
||||
# These 'create table' operations should fail because of
|
||||
# using NULL datatype
|
||||
|
||||
CREATE TABLE t1 (a VARCHAR(3)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES ('foo'),('bar');
|
||||
FLUSH TABLES;
|
||||
--error 1005
|
||||
CREATE TEMPORARY TABLE tmp ENGINE=InnoDB AS SELECT VALUES(a) FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
Reference in New Issue
Block a user