2
drop table if exists t1;
5
--error ER_TOO_BIG_DISPLAYWIDTH
6
eval create table t1 (a bit(65), primary key (a)) engine=$engine partition by key (a);
8
eval create table t1 (a bit(0), primary key (a)) engine=$engine partition by key (a);
12
eval create table t1 (a bit(0), primary key (a)) engine=$engine
13
partition by key (a) (
19
eval create table t1 (a bit(64), primary key (a)) engine=$engine
20
partition by key (a) partitions 2;
23
(b'1111111111111111111111111111111111111111111111111111111111111111'),
24
(b'1000000000000000000000000000000000000000000000000000000000000000'),
25
(b'0000000000000000000000000000000000000000000000000000000000000001'),
26
(b'1010101010101010101010101010101010101010101010101010101010101010'),
27
(b'0101010101010101010101010101010101010101010101010101010101010101');
29
select hex(a) from t1;
32
eval create table t1 (a bit(64), primary key (a)) engine=$engine
33
partition by key (a) (
34
partition pa1 max_rows=20 min_rows=2,
35
partition pa2 max_rows=30 min_rows=3,
36
partition pa3 max_rows=30 min_rows=4,
37
partition pa4 max_rows=40 min_rows=2);
40
(b'1111111111111111111111111111111111111111111111111111111111111111'),
41
(b'1000000000000000000000000000000000000000000000000000000000000000'),
42
(b'0000000000000000000000000000000000000000000000000000000000000001'),
43
(b'1010101010101010101010101010101010101010101010101010101010101010'),
44
(b'0101010101010101010101010101010101010101010101010101010101010101');
45
select hex(a) from t1 where a=b'0101010101010101010101010101010101010101010101010101010101010101';
46
delete from t1 where a=b'0101010101010101010101010101010101010101010101010101010101010101';
48
select hex(a) from t1;
51
eval create table t2 (a bit, primary key (a)) engine=$engine
52
partition by key (a) partitions 4;
54
insert into t2 values (b'0'), (b'1');
56
select hex(a) from t2;
57
alter table t2 drop primary key;
60
select hex(a) from t2;
61
alter table t2 add primary key (a);
64
select hex(a) from t2;
67
eval create table t3 (a bit(8), primary key (a)) engine=$engine
68
partition by range (a) subpartition by key (a) subpartitions 2 (
69
partition pa1 values less than (3),
70
partition pa2 values less than (16),
71
partition pa3 values less than (64),
72
partition pa4 values less than (256));
75
--echo $count inserts;
79
eval insert into t3 values ($count);
83
select hex(a) from t3 where a=b'01010101';
84
delete from t3 where a=b'01010101';
85
select count(*) from t3;
87
select hex(a) from t3;
90
eval create table t4 (a bit(8), primary key (a)) engine=$engine
91
partition by list (a) subpartition by key (a) subpartitions 2 (
92
partition pa1 values in (0,1,2,3),
93
partition pa2 values in (4,5,6,7,8,9,10,11,12,13,14,15,16),
94
partition pa3 values in (17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32));
97
--echo $count inserts;
101
eval insert into t4 values ($count);
105
select hex(a) from t4 where a=b'00000001';
106
delete from t4 where a=b'00000001';
107
select count(*) from t4;
109
select hex(a) from t4;