summaryrefslogtreecommitdiff
path: root/mysql-test/r/rpl_bit_npk.result
diff options
context:
space:
mode:
authorunknown <lars@mysql.com>2006-02-24 15:38:20 +0100
committerunknown <lars@mysql.com>2006-02-24 15:38:20 +0100
commitdededdec0ab3ebebd1fb1f9c346664cc49d34b78 (patch)
tree02eba34e6aef1c7d7db5a43c95c3bcdd6405a9ae /mysql-test/r/rpl_bit_npk.result
parentb9697b20564a39d75c71bcce8cb4ec468c4ca710 (diff)
downloadmariadb-git-dededdec0ab3ebebd1fb1f9c346664cc49d34b78.tar.gz
BUG#13418 (V2): Bit columns should replicate correctly when using RBR
mysql-test/r/rpl_bit_npk.result: Updated results mysql-test/t/disabled.def: rpl_bit_npk now works sql/field.h: Field_bit::cmp_binary_offset wrongly used base class method that does not work for Field_bit This was discussed with Monty and should be pushed into 5.0 too sql/log_event.cc: Added checks for null bits Swapped use of m_after_image (was m_search_record) and table->record[1] to use record[i] in the same way as other MySQL code (i.e. use record[1] for scan data). Removed use of cmp_binary in record_compare (it is currently wrong to use that without copying the null bits to the compare data record) sql/log_event.h: Name change to indicate new semantics
Diffstat (limited to 'mysql-test/r/rpl_bit_npk.result')
-rw-r--r--mysql-test/r/rpl_bit_npk.result64
1 files changed, 46 insertions, 18 deletions
diff --git a/mysql-test/r/rpl_bit_npk.result b/mysql-test/r/rpl_bit_npk.result
index aeefc77d69b..2850e63aabd 100644
--- a/mysql-test/r/rpl_bit_npk.result
+++ b/mysql-test/r/rpl_bit_npk.result
@@ -45,25 +45,27 @@ GSuppDf TINYINT,
VNotSupp TINYINT,
x034 TINYINT);
LOCK TABLES test.t1 WRITE;
-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,2,1);
+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);
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);
-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,0,1,1,4,5,5,5,5,5,5,5,5,5,3,2,1);
+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);
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;
+UPDATE test.t1 set x034 = 50 where bit3 = b'000000';
+UPDATE test.t1 set VNotSupp = 33 where bit1 = b'0';
SELECT oSupp, sSuppD, GSuppDf, VNotSupp, x034 FROM test.t1;
oSupp sSuppD GSuppDf VNotSupp x034
-5 5 3 2 1
-5 5 3 2 1
-5 5 3 2 1
-5 5 3 2 1
-5 5 3 2 1
-5 5 3 2 1
-5 5 3 2 1
-5 5 3 2 1
+5 5 3 NULL 1
+5 5 3 2 1
+5 5 3 33 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
SELECT hex(bit1) from test.t1;
hex(bit1)
3F
@@ -96,14 +98,14 @@ hex(bit3)
1
SELECT oSupp, sSuppD, GSuppDf, VNotSupp, x034 FROM test.t1;
oSupp sSuppD GSuppDf VNotSupp x034
-5 5 3 2 1
-5 5 3 2 1
-5 5 3 2 1
-5 5 3 2 1
-5 5 3 2 1
-5 5 3 2 1
-5 5 3 2 1
-5 5 3 2 1
+5 5 3 NULL 1
+5 5 3 2 1
+5 5 3 33 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
SELECT hex(bit1) from test.t1;
hex(bit1)
3F
@@ -134,4 +136,30 @@ hex(bit3)
1
1
1
+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;
+SELECT a, hex(b) FROM test.t2;
+a hex(b)
+1 0
+2 1
+SELECT * FROM test.t3;
+a b
+1 NULL
+2 0
+SELECT a, hex(b) FROM test.t2;
+a hex(b)
+1 0
+2 1
+SELECT * FROM test.t3;
+a b
+1 NULL
+2 0
DROP TABLE IF EXISTS test.t1;
+DROP TABLE IF EXISTS test.t2;
+DROP TABLE IF EXISTS test.t3;