Bug #1419 MySQL allows empty index names
Submitted: 28 Sep 2003 15:36 Modified: 16 Oct 2003 5:27
Reporter: Paul DuBois Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:3.23, 4.x OS:
Assigned to: Bugs System CPU Architecture:Any

[28 Sep 2003 15:36] Paul DuBois
Description:
MySQL does not allow empty identifiers as table
or column names:

mysql> CREATE TABLE `` (i INT);
ERROR 1103: Incorrect table name ''
mysql> CREATE TABLE t (`` INT);
ERROR 1166: Incorrect column name ''

However, it *does* allow empty index names:

mysql> CREATE TABLE t (i INT, INDEX `` (i));
Query OK, 0 rows affected (0.00 sec)

mysql> SHOW CREATE TABLE t;
+-------
+-----------------------------------------------------------------------------+
| Table | Create Table                                                                |
+-------
+-----------------------------------------------------------------------------+
| t     | CREATE TABLE `t` (
  `i` int(11) default NULL,
  KEY `` (`i`)
) TYPE=MyISAM |
+-------
+-----------------------------------------------------------------------------+

Empty alias names are allowed, too, by the way.

How to repeat:
See above.
[16 Oct 2003 5:27] Victor Vagin
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

see 
bk commit - 4.1 tree (1.1609)