1. 02 Aug, 2022 1 commit
  2. 01 Aug, 2022 5 commits
    • Marko Mäkelä's avatar
      MDEV-28974: mariadb-backup --prepare fails · 212994f7
      Marko Mäkelä authored
      fil_name_process(): Upon processing a new file name for FILE_RENAME, rename
      the tablespace in deferred_spaces.
      
      recv_sys_t::parse(): Rearrange some code to slightly improve the locality
      of reference. Invoke fil_name_process() with FILE_MODIFY, FILE_DELETE
      or the new case FILE_RENAME, for the new file name of the file.
      
      This should be a regression due to
      commit 86dc7b4d (MDEV-24626)
      and it might also affect the crash recovery of DDL operations.
      212994f7
    • Marko Mäkelä's avatar
      MDEV-13542 fixup: Improve page reorganize · 34cdc006
      Marko Mäkelä authored
      btr_page_reorganize_low(): Restore mtr->set_log_mode() before returning.
      
      innobase_instant_try(): Do not invoke rec_get_offsets() if
      btr_cur_pessimistic_update() failed. The cursor position may be
      invalid.
      34cdc006
    • Norio Akagi's avatar
      MDEV-28315 Fix ASAN stack-buffer-overflow in String::copy_aligned · 84d26f98
      Norio Akagi authored
      Starting since this commit 36cdd5c3
      there is an ASAN stack-buffer-overflow error because we append a NULL
      terminator beyond the length of memory allocated.
      
      Reviewed by: Monty and Nayuta Yanagisawa
      84d26f98
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-28400 Leak in trx_mod_time_t::start_bulk_insert() · 3330f8d1
      Thirunarayanan Balathandayuthapani authored
      - Change partition does undo logging of all rows unnecessarily and
      it invokes bulk insert during DDL. Better to avoid the logging of undo
      records during copy of the parititon.
      3330f8d1
    • Marko Mäkelä's avatar
      MDEV-21098: Assertion failure in rec_get_offsets_func() · 63478e72
      Marko Mäkelä authored
      The function rec_get_offsets_func() used to hit ut_error
      due to an invalid rec_get_status() value of a
      ROW_FORMAT!=REDUNDANT record. This fix is twofold:
      We will not only avoid a crash on corruption in this case,
      but we will also make more effort to validate each record
      every time we are iterating over index page records.
      
      rec_get_offsets_func(): Do not crash on a corrupted record.
      
      page_rec_get_nth(): Return nullptr on error.
      
      page_dir_slot_get_rec_validate(): Like page_dir_slot_get_rec(),
      but validate the pointer and return nullptr on error.
      
      page_cur_search_with_match(), page_cur_search_with_match_bytes(),
      page_dir_split_slot(), page_cur_move_to_next():
      Indicate failure in a return value.
      
      page_cur_search(): Replaced with page_cur_search_with_match().
      
      rec_get_next_ptr_const(), rec_get_next_ptr(): Replaced with
      page_rec_get_next_low().
      
      TODO: rtr_page_split_initialize_nodes(), rtr_update_mbr_field(),
      and possibly other SPATIAL INDEX functions fail to properly handle
      errors.
      
      Reviewed by: Thirunarayanan Balathandayuthapani
      Tested by: Matthias Leich
      Performance tested by: Axel Schwenke
      63478e72
  3. 29 Jul, 2022 1 commit
  4. 28 Jul, 2022 3 commits
  5. 27 Jul, 2022 8 commits
    • Marko Mäkelä's avatar
      Merge 10.6 into 10.7 · 742e1c72
      Marko Mäkelä authored
      742e1c72
    • Marko Mäkelä's avatar
      Merge 10.5 into 10.6 · 30914389
      Marko Mäkelä authored
      30914389
    • Marko Mäkelä's avatar
      Merge 10.4 into 10.5 · 098c0f26
      Marko Mäkelä authored
      098c0f26
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4 · e5c4f4e5
      Marko Mäkelä authored
      e5c4f4e5
    • Marko Mäkelä's avatar
      MDEV-28495 InnoDB corruption due to lack of file locking · 0ee1082b
      Marko Mäkelä authored
      Starting with commit da094188 (MDEV-24393),
      MariaDB will no longer acquire advisory file locks on InnoDB data
      files by default, because it would create a large number of
      entries in Linux /proc/locks.
      
      The motivation for acquiring the file locks is to prevent accidental
      concurrent startup of multiple server processes on the same data files.
      Such mistake still turns out to be relatively common, based on
      corruption bug reports from the community.
      
      To prevent corruption due to concurrent startup attempts, the
      Aria storage engine would unconditionally acquire an advisory lock
      on one of its log files.
      
      Solution: InnoDB will always lock its system tablespace files.
      (Ever since commit 685d958e
      the InnoDB log file will not necessarily be open while the
      server is running, because it can be accessed via memory-mapped I/O.)
      
      If more protection is desired, then the option --external-locking
      can be used.
      
      The mandatory advisory lock also fixes intermittent failures of
      some crash recovery tests. It turns out that when the mtr test harness
      kills and restarts the server, it will not actually ensure that the
      old process has terminated before starting the new one.
      0ee1082b
    • Oleksandr Byelkin's avatar
      Merge branch '10.3' into 10.4 · 3bb36e94
      Oleksandr Byelkin authored
      3bb36e94
    • Marko Mäkelä's avatar
      MDEV-28950: Add a test case · 772e3f61
      Marko Mäkelä authored
      After reverting commit commit 39f45f6f
      all combinations of this test would crash the server.
      772e3f61
    • Igor Babaev's avatar
      MDEV-29139 Crash when using ANY predicand with redundant subquery in GROUP BY clause · bd935a41
      Igor Babaev authored
      This bug could cause a crash of the server when executing queries containing
      ANY/ALL predicands with redundant subqueries in GROUP BY clauses.
      These subqueries are eliminated by remove_redundant_subquery_clause()
      together with elimination of GROUP BY list containing these subqueries.
      However the references to the elements of the GROUP BY remained in the
      JOIN::all_fields list of the right operand of of the ALL/ANY predicand.
      Later these references confused make_aggr_tables_info() when forming
      proper execution structures after ALL/ANY predicands had been replaced
      with expressions containing MIN/MAX set functions.
      The patch just removes these references from JOIN::all_fields list used
      by the subquery of the ALL/ANY predicand when its GROUP BY clause is
      eliminated.
      
      Approved by Oleksandr Byelkin <sanja@mariadb.com>
      bd935a41
  6. 26 Jul, 2022 19 commits
  7. 25 Jul, 2022 3 commits
    • Brandon Nesterenko's avatar
      MDEV-21087/MDEV-21433: ER_SLAVE_INCIDENT arrives at slave without failure specifics · 555c12a5
      Brandon Nesterenko authored
      Problem:
      =======
      
      This patch addresses two issues:
      
       1. An incident event can be incorrectly reported for transactions
      which are rolled back successfully. That is, an incident event
      should only be generated for failed “non-transactional transactions”
      (i.e., those which modify non-transactional tables) because they
      cannot be rolled back.
      
       2. When the mariadb slave (error) stops at receiving the incident
      event there's no description of what led to it. Neither in the event
      nor in the master's error log.
      
      Solution:
      ========
      
      Before reporting an incident event for a transaction, first validate
      that it is “non-transactional” (i.e. cannot be safely rolled back).
      To determine if a transaction is non-transactional,
        lex->stmt_accessed_table(LEX::STMT_WRITES_NON_TRANS_TABLE)
      is used because it is set previously in
      THD::decide_logging_format().
      
      Additionally, when an incident event is written, write an error
      message to the server’s error log to indicate the underlying issue.
      
      Reviewed by:
      ===========
      Andrei Elkin <andrei.elkin@mariadb.com>
      555c12a5
    • Rucha Deodhar's avatar
      This commit is a fixup for MDEV-28762 · 46ff6608
      Rucha Deodhar authored
      46ff6608
    • Marko Mäkelä's avatar
      Fix DBUG_ENTER/return mismatch · f1c8749f
      Marko Mäkelä authored
      Spotted by Thirunarayanan Balathandayuthapani.
      f1c8749f