Bug #57142 | Repeatedly dropping/creating database results in corrupt key index in myisam | ||
---|---|---|---|
Submitted: | 30 Sep 2010 13:50 | Modified: | 7 Nov 2010 20:48 |
Reporter: | James Ravn | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | MySQL Server: MyISAM storage engine | Severity: | S2 (Serious) |
Version: | 5.1.51 | OS: | MacOS (10.6) |
Assigned to: | CPU Architecture: | Any | |
Tags: | corruption, key, myisam |
[30 Sep 2010 13:50]
James Ravn
[5 Oct 2010 19:23]
Sveta Smirnova
Thank you for the report. How table bar_ related to database foodb? Is it belongs to or not?
[5 Oct 2010 19:36]
James Ravn
Table bar_ is in foodb. It is recreated each time the database is dropped/created.
[5 Oct 2010 19:50]
Sveta Smirnova
thank you for the feedback. How many rows do you insert into table bar_ in each iteration? Do you run other DML statements on it?
[6 Oct 2010 17:18]
James Ravn
This particular table only gets a single entry inserted. However other tables will add many entries as a result of fixtures being loaded from tests.
[7 Oct 2010 8:49]
Richard Boaz
I am having the same issue when creating a table via C client calls (though i think this is irrelevant). Identical to the original poster: -) i have no issues on other non-mac platforms -) stopping and restarting the server solves the problem until it randomly appears again -) this happens on different tables, i.e., seemingly random -) problem is recognized by trying to insert a single row immediately after table creation, (resulting in error message: "Error: Incorrect key file for table 'chnmeta'; try to repair it", or -) problem also occurs after table creation followed by Alter Table command, same error as previous -) this is old code that has been working successfully for years until now "show table status", immediately after table creation, indicates the table does exist, but also indicates all fields are = NULL. i assume this means that the create table request itself has not successfully completed? (even though the create table SQL itself throws no error, one sees the problem only after attempting to access the table in some way.) my version details: mac os: 10.6.4 mysql: 5.1.47
[7 Oct 2010 20:48]
Sveta Smirnova
Thank you for the feedback. I can not repeat described behavior using script: $cat bug57142.sh #!/bin/bash ~/host/build/mysql-5.1/bin/mysql -uroot -S /tmp/mysql_ssmirnova.sock -e "drop database if exists foodb; create database foodb; use foodb; CREATE TABLE IF NOT EXISTS bar_ ( a VARCHAR(255) BINARY, b TIMESTAMP NOT NULL, INDEX(b), c INT NOT NULL, INDEX(c), d BIGINT UNSIGNED PRIMARY KEY, e bigint(20), f bigint(20), g bigint(20), h TINYINT NOT NULL, i VARCHAR(255) BINARY NOT NULL UNIQUE, j VARCHAR(255) BINARY NOT NULL, k INT, INDEX(a) ); INSERT INTO bar_ (a, b, c, d, i, j, h) VALUES (null, now(), 10513, 1, 'default', 'Default', true); " And if I run it as for i in `seq 1 1 1000000`; do ./bug57142.sh ; done Please try to create public test case we can repeat the problem with.
[8 Nov 2010 0: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".