Bug #49973 Corrupt partitioned table after concurrent DDL / transactional LOCK TABLE

Submitted: 29 Dec 2009 11:25 Modified: 27 May 2010 9:40
Reporter: Philip Stoev Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Locking Severity:S2 (Serious)
Version:mysql-next-mr-wl3561 OS:Any
Assigned to: Ingo Strüwing CPU Architecture:Any

[29 Dec 2009 11:25] Philip Stoev
Description:
On two separate occassions, executing a DDL workload that contained transactional LOCK TABLE against the mysql-next-mr-wl3561 tree resulted in a corrupted partitioned table

mysql> select * from t1_part1_N;
ERROR 1194 (HY000): Table 't1_part1_N' is marked as crashed and should be repaired

mysql> repair table t1_part1_N extended;
+---------------------+--------+----------+------------------------------------+
| Table               | Op     | Msg_type | Msg_text                           |
+---------------------+--------+----------+------------------------------------+
| testdb_S.t1_part1_N | repair | warning  | Number of rows changed from 1 to 0 |
| testdb_S.t1_part1_N | repair | warning  | Number of rows changed from 3 to 0 |
| testdb_S.t1_part1_N | repair | status   | OK                                 |
+---------------------+--------+----------+------------------------------------+
3 rows in set (0.00 sec)

In other words, the table contained some rows, but after repair, it is now empty.

The datadir shows some files of zero length:

[philips@fedora10 testdb_S]$ ls -la | grep t1_part1
-rw-rw---- 1 philips philips 8636 2009-12-29 12:01 t1_part1_N.frm
-rw-rw---- 1 philips philips   28 2009-12-29 12:01 t1_part1_N.par
-rw-rw---- 1 philips philips    0 2009-12-29 12:01 t1_part1_N#P#p0.MYD
-rw-rw---- 1 philips philips 1024 2009-12-29 12:01 t1_part1_N#P#p0.MYI
-rw-rw---- 1 philips philips    0 2009-12-29 12:01 t1_part1_N#P#p1.MYD
-rw-rw---- 1 philips philips 1024 2009-12-29 12:01 t1_part1_N#P#p1.MYI

How to repeat:
If this is consistently repeatable, a simplified test case will be uploaded. In the meantime, the datadir will be made available for examination.
[29 Dec 2009 11:35] Philip Stoev
Datadir, containing the corrupt table before repair:

http://mysql-systemqa.s3.amazonaws.com/var-bug49973.zip
[27 May 2010 9:40] Ingo Strüwing
This had been reported against a former attempt to backport WL#3561.
It does no longer belong to any existing software any more.
In similar tests against the new backport this hasn't been seen again.

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

Page generated in 0.052 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.