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:
Karen Tracey 2009-10-25 16:32:07 +00:00
parent 92090253fe
commit c54b8ec2f5
1 changed files with 2 additions and 1 deletions

View File

@ -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):
"""