Bug #12212 | Crash that happens during removing of database name from cache | ||
---|---|---|---|
Submitted: | 27 Jul 2005 15:58 | Modified: | 7 Aug 2005 2:10 |
Reporter: | Alexey Stroganov | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S1 (Critical) |
Version: | 5.0.11pre | OS: | Any (All) |
Assigned to: | Mikael Ronström | CPU Architecture: | Any |
[27 Jul 2005 15:58]
Alexey Stroganov
[27 Jul 2005 18:38]
Mikael Ronström
When drop database is called concurrently with a drop table of any table the MySQL Server crashes.
[5 Aug 2005 22:14]
Mike Hillyer
This bug has no patch reported and no three-part version number, and cannot be documented in the changelogs. Reverting to Open status.
[6 Aug 2005 10:27]
Mikael Ronström
This bug patch is found in change set pappa:1.1909 (erroneously marked BUG #12112 should have been BUG #12212) 28 jul 2005 and will be in 5.0.11
[7 Aug 2005 2:10]
Mike Hillyer
Documented in 5.0.11 changelog: <listitem><para> When <literal>DROP DATABASE</literal> was called concurrently with a <literal>DROP TABLE</literal> of any table the MySQL Server crashed. (Bug #12212) </para></listitem>
[31 Jul 2006 19:01]
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/9847 ChangeSet@1.2259, 2006-07-31 23:02:07+04:00, dlenev@mockturtle.local +7 -0 Fix for bug#12212/19403 "Crash that happens during removing of database name from cache" and #21216 "Simultaneous DROP TABLE and SHOW OPEN TABLES causes server to crash". Crash happened when one ran DROP DATABASE or SHOW OPEN TABLES statements while concurrently doing DROP TABLE (or RENAME TABLE, CREATE TABLE LIKE or any other command that takes name-lock) in other connection. This problem was caused by the fact that table placeholders which were added to table cache in order to obtain name-lock on table had TABLE_SHARE::db and table_name set to 0. Therefore they broke assumption that these members are non-0 for all tables in table cache on which some of our code relies. The fix sets these members for such placeholders to appropriate value making this assumption true again. As attempt to avoid such problems in future we introduce auxiliary TABLE_SHARE::set_table_cache_key() method which should be used when one wants to set TABLE_SHARE::table_cache_key and which ensures that TABLE_SHARE::table_name/db are set properly. Question for reviewer is marked by QQ mark.
[3 Aug 2006 19: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/10027 ChangeSet@1.2259, 2006-08-03 23:53:45+04:00, dlenev@mockturtle.local +7 -0 Fix for bug#12212/19403 "Crash that happens during removing of database name from cache" and #21216 "Simultaneous DROP TABLE and SHOW OPEN TABLES causes server to crash". Crash happened when one ran DROP DATABASE or SHOW OPEN TABLES statements while concurrently doing DROP TABLE (or RENAME TABLE, CREATE TABLE LIKE or any other command that takes name-lock) in other connection. This problem was caused by the fact that table placeholders which were added to table cache in order to obtain name-lock on table had TABLE_SHARE::db and table_name set to 0. Therefore they broke assumption that these members are non-0 for all tables in table cache on which some of our code relies. The fix sets these members for such placeholders to appropriate value making this assumption true again. As attempt to avoid such problems in future we introduce auxiliary TABLE_SHARE::set_table_cache_key() methods which should be used when one wants to set TABLE_SHARE::table_cache_key and which ensure that TABLE_SHARE::table_name/db are set properly. Question for reviewer is marked by QQ mark.