﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
15118	MySQL/InnoDB has integrity problems with new deletion code	Russell Keith-Magee	nobody	"It looks like MySQL/InnoDB's inability to defer constraints poses problems

The problem is revealed by the queries.SubclassFKTests regression test. In that test:

TVChef -- is a -- Celebrity -- has many -- fans.

The test deletes a TVChef. In deleting the TVChef, the deletion code deletes the fan objects, then the celebrity... which leaves TVChef as a dangling reference. Under Postgres, the reference check is deferred until the end of the transaction (as it should be); but InnoDB throws a hissy because it reference checks after every statement.

In this case, the problem can be resolved by deleting in a different order. However, I'm not sure if that will yield a general solution. 

"		closed	Database layer (models, ORM)	1.2		fixed	blocker		Accepted	0	0	0	0	0	0
