diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-01-18 16:13:50 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-01-18 16:26:09 +0200 |
commit | 6c09a6542e94d2bcaaa7d03abe6b6cab40083f99 (patch) | |
tree | a63f112e1bb90a05258f2ef1489cd87f1a9fbbf5 /mysql-test/t/cte_nonrecursive.test | |
parent | cc915cd59973a9eaccdeb2ca4c30ab4d8878ea43 (diff) | |
download | mariadb-git-6c09a6542e94d2bcaaa7d03abe6b6cab40083f99.tar.gz |
MDEV-14985 innodb_undo_log_truncate may be blocked if transactions were recovered at startup
The field trx_rseg_t::trx_ref_count that was added in WL#6965 in
MySQL 5.7.5 is being incremented twice if a recovered transaction
includes both undo log partitions insert_undo and update_undo.
This reference count is being used in trx_purge(), which invokes
trx_purge_initiate_truncate() to try to truncate an undo tablespace
file. Because of the double-increment, the trx_ref_count would never
reach 0.
It is possible that after the failed truncation attempt, the undo
tablespace would be disabled for logging any new transactions until
the server is restarted (hopefully after committing or rolling back
all transactions, so that no transactions would be recovered
on the next startup).
trx_resurrect_insert(), trx_resurrect_update(): Do not increment
trx_ref_count. Instead, let the caller do that.
trx_lists_init_at_db_start(): Increment rseg->trx_ref_count only
once for each recovered transaction. Adjust comments.
Finally, if innodb_force_recovery prevents the undo log scan,
do not bother iterating the empty lists.
Diffstat (limited to 'mysql-test/t/cte_nonrecursive.test')
0 files changed, 0 insertions, 0 deletions