summaryrefslogtreecommitdiff
path: root/mysql-test/t/create.test
diff options
context:
space:
mode:
authorsergefp@mysql.com <>2005-11-08 11:22:51 +0300
committersergefp@mysql.com <>2005-11-08 11:22:51 +0300
commitc5276ebcb066ecaa2e3f5b755f13c628a5dfbace (patch)
tree272155eaf7d57b3511b411d0a788f022ad271fff /mysql-test/t/create.test
parent63554e10d821f2b8b4154701551f45fd6b3db4ff (diff)
parent41bc2336997bd52d9c2909549414da9e3d375d79 (diff)
downloadmariadb-git-c5276ebcb066ecaa2e3f5b755f13c628a5dfbace.tar.gz
Merge, will need post-merge fixes.
Diffstat (limited to 'mysql-test/t/create.test')
-rw-r--r--mysql-test/t/create.test64
1 files changed, 63 insertions, 1 deletions
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index 67ad3058153..375128f84b2 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -3,7 +3,7 @@
#
--disable_warnings
-drop table if exists t1,t2,t3;
+drop table if exists t1,t2,t3,t4,t5;
drop database if exists mysqltest;
--enable_warnings
@@ -554,4 +554,66 @@ create table t1 (
show create table t1;
drop table t1;
+#
+# BUG#14480: assert failure in CREATE ... SELECT because of wrong
+# calculation of number of NULLs.
+#
+CREATE TABLE t2 (
+ a int(11) default NULL
+);
+insert into t2 values(111);
+
+create table t1 (
+ a varchar(12) charset utf8 collate utf8_bin not null,
+ b int not null, primary key (a)
+) select a, 1 as b from t2 ;
+show create table t1;
+drop table t1;
+
+create table t1 (
+ a varchar(12) charset utf8 collate utf8_bin not null,
+ b int not null, primary key (a)
+) select 'a' as a , 1 as b from t2 ;
+show create table t1;
+drop table t1;
+
+create table t1 (
+ a varchar(12) charset utf8 collate utf8_bin,
+ b int not null, primary key (a)
+) select 'a' as a , 1 as b from t2 ;
+show create table t1;
+drop table t1, t2;
+
+create table t1 (
+ a1 int not null,
+ a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int
+);
+insert into t1 values (1,1,1, 1,1,1, 1,1,1);
+
+create table t2 (
+ a1 varchar(12) charset utf8 collate utf8_bin not null,
+ a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int,
+ primary key (a1)
+) select a1,a2,a3,a4,a5,a6,a7,a8,a9 from t1 ;
+drop table t2;
+
+create table t2 (
+ a1 varchar(12) charset utf8 collate utf8_bin,
+ a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int
+) select a1,a2,a3,a4,a5,a6,a7,a8,a9 from t1;
+
+drop table t1, t2;
+create table t1 (
+ a1 int, a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int
+);
+insert into t1 values (1,1,1, 1,1,1, 1,1,1);
+
+create table t2 (
+ a1 varchar(12) charset utf8 collate utf8_bin not null,
+ a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int,
+ primary key (a1)
+) select a1,a2,a3,a4,a5,a6,a7,a8,a9 from t1 ;
+
+drop table t1, t2;
+
# End of 4.1 tests