diff options
author | Monty <monty@mariadb.org> | 2018-05-20 14:19:14 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2018-05-22 23:05:48 +0300 |
commit | 2f3779d31cbbabcb171c22237253c82146118446 (patch) | |
tree | 541d84573155e6fe6476c0bae2718817edef3da3 /storage/maria/ma_state.h | |
parent | c1b5d2801e81443c8ad02823e12d54f662e4c801 (diff) | |
download | mariadb-git-2f3779d31cbbabcb171c22237253c82146118446.tar.gz |
Fixes for Aria transaction handling with lock tables
MDEV-10130 Assertion `share->in_trans == 0' failed in storage/maria/ma_close.c
MDEV-10378 Assertion `trn' failed in virtual int ha_maria::start_stmt
The problem was that maria_handler->trn was not properly reset
at commit/rollback and ha_maria::exernal_lock() could get confused
because.
There was some old code in ha_maria::implicit_commit() that tried
to take care of this, but it was not bullet proof.
Fixed by adding list of all tables that is part of the maria transaction to
TRN.
A nice side effect was of the fix is that loops in
ha_maria::implict_commit() got to be much simpler.
Other things:
- Fixed a bug in mysql_admin_table() where argument open_for_modify
was wrongly reset for the next table in the chain
- rollback admin command also in case of fatal error.
- Split _ma_set_trn_for_table() to three version to simplify code
and debugging.
- Several new asserts to detect the original problem (that file was
not properly removed from trn before calling ma_close())
Diffstat (limited to 'storage/maria/ma_state.h')
-rw-r--r-- | storage/maria/ma_state.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/maria/ma_state.h b/storage/maria/ma_state.h index d662b9899f8..d47595ee08d 100644 --- a/storage/maria/ma_state.h +++ b/storage/maria/ma_state.h @@ -84,5 +84,5 @@ 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, my_bool all); -void _ma_remove_table_from_trnman(struct st_maria_share *share, TRN *trn); +void _ma_remove_table_from_trnman(MARIA_HA *info); void _ma_reset_history(struct st_maria_share *share); |