diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 88535ce..e663eee 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -14728,6 +14728,7 @@ int QUICK_SKIP_SCAN_SELECT::get_next() { if (result) { if (result == HA_ERR_END_OF_FILE) { is_prefix_valid = false; + head->file->set_end_range(nullptr, handler::RANGE_SCAN_ASC); continue; } goto exit; @@ -14737,6 +14738,7 @@ int QUICK_SKIP_SCAN_SELECT::get_next() { if (result) { if (result == HA_ERR_END_OF_FILE) { is_prefix_valid = false; + head->file->set_end_range(nullptr, handler::RANGE_SCAN_ASC); continue; } goto exit;