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

Use atomic operations whenever available

    XMLWordPrintable

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

            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.