Hi all, Adrian has finally had a chance to look at, and approve the acceptance of, the test fixtures patch. I sat down tonight to check in the patch, did a last little check, and hit a snag - the trunk model tests break under MySQL. Personally, I'm a Postgres jockey, so I need some guidance from the MySQL-using community.
The problem seems to have been introduced in [4610], and highlights in MySQL the same problem that [4610] fixed in Postgres - when using the InnoDB backend, foreign key constraints are checked per command, not per-transaction, and as a result, saving forward references causes the serializer model test to fail. If you have your MySQL setup to use MyISAM (the default backend), you won't see the problem, because MyISAM doesn't enforce constraints. This also ties in with #2720, which identified the fact that many foreign key constraints aren't being created correctly under MySQL. Postgres has similar behaviour to InnoDB by default, but [4610] modified the table declarations to disable constraint checking until the end of a transaction using DEFFERABLE INITIALLY DEFERRED. However, apparently MySQL doesn't implement this feature or an equivalent. One way around the problem would be to use SET FOREIGN_KEY_CHECKS at the start and end of each transactions - but if I'm reading the docs right, this wouldn't validate any keys modified while the checks were disabled. Or, is there another approach that I am not aware of? Yours, Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---
