Bug #30822 | ALTER TABLE COALESCE PARTITION causes segmentation fault | ||
---|---|---|---|
Submitted: | 5 Sep 2007 9:15 | Modified: | 13 Dec 2007 12:36 |
Reporter: | Guilhem Bichot | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Partitions | Severity: | S3 (Non-critical) |
Version: | 5.1-bk, 5.2-BK | OS: | Linux |
Assigned to: | Mattias Jonsson | CPU Architecture: | Any |
Tags: | coalesce partition, crash, partition by hash, partition by key |
[5 Sep 2007 9:15]
Guilhem Bichot
[5 Sep 2007 9:47]
Sveta Smirnova
Thank you for the report. Verified as described.
[9 Oct 2007 10:53]
Sergey Vojtovich
The problem is likely around get_part_id_from_linear_hash() function, which shouldn't return value bigger than number of partitions. Try to execute it with following arguments: get_part_id_from_linear_hash (hash_value=267, mask=31, no_parts=2) Return value will be 11, whereas it must be smaller than no_parts (that is 2). OTOH the problem may be that we don't call set_linear_hash_mask() for new partitioned table.
[9 Oct 2007 12:45]
Mikael Ronström
The error is the mask parameter, if no_parts is 2 the mask should be 1. So the bug is that mask is not updated as part of the coalesce partition call. Only the number of parts is updated, the get_linear_... call assumes that mask is set properly.
[20 Nov 2007 10:21]
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/38119 ChangeSet@1.2621, 2007-11-20 11:21:00+01:00, mattiasj@mattias-jonssons-macbook.local +5 -0 Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentation fault Problem was for LINEAR HASH/KEY. Crashes because of wrong partition id returned when creating the new altered partitions. (because of wrong linear hash mask) Solution: Update the linear hash mask before using it for the new altered table.
[20 Nov 2007 10:29]
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/38123 ChangeSet@1.2621, 2007-11-20 09:20:59+01:00, mattiasj@mattias-jonssons-macbook.local +5 -0 Bug#30822: ALTER TABLE COALESCE PARTITION causes segmentation fault Problem was for LINEAR HASH/KEY. Crashes because of wrong partition id returned when creating the new altered partitions. (because of wrong linear hash mask) Solution: Update the linear hash mask before using it for the new altered table.
[12 Dec 2007 23:00]
Bugs System
Pushed into 6.0.5-alpha
[12 Dec 2007 23:02]
Bugs System
Pushed into 5.1.23-rc
[13 Dec 2007 12:36]
Jon Stephens
Documented bugfix in 5.1.23 and 6.0.5 changelogs as: ALTER TABLE ... COALESCE PARTITION on a table partitioned by [LINEAR] HASH or [LINEAR] KEY caused the server to crash.