-
Mats Kindahl authored
This patch does some refactoring of the way transaction coordinators and moves towards having the binary being a transaction coordinator proper rather than a mix between a handlerton and a transaction coordinator. This is done in preparation for the binary log group commit. This is done by extending the TC_LOG class with two new methods, commit and rollback, and extending the handler functions with three new functions, ha_commit_low, ha_rollback_low, and ha_prepare_low. The ha_*_low functions does the actual commit job towards the handlertons and are used when the transaction should be prepared, committed, or rolled back in the engines. When a transaction is committed (or rolled back), the transaction coordinator is called and is expected to ensure that the transaction is committed and then return. The basic transaction coordinators just calls the ha_*_low function, but for more advanced transaction coordinators a more complex job is done before (and after) the ha_*_low. This patch: Removes the log_xid and unlog functions from the TC_LOG class and add pure virtual functions TC_LOG::commit and TC_LOG::rollback. Change TC_LOG_DUMMY and TC_LOG_MMAP to implement the new interface. Moves the code in the binlog_commit into MYSQL_BIN_LOG::commit. Moves the code in binlog_rollback into MYSQL_BIN_LOG::rollback. Adds a class binlog_stmt_cache_data to represent the statement cache. Moves several free functions related to the binary log caches into the corresponding classes. Updates the trans_* function to use the new TC_LOG logic. Fixes some tests so that it can enable error triggers without disabling trace output.
Mats Kindahl authoredThis patch does some refactoring of the way transaction coordinators and moves towards having the binary being a transaction coordinator proper rather than a mix between a handlerton and a transaction coordinator. This is done in preparation for the binary log group commit. This is done by extending the TC_LOG class with two new methods, commit and rollback, and extending the handler functions with three new functions, ha_commit_low, ha_rollback_low, and ha_prepare_low. The ha_*_low functions does the actual commit job towards the handlertons and are used when the transaction should be prepared, committed, or rolled back in the engines. When a transaction is committed (or rolled back), the transaction coordinator is called and is expected to ensure that the transaction is committed and then return. The basic transaction coordinators just calls the ha_*_low function, but for more advanced transaction coordinators a more complex job is done before (and after) the ha_*_low. This patch: Removes the log_xid and unlog functions from the TC_LOG class and add pure virtual functions TC_LOG::commit and TC_LOG::rollback. Change TC_LOG_DUMMY and TC_LOG_MMAP to implement the new interface. Moves the code in the binlog_commit into MYSQL_BIN_LOG::commit. Moves the code in binlog_rollback into MYSQL_BIN_LOG::rollback. Adds a class binlog_stmt_cache_data to represent the statement cache. Moves several free functions related to the binary log caches into the corresponding classes. Updates the trans_* function to use the new TC_LOG logic. Fixes some tests so that it can enable error triggers without disabling trace output.
Loading