summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorAndrei <andrei.elkin@mariadb.com>2021-12-27 12:36:51 +0200
committerAndrei Elkin <andrei.elkin@mariadb.com>2022-01-03 13:24:50 +0200
commit30b917d34adc27e55a1326406a22e2a6d0a87817 (patch)
tree0575f29b00bca098e4f92eb560582fd08f1f5f1f /sql/log.cc
parent3e0304884b45d143e4194b3244d6e77a663680fc (diff)
downloadmariadb-git-30b917d34adc27e55a1326406a22e2a6d0a87817.tar.gz
MDEV-27039 Trying to lock mutex ... when the mutex was already lockedbb-10.6-andrei
The reason of the double lock was an extraneous ha_flush_logs(). Unlike the upstream it is unnecessary in Mariadb that exploits a binlog checkpoint mechanism for not letting PURGE or RESET-MASTER to trouble transaction recovery. That is in case should a trx be prepared but its binlog file gone, the trx then is committed on disk too. Those facts have been always verified by existing tests of binlog.binlog_{checkpoint,xa_recover}.test. A regression test for the bug is included though.
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc1
1 files changed, 0 insertions, 1 deletions
diff --git a/sql/log.cc b/sql/log.cc
index 41eed80ef66..8df7c3f5275 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -7029,7 +7029,6 @@ void MYSQL_BIN_LOG::purge()
DBUG_EXECUTE_IF("expire_logs_always", { purge_time = my_time(0); });
if (purge_time >= 0)
{
- ha_flush_logs();
purge_logs_before_date(purge_time);
}
DEBUG_SYNC(current_thd, "after_purge_logs_before_date");