| Bug #89068 | BIT column incorrectly used by the script generator | ||
|---|---|---|---|
| Submitted: | 27 Dec 2017 17:09 | Modified: | 25 Apr 2018 18:19 |
| Reporter: | Rui Afonso | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Workbench | Severity: | S3 (Non-critical) |
| Version: | 6.3.10 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | workbench sql bit | ||
[27 Dec 2017 18:52]
MySQL Verification Team
Thank you for the bug report.
[25 Apr 2018 18:19]
Christine Cole
Posted by developer: Fixed as of the upcoming MySQL Workbench 8.0.12 release, and here's the changelog entry: An incorrect Insert statement was generated when a value was inserted into BIT column. This fix now prefixes all BIT data type values with b (for example, b'0'). Thank you for the bug report.

Description: If you try to insert or amend the value of the BIT-type column the Workbench will not generate a proper script. The wrong script in its turn will cause all 0's to be 1's. How to repeat: 1. Create/open a table with one of the columns having a BIT type. CREATE TABLE Example ( name VARCHAR(10), isActive BIT ); 2. Open the table 3. Using the grid, insert the values: 'Me' and 0. 4. It will generate the following script: INSERT INTO `Example` (`name `, `isActive`) VALUES ('Me', '0'); Instead of: INSERT INTO `Example` (`name `, `isActive`) VALUES ('Me', b'0'); 5. Apply the changes and you will see 'Me' and 1 instead of 0. Suggested fix: The "b" prefix should be added in front of the value for the BIT columns