mariadb/storage/innobase
Marko Mäkelä 13e5c9de80 MDEV-12219 Discard temporary undo logs at transaction commit
Starting with MySQL 5.7, temporary tables in InnoDB are handled
differently from persistent tables. Because temporary tables are
private to a connection, concurrency control and multi-versioning
(MVCC) are not applicable. For performance reasons, purge is
disabled as well. Rollback is supported for temporary tables;
that is why we have the temporary undo logs in the first place.

Because MVCC and purge are disabled for temporary tables, we should
discard all temporary undo logs already at transaction commit,
just like we discard the persistent insert_undo logs. Before this
change, update_undo logs were being preserved.

trx_temp_undo_t: A wrapper for temporary undo logs, comprising
a rollback segment and a single temporary undo log.

trx_rsegs_t::m_noredo: Use trx_temp_undo_t.
(Instead of insert_undo, update_undo, there will be a single undo.)

trx_is_noredo_rseg_updated(), trx_is_rseg_assigned(): Remove.

trx_undo_add_page(): Remove the parameter undo_ptr.
Acquire and release the rollback segment mutex inside the function.

trx_undo_free_last_page(): Remove the parameter trx.

trx_undo_truncate_end(): Remove the parameter trx, and add the
parameter is_temp. Clean up the code a bit.

trx_undo_assign_undo(): Split the parameter undo_ptr into rseg, undo.

trx_undo_commit_cleanup(): Renamed from trx_undo_insert_cleanup().
Replace the parameter undo_ptr with undo.
This will discard the temporary undo or insert_undo log at
commit/rollback.

trx_purge_add_update_undo_to_history(), trx_undo_update_cleanup():
Remove 3 parameters. Always operate on the persistent update_undo.

trx_serialise(): Renamed from trx_serialisation_number_get().

trx_write_serialisation_history(): Simplify the code flow.
If there are no persistent changes, do not update MONITOR_TRX_COMMIT_UNDO.

trx_commit_in_memory(): Simplify the logic, and add assertions.

trx_undo_page_report_modify(): Keep a direct reference to the
persistent update_undo log.

trx_undo_report_row_operation(): Simplify some code.
Always assign TRX_UNDO_INSERT for temporary undo logs.

trx_prepare_low(): Keep only one parameter. Prepare all 3 undo logs.

trx_roll_try_truncate(): Remove the parameter undo_ptr.
Try to truncate all 3 undo logs of the transaction.

trx_roll_pop_top_rec_of_trx_low(): Remove.

trx_roll_pop_top_rec_of_trx(): Remove the redundant parameter
trx->roll_limit. Clear roll_limit when exhausting the undo logs.
Consider all 3 undo logs at once, prioritizing the persistent
undo logs.

row_undo(): Minor cleanup. Let trx_roll_pop_top_rec_of_trx()
reset the trx->roll_limit.
2017-03-13 18:57:17 +02:00
..
btr Fix many -Wconversion warnings. 2017-03-07 19:07:27 +02:00
buf Fix many -Wconversion warnings. 2017-03-07 19:07:27 +02:00
data Fix many -Wconversion warnings. 2017-03-07 19:07:27 +02:00
dict enum btr_latch_mode: Incorporate some flags. 2017-03-09 10:30:36 +02:00
eval
fil MDEV-12201 innodb_flush_method are not available on Windows 2017-03-09 19:19:38 +00:00
fsp Fix many -Wconversion warnings. 2017-03-07 19:07:27 +02:00
fts
fut
gis Fix many -Wconversion warnings. 2017-03-07 19:07:27 +02:00
ha
handler Fix many -Wconversion warnings. 2017-03-07 19:07:27 +02:00
ibuf Fix many -Wconversion warnings. 2017-03-07 19:07:27 +02:00
include MDEV-12219 Discard temporary undo logs at transaction commit 2017-03-13 18:57:17 +02:00
lock Fix many -Wconversion warnings. 2017-03-07 19:07:27 +02:00
log Fix some compilation warnings. 2017-03-13 18:11:36 +02:00
mach
mem Fix many -Wconversion warnings. 2017-03-07 19:07:27 +02:00
mtr Define a mtr_t::start() wrapper inline. 2017-03-13 18:11:01 +02:00
mysql-test/storage_engine
os Fix some compilation warnings. 2017-03-13 18:11:36 +02:00
page Fix many -Wconversion warnings. 2017-03-07 19:07:27 +02:00
pars
que
read
rem Fix many -Wconversion warnings. 2017-03-07 19:07:27 +02:00
row MDEV-12219 Discard temporary undo logs at transaction commit 2017-03-13 18:57:17 +02:00
srv MDEV-12091 Shutdown fails to wait for rollback of recovered transactions to finish 2017-03-13 18:11:36 +02:00
sync Adjust an outdated comment. 2017-03-13 18:11:01 +02:00
trx MDEV-12219 Discard temporary undo logs at transaction commit 2017-03-13 18:57:17 +02:00
usr
ut Fix many -Wconversion warnings. 2017-03-07 19:07:27 +02:00
CMakeLists.txt
compile-innodb
COPYING.Google
COPYING.Percona
innodb.cmake
plugin_exports