diff options
author | unknown <sanja@sun.com> | 2008-12-08 22:09:59 +0200 |
---|---|---|
committer | unknown <sanja@sun.com> | 2008-12-08 22:09:59 +0200 |
commit | c9b0c5a15c76b6611000d77d64efb7bca41b5f8d (patch) | |
tree | b4a6f1cf1f3b8ef6da633f0f4520fd0b3c99c71b /storage/maria/ma_state.h | |
parent | bb7ae40a7a820abcffd7e36229f05322e7c9b92f (diff) | |
download | mariadb-git-c9b0c5a15c76b6611000d77d64efb7bca41b5f8d.tar.gz |
Fixed mutexes lock order in maria_close(): LOCK_trn_list -> MARIA_SHARE::intern_lock (then will be WL to revert the order).
(BUG#40981 Maria: deadlock between checkpoint and maria_close() when freeing state info)
storage/maria/ma_checkpoint.c:
The argument added to the function to use it in maria_close().
storage/maria/ma_close.c:
Locking/unlocking MARIA_SHARE::intern_lock added to use correct order of the mutexes taking.
storage/maria/ma_state.c:
Removed assert becase now we have externally locked mutex in maria_close().
The argument added to the _ma_remove_not_visible_states_with_lock() to use it in maria_close().
_ma_remove_not_visible_states_with_lock() fixed tio be usable from maria_chk where transaction manager is not initialized.
storage/maria/ma_state.h:
The argument added to the function to use it in maria_close().
storage/maria/maria_def.h:
Fixed comment to the variable.
storage/maria/trnman.c:
The debugging assert added.
New function to detect transaction manager initialization added (maria_chk do not initialize it).
storage/maria/trnman_public.h:
New function to detect transaction manager initialization added (maria_chk do not initialize it).
Diffstat (limited to 'storage/maria/ma_state.h')
-rw-r--r-- | storage/maria/ma_state.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/storage/maria/ma_state.h b/storage/maria/ma_state.h index 968c526cd98..b5790aa17b8 100644 --- a/storage/maria/ma_state.h +++ b/storage/maria/ma_state.h @@ -78,6 +78,7 @@ my_bool _ma_trnman_end_trans_hook(TRN *trn, my_bool commit, my_bool _ma_row_visible_always(MARIA_HA *info); my_bool _ma_row_visible_non_transactional_table(MARIA_HA *info); my_bool _ma_row_visible_transactional_table(MARIA_HA *info); -void _ma_remove_not_visible_states_with_lock(struct st_maria_share *share); +void _ma_remove_not_visible_states_with_lock(struct st_maria_share *share, + my_bool all); void _ma_remove_table_from_trnman(struct st_maria_share *share, TRN *trn); void _ma_reset_history(struct st_maria_share *share); |