mariadb/storage/innobase
Marko Mäkelä 126725421e MDEV-25121: innodb_flush_method=O_DIRECT fails on compressed tables
Tests with 4096-byte sector size confirm that it is
safe to use O_DIRECT with page_compressed tables.
That had been disabled on Linux, in an attempt to fix MDEV-21584
which had been filed for the O_DIRECT problems earlier.

The fil_node_t::block_size was being set mostly correctly until
commit 10dd290b4b (MDEV-17380)
introduced a regression in MariaDB Server 10.4.4.

fil_node_open_file(): Only avoid setting O_DIRECT on
ROW_FORMAT=COMPRESSED tables that use KEY_BLOCK_SIZE=1 or 2
(1024 or 2048 bytes).

fil_ibd_create(): Avoid setting O_DIRECT on ROW_FORMAT=COMPRESSED tables
that use KEY_BLOCK_SIZE=1 or 2 (1024 or 2048 bytes).

fil_node_t::find_metadata(): Require fstat() to be always invoked
outside Microsoft Windows, so that fil_node_t::block_size can be set.

fil_node_t::read_page0(): Rely on find_metadata() to assign block_size.

Thanks to Vladislav Vaintroub for testing this on Microsoft Windows
using an old-fashioned rotational hard disk with 4KiB sector size.

Reviewed by: Vladislav Vaintroub

This is a port of commit 00f620b27e
and commit 6505662c23 from 10.2.
2021-03-18 14:43:08 +02:00
..
btr MDEV-25107 Check TABLE miscalutates the length of column 2021-03-11 20:52:54 +05:30
buf MDEV-24792 Assertion `!newest_lsn || fil_page_get_type(page)' failed upon MariaBackup prepare in buf_flush_init_for_writing with innodb_log_optimize_ddl=off 2021-02-14 10:11:03 +03:00
data MDEV-25057 Assertion `n_fields < dtuple_get_n_fields(entry)' 2021-03-09 19:37:27 +05:30
dict Merge branch '10.3' into 10.4 2020-12-25 09:13:28 +01:00
eval Merge 10.2 into 10.3 2019-12-12 14:41:51 +02:00
fil MDEV-25121: innodb_flush_method=O_DIRECT fails on compressed tables 2021-03-18 14:43:08 +02:00
fsp Merge 10.3 into 10.4 2020-09-09 15:00:21 +03:00
fts Merge 10.3 into 10.4 2021-03-11 19:33:45 +02:00
fut
gis Merge 10.3 into 10.4 2020-10-29 13:38:38 +02:00
ha
handler Merge 10.3 into 10.4 2021-03-11 19:33:45 +02:00
ibuf Merge 10.3 into 10.4 2020-11-12 11:18:04 +02:00
include MDEV-25121: innodb_flush_method=O_DIRECT fails on compressed tables 2021-03-18 14:43:08 +02:00
lock Merge 10.3 into 10.4 2021-03-05 10:36:51 +02:00
log Merge 10.3 into 10.4 2021-02-23 14:11:08 +02:00
mach
mem Merge 10.2 into 10.3 2020-07-02 06:17:51 +03:00
mtr Merge 10.3 into 10.4 2020-12-01 19:51:14 +02:00
mysql-test/storage_engine
os MDEV-25121: innodb_flush_method=O_DIRECT fails on compressed tables 2021-03-18 14:43:08 +02:00
page Merge 10.2 into 10.3 2020-10-28 10:01:50 +02:00
pars Merge 10.3 into 10.4 2019-12-13 17:30:37 +02:00
que Merge 10.3 into 10.4 2021-01-11 10:35:06 +02:00
read MVCC::view_close(): Correct comments 2019-09-04 09:42:38 +03:00
rem Merge 10.3 into 10.4 2021-03-18 14:17:58 +02:00
row Merge 10.3 into 10.4 2021-03-18 14:17:58 +02:00
srv Merge branch 'bb-10.3-release' into bb-10.4-release 2021-02-12 17:44:22 +01:00
sync MDEV-24188: Merge 10.3 into 10.4 2020-11-13 20:45:28 +02:00
trx Merge 10.3 into 10.4 2021-03-05 10:36:51 +02:00
ut Merge branch '10.3' into 10.4 2020-12-25 09:13:28 +01:00
.clang-format add .clang-format file for InnoDB 2019-10-29 21:56:24 +03:00
bzip2.cmake
CMakeLists.txt Merge 10.3 into 10.4 2020-10-29 13:38:38 +02:00
compile-innodb
COPYING.Google
COPYING.Percona
innodb.cmake Merge 10.3 into 10.4 2019-12-27 18:20:28 +02:00
lz4.cmake
lzma.cmake
lzo.cmake
plugin_exports
snappy.cmake