Bug #47100 Insert values for datatype BIT are dropped
Submitted: 3 Sep 2009 14:32 Modified: 4 Nov 2009 17:40
Reporter: Leif Inge Sandberg Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.2.2a alpha OS:Windows
Assigned to: Sergei Tkachenko CPU Architecture:Any
Tags: regression

[3 Sep 2009 14:32] Leif Inge Sandberg
Description:
I cannot anymore save integer values in a BIT column, on the Insert tab for the table; Workbench clears the values. I define this table:

CREATE  TABLE IF NOT EXISTS `FileFormat` (
  `ID` SMALLINT UNSIGNED NOT NULL ,
  `Name` VARCHAR(30) NOT NULL ,
  `IsXML` BIT NOT NULL ,
  PRIMARY KEY (`ID`) )
ENGINE = InnoDB;

In Workbench on the INSERT tab I try to insert records:

100, 'Format 1', 1
200, 'Format 2', 0

This used to work in Workbench 5.0 and 5.1 (i.e. exporting proper inserts), but not in 5.2.2a. When I click the "Apply made changes to data source" button all my values in the BIT column disappears, and the export script now contains these inserts:

insert into `Table1` (`ID`, `Name`, `IsXML`) values (1, 'Format 1', );
insert into `Table1` (`ID`, `Name`, `IsXML`) values (2, 'Format 2', );

How to repeat:
As described above

Suggested fix:
Might be remotely related to Bug #36239? I think Workbench should allow values 0 and 1 in the insert tab, as was the case earlier.
[3 Sep 2009 14:40] Leif Inge Sandberg
I changed the BIT column to TINYINT and opened the Insert tab. Then I found values there; 0, 1, and 2.69044e-282. It seems like Workbench does save something that can neither be shown nor saved to the export script?

My workaround is to get rid of any BIT columns altogether. It's also recommended here (a bit old, though):

http://www.xaprb.com/blog/2006/04/11/bit-values-in-mysql/
[4 Sep 2009 6:10] Valeriy Kravchuk
Thank you for the bug report. Verified just as described.
[3 Nov 2009 19:13] Johannes Taxacher
this has been fixed in repository. fix will be included in 5.2.7
[4 Nov 2009 17:40] Tony Bedford
An entry was added to the 5.2.7 changelog:

In the Inserts tab of the Table Editor, values entered for a BIT column were not saved. If values were entered and then the changes applied, the values in the BIT column disappeared.