1. 16 Mar, 2022 1 commit
  2. 15 Mar, 2022 7 commits
    • Daniel Black's avatar
      MDEV-27955 main.func_json_notembedded test fails on out-of-memory · b2c81e06
      Daniel Black authored
      Uses 500M+ of memory by repeating an 8 byte sequence 62.5M times.
      
      Reduce the number of repeats on string reduced by 100 times.
      
      Tested by applying against the reverted MDEV-24909 code. 1000 times
      reduction was too much, but 100 still managed to trigger the bug.
      b2c81e06
    • Marko Mäkelä's avatar
      Merge 10.5 into 10.6 · 4ef44cc2
      Marko Mäkelä authored
      4ef44cc2
    • Marko Mäkelä's avatar
      MDEV-27985 buf_flush_freed_pages() causes InnoDB to hang · 73fee39e
      Marko Mäkelä authored
      buf_flush_freed_pages(): Assert that neither buf_pool.mutex
      nor buf_pool.flush_list_mutex are held. Simplify the loops.
      Return the tablespace and the number of pages written or punched.
      
      buf_flush_LRU_list_batch(), buf_do_flush_list_batch():
      Release buf_pool.mutex before invoking buf_flush_space().
      
      buf_flush_list_space(): Acquire the mutexes only after invoking
      buf_flush_freed_pages().
      
      Reviewed by: Thirunarayanan Balathandayuthapani
      73fee39e
    • Marko Mäkelä's avatar
      MDEV-25214 Crash in fil_space_t::try_to_close · 00896db1
      Marko Mäkelä authored
      fil_space_t::try_to_close(): Tolerate a tablespace that has no
      data files attached. The function fil_ibd_create() initially
      creates and attaches a tablespace with no files, and invokes
      fil_space_t::add() later.
      
      fil_node_open_file(): After releasing and reacquiring fil_system.mutex,
      check if the file was already opened by another thread. This avoids
      an assertion failure !node->is_open() in fil_node_open_file_low().
      
      These failures were reproduced with the test
      innodb.table_definition_cache_debug and the fix of MDEV-27985.
      00896db1
    • Marko Mäkelä's avatar
      Merge 10.4 into 10.5 · e1246775
      Marko Mäkelä authored
      e1246775
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4 · 9c6135e8
      Marko Mäkelä authored
      9c6135e8
    • Hugo Wen's avatar
      MDEV-27342: Fix issue of recovery failure using new server id · dafc5fb9
      Hugo Wen authored
      Commit 6c39eaeb made the crash recovery dependent on server_id.
      The crash recovery could fail when restoring a new instance from
      original crashed data directory USING A NEW SERVER ID.
      
      The issue doesn't exist in previous major versions before 10.6.
      
      Root cause is when generating the input XID to be searched in the hash,
      server id is populated with the current server id.
      So if the server id changed when recovering, the XID couldn't be found
      in the hash due to server id doesn't match.
      
      This fix is to use original server id when creating the input XID
      object in function `xarecover_do_commit_or_rollback`.
      
      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.
      dafc5fb9
  3. 14 Mar, 2022 7 commits
  4. 12 Mar, 2022 4 commits
  5. 11 Mar, 2022 16 commits
  6. 10 Mar, 2022 5 commits
    • Daniel Black's avatar
      MDEV-27956 hardware lock ellision on s390x/ppc64{,le} · fabaac86
      Daniel Black authored
      Per https://gcc.gnu.org/onlinedocs/gcc/PowerPC-Hardware-Transactional-Memory-Built-in-Functions.html
      
      The .. high level HTM interface .. is common between PowerPC and S/390
      
      Reimplemented the transactional_lock_enabled() detection mechanism for
      s390x and POWER based on SIGILL. This also gives non-Linux based unixes
      the ability to use HTM. The implementation is based off openssl.
      (ref:
      https://github.com/openssl/openssl/blob/1c0eede9827b0962f1d752fa4ab5d436fa039da4/crypto/s390xcap.c#L104)
      
      The other ppc64{,le} problems with getauxvec based detection:
      * Checking PPC_FEATURE2_HTM_NOSC not needed as we do not do syscalls while
        in a transactional state.
      * As we don't use, and never should use PPC_FEATURE2_HTM_NO_SUSPEND,
        or do syscalls while in transactional state, don't test it.
      From: https://www.kernel.org/doc/html/v5.4/powerpc/syscall64-abi.html#transactional-memory
      
      S390x high level __builtin_tbegin functions in the htmxlintrin.h are not
      inline. This header file can be included once in the entire set of sources for
      a linked target, otherwise duplicate symbols occur. While we could use inline
      xabort/xend functions using the low level interface, we keep this the same as
      ppc64 for simplicity.
      
      SLES-15, gcc-7, appeared to want everything that included the htmlxlintrin to
      be compiled with -mhtm otherwise the __builtin_t{func} where not defined
      (in addition to a #ifdef __HTM__ #error). Debian sid gcc-11.2 wanted the same
      on ppc64le/ppc64. In general we want to avoid a wide spread use of architecture
      cflags as it makes justifications for selective optimizations easier.
      (ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1006702)
      fabaac86
    • Marko Mäkelä's avatar
      MDEV-27058 fixup: Relax a debug assertion · 06ec439b
      Marko Mäkelä authored
      buf_page_get_low(): Assert that the block not be read-fixed.
      It may be write-fixed while we only hold a shared latch on the page.
      Page writes are protected by U latches, which are compatible with S.
      In all other places where we assert that the block not be IO-fixed,
      we are holding U or X latch, which does prevent concurrent file I/O.
      06ec439b
    • Marko Mäkelä's avatar
      77c184df
    • Vlad Lesin's avatar
      MDEV-19577 Replication does not work with innodb_autoinc_lock_mode=2 · 1766a18e
      Vlad Lesin authored
      The first step for deprecating innodb_autoinc_lock_mode(see MDEV-27844) is:
      - to switch statement binlog format to ROW if binlog format is MIXED and
      the statement changes autoincremented fields
      - issue warnings if innodb_autoinc_lock_mode == 2 and binlog format is
      STATEMENT
      1766a18e
    • Andrei's avatar
      MDEV-24617 OPTIMIZE on a sequence causes unexpected ER_BINLOG_UNSAFE_STATEMENT · e7cf871d
      Andrei authored
      The warning out of OPTIMIZE
        Statement is unsafe because it uses a system function
      was indeed counterfactual and was resulted by checking an
      insufficiently strict property of lex' sql_command_flags.
      
      Fixed with deploying an additional checking of weather
      the current sql command that modifes a share->non_determinstic_insert
      table is capable of generating ROW format events.
      The extra check rules out the unsafety to OPTIMIZE et al, while the
      existing check continues to do so to CREATE TABLE (which is
      perculiarly tagged as ROW-event generative sql command).
      
      As a side effect sql_sequence.binlog test gets corrected and
      binlog_stm_unsafe_warning.test is reinforced to add up
      an unsafe CREATE..SELECT test.
      e7cf871d