summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-06-13 16:42:21 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2019-06-13 16:42:21 +0200
commit50653e021f1678c3c28c6b5886fadb9fcf8d87ff (patch)
tree1e0fa45c58e4405da192d7e7a41c39b0128e9b11 /sql/sql_lex.cc
parente9145aab44f3c052868836f2fe1b9ca87ae6895b (diff)
parent5b65d61d9384a45ea1b8df79694493fbb1a14e4a (diff)
downloadmariadb-git-50653e021f1678c3c28c6b5886fadb9fcf8d87ff.tar.gz
Merge branch '10.1' into 10.2
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r--sql/sql_lex.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 6040024706f..53b1dd481c3 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -4488,7 +4488,10 @@ void SELECT_LEX::increase_derived_records(ha_rows records)
}
select_union *result= (select_union*)unit->result;
- result->records+= records;
+ if (HA_ROWS_MAX - records > result->records)
+ result->records+= records;
+ else
+ result->records= HA_ROWS_MAX;
}