Bug #39422 after kill processs > mysql - replication tables crash > automatic repair fails
Submitted: 12 Sep 2008 16:10 Modified: 13 Oct 2008 20:09
Reporter: Wolfgang Purrer Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Partitions Severity:S1 (Critical)
Version:5.1.26 OS:Windows (2003 sp2)
Assigned to: CPU Architecture:Any

[12 Sep 2008 16:10] Wolfgang Purrer
Description:
I created a partion like this

ALTER TABLE zzzz
    PARTITION BY range(to_days(zeitpunkt)) (
      Partition p2006 values less than (to_days('2007-01-01 00:00:00')),
      Partition p2007_01 values less than (to_days('2007-02-01 00:00:00')),
      Partition p2007_02 values less than (to_days('2007-03-01 00:00:00')),
....
      Partition p2007_06 values less than (to_days('2007-07-01 00:00:00')),
      Partition p2007_12 values less than (to_days('2008-01-01 00:00:00')),
      Partition p2008_12 values less than (to_days('2009-01-01 00:00:00')),
      Partition rest values less than (maxvalue)
    );

and got after i killed an insert command the following message (repeatedly .. a couple of times per second)

C:\Programme\MySQL\MySQL Server 5.1\bin\mysqld: Table '.\xxx\zzz#P#p2006' is marked as crashed and last (automatic?) repair failed

=>  with every command (select, show table,repair commands) i got the message above 

=> i try to use the repair command for the partion ... same message (also with the partition repair - commands (ALTER TABLE zzz REBUILD PARTITION p2006), alter table zzz repair...);

i was so lucky, that i have tested the upgrade before .. on my test machine so i had all the empty partition files which i copied over the exisiting files .. p2006 was not enough..) he asked my for every empty partition ?? 

=> why does the repair and rebuild fail???  => they should give me a working partition

=> why is there no access to the other partions ?? 

=> even drop partition doesn't work

How to repeat:
* then i tried to insert data from a second table (where i stored the data from 2007 and 2006, before i used the partition feature)

 insert into zzz select * from zzz2006

* then i recognized that this causes a table lock ... so i killed the thread.

* the i got the message C:\Programme\MySQL\MySQL Server 5.1\bin\mysqld: Table '.\xxx\zzz#P#p2006' is marked as crashed and last (automatic?) repair failed

* ALTER TABLE zzz REBUILD PARTITION p2006 fails.

Suggested fix:
* kill process should not crash all empty partions

* repair or rebuild should work

* alter table commands should work
[13 Sep 2008 20:09] MySQL Verification Team
Thank you for the bug report. Could you please provide the create table statement.
Thanks in advance.
[18 Sep 2008 5:46] MySQL Verification Team
I also couldn't repeat a corruption using my own fake table and data.  All I got was:
080917 19:08:08 [Warning] Warning: Enabling keys got errno 137 on test.t2, retrying

So we really do need the original table structure.
[13 Oct 2008 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".