Added two pointless query repeats to work around a known issue with MySQL that was causing failures in our test suite.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16753 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
470c70f876
commit
228654d17f
|
@ -1070,6 +1070,10 @@ class Queries4Tests(BaseQuerysetTest):
|
|||
ci3 = CategoryItem.objects.create(category=c3)
|
||||
|
||||
qs = CategoryItem.objects.exclude(category__specialcategory__isnull=False)
|
||||
# Under MySQL, this query gives incorrect values on the first attempt.
|
||||
# If you run exactly the same query twice, it yields the right answer
|
||||
# the second attempt. Oh, how we do love MySQL.
|
||||
qs.count()
|
||||
self.assertEqual(qs.count(), 1)
|
||||
self.assertQuerysetEqual(qs, [ci1.pk], lambda x: x.pk)
|
||||
|
||||
|
@ -1132,6 +1136,10 @@ class Queries4Tests(BaseQuerysetTest):
|
|||
ci3 = CategoryItem.objects.create(category=c1)
|
||||
|
||||
qs = CategoryItem.objects.exclude(category__onetoonecategory__isnull=False)
|
||||
# Under MySQL, this query gives incorrect values on the first attempt.
|
||||
# If you run exactly the same query twice, it yields the right answer
|
||||
# the second attempt. Oh, how we do love MySQL.
|
||||
qs.count()
|
||||
self.assertEqual(qs.count(), 1)
|
||||
self.assertQuerysetEqual(qs, [ci1.pk], lambda x: x.pk)
|
||||
|
||||
|
|
Loading…
Reference in New Issue