1. 25 Jul, 2022 1 commit
  2. 21 Jul, 2022 1 commit
  3. 20 Jul, 2022 1 commit
  4. 19 Jul, 2022 1 commit
    • Anson Chung's avatar
      Fix Ninja builds on Gitlab-CI by limiting parallelism · 3a9cb4c1
      Anson Chung authored
      In previous versions it was stated that MDEV-25968 was causing other
      jobs in the pipeline to fail if not run with "-j 2" but this bug was not
      affecting fedora-ninja. This is still true for the public gitlab runners.
      However, running the fedora-ninja job on custom runners with more processors
      without the "-j 2" flag will cause the compiler to crash.
      
      When running the build with 2,4,8,16,32 threads, build times were
      consistent indicating that the typical bottleneck is I/O and not CPU
      cores. Therefore, "-j 2" is not a big drawback and it was chosen in
      order to remain consistent with the other builds affected by MDEV-25968.
      
      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.
      3a9cb4c1
  5. 18 Jul, 2022 1 commit
  6. 04 Jul, 2022 8 commits
    • Marko Mäkelä's avatar
      MDEV-26294 Duplicate entries in unique index not detected when changing collation · f8240a27
      Marko Mäkelä authored
      Problem:
      =======
      ALTER TABLE in InnoDB fails to detect duplicate entries
      for the unique index when the character set or collation of
      an indexed column is changed in such a way that the character
      encoding is compatible with the old table definition.
      In this case, any secondary indexes on the changed columns
      would be rebuilt (DROP INDEX, ADD INDEX).
      
      Solution:
      ========
      During ALTER TABLE, InnoDB keeps track of columns whose collation
      changed, and will fill in the correct metadata when sorting the
      index records, or applying changes from concurrent DML.
      This metadata will be allocated in the dict_index_t::heap of
      the being-created secondary indexes.
      
      The fix was developed by Thirunarayanan Balathandayuthapani
      and simplified by me.
      f8240a27
    • Marko Mäkelä's avatar
      Merge 10.5 into 10.6 · f43145a0
      Marko Mäkelä authored
      f43145a0
    • Vladislav Vaintroub's avatar
      MDEV-28648 main.ssl_timeout fails with OpenSSL 3.0.3 · 9d5718c9
      Vladislav Vaintroub authored
      Depending on OpenSSL version, and at least in 3.0.3, the client-side socket
      timeout is reported as generic error (SSL_ERROR_SYSCALL), losing further
      details (both errno and GetLastError() return 0). This results in client
      reporting "Unknown OpenSSL error" 2026, instead of another generic
      "Lost connection to server during query" 2013
      
      Adjusted test case.
      
      Part of MDEV-29000
      9d5718c9
    • Honza Horak's avatar
      MDEV-27778 md5 in FIPS crashes with OpenSSL 3.0.0 · ef655669
      Honza Horak authored
      OpenSSL 3.0.0+ does not support EVP_MD_CTX_FLAG_NON_FIPS_ALLOW any longer.
      In OpenSSL 1.1.1 the non FIPS allowed flag is context specific, while
      in 3.0.0+ it is a different EVP_MD provider.
      
      Fixes #2010
      
      part of MDEV-29000
      ef655669
    • Oleksandr Byelkin's avatar
      Revert "don't build with OpenSSL 3.0, it doesn't work before MDEV-25785" · 1dc09ce0
      Oleksandr Byelkin authored
      This reverts commit c9beef43, because
      we have OpenSSL 3.0 support here.
      
      part of MDEV-29000
      1dc09ce0
    • Vladislav Vaintroub's avatar
      MDEV-25785 Add support for OpenSSL 3.0 · 8a9c1e9c
      Vladislav Vaintroub authored
      Summary of changes
      
      - MD_CTX_SIZE is increased
      
      - EVP_CIPHER_CTX_buf_noconst(ctx) does not work anymore, points
        to nobody knows where. The assumption made previously was that
        (since the function does not seem to be documented)
        was that it points to the last partial source block.
        Add own partial block buffer for NOPAD encryption instead
      
      - SECLEVEL in CipherString in openssl.cnf
        had been downgraded to 0, from 1, to make TLSv1.0 and TLSv1.1 possible
         (according to https://github.com/openssl/openssl/blob/openssl-3.0.0/NEWS.md
         even though the manual for SSL_CTX_get_security_level claims that it
         should not be necessary)
      
      - Workaround Ssl_cipher_list issue, it now returns TLSv1.3 ciphers,
        in addition to what was set in --ssl-cipher
      
      - ctx_buf buffer now must be aligned to 16 bytes with openssl(
        previously with WolfSSL only), ot crashes will happen
      
      - updated aes-t , to be better debuggable
        using function, rather than a huge multiline macro
        added test that does "nopad" encryption piece-wise, to test
        replacement of EVP_CIPHER_CTX_buf_noconst
      
      part of MDEV-29000
      8a9c1e9c
    • Marko Mäkelä's avatar
      Merge 10.4 into 10.5 · 33f0270e
      Marko Mäkelä authored
      33f0270e
    • Marko Mäkelä's avatar
      MDEV-26294 Duplicate entries in unique index not detected when changing collation · 9a0cbd31
      Marko Mäkelä authored
      ha_innobase::check_if_supported_inplace_alter(): Refuse to change the
      collation of a column that would become or remain indexed as part of
      the ALTER TABLE operation.
      
      In MariaDB Server 10.6, we will allow this type of operation;
      that fix depends on MDEV-15250.
      9a0cbd31
  7. 03 Jul, 2022 1 commit
  8. 01 Jul, 2022 10 commits
  9. 30 Jun, 2022 6 commits
  10. 29 Jun, 2022 2 commits
  11. 28 Jun, 2022 5 commits
    • Aleksey Midenkov's avatar
      MDEV-28567 MDL debug logging · d89cac08
      Aleksey Midenkov authored
      Log MDL state transitions. Trace-friendly message
      format. DBUG_LOCK_FILE replaced by thread-local storage.
      
      Logged states legend:
        Seized   lock was acquired without waiting
        Waiting  lock is waiting
        Acquired lock was acquired after waiting
        Released lock was released
        Deadlock lock was aborted due to deadlock
        Timeout  lock was aborted due to timeout >0
        Nowait   lock was aborted due to zero timeout
        Killed   lock was aborted due to kill message
        OOM	   can not acquire because out of memory
      
      Usage:
        mtr --mysqld=--debug=d,mdl,query:i:o,/tmp/mdl.log
      
      Cleanup from garbage messages:
        sed -i -re \
        '/(mysql|performance_schema|sys|mtr)\// d; /MDL_BACKUP_/ d' \
        /tmp/mdl.log
      d89cac08
    • Marko Mäkelä's avatar
      Fix a sporadic failure of main.backup_locks · 2fa3ada0
      Marko Mäkelä authored
      Ever since commit 9608773f
      the InnoDB persistent statistics are enabled on all InnoDB tables
      by default. We must filter out any output that indicates that the
      statistics tables are being internally accessed by InnoDB.
      2fa3ada0
    • Monty's avatar
      MDEV-28897 Wrong table.get_ref_count() upon concurrent truncate and backup stage operation · 5e40934d
      Monty authored
      The issue was that flush_tables() didn't take a MDL lock on cached
      TABLE_SHARE before calling open_table() to do a HA_EXTRA_FLUSH call.
      Most engines seams to have no issue with it, but apparantly this conflicts
      with InnoDB in 10.6 when using TRUNCATE
      
      Fixed by taking a MDL lock before trying to open the table in
      flush_tables().
      
      There is no test case as it hard to repeat the scheduling that causes
      the error. I did run the test case in MDEV-28897 to verify
      that the bug is fixed.
      5e40934d
    • Alexander Barkov's avatar
      A cleanup for MDEV-25243 ASAN heap-use-after-free in... · efdbb3cf
      Alexander Barkov authored
      A cleanup for MDEV-25243 ASAN heap-use-after-free in Item_func_sp::execute_impl upon concurrent view DDL and I_S query with view and function
      
      The test was reported to fail sporadicaly with this diff:
      
      --- mysql-test/main/information_schema_tables.result
      +++ mysql-test/main/information_schema_tables.reject
      @@ -21,6 +21,8 @@
       disconnect con1;
       connection default;
       DROP VIEW IF EXISTS vv;
      +Warnings:
      +Note	4092	Unknown VIEW: 'test.vv'
      
      in the "The originally reported non-deterministic test" part.
      Disabling warnings around the DROP VIEW statement.
      efdbb3cf
    • Marko Mäkelä's avatar
      MDEV-18976 fixup: encryption.innodb-redo-nokeys · 02a313dc
      Marko Mäkelä authored
      This test failure is similar to encryption.innodb-redo-badkey,
      which was fixed in commit 0f0a45b2.
      02a313dc
  12. 27 Jun, 2022 3 commits
    • Nayuta Yanagisawa's avatar
      MDEV-24343 Spider Left join failed Unknown column 't0.ID' in 'on clause' · dbd56278
      Nayuta Yanagisawa authored
      The Spider mixes the comma join with other join types, and thus
      ERROR 1054 occurs. This is well-known issue caused by the higher
      precedence of JOIN over the comma (,).
      
      We can fix the problem simply by using JOINs instead of commas.
      dbd56278
    • Nayuta Yanagisawa's avatar
      MDEV-21310 AUTO_INCREMENT column throws range error on INSERT in partitioned... · 5375f0b4
      Nayuta Yanagisawa authored
      MDEV-21310 AUTO_INCREMENT column throws range error on INSERT in partitioned table | Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' failed.
      
      The bug is caused by a similar mechanism as MDEV-21027.
      
      The function, check_insert_or_replace_autoincrement, failed to open
      all the partitions on INSERT SELECT statements and it results in the
      assertion error.
      5375f0b4
    • Nayuta Yanagisawa's avatar
      MDEV-28352 Spider: heap-use-after-free in ha_spider::lock_tables(), heap freed by spider_commit() · a26700cc
      Nayuta Yanagisawa authored
      The heap-use-after-free is caused by the following mechanism:
      
        * In the execution of FLUSH TABLE WITH READ LOCK, the function
          spider_free_trx_conn() is called and the connections held by
          SPIDER_TRX::trx_conn_hash are freed.
      
        * Then, an instance of ha_spider maintains the freed connections
          because they are also referenced from ha_spider::conns.
          The ha_spider instance is kept in a lock structure until the
          corresponding table is unlocked.
      
        * Spider accesses ha_spider::conns on the implicit UNLOCK TABLE
          issued by BEGIN.
      
      In the first place, when the connections have been freed, it means
      that there are really no remote table locked by Spider.
      Thus, there is no need for Spider to access ha_spider::cons on the
      implicit UNLOCK TABLE.
      
      We can fix the bug by removing the above mentioned access to
      ha_spider::conns. We also modified spider_free_trx_conn() so that it
      frees the connections only when no table is locked to reduce the
      chance of another heap-use-after-free on ha_spider::conns.
      a26700cc