[MDEV-31879] Force IO_CACHE work with files larger than 2-4GiB on 32-bit platforms Created: 2023-08-08  Updated: 2023-08-08

Status: Open
Project: MariaDB Server
Component/s: None
Fix Version/s: None

Type: Task Priority: Minor
Reporter: Nikita Malyavin Assignee: Nikita Malyavin
Resolution: Unresolved Votes: 0
Labels: None


 Description   

The support depends on the SIZEOF_OFF_T value, which in turn depends on _FILE_OFFSET_BITS macro.
Most platforms already define the latter as 64 unconditionally:

GNU.cmake:
SET(_FILE_OFFSET_BITS 64)
HP-UX.cmake:
SET(_FILE_OFFSET_BITS 64)
Linux.cmake:
SET(_FILE_OFFSET_BITS 64)
SunOS.cmake:
SET(_FILE_OFFSET_BITS 64)

Windows doesn't but SIZEOF_OFF_T is forced there in my_global.h:

#if defined (_WIN32)
/*
 off_t is 32 bit long. We do not use C runtime functions
 with off_t but native Win32 file IO APIs, that work with
 64 bit offsets.
*/
#undef SIZEOF_OFF_T
#define SIZEOF_OFF_T 8

Same for _APPLE_

For the rest of the platforms the support is unclear.
The purpose of this task is to clarify the support and unify SIZEOF_OFF_T handling.
This will affect IO_CACHE ability to handle large files, and as a consequence, a transaction of a large (>2-4Gib) size when binlog/replication is enabled.


Generated at Thu Feb 08 10:27:09 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.