diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-12-05 18:00:22 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-12-05 18:00:22 +0200 |
commit | 0a7d85c97f6dd68f78ecb3e7074043ff2d4c24fc (patch) | |
tree | 75307e6374fa8c0b6bbc7585b9a3275e4f0c9fd9 /mysql-test/suite/mariabackup | |
parent | 95d71272eff7d7f0faf64e7afe2cef5b8578b562 (diff) | |
download | mariadb-git-0a7d85c97f6dd68f78ecb3e7074043ff2d4c24fc.tar.gz |
MDEV-30148 Race condition between non-persistent statistics and purge
btr_cur_t::open_random_leaf(): Replaces btr_cur_open_at_rnd_pos().
Acquire a shared latch on each page, and finally release all
latches except the one on the leaf page.
This fixes a race condition between the purge of history and
btr_estimate_number_of_different_key_vals(), which turned out
to only hold a buffer-fix on the randomly chosen leaf page.
Typically, an assertion would fail in page_rec_is_supremum().
ibuf_contract(): Start from the beginning of the change buffer,
to simplify the logic. Starting with
commit b42294bc6409794bdbd2051b32fa079d81cea61d
it does not matter much where the change buffer merge is being initiated.
The race condition may have been introduced as early as
mysql/mysql-server@ac74632293bea967b352d1b472abedeeaa921b98
from where it was copied to
commit 2e814d4702d71a04388386a9f591d14a35980bfe.
Reviewed by: Vladislav Lesin
Tested by: Matthias Leich
Diffstat (limited to 'mysql-test/suite/mariabackup')
0 files changed, 0 insertions, 0 deletions