1. 03 May, 2023 4 commits
  2. 02 May, 2023 11 commits
  3. 29 Apr, 2023 2 commits
  4. 28 Apr, 2023 6 commits
  5. 27 Apr, 2023 5 commits
    • 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
    • Sergei Golubchik's avatar
    • Oleksandr Byelkin's avatar
      a959c22e
    • Marko Mäkelä's avatar
      Merge 10.4 into 10.5 · 902c6222
      Marko Mäkelä authored
      902c6222
    • Yuchen Pei's avatar
      MDEV-29644 post-merge fixup · 6fccf8ba
      Yuchen Pei authored
      Applying b98375f9 instead of 9b32e4b1 for version 10.5-10.8.
      Applying 5075f4e0 instead of 9b32e4b1 for version 10.9+.
      6fccf8ba
  6. 26 Apr, 2023 6 commits
  7. 25 Apr, 2023 3 commits
    • Andrei's avatar
      MDEV-30620 Trying to lock uninitialized LOCK_parallel_entry · e22a57da
      Andrei authored
      The error was seen by a number of mtr tests being caused
      by overdue initialization of rpl_parallel::LOCK_parallel_entry.
      Specifically, SHOW-SLAVE-STATUS might find in
      rpl_parallel::workers_idle() a gtid domain hash entry
      already inserted whose mutex had not done
      mysql_mutex_init().
      
      Fixed with swapping the mutex init and the its entry's stack insertion.
      
      Tested with a generous number of `mtr --repeat` of a few of the reported
      to fail tests, incl rpl.parallel_backup.
      e22a57da
    • Sergei Petrunia's avatar
      MDEV-31121: ANALYZE statement produces 0 for all timings in embedded server · a72b2c3f
      Sergei Petrunia authored
      Timers require my_timer_init() call.
      It was made only in mysqld_main(). Call it also from init_embedded_server().
      a72b2c3f
    • Marko Mäkelä's avatar
      MDEV-31124 Innodb_data_written miscounts doublewrites · 50f3b7d1
      Marko Mäkelä authored
      When commit a5a2ef07
      implemented asynchronous doublewrite, the writes via
      the doublewrite buffer started to be counted incorrectly,
      without multiplying them by innodb_page_size.
      
      srv_export_innodb_status(): Correctly count the
      Innodb_data_written.
      
      buf_dblwr_t: Remove submitted(), because it is close to written()
      and only Innodb_data_written was interested in it. According to
      its name, it should count completed and not submitted writes.
      
      Tested by: Axel Schwenke
      50f3b7d1
  8. 24 Apr, 2023 3 commits
    • Brandon Nesterenko's avatar
      MDEV-31038: Parallel Replication Breaks if XA PREPARE Fails Updating Slave GTID State · 31f09e36
      Brandon Nesterenko authored
      If a replica failed to update the GTID slave state when committing
      an XA PREPARE, the replica would retry the transaction and get an
      out-of-order GTID error. This is because the commit phase of an XA
      PREPARE is bifurcated. That is, first, the prepare is handled by the
      relevant storage engines. Then second, the GTID slave state is
      updated as a separate autocommit transaction. If the second phase
      fails, and the transaction is retried, then the same transaction is
      attempted to be committed again, resulting in a GTID out-of-order
      error.
      
      This patch fixes this error by immediately stopping the slave and
      reporting the appropriate error. That is, there was logic to bypass
      the error when updating the GTID slave state table if the underlying
      error is allowed for retry on a parallel slave. This patch adds a
      parameter to disallow the error bypass, thereby forcing the error
      state to still happen.
      
      Reviewed By
      ============
      Andrei Elkin <andrei.elkin@mariadb.com>
      31f09e36
    • Brandon Nesterenko's avatar
      MDEV-30430: Enabling system versioning on tables without primary key breaks replication · 29fb0410
      Brandon Nesterenko authored
      When replicating MDL events for a table that uses system versioning
      without primary keys, ensure that for data sets with duplicate
      records, the updates to these records with duplicates are enacted on
      the correct row. That is, there was a bug (reported in MDEV-30430)
      such that the function to find the row to update would stop after
      finding the first matching record. However, in the absence of
      primary keys, the version of the record is needed to compare the row
      to ensure we are updating the correct one.
      
      The fix, therefore, updates the record comparison functionality to
      use system version columns when there are no primary keys on the
      table.
      
      Reviewed By:
      ============
      Andrei Elkin <andrei.elkin@mariadb.com>
      29fb0410
    • Brandon Nesterenko's avatar
      MDEV-28798: Cosmetic Changes Only · 4ec3dca3
      Brandon Nesterenko authored
      Removed trailing whitespaces
      4ec3dca3