Bug #54811 | assert in mysql_lock_have_duplicate | ||
---|---|---|---|
Submitted: | 25 Jun 2010 14:35 | Modified: | 12 Aug 2010 19:24 |
Reporter: | Matthias Leich | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Locking | Severity: | S3 (Non-critical) |
Version: | 5.5.5-m3 | OS: | Any |
Assigned to: | Konstantin Osipov | CPU Architecture: | Any |
Tags: | locking |
[25 Jun 2010 14:35]
Matthias Leich
[25 Jun 2010 14:41]
Matthias Leich
Archive with log and grammars
Attachment: problem.tgz (application/x-compressed-tar, text), 119.74 KiB.
[29 Jun 2010 11:17]
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/112443 3065 Konstantin Osipov 2010-06-29 A fix for Bug#54811 "Assert in mysql_lock_have_duplicate()". Remove mysql_lock_have_duplicate(), since now we always have TABLE_LIST objects for MyISAMMRG children in lex->query_tables and keep it till the end of the statement (sub-statement). @ sql/lock.cc Remove a function that is now unused. @ sql/lock.h Remove a function that is now unused. @ sql/sql_base.cc Don't try to search for duplicate table among THR_LOCK objects, TABLE_LIST list contains all used tables.
[29 Jun 2010 14:03]
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/112486 3065 Konstantin Osipov 2010-06-29 A fix for Bug#54811 "Assert in mysql_lock_have_duplicate()". Remove mysql_lock_have_duplicate(), since now we always have TABLE_LIST objects for MyISAMMRG children in lex->query_tables and keep it till the end of the statement (sub-statement). @ mysql-test/r/merge.result Update results (Bug#54811). @ mysql-test/t/merge-big.test Update to new wait state. @ mysql-test/t/merge.test Add a test case for Bug#54811. @ sql/lock.cc Remove a function that is now unused. @ sql/lock.h Remove a function that is now unused. @ sql/sql_base.cc Don't try to search for duplicate table among THR_LOCK objects, TABLE_LIST list contains all used tables.
[30 Jun 2010 11:01]
Konstantin Osipov
Fixed based on the backtrace. The patch is queued into trunk-runtime (Currently 5.5.6).
[2 Jul 2010 15:18]
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/112771 3074 Konstantin Osipov 2010-07-02 A test case for Bug#50788 "main.merge fails on HPUX", and a backport of relevant changes from the 6.0 version of the fix done by Ingo Struewing. The bug itself was fixed by the patch for Bug#54811. MyISAMMRG engine would try to use MMAP on its children even on platforms that don't support it and even if myisam_use_mmap option was off. This lead to an infinite hang in INSERT ... SELECT into a MyISAMMRG table when the destination MyISAM table was also selected from. A bug in duplicate detection fixed by 54811 was essential to the hang - when a duplicate is detected, the optimizer disables the use of memory mapped files, and it wasn't the case. The patch below is also to not turn on MMAP on children tables if myisam_use_mmap is off. A test case is added to cover MyISAMMRG and myisam_use_mmap option. @ mysql-test/r/merge_mmap.result Result file - Bug#50788. @ mysql-test/t/merge_mmap-master.opt An option file for the test for Bug#50788 -- use mmap. @ mysql-test/t/merge_mmap.test Try INSERT ... SELECT into a merge table when myisam_use_mmap is on (Bug#50788). @ storage/myisam/mi_statrec.c Fixed misinterpretation of the return value of my_b_read(). @ storage/myisammrg/ha_myisammrg.cc Skip HA_EXTRA_MMAP if MyISAM memory mapping is disabled.
[2 Jul 2010 15: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/112773 3074 Konstantin Osipov 2010-07-02 A test case for Bug#50788 "main.merge fails on HPUX", and a backport of relevant changes from the 6.0 version of the fix done by Ingo Struewing. The bug itself was fixed by the patch for Bug#54811. MyISAMMRG engine would try to use MMAP on its children even on platforms that don't support it and even if myisam_use_mmap option was off. This lead to an infinite hang in INSERT ... SELECT into a MyISAMMRG table when the destination MyISAM table was also selected from. A bug in duplicate detection fixed by 54811 was essential to the hang - when a duplicate is detected, the optimizer disables the use of memory mapped files, and it wasn't the case. The patch below is also to not turn on MMAP on children tables if myisam_use_mmap is off. A test case is added to cover MyISAMMRG and myisam_use_mmap option. @ mysql-test/r/merge_mmap.result Result file - Bug#50788. @ mysql-test/t/merge_mmap-master.opt An option file for the test for Bug#50788 -- use mmap. @ mysql-test/t/merge_mmap.test Try INSERT ... SELECT into a merge table when myisam_use_mmap is on (Bug#50788). @ storage/myisam/mi_statrec.c Fixed misinterpretation of the return value of my_b_read(). @ storage/myisammrg/ha_myisammrg.cc Skip HA_EXTRA_MMAP if MyISAM memory mapping is disabled.
[4 Aug 2010 7:51]
Bugs System
Pushed into mysql-trunk 5.5.6-m3 (revid:alik@sun.com-20100731131027-1n61gseejyxsqk5d) (version source revid:marko.makela@oracle.com-20100621094008-o9fa153s3f09merw) (merge vers: 5.1.49) (pib:18)
[4 Aug 2010 8:08]
Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@ibmvm-20100804080001-bny5271e65xo34ig) (version source revid:marko.makela@oracle.com-20100621094008-o9fa153s3f09merw) (merge vers: 5.1.49) (pib:18)
[4 Aug 2010 8:23]
Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@ibmvm-20100804081533-c1d3rbipo9e8rt1s) (version source revid:marko.makela@oracle.com-20100621094008-o9fa153s3f09merw) (merge vers: 5.1.49) (pib:18)
[4 Aug 2010 9:03]
Bugs System
Pushed into mysql-next-mr (revid:alik@ibmvm-20100804081630-ntapn8bf9pko9vj3) (version source revid:marko.makela@oracle.com-20100621094008-o9fa153s3f09merw) (pib:20)
[12 Aug 2010 19:24]
Paul DuBois
Noted in 5.5.6 changelog. The MERGE storage engine tried to use memory mapping on the underlying MyISAM tables even on platforms that do not support it and even when myisam_use_mmap was disabled. This led to a hang for INSERT INTO ... SELECT FROM statements that selected from a MyISAM table into a a MERGE table that contained the same MyISAM table.