1# Prerequisites
2let collation=utf8_unicode_ci;
3--source include/have_collation.inc
4
5# Initial cleanup
6--disable_warnings
7drop table if exists t1,t2;
8--enable_warnings
9
10#
11# Bug#21380: DEFAULT definition not always transfered by CREATE
12# TABLE/SELECT to the new table.
13#
14
15CREATE TABLE t1(
16  c1 INT DEFAULT 12 COMMENT 'column1',
17  c2 INT NULL COMMENT 'column2',
18  c3 INT NOT NULL COMMENT 'column3',
19  c4 VARCHAR(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
20  c5 VARCHAR(255) COLLATE utf8_unicode_ci NULL DEFAULT 'b',
21  c6 VARCHAR(255))
22  COLLATE latin1_bin;
23SHOW CREATE TABLE t1;
24CREATE TABLE t2 AS SELECT * FROM t1;
25SHOW CREATE TABLE t2;
26DROP TABLE t1,t2;
27