1. 16 Jun, 2024 1 commit
  2. 14 Jun, 2024 2 commits
    • Brandon Nesterenko's avatar
      Fix slave_timestamp to match with parallel slave logic · 5cb9e56a
      Brandon Nesterenko authored
      In inc_group_relay_log_pos, slave_timestamp is set to
      rgi->last_master_timestamp, but for the serial slave,
      rgi->last_master_timestamp is never set (as it was done
      in the parallel-specific code), thereby never updating
      slave_timestamp in this part. So to fix this, when the
      serial slave reads a new group event, it updates
      serial_rgi->last_master_timestamp so slave_timestamp
      can be updated at transaction commit.
      
      Additionally, the update to slave_timestamp in
      Xid_apply_log_event::do_apply_event() was removed, as
      it is not safe for the parallel slave, and is
      redundant with the update in inc_group_relay_log_pos.
      5cb9e56a
    • Brandon Nesterenko's avatar
      Test updates to show Query_log event doesn't update slave_timestamp · 50f0dac4
      Brandon Nesterenko authored
      Note the rollback case was removed as it never actually
      binlogged the transaction in the first place, as it was
      empty. It was removed rather than fixed to actually log
      the ROLLBACK because there is a bug where the slave
      won't re-binlog the transaction, leading to a broken
      sync_with_master in the tests.
      50f0dac4
  3. 13 Jun, 2024 2 commits
    • Monty's avatar
      fixup! 7e39be21 · a026296a
      Monty authored
      a026296a
    • Monty's avatar
      Disable new connections in case of fatal signal · db2ef20b
      Monty authored
      A user reported that MariaDB server got a signal 6 but still accepted new
      connections and did not crash.  I have not been able to find a way to
      repeat this or find the cause of issue. However to make it easier to
      notice that the server is unstable, I added code to disable new
      connections when the handle_fatal_signal() handler has been called.
      db2ef20b
  4. 23 May, 2024 1 commit
    • Brandon Nesterenko's avatar
      MDEV-33856 Additions · 83014342
      Brandon Nesterenko authored
       * Updated RESET SLAVE to reset Master/Slave_last_event_time
      
       * Updated SHOW ALL SLAVES STATUS to treat Master and Slave NULL
         times separately
      
       * Updated SQL thread's update on first transaction read-in to
         only update Slave_last_event_time on group events
      
       * Added test cases for
         - Ensuring (Master|Slave)_last_event_time is updated at the
           correct place
         - Ensuring the first event read by the SQL thread will update
           Slave_last_event_time
         - A parallel delayed replica updates the new fields
           correctly
      83014342
  5. 22 May, 2024 2 commits
    • Monty's avatar
      MDEV-33856 New definition for Seconds_Behind_Master · 7e39be21
      Monty authored
      This commit adds 3 new status variables to 'show all slaves status':
      
      - Master_last_event_time ; timestamp of the last event read from the
        master by the IO thread.
      - Slave_last_event_time ; Master timestamp of the last event committed
        on the slave.
      - Master_Slave_time_diff: The difference of the above two timestamps.
      
      All the above variables are NULL until the slave has started and the
      slave has read one query event from the master that changes data.
      
      Other things:
      - Xid_log_time is set to time of commit to allow slave that reads the
        binary log to calculate Master_last_event_time and Slave_last_event_time.
        This is needed as there is not 'exec_time' for row events.
      - Fixed that Load_log_event calculates exec_time identically to
        Query_event.
      7e39be21
    • Monty's avatar
      MDEV-33582 Add more warnings to be able to better diagnose network issues · d946a19e
      Monty authored
      Changed the logged messages from errors to warnings
      Also changed 'remain' to 'read_length' in the warning to make it more readable.
      d946a19e
  6. 13 May, 2024 1 commit
    • Dmitry Shulga's avatar
      MDEV-33769: Memory leak found in the test main.rownum run with --ps-protocol... · 5e6c1224
      Dmitry Shulga authored
      MDEV-33769: Memory leak found in the test main.rownum run with --ps-protocol against a server built with the option -DWITH_PROTECT_STATEMENT_MEMROOT
      
      A memory leak happens on the second execution of a query that run in PS mode
      and uses the function ROWNUM().
      
      A memory leak took place on allocation of an instance of the class Item_int
      for storing a limit value that is performed at the function set_limit_for_unit
      indirectly called from JOIN::optimize_inner. Typical trace to the place where
      the memory leak occurred is below:
       JOIN::optimize_inner
        optimize_rownum
         process_direct_rownum_comparison
          set_limit_for_unit
           new (thd->mem_root) Item_int(thd, lim, MAX_BIGINT_WIDTH);
      
      To fix this memory leak, calling of the function optimize_rownum()
      has to be performed only once on first execution and never called
      after that. To control it, the new data member
        first_rownum_optimization
      added into the structure st_select_lex.
      5e6c1224
  7. 10 May, 2024 1 commit
  8. 08 May, 2024 9 commits
  9. 07 May, 2024 8 commits
    • Sergei Petrunia's avatar
      MDEV-28621: group by optimization incorrectly removing subquery where subject buried in a function · 40b3525f
      Sergei Petrunia authored
      Workaround patch: Do not remove GROUP BY clause when it has
      subquer(ies) in it.
      
      remove_redundant_subquery_clauses() removes redundant GROUP BY clause
      from queries in form:
        expr IN (SELECT no_aggregates GROUP BY ...)
        expr {CMP} {ALL|ANY|SOME} (SELECT no_aggregates GROUP BY ...)
      This hits problems when the GROUP BY clause itself has subquer(y/ies).
      
      This patch is just a workaround: it disables removal of GROUP BY clause
      if the clause has one or more subqueries in it.
      
      Tests:
      - subselect_elimination.test has all known crashing cases.
      - subselect4.result, insert_select.result are updated.
      Note that in some cases results of SELECT are changed too (not just
      EXPLAINs). These are caused by non-deterministic SQL: when running a
      query like:
      
        x > ANY( SELECT col1 FROM t1 GROUP BY constant_expression)
      
      without removing the GROUP BY, the executor is free to pick the value
      of t1.col1 from any row in the GROUP BY group (denote it $COL1_VAL).
      Then, it computes x > ANY(SELECT $COL1_VAL).
      
      When running the same query and removing the GROUP BY:
      
         x > ANY( SELECT col1 FROM t1)
      
      the executor will actually check all rows of t1.
      40b3525f
    • Monty's avatar
      MDEV-34055 Assertion '...' failure or corruption errors upon REPAIR on Aria tables · ec6aa9ac
      Monty authored
      The problem was two fold:
      - REPAIR TABLE t1 USE_FRM did not work for transactional
        Aria tables (Table was thought to be repaired, which it was not) which
        caused issues in later usage of the table.
      - When swapping tmp_data file to data file, sort_info files where not
        updated. This caused problems if there was several unique keys and
        there was a duplicate for the second key.
      ec6aa9ac
    • Galina Shalygina's avatar
      MDEV-23878 Wrong result with semi-join and splittable derived table · 4bc1860e
      Galina Shalygina authored
      Due to this bug a wrong result might be expected from queries with
      an IN subquery predicate in the WHERE clause and a derived table in the
      FROM clause to which split optimization could be applied.
      
      The function JOIN::fix_all_splittings_in_plan() used the value of the
      bitmap JOIN::sjm_lookup_tables() such as it had been left after the
      search for the best plan for the select containing the splittable
      derived table. That value could not be guaranteed to be correct. So the
      recalculation of this bitmap is needed to exclude the plans with key
      accesses from SJM lookup tables.
      
      Approved by Igor Babaev <igor@maridb.com>
      4bc1860e
    • Yuchen Pei's avatar
      MDEV-34036 Reset spider_hton_ptr in spider_db_done() · 10a75992
      Yuchen Pei authored
      Otherwise spider_direct_sql may still think the spider plugin is
      available even after spider_db_done() was called.
      10a75992
    • Sergei Golubchik's avatar
      42c99ef0
    • Sergei Golubchik's avatar
      Revert "MDEV-19949 mariabackup option of '--password' or '-p' without... · 421eeb18
      Sergei Golubchik authored
      Revert "MDEV-19949 mariabackup option of '--password' or '-p' without specifying password in commandline"
      
      This reverts commit 91fb8b7f.
      
      Incompatible change, see tests in the next commit
      421eeb18
    • Jan Lindström's avatar
      MDEV-33898 : Galera test failure on galera.MW-369 · 33e4fbf0
      Jan Lindström authored
      Additional changes for the galera_vote_rejoin_ddl test (for 10.5+).
      Signed-off-by: default avatarJulius Goryavsky <julius.goryavsky@mariadb.com>
      33e4fbf0
    • Yuchen Pei's avatar
      MDEV-34098 source start_slave.inc in spider suites · bca366e4
      Yuchen Pei authored
      The spider suite should --source include/start_slave.inc to make sure
      the slave is up before proceeding.
      bca366e4
  10. 06 May, 2024 13 commits