MDEV-30100 preparation: Simplify InnoDB transaction commit further
trx_commit_complete_for_mysql(): Remove some conditions. We will rely on trx_t::commit_lsn. trx_t::must_flush_log_later: Remove. trx_commit_complete_for_mysql() can simply check for trx_t::flush_log_later. trx_t::commit_in_memory(): Set commit_lsn=0 if the log was written. trx_flush_log_if_needed_low(): Renamed to trx_flush_log_if_needed(). Assert that innodb_flush_log_at_trx_commit!=0 was checked by the caller and that the transaction is not in XA PREPARE state. Unconditionally flush the log for data dictionary transactions, to ensure the correct processing of ddl_recovery.log. trx_write_serialisation_history(): Move some code from trx_purge_add_undo_to_history(). trx_prepare(): Invoke log_write_up_to() directly if needed. innobase_commit_ordered_2(): Simplify some conditions. A read-write transaction will always carry nonzero trx_t::id. Let us unconditionally reset mysql_log_file_name, flush_log_later after trx_t::commit() was invoked.
Showing
Please register or sign in to comment