Bug #11978 using windows.sym cannot repair index files with 'REPAIR TABLE..USE_FRM option
Submitted: 16 Jul 2005 0:12 Modified: 16 Jul 2005 0:40
Reporter: Teruyoshi Hazama Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.12a OS:Windows (Windows XP Professional)
Assigned to: CPU Architecture:Any

[16 Jul 2005 0:12] Teruyoshi Hazama
Description:
If we use windows.sym, we cannot repair index files by using 'REPAIR TABLE with USE_FRM option'.

How to repeat:
1. create windows symbolic link to the database, for example "symtest"
2. create table with MyISAM on symtest, for example "t1"
3. stop the server
4. remove the index file form target directory, in this case I removed from "t1.MYI" from the directory.
5. start the server
6. then check the target table.

mysql> check table t1;
+------------+-------+----------+--------------------------------------+
| Table      | Op    | Msg_type | Msg_text                             |
+------------+-------+----------+--------------------------------------+
| symtest.t1 | check | error    | Can't find file: 't1.MYI' (errno: 2) |
+------------+-------+----------+--------------------------------------+
1 row in set (0.00 sec)

7. try to repair table with "USE_FRM" option.

mysql> repair table t1 USE_FRM;
+------------+--------+----------+--------------------------------------+
| Table      | Op     | Msg_type | Msg_text                             |
+------------+--------+----------+--------------------------------------+
| symtest.t1 | repair | error    | Can't find file: 't1.MYI' (errno: 2) |
+------------+--------+----------+--------------------------------------+
1 row in set (0.01 sec)

8.  no matter how many times I did, I cannot repair the table on windows.symlink database.  

Suggested fix:
This behavior doesn't show up on "Not using windows Symlink".
[16 Jul 2005 0:40] MySQL Verification Team
Testing with 4.1.13 server build from BK source, I was unable
to repeat:

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

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

mysql> check table t1;
+-----------+-------+----------+--------------------------------------+
| Table     | Op    | Msg_type | Msg_text                             |
+-----------+-------+----------+--------------------------------------+
| mytest.t1 | check | error    | Can't find file: 't1.MYI' (errno: 2) |
+-----------+-------+----------+--------------------------------------+
1 row in set (0.00 sec)

mysql> repair table t1 USE_FRM;
+-----------+--------+----------+----------+
| Table     | Op     | Msg_type | Msg_text |
+-----------+--------+----------+----------+
| mytest.t1 | repair | status   | OK       |
+-----------+--------+----------+----------+
1 row in set (0.03 sec)

mysql> exit
Bye

C:\mysql\bin>type c:\mysql\data\mytest.sym
c:\mytest

C:\mysql\bin>dir c:\mytest
 O volume na unidade C não tem nome.
 O número de série do volume é 0465-CD10

 Pasta de c:\mytest

15/07/2005  21:34    <DIR>          .
15/07/2005  21:34    <DIR>          ..
15/07/2005  21:32             8.556 t1.frm
15/07/2005  21:34                 0 t1.MYD
15/07/2005  21:34             1.024 t1.MYI
               3 arquivo(s)          9.580 bytes
               2 pasta(s) 27.871.473.664 bytes disponíveis