mariadb/storage/innobase
Marko Mäkelä f5fddae3cb MDEV-26450: Corruption due to innodb_undo_log_truncate
At least since commit 055a3334ad
(MDEV-13564) the undo log truncation in InnoDB did not work correctly.

The main issue is that during the execution of
trx_purge_truncate_history() some pages of the newly truncated
undo tablespace could be discarded.

This is improved from commit 1cb218c37c
which was applied to earlier-version branches.

fsp_try_extend_data_file(): Apply the peculiar rounding of
fil_space_t::size_in_header only to the system tablespace,
whose size can be expressed in megabytes in a configuration parameter.
Other files may freely grow by a number of pages.

fseg_alloc_free_page_low(): Do allow the extension of undo tablespaces,
and mention the file name in the error message.

mtr_t::commit_shrink(): Implement crash-safe shrinking of a tablespace:
(1) durably write the log
(2) release the page latches of the rebuilt tablespace
(3) release the mutexes
(4) truncate the file
(5) release the tablespace latch
This is refactored from trx_purge_truncate_history().

log_write_and_flush_prepare(), log_write_and_flush(): New functions
to durably write log during mtr_t::commit_shrink().
2021-09-24 08:22:19 +03:00
..
btr MDEV-26547 Restoring InnoDB buffer pool dump is single-threaded for no reason 2021-09-06 10:14:24 +03:00
buf MDEV-26626 fixup: Do not advance checkpoint during startup 2021-09-24 08:20:44 +03:00
data Merge remote-tracking branch 'upstream/10.4' into 10.5 2021-09-10 17:16:18 +03:00
dict Merge 10.4 into 10.5 2021-09-11 11:49:12 +03:00
eval
fil Merge 10.4 into 10.5 2021-09-11 11:49:12 +03:00
fsp MDEV-26450: Corruption due to innodb_undo_log_truncate 2021-09-24 08:22:19 +03:00
fts Merge 10.4 into 10.5 2021-08-18 18:22:35 +03:00
fut MDEV-22110 preparation: Remove mtr_memo_contains macros 2020-06-10 07:50:09 +03:00
gis Merge 10.4 into 10.5 2021-04-14 11:35:39 +03:00
ha MDEV-22871: Remove pointer indirection for InnoDB hash_table_t 2020-06-18 14:16:01 +03:00
handler Merge remote-tracking branch 'upstream/10.4' into 10.5 2021-09-10 17:16:18 +03:00
ibuf MDEV-25783: Change buffer records are lost under heavy load 2021-06-07 19:07:45 +03:00
include MDEV-26450: Corruption due to innodb_undo_log_truncate 2021-09-24 08:22:19 +03:00
lock MDEV-26206 gap lock is not set if implicit lock exists 2021-08-19 11:51:21 +03:00
log MDEV-26450: Corruption due to innodb_undo_log_truncate 2021-09-24 08:22:19 +03:00
mem Merge 10.4 into 10.5 2020-07-02 09:41:44 +03:00
mtr MDEV-26450: Corruption due to innodb_undo_log_truncate 2021-09-24 08:22:19 +03:00
mysql-test/storage_engine
os Merge 10.4 into 10.5 2021-09-11 11:49:12 +03:00
page Merge 10.3 into 10.4 2021-08-25 07:30:47 +03:00
pars Merge 10.4 into 10.5 2021-08-18 18:22:35 +03:00
que Merge 10.4 into 10.5 2021-01-11 16:29:51 +02:00
read Merge branch '10.3' into 10.4 2021-07-31 22:59:58 +02:00
rem Merge 10.4 into 10.5 2021-07-02 16:19:25 +03:00
row Merge 10.4 into 10.5 2021-08-19 11:52:35 +03:00
srv MDEV-26511 - Do not change purge thread count during bootstrap 2021-08-31 12:02:31 +02:00
sync MDEV-24308: Remove some os_thread_ functions 2020-11-30 11:15:31 +02:00
trx MDEV-26450: Corruption due to innodb_undo_log_truncate 2021-09-24 08:22:19 +03:00
ut Merge 10.4 into 10.5 2021-04-14 11:35:39 +03:00
.clang-format-old switch off storage/innobase/.clang-format: InnoDB uses a common formatting style for all new code 2021-03-17 11:01:15 +03:00
bzip2.cmake Add feature summary at the end of cmake. 2021-07-21 10:22:56 +03:00
CMakeLists.txt Merge 10.4 into 10.5 2021-08-18 18:22:35 +03:00
compile-innodb
COPYING.Google
COPYING.Percona
innodb.cmake Merge 10.4 into 10.5 2021-08-23 11:10:59 +03:00
lz4.cmake Add feature summary at the end of cmake. 2021-07-21 10:22:56 +03:00
lzma.cmake Add feature summary at the end of cmake. 2021-07-21 10:22:56 +03:00
lzo.cmake Add feature summary at the end of cmake. 2021-07-21 10:22:56 +03:00
plugin_exports
snappy.cmake Add feature summary at the end of cmake. 2021-07-21 10:22:56 +03:00