summaryrefslogtreecommitdiff
path: root/storage/innobase/include
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2023-02-15 18:16:41 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2023-02-15 18:16:41 +0200
commit5300c0fb7632e7e49a22997297bf731e691d3c24 (patch)
treee5a9ceaadac8fd11aaeadc12f0bceee114a687e4 /storage/innobase/include
parent192427e37d2b066f9f681cc1b998b2efdc407c55 (diff)
downloadmariadb-git-5300c0fb7632e7e49a22997297bf731e691d3c24.tar.gz
MDEV-30657 InnoDB: Not applying UNDO_APPEND due to corruption
This almost completely reverts commit acd23da4c2363511aae7d984c24cc6847aa3f19c and retains a safe optimization: recv_sys_t::parse(): Remove any old redo log records for the truncated tablespace, to free up memory earlier. If recovery consists of multiple batches, then recv_sys_t::apply() will must invoke recv_sys_t::trim() again to avoid wrongly applying old log records to an already truncated undo tablespace.
Diffstat (limited to 'storage/innobase/include')
-rw-r--r--storage/innobase/include/log0recv.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/storage/innobase/include/log0recv.h b/storage/innobase/include/log0recv.h
index 73d5724f612..e4a8f0d25a2 100644
--- a/storage/innobase/include/log0recv.h
+++ b/storage/innobase/include/log0recv.h
@@ -266,9 +266,15 @@ private:
@param lsn log sequence number of the shrink operation */
inline void trim(const page_id_t page_id, lsn_t lsn);
- /** Truncated undo tablespace size for which truncate has been logged
- (indexed by page_id_t::space() - srv_undo_space_id_start), or 0 */
- unsigned truncated_undo_spaces[127];
+ /** Undo tablespaces for which truncate has been logged
+ (indexed by page_id_t::space() - srv_undo_space_id_start) */
+ struct trunc
+ {
+ /** log sequence number of FILE_CREATE, or 0 if none */
+ lsn_t lsn;
+ /** truncated size of the tablespace, or 0 if not truncated */
+ unsigned pages;
+ } truncated_undo_spaces[127];
public:
/** The contents of the doublewrite buffer */