#13533: queries test fails under MySQL InnoDB ------------------------------------------+--------------------------------- Reporter: russellm | Owner: nobody Status: new | Milestone: 1.3 Component: Database layer (models, ORM) | Version: 1.2-beta Keywords: | Stage: Unreviewed Has_patch: 0 | ------------------------------------------+--------------------------------- As of 1.2RC1, the queries test fails under MySQL InnoDB fails at the following test: {{{ Failed example: Tag.objects.exclude(children=None) Expected: [<Tag: t1>, <Tag: t3>] Got: [<Tag: t1>, <Tag: t3>, <Tag: t4>] }}}
This is at line 1150 (as of r13252). This test passes as is under SQLite, Postgres, and MySQL MyISAM. Even more weird - if you dig into the database at the time the test runs, the query is the same, and the contents of the table is the same. The issue appears to be entirely related to a query cache somewhere in the MySQLdb infrastructure, but only under InnoDB. You can make the test pass by inserting: {{{ >>> connection.close() }}} just before the failing test. You can also make the test pass by manually issuing the same query twice, and only checking the test result on the second execution -- i.e., if you modify the test to the following: {{{ >>> r = list(Tag.objects.exclude(children=None)) >>> Tag.objects.exclude(children=None) [<Tag: t1>, <Tag: t3>] }}} The test will pass. -- Ticket URL: <http://code.djangoproject.com/ticket/13533> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.