Bug #43725 Innodb different on hex() results for bit type
Submitted: 18 Mar 2009 11:28 Modified: 23 Apr 2009 10:03
Reporter: Nidhi Shrotriya Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:6.0.11/5.0/5.1 OS:Any
Assigned to: Marko Mäkelä CPU Architecture:Any
Triage: Triaged: D2 (Serious)

[18 Mar 2009 11:28] Nidhi Shrotriya
Description:
1) First Case:
----------------
CREATE TABLE t5(c1 BIT(8) NOT NULL PRIMARY KEY, c2 BIT(8));

INSERT IGNORE INTO t5 VALUES (95, 46), (31, 438), (61, 152), (78, 123), (88, 411), (122, 118), (0, 177),(75, 42), (108, 67), (79, 349), (59, 188), (69, 206), (49, 345), (118, 380),(111, 368), (94, 468), (56, 379), (77, 133), (29, 399), (9, 363), (23, 36),(116, 390), (119, 368), (87, 351), (123, 411), (24, 398), (34, 202), (28, 499),(30, 83), (5, 178), (60, 343), (4, 245), (104, 280), (106, 446), (127, 403),(44, 307), (68, 454), (57, 135);

With other engines(MyISAM,Falcon,Maria)
---------------------------------------
SELECT c1,HEX(c1),c2,HEX(c2) FROM t5;
c1      HEX(c1) c2      HEX(c2)
^_      1F      ÿ       FF
=       3D      <98>    98
N       4E      {       7B
X       58      ÿ       FF
_       5F      .       2E
z       7A      v       76

With Innodb:
-----------------
SELECT c1,HEX(c1),c2,HEX(c2) FROM t5;
c1      HEX(c1) c2      HEX(c2)

2)
In another scenario(Test case file attached), gives different results after multi-table update.

How to repeat:
Please find attached the test case file.
[18 Mar 2009 11:29] Nidhi Shrotriya
Test Case

Attachment: bit_bug_innodb_43725.test (application/octet-stream, text), 2.84 KiB.

[18 Mar 2009 13:17] Miguel Solorzano
Thank you for the bug report. Verified as described.
[19 Mar 2009 22:47] Mikhail Izioumtchenko
whatever was meant by test case 1 is either not there any longer
or I failed to understand it. However I reproduced the attached testcase
for multitable update with our r4482. Innodb likes to make the two column
values equal which makes me thing it's a duplicate of bug#4580
[19 Mar 2009 23:02] Mikhail Izioumtchenko
sorry, it was bug#43580 I meant, not 4580
[23 Apr 2009 10:03] Marko Mäkelä
I can't repeat the first problem in the InnoDB Plugin (using MySQL 5.1.28-bzr) or in MySQL 6.0.11-bzr. If the second problem (multi-table update) is a duplicate of Bug #43580, it seems to be a bug in the MySQL layer, outside InnoDB.