Bug #17810 REPAIR says ok, CHECK says broken (repeatable)
Submitted: 1 Mar 2006 0:35 Modified: 3 Jul 2006 16:22
Reporter: Christian Hammers (Silver Quality Contributor)
Status: Closed
Category:Server: MyISAM Severity:S3 (Non-critical)
Version:5.0 OS:Linux (Debian GNU/Linux)
Assigned to: Sergey Vojtovich Target Version:
Tags: corruption, myisam

[1 Mar 2006 0:35] Christian Hammers
Description:
Hello

I have a Debian bug here (#354300) because of a table that is reported broken after each
CHECK TABLE and ok after each REPAIR TABLE. The case is reproducible and I will attach
that table.

bye,

-christian-

How to repeat:
mysql> CHECK TABLE searchindex ;
+------------------+-------+----------+------------------------------------+
| Table            | Op    | Msg_type | Msg_text                           |
+------------------+-------+----------+------------------------------------+
| test.searchindex | check | error    | Key in wrong position at page 4096 |
| test.searchindex | check | error    | Corrupt                            |
+------------------+-------+----------+------------------------------------+
2 rows in set (0.00 sec)

mysql> REPAIR TABLE searchindex EXTENDED ;
+------------------+--------+----------+----------+
| Table            | Op     | Msg_type | Msg_text |
+------------------+--------+----------+----------+
| test.searchindex | repair | status   | OK       |
+------------------+--------+----------+----------+
1 row in set (0.08 sec)

mysql> CHECK TABLE searchindex EXTENDED ;
+------------------+-------+----------+------------------------------------+
| Table            | Op    | Msg_type | Msg_text                           |
+------------------+-------+----------+------------------------------------+
| test.searchindex | check | error    | Key in wrong position at page 4096 |
| test.searchindex | check | error    | Corrupt                            |
+------------------+-------+----------+------------------------------------+

Suggested fix:
obvious :)
[1 Mar 2006 0:36] Christian Hammers
Broken tables

Attachment: searchindex.tgz (application/x-gtar, text), 65.92 KiB.

[1 Mar 2006 2:47] Hartmut Holzgraefe
verified with rather current 5.0bk (about 2 weeks old)
[5 Apr 2006 11:50] Jan Schmidt
Suffering the exact same bug, also on a mediawiki searchindex table. 

MySql server version here is: 5.0.18-Debian_8bpo1-log
[27 Apr 2006 9: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/5625
[6 May 2006 11:10] Sergey Vojtovich
Fixed in 5.0.21, 5.1.10.
[8 May 2006 20:41] Paul DuBois
Noted in 5.0.21, 5.1.10 changelogs.

<literal>REPAIR TABLE</literal> did not restore the length for
packed keys in tables created under MySQL 4.x. (Bug #17810)
[17 May 2006 17:08] Korbinian Rosenegger
Hi

I just downloaded the sources of 5.0.21 and this bug is NOT fixed in this relase!
The source .tar.gz is packed on Apr 26 20:31, the bugfix was commited on Apr 27 09:51.

cu Korbi
[17 May 2006 17:51] Paul DuBois
Looks like the change went into 5.0.22, not 5.0.21.
I've moved the change note.
[1 Jul 2006 13:25] Manuel Kiessling
I have this bug in 5.0.22, too. I upgraded from 4.0.24 to 5.0.22 (providing 5.0 with the
data files of 4.0, no dumping etc.) on Debian GNU/Linux 3.1 (Sarge), Kernel 2.6.16.9 SMP,
and had this behaviour with one of my MYISAM tables.

However, copying the whole table, then deleting it, then copying the backup table to the
original name fixed the issue.
[3 Jul 2006 15:14] Sergey Vojtovich
5.0.22 was a security fix release. Expect fix in 5.0.23.
[3 Jul 2006 16:22] Paul DuBois
Change note is in 5.0.23.