mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
[t:4695], call restore_add_index in final_add_index all the time
git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@41785 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
68df4116a7
commit
42958dceb4
1 changed files with 8 additions and 3 deletions
|
@ -7763,9 +7763,14 @@ int ha_tokudb::final_add_index(handler_add_index *add_arg, bool commit) {
|
|||
DBUG_EXECUTE_IF("final_add_index_fail", {
|
||||
error = 1;
|
||||
});
|
||||
if (!commit || error) {
|
||||
restore_add_index(table, num_of_keys, incremented_numDBs, modified_DBs);
|
||||
}
|
||||
// at this point, the metadata lock ensures that the
|
||||
// newly created indexes cannot be modified,
|
||||
// regardless of whether the add index was hot.
|
||||
// Because a subsequent drop index may cause an
|
||||
// error requireing us to abort the transaction,
|
||||
// we prematurely close the added indexes, regardless
|
||||
// of whether we are committing or aborting.
|
||||
restore_add_index(table, num_of_keys, incremented_numDBs, modified_DBs);
|
||||
// transaction does not need to be committed,
|
||||
// we depend on MySQL to rollback the transaction
|
||||
// by calling tokudb_rollback
|
||||
|
|
Loading…
Add table
Reference in a new issue