mirror of https://github.com/django/django.git
Fixed #12079: Changed has_results to get a single result, thus preventing exists() from always returning True on backends that support chunked reads.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11654 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
92090253fe
commit
c54b8ec2f5
|
@ -385,7 +385,8 @@ class BaseQuery(object):
|
|||
q.set_extra_mask(('a',))
|
||||
q.set_aggregate_mask(())
|
||||
q.clear_ordering()
|
||||
return bool(q.execute_sql())
|
||||
q.set_limits(high=1)
|
||||
return bool(q.execute_sql(SINGLE))
|
||||
|
||||
def as_sql(self, with_limits=True, with_col_aliases=False):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue