diff options
Diffstat (limited to 'sql/records.cc')
-rw-r--r-- | sql/records.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/records.cc b/sql/records.cc index d28799ea9d2..e534c04935a 100644 --- a/sql/records.cc +++ b/sql/records.cc @@ -371,7 +371,15 @@ static int rr_quick(READ_RECORD *info) static int rr_index_first(READ_RECORD *info) { - int tmp= info->table->file->ha_index_first(info->record); + int tmp; + // tell handler that we are doing an index scan + if ((tmp = info->table->file->prepare_index_scan())) + { + tmp= rr_handle_error(info, tmp); + return tmp; + } + + tmp= info->table->file->ha_index_first(info->record); info->read_record= rr_index; if (tmp) tmp= rr_handle_error(info, tmp); |