diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2021-12-01 19:09:18 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2021-12-03 19:58:21 +0530 |
commit | 3bef8c2b2fd2ae31b3d58f6c70d49a6122c85b63 (patch) | |
tree | 895ab0e376b1aaba7de45ba43a4eeb8c5dc26e36 | |
parent | e0e24b180d090d7ee378c097ab02df891b61a965 (diff) | |
download | mariadb-git-bb-10.6-MDEV-27111.tar.gz |
MDEV-27111 atomic.rename_table test case failsbb-10.6-MDEV-27111
InnoDB fails to identify the deferred tablespace after recovery.
Problem is that InnoDB fails to rename the tablespace present
in recovered tablespace. Fix is that InnoDB should try to rename the
recovered tablespace when tablespace is being deferred.
-rw-r--r-- | storage/innobase/log/log0recv.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc index fbbde25a218..4f0a9a2079d 100644 --- a/storage/innobase/log/log0recv.cc +++ b/storage/innobase/log/log0recv.cc @@ -659,7 +659,14 @@ static struct return; } else if (d->second.lsn < lsn) + { + /* Reset the old tablespace name in recovered spaces list */ + recv_spaces_t::iterator it{recv_spaces.find(d->first)}; + if (it != recv_spaces.end() && + it->second.name == d->second.file_name) + it->second.name = ""; defers.erase(d++); + } else { ut_ad(d->second.lsn != lsn); @@ -673,6 +680,10 @@ static struct p.first->second.lsn= lsn; p.first->second.file_name= defer.file_name; } + /* Add the newly added defered space and change the file name */ + recv_spaces_t::iterator it{recv_spaces.find(space)}; + if (it != recv_spaces.end()) + it->second.name = defer.file_name; } void remove(uint32_t space) @@ -858,6 +869,7 @@ bool recv_sys_t::recover_deferred(recv_sys_t::map::iterator &p, } node->deferred= false; space->release(); + it->second.space= space; return false; } |