Commit e237d619 authored by Sergei Golubchik's avatar Sergei Golubchik

fixup initial support for vector indexes

renames
parent cac1ec19
......@@ -9954,7 +9954,7 @@ int TABLE::hlindexes_on_delete_all(bool truncate)
return 0;
}
int TABLE::hlindex_first(uint nr, Item *item, ulonglong limit)
int TABLE::hlindex_read_first(uint nr, Item *item, ulonglong limit)
{
DBUG_ASSERT(s->total_keys - s->keys == 1);
DBUG_ASSERT(nr == s->keys);
......@@ -9964,10 +9964,10 @@ int TABLE::hlindex_first(uint nr, Item *item, ulonglong limit)
DBUG_ASSERT(hlindex->in_use == in_use);
return mhnsw_first(this, key_info + s->keys, item, limit);
return mhnsw_read_first(this, key_info + s->keys, item, limit);
}
int TABLE::hlindex_next()
int TABLE::hlindex_read_next()
{
return mhnsw_next(this);
return mhnsw_read_next(this);
}
......@@ -24759,8 +24759,8 @@ join_read_first(JOIN_TAB *tab)
DBUG_ASSERT(tab->join->order->next == NULL);
DBUG_ASSERT(tab->join->select_limit < HA_POS_ERROR);
tab->read_record.read_record_func= join_hlindex_read_next;
error= tab->table->hlindex_first(tab->index, *tab->join->order->item,
tab->join->select_limit);
error= tab->table->hlindex_read_first(tab->index, *tab->join->order->item,
tab->join->select_limit);
}
else
{
......@@ -24795,7 +24795,7 @@ join_read_next(READ_RECORD *info)
static int join_hlindex_read_next(READ_RECORD *info)
{
if (int error= info->table->hlindex_next())
if (int error= info->table->hlindex_read_next())
return report_error(info->table, error);
return 0;
}
......@@ -1794,8 +1794,8 @@ struct TABLE
inline ha_rows stat_records() { return used_stat_records; }
int hlindex_open(uint nr);
int hlindex_first(uint nr, Item *item, ulonglong limit);
int hlindex_next();
int hlindex_read_first(uint nr, Item *item, ulonglong limit);
int hlindex_read_next();
int open_hlindexes_for_write();
int hlindexes_on_insert();
......
......@@ -1197,7 +1197,7 @@ int mhnsw_insert(TABLE *table, KEY *keyinfo)
}
int mhnsw_first(TABLE *table, KEY *keyinfo, Item *dist, ulonglong limit)
int mhnsw_read_first(TABLE *table, KEY *keyinfo, Item *dist, ulonglong limit)
{
THD *thd= table->in_use;
TABLE *graph= table->hlindex;
......@@ -1272,10 +1272,10 @@ int mhnsw_first(TABLE *table, KEY *keyinfo, Item *dist, ulonglong limit)
}
DBUG_ASSERT(context - sizeof(ulonglong) == graph->context);
return mhnsw_next(table);
return mhnsw_read_next(table);
}
int mhnsw_next(TABLE *table)
int mhnsw_read_next(TABLE *table)
{
uchar *ref= (uchar*)(table->hlindex->context);
if (ulonglong *limit= (ulonglong*)ref)
......
......@@ -27,10 +27,10 @@
*/
const LEX_CSTRING mhnsw_hlindex_table_def(THD *thd, uint ref_length);
int mhnsw_insert(TABLE *table, KEY *keyinfo);
int mhnsw_first(TABLE *table, KEY *keyinfo, Item *dist, ulonglong limit);
int mhnsw_read_first(TABLE *table, KEY *keyinfo, Item *dist, ulonglong limit);
int mhnsw_read_next(TABLE *table);
int mhnsw_invalidate(TABLE *table, const uchar *rec, KEY *keyinfo);
int mhnsw_delete_all(TABLE *table, KEY *keyinfo, bool truncate);
int mhnsw_next(TABLE *table);
void mhnsw_free(TABLE_SHARE *share);
bool mhnsw_uses_distance(const TABLE *table, KEY *keyinfo, const Item *dist);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment