Skip to content
Browse files

Fixed #12079: Changed has_results to get a single result, thus preven…

…ting exists() from always returning True on backends that support chunked reads.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 9209025 commit c54b8ec2f5122ae13bcb4e1d00d8e8f6bcacf2cf @kmtracey kmtracey committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 django/db/models/sql/
3 django/db/models/sql/
@@ -385,7 +385,8 @@ def has_results(self):
- 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):

0 comments on commit c54b8ec

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