mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
InnoDB support for hlindexes and mhnsw
* mhnsw: * use primary key, innodb loves and (and the index cannot have dupes anyway) * MyISAM is ok with that, performance-wise * must be ha_rnd_init(0) because we aren't going to scan * MyISAM resets the position on ha_rnd_init(0) so query it before * oh, and use the correct handler, just in case * HA_ERR_RECORD_IS_THE_SAME is no error * innodb: * return ref_length on create * don't assume table->pos_in_table_list is set * ok, assume away, but only for system versioned tables * set alter_info on create (InnoDB needs to check for FKs) * pair external_lock/external_unlock correctly
This commit is contained in:
@@ -9900,8 +9900,6 @@ int TABLE::open_hlindexes_for_write()
|
||||
for (uint i= s->keys; i < s->total_keys; i++)
|
||||
{
|
||||
KEY *key= s->key_info + i;
|
||||
if (hlindex)
|
||||
hlindex->in_use= 0;
|
||||
for (uint j=0; j < key->usable_key_parts; j++)
|
||||
if (bitmap_is_set(write_set, key->key_part[j].fieldnr - 1))
|
||||
{
|
||||
@@ -9915,8 +9913,11 @@ int TABLE::open_hlindexes_for_write()
|
||||
|
||||
int TABLE::reset_hlindexes()
|
||||
{
|
||||
if (hlindex)
|
||||
if (hlindex && hlindex->in_use)
|
||||
{
|
||||
hlindex->file->ha_external_unlock(in_use);
|
||||
hlindex->in_use= 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user