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