Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-31879

Force IO_CACHE work with files larger than 2-4GiB on 32-bit platforms

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • 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.

      Attachments

        Activity

          People

            nikitamalyavin Nikita Malyavin
            nikitamalyavin Nikita Malyavin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.