Bug #5539 SHOW DATABASES LIKE and symlinks
Submitted: 13 Sep 2004 12:22 Modified: 27 Sep 2004 23:25
Reporter: Victoria Reznichenko
Status: Closed
Category:Server Severity:S3 (Non-critical)
Version:4.0.21 OS:Microsoft Windows (Windows)
Assigned to: Reggie Burnett Target Version:

[13 Sep 2004 12:22] Victoria Reznichenko
Description:
SHOW DATABASES treats incorrectly with symbolic links to the database.

If I create a symlink to the database, for example "test", and then run SHOW DATABASES
LIKE, it provides incorrect result.

mysql> show databases like "mysql";
+------------------+
| Database (mysql) |
+------------------+
| mysql            |
| test             |
+------------------+
2 rows in set (0.01 sec)

How to repeat:
1. Create symbolic link to the database, for example "db1"
2. Execute query: SHOW DATABASES LIKE "another_db_name"
[14 Sep 2004 22:21] Victoria Reznichenko
It's Windows specific bug.
[16 Sep 2004 7:59] Miguel Solorzano
c:\mysql\bin>type c:\mysql\data\db1.sym
e:\db1

c:\mysql\bin>mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.0.21-nt-max

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

mysql> show databases like "db1";
+----------------+
| Database (db1) |
+----------------+
| db1            |
+----------------+
1 row in set (0.01 sec)

mysql> show databases like "mysql";
+------------------+
| Database (mysql) |
+------------------+
| db1              |
| mysql            |
+------------------+
2 rows in set (0.01 sec)

mysql> show databases like "test";
+-----------------+
| Database (test) |
+-----------------+
| db1             |
| test            |
+-----------------+
2 rows in set (0.01 sec)
[27 Sep 2004 23:25] Reggie Burnett
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

Additional info:

Changesets
ChangeSet@1.2030.1.2
ChangeSet@1.2030.1.1