Bug #35395 | Object services for enumerating view dependencies make server deadlock. | ||
---|---|---|---|
Submitted: | 18 Mar 2008 13:14 | Modified: | 18 Sep 2008 5:56 |
Reporter: | Rafal Somla | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Locking | Severity: | S3 (Non-critical) |
Version: | 6.0 source | OS: | Any |
Assigned to: | Alexander Nozdrin | CPU Architecture: | Any |
[18 Mar 2008 13:14]
Rafal Somla
[29 Apr 2008 14: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/46186 ChangeSet@1.2613, 2008-04-29 18:22:41+04:00, anozdrin@quad.opbmk +1 -0 A fix for Bug#35395: Object services for enumerating view dependencies make server deadlock. The problem was that ViewBaseObjectsIterator::create() method opened a view and its underlying tables in order to get a list of all the tables on which view depends without closing them afterwards. This happened due to false assumption that THD::~THD() closes all the tables which were open for THD object being destroyed. The fix is to call close_thread_tables() explicitly. Also, since we're interested only in meta-data, there is no need to lock tables. So, open_tables() can be used instead of open_and_lock_tables(). A test case is not provided because there is no easy way to test this without changing the source code.
[29 Apr 2008 14:20]
Alexander Nozdrin
Pushed into 6.0-backup.
[14 Sep 2008 2:29]
Bugs System
Pushed into 6.0.6-alpha (revid:sp1r-anozdrin/alik@quad.opbmk-20080429142241-05042) (version source revid:hakan@mysql.com-20080716160135-l7310heud233kagu) (pib:3)
[18 Sep 2008 5:56]
Paul DuBois
Noted in 6.0.6 changelog. The method for enumerating view dependencies could cause the server to deadlock.