diff options
| author | Anssi Kääriäinen <akaariai@gmail.com> | 2013-03-24 22:59:44 +0200 |
|---|---|---|
| committer | Anssi Kääriäinen <akaariai@gmail.com> | 2013-03-26 15:05:37 +0200 |
| commit | 207117ae731096d8148c17c6ca16f06ebf18537c (patch) | |
| tree | 4ba8c6e3f60f7824185a90e7d76ad9bb869289d6 /tests | |
| parent | 5e2bb1223c4e622113cef0edb6d7df53fab0367c (diff) | |
[1.5.x] Fixed #20091 -- Oracle null promotion for empty strings
Backpatch of e17fa9e877e84e93b699c2bd13ea48dbbb86e451
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/queries/tests.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/regressiontests/queries/tests.py b/tests/regressiontests/queries/tests.py index a2f91e9964..33e5337f58 100644 --- a/tests/regressiontests/queries/tests.py +++ b/tests/regressiontests/queries/tests.py @@ -1533,7 +1533,6 @@ class Queries6Tests(TestCase): # Nested queries are possible (although should be used with care, since # they have performance problems on backends like MySQL. - self.assertQuerysetEqual( Annotation.objects.filter(notes__in=Note.objects.filter(note="n1")), ['<Annotation: a1>'] @@ -2142,3 +2141,11 @@ class NullJoinPromotionOrTest(TestCase): # so we can use INNER JOIN for it. However, we can NOT use INNER JOIN # for the b->c join, as a->b is nullable. self.assertEqual(str(qset.query).count('INNER JOIN'), 1) + +class EmptyStringPromotionTests(TestCase): + def test_empty_string_promotion(self): + qs = RelatedObject.objects.filter(single__name='') + if connection.features.interprets_empty_strings_as_nulls: + self.assertIn('LEFT OUTER JOIN', str(qs.query)) + else: + self.assertNotIn('LEFT OUTER JOIN', str(qs.query)) |
