Bug #44413 Make BOOL, BOOLEAN and FIXED reserved keywords (update the docs!)
Submitted: 23 Apr 2009 1:08 Modified: 29 Apr 2009 9:19
Reporter: Karsten Wutzke Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.x, 6.x OS:Any
Assigned to: CPU Architecture:Any
Tags: reserved keywords bool boolean fixed

[23 Apr 2009 1:08] Karsten Wutzke
Description:
I'm referring to a bug in MySQL workbench that led to this docs bug report:

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

In the list of reserved keywords

http://dev.mysql.com/doc/mysqld-version-reference/en/mysqld-version-reference-reservedword...

the aliases

http://dev.mysql.com/doc/refman/5.0/en/other-vendor-data-types.html

are mostly present. However for

BOOL
BOOLEAN
FIXED

keywords this isn't true.

They may be the missing because they aren't supposed to be reserved keywords in the server. Then however, they would still be *non-reserved keywords* as they have a special meaning in certain contexts as seen by the parser. For BOOL and BOOLEAN, I think it's really best to put them into the reserved keywords list. It's probably a good thing to do for the other missing aliases, especially FIXED.

I tried a few things on the MySQL client. Indeed, the tables

FLOAT4, FLOAT8, ..., NUMERIC

can't be created (CREATE TABLE ...), so these aliases are already reserved keywords.

Tables BOOL, BOOLEAN and FIXED

OTOH *can* be created, so they are no reserved keywords (rather non-reserved keywords!), even though they have some special meaning in MySQL. These should be put into the list of reserved keyword (SERVER *and* DOCS!).

The remaining table names CHARACTER VARYING(M), LONG VARBINARY and LONG VARCHAR produce errors of course. I don't know what to do with these. They don't really qualify as keywords at all (parentheses and/or spaces).

Note: The strange thing is that BOOL, BOOLEAN, and FIXED are already in the MySQL Workbench but *not* in the server or the docs..........

How to repeat:
see above

Suggested fix:
Put BOOL, BOOLEAN, and FIXED into the list of reserved keywords on both the server and the docs.
[29 Apr 2009 9:19] Sveta Smirnova
Thank you for the report.

There is feature request bug #24531about implementing BOOLEAN datatype. Before fixing it I don't believe there is sense to make BOOLEAN and others reserved keywords. And they are listed in the user manual.