summaryrefslogtreecommitdiff
path: root/mysql-test/t/create.test
diff options
context:
space:
mode:
authorunknown <anozdrin/alik@quad.>2008-02-06 14:55:19 +0300
committerunknown <anozdrin/alik@quad.>2008-02-06 14:55:19 +0300
commit9f8fb5ed044e750feb82258520110cc662e45b13 (patch)
treef942d5f07a57f4dc04ca2f56ab3d3e557527cf0a /mysql-test/t/create.test
parentee42ff6398a1e1ccc1a820f63609849259fad768 (diff)
downloadmariadb-git-9f8fb5ed044e750feb82258520110cc662e45b13.tar.gz
Add a test case for Bug#21380: DEFAULT definition not always
transfered by CREATE TABLE/SELECT to the new table. mysql-test/r/create.result: Update result file.
Diffstat (limited to 'mysql-test/t/create.test')
-rw-r--r--mysql-test/t/create.test44
1 files changed, 44 insertions, 0 deletions
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index dff6bf3fcff..1fc61010b8b 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -1341,4 +1341,48 @@ create table t1 like information_schema.character_sets;
show create table t1;
drop table t1;
+--echo
+--echo # --
+--echo # -- Bug#21380: DEFAULT definition not always transfered by CREATE
+--echo # -- TABLE/SELECT to the new table.
+--echo # --
+--echo
+
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+--enable_warnings
+
+--echo
+
+CREATE TABLE t1(
+ c1 INT DEFAULT 12 COMMENT 'column1',
+ c2 INT NULL COMMENT 'column2',
+ c3 INT NOT NULL COMMENT 'column3',
+ c4 VARCHAR(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
+ c5 VARCHAR(255) COLLATE utf8_unicode_ci NULL DEFAULT 'b',
+ c6 VARCHAR(255))
+ COLLATE ucs2_unicode_ci;
+
+--echo
+
+SHOW CREATE TABLE t1;
+
+--echo
+
+CREATE TABLE t2 AS SELECT * FROM t1;
+
+--echo
+
+SHOW CREATE TABLE t2;
+
+--echo
+
+DROP TABLE t2;
+
+--echo
+--echo # -- End of test case for Bug#21380.
+--echo
+
--echo End of 5.1 tests