1. 22 Dec, 2023 1 commit
    • Daniele Sciascia's avatar
      MDEV-32549 Cluster inconsistent after SAVEPOINT is rolled back · 362c0950
      Daniele Sciascia authored
      Attempting to set a SAVEPOINT when one of the involved storage engines
      does not support savepoints, raises an error, and results in statement
      rollback. If Galera is enabled with binlog emulation, the above
      scenario was not handled correctly, and resulted in cluster wide
      inconsistency.
      
      The problem was in wsrep_register_binlog_handler(), which is called
      towards the beginning of SAVEPOINT execution. This function is
      supposed to mark the beginning of statement position in trx cache
      through `set_prev_position()`. However, it did so only on condition
      that `get_prev_position()` returns `MY_OFF_T_UNDEF`.
      This before statement position is typically reset to undefined at the
      end of statement in `binlog_commit()` / `binlog_rollback()`.
      However that's not the case with Galera and binlog emulation, for
      which binlog commit / rollback hooks are not called due to the
      optimization that avoids internal 2PC (MDEV-16509).
      Signed-off-by: default avatarJulius Goryavsky <julius.goryavsky@mariadb.com>
      362c0950
  2. 21 Dec, 2023 5 commits
  3. 20 Dec, 2023 8 commits
  4. 19 Dec, 2023 6 commits
  5. 18 Dec, 2023 2 commits
  6. 15 Dec, 2023 4 commits
  7. 14 Dec, 2023 2 commits
  8. 13 Dec, 2023 5 commits
    • Marko Mäkelä's avatar
      MDEV-21245 InnoDB: Using a partial-field key prefix in search · 852e1383
      Marko Mäkelä authored
      ha_innobase::compare_key_parts(): If a full column index is
      being replaced with a column prefix index, return Compare_keys::NotEqual.
      852e1383
    • Daniel Black's avatar
      MDEV-33006 Missing required privilege CONNECTION ADMIN · 2c60d43d
      Daniel Black authored
      opt_kill_long_query_type being an enum could be 0 corresponding
      to ALL. When ALL is specified, the CONNECTION ADMIN is still
      required.
      
      Also check REPLICA MONITOR privilege and make the tests
      find the results by recording stderr.
      
      Noticed thanks to bug report by Tim van Dijen.
      
      Fixes: 79b58f1c
      2c60d43d
    • Rex's avatar
      MDEV-31279 Crash when lateral derived is guaranteed to return no rows · b4712242
      Rex authored
      Consider this query
      SELECT t1.* FROM t1, (SELECT t2.b FROM t2 WHERE NOT EXISTS
      (SELECT 1 FROM t3) GROUP BY b) sq where sq.b = t1.a;
      
      If SELECT 1 FROM t3 is expensive, for example t3 has >
      thd->variables.expensive_subquery_limit, first evaluation is deferred to
      mysql_derived_fill().  There it is noted that, in the above case
       NOT EXISTS (SELECT 1 FROM t3) is constant and false.
      
      This causes the join variable zero_result_cause to be set to
      "Impossible WHERE noticed after reading const tables" and the handler
      for this join is never "opened" via handler::ha_open.
      
      When mysql_derived_fill() is called for the next group of results, this
      unopened handler is not taken into account.
      
      reviewed by Igor Babaev (igor@mariadb.com)
      b4712242
    • Marko Mäkelä's avatar
      MDEV-18322 Assertion "wrong page type" on instant ALTER TABLE · c17aca2f
      Marko Mäkelä authored
      row_ins_clust_index_entry_low(): Invoke btr_set_instant() in the same
      mini-transaction that has successfully inserted the metadata record.
      In this way, if inserting the metadata record fails before any
      undo log record was written for it, the index root page will remain
      consistent.
      
      innobase_instant_try(): Remove the btr_set_instant() call.
      
      Reviewed by: Thirunarayanan Balathandayuthapani
      Tested by: Matthias Leich
      c17aca2f
    • Daniel Black's avatar
      MDEV-32795: ALTER SEQUENCE IF NOT EXISTS non_existing_seq Errors rather than note · fbe604d8
      Daniel Black authored
      Like all IF NOT EXISTS syntax, a Note should be generated.
      
      The original commit of Seqeuences cleared the IF NOT EXISTS part
      in the sql/sql_yacc.yy with lex->create_info.init(). Without this
      bit set there was no way it could do anything other than error.
      
      To remedy this removal, the sql_yacc.yy components have been
      minimised as they where all set at the beginning of the ALTER.
      This way the opt_if_not_exists correctly set the IF_EXISTS flag.
      
      In MDEV-13005 (bb4dd70e) the error code changed, requiring
      ER_UNKNOWN_SEQUENCES to be handled in the function
      No_such_table_error_handler::handle_condition.
      fbe604d8
  9. 12 Dec, 2023 7 commits