~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
stop slave;
2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
3
reset master;
4
reset slave;
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
6
start slave;
7
DROP TABLE IF EXISTS test.t1;
8
CREATE TABLE test.t1 (
9
dummyKey INTEGER NOT NULL,
10
f01 TINYINT,
11
f10 TINYINT,
12
f12 TINYINT,
13
f15 TINYINT,
14
f16 TINYINT,
15
f7 TINYINT,
16
f9 TINYINT,
17
f29 TINYINT,
18
f0 TINYINT,
19
fA1 TINYINT,
20
C32 TINYINT,
21
A42 TINYINT,
22
CA3 TINYINT,
23
A044 TINYINT,
24
f001 TINYINT,
25
A3002 TINYINT,
26
fC003 TINYINT,
27
CA300 TINYINT,
28
A305 TINYINT,
29
CA321 TINYINT,
30
r001 TINYINT,
31
bit1 BIT(6),
32
bit2 BIT(6),
33
bit3 BIT(6),
34
State1 TINYINT,
35
State2 TINYINT,
36
State3 TINYINT,
37
State4 TINYINT,
38
SubState TINYINT,
39
gState TINYINT,
40
oSupp TINYINT,
41
tSupp TINYINT,
42
sSuppD TINYINT,
43
mSuppf TINYINT,
44
GSuppDf TINYINT,
45
VNotSupp TINYINT,
46
x034 TINYINT);
47
LOCK TABLES test.t1 WRITE;
48
INSERT INTO test.t1  VALUES (6,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'111110',b'110101',4,5,5,5,5,5,5,5,5,5,3,NULL,1);
49
INSERT INTO  test.t1 VALUES (1,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'100100',4,5,5,5,5,5,5,5,5,5,3,2,1);
50
INSERT INTO  test.t1 VALUES (2,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000000',b'101010',b'010101',4,5,5,5,5,5,5,5,5,5,3,2,1);
51
INSERT INTO  test.t1 VALUES (3,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'101010',b'111111',b'000000',4,5,5,5,5,5,5,5,5,5,3,2,1);
52
INSERT INTO  test.t1 VALUES (4,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'0',1,1,4,5,5,5,5,5,5,5,5,5,3,2,1);
53
INSERT INTO  test.t1 VALUES (5,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1);
54
INSERT INTO  test.t1 VALUES (7,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1);
55
INSERT INTO  test.t1 VALUES (8,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1);
56
UNLOCK TABLES;
57
UPDATE test.t1 set x034 = 50 where bit3 = b'000000';
58
UPDATE test.t1 set VNotSupp = 33 where bit1 = b'0';
59
SELECT  oSupp, sSuppD, GSuppDf, VNotSupp, x034
60
FROM test.t1
61
ORDER BY oSupp, sSuppD, GSuppDf, VNotSupp, x034;
62
oSupp	sSuppD	GSuppDf	VNotSupp	x034
63
5	5	3	NULL	1
64
5	5	3	2	1
65
5	5	3	2	50
66
5	5	3	33	1
67
5	5	3	33	1
68
5	5	3	33	1
69
5	5	3	33	1
70
5	5	3	33	1
71
SELECT hex(bit1) from test.t1 ORDER BY bit1;
72
hex(bit1)
73
0
74
0
75
0
76
0
77
0
78
2A
79
3F
80
3F
81
SELECT hex(bit2) from test.t1 ORDER BY bit2;
82
hex(bit2)
83
0
84
1
85
1
86
1
87
1
88
2A
89
3E
90
3F
91
SELECT hex(bit3) from test.t1 ORDER BY bit3;
92
hex(bit3)
93
0
94
1
95
1
96
1
97
1
98
15
99
24
100
35
101
SELECT  oSupp, sSuppD, GSuppDf, VNotSupp, x034
102
FROM test.t1
103
ORDER BY oSupp, sSuppD, GSuppDf, VNotSupp, x034;
104
oSupp	sSuppD	GSuppDf	VNotSupp	x034
105
5	5	3	NULL	1
106
5	5	3	2	1
107
5	5	3	2	50
108
5	5	3	33	1
109
5	5	3	33	1
110
5	5	3	33	1
111
5	5	3	33	1
112
5	5	3	33	1
113
SELECT hex(bit1) from test.t1 ORDER BY bit1;
114
hex(bit1)
115
0
116
0
117
0
118
0
119
0
120
2A
121
3F
122
3F
123
SELECT hex(bit2) from test.t1 ORDER BY bit2;
124
hex(bit2)
125
0
126
1
127
1
128
1
129
1
130
2A
131
3E
132
3F
133
SELECT hex(bit3) from test.t1 ORDER BY bit3;
134
hex(bit3)
135
0
136
1
137
1
138
1
139
1
140
15
141
24
142
35
143
CREATE TABLE test.t2 (a INT, b BIT(1));
144
INSERT INTO test.t2 VALUES (1, b'0');
145
INSERT INTO test.t2 VALUES (1, b'1');
146
UPDATE test.t2 SET a = 2 WHERE b = b'1';
147
CREATE TABLE test.t3 (a INT, b INT);
148
INSERT INTO test.t3 VALUES (1, NULL);
149
INSERT INTO test.t3 VALUES (1, 0);
150
UPDATE test.t3 SET a = 2 WHERE b = 0;
151
SELECT a, hex(b) FROM test.t2 ORDER BY a,b;
152
a	hex(b)
153
1	0
154
2	1
155
SELECT * FROM test.t3 ORDER BY a,b;
156
a	b
157
1	NULL
158
2	0
159
SELECT a, hex(b) FROM test.t2 ORDER BY a,b;
160
a	hex(b)
161
1	0
162
2	1
163
SELECT * FROM test.t3 ORDER BY a,b;
164
a	b
165
1	NULL
166
2	0
167
DROP TABLE IF EXISTS test.t1;
168
DROP TABLE IF EXISTS test.t2;
169
DROP TABLE IF EXISTS test.t3;