1. 20 Aug, 2024 1 commit
  2. 15 Aug, 2024 1 commit
  3. 14 Aug, 2024 2 commits
  4. 12 Aug, 2024 2 commits
    • Vladislav Vaintroub's avatar
      MDEV-34741 - remove LOCK TABLE from mariadb-import · ff865b08
      Vladislav Vaintroub authored
      It currently serves no real purpose, but is suspected to cause occasional
      error when foreign keys are used.
      "Error: 1100, Table 'child' was not locked with LOCK TABLES, when using table: parent"
      as seen on CI
      ff865b08
    • Sergei Golubchik's avatar
      Two problems with auth_parsec.so · 05fe3f1c
      Sergei Golubchik authored
      1. it links with ${SSL_LIBRARIES}, in WolfSSL builds it's a static
         library, so when a plugin is loaded there will be two copies of
         wolfssl in the same address space. It breaks odr (at least).
      2. Plugin can linked with OpenSSL and the server with WolfSSL or
         vice versa. It might load, but then we'll have both WolfSSL and
         OpenSSL at the same time. Kind of risky.
      
      Fix: link the plugin statically into the server if it's a WolfSSL build
      
      adjust tests to work with static and dynamic parsec
      05fe3f1c
  5. 10 Aug, 2024 3 commits
  6. 09 Aug, 2024 7 commits
  7. 08 Aug, 2024 2 commits
  8. 07 Aug, 2024 2 commits
  9. 06 Aug, 2024 1 commit
  10. 05 Aug, 2024 5 commits
    • Oleksandr Byelkin's avatar
      Merge branch '11.4' into 11.5 · ea75a0b6
      Oleksandr Byelkin authored
      ea75a0b6
    • Vladislav Vaintroub's avatar
      Merge 11.5 into 11.6 · 523ef2a1
      Vladislav Vaintroub authored
      523ef2a1
    • Vladislav Vaintroub's avatar
      c175f498
    • Hugo Wen's avatar
      Extend Unix socket authentication to support authentication_string · 9e1923ca
      Hugo Wen authored
      Before this change the unix socket auth plugin returned true only when
      the OS socket user id matches the MariaDB user name.
      The authentication string was ignored.
      
      Now if an authentication string is defined with in `unix_socket`
      authentication rule, then the authentication string will be used to
      compare with the socket's user name, and the plugin will return a
      positive if matching.
      
      Make the plugin to fill in the @@external_user variable.
      
      This change is similar to MySQL commit of
      https://github.com/mysql/mysql-server/commit/6ddbc58e.
      However there's one difference with above commit:
      
      - For MySQL, both Unix user matches DB user name and Unix user matches the
        authentication string will be allowed to connect.
      - For MariaDB, we only allows the Unix user matches the authentication
        string to connect, if the authentication string is defined.
        This is because allowing both Unix user names has risks and couldn't
        handle the case that a customer only wants to allow one single Unix user
        to connect which doesn't matches the DB user name.
      
      If DB user is created with multiple unix_socket options for example:
      `create user A identified via unix_socket as 'B' or unix_socket as 'C';`
      Then both Unix user of B and C are accepted.
      
      Existing MTR test of `plugins.unix_socket` is not impacted.
      Also add a new MTR test to verify authentication with authentication
      string. See the MTR test cases for supported/unsupported cases.
      
      All new code of the whole pull request, including one or several files
      that are either new files or modified ones, are contributed under the
      BSD-new license. I am contributing on behalf of my employer Amazon Web
      Services, Inc.
      9e1923ca
    • Sergei Golubchik's avatar
      fix plugins.rpl_auth failure in bintars · 5ab81ffe
      Sergei Golubchik authored
      in bintars the server is linked with wolfssl, while the connector
      is linked with gnutls. Thus client_ed25519.so gets gnutls
      dependency, unresolved symbols and it cannot be loaded into the
      server and gnutls symbols aren't present there.
      
      linking the plugin statically with gnutls fixes that and the test passes.
      but when such a plugin is loaded into the client, the client gets
      two copies of gnutls - they conflict and ssl doesn't work at all.
      
      let's detect this and disable the test for now.
      5ab81ffe
  11. 04 Aug, 2024 4 commits
  12. 03 Aug, 2024 5 commits
  13. 02 Aug, 2024 1 commit
  14. 31 Jul, 2024 2 commits
    • Brandon Nesterenko's avatar
      MDEV-15393: Fix rpl_mysqldump_gtid_slave_pos · 001608de
      Brandon Nesterenko authored
      The slave would try to sync_with_master_gtid.inc,
      but the master never actually saved its gtid position
      so the test would move on too quickly.
      001608de
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-34670 IMPORT TABLESPACE unnecessary traverses tablespace list · 533e6d5d
      Thirunarayanan Balathandayuthapani authored
      Problem:
      ========
      - After the commit ada1074b (MDEV-14398)
      fil_crypt_set_encrypt_tables() iterates through all tablespaces to
      fill the default_encrypt tables list. This was a trigger to
      encrypt or decrypt when key rotation age is set to 0. But import
      tablespace does call fil_crypt_set_encrypt_tables() unnecessarily.
      The motivation for the call is to signal the encryption threads.
      
      Fix:
      ====
      ha_innobase::discard_or_import_tablespace: Remove the
      fil_crypt_set_encrypt_tables() and add the import tablespace
      to the default encrypt list if necessary
      533e6d5d
  15. 30 Jul, 2024 2 commits
    • Andrew Hutchings's avatar
      MDEV-34605 Fix tmp_table_count-7586 · 06a7352d
      Andrew Hutchings authored
      This test ran `show status like '%Created_tmp%'`. This captures
      `Created_tmp_files` as well as the intended `Created_tmp_tables`.
      In 11.5, the former got moved to `FLUSH GLOBAL`, so when testing, the
      result can now be random.
      
      This fix makes the test just use `Created_tmp_tables`.
      06a7352d
    • Hugo Wen's avatar
      MDEV-34625 Fix undefined behavior of using uninitialized member variables · 811614d4
      Hugo Wen authored
      Commit a8a75ba2 causes the MariaDB server to crash, usually with signal
      11, at random code locations due to invalid pointer values during any
      table operation. This issue occurs when the server is built with -O3 and
      other customized compiler flags.
      
      For example, the command `use db1;` causes server to crash in the
      `check_table_access` function at line sql_parse.cc:7080 because
      `tables->correspondent_table` is an invalid pointer value of 0x1.
      
      The crashes are due to undefined behavior from using uninitialized
      variables. The problematic commit a8a75ba2 introduces code that
      allocates memory and sets it to 0 using thd->calloc before initializing
      it with a placement new operation.
      This process depends on setting memory to 0 to initialize member
      variables not explicitly set in the constructor. However, the compiler
      can optimize out the memset/bfill, leading to uninitialized values and
      unpredictable issues.
      
      Once a constructor function initializes an object, any uninitialized
      variables within that object are subject to undefined behavior. The
      state of memory before the constructor runs, whether it involves
      memset or was used for other purposes, is irrelevant after the
      placement new operation.
      
      This behavior can be demonstrated with this
      [test](https://gcc.godbolt.org/z/5n87z1raG) I wrote to examine the
      assembly code. The code in MariaDB can be abstracted to the following,
      though it has many layers wrapped around it and more complex logic,
      causing slight differences in optimization in the MariaDB build.
      To summarize, on x86, the memset in the following code is optimized out
      with both -O2 and -O3 in GCC 13, and is only preserved in the much older
      GCC 4.9.
      
          struct S {
            int i;     // uninitialized in consturctor
            S() {};
          };
          int bar() {
            void *buf = malloc(sizeof(S));
            memset(buf, 0, sizeof(S));       // optimized out
            S* s = new(buf) S;
            return s->i;
          }
      
      With GCC13 -O3:
      
          bar():
                sub     rsp, 8
                mov     edi, 4
                call    malloc
                mov     eax, DWORD PTR [rax]
                add     rsp, 8
                ret
      
      With GCC4.9 -O3
      
          bar():
                sub     rsp, 8
                mov     edi, 4
                call    malloc
                mov     DWORD PTR [rax], 0
                xor     eax, eax
                add     rsp, 8
                ret
      
      Now we ensure the constructor initializes variables correctly by running
      the reset() function in the constructor to perform the memset/bfill(0)
      operation. After applying the fix, the crash is gone.
      
      All new code of the whole pull request, including one or several files
      that are either new files or modified ones, are contributed under the
      BSD-new license. I am contributing on behalf of my employer Amazon Web
      Services.
      811614d4