Details
-
Task
-
Status: Stalled (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
Description
As was discussed in https://mariadb.slack.com/archives/CHTLSLQEP/p1575543442067300 (attached here) transaction_registry table has many drawbacks: performance, hard to backup, not node-portable. The feature of transaction-precise versioning as described in https://mariadb.com/kb/en/library/temporal-data-tables/ actually does not require transaction_registry translation: we store timestamps as usual, but update row_end of changed rows at commit time.
Clustered index records contain DB_TRX_ID, DB_ROLL_PTR fields with non-null values in case they was changed by some open transaction. Clustered index is ordered by PK, explicit or implicit. In case there is no explicit PK in table, first non-null UK is then used or if no such UK exists then auto-generated DB_ROW_ID is added to clustered index. So there are 3 variants of ordering: explicit PK, non-null UK, DB_ROW_ID. We cannot search quickly by DB_TRX_ID.
Every open transaction has 2 undo logs attached per each changed table. Undo log cannot be attached to more than 1 transaction. One of undo logs is used for non-temporary tables, another one is for temporary ones. Non-temporary undo log must be scanned and corresponding clustered index rows selected by PK (one of 3 variants above).
Redo log must updated as well, otherwise crash recovery wil end up with wrong values of row_end.
Upgrade process converts TRX_ID-based tables to timestamp-based. As such kind of tables cannot be backed up, transaction_registry table is safe to drop as long as all TRX_ID-based tables converted.
Attachments
Issue Links
- is blocked by
-
MDEV-16144 Default TIMESTAMP clause for SELECT from versioned
- Closed
- relates to
-
MDEV-17089 Updating a System Versioned Table always causes a row to be updated, regardless if the data is the same or not
- Closed
-
MDEV-22540 ER_DUP_ENTRY upon REPLACE or Assertion `transactional_table || !changed || thd->transaction.stmt.modified_non_trans_table' failed
- Closed
-
MDEV-23446 UPDATE does not insert history row if the row is not changed
- Closed
-
MDEV-24608 Failing assertion: error == DB_SUCCESS || error == DB_DUPLICATE_KEY OR Assertion `error == DB_DUPLICATE_KEY || error == DB_LOCK_WAIT_TIMEOUT' failed IN trx_t::commit_low
- Open
-
MDEV-24621 In bulk insert, pre-sort and build indexes one page at a time
- Closed
-
MDEV-15922 system versioning with trx_id breaks when replicated
- Stalled
-
MDEV-17404 inconsistent transaction isolation level inside mysql.transaction_registry
- Open
-
MDEV-19131 Assertion `table->versioned(VERS_TRX_ID) || (table->versioned() && table->s->table_category == TABLE_CATEGORY_TEMPORARY)' failed in Field_vers_trx_id::get_date
- Confirmed
-
MDEV-20458 missing row in mysql.transaction_registry when error occurred during transaction
- Confirmed
-
MDEV-20842 Crash using versioning plugin functions after plugin was removed from server
- Closed
-
MDEV-21016 ASAN heap-use-after-free in trx_update_mod_tables_timestamp or in mysql_inplace_alter_table upon server shutdown during versioning operation
- Open
-
MDEV-21576 Assertion `table->vers_start != table->vers_end' or other ones failed in row_insert_for_mysql
- Closed
-
MDEV-22475 versioning.update failed in buildbot with wrong result code again
- Closed
-
MDEV-22960 versioning.replace fails in buildbot on ps-embedded with OS errors and SIGSEGV
- Open
-
MDEV-23145 Server crashes in handler::update_global_table_stats or Assertion `inited == NONE || table->open_by_handler' in handler::ha_external_lock
- Confirmed
-
MDEV-23285 mysql.transaction_registry contains default values for the timestamp columns that conflict with NO_ZERO_DATE sql mode
- Confirmed
-
MDEV-26807 Duplicate entry with cascading deletes in system versioned tables
- Open
-
MDEV-27040 Was: Assertion `thd->transaction->stmt.ha_list == __null || trans == &thd->transaction->stmt' failed in ha_rollback_trans
- Open
-
MDEV-29726 Assertion failure upon DELETE HISTORY or SELECT AS OF from precise-versioned table
- Open
-
MDEV-30035 Possibly unexpected ER_LOCK_WAIT_TIMEOUT upon DML and DELETE HISTORY from transaction-precise tables
- Open
-
MDEV-30701 row_start not set properly when updating field without system versioning using on duplicate key update
- Open