~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/archive_bitfield.test

  • Committer: Brian Aker
  • Date: 2009-12-29 01:38:38 UTC
  • mfrom: (1251.1.1 drizzle)
  • Revision ID: brian@gaz-20091229013838-03kb2z5xbqw03ddt
Merge of Diego fix.

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 TINYINT,
49
 
                a010 TINYINT,
50
 
                a012 TINYINT,
51
 
                a015 TINYINT,
52
 
                a016 TINYINT,
53
 
                a017 TINYINT,
54
 
                a019 TINYINT,
55
 
                a029 TINYINT,
56
 
                a030 TINYINT,
57
 
                a031 TINYINT,
58
 
                a032 TINYINT,
59
 
                a042 TINYINT,
60
 
                a043 TINYINT,
61
 
                a044 TINYINT,
62
 
                a3001 TINYINT,
63
 
                a3002 TINYINT,
64
 
                a3003 TINYINT,
65
 
                a3004 TINYINT,
66
 
                a3005 TINYINT,
67
 
                a3021 TINYINT,
68
 
                a3022 TINYINT,
69
 
                a BIT(6),
70
 
                b BIT(6),
71
 
                c BIT(6),
72
 
                d TINYINT,
73
 
                e TINYINT,
74
 
                f TINYINT,
75
 
                g TINYINT,
76
 
                h TINYINT,
77
 
                i TINYINT,
78
 
                j TINYINT,
79
 
                k TINYINT,
80
 
                l TINYINT,
81
 
                m TINYINT,
82
 
                n TINYINT,
83
 
                o TINYINT,
84
 
                a034 TINYINT,
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;