summaryrefslogtreecommitdiff
path: root/mysql-test/main/partition-master.opt
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2023-03-03 11:38:43 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2023-03-03 11:38:43 +0200
commit077425a65989e62149df1a23a73e50d0c793fb0f (patch)
treeb7442445f1431dece57b200fb50bc0be7b285573 /mysql-test/main/partition-master.opt
parent95d51369c9b1d5b759be630003ab12e9615ea0cc (diff)
downloadmariadb-git-077425a65989e62149df1a23a73e50d0c793fb0f.tar.gz
MDEV-30311 system-wide max transaction id corrupted after changing the undo tablespaces
This fixes a regression due to MDEV-19229. InnoDB would fail to maintain the maximum transaction ID when it changes and reinitializes the number of undo tablespaces. InnoDB should maintain the maximum transaction ID in TRX_RSEG_MAX_TRX_ID of system rollback segment header. srv_undo_tablespaces_reinit(): Preserve the system-wide maximum transaction identifier in the TRX_RSEG_MAX_TRX_ID field of the first rollback segment. If needed, upgrade the page to the MariaDB 10.3 format first. All this must be done in the same atomic mini-transaction that will reinitialize the TRX_SYS page. Before MariaDB Server 10.3, InnoDB persisted the maximum transaction identifier only in the TRX_SYS page. MariaDB 10.3 started to treat that page as a read-only directory of rollback segments, and the maximum transaction identifier will be recovered from TRX_RSEG_MAX_TRX_ID or from undo logs. Since a change of innodb_undo_tablespaces is only allowed when no undo log records exist, the only place to store the persistent maximum transaction identifier is in TRX_RSEG_MAX_TRX_ID of one of the rollback segment header pages. The bug was observed when the database was upgraded directly from MySQL 5.7 or earlier, or from MariaDB Server 10.2 or earlier, to multiple innodb_undo_tablespaces. On a restart of MariaDB after the upgrade, the transaction identifier would be reported to be smaller than during the upgrade: 2023-03-03 10:43:57 0 [Note] InnoDB: log sequence number 2762352; transaction id 1794 2023-03-03 10:44:17 0 [Note] InnoDB: log sequence number 2786076; transaction id 770
Diffstat (limited to 'mysql-test/main/partition-master.opt')
0 files changed, 0 insertions, 0 deletions