summaryrefslogtreecommitdiff
path: root/storage/maria/ma_commit.c
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2018-08-16 17:30:02 +0300
committerMonty <monty@mariadb.org>2018-08-17 15:14:22 +0300
commit3faed09d6d7cae54d01e7a5f988c057417f9df65 (patch)
tree3848c88fd99e9833dee394364b871774226a0834 /storage/maria/ma_commit.c
parentead9a34a3e934f607c2ea7a6c68f7f6d9d29b5bd (diff)
downloadmariadb-git-3faed09d6d7cae54d01e7a5f988c057417f9df65.tar.gz
MDEV-16986 Unitialized mutex, SIGSEGV and assorted assertion failures in Aria code
This was introduced by two pointers I added to TRN as part of MDEV-16421 Make system tables crash safe - Added code to ensure that trn_prev is not pointing to wrong object - A lot of new asserts and more code comments - Simplified code in _ma_trnman_end_trans_hook() - New back link allowed me to remove a loop
Diffstat (limited to 'storage/maria/ma_commit.c')
-rw-r--r--storage/maria/ma_commit.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/storage/maria/ma_commit.c b/storage/maria/ma_commit.c
index 0ae3868dbf6..f557cd211e2 100644
--- a/storage/maria/ma_commit.c
+++ b/storage/maria/ma_commit.c
@@ -98,7 +98,12 @@ int maria_commit(MARIA_HA *info)
if (!info->s->now_transactional)
return 0;
trn= info->trn;
- info->trn= 0; /* checked in maria_close() */
+ /*
+ trn is reset as it's checked in maria_close
+ Note that info is still linked in info->trn->used_instances, as this is
+ used in ha_maria::implicit_commit()
+ */
+ info->trn= 0;
return ma_commit(trn);
}