Bug #45396 Default NULL values not uppercased
Submitted: 9 Jun 2009 10:35 Modified: 5 Feb 2013 14:53
Reporter: Karsten Wutzke Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.1.12, 5.2.1alpha OS:Any
Assigned to: CPU Architecture:Any
Tags: DEFAULT, null, uppercase

[9 Jun 2009 10:35] Karsten Wutzke
Description:
Default NULL values aren't uppercased.

When specifiying the column data types the entered string is validated. Reserved keywords like INTEGER, INT, BOOLEAN etc. get uppercased as is the standard. NULL default values aren't.

How to repeat:
"Edit Table...", change default column value to null.

Suggested fix:
Check the default value for "NULL" and uppercase it.

There's a problem however:

Did the user mean NULL as a "null pointer" or "NULL" as a string? It's up to you to sort that out... ;-)
[9 Jun 2009 11:10] Karsten Wutzke
Maybe you should require people to enter the quotes for string as in SQL code...
[9 Jun 2009 11:20] MySQL Verification Team
Thank you for the bug report.
[12 Jun 2009 6:10] Karsten Wutzke
You might want to add a NULL value checkbox to the left of the default value. If that is checked, disable (and clear?) the textfield for the default value (meaning it's NULL). If unchecked, enable textfield. Entering a value in the textfield essentially means 'value', such as 'NULL'.

Of course, this checkbox is disabled und *unchecked* for all NOT NULL columns.

A change to the column definition from NULL to NOT NULL should disable and uncheck that checkbox.

Maybe this is a start.
[12 Jun 2009 6:14] Karsten Wutzke
You might want to add such a checkbox to the right of the default value, because of the column flags RFE I submitted:

http://bugs.mysql.com/bug.php?id=45397

If the NN flag is made the last before the default value text field, it might just be perfect next to the NN flag *or* because it is so near, it just confuses the user... hard to say.
[15 Oct 2009 6:47] Susanne Ebrecht
I think the best solution here is like Karsten descriped it.
[5 Feb 2013 14:53] Alfredo Kojima
In current version of WB, this would not be a bug since we do not touch what the user types in the default value field.