1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge 10.1 into 10.2

This commit is contained in:
Marko Mäkelä
2019-09-18 16:24:48 +03:00
42 changed files with 513 additions and 515 deletions

View File

@ -10383,6 +10383,16 @@ ha_rows check_quick_select(PARAM *param, uint idx, bool index_only,
bufsize, mrr_flags, cost);
if (rows != HA_POS_ERROR)
{
ha_rows table_records= param->table->stat_records();
if (rows > table_records)
{
/*
For any index the total number of records within all ranges
cannot be be bigger than the number of records in the table
*/
rows= table_records;
set_if_bigger(rows, 1);
}
param->quick_rows[keynr]= rows;
param->possible_keys.set_bit(keynr);
if (update_tbl_stats)