summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-06-12 22:54:46 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2019-06-12 22:54:46 +0200
commit5b65d61d9384a45ea1b8df79694493fbb1a14e4a (patch)
tree451255aa141e115baf97b867fb0752b8ce4dd9a9 /sql/sql_lex.cc
parent56c60b2fc5d006206f54b93be401570837f2f312 (diff)
parent7a7d9904e12335ee8b1eea9671138b3c469a3829 (diff)
downloadmariadb-git-5b65d61d9384a45ea1b8df79694493fbb1a14e4a.tar.gz
Merge branch '5.5' into 10.1
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 45e62733698..64406f54005 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -4372,7 +4372,10 @@ void SELECT_LEX::increase_derived_records(ha_rows records)
DBUG_ASSERT(unit->derived);
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;
}