summaryrefslogtreecommitdiff
path: root/sql/sql_lex.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-06-14 22:10:50 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2019-06-14 22:10:50 +0200
commitf66d1850ac30922eaa49c0131d89efc8357155ff (patch)
treecb69c43694146bb7993078e76e203ded4ca48a5e /sql/sql_lex.cc
parent772c5f3c78fcdaea2169ba435bac8d851c7945c7 (diff)
parent1135244a647e423f6a7b2122ad9c305253039399 (diff)
downloadmariadb-git-f66d1850ac30922eaa49c0131d89efc8357155ff.tar.gz
Merge branch '10.3' into 10.4
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 9550350cc44..777391dfed3 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -4862,7 +4862,10 @@ void SELECT_LEX::increase_derived_records(ha_rows records)
break;
default:
// usual UNION
- result->est_records+= records;
+ if (HA_ROWS_MAX - records > result->est_records)
+ result->est_records+= records;
+ else
+ result->est_records= HA_ROWS_MAX;
break;
}
}