Bug #42063 | Foreign keys: constraint survives after table is dropped | ||
---|---|---|---|
Submitted: | 12 Jan 2009 21:06 | Modified: | 28 May 2009 17:43 |
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 |
[12 Jan 2009 21:06]
Peter Gulutzan
[12 Jan 2009 23:44]
MySQL Verification Team
Thank you for the bug report. Verified as described: c:\dbs>6.1\bin\mysql -uroot Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 11 Server version: 6.1.0-alpha-nt Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> create database d2; Query OK, 1 row affected (0.00 sec) mysql> use d2 Database changed mysql> create table t1 (s1 int primary key) engine=falcon; Query OK, 0 rows affected (0.05 sec) mysql> create table t2 (s1 int references t1 (s1)) engine=falcon; Query OK, 0 rows affected (0.17 sec) mysql> drop table t2; Query OK, 0 rows affected (0.03 sec) mysql> insert into t1 values (1); Query OK, 1 row affected (0.00 sec) mysql> update t1 set s1 = 0; ERROR 1146 (42S02): Table 'd2.t2' doesn't exist mysql>
[15 Feb 2009 19:54]
Peter Gulutzan
I also get "table doesn't exist" messages if I do RESTORE ... OVERWRITE; for a database that contains the foreign-key table. Because of this bug, I am assuming that backup and restore won't work with foreign keys for some time.
[28 May 2009 17:43]
Dmitry Lenev
Hello! This bug was fixed as part of work on milestone 14 of WL#148 "Foreign keys (for all engines)". Test for this bug was pushed into mysql-6.1-fk tree with the rest of test coverage for this milestone. Since this bug was reported against tree which is not publicly available yet I am simply closing this bug.