1DROP TABLE IF EXISTS t1;
2CREATE TABLE t1 (
3c CHAR ,
4c0 CHAR(0) ,
5c1 CHAR(1) ,
6c20 CHAR(20) ,
7c255 CHAR(255) ,
8PRIMARY KEY (c255)
9) ENGINE=rocksdb;
10SHOW COLUMNS IN t1;
11Field	Type	Null	Key	Default	Extra
12c	char(1)	YES		NULL
13c0	char(0)	YES		NULL
14c1	char(1)	YES		NULL
15c20	char(20)	YES		NULL
16c255	char(255)	NO	PRI
17INSERT INTO t1 (c,c0,c1,c20,c255) VALUES ('','','','','');
18INSERT INTO t1 (c,c0,c1,c20,c255) VALUES ('a','','b','abcdefghi klmnopqrst', 'Creating an article for the Knowledgebase is similar to asking questions. First, navigate to the category where you feel the article should be. Once there, double check that an article doesn\'t already exist which would work.');
19SELECT c,c0,c1,c20,c255 FROM t1;
20c	c0	c1	c20	c255
21
22a		b	abcdefghi klmnopqrst	Creating an article for the Knowledgebase is similar to asking questions. First, navigate to the category where you feel the article should be. Once there, double check that an article doesn't already exist which would work.
23INSERT INTO t1 (c,c0,c1,c20,c255) VALUES ('abc', 'a', 'abc', REPEAT('a',21), REPEAT('x',256));
24Warnings:
25Warning	1265	Data truncated for column 'c' at row 1
26Warning	1265	Data truncated for column 'c0' at row 1
27Warning	1265	Data truncated for column 'c1' at row 1
28Warning	1265	Data truncated for column 'c20' at row 1
29Warning	1265	Data truncated for column 'c255' at row 1
30INSERT INTO t1 (c,c0,c1,c20,c255) SELECT c255, c255, c255, c255, CONCAT('a',c255,c1) FROM t1;
31Warnings:
32Warning	1265	Data truncated for column 'c' at row 5
33Warning	1265	Data truncated for column 'c0' at row 5
34Warning	1265	Data truncated for column 'c1' at row 5
35Warning	1265	Data truncated for column 'c20' at row 5
36Warning	1265	Data truncated for column 'c' at row 6
37Warning	1265	Data truncated for column 'c0' at row 6
38Warning	1265	Data truncated for column 'c1' at row 6
39Warning	1265	Data truncated for column 'c20' at row 6
40Warning	1265	Data truncated for column 'c255' at row 6
41SELECT c,c0,c1,c20,c255 FROM t1;
42c	c0	c1	c20	c255
43
44				a
45C		C	Creating an article	aCreating an article for the Knowledgebase is similar to asking questions. First, navigate to the category where you feel the article should be. Once there, double check that an article doesn't already exist which would work.b
46a		a	aaaaaaaaaaaaaaaaaaaa	xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
47a		b	abcdefghi klmnopqrst	Creating an article for the Knowledgebase is similar to asking questions. First, navigate to the category where you feel the article should be. Once there, double check that an article doesn't already exist which would work.
48x		x	xxxxxxxxxxxxxxxxxxxx	axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
49SELECT DISTINCT c20, REPEAT('a',LENGTH(c20)), COUNT(*) FROM t1 GROUP BY c1, c20;
50c20	REPEAT('a',LENGTH(c20))	COUNT(*)
51		2
52Creating an article	aaaaaaaaaaaaaaaaaaa	1
53aaaaaaaaaaaaaaaaaaaa	aaaaaaaaaaaaaaaaaaaa	1
54abcdefghi klmnopqrst	aaaaaaaaaaaaaaaaaaaa	1
55xxxxxxxxxxxxxxxxxxxx	aaaaaaaaaaaaaaaaaaaa	1
56ALTER TABLE t1 ADD COLUMN c257 CHAR(257) ;
57ERROR 42000: Column length too big for column 'c257' (max = 255); use BLOB or TEXT instead
58DROP TABLE t1;
59CREATE TABLE t1(c1 CHAR(0) NOT NULL);
60INSERT INTO t1 VALUES('a');
61Warnings:
62Warning	1265	Data truncated for column 'c1' at row 1
63SELECT * FROM t1;
64c1
65
66DROP TABLE t1;
67CREATE TABLE t1(a char(10) character set utf8 collate utf8_bin primary key);
68INSERT INTO t1 VALUES ('one'),('two'),('three'),('four'),('five');
69SELECT * FROM t1 LIMIT 1 UNION SELECT * FROM t1;
70a
71five
72four
73one
74three
75two
76DROP TABLE t1;
77