Bug #16871 Won't allow me set default value of zero
Submitted: 28 Jan 2006 17:30 Modified: 21 Nov 2006 11:18
Reporter: Neal Hudson Email Updates:
Status: Closed Impact on me:
Category:MySQL Query Browser Severity:S2 (Serious)
Version:1.1.19 OS:Windows (Win XP SP2)
Assigned to: Mike Lischke CPU Architecture:Any
Tags: Result Set

[28 Jan 2006 17:30] Neal Hudson

I was previously using v1.1.17 of MySQL Query Browser, and was able to define a field in the MySQL Table Editor as a TINYINT(1) with a default value of 0. In v1.1.19 when I try to do this, when I put in the default value as 0 it's gets replaced with NULL. 

Is this a bug or has v1.1.19 been designed like this?

Best regards,
Neal Hudson

How to repeat:
Open MySQL Table Editor in v1.1.19 on an existing table (right-click on table and select Edit Table)
Create new column, define as TINYINT(1)
Click off Not Null
Click off Unsigned
Enter 0 for default value and press enter

Gets set to NULL
[28 Jan 2006 18:39] Jorge del Conde
Thanks for your bug report.  I was able to repeat this using the provided steps under 1.1.19
[8 Mar 2006 10:43] Robin Layfield
I have spotted something similar in the 1.1.20 release (same platform):

if you create a table using the table editor and try to set default values for fields, you can only put a value in if you have NOT NULL ticked.

If you enter a value when NOT NULL is not ticked, it is replaced with [null] as soon as you move away from the field. I think this applies across all field types.

conversely, if you tick NOT NULL after you have done the step above, the value you previously entered appears again.

When you apply changes, the Default statement only appears in the generated SQL if NOT NULL was ticked.
[19 Oct 2006 14:01] [ name withheld ]
This problem seem to still be there in the latest build.
[21 Nov 2006 11:18] Mike Lischke
Thank you for your bug report. This issue has already been fixed in the latest released version of that product, which you can download at