1. 04 May, 2023 5 commits
  2. 03 May, 2023 8 commits
  3. 02 May, 2023 13 commits
  4. 30 Apr, 2023 1 commit
    • Igor Babaev's avatar
      MDEV-31143 Crash for query using ROWNUM() over view with ORDER BY · 7e2e9689
      Igor Babaev authored
      When processing a query over a mergeable view at some conditions checked
      at prepare stage it may be decided to materialize the view rather than
      to merge it. Before this patch in such case the field 'derived' of the
      TABLE_LIST structure created for the view remained set to 0. As a result
      the guard condition preventing range analysis for materialized views did
      not work properly. This led to a call of some handler method for the
      temporary table created to contain the view's records that was supposed
      to be used only for opened tables. However temporary tables created for
      materialization of derived tables or views are not opened yet when range
      analysis is performed.
      
      Approved by Oleksandr Byelkin <sanja@mariadb.com>
      7e2e9689
  5. 29 Apr, 2023 2 commits
  6. 28 Apr, 2023 7 commits
  7. 27 Apr, 2023 4 commits
    • Oleksandr Byelkin's avatar
      MDEV-31073 Server crash, assertion `table != 0 && view->field_translation !=... · 2eb7bf1e
      Oleksandr Byelkin authored
      MDEV-31073 Server crash, assertion `table != 0 && view->field_translation != 0' failure with ROWNUM and view
      
      Now the same rule applied to vews and derived tables. So we should
      allow merge of views (and derived) in queries with rownum, because
      it do not change results, only makes query plans better.
      2eb7bf1e
    • Andrei's avatar
      MDEV-29621: Replica stopped by locks on sequence · 55a53949
      Andrei authored
      When using binlog_row_image=FULL with sequence table inserts, a
      replica can deadlock because it treats full inserts in a sequence as DDL
      statements by getting an exclusive lock on the sequence table. It
      has been observed that with parallel replication, this exclusive
      lock on the sequence table can lead to a deadlock where one
      transaction has the exclusive lock and is waiting on a prior
      transaction to commit, whereas this prior transaction is waiting on
      the MDL lock.
      
      This fix for this is on the master side, to raise FL_DDL
      flag on the GTID of a full binlog_row_image write of a sequence table.
      This forces the slave to execute the statement serially so a deadlock
      cannot happen.
      
      A test verifies the deadlock also to prove it happen on the OLD (pre-fixes)
      slave.
      
      OLD (buggy master) -replication-> NEW (fixed slave) is provided.
      As the pre-fixes master's full row-image may represent both
      SELECT NEXT VALUE and INSERT, the parallel slave pessimistically
      waits for the prior transaction to have committed before to take on the
      critical part of the second (like INSERT in the test) event execution.
      The waiting exploits a parallel slave's retry mechanism which is
      controlled by `@@global.slave_transaction_retries`.
      
      Note that in order to avoid any persistent 'Deadlock found' 2013 error
      in OLD -> NEW, `slave_transaction_retries` may need to be set to a
      higher than the default value.
      START-SLAVE is an effective work-around if this still happens.
      55a53949
    • Oleksandr Byelkin's avatar
      Nes CC 3.3 · 06b443be
      Oleksandr Byelkin authored
      06b443be
    • Marko Mäkelä's avatar
      MDEV-29401 InnoDB history list length increased in 10.6 compared to 10.5 · 4a668c18
      Marko Mäkelä authored
      The InnoDB buffer pool and locking were heavily refactored in
      MariaDB Server 10.6. Among other things, dict_sys.mutex was removed,
      and the contended lock_sys.mutex was replaced with a combination of
      lock_sys.latch and distributed latches in hash tables. Also, a
      default value was changed to innodb_flush_method=O_DIRECT to improve
      performance in write-heavy workloads.
      
      One thing where an adjustment was missing is around the parameters
      innodb_max_purge_lag (number of committed transactions waiting to
      be purged), and innodb_max_purge_lag_delay
      (maximum number of microseconds to delay a DML operation).
      
      purge_coordinator_state::do_purge(): Pass the history_size to trx_purge()
      and reset srv_dml_needed_delay if the history is empty.
      Keep executing the loop non-stop as long as srv_dml_needed_delay is set.
      
      trx_purge_dml_delay(): Made part of trx_purge().
      Set srv_dml_needed_delay=0 when nothing can be purged (!n_pages_handled).
      
      row_mysql_delay_if_needed(): Mimic the logic of
      innodb_max_purge_lag_wait_update().
      
      Reviewed by: Thirunarayanan Balathandayuthapani
      4a668c18