Bug #34604 | handler::ha_rnd_end(): Assertion `inited==RND' failed. | ||
---|---|---|---|
Submitted: | 15 Feb 2008 17:07 | Modified: | 8 Mar 2010 14:51 |
Reporter: | Philip Stoev | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Partitions | Severity: | S3 (Non-critical) |
Version: | 5.1+ | OS: | Any |
Assigned to: | Mattias Jonsson | CPU Architecture: | Any |
[15 Feb 2008 17:07]
Philip Stoev
[3 Apr 2008 12:01]
Mattias Jonsson
Can be reproduced with this: create table t2 (ai INT AUTO_INCREMENT, comment varchar(255), primary key (ai)) engine = innodb partition by hash (ai) partitions 2; transaction 1: start transaction; insert into t2 values (NULL, 'first row t2'); transaction 2 (will hang): alter table t2 auto_increment = 10; transaction 1: insert into t2 values (NULL, 'second row t2'); Now it is deadlocked, and after the timeout it will crash on: Assertion failed: (inited==RND), function ha_rnd_end, file handler.h, line 1179. (latest 5.1-engines)
[9 Apr 2008 12:49]
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/45125 ChangeSet@1.2576, 2008-04-09 14:48:42+02:00, mattiasj@witty. +1 -0 Bug#34604: hander::ha_rnd_end(): Assertion inited==RND failed In some cases error was not properly propagated through ha_partition::rnd_next. Will now return the error code from the partitions rnd_next and update m_part_spec.start_part and m_last_part properly. This makes the inited state to be correct.
[9 Apr 2008 12:51]
Mattias Jonsson
Philip, I did not find the test that you ran, could you please try to verify this patch if it also solves your test?
[9 Apr 2008 13:00]
Philip Stoev
Mattias: the test is very long and non-deterministic. I will be running it for 6.0.5 this month, and I will update the bug if I see the issue again.
[9 May 2008 5:38]
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/46547 ChangeSet@1.2656, 2008-05-09 07:38:29+02:00, mattiasj@witty. +1 -0 Bug#34604: hander::ha_rnd_end(): Assertion inited==RND failed In some cases error was not properly propagated through ha_partition::rnd_next. Will now return the error code from the partitions rnd_next and update m_part_spec.start_part and m_last_part properly. This makes the inited state to be correct.
[9 May 2008 7:16]
Mattias Jonsson
Pushed into mysql-6.0-bugteam
[22 May 2008 9:51]
Bugs System
Pushed into 6.0.6-alpha
[24 May 2008 17:10]
Jon Stephens
Documented in the 6.0.6 changelog as follows: When one user was in the midst of a transaction on a partitioned table, a second user performing an ALTER TABLE on this table caused the server to hang.
[14 Aug 2008 16:34]
Philip Stoev
I am reopening this bug because according to the tag it should have been fixed in 5.1 as well. Instead, the patch was only pushed in 6.0. In addition to that, the patch was commited without a test case. Here is a simple one, converted from the comment above: --source include/have_innodb.inc create table t2 (ai INT AUTO_INCREMENT, comment varchar(255), primary key (ai)) engine = innodb partition by hash (ai) partitions 2; connect (con1,127.0.0.1,root,,test,$MASTER_MYPORT,); connect (con2,127.0.0.1,root,,test,$MASTER_MYPORT,); --connection con1 set autocommit=off; start transaction; insert into t2 values (NULL, 'first row t2'); --connection con2 set autocommit=off; alter table t2 auto_increment = 10; --connection con1 insert into t2 values (NULL, 'second row t2');
[20 Aug 2008 15: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/52066 2715 Mattias Jonsson 2008-08-20 Backport of patch for Bug#34604 (from 6.0) post push fix for bug#20129, test failed due to non existing source files.
[20 Aug 2008 18:06]
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/52082 2791 Mattias Jonsson 2008-08-20 [merge] merge (manual mysql-5.1-bugteam + bug#34604 + post push fix for bug#20129 -> mysql-6.0-bugteam)
[20 Aug 2008 18:35]
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/52083 2792 Mattias Jonsson 2008-08-20 pre push fix of test case for bug#34604 (needed change in 6.0 from 5.1)
[20 Aug 2008 18:59]
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/52085 2792 Mattias Jonsson 2008-08-20 pre push fix of test case for bug#34604 (needed change in 6.0 from 5.1)
[20 Aug 2008 19:42]
Mattias Jonsson
Pushed to mysql-5.1-bugteam (including a test case added to parts.partition_special_innodb) test case updated and pushed to mysql-6.0-bugteam (not going through a new round of review, since it was already reviewed previously when only pushing it to 6.0)
[21 Aug 2008 18:03]
Bugs System
Pushed into 5.1.28 (revid:mattiasj@mysql.com-20080820152914-n73dnrhaohaduemb) (version source revid:azundris@mysql.com-20080821081500-f2d61fh4u61owz3p) (pib:3)
[22 Aug 2008 7:53]
Jon Stephens
Also documented fix in 5.1.28 changelog. Closed.
[13 Sep 2008 22:33]
Bugs System
Pushed into 6.0.6-alpha (revid:mattiasj@mysql.com-20080820152914-n73dnrhaohaduemb) (version source revid:hakan@mysql.com-20080716105246-eg0utbybp122n2w9) (pib:3)
[11 Feb 2010 11:59]
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/99924 3091 Jon Olav Hauglid 2010-02-11 Followup to Bug#34604 handler::ha_rnd_end(): Assertion `inited==RND' failed. The test case for this bug relies on getting a ER_LOCK_WAIT_TIMEOUT error. However with the introduction of MDL, the test would hang forever since the metadata locks would not timeout. MDL timeouts are now introduced in the scope of Bug#45225. This patch changes the testcase for Bug#34604 to set the new server variable "lock_wait_timeout" to one second which makes the test generate the necessary timeout again.
[11 Feb 2010 12:15]
Jon Olav Hauglid
Followup patch pushed to mysql-next-4284.
[16 Feb 2010 16:48]
Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100216101445-2ofzkh48aq2e0e8o) (version source revid:jon.hauglid@sun.com-20100211140522-unpky24gmq8fkhhj) (merge vers: 6.0.14-alpha) (pib:16)
[16 Feb 2010 16:58]
Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100216101208-33qkfwdr0tep3pf2) (version source revid:jon.hauglid@sun.com-20100211115912-iqjq2h132it9iyvw) (pib:16)
[16 Feb 2010 19:26]
Jon Stephens
Already documented bugfix in the 6.0.6 changelog. Re-closing.
[6 Mar 2010 11:03]
Bugs System
Pushed into 5.5.3-m3 (revid:alik@sun.com-20100306103849-hha31z2enhh7jwt3) (version source revid:vvaintroub@mysql.com-20100216221947-luyhph0txl2c5tc8) (merge vers: 5.5.99-m3) (pib:16)
[8 Mar 2010 14:35]
Jon Stephens
Also documented in the 5.5.3 changelog -- closed.