1. 11 Sep, 2024 3 commits
  2. 10 Sep, 2024 23 commits
  3. 09 Sep, 2024 5 commits
    • Daniel Black's avatar
      MDEV-34825 FreeBSD fails to build under clang natively (postfix) · 24d67aaf
      Daniel Black authored
      10.5 added contents of cmake/os/FreeBSD.cmake in c991efd9.
      in the merge to 10.11, d002b1f5 removed this file.
      
      In the past FreeBSD.cmake was removed in 5369df74
      in the 10.11 branch as no remaining code was needed. The combination
      of this and the merge lead to the the file being removed. My assumption is
      this was a non-stable branch at the time.
      
      The purpose of this patch is clang doesn't have /usr/local/lib in
      the path. As such there are various depedency linkages that will fail.
      
      For example pcre and libfmt.
      24d67aaf
    • Daniel Black's avatar
      MDEV-33894: Resurrect innodb_log_write_ahead_size (postfix) · ccb4bc77
      Daniel Black authored
      os_file_log_maybe_unbuffered is now Linux only.
      
      Aso the stat st structure only used in linux.
      
      This avoids unused function/structure errors on FreeBSD.
      ccb4bc77
    • Marko Mäkelä's avatar
      MDEV-34483 Backup may copy unnecessarily much log · 852d42e9
      Marko Mäkelä authored
      In mariadb-backup --backup there are multiple mechanisms for ensuring that
      a sufficient amount of the InnoDB write-ahead log (ib_logfile0) is being
      copied at the end of the backup. The backup needs to include the latest
      committed transaction. While further transaction commits are blocked by
      BACKUP STAGE BLOCK_COMMIT, ongoing transactions may modify the database
      contents and write log records. We were unnecessarily copying such log,
      which would also cause further effort of rolling back incomplete
      transactions after the backup is restored.
      
      backup_wait_for_lsn(): Declare as static, and refactor some code
      to separate functions backup_wait_for_lsn_low() and
      backup_wait_timeout().
      
      backup_wait_for_commit_lsn(): A new function to determine the current
      LSN (within BACKUP STAGE BLOCK_COMMIT) and to wait for the log to be
      copied until that. Invoked by BackupStages::stage_block_commit().
      
      xtrabackup_backup_func(): Remove a condition that had already been
      checked by a caller of backup_wait_timeout().
      
      server_lsn_after_lock: Declare as a local variable in
      BackupStages::stage_block_ddl().
      
      log_copying_thread(), io_watching_thread(): Use metadata_last_lsn
      instead of metadata_to_lsn as the stop condition.
      
      BackupStages::stage_block_commit(): Ensure that the log tables
      (in particular, mysql.general_log) will have been copied before
      the BACKUP STAGE BLOCK_COMMIT is being followed by any further
      SQL statements.
      
      Reviewed by: Debarun Banerjee
      Tested by: Matthias Leich
      852d42e9
    • Marko Mäkelä's avatar
      Merge 10.5 into 10.6 · b7b2d2bd
      Marko Mäkelä authored
      b7b2d2bd
    • Yuchen Pei's avatar
      Merge branch '10.6' into 10.11 · d002b1f5
      Yuchen Pei authored
      d002b1f5
  4. 08 Sep, 2024 1 commit
    • Sergei Petrunia's avatar
      MDEV-34894: Poor query plan, because range estimates are not reused for ref(const) · c630e23a
      Sergei Petrunia authored
      (Variant 4, with @@optimizer_adjust_secondary_key_costs, reuse in two
      places, and conditions are replaced with equivalent simpler forms in two more)
      
      In best_access_path(), ReuseRangeEstimateForRef-3,  the check
      for whether
       "all used key_part_i used key_part_i=const"
      was incorrect: it may produced a "NO" answer for cases when we
      had:
       key_part1= const // some key parts are usable
       key_part2= value_not_in_join_prefix  //present but unusable
       key_part3= non_const_value // unusable due to gap in key parts.
      
      This caused the optimizer to fail to apply ReuseRangeEstimateForRef
      heuristics. The consequence is poor query plan choice when the index
      in question has very skewed data distribution.
      
      The fix is enabled if its @@optimizer_adjust_secondary_key_costs flag
      is set.
      c630e23a
  5. 07 Sep, 2024 2 commits
  6. 06 Sep, 2024 6 commits
    • Marko Mäkelä's avatar
      Merge 10.6 into 10.11 · f9f92b48
      Marko Mäkelä authored
      f9f92b48
    • Monty's avatar
      Removed ctrl-l from the source · f0b2e765
      Monty authored
      f0b2e765
    • Marko Mäkelä's avatar
      Merge 10.6 into 10.11 · 2da4839b
      Marko Mäkelä authored
      2da4839b
    • Marko Mäkelä's avatar
      f06060f5
    • Marko Mäkelä's avatar
      MDEV-34823 Invalid arguments in ib_push_warning() · 024a18db
      Marko Mäkelä authored
      In the bug report MDEV-32817 it occurred that the function
      row_mysql_get_table_status() is outputting a fil_space_t*
      as if it were a numeric tablespace identifier.
      
      ib_push_warning(): Remove. Let us invoke push_warning_printf() directly.
      
      innodb_decryption_failed(): Report a decryption failure and set the
      dict_table_t::file_unreadable flag. This code was being duplicated in
      very many places. We return the constant value DB_DECRYPTION_FAILED
      in order to avoid code duplication in the callers and to allow tail calls.
      
      innodb_fk_error(): Report a FOREIGN KEY error.
      
      dict_foreign_def_get(), dict_foreign_def_get_fields(): Remove.
      This code was being used in dict_create_add_foreign_to_dictionary()
      in an apparently uncovered code path. That ib_push_warning() call
      would pass the integer i+1 instead of a pointer to NUL terminated
      string ("%s"), and therefore the call should have resulted in a crash.
      
      dict_print_info_on_foreign_key_in_create_format(),
      innobase_quote_identifier(): Add const qualifiers.
      
      row_mysql_get_table_error(): Replaces row_mysql_get_table_status().
      Display no message on DB_CORRUPTION; it should be properly reported at
      the SQL layer anyway.
      024a18db
    • Yuchen Pei's avatar
      Merge branch '10.5' into 10.6 · 60b93cdd
      Yuchen Pei authored
      60b93cdd