Bug #12084 Update temporary tables withe respect to foreign keys
Submitted: 21 Jul 2005 15:22 Modified: 8 Sep 2005 20:20
Reporter: Jason Pyeron Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:4.1.13 OS:Microsoft Windows (w2k)
Assigned to: Osku Salerma

[21 Jul 2005 15:22] Jason Pyeron
Description:
creating temp tables using FK will ?work? in opposition to Bug: #10105 if you use db.table(column) not  table(column)
http://bugs.mysql.com/bug.php?id=10105

BUT

the keys are not enforced. 

is this due to the table name be different than 

How to repeat:
use db;
create table a
(
 id int primary key
) engine=Innodb;
create temporary table foo
(
 id int not null primary key,
 b int,
 foreign key (b) references db.a(id)
) engine=Innodb;
[21 Jul 2005 17:33] Heikki Tuuri
Hmm... InnoDB should return an error in this case, if the foreign key really does not work.

Assigning this to Marko Mäkelä.

Regards,

Heikki
[21 Jul 2005 18:16] Jorge del Conde
Thanks for your bug report.
[21 Jul 2005 19:29] Jason Pyeron
no, no error please.

the foriegn keys should work, without the error, my software will work now, and later.

since my software wonth violate the key constraints, and the table only exists during its connection then no harm no foul.

just need to fix the aliasing issue so the keys are used.
[6 Sep 2005 11:38] 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/internals/29361
[6 Sep 2005 13:08] 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/internals/29368
[8 Sep 2005 9:33] Osku Salerma
Pushed to 5.0.13 and 5.1.
[8 Sep 2005 20:20] Paul Dubois
Noted in 5.0.13, 5.1.2 changelogs.