Bug #8289 trying to create a database named 'prn' on a windows machine
Submitted: 3 Feb 2005 15:25 Modified: 3 Feb 2005 15:47
Reporter: [ name withheld ] Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:MySQL 4.1.8-nt OS:Windows (Windows 2000)
Assigned to: CPU Architecture:Any

[3 Feb 2005 15:25] [ name withheld ]
Description:
MySQL hangs when trying to create a database named 'prn'.  The reason appears to be that, in windows, 'prn' is a reserved name and windows will not create a directory named 'prn'.  The create database function appears to never fail, it just hangs.  MySQL should have a more helpful failure mode as the problem is terribly difficult to diagnose.  It would be doubly so if you don't have administration privileges.  FYI, here is the entire list of windows reserved filenames:

CON, AUX, COM1, COM2, COM3, COM4, LPT1, LPT2, LPT3, PRN, NUL

Now if I can just get "Professional Resource Network" to change their name...

Cheers
Mike Carney

How to repeat:
On a windows platform, perform:

create database prn

Suggested fix:
Return an error message

"Now would be a good time to consider linux."
[3 Feb 2005 15:47] MySQL Verification Team
I wasn't able to repeat the behavior reported with 4.1.9:

C:\mysql\bin>mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 4.1.9-nt

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database `prn`;
ERROR 1006 (HY000): Can't create database 'prn' (errno: 2)
mysql> create database prn;
ERROR 1006 (HY000): Can't create database 'prn' (errno: 2)
mysql>