Bug #109266 Setting a bit value causes bit-literal to be added to all non-bit cells after
Submitted: 1 Dec 2022 18:56 Modified: 2 Dec 2022 6:28
Reporter: George Williams Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:8.0.31 build 2235049 CE OS:Windows (Windows 10)
Assigned to: CPU Architecture:x86 (Ryzen 7 3900x)
Tags: bug, workbench

[1 Dec 2022 18:56] George Williams
Description:
When inserting a modifying a row in the table editor after doing a select query, if you change a bit column all non-bit cells there after will have a 'b' literal added to them when you go to apply your changes.

How to repeat:
Create a table using the following settings:

CREATE TABLE `Test` (
  `ID` int NOT NULL,
  `Name` varchar(45) DEFAULT NULL,
  `On` bit(1) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

In a query tab, type 'Select * from Test' and execute the script.

Add two new rows in the result table, filling out the bit cells.

Click on Apply Changes and review the insert statements.  You will see something similar:

INSERT INTO `TestDB`.`Test` (`Name`, `On`) VALUES ('Test', b'0');
INSERT INTO `TestDB`.`Test` (`Name`, `On`) VALUES (b'Test2', b'1');

Suggested fix:
Looks like the automation to add bit-literals is not being disabled when a bit is entered.

The fix should probably be that is doesn't add bit-literals to non bit cells.  Maybe I am crazy though.
[2 Dec 2022 6:28] MySQL Verification Team
Hello George Williams,

Thank you for the bug report.
IMHO this is duplicate of Bug #95746, please see Bug #95746

Regards,
Ashwini Patil