~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/archive_bitfield.test

  • Committer: Eric Day
  • Date: 2009-08-27 07:26:22 UTC
  • mto: This revision was merged to the branch mainline in revision 1131.
  • Revision ID: eday@oddments.org-20090827072622-72te13ua0wdlc2ky
Reworked listen interface to not require binding of TCP ports.

Show diffs side-by-side

added added

removed removed

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