1. 28 Aug, 2018 2 commits
  2. 27 Aug, 2018 3 commits
    • Igor Babaev's avatar
      MDEV-17017 Explain for query using derived table specified with · 497d8627
      Igor Babaev authored
                 a table value constructor shows wrong number of rows
      
      This is another attempt to fix this bug. The previous patch did not take
      into account that a transformation for ALL/ANY subqueries could be applied
      to the materialized table that wrapped the table value constructor used as
      a specification of the subselect used an ALL/ANY subquery. In this case
      the result of the derived table used a sink of the class select_subselect
      rather than of the class select_unit. Thus the previous fix could cause
      memory overwrites when running EXPLAIN for queries with table value
      constructors in ALL/ANY subselects.
      497d8627
    • Galina Shalygina's avatar
      MDEV-16803: Pushdown Item_func_in item that uses vectors in several SELECTs · 55163ba1
      Galina Shalygina authored
      The bug appears because of the Item_func_in::build_clone() method.
      The 'array' field for the Item_func_in item that can be pushed into
      the materialized view/derived table was built in the wrong way.
      It becomes lame after the pushdown of the condition into the first
      SELECT that defines that view/derived table. The server crashes in
      the pushdown into the next SELECT while trying to use already lame
      'array' field.
      
      To fix it Item_func_in::build_clone() was changed.
      55163ba1
    • Jan Lindström's avatar
      MDEV-17062: Test failure on galera.MW-336 · a290b807
      Jan Lindström authored
      MDEV-17058: Test failure on wsrep.variables
      MDEV-17060: Test failure on galera.galera_var_slave_threads
      
      Fix incorrect calculation of increased applier (slave) threads.
      Note that increase change takes effect "immediately" but we should
      use proper wait condition to wait it. Reducing the number of
      slave threads is not immediate as thread will only exit after a
      replication event.
      a290b807
  3. 26 Aug, 2018 1 commit
    • Ming Lin's avatar
      MDEV-16703: Update AUTO_INCREMENT in the UPDATE statement · 2b76f6f6
      Ming Lin authored
      Currently RocksDB engine doesn't update AUTO_INCREMENT in the UPDATE statement.
      For example,
      
      CREATE TABLE t1 (pk INT AUTO_INCREMENT, a INT, PRIMARY KEY(pk)) ENGINE=RocksDB;
      INSERT INTO t1 (a) VALUES (1);
      UPDATE t1 SET pk = 3; ==> AUTO_INCREMENT should be updated to 4.
      
      Without this fix, it hits the Assertion `dd_val >= last_val' failed in
      myrocks::ha_rocksdb::load_auto_incr_value_from_index.
      
      (cherry picked from commit f7154242)
      2b76f6f6
  4. 25 Aug, 2018 4 commits
  5. 24 Aug, 2018 8 commits
  6. 23 Aug, 2018 4 commits
  7. 22 Aug, 2018 2 commits
    • Ming Lin's avatar
      MDEV-16703: Update AUTO_INCREMENT in the UPDATE statement · f7154242
      Ming Lin authored
      Currently RocksDB engine doesn't update AUTO_INCREMENT in the UPDATE statement.
      For example,
      
      CREATE TABLE t1 (pk INT AUTO_INCREMENT, a INT, PRIMARY KEY(pk)) ENGINE=RocksDB;
      INSERT INTO t1 (a) VALUES (1);
      UPDATE t1 SET pk = 3; ==> AUTO_INCREMENT should be updated to 4.
      
      Without this fix, it hits the Assertion `dd_val >= last_val' failed in
      myrocks::ha_rocksdb::load_auto_incr_value_from_index.
      f7154242
    • Sergei Golubchik's avatar
      MDEV-16961 Assertion `!table || (!table->read_set ||... · 5d650d36
      Sergei Golubchik authored
      MDEV-16961 Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed upon concurrent DELETE and DDL with virtual blob column
      
      After iterating all fields and setting PART_INDIRECT_KEY_FLAG as
      necessary, TABLE::mark_columns_used_by_virtual_fields() remembers
      in TABLE_SHARE that this operation was done and need not be repeated.
      
      But as the flag is set in TABLE_SHARE, PART_INDIRECT_KEY_FLAG must
      be set in TABLE_SHARE::field[], not only in TABLE::field[].
      
      Otherwise all new TABLEs opened from this TABLE_SHARE will
      never have it.
      5d650d36
  8. 21 Aug, 2018 10 commits
  9. 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
  10. 18 Aug, 2018 1 commit
  11. 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
  12. 16 Aug, 2018 3 commits
    • Monty's avatar
      Fixed that -DDBUG_ASSERT_AS_PRINTF works again · 34c7222c
      Monty authored
      Note that this option was only designed to work on binaries
      compiled without DBUG.
      34c7222c
    • 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