Bug #46198 Hang after failed ALTER TABLE on partitioned table.

Submitted: 15 Jul 2009 10:21 Modified: 11 Aug 2009 11:49
Reporter: Dmitry Lenev Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.4.4-alpha OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[15 Jul 2009 10:21] Dmitry Lenev
Description:
Statements which try to access partitioned table after failed attempt to ALTER this table sometimes hang. This is repeatable for the latest snapshot of mysql-azalea tree. See How-to-repeat for details.

See also bug #45953 and bug #46137 which were initially reported as bugs against new foreign key implementation but turned out to be manifestations of this problem.

How to repeat:
# Example #1
# This is a script for mysqltest program which demonstrates the problem.

--source include/have_partition.inc

DROP TABLE IF EXISTS t2,t1;
CREATE TABLE t1 (s1 INT PRIMARY KEY) PARTITION BY HASH(s1);
LOCK TABLES t1 WRITE, t1 b READ;
UNLOCK TABLES;
--error 1512
ALTER TABLE t1 DROP PARTITION p1;
--echo # The below SELECT hangs in tdc_wait_for_old_versions()
SELECT * FROM t1;

# Example #2
# Yet another script for mysqltest program.
--source include/have_partition.inc

CREATE TABLE t1 (s1 VARCHAR(5) PRIMARY KEY) PARTITION BY KEY(s1);
LOCK TABLES t1 WRITE, t1 b READ;
UNLOCK TABLES;
--error 1503
ALTER TABLE t1 ADD COLUMN (s3 VARCHAR(5) UNIQUE);
--echo # The below SELECT also hangs in the same place.
SELECT * FROM t1;
[15 Jul 2009 11:31] MySQL Verification Team
Thank you for the bug report. Verified as described.

mysql> ALTER TABLE t1 DROP PARTITION p1;
ERROR 1512 (HY000): DROP PARTITION can only be used on RANGE/LIST partitions
mysql> SELECT * FROM t1;
Query aborted by Ctrl+C
ERROR 1317 (70100): Query execution was interrupted
[29 Jul 2009 12:57] Alexander Nozdrin
This is a duplicate of Bug#40181.
I'll add a test case for this bug.
[11 Aug 2009 11:37] 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/80571

3525 Alexander Nozdrin	2009-08-11
      A test case for Bug#46198 (Hang after failed ALTER TABLE on partitioned table).
[11 Aug 2009 11:49] Alexander Nozdrin
A test case was pushed into mysql-pe.
Closing as a duplicate.
[11 Aug 2009 17:52] 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/80624

3526 Alexander Nozdrin	2009-08-11
      A test case for Bug#46198 (Hang after failed ALTER TABLE on partitioned table).
[14 Sep 2009 16:05] Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090914155317-m1g9wodmndzdj4l1) (version source revid:alik@sun.com-20090914155317-m1g9wodmndzdj4l1) (merge vers: 5.4.4-alpha) (pib:11)
[19 May 2010 12:31] 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/108620

3050 Alexander Nozdrin	2010-05-19
      Backport test cases for Bug#46198 and Bug#38054
      from 6.0 to trunk-bugfixing.
[20 May 2010 10:03] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100520100225-oe4iuu5kuzsx0knq) (version source revid:alik@sun.com-20100520100057-rmn5y3o3ij726bm7) (merge vers: 6.0.14-alpha) (pib:16)
[20 May 2010 10:04] Bugs System
Pushed into 5.5.5-m3 (revid:alik@sun.com-20100520100041-rf8ujv598zf86wjt) (version source revid:alik@sun.com-20100520100041-rf8ujv598zf86wjt) (merge vers: 5.5.5-m3) (pib:16)
[20 May 2010 10:05] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100520100140-5bzrtadw4w419i3m) (version source revid:alik@sun.com-20100520100049-1njm09rkvnhmysnr) (pib:16)

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

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