summaryrefslogtreecommitdiff
path: root/storage/rocksdb/mysql-test/rocksdb/r/type_char.result
blob: 1786dfae1e75498856361553f7681981994cf58f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
c CHAR ,
c0 CHAR(0) ,
c1 CHAR(1) ,
c20 CHAR(20) ,
c255 CHAR(255) ,
PRIMARY KEY (c255)
) ENGINE=rocksdb;
SHOW COLUMNS IN t1;
Field	Type	Null	Key	Default	Extra
c	char(1)	YES		NULL	
c0	char(0)	YES		NULL	
c1	char(1)	YES		NULL	
c20	char(20)	YES		NULL	
c255	char(255)	NO	PRI	NULL	
INSERT INTO t1 (c,c0,c1,c20,c255) VALUES ('','','','','');
INSERT 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.');
SELECT c,c0,c1,c20,c255 FROM t1;
c	c0	c1	c20	c255
				
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.
INSERT INTO t1 (c,c0,c1,c20,c255) VALUES ('abc', 'a', 'abc', REPEAT('a',21), REPEAT('x',256));
Warnings:
Warning	1265	Data truncated for column 'c' at row 1
Warning	1265	Data truncated for column 'c0' at row 1
Warning	1265	Data truncated for column 'c1' at row 1
Warning	1265	Data truncated for column 'c20' at row 1
Warning	1265	Data truncated for column 'c255' at row 1
INSERT INTO t1 (c,c0,c1,c20,c255) SELECT c255, c255, c255, c255, CONCAT('a',c255,c1) FROM t1;
Warnings:
Warning	1265	Data truncated for column 'c' at row 5
Warning	1265	Data truncated for column 'c0' at row 5
Warning	1265	Data truncated for column 'c1' at row 5
Warning	1265	Data truncated for column 'c20' at row 5
Warning	1265	Data truncated for column 'c' at row 6
Warning	1265	Data truncated for column 'c0' at row 6
Warning	1265	Data truncated for column 'c1' at row 6
Warning	1265	Data truncated for column 'c20' at row 6
Warning	1265	Data truncated for column 'c255' at row 6
SELECT c,c0,c1,c20,c255 FROM t1;
c	c0	c1	c20	c255
				
				a
C		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
a		a	aaaaaaaaaaaaaaaaaaaa	xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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.
x		x	xxxxxxxxxxxxxxxxxxxx	axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
SELECT DISTINCT c20, REPEAT('a',LENGTH(c20)), COUNT(*) FROM t1 GROUP BY c1, c20;
c20	REPEAT('a',LENGTH(c20))	COUNT(*)
		2
Creating an article	aaaaaaaaaaaaaaaaaaa	1
aaaaaaaaaaaaaaaaaaaa	aaaaaaaaaaaaaaaaaaaa	1
abcdefghi klmnopqrst	aaaaaaaaaaaaaaaaaaaa	1
xxxxxxxxxxxxxxxxxxxx	aaaaaaaaaaaaaaaaaaaa	1
ALTER TABLE t1 ADD COLUMN c257 CHAR(257) ;
ERROR 42000: Column length too big for column 'c257' (max = 255); use BLOB or TEXT instead
DROP TABLE t1;
CREATE TABLE t1(c1 CHAR(0) NOT NULL);
INSERT INTO t1 VALUES('a');
Warnings:
Warning	1265	Data truncated for column 'c1' at row 1
SELECT * FROM t1;
c1

DROP TABLE t1;
CREATE TABLE t1(a char(10) character set utf8 collate utf8_bin primary key);
INSERT INTO t1 VALUES ('one'),('two'),('three'),('four'),('five');
(SELECT * FROM t1 LIMIT 1) UNION (SELECT * FROM t1);
a
five
four
one
three
two
DROP TABLE t1;