1. 22 Feb, 2021 2 commits
  2. 18 Feb, 2021 4 commits
  3. 17 Feb, 2021 1 commit
  4. 16 Feb, 2021 1 commit
  5. 14 Feb, 2021 5 commits
    • Sergei Golubchik's avatar
      updating @@wsrep_cluster_address deadlocks · 26965387
      Sergei Golubchik authored
      wsrep_cluster_address_update() causes LOCK_wsrep_slave_threads
      to be locked under LOCK_wsrep_cluster_config, while normally
      the order should be the opposite.
      
      Fix: don't protect @@wsrep_cluster_address value with the
      LOCK_wsrep_cluster_config, LOCK_global_system_variables is enough.
      
      Only protect wsrep reinitialization with the LOCK_wsrep_cluster_config.
      And make it use a local copy of the global @@wsrep_cluster_address.
      
      Also, introduce a helper function that checks whether
      wsrep_cluster_address is set and also asserts that it can be safely
      read by the caller.
      26965387
    • Monty's avatar
      d0defd1e
    • Monty's avatar
      MDEV-23843 Assertions in Diagnostics_area upon table operations under FTWRL · af31e2c5
      Monty authored
      2 different problems:
      - MYSQL_BIN_LOG::write() did not check if mdl_context.acquire_lock() failed
      - Sql_cmd_optimize_table::execute() and Sql_cmd_repair_table::execute()
        called write_bin_log(), which could fail if sql_admin() had already
        called my_eof()
      
      Fixed by adding check for aquire_lock() return status and protect
      write_bin_log() in the above two functions with set_overwrite_status().
      af31e2c5
    • Monty's avatar
      Remove extra (not needed) error from multi-table-update for killed query · 3cd32a9b
      Monty authored
      If a multi-update query was killed because of timeout or a kill statement,
      there was a chance the query returned the error "An error occurred in
      multi-table update" instead of the right error, like
      "Query execution was interrupted".
      3cd32a9b
    • Vlad Lesin's avatar
      MDEV-24792 Assertion `!newest_lsn || fil_page_get_type(page)' failed upon... · 23833dce
      Vlad Lesin authored
      MDEV-24792 Assertion `!newest_lsn || fil_page_get_type(page)' failed upon MariaBackup prepare in buf_flush_init_for_writing with innodb_log_optimize_ddl=off
      
      fsp_free_page() writes MLOG_INIT_FREE_PAGE, but does not update page
      type. But fil_crypt_rotate_page() checks the type to understand if the
      page is freshly initialized, and writes dummy record(updates space id)
      to force rotation during recovery. This dummy record causes assertion
      crash when the page is flushed after recovery, as it's supposed
      that pages LSN is 0 for freshly initialized pages.
      
      The bug is similiar to MDEV-24695, the difference is that in 10.5 the
      assertion crashes during log record applying, but in 10.4 it crashes
      during page flushing.
      
      The fix could be in marking page as freed and not writing dummy record
      during keys rotation procedure for such marked pages. But
      bpage->file_page_was_freed is not consistent enough for release builds in
      10.4, and the issue is fixed in 10.5 and does not exist in 10.[23] as
      MLOG_INIT_FREE_PAGE was introduced since 10.4.
      
      So the better solution is just to relax the assertion and implement some
      additional property for freshly allocated pages, and check this property
      during pages flushing.
      
      The test is copied from MDEV-24695, the only change is in forcing pages
      flushing after each server start to cause crash in non-fixed code.
      
      There is no need to merge it to 10.5+, as the bug is already fixed by
      MDEV-24695.
      23833dce
  6. 13 Feb, 2021 1 commit
  7. 12 Feb, 2021 7 commits
    • Sergei Golubchik's avatar
      fix a 3-way deadlock in galera_sr.galera-features#56 · b91e77cf
      Sergei Golubchik authored
      rarely (try --repeat 1000), the following happens:
      
      * from wsrep_bf_abort (when a thread is being killed), wsrep-lib
      starts streaming_rollback that wants to
      convert_streaming_client_to_applier. wsrep_create_streaming_applier
      creates a new THD(). All while the other THD is being killed,
      so under LOCK_thd_kill and LOCK_thd_data. In particular, THD::init()
      takes LOCK_global_system_variables under LOCK_thd_kill.
      
      * updating @@wsrep_slave_threads takes LOCK_global_system_variables
      and LOCK_wsrep_cluster_config (in that order) and invokes
      wsrep_slave_threads_update() that takes LOCK_wsrep_slave_threads
      
      * wsrep_replication_process() takes LOCK_wsrep_slave_threads and
      invokes wsrep_close_applier(), that does thd->set_killed() which
      takes LOCK_thd_kill.
      
      et voilà.
      
      As a fix I copied a workaround from wsrep_cluster_address_update()
      to wsrep_slave_threads_update(). It seems to be safe: without mutexes
      a race condition is possible and a concurrent SET might change
      wsrep_slave_threads, but wsrep_slave_threads_update() always verifies
      if there's a need to do something, so it will not run twice in this case,
      it'll be a no-op.
      b91e77cf
    • Sergei Golubchik's avatar
      remove find_thread_with_thd_data_lock_callback · 259b9452
      Sergei Golubchik authored
      let the caller take the lock if needed
      259b9452
    • Sergei Golubchik's avatar
      MDEV-23328 Server hang due to Galera lock conflict resolution · eac8341d
      Sergei Golubchik authored
      adaptation of 29bbcac0 for 10.4
      eac8341d
    • Sergei Golubchik's avatar
      don't take mutexes conditionally · 9703cffa
      Sergei Golubchik authored
      9703cffa
    • Sergei Golubchik's avatar
      cleanup: THD::abort_current_cond_wait() · 259a1902
      Sergei Golubchik authored
      * reuse the loop in THD::abort_current_cond_wait, don't duplicate it
      * find_thread_by_id should return whatever it has found, it's the
        caller's task not to kill COM_DAEMON (if the caller's a killer)
      
      and other minor changes
      259a1902
    • Elena Stepanova's avatar
      List of unstable tests for 10.4.18 release · cbbcc8fa
      Elena Stepanova authored
      Test code modifications and new failures from buildbot registered
      only for the main suite. The rest was updated partially,
      based on the status of existing JIRA items
      cbbcc8fa
    • Sergei Golubchik's avatar
      Merge branch 'bb-10.3-release' into bb-10.4-release · 00a313ec
      Sergei Golubchik authored
      Note, the fix for "MDEV-23328 Server hang due to Galera lock conflict resolution"
      was null-merged. 10.4 version of the fix is coming up separately
      00a313ec
  8. 07 Feb, 2021 1 commit
    • Sergei Golubchik's avatar
      MDEV-24274 ALTER TABLE with CHECK CONSTRAINTS gives "Out of Memory" error · ef5adf52
      Sergei Golubchik authored
      partially revert 76063c2a. Item::clone() is not an all-purpose
      Item copying machine, it was specifically created for pushdown
      of predicates into derived tables and views and it does not
      copy everything. In particular, it does not copy Item_func_regex.
      
      Fix the bug differently by preserving the old constraint name.
      But keep setting automatic_name=true to have it regenerated
      for cases like ALTER TABLE ... ADD CONSTRAINT.
      ef5adf52
  9. 06 Feb, 2021 1 commit
  10. 05 Feb, 2021 6 commits
  11. 02 Feb, 2021 5 commits
  12. 01 Feb, 2021 6 commits