I've Heidisql(9.2.0.4947)32 Bit
In previous version of Heidisql(8.3) Create statement of table containing bit value
was
`Active` BIT(1) NOT NULL DEFAULT b'0', or `Active` BIT(1) NOT NULL DEFAULT b'1',
Now the default value of BIT(1) filed is '' that is
`Active` BIT(1) NOT NULL DEFAULT b'',
with this statement if I execute the create statement it shows an sql error Invalid default value for 'Active'
please do the rest
Thank you in advance
Yogesh
Bit field default value
I'm noticing this same error. I can create a bit field and assign it a default value like before, but HeidiSQL no longer recognizes that value when editing the table. If I run a DESCRIBE on the table, it still sees the correct default, but HeidiSQL can't seem to parse it properly, so it's showing b''.
To reproduce, create this table:
CREATE TABLE `test` (
`test_bit` BIT(1) NULL DEFAULT b'1'
)
Then go look at the Default column for test_bit in the main editor.
To reproduce, create this table:
CREATE TABLE `test` (
`test_bit` BIT(1) NULL DEFAULT b'1'
)
Then go look at the Default column for test_bit in the main editor.
I am also encountering this bug. It is especially noticeable when you try to copy a table containing a bit field: you can't.
Bit fields are still buggy in general. They still cannot display more than 8 bits, and if a 16 bit value is set to '1 000 000 00' (9th bit set), it is displayed as '11.111.101', which is obviously not the same/actual value.
Bit fields are still buggy in general. They still cannot display more than 8 bits, and if a 16 bit value is set to '1 000 000 00' (9th bit set), it is displayed as '11.111.101', which is obviously not the same/actual value.
Also, BIT fields no longer seem to store/display comments.
When editing the BIT field, the following is logged by HeidiSQL:
`ALTER TABLE `ordersystem_order`
CHANGE COLUMN `enabled` `enabled` BIT(1) NOT NULL DEFAULT b'1' COMMENT 'Test Comment' AFTER `id`;`
But when I look at the table fields or the create code, no default value or comment:
`CREATE TABLE `ordersystem_order` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`enabled` BIT(1) NOT NULL DEFAULT b'',`
P.S. I'm using the latest build, 4949.
When editing the BIT field, the following is logged by HeidiSQL:
`ALTER TABLE `ordersystem_order`
CHANGE COLUMN `enabled` `enabled` BIT(1) NOT NULL DEFAULT b'1' COMMENT 'Test Comment' AFTER `id`;`
But when I look at the table fields or the create code, no default value or comment:
`CREATE TABLE `ordersystem_order` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`enabled` BIT(1) NOT NULL DEFAULT b'',`
P.S. I'm using the latest build, 4949.
I just updated to build 9.2.0.4953 (64 Bit)
I encouter the BIT problem still in this build. It's not possible to save a BIT field if default is other than NULL. It first looks like it's saving 0 or 1 (true or false). After save, default does not display the set value and the comment is erased. Try to reenter comment shows error message Invalide default value.
Storing data 0 or 1 (true or false) however works as expected.
I encouter the BIT problem still in this build. It's not possible to save a BIT field if default is other than NULL. It first looks like it's saving 0 or 1 (true or false). After save, default does not display the set value and the comment is erased. Try to reenter comment shows error message Invalide default value.
Storing data 0 or 1 (true or false) however works as expected.
Please login to leave a reply, or register at first.