Description:
When executing a SQL statement that selects rows from a table which contains a column with type "bit", then editing the results in the result grid (either an insert or an update), workbench produces a sql statement that is rejected by the database.
Have tried both "true" and "1" as the value. In prior versions of workbench, "1" and "0" both worked for bit columns. In this version, it is placing the 1 into a string literal... as in
SET `bit_column`='0' instead of SET `bit_column`=0
How to repeat:
create table test_changing_bit_column
(
pk int auto_increment not null primary key,
is_happy bit not null
) engine=InnoDb;
select * from test_changing_bit_column;
In the "Result Grid" attempt to insert a row and type the value "1" into the is_happy field.
An error is received:
Operation failed: There was an error while applying the SQL script to the database.
Executing:
INSERT INTO `[dbnamehere]`.`test_changing_bit_column` (`is_happy`) VALUES ('1');
ERROR 1406: 1406: Data too long for column 'is_happy' at row 1
SQL Statement:
INSERT INTO `[dbnamehere]`.`test_changing_bit_column` (`is_happy`) VALUES ('1')
Description: When executing a SQL statement that selects rows from a table which contains a column with type "bit", then editing the results in the result grid (either an insert or an update), workbench produces a sql statement that is rejected by the database. Have tried both "true" and "1" as the value. In prior versions of workbench, "1" and "0" both worked for bit columns. In this version, it is placing the 1 into a string literal... as in SET `bit_column`='0' instead of SET `bit_column`=0 How to repeat: create table test_changing_bit_column ( pk int auto_increment not null primary key, is_happy bit not null ) engine=InnoDb; select * from test_changing_bit_column; In the "Result Grid" attempt to insert a row and type the value "1" into the is_happy field. An error is received: Operation failed: There was an error while applying the SQL script to the database. Executing: INSERT INTO `[dbnamehere]`.`test_changing_bit_column` (`is_happy`) VALUES ('1'); ERROR 1406: 1406: Data too long for column 'is_happy' at row 1 SQL Statement: INSERT INTO `[dbnamehere]`.`test_changing_bit_column` (`is_happy`) VALUES ('1')