1. 13 Nov, 2023 1 commit
  2. 11 Nov, 2023 2 commits
  3. 09 Nov, 2023 1 commit
    • Marko Mäkelä's avatar
      MDEV-32737 innodb.log_file_name fails on Assertion `after_apply ||... · e0c65784
      Marko Mäkelä authored
      MDEV-32737 innodb.log_file_name fails on Assertion `after_apply || !(blocks).end in recv_sys_t::clear
      
      recv_group_scan_log_recs(): Set the debug flag recv_sys.after_apply
      after actually completing the log scan.
      
      In the test, suppress some errors that may be reported when
      the crash recovery of RENAME TABLE t1 TO t2 is preceded by
      copying t2.ibd to t1.ibd.
      e0c65784
  4. 04 Nov, 2023 1 commit
  5. 03 Nov, 2023 1 commit
    • Kristian Nielsen's avatar
      MDEV-32672: Don't hold LOCK_thd_data over commit_ordered · 3c1f324a
      Kristian Nielsen authored
      Partial revert of this commit:
      
        commit 6b685ea7
        Author: Sergei Golubchik <serg@mariadb.org>
        Date:   Wed Sep 28 18:55:15 2022 +0200
      
      Don't hold LOCK_thd_data over run_commit_ordered(). Holding the mutex
      is unnecessary and will deadlock if any code in a commit_ordered
      handlerton call tries to take the mutex to change THD local data.
      
      Instead, set the current_thd for the duration of the call to keep
      asserts happy around LOCK_thd_data.
      Signed-off-by: default avatarKristian Nielsen <knielsen@knielsen-hq.org>
      3c1f324a
  6. 30 Oct, 2023 3 commits
    • Anel Husakovic's avatar
      MDEV-32462: mysql_upgrade -s still checks for non system tables · b06ac9a8
      Anel Husakovic authored
      - Rename files as requested by Vicentiu:
      ```
       mysql_json_mysql_upgrade.test                    -> mysql_upgrade_mysql_json.test
       mysql_json_mysql_upgrade_with_plugin_loaded.test -> mysql_upgrade_mysql_json_with_plugin_loaded.test
       mysql_json_mysql_upgrade_system_tables.test      -> mysql_upgrade_mysql_json_system_tables.test
      ```
      - Related to PR #2790
      - Reviewer: <daniel@mariadb.org>, <vicentiu@mariadb.org>
      b06ac9a8
    • Anel Husakovic's avatar
      MDEV-32462: mysql_upgrade -s still checks for non system tables · 4eb8aeee
      Anel Husakovic authored
      - Prevent opening of any user tables in case `upgrade-system-table`
      option is used.
      - Still there may be uninstalled data types in `mysql` system table so
      allow it to perform.
      - Closes PR #2790
      - Reviewer: <daniel@mariadb.org>, <vicentiu@mariadb.org>
      4eb8aeee
    • Anel Husakovic's avatar
      MDEV-26875: Wrong user in SET DEFAULT ROLE error · ee773753
      Anel Husakovic authored
      - Regression introduced in 957cb7b7
      - Patch 4abb8216 change `mysql.user` to `mysql.global_priv` for
      `add_anonymous.inc`, update `delete_anonymous.inc`.
      - Added test case with `--skip-name-resolve`
      - Add test case with anonymous user
        - Disable this test for windows, assignes current user to anonymous
        user.
      
      Reviewed by: <serg@mariadb.com>
      ee773753
  7. 23 Oct, 2023 1 commit
    • Marko Mäkelä's avatar
      MDEV-32552 Write-ahead logging is broken for freed pages · b5e43a1d
      Marko Mäkelä authored
      buf_page_free(): Flag the freed page as modified if it is found in
      the buffer pool.
      
      buf_flush_page(): If the page has been freed, ensure that the log
      for it has been durably written, before removing the page
      from buf_pool.flush_list.
      
      FindBlockX: Find also MTR_MEMO_PAGE_X_MODIFY in order to avoid an
      occasional failure of innodb.innodb_defrag_concurrent, which involves
      freeing and reallocating pages in the same mini-transaction.
      
      This fixes a regression that was introduced in
      commit a35b4ae8 (MDEV-15528).
      
      This logic was tested by commenting out the $shutdown_timeout line
      from a test and running the following:
      
      ./mtr --rr innodb.scrub
      rr replay var/log/mysqld.1.rr/mariadbd-0
      
      A breakpoint in the modified buf_flush_page() was hit, and the
      FIL_PAGE_LSN of that page had been last modified during the
      mtr_t::commit() of a mini-transaction where buf_page_free()
      had been executed on that page.
      b5e43a1d
  8. 19 Oct, 2023 3 commits
  9. 18 Oct, 2023 1 commit
    • Marko Mäkelä's avatar
      MDEV-32511: Race condition between checkpoint and page write · cfd17881
      Marko Mäkelä authored
      fil_aio_callback(): Invoke fil_node_t::complete_write() before
      releasing any page latch, so that in case a log checkpoint is
      executed roughly concurrently with the first write into a file
      since the previous checkpoint, we will not miss a fdatasync()
      or fsync() call to make the write durable.
      cfd17881
  10. 17 Oct, 2023 1 commit
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-31851 After crash recovery, undo tablespace fails to open · 3da5d047
      Thirunarayanan Balathandayuthapani authored
      Problem:
      ========
      - InnoDB fails to open undo tablespace when page0 is corrupted
      and fails to throw error.
      
      Solution:
      =========
      - InnoDB throws DB_CORRUPTION error when InnoDB encounters
      page0 corruption of undo tablespace.
      
      - InnoDB restores the page0 of undo tablespace from
      doublewrite buffer if it encounters page corruption
      
      - Moved Datafile::restore_from_doublewrite() to
      recv_dblwr_t::restore_first_page(). So that undo
      tablespace and system tablespace can use this function
      instead of duplicating the code
      
      srv_undo_tablespace_open(): Returns 0 if file doesn't exist
      or ULINT_UNDEFINED if page0 is corrupted.
      3da5d047
  11. 14 Oct, 2023 1 commit
  12. 13 Oct, 2023 2 commits
  13. 12 Oct, 2023 3 commits
  14. 08 Oct, 2023 5 commits
    • Monty's avatar
      Fixed that log_slow.test works with view_protocol · b04af648
      Monty authored
      Part of the test did not work with view_protocol as the query written
      to the slow_log table is changed because of view_protocol.
      b04af648
    • Monty's avatar
      Fixed compiler warnings in connect/odbconn.cpp · 1dd6d9a0
      Monty authored
      1dd6d9a0
    • Monty's avatar
      MDEV-22243 type_test.type_test_double fails with 'NUMERIC_SCALE NULL' · 9d19b652
      Monty authored
      There where several reasons why the test failed:
      - Constructors for Field_double and Field_float changed an argument
        to the constructor instead of a the correct class variable.
      - gcc 7.5.0 produced wrong code when inlining Field_double constructor
        into Field_test_double constructor.
      
      Fixed by changing the correct class variable and make the constructors
      not inline to go around the gcc bug.
      9d19b652
    • Monty's avatar
      MDEV-31349 test maria.maria-purge failed on 'aria_log.00000002 not found' · 185591c1
      Monty authored
      The bug was in the test case.
      The problem was that maria_empty_logs.inc deleted aria log files before
      the server was properly shutdown.
      Fixed by waiting for pid file to disappear before starting to delete log
      files.
      
      Other things:
      - Fixed that translog_purge_at_flush() will not stop deleting files even
        if one file could not be deleted.
      185591c1
    • Monty's avatar
      Fixed randomly failing test main.order_by_optimizer_innodb · 424a7a26
      Monty authored
      The problem was that sometimes InnoDB returned sligtly wrong record count
      for table, which causes the optimizer to disregard the result from
      the range optimizer. The end result was that the optimizer choosed a
      ref access instead of a range access which caused errors in buildbot.
      
      Fixed by adding more rows to the table to ensure that table scan is
      more costly than range scan of the given interval.
      424a7a26
  15. 06 Oct, 2023 2 commits
  16. 25 Sep, 2023 2 commits
  17. 24 Sep, 2023 1 commit
  18. 22 Sep, 2023 3 commits
  19. 21 Sep, 2023 1 commit
    • Vlad Lesin's avatar
      MDEV-30165 X-lock on supremum for prepared transaction for RR · 95730372
      Vlad Lesin authored
      trx_t::set_skip_lock_inheritance() must be invoked at the very beginning
      of lock_release_on_prepare(). Currently  trx_t::set_skip_lock_inheritance()
      is invoked at the end of lock_release_on_prepare() when lock_sys and trx
      are released, and there can be a case when locks on prepare are released,
      but "not inherit gap locks" bit has not yet been set, and page split
      inherits lock to supremum.
      
      Also reset supremum bit and rebuild waiting queue when XA is prepared.
      
      Reviewed by: Marko Mäkelä
      95730372
  20. 20 Sep, 2023 3 commits
  21. 19 Sep, 2023 2 commits
    • Daniel Black's avatar
      MDEV-27757 Database upgrade fails from 5.1: slow_log table · bf5c2512
      Daniel Black authored
      The table structure from MySQL-5.1.14 is:
      
      CREATE TABLE `slow_log` (
        `start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
        `user_host` mediumtext NOT NULL,
        `query_time` time NOT NULL,
        `lock_time` time NOT NULL,
        `rows_sent` int(11) NOT NULL,
        `rows_examined` int(11) NOT NULL,
        `db` varchar(512) DEFAULT NULL,
        `last_insert_id` int(11) DEFAULT NULL,
        `insert_id` int(11) DEFAULT NULL,
        `server_id` int(11) DEFAULT NULL,
        `sql_text` mediumtext NOT NULL
      ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
      
      Even as far back as MySQL-5.5.40 this table could be created as NULLs
      where not permitted in the CSV table time, but it seems they
      where allowed sometime.
      
      As the first part of mariadb-upgrade adds the column thread_id without
      correcting the 'NULL'able status of existing columns it fails.
      
      We reorder the sql statements in the ugprade as follows:
      
      ALTER TABLE slow_log MODIFY {columns} {new types} NOT NULL,....
      
      As thread_id doesn't exist in the above statement it was removed from
      the first ALTER TABLE statement to prevent failure.
      
      Previous ALTER TABLE slow_log where moved later appending thread_id
      and rows_affected, and also enforces the type of thread_id if it
      was incorrectly like the now first ALTER STATEMENT slow_log used
      to do.
      bf5c2512
    • Daniel Black's avatar