[MDEV-2410] LP:925377 - Querying myisam table metadata while 'alter table..enable keys' is running may corrupt the table Created: 2012-02-02 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Andrei Laki (Inactive) | Assignee: | Michael Widenius |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
In MariaDB 5.3.3 tables are reported as corrupted in the server log when metadata queries like "show table status like 'tablename'" or "select ..from information_schemna where table_schema = 'dbname' I can consistently replicate the problem in MariaDB 5.3.3 (mariadb-5.3.3-rc-Linux-x86_64.tar.gz) running on RHEL 5.7 and RHEL 6.1. An error like [ERROR] mysqld: Table './dbname/tablename' is marked as crashed and should be repaired gets logged in the server log just as the metadata query is getting submitted. The query remains in a "Waiting for table" state and will return only after the "alter table enable keys" query ends. Use this script to reproduce the problem: #!/bin/sh HOST=localhost function generate_file { function run_cmd { generate_file run_cmd "drop table if exists $TABLE" run_cmd "alter table $TABLE enable keys" & |
| Comments |
| Comment by Elena Stepanova [ 2012-02-08 ] | |
|
Re: Querying myisam table metadata while 'alter table..enable keys' is running may corrupt the table mi_open.c:64: test_if_reopen: Assertion `strcmp(share->unique_file_name,filename) || share->last_version' failed. #8 0xb759a014 in __assert_fail () from /lib/libc.so.6 Query (0x945dc08): SHOW TABLE STATUS LIKE 'bug925377' bzr version-info
--connect(con1,localhost,root,,)
| |
| Comment by Michael Widenius [ 2012-02-28 ] | |
|
Re: Querying myisam table metadata while 'alter table..enable keys' is running may corrupt the table | |
| Comment by Rasmus Johansson (Inactive) [ 2012-04-25 ] | |
|
Re: Querying myisam table metadata while 'alter table..enable keys' is running may corrupt the table [mysqld]
collation_server = utf8_unicode_ci
key_buffer = 276M [mysqld_safe] | |
| Comment by Rasmus Johansson (Inactive) [ 2012-04-25 ] | |
|
This bug appears to be present still on 5.3.6 - possibly not during ENABLE|DISABLE keys but immediately before drop. see my.cnf below and Ruby script for test case. [mysqld]
collation_server = utf8_unicode_ci
key_buffer = 276M [mysqld_safe] | |
| Comment by Jason Parrott (Inactive) [ 2012-04-26 ] | |
|
Re: Querying myisam table metadata while 'alter table..enable keys' is running may corrupt the table 120426 11:32:39 [ERROR] mysqld: Table './test/customer46' is marked as crashed and should be repaired Elena, would you rather I open a new bug report? | |
| Comment by Elena Stepanova [ 2012-04-26 ] | |
|
Re: Querying myisam table metadata while 'alter table..enable keys' is running may corrupt the table Yes, if it's not too much trouble, please do open a new bug report. | |
| Comment by Jason Parrott (Inactive) [ 2012-04-26 ] | |
|
Re: Querying myisam table metadata while 'alter table..enable keys' is running may corrupt the table | |
| Comment by Rasmus Johansson (Inactive) [ 2012-04-26 ] | |
|
Launchpad bug id: 925377 |