An error occurred fetching the project authors.
  1. 14 Jan, 2022 4 commits
  2. 13 Jan, 2022 1 commit
    • Marko Mäkelä's avatar
      MDEV-27058 fixup: Bogus assertion !block->page.is_io_fixed() · e6a06113
      Marko Mäkelä authored
      buf_page_get_gen(): After recv_sys_t::recover_low() returned,
      the page must not be read-fixed, but it may be write-fixed,
      because the io-fix state is protected by block->page.lock,
      which we are not holding yet.
      
      Also, let us copy the block descriptor state to a local variable
      for examination, so that in case an assertion would fail again,
      we will have the sampled state in the core dump. In a core dump of
      the assertion failure, we had block->page.fix() == buf_page_t::UNFIXED,
      that is, the assertion expression was holding again.
      e6a06113
  3. 12 Jan, 2022 8 commits
  4. 11 Jan, 2022 2 commits
    • Eugene Kosov's avatar
      MDEV-27022 Buffer pool is being flushed during recovery · f443cd11
      Eugene Kosov authored
      The problem was introduced by the removal of buf_pool.flush_rbt
      in commit 46b1f500 (MDEV-23399)
      
      recv_sys_t::apply(): don't write to disc and fsync() the last batch.
      Insead, sort it by oldest_modification for MariaDB server and some
      mariabackup operations.
      
      log_sort_flush_list(): a thread-safe function which sorts buf_pool::flush_list
      f443cd11
    • Sergei Golubchik's avatar
      C/C 3.3 · f8259545
      Sergei Golubchik authored
      f8259545
  5. 10 Jan, 2022 3 commits
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-27640 trx_has_lock_x() gives wrong result if the table has pending table lock · 428b057e
      Thirunarayanan Balathandayuthapani authored
      trx_has_lock_x() fails to find whether the trx has X-lock on the table
      when other transactions are waiting for an X or S lock on the table.
      428b057e
    • Marko Mäkelä's avatar
      Cleanup: Remove unused log_cmdq_key · fcbd3989
      Marko Mäkelä authored
      There was an intention to add a CommandQueue in
      mysql/mysql-server@eca5b0fc17a5bd6d4833d35a0d08c8549dd3b5ec
      but it never appeared in any release (not even MySQL 5.7.3
      where that commit appeared).
      fcbd3989
    • Rucha Deodhar's avatar
      MDEV-23836: Assertion `! is_set() || m_can_overwrite_status' in · 81e00485
      Rucha Deodhar authored
      Diagnostics_area::set_error_status (interrupted ALTER TABLE under LOCK)
      
      Analysis: KILL_QUERY is not ignored when local memory used exceeds maximum
      session memory. Hence the query proceeds, OK is sent and we end up
      reopening tables that are marked for reopen. During this, kill status is
      eventually checked and assertion failure happens during trying to send error
      message because OK has already been sent.
      Fix: Ok is already sent so statement has already executed. It is too
      late to give error. So ignore kill.
      81e00485
  6. 09 Jan, 2022 2 commits
  7. 07 Jan, 2022 1 commit
    • Hugo Wen's avatar
      MDEV-27435: Support extra initialization file for mysql_install_db · a81c75f5
      Hugo Wen authored
      The mysql_install_db script is used to initialize the data directory.
      However, if the user needs to apply some customized init commands (for
      example to change user or password) they have to start the database
      with `--skip-grant-tables` after the install script, and then restart
      the database with normal mode.
      
      To make it easier to include customization in the mysql_install_db
      script, in this commit, a new parameter `extra-file` is added in
      mysql_install_db script to support some extra customized init commands.
      
      With this option we can support applying extra file containing sql for
      mysql_install_db command line at runtime, which reduces the complexity
      of customized initialization process.
      
      This script is only used for install and is not included in the mtr
      bootstrap file.
      
      All new code of the whole pull request, including one or several files
      that are either new files or modified ones, are contributed under the
      BSD-new license. I am contributing on behalf of my employer Amazon Web
      Services, Inc.
      a81c75f5
  8. 05 Jan, 2022 7 commits
  9. 04 Jan, 2022 7 commits
    • Marko Mäkelä's avatar
      Merge 10.7 into 10.8 · b0d632a8
      Marko Mäkelä authored
      b0d632a8
    • Marko Mäkelä's avatar
      Merge 10.6 into 10.7 · ce663ad4
      Marko Mäkelä authored
      ce663ad4
    • Marko Mäkelä's avatar
    • Marko Mäkelä's avatar
      Merge 10.7 into 10.8 · daf4fa52
      Marko Mäkelä authored
      daf4fa52
    • Marko Mäkelä's avatar
      Merge 10.6 into 10.7 · 7dfaded9
      Marko Mäkelä authored
      7dfaded9
    • Marko Mäkelä's avatar
      Merge 10.5 into 10.6 · 3f572676
      Marko Mäkelä authored
      3f572676
    • Marko Mäkelä's avatar
      MDEV-27416 InnoDB hang in buf_flush_wait_flushed(), on log checkpoint · 4c3ad244
      Marko Mäkelä authored
      InnoDB could sometimes hang when triggering a log checkpoint. This is
      due to commit 7b1252c0 (MDEV-24278),
      which introduced an untimed wait to buf_flush_page_cleaner().
      
      The hang was noticed by occasional failures of IMPORT TABLESPACE tests,
      such as innodb.innodb-wl5522, which would (unnecessarily) invoke
      log_make_checkpoint() from row_import_cleanup().
      
      The reason of the hang was that buf_flush_page_cleaner() would enter
      untimed sleep despite buf_flush_sync_lsn being set. The exact failure
      scenario is unclear, because buf_flush_sync_lsn should actually be
      protected by buf_pool.flush_list_mutex. We prevent the hang by
      invoking buf_pool.page_cleaner_set_idle(false) whenever we are
      setting buf_flush_sync_lsn and signaling buf_pool.do_flush_list.
      
      The bulk of these changes was originally developed as a preparation
      for MDEV-26827, to invoke buf_flush_list() from fewer threads,
      and tested on 10.6 by Matthias Leich.
      
      This fix was tested by running 100 repetitions of 100 concurrent instances
      of the test innodb.innodb-wl5522 on a RelWithDebInfo build, using ext4fs
      and innodb_flush_method=O_DIRECT on a SATA SSD with 4096-byte block size.
      During the test, the call to log_make_checkpoint() in row_import_cleanup()
      was present.
      
      buf_flush_list(): Make static.
      
      buf_flush_wait(): Wait for buf_pool.get_oldest_modification()
      to reach a target, by work done in the buf_flush_page_cleaner.
      If buf_flush_sync_lsn is going to be set, we will invoke
      buf_pool.page_cleaner_set_idle(false).
      
      buf_flush_ahead(): If buf_flush_sync_lsn or buf_flush_async_lsn
      is going to be set and the page cleaner woken up, we will invoke
      buf_pool.page_cleaner_set_idle(false).
      
      buf_flush_wait_flushed(): Invoke buf_flush_wait().
      
      buf_flush_sync(): Invoke recv_sys.apply() at the start in case
      crash recovery is active. Invoke buf_flush_wait().
      
      buf_flush_sync_batch(): A lower-level variant of buf_flush_sync()
      that is only called by recv_sys_t::apply().
      
      buf_flush_sync_for_checkpoint(): Do not trigger log apply
      or checkpoint during recovery.
      
      buf_dblwr_t::create(): Only initiate a buffer pool flush, not
      a checkpoint.
      
      row_import_cleanup(): Do not unnecessarily invoke log_make_checkpoint().
      Invoking buf_flush_list_space() before starting to generate redo log
      for the imported tablespace should suffice.
      
      srv_prepare_to_delete_redo_log_file():
      Set recv_sys.recovery_on in order to prevent
      buf_flush_sync_for_checkpoint() from initiating a checkpoint
      while the log is inaccessible. Remove a wait loop that is already
      part of buf_flush_sync().
      Do not invoke fil_names_clear() if the log is being upgraded,
      because the FILE_MODIFY record is specific to the latest format.
      
      create_log_file(): Clear recv_sys.recovery_on only after calling
      log_make_checkpoint(), to prevent buf_flush_page_cleaner from
      invoking a checkpoint.
      
      innodb_shutdown(): Simplify the logic in mariadb-backup --prepare.
      
      os_aio_wait_until_no_pending_writes(): Update the function comment.
      Apart from row_quiesce_table_start() during FLUSH TABLES...FOR EXPORT,
      this is being called by buf_flush_list_space(), which is invoked
      by ALTER TABLE...IMPORT TABLESPACE as well as some encryption operations.
      4c3ad244
  10. 03 Jan, 2022 5 commits
    • Otto Kekäläinen's avatar
      Deb: Adapt custom build steps to be compatible with latest Salsa-CI · eab89f14
      Otto Kekäläinen authored
      Upstream Salsa-CI refactored the build process in
      https://salsa.debian.org/salsa-ci-team/pipeline/-/commit/58880fcef5b742cb9c661121a8c8707bf392b3b5
      
      This broke our custom direct invocation of install-build-deps.sh as the
      Salsa-CI images no longer contain them. Adapt the .build-script
      equivalent to follow new Salsa-CI method so builds work again.
      eab89f14
    • Marko Mäkelä's avatar
      MDEV-27414 Server may hang when innodb_undo_log_truncate=ON · c410f7aa
      Marko Mäkelä authored
      trx_purge_truncate_history(): Avoid a deadlock with
      buf_pool_t::release_freed_page(). Page latches are not supposed
      to be waited for while holding a mutex like buf_pool.mutex or
      buf_pool.flush_list_mutex.
      
      This regression was caused by
      commit aaef2e1d (MDEV-27058).
      Before that, trx_purge_truncate_history() would buffer-fix the block,
      release buf_pool.flush_list_mutex, and then wait for the
      exclusive page latch.
      
      This bug led to occasional failures of the test
      innodb.undo_truncate_recover.
      c410f7aa
    • Andrei's avatar
      MDEV-27039 Trying to lock mutex ... when the mutex was already locked · 30b917d3
      Andrei authored
      The reason of the double lock was an extraneous ha_flush_logs().
      Unlike the upstream it is unnecessary in Mariadb that exploits a binlog
      checkpoint mechanism for not letting PURGE or RESET-MASTER to trouble
      transaction recovery. That is in case should a trx
      be prepared but its binlog file gone, the trx then is committed on disk too.
      Those facts have been always verified by existing tests of
      
        binlog.binlog_{checkpoint,xa_recover}.test.
      
      A regression test for the bug is included though.
      30b917d3
    • Marko Mäkelä's avatar
      Merge 10.4 into 10.5 · c9db50b5
      Marko Mäkelä authored
      c9db50b5
    • Marko Mäkelä's avatar
      Correct some copyright messages · 1df05a08
      Marko Mäkelä authored
      Most of the Facebook contribution
      mysql/mysql-server@72d656acdf082d5ead1cc1be84f2fd68ab6a65a9
      was removed in
      commit 5bea43f5 (MDEV-12353).
      Mainly the configuration parameter innodb_compression_level remains.
      It had been renamed to page_zip_level in
      mysql/mysql-server@5b38f2a712a7077c994c00787b891a7d4ee328df.
      1df05a08