1. 12 Apr, 2020 1 commit
  2. 10 Apr, 2020 1 commit
    • Sergey Vojtovich's avatar
      MDEV-21599 - plugins.server_audit fails sporadically in buildbot · 06219c2a
      Sergey Vojtovich authored
      Fixed a couple of race conditions in the test case to ensure stable order
      of events. Also removed all sleeps. Test execution time is down from 18s
      to 0.15s.
      
      On disconnect audit event is triggered after control is returned to
      mysqltest client. Which means mysqltest may issue more commands
      concurrently before disconnect is actually logged.
      
      Similar problem happens with regular query execution: an event is
      triggered after control is returner to the client. Which may end
      up with unstable order of events in different connections.
      
      Delayed insert rows are enqueued separately and can either be combined
      into single event or go as separate events. Reduced number of inserted
      rows to 1 to stabilize result.
      
      Also backported 2b3f6ab4 from 10.5.
      06219c2a
  3. 08 Apr, 2020 1 commit
    • Sergei Golubchik's avatar
      fix rocksdb compression detection · d565895b
      Sergei Golubchik authored
      cmake module name is BZip2, not BZIP2.
      variable names are WITH_ROCKSDB_zstd and WITH_ROCKSDB_snappy.
      it's SNAPPY_FOUND in older cmake (and both in newer cmake).
      also, make it verbose.
      d565895b
  4. 07 Apr, 2020 1 commit
  5. 03 Apr, 2020 1 commit
  6. 01 Apr, 2020 5 commits
    • Sergey Vojtovich's avatar
      A better fix for edd7e7c8 · 05e4a87c
      Sergey Vojtovich authored
      05e4a87c
    • Oleksandr Byelkin's avatar
      MDEV-20604: Duplicate key value is silently truncated to 64 characters in print_keydup_error · cb4da5da
      Oleksandr Byelkin authored
      Added indication of truncated string for "s" and "M" formats
      cb4da5da
    • Marko Mäkelä's avatar
      MDEV-22035 Memory leak in main.mysqltest · a1846b7a
      Marko Mäkelä authored
      The test main.mysqltest could crash or hang with
      cmake -DWITH_ASAN=ON builds. The reason appears to be
      a memory leak, which was found out by manually invoking
      
      echo --replace_regex a > file
      ASAN_OPTIONS=log_path=/dev/shm/asan mysqltest ... < file
      
      and then examining the /dev/shm/asan.* file.
      a1846b7a
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · bc862c4e
      Marko Mäkelä authored
      bc862c4e
    • Marko Mäkelä's avatar
      MDEV-13626: Improve innodb.xa_recovery_debug · b1742a5c
      Marko Mäkelä authored
      Improve the test that was imported and adapted for MariaDB in
      commit fb217449.
      
      row_undo_step(): Move the DEBUG_SYNC point from trx_rollback_for_mysql().
      This DEBUG_SYNC point is executed after rolling back one row.
      
      trx_rollback_for_mysql(): Clarify the comments that describe the scenario,
      and remove the DEBUG_SYNC point.
      
      If the statement "if (trx->has_logged_persistent())" and its body are
      removed from trx_rollback_for_mysql(), then the test
      innodb.xa_recovery_debug will fail because the transaction would still
      exist in the XA PREPARE state. If we allow the XA COMMIT statement
      to succeed in the test, we would observe an incorrect state of the
      XA transaction where the table would contain row (1,NULL). Depending
      on whether the XA transaction was committed, the table should either
      be empty or contain the record (1,1). The intermediate state of
      (1,NULL) should never be observed after completed recovery.
      b1742a5c
  7. 31 Mar, 2020 2 commits
    • Marko Mäkelä's avatar
      MDEV-13626: Import and adapt innodb.xa_recovery_debug · fb217449
      Marko Mäkelä authored
      Adapt the test that was added in
      mysql/mysql-server@6b65d9032cbb6c1016cb09d056df6885e3d25dc6
      but omitted in commit 2e814d47.
      
      Instead of triggering a log checkpoint, we will only trigger
      a redo log flush before killing the server.
      Note: the mtr.commit() call in trx_rollback_for_mysql()
      will not actually make the undo log header page state change durable.
      A call to log_write_up_to(mtr.commit_lsn(), true) would do that.
      
      It is unclear what the originally reported bug scenario was.
      As long as innobase_rollback_by_xid() will not return without
      ensuring that the redo log has been durably written, we should be safe.
      fb217449
    • mkaruza's avatar
      MDEV-22021: Galera database could get inconsistent with rollback to savepoint · 2d16452a
      mkaruza authored
      When binlog is disabled, WSREP will not behave correctly when
      SAVEPOINT ROLLBACK is executed since we don't register handlers for such case.
      Fixed by registering WSREP handlerton for SAVEPOINT related commands.
      2d16452a
  8. 30 Mar, 2020 3 commits
  9. 26 Mar, 2020 1 commit
  10. 25 Mar, 2020 2 commits
  11. 24 Mar, 2020 1 commit
    • seppo's avatar
      MDEV-21473 conflicts with async slave BF aborting (#1475) · 5918b170
      seppo authored
      If async slave thread (slave SQL handler), becomes a BF victim, it may occasionally happen that rollbacker thread is used to carry out the rollback instead of the async slave thread.
      This can happen, if async slave thread has flagged "idle" state when BF thread tries to figure out how to kill the victim.
      The issue was possible to test by using a galera cluster as slave for external master, and issuing high load of conflicting writes through async replication and directly against galera cluster nodes.
      However, a deterministic mtr test for the "conflict window" has not yet been worked on.
      
      The fix, in this patch makes sure that async slave thread state is never set to IDLE. This prevents the rollbacker thread to intervene.
      The wsrep_query_state change was refactored to happen by dedicated function to make controlling the idle state change in one place.
      5918b170
  12. 23 Mar, 2020 7 commits
  13. 21 Mar, 2020 4 commits
  14. 20 Mar, 2020 10 commits
    • Eugene Kosov's avatar
      InnoDB: reduce size of dtuple_t · 45973ec6
      Eugene Kosov authored
      Making a linked list of dtuple_t is needed only for inserting
      records. It's better to store tuples in a non-intrusive
      container to not affect all other use cases of dtuple_t
      
      dtuple_t::tuple_list: removed, it was 2 * sizeof(void*) bytes
      
      ins_node_t::entry_list: now it's std::vector<dtuple_t*>
      
      ins_node_t::entry: now it's std::vector<dtuple_t*>::iterator
      
      DBUG_EXECUTE_IF("row_ins_skip_sec": this dead code removed
      45973ec6
    • Eugene Kosov's avatar
      correct comment in buf_page_is_corrupted() · 54b2da95
      Eugene Kosov authored
      54b2da95
    • Eugene Kosov's avatar
      st_::span fixes · 1f53335d
      Eugene Kosov authored
      move span.h to a proper place to make it available for the whole server
      
      Reformat it.
      
      Constuctors from a contigous container are fixed
      to use cont.data() instead of cont.begin()
      
      span<>::index_type is replaced with span<>::size_type
      1f53335d
    • Eugene Kosov's avatar
      remove fishy reinterpret_cast from buf_page_is_zeroes() · 884d22f2
      Eugene Kosov authored
      In my micro-benchmarks memcmp(4196) 3 times faster than old
      implementation. Also, it's generally better to use as less
      reinterpret_casts<> as possible.
      
      buf_is_zeroes(): renamed from buf_page_is_zeroes() and
      argument changed to span<> for convenience.
      
      st_::span<T>::const_iterator: fixed
      
      page_zip-verify_checksum(): make argument byte* instead of void*
      884d22f2
    • Igor Babaev's avatar
      MDEV-17177 Crash in Item_func_in::cleanup() for SELECT executed via · 2bde0655
      Igor Babaev authored
                 prepared statement
      
      The method Item_func_in::build_clone() that builds a clone item for an
      Item_func_in item first calls a generic method Item_func::build_item()
      that builds the the clones for the arguments of the Item_func_in item
      to be cloned, creates a copy of the Item_func_in object and attaches the
      clones for the arguments to this copy. Then the method Item_func_in::build_clone()
      makes the copy fully independent on the copied object in order to
      guarantee a proper destruction of the clone. The fact is the copy of the
      Item_func_in object is registered as any other item object and should be
      destructed as any other item object.
      If the method Item_func::build_item fails to build a clone of an argument
      then it returns 0. In this case no copy of the Item_func_in object should
      be created. Otherwise the finalizing actions for this copy would not be
      performed and the copy would remain in a state that would prevent its
      proper destruction.
      
      The code of Item_func_in::build_clone() before this patch created the copy
      of the Item_func_in object before cloning the argument items. If this
      cloning failed the server crashed when trying to destruct the copy item.
      
      The code of Item_row::build_clone() was changed similarly to the code of
      Item_func::build_clone though this code could not cause any problems.
      2bde0655
    • Marko Mäkelä's avatar
      9f7b8625
    • Marko Mäkelä's avatar
      MDEV-21549: Clean up the import/export tests · b034d708
      Marko Mäkelä authored
      Remove CREATE/DROP database.
      
      Remove some unnecessary suppressions, replacements, and
      SQL statements.
      
      Populate tables via have_sequence.inc to avoid the creation of
      explicit InnoDB record locks in INSERT...SELECT. This will remove
      some gaps in AUTO_INCREMENT values.
      b034d708
    • Marko Mäkelä's avatar
      MDEV-21549 IMPORT TABLESPACE fails to adjust all tablespace ID in root pages · b8b3edff
      Marko Mäkelä authored
      After MDEV-12353, the consistency check that I originally added for
      commit 1b9fe0bb
      (InnoDB Plugin for MySQL 5.1) started randomly failing.
      
      It turns out that the IMPORT TABLESPACE code was always incorrect:
      it did not update the (redundantly stored) tablespace ID
      in index tree root pages. It only does that for page headers
      and BLOB pointers.
      
      PageConverter::update_index_page(): Update the tablespace ID
      in the BTR_SEG_TOP and BTR_SEG_LEAF of index root pages.
      b8b3edff
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · c9ec1cc7
      Marko Mäkelä authored
      c9ec1cc7
    • Alexander Barkov's avatar
      MDEV-21977 main.func_math fails due to undefined behaviour · 328edf85
      Alexander Barkov authored
      The problem happened in these line:
      
      uval0= (ulonglong) (val0_negative ? -val0 : val0);
      uval1= (ulonglong) (val1_negative ? -val1 : val1);
      
      return check_integer_overflow(val0_negative ? -(longlong) res : res,
                                    !val0_negative);
      
      when unary minus was performed on -9223372036854775808.
      This behavior is undefined in C/C++.
      328edf85