summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index b44ea605b8e..de32d090048 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1092,6 +1092,8 @@ mysql_execute_command(void)
thd->select_limit=lex->select_limit+lex->offset_limit;
if (thd->select_limit < lex->select_limit)
thd->select_limit= HA_POS_ERROR; // no limit
+ if (thd->select_limit == HA_POS_ERROR)
+ lex->options&= ~OPTION_FOUND_ROWS;
if (lex->exchange)
{