Commit 3fc1f626 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-21158 trx_undo_seg_free() is never redo-logged

As part of commit 3c09f148
trx_undo_commit_cleanup() was always invoked with noredo=true.

The impact of this should be that some undo log pages may not be
correctly freed if the server is killed and crash recovery will be
performed. Similarly, if mariabackup --backup is being executed
concurrently with user transaction commits, it could happen that some
undo log pages in the backup will never be marked as free for reuse.

It seems that this bug should not have any user-visible
impact other than some undo pages being wasted.
parent bf58ec77
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2014, 2018, MariaDB Corporation.
Copyright (c) 2014, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -1607,7 +1607,7 @@ trx_undo_commit_cleanup(trx_undo_t* undo, bool is_temp)
/* Delete first the undo log segment in the file */
mutex_exit(&rseg->mutex);
trx_undo_seg_free(undo, true);
trx_undo_seg_free(undo, is_temp);
mutex_enter(&rseg->mutex);
ut_ad(rseg->curr_size > undo->size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment