1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-15318 CREATE .. SELECT VALUES produces invalid table structure

When Item_insert_value needs a dummy field,
use zero-length Field_string, not Field_null.
The latter isn't compatible with CREATE ... SELECT.
This commit is contained in:
Sergei Golubchik
2018-05-15 17:34:47 +02:00
parent aa2e1ade17
commit 1b2078b4d8
3 changed files with 23 additions and 4 deletions

View File

@ -853,3 +853,12 @@ INSERT IGNORE INTO t1 SELECT t1.a FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6,t1 t7;
SET GLOBAL myisam_data_pointer_size = @old_myisam_data_pointer_size;
DROP TABLE t1;
End of 5.1 tests
create table t1 (i int);
create table t2 as select values(i) as a from t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` binary(0) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2;
End of 5.5 tests