Bug #42603 | Foreign keys: crash if temporary table | ||
---|---|---|---|
Submitted: | 4 Feb 2009 19:44 | Modified: | 5 Feb 2009 21:03 |
Reporter: | Peter Gulutzan | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: General | Severity: | S3 (Non-critical) |
Version: | 6.1.0-alpha-debug | OS: | Linux (SUSE 10.0 / 32-bit) |
Assigned to: | Dmitry Lenev | CPU Architecture: | Any |
[4 Feb 2009 19:44]
Peter Gulutzan
[5 Feb 2009 12:15]
Dmitry Lenev
Hello Miguel! I suspect that crash that Peter sees is caused by assertion failure. So to reproduce it one needs to use debug version of server. In any case error message about missing supporting index which both of you are getting is a sufficient indication that something is wrong. Inspecting code in FK implementation confirms this. So to save time I am simply marking this bug as "verified".
[5 Feb 2009 19:42]
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/65397 2705 Dmitry Lenev 2009-02-05 Fix for bug #42603 "Foreign keys: crash if temporary table". In --foreign-key-all-engines=1 mode temporary table with the same name as one of the tables participating in a foreign key was shadowing this table during foreign key checks and actions which could have led to unwarranted errors, violation of constraints or even server crashes due to failing asserts. This fix prohibits such shadowing by requiring all tables which are being open for foreign key checks to be base tables. It is OK to do so since only such tables can participate in foreign key constraints.
[5 Feb 2009 20:56]
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/65407 2705 Dmitry Lenev 2009-02-05 Fix for bug #42603 "Foreign keys: crash if temporary table". In --foreign-key-all-engines=1 mode temporary table with the same name as one of the tables participating in a foreign key was shadowing this table during foreign key checks and actions which could have led to unwarranted errors, violation of constraints or even server crashes due to failing asserts. This fix prohibits such shadowing by requiring all tables which are being open for foreign key checks to be base tables. It is OK to do so since only such tables can participate in foreign key constraints.
[5 Feb 2009 21:03]
Dmitry Lenev
Fix for this bug was pushed into mysql-6.1-fk tree. Since this problem was reported against the tree which is not publicly available yet I am simply closing this bug.