diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-06-12 22:54:46 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-06-12 22:54:46 +0200 |
commit | 5b65d61d9384a45ea1b8df79694493fbb1a14e4a (patch) | |
tree | 451255aa141e115baf97b867fb0752b8ce4dd9a9 /sql/sql_lex.cc | |
parent | 56c60b2fc5d006206f54b93be401570837f2f312 (diff) | |
parent | 7a7d9904e12335ee8b1eea9671138b3c469a3829 (diff) | |
download | mariadb-git-5b65d61d9384a45ea1b8df79694493fbb1a14e4a.tar.gz |
Merge branch '5.5' into 10.1
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 5 |
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; } |