mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Backport of the fix for bug#25421 to 5.0.
Calculating the estimated number of records for a range scan may take a significant time, and it was impossible for a user to interrupt that process by killing the connection or the query. Fixed by checking the thread's 'killed' status in check_quick_keys() and interrupting the calculation process if it is set to a non-zero value.
This commit is contained in:
@ -6066,6 +6066,9 @@ check_quick_keys(PARAM *param,uint idx,SEL_ARG *key_tree,
|
||||
tmp_max_flag=max_key_flag | key_tree->max_flag;
|
||||
}
|
||||
|
||||
if (unlikely(param->thd->killed != 0))
|
||||
return HA_POS_ERROR;
|
||||
|
||||
keynr=param->real_keynr[idx];
|
||||
param->range_count++;
|
||||
if (!tmp_min_flag && ! tmp_max_flag &&
|
||||
|
Reference in New Issue
Block a user