mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
5.5 merge
This commit is contained in:
@@ -68,6 +68,7 @@ static int rr_index_desc(READ_RECORD *info);
|
||||
void init_read_record_idx(READ_RECORD *info, THD *thd, TABLE *table,
|
||||
bool print_error, uint idx, bool reverse)
|
||||
{
|
||||
int error;
|
||||
empty_record(table);
|
||||
bzero((char*) info,sizeof(*info));
|
||||
info->thd= thd;
|
||||
@@ -77,8 +78,13 @@ void init_read_record_idx(READ_RECORD *info, THD *thd, TABLE *table,
|
||||
info->unlock_row= rr_unlock_row;
|
||||
|
||||
table->status=0; /* And it's always found */
|
||||
if (!table->file->inited)
|
||||
table->file->ha_index_init(idx, 1);
|
||||
if (!table->file->inited &&
|
||||
(error= table->file->ha_index_init(idx, 1)))
|
||||
{
|
||||
if (print_error)
|
||||
table->file->print_error(error, MYF(0));
|
||||
}
|
||||
|
||||
/* read_record will be changed to rr_index in rr_index_first */
|
||||
info->read_record= reverse ? rr_index_last : rr_index_first;
|
||||
}
|
||||
|
Reference in New Issue
Block a user