~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysql-test/suite/parts/r/partition_char_innodb.result

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
---- Partitioning and char data type
 
2
create table t1 (a char(255) not null, primary key(a)) engine='InnoDB' 
 
3
partition by key (a) (
 
4
partition pa1 max_rows=20 min_rows=2,
 
5
partition pa2 max_rows=30 min_rows=3,
 
6
partition pa3 max_rows=30 min_rows=4,
 
7
partition pa4 max_rows=40 min_rows=2);
 
8
show create table t1;
 
9
Table   Create Table
 
10
t1      CREATE TABLE `t1` (
 
11
  `a` char(255) NOT NULL,
 
12
  PRIMARY KEY (`a`)
 
13
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
 
14
insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64));
 
15
select * from t1;
 
16
a
 
17
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
18
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
19
b
 
20
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
 
21
select * from t1 where a='b';
 
22
a
 
23
b
 
24
update t1 set a='bb' where a='b';
 
25
delete from t1 where a='bb';
 
26
select * from t1;
 
27
a
 
28
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
29
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
30
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
 
31
drop table t1;
 
32
create table t2 (a char(255) not null, primary key(a)) engine='InnoDB' 
 
33
partition by key (a) partitions 27;
 
34
show create table t2;
 
35
Table   Create Table
 
36
t2      CREATE TABLE `t2` (
 
37
  `a` char(255) NOT NULL,
 
38
  PRIMARY KEY (`a`)
 
39
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27  */
 
40
26 inserts;
 
41
insert into t2 values (repeat(char(ascii('a')+0),26+54));
 
42
insert into t2 values (repeat(char(ascii('a')+1),25+54));
 
43
insert into t2 values (repeat(char(ascii('a')+2),24+54));
 
44
insert into t2 values (repeat(char(ascii('a')+3),23+54));
 
45
insert into t2 values (repeat(char(ascii('a')+4),22+54));
 
46
insert into t2 values (repeat(char(ascii('a')+5),21+54));
 
47
insert into t2 values (repeat(char(ascii('a')+6),20+54));
 
48
insert into t2 values (repeat(char(ascii('a')+7),19+54));
 
49
insert into t2 values (repeat(char(ascii('a')+8),18+54));
 
50
insert into t2 values (repeat(char(ascii('a')+9),17+54));
 
51
insert into t2 values (repeat(char(ascii('a')+10),16+54));
 
52
insert into t2 values (repeat(char(ascii('a')+11),15+54));
 
53
insert into t2 values (repeat(char(ascii('a')+12),14+54));
 
54
insert into t2 values (repeat(char(ascii('a')+13),13+54));
 
55
insert into t2 values (repeat(char(ascii('a')+14),12+54));
 
56
insert into t2 values (repeat(char(ascii('a')+15),11+54));
 
57
insert into t2 values (repeat(char(ascii('a')+16),10+54));
 
58
insert into t2 values (repeat(char(ascii('a')+17),9+54));
 
59
insert into t2 values (repeat(char(ascii('a')+18),8+54));
 
60
insert into t2 values (repeat(char(ascii('a')+19),7+54));
 
61
insert into t2 values (repeat(char(ascii('a')+20),6+54));
 
62
insert into t2 values (repeat(char(ascii('a')+21),5+54));
 
63
insert into t2 values (repeat(char(ascii('a')+22),4+54));
 
64
insert into t2 values (repeat(char(ascii('a')+23),3+54));
 
65
insert into t2 values (repeat(char(ascii('a')+24),2+54));
 
66
insert into t2 values (repeat(char(ascii('a')+25),1+54));
 
67
select count(*) from t2;
 
68
count(*)
 
69
26
 
70
select * from t2;
 
71
a
 
72
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
73
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
 
74
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
 
75
ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
 
76
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
 
77
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
 
78
gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
 
79
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
 
80
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
 
81
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
 
82
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
 
83
lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
 
84
mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
 
85
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
 
86
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
 
87
ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
 
88
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
 
89
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
90
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
 
91
ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
 
92
uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
 
93
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
 
94
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
 
95
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 
96
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
 
97
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
 
98
drop table t2;
 
99
---- Partitioning and binary data type
 
100
create table t1 (a binary(255) not null, primary key(a)) engine='InnoDB' 
 
101
partition by key (a) (
 
102
partition pa1 max_rows=20 min_rows=2,
 
103
partition pa2 max_rows=30 min_rows=3,
 
104
partition pa3 max_rows=30 min_rows=4,
 
105
partition pa4 max_rows=40 min_rows=2);
 
106
show create table t1;
 
107
Table   Create Table
 
108
t1      CREATE TABLE `t1` (
 
109
  `a` binary(255) NOT NULL,
 
110
  PRIMARY KEY (`a`)
 
111
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
 
112
insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64));
 
