mariadb/storage/innobase
Thirunarayanan Balathandayuthapani a35b4ae898 MDEV-15528 Punch holes when pages are freed
When a InnoDB data file page is freed, its contents becomes garbage,
and any storage allocated in the data file is wasted. During flushing,
InnoDB initializes the page with zeros if scrubbing is enabled. If the
tablespace is compressed then InnoDB should punch a hole else ignore the
flushing of the freed page.

buf_page_t:
- Replaced the variable file_page_was_freed, init_on_flush in buf_page_t
with status enum variable.
- Changed all debug assert of file_page_was_freed to DBUG_ASSERT
of buf_page_t::status

Removed buf_page_set_file_page_was_freed(),
buf_page_reset_file_page_was_freed().

buf_page_free(): Newly added function which takes X-lock on the page
before marking the status as FREED. So that InnoDB flush handler can
avoid concurrent flush of the freed page. Also while flushing the page,
InnoDB make sure that redo log which does freeing of the page also written
to the disk. Currently, this function only marks the page as FREED if
it is in buffer pool

buf_flush_freed_page(): Newly added function which initializes zeros
asynchorously if innodb_immediate_scrub_data_uncompressed is enabled.
Punch a hole to the file synchorously if page_compressed is enabled.
Reset the io_fix to NORMAL. Release the block from flush list and
associated mutex before writing zeros or punch a hole to the file.

buf_flush_page(): Removed the unnecessary usage of temporary
variable "flush"

fil_io(): Introduce new parameter called punch_hole. It allows fil_io()
to punch the hole to the file for the given offset.

buf_page_create(): Let the callers assign buf_page_t::status.
Every caller should eventually invoke mtr_t::init().

fsp_page_create(): Remove the unused mtr_t parameter.

In all other callers of buf_page_create() except fsp_page_create(),
before invoking mtr_t::init(), invoke
mtr_t::sx_latch_at_savepoint() or mtr_t::x_latch_at_savepoint().

mtr_t::init(): Initialize buf_page_t::status also for the temporary
tablespace (when redo logging is disabled), to avoid assertion failures.
2020-03-10 10:51:08 +05:30
..
btr MDEV-15528 Punch holes when pages are freed 2020-03-10 10:51:08 +05:30
buf MDEV-15528 Punch holes when pages are freed 2020-03-10 10:51:08 +05:30
data
dict Cleanup: Remove dict_ind_redundant 2020-02-20 22:00:43 +02:00
eval Merge 10.4 into 10.5 2019-12-16 07:47:17 +02:00
fil MDEV-15528 Punch holes when pages are freed 2020-03-10 10:51:08 +05:30
fsp MDEV-15528 Punch holes when pages are freed 2020-03-10 10:51:08 +05:30
fts Merge branch '10.4' into 10.5 2020-02-12 08:55:17 +01:00
fut MDEV-12353: Change the redo log encoding 2020-02-13 19:12:17 +02:00
gis MDEV-12353: Change the redo log encoding 2020-02-13 19:12:17 +02:00
ha Cleanup: Aligned InnoDB index page header access 2020-02-08 14:12:59 +02:00
handler MDEV-14425 Cleanup: Use std::atomic for some log_sys members 2020-03-05 16:21:31 +02:00
ibuf MDEV-15528 Punch holes when pages are freed 2020-03-10 10:51:08 +05:30
include MDEV-15528 Punch holes when pages are freed 2020-03-10 10:51:08 +05:30
lock MDEV-15528 Punch holes when pages are freed 2020-03-10 10:51:08 +05:30
log MDEV-21893: Assertion failure on upgrade with innodb_encrypt_log 2020-03-09 11:38:43 +02:00
mem MDEV-15058: Deprecate and ignore innodb_buffer_pool_instances 2020-02-12 14:45:21 +02:00
mtr MDEV-14425 Cleanup: Use std::atomic for some log_sys members 2020-03-05 16:21:31 +02:00
mysql-test/storage_engine MDEV-20907 Set innodb_log_files_in_group=1 by default 2019-10-28 17:11:10 +02:00
os use O_DSYNC for InnoDB 2020-03-05 11:35:09 +03:00
page MDEV-15528 Punch holes when pages are freed 2020-03-10 10:51:08 +05:30
pars Merge 10.4 into 10.5 2019-12-16 07:47:17 +02:00
que fix a memory leak introduced by f4b4284650 2019-12-12 21:29:51 +07:00
read MVCC::view_close(): Correct comments 2019-09-04 09:42:38 +03:00
rem MDEV-12353: Remove support for crash-upgrade 2020-02-13 19:13:45 +02:00
row MDEV-14425 Cleanup: Use std::atomic for some log_sys members 2020-03-05 16:21:31 +02:00
srv Cleanup: Remove recv_sys.remove_extra_log_files 2020-03-07 14:47:15 +02:00
sync MDEV-21544 instrument sync_array waits with tpool::wait_begin/end 2020-01-21 10:50:25 +01:00
trx MDEV-12353: Introduce an EXTENDED record subtype TRIM_PAGES 2020-03-03 13:25:45 +02:00
ut MDEV-14425 preparation: Provide ut_crc32_low() 2020-03-05 07:39:04 +02:00
.clang-format add .clang-format file for InnoDB 2019-10-29 21:56:24 +03:00
bzip2.cmake
CMakeLists.txt MDEV-21534 - Improve innodb redo log group commit performance 2020-03-01 19:02:21 +01:00
compile-innodb
COPYING.Google
COPYING.Percona
innodb.cmake Merge 10.4 into 10.5 2019-12-27 21:17:16 +02:00
lz4.cmake
lzma.cmake
lzo.cmake
plugin_exports
snappy.cmake