mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-18479 Complement
This patch complements the patch that fixes bug MDEV-18479. This patch takes care of possible overflow when calculating the estimated number of rows in a materialized derived table / view.
This commit is contained in:
@ -4100,7 +4100,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;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user