mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-35069 IMPORT TABLESPACE does not work for tables with vector, although allowed
Propagate discard/import tablespace request to hlindexes. Let FLUSH TABLES ... FOR EXPORT open/lock hlindexes, so that InnoDB prepares hlindexes for export. Moved reset_hlindexes() to external_lock(F_UNLCK), so that hlindexes are available for export until UNLOCK TABLES. Closes #3631
This commit is contained in:
committed by
Sergei Golubchik
parent
e240da3b19
commit
55d1f6c229
@@ -6082,6 +6082,23 @@ int mysql_discard_or_import_tablespace(THD *thd,
|
||||
DBUG_RETURN(-1);
|
||||
}
|
||||
|
||||
DBUG_ASSERT(table_list->table->s->hlindexes() <= 1);
|
||||
for (uint i= table_list->table->s->keys; i < table_list->table->s->total_keys; i++)
|
||||
{
|
||||
if (table_list->table->hlindex_open(i))
|
||||
{
|
||||
thd->tablespace_op= FALSE;
|
||||
DBUG_RETURN(-1);
|
||||
}
|
||||
}
|
||||
for (uint i= table_list->table->s->keys; i < table_list->table->s->total_keys; i++)
|
||||
{
|
||||
error= table_list->table->hlindex->file->
|
||||
ha_discard_or_import_tablespace(discard);
|
||||
if (unlikely(error))
|
||||
goto err;
|
||||
}
|
||||
|
||||
error= table_list->table->file->ha_discard_or_import_tablespace(discard);
|
||||
|
||||
THD_STAGE_INFO(thd, stage_end);
|
||||
|
Reference in New Issue
Block a user