1drop table if exists t1;
2create table t1 (
3pk1 int not null auto_increment primary key,
4b bit(64)
5) engine=archive;
6show create table t1;
7Table	Create Table
8t1	CREATE TABLE `t1` (
9  `pk1` int(11) NOT NULL AUTO_INCREMENT,
10  `b` bit(64) DEFAULT NULL,
11  PRIMARY KEY (`pk1`)
12) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
13insert into t1 values
14(NULL,b'1111111111111111111111111111111111111111111111111111111111111111'),
15(NULL,b'1000000000000000000000000000000000000000000000000000000000000000'),
16(NULL,b'0000000000000000000000000000000000000000000000000000000000000001'),
17(NULL,b'1010101010101010101010101010101010101010101010101010101010101010'),
18(NULL,b'0101010101010101010101010101010101010101010101010101010101010101');
19select hex(b) from t1 order by pk1;
20hex(b)
21FFFFFFFFFFFFFFFF
228000000000000000
231
24AAAAAAAAAAAAAAAA
255555555555555555
26drop table t1;
27create table t1 (
28pk1 int not null auto_increment primary key,
29b bit(9)
30) engine=archive;
31insert into t1 values
32(NULL,b'000000000'),
33(NULL,b'000000001'),
34(NULL,b'000000010'),
35(NULL,b'000000011'),
36(NULL,b'000000100');
37select hex(b) from t1 order by pk1;
38hex(b)
390
401
412
423
434
44drop table t1;
45create table t1 (a bit(7), b bit(9)) engine = archive;
46insert into t1 values
47(94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),
48(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),
49(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),
50(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),
51(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),
52(44, 307), (68, 454), (57, 135);
53select a+0 from t1 order by a;
54a+0
550
564
575
589
5923
6024
6128
6229
6330
6431
6534
6644
6749
6856
6957
7059
7160
7261
7368
7468
7575
7677
7778
7879
7987
8088
8194
8294
83104
84106
85108
86111
87116
88118
89119
90122
91123
92127
93select b+0 from t1 order by b;
94b+0
9536
9642
9746
9867
9983
100118
101123
102133
103135
104152
105177
106178
107188
108202
109206
110245
111280
112307
113343
114345
115349
116351
117363
118368
119368
120379
121380
122390
123398
124399
125403
126411
127411
128438
129446
130454
131468
132499
133drop table t1;
134create table t1 (
135dummyKey INTEGER NOT NULL AUTO_INCREMENT,
136a001 TINYINT,
137a010 TINYINT,
138a012 TINYINT,
139a015 TINYINT,
140a016 TINYINT,
141a017 TINYINT,
142a019 TINYINT,
143a029 TINYINT,
144a030 TINYINT,
145a031 TINYINT,
146a032 TINYINT,
147a042 TINYINT,
148a043 TINYINT,
149a044 TINYINT,
150a3001 TINYINT,
151a3002 TINYINT,
152a3003 TINYINT,
153a3004 TINYINT,
154a3005 TINYINT,
155a3021 TINYINT,
156a3022 TINYINT,
157a BIT(6),
158b BIT(6),
159c BIT(6),
160d TINYINT,
161e TINYINT,
162f TINYINT,
163g TINYINT,
164h TINYINT,
165i TINYINT,
166j TINYINT,
167k TINYINT,
168l TINYINT,
169m TINYINT,
170n TINYINT,
171o TINYINT,
172a034 TINYINT,
173PRIMARY KEY USING HASH (dummyKey) ) engine=archive;
174INSERT INTO `t1` VALUES
175(NULL,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000001',b'111111',b'111110',4,5,5,5,5,5,5,5,5,5,3,2,1),
176(NULL,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000010',b'000000',b'111101',4,5,5,5,5,5,5,5,5,5,3,2,1),
177(NULL,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000100',b'001111',b'111011',4,5,5,5,5,5,5,5,5,5,3,2,1),
178(NULL,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'001000',b'110000',b'110111',4,5,5,5,5,5,5,5,5,5,3,2,1),
179(NULL,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'010000',b'100001',b'101111',4,5,5,5,5,5,5,5,5,5,3,2,1),
180(NULL,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'100000',b'010010',b'011111',4,5,5,5,5,5,5,5,5,5,3,2,1),
181(NULL,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000000',b'001100',b'111111',4,5,5,5,5,5,5,5,5,5,3,2,1),
182(NULL,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'000000',b'000000',4,5,5,5,5,5,5,5,5,5,3,2,1);
183INSERT INTO `t1` VALUES (1,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x01,0x3F,0x3E,4,5,5,5,5,5,5,5,5,5,3,2,1);
184INSERT INTO `t1` VALUES (2,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x02,0x00,0x3D,4,5,5,5,5,5,5,5,5,5,3,2,1);
185INSERT INTO `t1` VALUES (3,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x04,0x0F,0x3B,4,5,5,5,5,5,5,5,5,5,3,2,1);
186INSERT INTO `t1` VALUES (4,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x08,0x30,0x37,4,5,5,5,5,5,5,5,5,5,3,2,1);
187INSERT INTO `t1` VALUES (5,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x10,0x21,0x2F,4,5,5,5,5,5,5,5,5,5,3,2,1);
188INSERT INTO `t1` VALUES (6,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x20,0x12,0x1F,4,5,5,5,5,5,5,5,5,5,3,2,1);
189INSERT INTO `t1` VALUES (7,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x00,0x0C,0x3F,4,5,5,5,5,5,5,5,5,5,3,2,1);
190INSERT INTO `t1` VALUES (8,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x3F,0x00,0x00,4,5,5,5,5,5,5,5,5,5,3,2,1);
191drop table t1;
192