Bug #44925 | Foreign keys: funcs_1.memory/myisam_views test failures | ||
---|---|---|---|
Submitted: | 18 May 2009 7:46 | Modified: | 28 May 2009 16:41 |
Reporter: | Dmitry Lenev | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 6.1-fk | OS: | Any |
Assigned to: | Dmitry Lenev | CPU Architecture: | Any |
[18 May 2009 7:46]
Dmitry Lenev
[28 May 2009 15:14]
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/75165 2721 Dmitry Lenev 2009-05-28 Fix for bug #44925 "Foreign keys: funcs_1.memory/myisam_views test failures". In mysql-6.1-fk tree tests memory_views and myisam_views in funcs_1 suite were failing because CREATE TABLE statement failed to detect that there is already existing view with the same name as table being created in case when this view was processed with the help of derived table mechanism. In the process of implementing support for new foreign keys the way in which CREATE TABLE performs metadata and table locking was changed to be similar to how it is done in CREATE TABLE ... SELECT. In particular, now it either opens and locks target table (i.e. one to be created) or obtains exclusive metadata lock on it. In cases when target table happened to be a view which was resolved through derived table, code responsible for derived table processing changed table_name member in element of table list representing target table to be the name of corresponding temporary table. And such a 'wrong' table name caused check for the target table existence which occured later to return wrong results (i.e. that table didn't exist). This fix simply disables processing of derived tables when opening tables for ordinary CREATE TABLE. We are not using results of such processing in any way and doing so allows to avoid 'corrupting' table list element for target table and therefore confusing code performing check for table existence.
[28 May 2009 16:41]
Dmitry Lenev
Fix for this bug was pushed into mysql-6.1-fk tree. Since this bug was reported against tree which is not publicly available yet I am simply closing this bug.