summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-05-15 17:34:47 +0200
committerSergei Golubchik <serg@mariadb.org>2018-05-17 11:32:13 +0200
commit1b2078b4d8aa64bad8bc2b3a201e0cf8c075e6a6 (patch)
tree5ad2afc8b10d349bdb708632231fa2a6ba94eb63 /mysql-test/t
parentaa2e1ade17e656446c534c02e9cb0adab50b46e1 (diff)
downloadmariadb-git-1b2078b4d8aa64bad8bc2b3a201e0cf8c075e6a6.tar.gz
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.
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/insert_select.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/t/insert_select.test b/mysql-test/t/insert_select.test
index bcd87c2688d..385e372bc3b 100644
--- a/mysql-test/t/insert_select.test
+++ b/mysql-test/t/insert_select.test
@@ -423,3 +423,13 @@ SET GLOBAL myisam_data_pointer_size = @old_myisam_data_pointer_size;
DROP TABLE t1;
--echo End of 5.1 tests
+
+#
+# MDEV-15318 CREATE .. SELECT VALUES produces invalid table structure
+#
+create table t1 (i int);
+create table t2 as select values(i) as a from t1;
+show create table t2;
+drop table t1, t2;
+
+--echo End of 5.5 tests