1. 21 Aug, 2018 7 commits
  2. 20 Aug, 2018 1 commit
    • Galina Shalygina's avatar
      MDEV-16765: Missing rows with pushdown condition defined with CASE using Item_cond · 0de3c423
      Galina Shalygina authored
      The bug appears because of the wrong pushdown into the WHERE clause of the
      materialized derived table/view work. For the excl_dep_on_grouping_fields()
      method that checks if the condition can be pushed into the WHERE clause
      the case when Item_cond is used is missing. For Item_cond elements this
      method always returns positive result (that condition can be pushed).
      So this condition is pushed even if is shouldn't be pushed.
      
      To fix it new Item_cond::excl_dep_on_grouping_fields() method is added.
      0de3c423
  3. 18 Aug, 2018 1 commit
  4. 17 Aug, 2018 1 commit
    • Igor Babaev's avatar
      MDEV-16934 Query with very large IN clause lists runs slowly · 4eac5df3
      Igor Babaev authored
      This patch introduces support for the system variable eq_range_index_dive_limit
      that existed in MySQL starting from 5.6. The variable sets a limit for
      index dives into equality ranges. Index dives are performed by optimizer
      to estimate the number of rows in range scans. Index dives usually provide
      good estimate but they are pretty expensive. To estimate the number of rows
      in equality ranges statistical data on indexes can be employed. Its usage gives
      not so good estimates but it's cheap. So if the number of equality dives
      required by an index scan exceeds the set limit no dives for equality
      ranges are performed by the optimizer for this index.
      
      As the new system variable is introduced in a stable version the default
      value for it is set to a special value meaning there is no limit for the number
      of index dives performed by the optimizer.
      
      The patch partially uses the MySQL code for WL 5957
      'Statistics-based Range optimization for many ranges'.
      4eac5df3
  5. 16 Aug, 2018 8 commits
    • Marko Mäkelä's avatar
      MDEV-13564: Refuse MLOG_TRUNCATE in mariabackup · d6f7fd60
      Marko Mäkelä authored
      The MySQL 5.7 TRUNCATE TABLE is inherently incompatible
      with hot backup, because it is creating and deleting a separate
      log file, and it is not writing redo log for all changes of the
      InnoDB data dictionary tables. Refuse to create a corrupted backup
      if the unsafe form of TRUNCATE was executed.
      
      Note: Undo log tablespace truncation cannot be detected easily.
      Also it is incompatible with backup, for similar reasons.
      
      xtrabackup_backup_func(): "Subscribe to" the log events before
      the first invocation of xtrabackup_copy_logfile().
      
      recv_parse_or_apply_log_rec_body(): If the function pointer
      log_truncate is set, invoke it to report MLOG_TRUNCATE.
      d6f7fd60
    • Marko Mäkelä's avatar
      Re-enable the test mariabackup.unsupported_redo · 1b49c894
      Marko Mäkelä authored
      Remove the logic for skipping the test if a log checkpoint occurred,
      and the logic for tolerating failures. Thanks to MDEV-16791,
      MLOG_INDEX_LOAD is supposed to always work.
      1b49c894
    • Vladislav Vaintroub's avatar
    • Marko Mäkelä's avatar
      Report all redo log corruption · 05153a67
      Marko Mäkelä authored
      Amend commit b853b4fd
      that was reverted in commit 29150e23.
      
      recv_parse_log_recs(): Do check for corrupted redo log or file
      system before checking for len==0, but only read *ptr if
      it is not past the end of the buffer (end_ptr).
      
      recv_parse_log_rec(): Report incorrect redo log type
      in a consistent way with recv_parse_or_apply_log_rec_body().
      This is a follow-up to commit f30c5af4.
      05153a67
    • Marko Mäkelä's avatar
      MDEV-16136 Various ASAN failures after MDEV-15030 · a0ce3216
      Marko Mäkelä authored
      The Pool poisoning that was introduced in MDEV-15030 introduced
      race conditions in AddressSanitizer builds, because concurrent
      poisoning and unpoisoning were not prevented by any synchronization
      primitive.
      
      Pool::get(): Protect the unpoisoning by m_lock_strategy.
      
      Pool::mem_free(): Protect the poisoning by m_lock_strategy.
      
      Pool::putl(): Renamed from put(), because now the caller is
      responsible for invoking m_lock_strategy.
      a0ce3216
    • Marko Mäkelä's avatar
      MDEV-16136: Prevent wrong reuse in trx_reference() · fa2a74e0
      Marko Mäkelä authored
      If trx_free() and trx_create_low() were called while a call to
      trx_reference() was pending, we could get a reference to a wrong
      transaction object.
      
      trx_reference(): Return NULL if the trx->id no longer matches.
      
      lock_trx_release_locks(): Assign trx->id = 0, so that trx_reference()
      will not return a reference to this object.
      
      trx_cleanup_at_db_startup(): Assign trx->id = 0.
      
      assert_trx_is_free(): Assert !trx->n_ref. Assert trx->id == 0,
      now that it will be cleared as part of a transaction commit.
      fa2a74e0
    • Marko Mäkelä's avatar
      Rename lock_pool_t to lock_list · 65835065
      Marko Mäkelä authored
      Also, replace reverse iteration with forward iteration.
      
      lock_table_has(): Remove a redundant condition.
      65835065
    • Marko Mäkelä's avatar
      MDEV-16136: Simplify trx_lock_t memory management · 3ce8a0fc
      Marko Mäkelä authored
      Allocate trx->lock.rec_pool and trx->lock.table_pool directly from trx_t.
      Remove unnecessary use of std::vector.
      
      In order to do this, move some definitions from lock0priv.h to
      lock0types.h, so that ib_lock_t will not be an opaque type.
      3ce8a0fc
  6. 15 Aug, 2018 6 commits
    • Oleksandr Byelkin's avatar
      Merge branch '5.5' into 10.0 · bcc677bb
      Oleksandr Byelkin authored
      bcc677bb
    • Sergei Petrunia's avatar
      MDEV-6439: Server crashes in Explain_union::print_explain with explain in slow log, tis620 charset · b62ac161
      Sergei Petrunia authored
      Item_subselect::is_expensive() used to return FALSE (Inexpensive) whenever
      it saw that one of SELECTs in the Subquery's UNION is degenerate. It
      ignored the fact that other parts of the UNION might not be inexpensive,
      including the case where pther parts of the UNION have no query plan yet.
      
      For a subquery in form col >= ANY (SELECT 'foo' UNION SELECT 'bar')
      this would cause the query to be considered inexpensive when there is
      no query plan for the second part of the UNION, which in turn would
      cause the SELECT 'foo' to compute and free itself while still inside
      JOIN::optimize for that SELECT (See MDEV comment for full description).
      b62ac161
    • Oleksandr Byelkin's avatar
      MDEV-15475: Assertion `!table || (!table->read_set ||... · 1b797e9e
      Oleksandr Byelkin authored
      MDEV-15475: Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed on EXPLAIN EXTENDED with constant table and view
      
      Print constant ISNULL value independent.
      Fix of printing of view FRM and CREATE VIEW output
      1b797e9e
    • Julius Goryavsky's avatar
      This is patch for the https://jira.mariadb.org/browse/MDEV-9519 issue: · 75dfd4ac
      Julius Goryavsky authored
      If we have a 2+ node cluster which is replicating from an async master
      and the binlog_format is set to STATEMENT and multi-row inserts are executed
      on a table with an auto_increment column such that values are automatically
      generated by MySQL, then the server node generates wrong auto_increment
      values, which are different from what was generated on the async master.
      
      The causes and fixes:
      
      1. We need to improve processing of changing the auto-increment values
      after changing the cluster size.
      
      2. If wsrep auto_increment_control switched on during operation of
      the node, then we should immediately update the auto_increment_increment
      and auto_increment_offset global variables, without waiting of the next
      invocation of the wsrep_view_handler_cb() callback. In the current version
      these variables retain its initial values if wsrep_auto_increment_control
      is switched on during operation of the node, which leads to inconsistent
      results on the different nodes in some scenarios.
      
      3. If wsrep auto_increment_control switched off during operation of the node,
      then we must return the original values of the auto_increment_increment and
      auto_increment_offset global variables, as the user has set. To make this
      possible, we need to add a "shadow copies" of these variables (which stores
      the latest values set by the user).
      75dfd4ac
    • Vladislav Vaintroub's avatar
    • Jan Lindström's avatar
      Merge pull request #844 from codership/10.1-MDEV-15933 · 59608156
      Jan Lindström authored
      MDEV-15933 Cannot resume Node SYNCED state when wsrep_desync is done after FTWRL
      59608156
  7. 14 Aug, 2018 4 commits
  8. 13 Aug, 2018 4 commits
  9. 12 Aug, 2018 1 commit
    • Sergei Petrunia's avatar
      MDEV-16203: autoinc_debug of rocksdb test suite fails · ba10ffe0
      Sergei Petrunia authored
      The test causes simulated server crashes with DBUG_SUICIDE();.
      
      It also relies on transactions that were committed right before the
      crash to be visible after the crash (that is, it requires durability).
      
      Run the test with transaction durability enabled: set
      rocksdb-flush-log-at-trx-commit=1.
      ba10ffe0
  10. 11 Aug, 2018 1 commit
  11. 10 Aug, 2018 4 commits
    • Otto Kekäläinen's avatar
      Deb: Make libmariadb3 Breaks+Replaces libmariadbclient18 so upgrade pass · 9dd3e5ea
      Otto Kekäläinen authored
      The package libmariadbclient18 contains the dialog.so plugin, which also
      the new libmariadb3 ships. As they both use the exact same path the latter
      must be marked as a with Breaks and Replaces relations ship.
      
      Note: This fix is conservative hack for stable releases 10.2 and 10.3.
      In 10.4, the development release at the time, we will clean up how the
      libmariadb3 packaging and it's -compat packages are done to match that
      what is done in downstream Debian official.
      9dd3e5ea
    • Marko Mäkelä's avatar
      Revert part of b853b4fd · 29150e23
      Marko Mäkelä authored
      recv_parse_log_recs(): Do not check for corruption before
      checking for end-of-log-buffer. For some reason, adding the
      check to the logical-looking place would cause intermittent
      recovery failures in the tests innodb.innodb-index and
      innodb_gis.rtree_compress2.
      29150e23
    • Marko Mäkelä's avatar
      Report InnoDB redo log corruption better · b853b4fd
      Marko Mäkelä authored
      recv_parse_log_recs(): Check for corruption before checking for
      end-of-log-buffer.
      
      mlog_parse_initial_log_record(), page_cur_parse_delete_rec():
      Flag corruption for out-of-bounds values, and let the caller
      dump the corrupted redo log extract.
      b853b4fd
    • Marko Mäkelä's avatar
      recv_report_corrupt_log(): Avoid buffer overflow · 0e15ae16
      Marko Mäkelä authored
      If recv_sys_justify_left_parsing_buf() has been invoked, it is possible
      that recv_previous_parsed_rec_offset is after the current offset.
      In this case, we must not dump any bytes before the current record.
      0e15ae16
  12. 09 Aug, 2018 2 commits