Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Revert "fixes #19263" - Fails if not SQLite

This reverts commit 2b76f19.
  • Loading branch information...
commit cbb9f629b88d97dd9a3f8d425fd56c8b80d7cddf 1 parent 5a6a424
Honza Král authored February 24, 2013
4  django/db/models/sql/where.py
@@ -204,10 +204,6 @@ def make_atom(self, child, qn, connection):
204 204
                 raise EmptyResultSet
205 205
             if extra:
206 206
                 return ('%s IN %s' % (field_sql, extra), params)
207  
-            if not params:
208  
-                # Empty params would generate invalid sql in subquery
209  
-                raise EmptyResultSet
210  
-
211 207
             max_in_list_size = connection.ops.max_in_list_size()
212 208
             if max_in_list_size and len(params) > max_in_list_size:
213 209
                 # Break up the params list into an OR of manageable chunks.
15  tests/regressiontests/queries/tests.py
@@ -2021,9 +2021,6 @@ def setUp(self):
2021 2021
         Article.objects.create(name='three', created=datetime.datetime.now())
2022 2022
         Article.objects.create(name='four', created=datetime.datetime.now())
2023 2023
 
2024  
-        food = Food.objects.create(name='spam')
2025  
-        Eaten.objects.create(meal='spam with eggs', food=food)
2026  
-
2027 2024
     def test_tickets_7698_10202(self):
2028 2025
         # People like to slice with '0' as the high-water mark.
2029 2026
         self.assertQuerysetEqual(Article.objects.all()[0:0], [])
@@ -2039,18 +2036,6 @@ def test_empty_resultset_sql(self):
2039 2036
         # ticket #12192
2040 2037
         self.assertNumQueries(0, lambda: list(Number.objects.all()[1:1]))
2041 2038
 
2042  
-    def test_empty_sliced_subquery(self):
2043  
-        # ticket #19263 - testing subqueries
2044  
-        self.assertEqual(
2045  
-            Eaten.objects.filter(food__in=Food.objects.all()[0:0]).count(),
2046  
-            0)
2047  
-
2048  
-    def test_empty_sliced_subquery_exclude(self):
2049  
-        # ticket #19263 - testing subqueries
2050  
-        self.assertEqual(
2051  
-            Eaten.objects.exclude(food__in=Food.objects.all()[0:0]).count(),
2052  
-            1)
2053  
-
2054 2039
 
2055 2040
 class EscapingTests(TestCase):
2056 2041
     def test_ticket_7302(self):

0 notes on commit cbb9f62

Please sign in to comment.
Something went wrong with that request. Please try again.