Bug #51138 | unknown database name when using some (soft link) names | ||
---|---|---|---|
Submitted: | 12 Feb 2010 11:30 | Modified: | 21 Feb 2010 10:00 |
Reporter: | yoav morag | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.1.37-1ubuntu5 (Ubuntu), 5.1.45, 5.5.99 | OS: | Linux (64 bit,ec2 machine) |
Assigned to: | CPU Architecture: | Any | |
Tags: | Database name, error, regression, ubuntu |
[12 Feb 2010 11:30]
yoav morag
[13 Feb 2010 11:22]
Sveta Smirnova
Thank you for the report. Verified as described. Not repeatable with version 5.0. Test case for the test suite: --exec mkdir $MYSQL_TEST_DIR/var/tmp/COM2 --exec mkdir $MYSQL_TEST_DIR/var/tmp/COM3 --exec mkdir $MYSQL_TEST_DIR/var/tmp/COM666 --let $MYSQLD_DATADIR=`select @@datadir` --exec ln -s $MYSQL_TEST_DIR/var/tmp/COM2 $MYSQLD_DATADIR/COM2 --exec ln -s $MYSQL_TEST_DIR/var/tmp/COM3 $MYSQLD_DATADIR/COM3 --exec ln -s $MYSQL_TEST_DIR/var/tmp/COM666 $MYSQLD_DATADIR/COM666 --exec ls -l $MYSQLD_DATADIR show databases; --error 1049 show tables from COM2; --error 1049 show tables from COM3; show tables from COM666;
[13 Feb 2010 11:24]
Sveta Smirnova
Repeatable since very early 5.1 versions, so this is not recent regression.
[13 Feb 2010 11:55]
MySQL Verification Team
related: bug #17870
[18 Feb 2010 22:16]
Omer Barnir
COMn LPTn etc are reserved words in Windows so when handled directly MySQL ads @@@ to the names which does not work with Direct soft links. Although these are devices in Windows - MySQL views these as reserved words on all platforms, to avoid issues with application migration and platform dependencies.
[21 Feb 2010 10:00]
yoav morag
nice, no problems with this policy - but MySQL should report a proper error when trying to access one of these illegal db name, or disallow using these names altogether (i.e. eliminate the @@@ trick).