113
select hex(a) from t1;
 
114
hex(a)
 
115
616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
116
616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161
 
117
620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
118
626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
119
select a from t1 where substr(a,1,2)='b\0';
 
120
a
 
121
b
 
122
update t1 set a='cc' where substr(a,1,2)= 'b\0';
 
123
select a from t1 where substr(a,1,1)='c';
 
124
a
 
125
cc
 
126
delete from t1 where substr(a,1,2)='cc';
 
127
select hex(a) from t1;
 
128
hex(a)
 
129
616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
130
616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161
 
131
626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
132
drop table t1;
 
133
create table t2 (a binary(255) not null, primary key(a)) engine='InnoDB' 
 
134
partition by key (a) partitions 27;
 
135
show create table t2;
 
136
Table   Create Table
 
137
t2      CREATE TABLE `t2` (
 
138
  `a` binary(255) NOT NULL,
 
139
  PRIMARY KEY (`a`)
 
140
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27  */
 
141
26 inserts;
 
142
insert into t2 values (repeat(char(ascii('a')+0),26+54));
 
143
insert into t2 values (repeat(char(ascii('a')+1),25+54));
 
144
insert into t2 values (repeat(char(ascii('a')+2),24+54));
 
145
insert into t2 values (repeat(char(ascii('a')+3),23+54));
 
146
insert into t2 values (repeat(char(ascii('a')+4),22+54));
 
147
insert into t2 values (repeat(char(ascii('a')+5),21+54));
 
148
insert into t2 values (repeat(char(ascii('a')+6),20+54));
 
149
insert into t2 values (repeat(char(ascii('a')+7),19+54));
 
150
insert into t2 values (repeat(char(ascii('a')+8),18+54));
 
151
insert into t2 values (repeat(char(ascii('a')+9),17+54));
 
152
insert into t2 values (repeat(char(ascii('a')+10),16+54));
 
153
insert into t2 values (repeat(char(ascii('a')+11),15+54));
 
154
insert into t2 values (repeat(char(ascii('a')+12),14+54));
 
155
insert into t2 values (repeat(char(ascii('a')+13),13+54));
 
156
insert into t2 values (repeat(char(ascii('a')+14),12+54));
 
157
insert into t2 values (repeat(char(ascii('a')+15),11+54));
 
158
insert into t2 values (repeat(char(ascii('a')+16),10+54));
 
159
insert into t2 values (repeat(char(ascii('a')+17),9+54));
 
160
insert into t2 values (repeat(char(ascii('a')+18),8+54));
 
161
insert into t2 values (repeat(char(ascii('a')+19),7+54));
 
162
insert into t2 values (repeat(char(ascii('a')+20),6+54));
 
163
insert into t2 values (repeat(char(ascii('a')+21),5+54));
 
164
insert into t2 values (repeat(char(ascii('a')+22),4+54));
 
165
insert into t2 values (repeat(char(ascii('a')+23),3+54));
 
166
insert into t2 values (repeat(char(ascii('a')+24),2+54));
 
167
insert into t2 values (repeat(char(ascii('a')+25),1+54));
 
168
select count(*) from t2;
 
169
count(*)
 
170
26
 
171
select hex(a) from t2;
 
172
hex(a)
 
173
616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
174
626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
175
636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
176
646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646464646400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
177
656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
178
666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
179
676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
180
686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868686868680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
181
696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969696969000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
182
6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A6A00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
183
6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
184
6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C6C000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
185
6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
186
6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
187
6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F6F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
188
707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707070707000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
189
717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
190
727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
191
737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
192
747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
193
757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575757575000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
194
767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
195
777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
196
787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878787878000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
197
797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797979797900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
198
7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 
199
drop table t2;
 
200
---- Partitioning and varchar data type
 
201
create table t1 (a varchar(767) not null, primary key(a)) engine='InnoDB' 
 
202
partition by key (a) (
 
203
partition pa1 max_rows=20 min_rows=2,
 
204
partition pa2 max_rows=30 min_rows=3,
 
205
partition pa3 max_rows=30 min_rows=4,
 
206
partition pa4 max_rows=40 min_rows=2);
 
207
show create table t1;
 
208
Table   Create Table
 
209
t1      CREATE TABLE `t1` (
 
210
  `a` varchar(767) NOT NULL,
 
211
  PRIMARY KEY (`a`)
 
212
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
 
213
insert into t1 values (repeat('a',767)), ('b'), (repeat('a',500)), (repeat('b',64));
 
214
select * from t1;
 
215
a
 
216
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
229
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
 
230
drop table t1;
 
231
create table t2 (a varchar(767) not null, primary key(a)) engine='InnoDB' 
 
232
partition by key (a) partitions 27;
 
233
show create table t2;
 
234
Table   Create Table
 
235
t2      CREATE TABLE `t2` (
 
236
  `a` varchar(767) NOT NULL,
 
237
  PRIMARY KEY (`a`)
 
238
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27  */
 
239
26 inserts;
 
240
insert into t2 values (repeat(char(ascii('a')+0),26*26));
 
241
insert into t2 values (repeat(char(ascii('a')+1),25*25));
 
242
insert into t2 values (repeat(char(ascii('a')+2),24*24));
 
243
insert into t2 values (repeat(char(ascii('a')+3),23*23));
 
244
insert into t2 values (repeat(char(ascii('a')+4),22*22));
 
245
insert into t2 values (repeat(char(ascii('a')+5),21*21));
 
246
insert into t2 values (repeat(char(ascii('a')+6),20*20));
 
247
insert into t2 values (repeat(char(ascii('a')+7),19*19));
 
248
insert into t2 values (repeat(char(ascii('a')+8),18*18));
 
249
insert into t2 values (repeat(char(ascii('a')+9),17*17));
 
250
insert into t2 values (repeat(char(ascii('a')+10),16*16));
 
251
insert into t2 values (repeat(char(ascii('a')+11),15*15));
 
252
insert into t2 values (repeat(char(ascii('a')+12),14*14));
 
253
insert into t2 values (repeat(char(ascii('a')+13),13*13));
 
254
insert into t2 values (repeat(char(ascii('a')+14),12*12));
 
255
insert into t2 values (repeat(char(ascii('a')+15),11*11));
 
256
insert into t2 values (repeat(char(ascii('a')+16),10*10));
 
257
insert into t2 values (repeat(char(ascii('a')+17),9*9));
 
258
insert into t2 values (repeat(char(ascii('a')+18),8*8));
 
259
insert into t2 values (repeat(char(ascii('a')+19),7*7));
 
260
insert into t2 values (repeat(char(ascii('a')+20),6*6));
 
261
insert into t2 values (repeat(char(ascii('a')+21),5*5));
 
262
insert into t2 values (repeat(char(ascii('a')+22),4*4));
 
263
insert into t2 values (repeat(char(ascii('a')+23),3*3));
 
264
insert into t2 values (repeat(char(ascii('a')+24),2*2));
 
265
insert into t2 values (repeat(char(ascii('a')+25),1*1));
 
266
select count(*) from t2;
 
267
count(*)
 
268
26
 
269
select * from t2;
 
270
a
 
271
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
 
274
ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
 
275
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
 
276
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
 
277
gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
 
278
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
 
279
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
 
280
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
 
281
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
 
282
lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
 
283
mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
 
284
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
 
285
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
 
286
ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
 
287
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
 
288
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
289
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
 
290
ttttttttttttttttttttttttttttttttttttttttttttttttt
 
291
uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
 
292
vvvvvvvvvvvvvvvvvvvvvvvvv
 
293
wwwwwwwwwwwwwwww
 
294
xxxxxxxxx
 
295
yyyy
 
296
z
 
297
drop table t2;
 
298
---- Partitioning and varbinary data type
 
299
create table t1 (a varbinary(767) not null, primary key(a)) engine='InnoDB' 
 
300
partition by key (a) (
 
301
partition pa1 max_rows=20 min_rows=2,
 
302
partition pa2 max_rows=30 min_rows=3,
 
303
partition pa3 max_rows=30 min_rows=4,
 
304
partition pa4 max_rows=40 min_rows=2);
 
305
show create table t1;
 
306
Table   Create Table
 
307
t1      CREATE TABLE `t1` (
 
308
  `a` varbinary(767) NOT NULL,
 
309
  PRIMARY KEY (`a`)
 
310
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB, PARTITION pa2 MAX_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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
326
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
327
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
 
328
drop table t1;
 
329
create table t2 (a varbinary(767) not null, primary key(a)) engine='InnoDB' 
 
330
partition by key (a) partitions 30;
 
331
show create table t2;
 
332
Table   Create Table
 
333
t2      CREATE TABLE `t2` (
 
334
  `a` varbinary(767) NOT NULL,
 
335
  PRIMARY KEY (`a`)
 
336
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 30  */
 
337
26 inserts;
 
338
insert into t2 values (repeat(char(ascii('a')+0),26*26));
 
339
insert into t2 values (repeat(char(ascii('a')+1),25*25));
 
340
insert into t2 values (repeat(char(ascii('a')+2),24*24));
 
341
insert into t2 values (repeat(char(ascii('a')+3),23*23));
 
342
insert into t2 values (repeat(char(ascii('a')+4),22*22));
 
343
insert into t2 values (repeat(char(ascii('a')+5),21*21));
 
344
insert into t2 values (repeat(char(ascii('a')+6),20*20));
 
345
insert into t2 values (repeat(char(ascii('a')+7),19*19));
 
346
insert into t2 values (repeat(char(ascii('a')+8),18*18));
 
347
insert into t2 values (repeat(char(ascii('a')+9),17*17));
 
348
insert into t2 values (repeat(char(ascii('a')+10),16*16));
 
349
insert into t2 values (repeat(char(ascii('a')+11),15*15));
 
350
insert into t2 values (repeat(char(ascii('a')+12),14*14));
 
351
insert into t2 values (repeat(char(ascii('a')+13),13*13));
 
352
insert into t2 values (repeat(char(ascii('a')+14),12*12));
 
353
insert into t2 values (repeat(char(ascii('a')+15),11*11));
 
354
insert into t2 values (repeat(char(ascii('a')+16),10*10));
 
355
insert into t2 values (repeat(char(ascii('a')+17),9*9));
 
356
insert into t2 values (repeat(char(ascii('a')+18),8*8));
 
357
insert into t2 values (repeat(char(ascii('a')+19),7*7));
 
358
insert into t2 values (repeat(char(ascii('a')+20),6*6));
 
359
insert into t2 values (repeat(char(ascii('a')+21),5*5));
 
360
insert into t2 values (repeat(char(ascii('a')+22),4*4));
 
361
insert into t2 values (repeat(char(ascii('a')+23),3*3));
 
362
insert into t2 values (repeat(char(ascii('a')+24),2*2));
 
363
insert into t2 values (repeat(char(ascii('a')+25),1*1));
 
364
select count(*) from t2;
 
365
count(*)
 
366
26
 
367
select * from t2;
 
368
a
 
369
aaaaaaaaaaaaaaaaaaa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bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
 
371
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
 
372
ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
 
373
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
 
374
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
 
375
gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
 
376
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh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llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
 
381
mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
 
382
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
 
383
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
 
384
ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
 
385
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
 
386
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
387
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
 
388
ttttttttttttttttttttttttttttttttttttttttttttttttt
 
389
uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
 
390
vvvvvvvvvvvvvvvvvvvvvvvvv
 
391
wwwwwwwwwwwwwwww
 
392
xxxxxxxxx
 
393
yyyy
 
394
z
 
395
drop table t2;
 
396
---- Partitioning and enum data type
 
397
create table t1 (a enum('A','B','C','D','E','F','G','H','I','J','K','L') not null, primary key(a)) engine='InnoDB' 
 
398
partition by key (a) (
 
399
partition pa1 max_rows=20 min_rows=2,
 
400
partition pa2 max_rows=30 min_rows=3,
 
401
partition pa3 max_rows=30 min_rows=4,
 
402
partition pa4 max_rows=40 min_rows=2);
 
403
show create table t1;
 
404
Table   Create Table
 
405
t1      CREATE TABLE `t1` (
 
406
  `a` enum('A','B','C','D','E','F','G','H','I','J','K','L') NOT NULL,
 
407
  PRIMARY KEY (`a`)
 
408
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
 
409
insert into t1 values ('A'),('D'),('L'),('G');
 
410
select * from t1;
 
411
a
 
412
A
 
413
D
 
414
G
 
415
L
 
416
select * from t1 where a='A';
 
417
a
 
418
A
 
419
update t1 set a='E' where a='L';
 
420
select * from t1;
 
421
a
 
422
A
 
423
D
 
424
E
 
425
G
 
426
delete from t1 where a='E';
 
427
select * from t1;
 
428
a
 
429
A
 
430
D
 
431
G
 
432
drop table t1;
 
433
create table t2 (a enum (
 
434
'1','2','3','4','5','6','7','8','9','0',
 
435
'A','B','C','D','E','F','G','H','I','J','K','L',
 
436
'M','N','O','P','Q','R','S','T','U','V','W','X',
 
437
'Y','Z'
 
438
) not null, primary key(a)) engine='InnoDB' 
 
439
partition by key (a) partitions 27;
 
440
show create table t2;
 
441
Table   Create Table
 
442
t2      CREATE TABLE `t2` (
 
443
  `a` enum('1','2','3','4','5','6','7','8','9','0','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z') NOT NULL,
 
444
  PRIMARY KEY (`a`)
 
445
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27  */
 
446
0 inserts;
 
447
insert into t2 values (char(ascii('A')+26));
 
448
Warnings:
 
449
Warning 1265    Data truncated for column 'a' at row 1
 
450
insert into t2 values (char(ascii('A')+25));
 
451
insert into t2 values (char(ascii('A')+24));
 
452
insert into t2 values (char(ascii('A')+23));
 
453
insert into t2 values (char(ascii('A')+22));
 
454
insert into t2 values (char(ascii('A')+21));
 
455
insert into t2 values (char(ascii('A')+20));
 
456
insert into t2 values (char(ascii('A')+19));
 
457
insert into t2 values (char(ascii('A')+18));
 
458
insert into t2 values (char(ascii('A')+17));
 
459
insert into t2 values (char(ascii('A')+16));
 
460
insert into t2 values (char(ascii('A')+15));
 
461
insert into t2 values (char(ascii('A')+14));
 
462
insert into t2 values (char(ascii('A')+13));
 
463
insert into t2 values (char(ascii('A')+12));
 
464
insert into t2 values (char(ascii('A')+11));
 
465
insert into t2 values (char(ascii('A')+10));
 
466
insert into t2 values (char(ascii('A')+9));
 
467
insert into t2 values (char(ascii('A')+8));
 
468
insert into t2 values (char(ascii('A')+7));
 
469
insert into t2 values (char(ascii('A')+6));
 
470
insert into t2 values (char(ascii('A')+5));
 
471
insert into t2 values (char(ascii('A')+4));
 
472
insert into t2 values (char(ascii('A')+3));
 
473
insert into t2 values (char(ascii('A')+2));
 
474
insert into t2 values (char(ascii('A')+1));
 
475
insert into t2 values ('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9'),('0');
 
476
select count(*) from t2;
 
477
count(*)
 
478
36
 
479
select * from t2;
 
480
a
 
481
 
 
482
1
 
483
2
 
484
3
 
485
4
 
486
5
 
487
6
 
488
7
 
489
8
 
490
9
 
491
0
 
492
B
 
493
C
 
494
D
 
495
E
 
496
F
 
497
G
 
498
H
 
499
I
 
500
J
 
501
K
 
502
L
 
503
M
 
504
N
 
505
O
 
506
P
 
507
Q
 
508
R
 
509
S
 
510
T
 
511
U
 
512
V
 
513
W
 
514
X
 
515
Y
 
516
Z
 
517
drop table t2;
 
518
---- Partitioning and set data type
 
519
create table t1 (a set('A','B','C','D','E','F','G','H','I','J','K','L') not null, primary key(a)) engine='InnoDB' 
 
520
partition by key (a) (
 
521
partition pa1 max_rows=20 min_rows=2,
 
522
partition pa2 max_rows=30 min_rows=3,
 
523
partition pa3 max_rows=30 min_rows=4,
 
524
partition pa4 max_rows=40 min_rows=2);
 
525
show create table t1;
 
526
Table   Create Table
 
527
t1      CREATE TABLE `t1` (
 
528
  `a` set('A','B','C','D','E','F','G','H','I','J','K','L') NOT NULL,
 
529
  PRIMARY KEY (`a`)
 
530
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB) */
 
531
insert into t1 values ('A,B'),('C,D'),('E,L'),('G,H,K');
 
532
select * from t1 order by a;
 
533
a
 
534
A,B
 
535
C,D
 
536
G,H,K
 
537
E,L
 
538
select * from t1 where a='A,B';
 
539
a
 
540
A,B
 
541
update t1 set a='A,B,C' where a='E,L';
 
542
select * from t1 order by a;
 
543
a
 
544
A,B
 
545
A,B,C
 
546
C,D
 
547
G,H,K
 
548
delete from t1 where a='A,B';
 
549
select * from t1 order by a;
 
550
a
 
551
A,B,C
 
552
C,D
 
553
G,H,K
 
554
drop table t1;
 
555
create table t2 (a set (
 
556
'1','2','3','4','5','6','7','8','9','0',
 
557
'A','B','C','D','E','F','G','H','I','J','K','L',
 
558
'M','N','O','P','Q','R','S','T','U','V','W','X',
 
559
'Y','Z'
 
560
) not null, primary key(a)) engine='InnoDB' 
 
561
partition by key (a) partitions 27;
 
562
show create table t2;
 
563
Table   Create Table
 
564
t2      CREATE TABLE `t2` (
 
565
  `a` set('1','2','3','4','5','6','7','8','9','0','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z') NOT NULL,
 
566
  PRIMARY KEY (`a`)
 
567
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 27  */
 
568
insert into t2 values ('A'),('B'),('C'),('D'),('E'),('F'),('G'),('H'),('I'),('K'),('L'),('M'),('N'),('O'),('P'),('Q'),('S'),('T'),('U'),('V'),('X'),('Y'),('Z');
 
569
insert into t2 values ('A,B'),('B,C'),('C,D'),('D,E'),('E,F'),('F,G'),('G,H'),('H,I'),('I,J'),('K,L'),('L,M'),('M,N'),('N,O'),('O,P'),('P,Q'),('Q,R'),('S,T'),('T,U'),('U,V'),('V,W'),('X,Y'),('Y,Z'),('Z,A');
 
570
insert into t2 values ('A,B,C'),('B,C,D'),('C,D,E'),('D,E,F'),('E,F,G'),('F,G,H'),('G,H,I'),('H,I,J'),('I,J,K'),('K,L,M'),('L,M,N'),('M,N,O'),('N,O,P'),('O,P,Q'),('P,Q,R'),('Q,R,S'),('S,T,U'),('T,U,V'),('U,V,W'),('V,W,X'),('X,Y,Z'),('Y,Z,A'),('Z,A,B');
 
571
insert into t2 values ('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9'),('0');
 
572
insert into t2 values ('1,2'),('2,3'),('3,4'),('4,5'),('5,6'),('6,7'),('7,8'),('8,9'),('9,0'),('0,1');
 
573
insert into t2 values ('1,2,3'),('2,3,4'),('3,4,5'),('4,5,6'),('5,6,7'),('6,7,8'),('7,8,9'),('8,9,0'),('9,0,1'),('0,1,2');
 
574
select count(*) from t2;
 
575
count(*)
 
576
99
 
577
select * from t2 order by a;
 
578
a
 
579
1
 
580
2
 
581
1,2
 
582
3
 
583
2,3
 
584
1,2,3
 
585
4
 
586
3,4
 
587
2,3,4
 
588
5
 
589
4,5
 
590
3,4,5
 
591
6
 
592
5,6
 
593
4,5,6
 
594
7
 
595
6,7
 
596
5,6,7
 
597
8
 
598
7,8
 
599
6,7,8
 
600
9
 
601
8,9
 
602
7,8,9
 
603
0
 
604
1,0
 
605
1,2,0
 
606
9,0
 
607
1,9,0
 
608
8,9,0
 
609
A
 
610
B
 
611
A,B
 
612
C
 
613
B,C
 
614
A,B,C
 
615
D
 
616
C,D
 
617
B,C,D
 
618
E
 
619
D,E
 
620
C,D,E
 
621
F
 
622
E,F
 
623
D,E,F
 
624
G
 
625
F,G
 
626
E,F,G
 
627
H
 
628
G,H
 
629
F,G,H
 
630
I
 
631
H,I
 
632
G,H,I
 
633
I,J
 
634
H,I,J
 
635
K
 
636
I,J,K
 
637
L
 
638
K,L
 
639
M
 
640
L,M
 
641
K,L,M
 
642
N
 
643
M,N
 
644
L,M,N
 
645
O
 
646
N,O
 
647
M,N,O
 
648
P
 
649
O,P
 
650
N,O,P
 
651
Q
 
652
P,Q
 
653
O,P,Q
 
654
Q,R
 
655
P,Q,R
 
656
S
 
657
Q,R,S
 
658
T
 
659
S,T
 
660
U
 
661
T,U
 
662
S,T,U
 
663
V
 
664
U,V
 
665
T,U,V
 
666
V,W
 
667
U,V,W
 
668
X
 
669
V,W,X
 
670
Y
 
671
X,Y
 
672
Z
 
673
A,Z
 
674
A,B,Z
 
675
Y,Z
 
676
A,Y,Z
 
677
X,Y,Z
 
678
drop table t2;
 
679
---- Partitioning and blob data type
 
680
create table t1 (a blob not null, primary key(a(767))) engine='InnoDB' 
 
681
partition by key (a) (
 
682
partition pa1 max_rows=20 min_rows=2,
 
683
partition pa2 max_rows=30 min_rows=3,
 
684
partition pa3 max_rows=30 min_rows=4,
 
685
partition pa4 max_rows=40 min_rows=2);
 
686
ERROR HY000: A BLOB field is not allowed in partition function
 
687
create table t2 (a blob not null, primary key(a(767))) engine='InnoDB' 
 
688
partition by key (a) partitions 30;
 
689
ERROR HY000: A BLOB field is not allowed in partition function
 
690
create table t2 (a tinyblob not null, primary key(a(767))) engine='InnoDB' 
 
691
partition by key (a) partitions 30;
 
692
ERROR HY000: A BLOB field is not allowed in partition function
 
693
create table t2 (a mediumblob not null, primary key(a(767))) engine='InnoDB' 
 
694
partition by key (a) partitions 30;
 
695
ERROR HY000: A BLOB field is not allowed in partition function
 
696
create table t2 (a longblob not null, primary key(a(767))) engine='InnoDB' 
 
697
partition by key (a) partitions 30;
 
698
ERROR HY000: A BLOB field is not allowed in partition function
 
699
---- Partitioning and text data type
 
700
create table t1 (a text not null, primary key(a(767))) engine='InnoDB' 
 
701
partition by key (a) (
 
702
partition pa1 max_rows=20 min_rows=2,
 
703
partition pa2 max_rows=30 min_rows=3,
 
704
partition pa3 max_rows=30 min_rows=4,
 
705
partition pa4 max_rows=40 min_rows=2);
 
706
ERROR HY000: A BLOB field is not allowed in partition function
 
707
create table t2 (a tinytext not null, primary key(a(767))) engine='InnoDB' 
 
708
partition by key (a) partitions 30;
 
709
ERROR HY000: A BLOB field is not allowed in partition function
 
710
create table t2 (a mediumtext not null, primary key(a(767))) engine='InnoDB' 
 
711
partition by key (a) partitions 30;
 
712
ERROR HY000: A BLOB field is not allowed in partition function
 
713
create table t2 (a longtext not null, primary key(a(767))) engine='InnoDB' 
 
714
partition by key (a) partitions 30;
 
715
ERROR HY000: A BLOB field is not allowed in partition function