MySQL default value of bit column

[expired user #8736]'s profile image [expired user #8736] posted 9 years ago in General Permalink
There is problem with default values of BIT columns.
If you set default value to 1, after saving changes HeidiSQL shows empty default value.
In phpMyAdmin the default value is displayed correctly.
[expired user #8763]'s profile image [expired user #8763] posted 9 years ago Permalink
Thanks for fixing me...
Keep sharing.



watson
rednoise's profile image rednoise posted 9 years ago Permalink
I'm having this issue right now, what's the fix?
[expired user #5221]'s profile image [expired user #5221] posted 9 years ago Permalink
I'm having the same issue, all bit columns show default values b'' under CREATE code.

If you edit the column the code shows b'0' or b'1' correctly but upon saving it reverts back to b''
[expired user #5221]'s profile image [expired user #5221] posted 9 years ago Permalink
I forgot to add the version I was using, which was r4943

I just tested with 9.2 stable and it's broken as well: create tab shows a default value of b'' for bit columns and table editing does not work for those columns (sql error 1067: invalid default value for 'column name').

Exporting works fine tho, and produces the expected sql code with b'0' or b'1' as default values.
[expired user #8978]'s profile image [expired user #8978] posted 9 years ago Permalink
I have same problem. v 9.2.0.4960
Code modification/commit from ansgarbecker, 9 years ago, revision 9.2.0.4961
Fix wrong detection of BIT default values. See http://www.heidisql.com/forum.php?t=17862
ansgar's profile image ansgar posted 9 years ago Permalink
Fixed in r4961. Works fine here. Please update your HeidiSQL to the latest build and report back if that works for you too.
[expired user #5221]'s profile image [expired user #5221] posted 9 years ago Permalink
It does work for me now, thanks!
[expired user #8736]'s profile image [expired user #8736] posted 9 years ago Permalink
I have installed r4961 and now it works as expected. Thank you.
[expired user #8978]'s profile image [expired user #8978] posted 9 years ago Permalink
Dears,

Thank you so much! problem fixed in r4961! happy

Please login to leave a reply, or register at first.