Bug #26811 Symbolic links don't work in Windows Vista
Submitted: 2 Mar 2007 23:08 Modified: 9 Jan 2008 14:16
Reporter: Tom Byars Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Errors Severity:S2 (Serious)
Version:5.1.16-beta-community-nt OS:Windows (Windows Vista/XP)
Assigned to: Iggy Galarza CPU Architecture:Any
Tags: bfsm_2007_10_18

[2 Mar 2007 23:08] Tom Byars
Description:
Bought a new laptop with Vista Business o/s. Installed MySQL 5.1.16. Copied my data from old laptop (to the same named drives/folders) as well as the two .sym files that pointed to them (placed in the MySQL Data folder). Now, whenever I run Admimistrator or Query Browser the two databases corresponding to the two .sym files show in the Schemata list but, attempting to open either of them leads to an 'Unknown database' error message. 

The two .sym files are definitely pointing to the correct drives and folders. Also, if I copy either of the folders containing the two databases into the MySQL Data folder I can access the database in Administrator/QueryBrowser so they're not corrupted or anything like that. 

Note - show variables like 'have_symlink' returns YES.

How to repeat:
Create text file Dbase.sym in Data directory containing string 'c:/Dbase' and create a folder called 'Dbase' in c:.

Start Query Browser. Dbase will appear in schemata list on right hand side of window. Double click on Dbase and you'll get the 'Unknown database' message.
[5 Mar 2007 21:33] MySQL Verification Team
Thank you for the bug report. I was able to repeat not only on
Windows Vista but on XP too.

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.16-beta-community-nt MySQL Community Server (GPL)

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

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| DBase              |
| db1                |
| mysql              |
| test               |
+--------------------+
5 rows in set (0.00 sec)

mysql> use DBase
ERROR 1049 (42000): Unknown database 'dbase'
mysql>

Microsoft Windows [versão 6.0.6000]
Copyright (c) 2006 Microsoft Corporation. Todos os direitos reservados.

c:\>c:\5.1\bin\mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.17-beta-nt Source distribution

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

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| DBase              |
| mysql              |
| test               |
+--------------------+
4 rows in set (0.08 sec)

mysql> use DBase
ERROR 1049 (42000): Unknown database 'dbase'
mysql>

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.27-community-nt

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

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| DBase              |
| mysql              |
| test               |
+--------------------+
4 rows in set (0.00 sec)

mysql> use DBase
Database changed
mysql> show tables;
+-----------------+
| Tables_in_dbase |
+-----------------+
| t1              |
+-----------------+
1 row in set (0.00 sec)

mysql>
[5 Nov 2007 19:21] Reggie Burnett
looks ok to me
[14 Dec 2007 20:51] 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/40033

ChangeSet@1.2642, 2007-12-14 15:49:51-05:00, iggy@amd64.(none) +1 -0
  Bug#26811 Symbolic links don't work in Windows Vista
  - Enable check for symbolic link files.
[22 Dec 2007 14:26] Bugs System
Pushed into 6.0.5-alpha
[22 Dec 2007 14:32] Bugs System
Pushed into 5.1.23-rc