1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-32350 Can't selectively restore sequences using innodb tables from backup

Added support for sequences to do  discard and import tablespace
This commit is contained in:
Monty
2024-10-08 18:20:46 +03:00
parent ee908140ac
commit 2c52fdd28a
5 changed files with 131 additions and 4 deletions

View File

@ -367,6 +367,21 @@ int ha_sequence::external_lock(THD *thd, int lock_type)
return error;
}
int ha_sequence::discard_or_import_tablespace(my_bool discard)
{
int error= file->discard_or_import_tablespace(discard);
if (!error && !discard)
{
/* Doing import table space. Read the imported values */
if (!(error= table->s->sequence->read_stored_values(table)))
{
table->s->sequence->initialized= SEQUENCE::SEQ_READY_TO_USE;
memcpy(table->record[1], table->s->default_values, table->s->reclength);
}
}
return error;
}
/*
Squence engine error deal method
*/