1. 09 Sep, 2020 10 commits
  2. 07 Sep, 2020 4 commits
    • Marko Mäkelä's avatar
      MDEV-22924 Corruption in MVCC read via secondary index · f99cace7
      Marko Mäkelä authored
      An unsafe optimization was introduced by
      commit 2347ffd8 (MDEV-20301)
      which is based on
      mysql/mysql-server@3f3136188f1bd383f77f97823cf6ebd72d5e4d7e or
      mysql/mysql-server@647a3814a91c3d3bffc70ddff5513398e3f37bd4
      in MySQL 8.0.12 or MySQL 8.0.13
      (which in turn is based on the contribution in MySQL Bug #84958).
      
      Row_sel_get_clust_rec_for_mysql::operator(): In addition to checking
      that the pointer to the record matches, also check the latest
      modification of the page (FIL_PAGE_LSN) as well as the page identifier.
      Only if all three match, it is safe to reuse cached_old_vers.
      
      Row_sel_get_clust_rec_for_mysql::check_eq(): Assert that the PRIMARY KEY
      of the cached old version of the record corresponds to the latest version.
      
      We got a test case where CHECK TABLE, UPDATE and purge would be
      hammering on the same table (with only 6 rows) and a pointer that
      was originally pointing to a record pk=2 would match a cached_clust_rec
      that was pointing to a record pk=1. In the diagnosed `rr replay` trace,
      we would wrongly return an old cached version of the pk=1 record,
      instead of retrieving the correct version of the pk=2 record. Because
      of this, CHECK TABLE would fail to count one of the records in a
      secondary index, and report failure.
      
      This bug appears to affect MVCC reads via secondary indexes only.
      The purge of history in secondary indexes uses a different code path,
      and so do checks for implicit record locks.
      f99cace7
    • Kentoku SHIBA's avatar
      MDEV-7098 spider/bg.spider_fixes failed in buildbot with safe_mutex: Trying to... · 9dedba16
      Kentoku SHIBA authored
      MDEV-7098 spider/bg.spider_fixes failed in buildbot with safe_mutex: Trying to unlock mutex conn->mta_conn_mutex that wasn't locked at storage/spider/spd_db_conn.cc, line 671
      9dedba16
    • Kentoku SHIBA's avatar
      MDEV-7098 spider/bg.spider_fixes failed in buildbot with safe_mutex: Trying to... · e976f461
      Kentoku SHIBA authored
      MDEV-7098 spider/bg.spider_fixes failed in buildbot with safe_mutex: Trying to unlock mutex conn->mta_conn_mutex that wasn't locked at storage/spider/spd_db_conn.cc, line 671
      e976f461
    • Kentoku SHIBA's avatar
      MDEV-7098 spider/bg.spider_fixes failed in buildbot with safe_mutex: Trying to... · 9b688471
      Kentoku SHIBA authored
      MDEV-7098 spider/bg.spider_fixes failed in buildbot with safe_mutex: Trying to unlock mutex conn->mta_conn_mutex that wasn't locked at storage/spider/spd_db_conn.cc, line 671
      9b688471
  3. 04 Sep, 2020 7 commits
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4 · 7f8cd326
      Marko Mäkelä authored
      7f8cd326
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · c5cb59ce
      Marko Mäkelä authored
      c5cb59ce
    • Marko Mäkelä's avatar
      MDEV-23651: Fix the Windows build · 1a3ce7e7
      Marko Mäkelä authored
      In the Microsoft environment, my_atomic requires int32.
      1a3ce7e7
    • Marko Mäkelä's avatar
      MDEV-23600 follow-up: uninitialized rec_field_is_prefix · c029d456
      Marko Mäkelä authored
      build_template_field(): Initialize templ->rec_field_is_prefix
      also for indexes on virtual columns. This was caught on 10.5 by
      MemorySanitizer as use-of-uninitialized-value in
      row_search_with_covering_prefix() when running the test
      main.fast_prefix_index_fetch_innodb.
      c029d456
    • Sergei Petrunia's avatar
      Fix a typo in the previous cset · 8c2909a2
      Sergei Petrunia authored
      8c2909a2
    • Marko Mäkelä's avatar
      MDEV-23633 fixup: Add missing semicolon · b0c194ca
      Marko Mäkelä authored
      b0c194ca
    • Marko Mäkelä's avatar
      MDEV-23633 MY_RELAX_CPU performs unnecessary compare-and-swap on ARM · 24f510bb
      Marko Mäkelä authored
      This follows up MDEV-14374, which was filed against MariaDB Server 10.3.
      Back then, on a 48-core Qualcomm Centriq 2400, the performance of
      delay loops for spinloops was tested both with and without the dummy
      compare-and-swap operation, and it was decided to keep the dummy
      operation.
      
      On target architectures where nothing special is available (other than
      x86 (IA-32, AMD64) or POWER), we perform a dummy compare-and-swap operation.
      This is contrary to the idea of the x86 PAUSE instruction and the
      __ppc_get_timebase(), which aim to keep the memory bus idle for a while,
      to allow other cores to better execute code while a spinloop is waiting
      for something to be changed.
      
      On MariaDB Server 10.4 and another implementation of the ARMv8 ISA,
      omitting the dummy compare-and-swap improved performance by up to 12%.
      So, let us avoid the dummy compare-and-swap on ARM.
      
      For now, we are retaining the dummy compare-and-swap on other ISAs
      (such as SPARC, MIPS, S390x, RISC-V) because we do not have any
      performance data for them.
      24f510bb
  4. 03 Sep, 2020 10 commits
    • Sergei Petrunia's avatar
      MDEV-23661: RocksDB produces "missing initializer for member" warnings · d63fcbc2
      Sergei Petrunia authored
      Add -Wno-missing-field-initializers for MyRocks and gcc version below 5.0
      d63fcbc2
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4 · 1cda462f
      Marko Mäkelä authored
      1cda462f
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4 · c9cf6b13
      Marko Mäkelä authored
      c9cf6b13
    • Sergei Petrunia's avatar
      Make rowid_filter_innodb test stable · b795adcf
      Sergei Petrunia authored
      It was failing on mac-1012-bintar.
      b795adcf
    • Marko Mäkelä's avatar
      MDEV-23651 InnoDB: Failing assertion: !space->referenced() · a7dd7c89
      Marko Mäkelä authored
      commit de942c9f (MDEV-15983)
      introduced a race condition that we inadequately fixed in
      commit 93b69825 (MDEV-16169).
      
      Because fil_space_t::release() or fil_space_t::acquire() are
      not protected by fil_system.mutex like their predecessors,
      it is possible that stop_new_ops was set between the time
      a thread checked fil_space_t::is_stopping() and invoked
      fil_space_t::acquire().
      
      In an execution trace, this happened in fil_system_t::keyrotate_next(),
      causing an assertion failure in fil_delete_tablespace()
      in the other thread that seeked to stop new operations.
      
      We fix this bug by merging the flag fil_space_t::stop_new_ops
      and the reference count fil_space_t::n_pending_ops into a
      single word that is only being accessed by atomic memory operations.
      
      fil_space_t::set_stopping(): Accessor for changing the state of
      the former stop_new_ops flag.
      
      fil_space_t::acquire(): Return whether the acquisition succeeded.
      It would fail between set_stopping(true) and set_stopping(false).
      a7dd7c89
    • Jan Lindström's avatar
      MDEV-21578 : CREATE OR REPLACE TRIGGER in Galera cluster not replicating · 33ae1616
      Jan Lindström authored
      In 10.3 OR REPLACE trigger option is part of create_info.
      33ae1616
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · c3752cef
      Marko Mäkelä authored
      c3752cef
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · 2a93e632
      Marko Mäkelä authored
      2a93e632
    • Marko Mäkelä's avatar
      MDEV-22387: Do not pass null pointer to some memcpy() · 94a520dd
      Marko Mäkelä authored
      Passing a null pointer to a nonnull argument is not only undefined
      behaviour, but it also grants the compiler the permission to optimize
      away further checks whether the pointer is null. GCC -O2 at least
      starting with version 8 may do that, potentially causing SIGSEGV.
      
      These problems were caught in a WITH_UBSAN=ON build with the
      Bug#7024 test in main.view.
      94a520dd
    • Marko Mäkelä's avatar
      MDEV-7110 follow-up fix: Do not pass NULL as nonnull parameter · a256070e
      Marko Mäkelä authored
      Passing a null pointer to the "%s" argument of a printf-like
      function is undefined behaviour. In the GNU libc implementation
      of the printf() family of functions, it happens to work.
      
      GCC 10.2.0 would diagnose this with -Wformat-overflow -Og.
      In -fsanitize=undefined (WITH_UBSAN=ON) builds, a runtime error
      would be generated. In some other builds, GCC 8 or later might infer
      that the parameter is nonnull and optimize away further checks whether
      the parameter is null, leading to SIGSEGV.
      a256070e
  5. 02 Sep, 2020 5 commits
  6. 01 Sep, 2020 4 commits