Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Setting default value of BIT in MySQL

dmikester1's profile image dmikester1 posted 10 months ago in General Permalink

I have my local DB as MariaDB and am able to set the default value of the BIT column by setting the "Expression" to b'1'

Now I have the prod DB duplicated of that one except it is MySQL. But I cannot figure out how to set the default value to 1. When I try the same thing of setting the "Expression" to b'1', it converts it to "custom text" of 'b\'1\''

rednoise's profile image rednoise posted 4 months ago Permalink

I'm having the same problem and today I noticed one of my partners is using heidisql v10.3 and default value for bit columns are shown correctly as b'0' or b'1'.

If I browse the same table in v11.3 the default values are shown as 'b\'0\''. And the worst part is when you try to modify some column then heidsql can't save changes because there is an invalid default value in a bit column.

I have checked heidisql settings and cannot figure out what is causing that issue.

rednoise's profile image rednoise posted 4 months ago Permalink

I have downloaded v10.3 and v11.3 portable versions and definitely it is a bug. I attach screenshots of both versions showing the same table.

2 attachment(s):
  • v103
  • v113
rednoise's profile image rednoise posted 4 months ago Permalink

@ansgar could you please bring us some light on this issue?

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




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.