summaryrefslogtreecommitdiff
path: root/storage/innobase/include/trx0roll.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.3 into 10.4Marko Mäkelä2019-05-051-4/+2
|\
| * Merge 10.2 into 10.3Marko Mäkelä2019-04-271-4/+2
| |\
| | * Remove roll_node_t::partialMarko Mäkelä2019-04-261-4/+2
| | | | | | | | | | | | | | | | | | | | | The field roll_node_t::partial holds if and only if savept has been set. Make savept a pointer. trx_rollback_start(): Use the semantic type undo_no_t for roll_limit.
* | | Merge 10.3 into 10.4Marko Mäkelä2018-11-301-2/+0
|\ \ \ | |/ /
| * | Merge 10.2 into 10.3Marko Mäkelä2018-11-301-2/+0
| |\ \ | | |/ | | | | | | | | | | | | Also, related to MDEV-15522, MDEV-17304, MDEV-17835, remove the Galera xtrabackup tests, because xtrabackup never worked with MariaDB Server 10.3 due to InnoDB redo log format changes.
| | * Remove some unnecessary InnoDB #includeMarko Mäkelä2018-11-291-2/+0
| | |
| | * Merge branch '10.1' into 10.2Vicențiu Ciorbaru2018-04-101-1/+1
| | |\
| | | * Revert "MDEV-14705: Do not rollback on InnoDB shutdown"Marko Mäkelä2018-04-101-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 76ec37f5225eda9f8a23760091bfb60287927715. This behaviour change will be done separately in: MDEV-15832 With innodb_fast_shutdown=3, skip the rollback of connected transactions
| | | * MDEV-14705: Do not rollback on InnoDB shutdownMarko Mäkelä2018-04-061-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | row_undo_step(): If fast shutdown has been requested, abort the rollback of any non-DDL transactions. Starting with MDEV-12323, we aborted the rollback of recovered transactions. These transactions would be rolled back on subsequent server startup. trx_roll_report_progress(): Renamed from trx_roll_must_shutdown(), now that the shutdown check has been moved to the only caller.
* | | | MDEV-17794 Do not assign persistent ID for temporary tablesMarko Mäkelä2018-11-221-10/+0
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InnoDB in MySQL 5.7 introduced two new parameters to the function dict_hdr_get_new_id(), to allow redo logging to be disabled when assigning identifiers to temporary tables or during the backup-unfriendly TRUNCATE TABLE that was replaced in MariaDB by MDEV-13564. Now that MariaDB 10.4.0 removed the crash recovery code for the backup-unfriendly TRUNCATE, we can revert dict_hdr_get_new_id() to be used only for persistent data structures. dict_table_assign_new_id(): Remove. This was a simple 2-line function that was called from few places. dict_table_open_on_id_low(): Declare in the only file where it is called. dict_sys_t::temp_id_hash: A separate lookup table for temporary tables. Table names will be in the common dict_sys_t::table_hash. dict_sys_t::get_temporary_table_id(): Assign a temporary table ID. dict_sys_t::get_table(): Look up a persistent table. dict_sys_t::get_temporary_table(): Look up a temporary table. dict_sys_t::temp_table_id: The sequence of temporary table identifiers. Starts from DICT_HDR_FIRST_ID, so that we can continue to simply compare dict_table_t::id to a few constants for the persistent hard-coded data dictionary tables. undo_node_t::state: Distinguish temporary and persistent tables. lock_check_dict_lock(), lock_get_table_id(): Assert that there cannot be locks on temporary tables. row_rec_to_index_entry_impl(): Assert that there cannot be metadata records on temporary tables. row_undo_ins_parse_undo_rec(): Distinguish temporary and persistent tables. Move some assertions from the only caller. Return whether the table was found. row_undo_ins(): Add some assertions. row_undo_mod_clust(), row_undo_mod(): Do not assign node->state. Let row_undo() do that. row_undo_mod_parse_undo_rec(): Distinguish temporary and persistent tables. Move some assertions from the only caller. Return whether the table was found. row_undo_try_truncate(): Renamed and simplified from trx_roll_try_truncate(). row_undo_rec_get(): Replaces trx_roll_pop_top_rec_of_trx() and trx_roll_pop_top_rec(). Fetch an undo log record, and assign undo->state accordingly. trx_undo_truncate_end(): Acquire the rseg->mutex only for the minimum required duration, and release it between mini-transactions.
* | | Remove trx_t::undo_rseg_spaceMarko Mäkelä2018-04-251-2/+0
| | | | | | | | | | | | | | | | | | The field undo_rseg_space was only used in a debug check. trx_roll_check_undo_rec_ordering(): Remove.
* | | MDEV-15832 With innodb_fast_shutdown=3, skip the rollback of connected ↵Marko Mäkelä2018-04-111-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | transactions row_undo_step(): If innodb_fast_shutdown=3 has been requested, abort the rollback of any non-DDL transactions. Starting with MDEV-12323, we aborted the rollback of recovered transactions. The transactions would be rolled back on subsequent server startup. trx_roll_report_progress(): Renamed from trx_roll_must_shutdown(), now that the shutdown check has been moved to the only caller. trx_commit_low(): Allow mtr=NULL for transactions that are aborted on rollback. trx_rollback_finish(): Clean up aborted transactions to avoid assertion failures and memory leaks on shutdown. This code was previously in trx_rollback_active(). trx_rollback_to_savepoint_low(), trx_rollback_for_mysql_low(): Remove some redundant assertions.
* | | MDEV-14756 - Remove trx_sys_t::rw_trx_listSergey Vojtovich2018-01-201-11/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce divergence between trx_sys_t::rw_trx_hash and trx_sys_t::rw_trx_list by not adding recovered COMMITTED transactions to trx_sys_t::rw_trx_list. Such transactions are discarded immediately without creating trx object. This also required to split rollback and cleanup phases of recovery. To reflect these updates the following renames happened: trx_rollback_or_clean_all_recovered() -> trx_rollback_all_recovered() trx_rollback_or_clean_is_active -> trx_rollback_is_active trx_rollback_or_clean_recovered() -> trx_rollback_recovered() trx_cleanup_at_db_startup() -> trx_cleanup_recovered() Also removed a hack from lock_trx_release_locks(). Instead let recovery rollback thread to skip committed XA transactions.
* | Merge 10.1 into 10.2Marko Mäkelä2017-12-141-1/+6
|\ \ | |/
| * MDEV-12323 Rollback progress log messages during crash recovery are ↵Marko Mäkelä2017-12-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | intermixed with unrelated log messages trx_roll_must_shutdown(): During the rollback of recovered transactions, report progress and check if the rollback should be interrupted because of a pending shutdown. trx_roll_max_undo_no, trx_roll_progress_printed_pct: Remove, along with the messages that were interleaved with other messages.
| * MDEV-12352 InnoDB shutdown should not be blocked by a large transaction rollbackMarko Mäkelä2017-12-131-1/+3
| | | | | | | | | | | | | | | | row_undo_step(), trx_rollback_active(): Abort the rollback of a recovered ordinary transaction if fast shutdown has been initiated. trx_rollback_resurrected(): Convert an aborted-rollback transaction into a fake XA PREPARE transaction, so that fast shutdown can proceed.
* | MDEV-12271 Port MySQL 8.0 Bug#23150562 REMOVE UNIV_MUST_NOT_INLINE AND ↵Marko Mäkelä2017-03-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UNIV_NONINL Also, remove empty .ic files that were not removed by my MySQL commit. Problem: InnoDB used to support a compilation mode that allowed to choose whether the function definitions in .ic files are to be inlined or not. This stopped making sense when InnoDB moved to C++ in MySQL 5.6 (and ha_innodb.cc started to #include .ic files), and more so in MySQL 5.7 when inline methods and functions were introduced in .h files. Solution: Remove all references to UNIV_NONINL and UNIV_MUST_NOT_INLINE from all files, assuming that the symbols are never defined. Remove the files fut0fut.cc and ut0byte.cc which only mattered when UNIV_NONINL was defined.
* | MDEV-12219 Discard temporary undo logs at transaction commitMarko Mäkelä2017-03-131-25/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge InnoDB 5.7 from mysql-5.7.9.Jan Lindström2016-09-021-89/+34
|/ | | | | | | | | | | | | | | | | | | | | | | Contains also MDEV-10547: Test multi_update_innodb fails with InnoDB 5.7 The failure happened because 5.7 has changed the signature of the bool handler::primary_key_is_clustered() const virtual function ("const" was added). InnoDB was using the old signature which caused the function not to be used. MDEV-10550: Parallel replication lock waits/deadlock handling does not work with InnoDB 5.7 Fixed mutexing problem on lock_trx_handle_wait. Note that rpl_parallel and rpl_optimistic_parallel tests still fail. MDEV-10156 : Group commit tests fail on 10.2 InnoDB (branch bb-10.2-jan) Reason: incorrect merge MDEV-10550: Parallel replication can't sync with master in InnoDB 5.7 (branch bb-10.2-jan) Reason: incorrect merge
* 5.6.31Sergei Golubchik2016-06-211-8/+8
|
* move to storage/innobaseSergei Golubchik2015-05-041-0/+297