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

Use atomic operations whenever available

Details

    • 10.1.23

    Description

      InnoDB up to MariaDB 10.1 defines the compile-time constant UNIV_WORD_SIZE incorrectly on 64-bit Windows systems as 4:

      #ifdef _WIN32
      #define UNIV_WORD_SIZE          4
      #elif defined(_WIN64)
      #define UNIV_WORD_SIZE          8
      #else
      /** MySQL config.h generated by GNU autoconf will define SIZEOF_LONG in Posix */
      #define UNIV_WORD_SIZE          SIZEOF_LONG
      #endif
      

      This error has been corrected in MariaDB Server 10.2. The problem is that _WIN32 is defined also on 64-bit Windows, causing UNIV_WORD_SIZE to be defined as the incorrect value 4 instead of 8.

      Furthermore, the logic around updating some file counters is refusing to use atomic operations on 32-bit systems, and the variables os_n_pending_reads, os_n_pending_writes are redundant.

      Attachments

        Issue Links

          Activity

            marko Marko Mäkelä added a comment - - edited

            bb-10.0-marko, merged to bb-10.1-marko together with an experimental MDEV-12488 fix

            marko Marko Mäkelä added a comment - - edited bb-10.0-marko , merged to bb-10.1-marko together with an experimental MDEV-12488 fix

            Also merged to bb-10.2-marko along with MDEV-12488.
            The 10.2 patch is a bit different, because some of the code has already been simplified, and os0file.cc was completely rewritten.

            marko Marko Mäkelä added a comment - Also merged to bb-10.2-marko along with MDEV-12488 . The 10.2 patch is a bit different, because some of the code has already been simplified, and os0file.cc was completely rewritten.

            I rebased the merge from bb-10.0-marko to bb-10.1-marko and made this a separate commit to bb-10.2-marko.
            All were tested with a revised MDEV-12488 fix.

            marko Marko Mäkelä added a comment - I rebased the merge from bb-10.0-marko to bb-10.1-marko and made this a separate commit to bb-10.2-marko . All were tested with a revised MDEV-12488 fix.

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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