Bug #37699 Bit values are allways interpreted as true
Submitted: 27 Jun 2008 18:06 Modified: 28 Jun 2008 17:00
Reporter: Senen de Diego Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:5.01.04.00 OS:Microsoft Windows
Assigned to: CPU Architecture:Any

[27 Jun 2008 18:06] Senen de Diego
Description:
I have been using type BIT NOT NULL to store boolean values, and I was able to see those values properly when using Access as a front end to the database.

With the new version of the ODBC connector, the value shown in those columns is always -1 (no matter if the underlying value is b'0' or b'1').

As I said, version 3.51.23.00 of the connector worked fine (at least regarding BIT values...)

How to repeat:
CREATE TABLE  `test` (
  `id` mediumint(8) unsigned NOT NULL auto_increment,
  `ts` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `test` varchar(255) NOT NULL default 'test',
  `right` bit(1) NOT NULL default b'0',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=257 DEFAULT CHARSET=latin1;

Link the table in Access. Add rows. `right` will be always true (-1).
[28 Jun 2008 17:00] Sveta Smirnova
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.

Duplicate of bug #36470