Still not sure what's going on myself -- I've had one more occurence of the error, and have now confirmed that autocommit is on in the production application (by printing the result of select @@autocommit).
It sounds quite possible that it's the immediate foreign key constraint check that's causing the problem, this would be fixed if I upgraded to 5.1? Any other work arounds you can suggest? Thanks, Brandon On 2007-05-08 (Tue) at 17:58:39 -0400, Andy Dustman wrote: > > Not sure what is happening there. Django is not setting autocommit, > and MySQLdb disables autocommit by default. Have you actually verified > that autocommit is on when running your application? > > It may also be due to the fact that MySQL (5.0 and earlier at least) > does not defer foreign key checks into the commit: > > http://dev.mysql.com/doc/refman/5.0/en/innodb-foreign-key-constraints.html > > We ran into that problem when the serialization stuff was added around > PyCon. I think it would explain the behavior you are seeing when there > is a race to insert a new row. > > -- > Patriotism means to stand by the country. It does > not mean to stand by the president. -- T. Roosevelt > > This message has been scanned for memes and > dangerous content by MindScanner, and is > believed to be unclean. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---