1-- source include/have_archive.inc
2-- source include/not_embedded.inc
3
4--disable_warnings
5drop table if exists t1;
6--enable_warnings
7
8create table t1 (
9  pk1 int not null auto_increment primary key,
10  b bit(64)
11) engine=archive;
12
13show create table t1;
14insert into t1 values
15(NULL,b'1111111111111111111111111111111111111111111111111111111111111111'),
16(NULL,b'1000000000000000000000000000000000000000000000000000000000000000'),
17(NULL,b'0000000000000000000000000000000000000000000000000000000000000001'),
18(NULL,b'1010101010101010101010101010101010101010101010101010101010101010'),
19(NULL,b'0101010101010101010101010101010101010101010101010101010101010101');
20select hex(b) from t1 order by pk1;
21drop table t1;
22
23create table t1 (
24  pk1 int not null auto_increment primary key,
25  b bit(9)
26) engine=archive;
27insert into t1 values
28(NULL,b'000000000'),
29(NULL,b'000000001'),
30(NULL,b'000000010'),
31(NULL,b'000000011'),
32(NULL,b'000000100');
33select hex(b) from t1 order by pk1;
34drop table t1;
35
36create table t1 (a bit(7), b bit(9)) engine = archive;
37insert into t1 values
38(94, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),
39(75, 42), (108, 67), (79, 349), (59, 188), (68, 206), (49, 345), (118, 380),
40(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),
41(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),
42(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),
43(44, 307), (68, 454), (57, 135);
44select a+0 from t1 order by a;
45select b+0 from t1 order by b;
46drop table t1;
47
48create table t1 (
49                dummyKey INTEGER NOT NULL AUTO_INCREMENT,
50                a001 TINYINT,
51                a010 TINYINT,
52                a012 TINYINT,
53                a015 TINYINT,
54                a016 TINYINT,
55                a017 TINYINT,
56                a019 TINYINT,
57                a029 TINYINT,
58                a030 TINYINT,
59                a031 TINYINT,
60                a032 TINYINT,
61                a042 TINYINT,
62                a043 TINYINT,
63                a044 TINYINT,
64                a3001 TINYINT,
65                a3002 TINYINT,
66                a3003 TINYINT,
67                a3004 TINYINT,
68                a3005 TINYINT,
69                a3021 TINYINT,
70                a3022 TINYINT,
71                a BIT(6),
72                b BIT(6),
73                c BIT(6),
74                d TINYINT,
75                e TINYINT,
76                f TINYINT,
77                g TINYINT,
78                h TINYINT,
79                i TINYINT,
80                j TINYINT,
81                k TINYINT,
82                l TINYINT,
83                m TINYINT,
84                n TINYINT,
85                o TINYINT,
86                a034 TINYINT,
87PRIMARY KEY USING HASH (dummyKey) ) engine=archive;
88INSERT INTO `t1` VALUES
89(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),
90(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),
91(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),
92(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),
93(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),
94(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),
95(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),
96(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);
97# Determine the number of open sessions
98--source include/count_sessions.inc
99--exec $MYSQL_DUMP --hex-blob --compact --order-by-primary --skip-extended-insert --no-create-info test t1
100drop table t1;
101# Wait till the number of open sessions is <= the number before the run with $MYSQL_DUMP
102# = The session caused by mysqldump has finished its disconnect
103--source include/wait_until_count_sessions.inc
104
105