1
by brian
clean slate |
1 |
drop table if exists t1;
|
2 |
create table t1 (
|
|
3 |
pk1 int not null auto_increment primary key,
|
|
4 |
b bit(64)
|
|
5 |
) engine=archive;
|
|
6 |
show create table t1;
|
|
7 |
Table Create Table
|
|
8 |
t1 CREATE TABLE "t1" (
|
|
9 |
"pk1" int(11) NOT NULL ON UPDATE CURRENT_TIMESTAMP AUTO_INCREMENT,
|
|
10 |
"b" bit(64) ON UPDATE CURRENT_TIMESTAMP,
|
|
11 |
PRIMARY KEY ("pk1")
|
|
12 |
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
|
13 |
insert into t1 values
|
|
14 |
(NULL,b'1111111111111111111111111111111111111111111111111111111111111111'),
|
|
15 |
(NULL,b'1000000000000000000000000000000000000000000000000000000000000000'),
|
|
16 |
(NULL,b'0000000000000000000000000000000000000000000000000000000000000001'),
|
|
17 |
(NULL,b'1010101010101010101010101010101010101010101010101010101010101010'),
|
|
18 |
(NULL,b'0101010101010101010101010101010101010101010101010101010101010101');
|
|
19 |
select hex(b) from t1 order by pk1;
|
|
20 |
hex(b)
|
|
21 |
FFFFFFFFFFFFFFFF
|
|
22 |
8000000000000000
|
|
23 |
1
|
|
24 |
AAAAAAAAAAAAAAAA
|
|
25 |
5555555555555555
|
|
26 |
drop table t1;
|
|
27 |
create table t1 (
|
|
28 |
pk1 int not null auto_increment primary key,
|
|
29 |
b bit(9)
|
|
30 |
) engine=archive;
|
|
31 |
insert into t1 values
|
|
32 |
(NULL,b'000000000'),
|
|
33 |
(NULL,b'000000001'),
|
|
34 |
(NULL,b'000000010'),
|
|
35 |
(NULL,b'000000011'),
|
|
36 |
(NULL,b'000000100');
|
|
37 |
select hex(b) from t1 order by pk1;
|
|
38 |
hex(b)
|
|
39 |
0
|
|
40 |
1
|
|
41 |
2
|
|
42 |
3
|
|
43 |
4
|
|
44 |
drop table t1;
|
|
45 |
create table t1 (a bit(7), b bit(9)) engine = archive;
|
|
46 |
insert 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);
|
|
53 |
select a+0 from t1 order by a;
|
|
54 |
a+0
|
|
55 |
0
|
|
56 |
4
|
|
57 |
5
|
|
58 |
9
|
|
59 |
23
|
|
60 |
24
|
|
61 |
28
|
|
62 |
29
|
|
63 |
30
|
|
64 |
31
|
|
65 |
34
|
|
66 |
44
|
|
67 |
49
|
|
68 |
56
|
|
69 |
57
|
|
70 |
59
|
|
71 |
60
|
|
72 |
61
|
|
73 |
68
|
|
74 |
68
|
|
75 |
75
|
|
76 |
77
|
|
77 |
78
|
|
78 |
79
|
|
79 |
87
|
|
80 |
88
|
|
81 |
94
|
|
82 |
94
|
|
83 |
104
|
|
84 |
106
|
|
85 |
108
|
|
86 |
111
|
|
87 |
116
|
|
88 |
118
|
|
89 |
119
|
|
90 |
122
|
|
91 |
123
|
|
92 |
127
|
|
93 |
select b+0 from t1 order by b;
|
|
94 |
b+0
|
|
95 |
36
|
|
96 |
42
|
|
97 |
46
|
|
98 |
67
|
|
99 |
83
|
|
100 |
118
|
|
101 |
123
|
|
102 |
133
|
|
103 |
135
|
|
104 |
152
|
|
105 |
177
|
|
106 |
178
|
|
107 |
188
|
|
108 |
202
|
|
109 |
206
|
|
110 |
245
|
|
111 |
280
|
|
112 |
307
|
|
113 |
343
|
|
114 |
345
|
|
115 |
349
|
|
116 |
351
|
|
117 |
363
|
|
118 |
368
|
|
119 |
368
|
|
120 |
379
|
|
121 |
380
|
|
122 |
390
|
|
123 |
398
|
|
124 |
399
|
|
125 |
403
|
|
126 |
411
|
|
127 |
411
|
|
128 |
438
|
|
129 |
446
|
|
130 |
454
|
|
131 |
468
|
|
132 |
499
|
|
133 |
drop table t1;
|
|
134 |
create table t1 (
|
|
135 |
dummyKey INTEGER NOT NULL AUTO_INCREMENT,
|
|
136 |
a001 TINYINT,
|
|
137 |
a010 TINYINT,
|
|
138 |
a012 TINYINT,
|
|
139 |
a015 TINYINT,
|
|
140 |
a016 TINYINT,
|
|
141 |
a017 TINYINT,
|
|
142 |
a019 TINYINT,
|
|
143 |
a029 TINYINT,
|
|
144 |
a030 TINYINT,
|
|
145 |
a031 TINYINT,
|
|
146 |
a032 TINYINT,
|
|
147 |
a042 TINYINT,
|
|
148 |
a043 TINYINT,
|
|
149 |
a044 TINYINT,
|
|
150 |
a3001 TINYINT,
|
|
151 |
a3002 TINYINT,
|
|
152 |
a3003 TINYINT,
|
|
153 |
a3004 TINYINT,
|
|
154 |
a3005 TINYINT,
|
|
155 |
a3021 TINYINT,
|
|
156 |
a3022 TINYINT,
|
|
157 |
a BIT(6),
|
|
158 |
b BIT(6),
|
|
159 |
c BIT(6),
|
|
160 |
d TINYINT,
|
|
161 |
e TINYINT,
|
|
162 |
f TINYINT,
|
|
163 |
g TINYINT,
|
|
164 |
h TINYINT,
|
|
165 |
i TINYINT,
|
|
166 |
j TINYINT,
|
|
167 |
k TINYINT,
|
|
168 |
l TINYINT,
|
|
169 |
m TINYINT,
|
|
170 |
n TINYINT,
|
|
171 |
o TINYINT,
|
|
172 |
a034 TINYINT,
|
|
173 |
PRIMARY KEY USING HASH (dummyKey) ) engine=archive;
|
|
174 |
INSERT 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);
|
|
183 |
||
184 |
-- |
|
185 |
-- Not dumping tablespaces as no INFORMATION_SCHEMA.FILES table on this server |
|
186 |
-- |
|
187 |
INSERT 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); |
|
188 |
INSERT 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); |
|
189 |
INSERT 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); |
|
190 |
INSERT 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); |
|
191 |
INSERT 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); |
|
192 |
INSERT 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); |
|
193 |
INSERT 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); |
|
194 |
INSERT 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); |
|
195 |
drop table t1; |