1 drop table if exists t1;
2 CREATE TABLE t1 SELECT _utf8'test' as c1, _utf8'ัะตัั' as c2;
6 `c1` varchar(4) CHARACTER SET utf8 NOT NULL DEFAULT '',
7 `c2` varchar(4) CHARACTER SET utf8 NOT NULL DEFAULT ''
8 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
10 ALTER TABLE t1 ADD c3 CHAR(4) CHARACTER SET utf8;
13 t1 CREATE TABLE `t1` (
14 `c1` varchar(4) CHARACTER SET utf8 NOT NULL DEFAULT '',
15 `c2` varchar(4) CHARACTER SET utf8 NOT NULL DEFAULT '',
16 `c3` char(4) CHARACTER SET utf8 DEFAULT NULL
17 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
18 INSERT INTO t1 VALUES ('aaaabbbbccccdddd','aaaabbbbccccdddd','aaaabbbbccccdddd');
20 Warning 1265 Data truncated for column 'c1' at row 1
21 Warning 1265 Data truncated for column 'c2' at row 1
22 Warning 1265 Data truncated for column 'c3' at row 1
27 CREATE TABLE t1 (a CHAR(4) CHARACTER SET utf8, KEY key_a(a(3)));
30 t1 CREATE TABLE `t1` (
31 `a` char(4) CHARACTER SET utf8 DEFAULT NULL,
33 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
35 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
36 t1 1 key_a 1 a A NULL 3 NULL YES BTREE
37 ALTER TABLE t1 CHANGE a a CHAR(4);
40 t1 CREATE TABLE `t1` (
41 `a` char(4) DEFAULT NULL,
43 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
45 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
46 t1 1 key_a 1 a A NULL 3 NULL YES BTREE
47 ALTER TABLE t1 CHANGE a a CHAR(4) CHARACTER SET utf8;
50 t1 CREATE TABLE `t1` (
51 `a` char(4) CHARACTER SET utf8 DEFAULT NULL,
53 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
55 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
56 t1 1 key_a 1 a A NULL 3 NULL YES BTREE