18 static int queue_key_cmp(
void *keyseg, uchar *a, uchar *b)
25 int ret= ha_key_cmp((
HA_KEYSEG *)keyseg, aa->lastkey, bb->lastkey,
26 USE_WHOLE_KEY, SEARCH_FIND, not_used);
38 return (ma->file_offset < mb->file_offset)? -1 : (ma->file_offset >
39 mb->file_offset) ? 1 : 0;
43 int _myrg_init_queue(
MYRG_INFO *info,
int inx,
enum ha_rkey_function search_flag)
46 QUEUE *q= &(info->by_key);
48 if (inx < (
int) info->keys)
50 if (!is_queue_inited(q))
52 if (init_queue(q,info->tables, 0,
53 (myisam_readnext_vec[search_flag] == SEARCH_SMALLER),
55 info->open_tables->table->s->keyinfo[inx].seg))
60 if (reinit_queue(q,info->tables, 0,
61 (myisam_readnext_vec[search_flag] == SEARCH_SMALLER),
63 info->open_tables->table->s->keyinfo[inx].seg))
76 DBUG_ASSERT(!info->tables);
77 error= my_errno= HA_ERR_END_OF_FILE;
82 int _myrg_mi_read_record(
MI_INFO *info, uchar *
buf)
84 if (!(*info->read_record)(info,info->lastpos,buf))
86 info->update|= HA_STATE_AKTIV;