mariadb/storage/innobase/mtr
Vlad Lesin 7301fbac57 MDEV-37755 fil_space_t::drop() doesn't remove space from fil_system.named_spaces
mtr.commit_file() call in fil_space_t::drop() removes space from
fil_system.named_spaces, but then the space can be inserted in the
container again by some another thread while fil_space_t::drop() is
waiting for pending operations finishing.

The fix is to check and remove a space from fil_system.named_spaces
after all pengind operations on the space are finished. Also the ut_d()
macro is removed for space->max_lsn=0 assignments to avoid repeated
space removing from fil_system.named_spaces.

There is error in ilist::pop_back(). ilist::end() returns sentinel,
and the pop_back() removes sentinel from the list instead of the last
element. The error is fixed in this commit.

Reviewed by Marko Mäkelä
2025-11-10 13:37:14 +03:00
..
mtr0mtr.cc MDEV-37755 fil_space_t::drop() doesn't remove space from fil_system.named_spaces 2025-11-10 13:37:14 +03:00