1. 23 Feb, 2018 4 commits
  2. 22 Feb, 2018 15 commits
  3. 21 Feb, 2018 21 commits
    • Marko Mäkelä's avatar
      MDEV-15370 Upgrade fails when both insert_undo and update_undo exist · fe0e263e
      Marko Mäkelä authored
      Before MDEV-12288 in MariaDB 10.3.1, InnoDB used to partition
      the persistent transaction undo log into insert_undo and update_undo.
      
      MDEV-12288 repurposes the update_undo as the single undo log.
      In order to support an upgrade from earlier MariaDB versions,
      the insert_undo is recovered in data structures, called old_insert.
      
      An assertion failure occurred in TrxUndoRsegsIterator::set_next()
      when an incomplete transaction was recovered with both insert_undo
      and update_undo log. This could be easily demonstrated by starting
      ./mysql-test-run --manual-gdb innodb.read_only_recovery
      in MariaDB 10.2, and after the first kill, start up the MariaDB 10.3
      server with the same parameters.
      
      The problem is that MariaDB 10.3 would roll back the recovered
      transaction, and finally "commit" it twice (with all changes to
      data rolled back), both insert_undo and update_undo with the same
      commit end identifier (trx->no).
      
      Our fix is to introduce a "commit number" that comprises two components:
      (trx->no << 1 | !old_insert). In this way, the assertion in the purge
      subsystem can be relaxed so that only the trx->no component must match.
      fe0e263e
    • Daniel Black's avatar
      MDEV-15356: tp_timeout_handler needs to call set_killed_no_mutex as it has the mutex · 868bca5c
      Daniel Black authored
      Regression introducted in c2118a08 where LOCK_thd_data was moveed
      to LOCK_thd_kill
      868bca5c
    • Vladislav Vaintroub's avatar
      Fix truncation warning on Windows. · 23d7b773
      Vladislav Vaintroub authored
      23d7b773
    • Marko Mäkelä's avatar
      Refactor TrxUndoRsegsIterator for further simplification · 6a370e43
      Marko Mäkelä authored
      TrxUndoRsegs::append(): Remove.
      
      TrxUndoRsegsIterator::set_next(): Add a debug assertion that
      demonstrates that the merging of rollback segments never occurs.
      Since MDEV-12289 or earlier, MariaDB 10.2 will not make any
      temporary undo log accessible to the purge subsystem.
      (Also MySQL 5.7 would skip the purge of any undo log for
      temporary tables, but not before parsing and buffering those
      temporary undo log records.)
      6a370e43
    • Marko Mäkelä's avatar
      Simplify TrxUndoRsegs · 6ae7fa68
      Marko Mäkelä authored
      Construct directly from trx_rseg_t&.
      push_back(), size(): Remove.
      6ae7fa68
    • Marko Mäkelä's avatar
      Replace purge_iter_t with purge_sys_t::iterator · d4187bdc
      Marko Mäkelä authored
      Also, remove the field undo_rseg_space.
      Apparently its purpose was to avoid problems with
      temporary undo logs, which MySQL 5.7 unnecessarily adds to
      the purge system. (Temporary undo log records are not purged.)
      MariaDB 10.2 fixed this in MDEV-12289 or earlier.
      d4187bdc
    • Marko Mäkelä's avatar
      Rename the purge_sys_t iterators · 28d844fd
      Marko Mäkelä authored
      purge_iter_t::operator<=(): Ordering comparison.
      This replaces trx_purge_check_limit() with the difference that
      we are not comparing undo_rseg_space. (In MariaDB, temporary
      undo logs do not enter the purge subsystem at all.)
      
      purge_sys_t::done: Remove. This was not used for anything.
      
      purge_sys_t::tail: Renamed from purge_sys_t::iter.
      
      purge_sys_t::head: Renamed from purge_sys_t::limit.
      28d844fd
    • Marko Mäkelä's avatar
      MDEV-10814 innodb large allocations - Don't dump · 7bfe33ee
      Marko Mäkelä authored
      Merge pull request #364
      7bfe33ee
    • Daniel Black's avatar
      MDEV-15356: tp_timeout_handler needs to call set_killed_no_mutex as it has the mutex · 8f50a26e
      Daniel Black authored
      Regression introducted in c2118a08 where LOCK_thd_data was moveed
      to LOCK_thd_kill
      8f50a26e
    • Sergei Golubchik's avatar
      log all mtr output in vardir/log/stdout.log · 5d8ac1ec
      Sergei Golubchik authored
      despite the name, it logs both stdout and stderr
      5d8ac1ec
    • Sergei Golubchik's avatar
      fix compilation -DWITH_PERFSCHEMA=NO · 50359719
      Sergei Golubchik authored
      tokudb apparently requires perfschema now
      50359719
    • Sergei Golubchik's avatar
      18455ec3
    • Vladislav Vaintroub's avatar
      e2ac8d3f
    • Sergei Petrunia's avatar
      db0484f3
    • Daniel Black's avatar
      MDEV-10.1.31 does not join an existing cluster with SST xtrabackup-v2 · 4e6dab94
      Daniel Black authored
      Analysis:- The problem  is the change in the implementation of wait_for_listen
      in wsrep_sst_xtrabackup-v2.sh. The new script uses lsof which will always
      exit with an error code if it can't find all the items, and because the
      script has the -e option set in the hashbang line (#!/bin/bash -ue), the
      script will abort right after running lsof if lsof can't find even a single
      item among all the items listed in its arguments. This will happen even if
      socat is running and listening, because it can't find nc. The loop in
      wait_for_listen will therefore always quit after one iteration without
      writing the "ready" line to signal the parent.
      
      Solution:- We will or the lsof with true.
      
      Patch Credit :Daniel Black and David Wang
      4e6dab94
    • Sergei Petrunia's avatar
      MDEV-15372: Parallel slave speedup very limited when log_slave_updates=OFF · 00a556c0
      Sergei Petrunia authored
      Part #2: some transactions have m_rocksdb_tx==NULL (and most functions of
      Rdb_transction_impl handle this case. Do like they do)
      00a556c0
    • Sergei Golubchik's avatar
    • Sergei Petrunia's avatar
      MDEV-15372: Parallel slave speedup very limited when log_slave_updates=OFF · 01e89d6a
      Sergei Petrunia authored
      Make MyRocks' non-XA commit path to first do the commit without syncing
      and then sync.
      01e89d6a
    • Alexander Barkov's avatar
    • Marko Mäkelä's avatar
      Avoid some dead code · 094cf730
      Marko Mäkelä authored
      094cf730
    • Alexander Barkov's avatar
      A cleanup for MDEV-15340 + fix MDEV-15363 Wrong result for CAST(LAST_DAY(TIME'00:00:00') AS TIME) · 5417002d
      Alexander Barkov authored
      The change N7 in MDEV-15340 (see the commit message) introduced
      a regression in how CAST(AS TIME), HOUR(), TIME_TO_SEC() treat datetimes
      '0000-00-DD mm:hh:ss' (i.e. with zero YYYYMM part and a non-zero day).
      These functions historically do not mix days to hours on datetime-to-time
      conversion. Implementations of the underlying methods used get_arg0_time()
      to fetch MYSQL_TIME. After MDEV-15340, get_arg0_time() went through the
      Time() constructor, which always adds '0000-00-DD' to hours automatically
      (as in all other places in the code we do mix days to hours).
      
      Changes:
      1. Extending Time() to make it possible to choose a desired way of treating
         '0000-00-DD' (ignore or mix to hours) on datetime-to-time conversion.
         Adding a helper class Time::Options for this, which now describes two aspects
         of Time() creation:
         1. Flags for get_date()
         2. Days/hours mixing behavior.
      
      2. Removing Item_func::get_arg0_time(). Using Time() directly
         in all affected classes. Forcing Time() to ignore (rather than mix)
         '0000-00-DD' in these affected classes by passing a suitable Options value.
      
      3. Adding Time::to_seconds(), to reuse the code between
         Item_func_time_to_sec::decimal_op() and Item_func_time_to_sec::int_op().
      
      4. Item_func::get_arg0_date() now returns only a datetime value,
         with automatic time-to-datetime conversion if needed. An assert was
         added to catch attempts to pass TIME_TIME_ONLY to get_arg0_date().
         All callers were checked not to pass TIME_TIME_ONLY, this revealed
         a bug MDEV-15363.
      
      5. Changing Item_func_last_day::get_date() to remove the TIME_TIME_ONLY flag
         before calling get_arg0_date(). This fixes MDEV-15363.
      5417002d