Description:
----[For better reports, please attach the log file after submitting. You can find it in C:\Users\VM-User\AppData\Roaming\MySQL\Workbench\log\wb.log]
When records are modified /added in WorkBench, and there is a binary field (bit field), the program adds a letter b infornt of the field. (e.g. b'1' or b'0'). It then keeps adding a b infornt of all other fields in the subsequent code.
e.g.
insert into test(varcharfield1, bitfield, varcharfield2) values ('value', b'1', b'value2');
Insert into testvarcharfield1, bitfield, varcharfield2) values (b'value3', b'0', b'value4');
Obviously, MySQl reports an error when trying to insert these records because the binay fields are funny and are not compatible with the varchar fields.
One has to edit out the extra Bs from the query presented.
How to repeat:
Create table testtable(field1 int, field2 varchar(10), field3 bit, field4 text);
Then open the table in workBench editor and add data manually. Click APPLY and inspect the SQL created by workbench
Suggested fix:
The extra b letters should not be appended to the data being inserted into fields that are not binary.
Description: ----[For better reports, please attach the log file after submitting. You can find it in C:\Users\VM-User\AppData\Roaming\MySQL\Workbench\log\wb.log] When records are modified /added in WorkBench, and there is a binary field (bit field), the program adds a letter b infornt of the field. (e.g. b'1' or b'0'). It then keeps adding a b infornt of all other fields in the subsequent code. e.g. insert into test(varcharfield1, bitfield, varcharfield2) values ('value', b'1', b'value2'); Insert into testvarcharfield1, bitfield, varcharfield2) values (b'value3', b'0', b'value4'); Obviously, MySQl reports an error when trying to insert these records because the binay fields are funny and are not compatible with the varchar fields. One has to edit out the extra Bs from the query presented. How to repeat: Create table testtable(field1 int, field2 varchar(10), field3 bit, field4 text); Then open the table in workBench editor and add data manually. Click APPLY and inspect the SQL created by workbench Suggested fix: The extra b letters should not be appended to the data being inserted into fields that are not binary.