Bug #9898 Can create table with name 'procedure' if the fully qualified name is used.
Submitted: 14 Apr 2005 11:36 Modified: 15 Apr 2005 16:12
Reporter: Disha Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.3 OS:Any (All)
Assigned to: Sergei Golubchik CPU Architecture:Any

[14 Apr 2005 11:36] Disha
Description:
User is blocked while trying to create a table with name 'procedure'
However, he can create a table with name 'procedure' if the fully qualified name is used.

A bug was filed earlier regarding user able to create objects using reserve words. That bug was closed as 'Not a Bug' with comment that it is fine to have objects with reserved words. 

However, the behaviour mentioned in this bug causes ambiquity. It should either allow creating or not allow at all.

How to repeat:
1) Use test;
2) Create Table procedure(f1 int);
3) Create Table test.procedure(f1 int);

ACTUAL RESULT:
Error saying table cannot be creaed  on step 2. However, table created on step 3.

EXPECTED RESULT:
For both step 2 & step 3, the result should be the same.
[15 Apr 2005 16:12] Sergei Golubchik
This is not a bug either.

The logic is that test.procedure is unambiguous, just as `procedure`
(or "procedure" in ANSI_QUOTES mode) - it could be only an identifier.
That's why parser allows reserved words as identifiers if they are quoted (with
backticks or double quotes) or qualified with db or table name.

This is a very old feature, in fact, it exists since at least since 1998