Bug #11 REPAIR ... USE_FRM; corrupts table under Windows

Submitted: 2 Dec 2002 21:07 Modified: 21 Dec 2002 8:42
Reporter: Alexander Keremidarski Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0.5 and above OS:Windows (Windows2000)
Assigned to: MySQL Verification Team CPU Architecture:Any

[2 Dec 2002 21:07] Alexander Keremidarski
Description:
Win2000 Sp3
NTFS

MySQL-4.0.5

When trying to repair tables with using REPAIR TABLE tbl USE_FRM; syntax REPAIR fails with error message and leaves table in corrupted state as well as temporary file with old content

How to repeat:
mysql> CREATE TABLE t (t int);
Query OK, 0 rows affected (0.06 sec)
mysql> INSERT t VALUES(1);
Query OK, 1 row affected (0.00 sec)
mysql> REPAIR TABLE t USE_FRM;
+---------+--------+----------+------------------------------------+
| Table   | Op     | Msg_type | Msg_text                           |
+---------+--------+----------+------------------------------------+
| TBGv2.t | repair | error    | Failed renaming .MYD file          |
+---------+--------+----------+------------------------------------+

At this point:
t.MYD is 0 bytes

There is old .MYD left with temp name like:
t.MYD-270_2
[21 Dec 2002 8:42] MySQL Developer
Fixed in 4.0.6

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.038 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.