Bug #17870 Table names conflict with Windows device names
Submitted: 2 Mar 2006 18:03 Modified: 19 Apr 2006 14:04
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.1.8-beta-debug OS:Microsoft Windows (Windows)
Assigned to: Alexander Barkov CPU Architecture:Any

[2 Mar 2006 18:03] Peter Gulutzan
Description:
In the latest version, MySQL encodes table names when
producing names for the associated files. This is a boon
for portability and removes earlier problems with special
characters. But MySQL should also encode Windows
device names: 'aux', 'nul', 'con', 'prn', 'lpt[1..9]', 'com[1..9]'

How to repeat:
/* This error occurs on Windows only. */

mysql> create table con (s1 int);
ERROR 1050 (42S01): Table 'con' already exists
[3 Mar 2006 2:39] Peter Laursen
This was fixed in 5.0 before!
http://bugs.mysql.com/bug.php?id=12325&thanks=3&notify=87
[4 Apr 2006 12:14] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/4443
[11 Apr 2006 13:23] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/4791
[19 Apr 2006 6:55] Alexander Barkov
Pushed into 5.1.10
[19 Apr 2006 14:04] Paul Dubois
Note in 5.1.10 changelog and in the section that
documents mapping of identifiers to filenames.

On Windows, some names such as <literal>nul</literal>,
<literal>prn</literal>, and <literal>aux</literal> cannot be
used as filenames because they are reserved as device names.
These are now allowable names in MySQL. They are encoded by
appending <literal>@@@</literal> to the name when the server
creates the corresponding file or directory. This occurs on
all platforms for portability of the corresponding database
object between platforms. (Bug #17870)