An error occurred fetching the project authors.
  1. 11 Aug, 2020 1 commit
  2. 29 Nov, 2019 1 commit
  3. 04 Nov, 2019 1 commit
    • Marko Mäkelä's avatar
      Fix GCC 9.2.1 -Wstringop-truncation · 5164f8c2
      Marko Mäkelä authored
      dict_table_rename_in_cache(): Use strcpy() instead of strncpy(),
      because they are known to be equivalent in this case (the length
      of old_name was already validated).
      
      mariabackup: Invoke strncpy() with one less than the buffer size,
      and explicitly add NUL as the last byte of the buffer.
      5164f8c2
  4. 19 Sep, 2019 1 commit
  5. 11 May, 2019 1 commit
  6. 02 May, 2019 1 commit
  7. 25 Apr, 2019 1 commit
    • Eugene Kosov's avatar
      MDEV-19231 make DB_SUCCESS equal to 0 · 6c5c1f0b
      Eugene Kosov authored
      It's a micro optimization. On most platforms CPUs has instructions to
      compare with 0 fast. DB_SUCCESS is the most popular outcome of functions
      and this patch optimized code like (err == DB_SUCCESS)
      
      BtrBulk::finish(): bogus assertion fixed
      
      fil_node_t::read_page0(): corrected usage of os_file_read()
      
      que_eval_sql(): bugus assertion removed. Apparently it checked that
      the field was assigned after having been zero-initialized at
      object creation.
      
      It turns out that the return type of os_file_read_func() was changed
      in mysql/mysql-server@98909cefbc37e54efc6452c7e95bccbf64ac9213 (MySQL 5.7)
      from ibool to dberr_t. The reviewer (if there was any) failed to
      point out that because of future merges, it could be a bad idea to
      change the return type of a function without changing the function name.
      
      This change was applied to MariaDB 10.2.2 in
      commit 2e814d47 but the
      MariaDB-specific code was not fully adjusted accordingly,
      e.g. in fil_node_open_file(). Essentially, code like
      !os_file_read(...) became dead code in MariaDB and later
      in Mariabackup 10.2, and we could be dealing with an uninitialized
      buffer after a failed page read.
      6c5c1f0b
  8. 22 Mar, 2019 1 commit
  9. 21 Mar, 2019 1 commit
  10. 06 Mar, 2019 1 commit
    • Marko Mäkelä's avatar
      MDEV-18659: Fix string truncation/overflow in InnoDB and XtraDB · b7612116
      Marko Mäkelä authored
      Fix the warnings issued by GCC 8 -Wstringop-truncation
      and -Wstringop-overflow in InnoDB and XtraDB.
      
      This work is motivated by Jan Lindström. The patch mainly differs
      from his original one as follows:
      
      (1) We remove explicit initialization of stack-allocated string buffers.
      The minimum amount of initialization that is needed is a terminating
      NUL character.
      (2) GCC issues a warning for invoking strncpy(dest, src, sizeof dest)
      because if strlen(src) >= sizeof dest, there would be no terminating
      NUL byte in dest. We avoid this problem by invoking strncpy() with
      a limit that is 1 less than the buffer size, and by always writing
      NUL to the last byte of the buffer.
      (3) We replace strncpy() with memcpy() or strcpy() in those cases
      when the result is functionally equivalent.
      
      Note: fts_fetch_index_words() never deals with len==UNIV_SQL_NULL.
      This was enforced by an assertion that limits the maximum length
      to FTS_MAX_WORD_LEN. Also, the encoding that InnoDB uses for
      the compressed fulltext index is not byte-order agnostic, that is,
      InnoDB data files that use FULLTEXT INDEX are not portable between
      big-endian and little-endian systems.
      b7612116
  11. 19 Feb, 2019 1 commit
  12. 18 Feb, 2019 1 commit
  13. 16 Jan, 2019 1 commit
  14. 15 Jan, 2019 1 commit
  15. 14 Dec, 2018 2 commits
  16. 30 Oct, 2018 1 commit
  17. 21 Sep, 2018 1 commit
  18. 20 Sep, 2018 1 commit
  19. 14 Aug, 2018 1 commit
  20. 09 Aug, 2018 1 commit
    • Sergei Golubchik's avatar
      compiler warning · ba1c05cc
      Sergei Golubchik authored
      warning: suggest a space before ‘;’ or explicit braces around empty body in ‘for’ statement
      ba1c05cc
  21. 03 Aug, 2018 1 commit
  22. 29 Jun, 2018 1 commit
  23. 07 Jun, 2018 2 commits
  24. 12 Apr, 2018 1 commit
    • Vladislav Vaintroub's avatar
      MDEV-15780 : Mariabackup with absolute paths in innodb_data_file_path · 15071226
      Vladislav Vaintroub authored
      System tablespace can be specified with absolute path, if innodb_data_home_dir
      is empty.
      
      This was not handled well  by mariabackup
      
      1. In backup phase, empty innodb_data_home_dir variable from server was
      not recognized. full paths were stored in backup-my.ini, even if
      it stored all files locally. thus prepare phase would not find the system
      tablespace files.
      
      2. In copy-back phase, copy would not be done to the absolute destination
      path, as path would be stripped with trim_dotslash
      
      This patch fixes the above defects.
      15071226
  25. 11 Apr, 2018 1 commit
  26. 01 Apr, 2018 1 commit
    • Vladislav Vaintroub's avatar
      MDEV-15636 mariabackup --lock-ddl-per-table hangs if ALTER table is running · 27c24808
      Vladislav Vaintroub authored
      concurrently.
      
      There is a deadlock between
      
      C1 mariabackup's connection that holds MDL locks
      C2 Online ALTER TABLE that wants to have MDL exclusively
         and tries to upgrade its mdl lock.
      C3 another mariabackup's connection that does FLUSH TABLES (or FTWRL)
      
      C3 waits waits for C2,  which waits for C1, which waits for C3,
      thus the deadlock.
      
      
      MDL locks cannot be released until FLUSH  succeeds, because
      otherwise it would allow ALTER to sneak in, causing backup to abort and
      breaking lock-ddl-per-table's promise.
      
      The fix here workarounds the deadlock, by killing connections in
      "Waiting for metadata lock" status (i.e ALTER). This killing continues
      until FTWRL succeeds.
      
      Killing connections is skipped in case --no-locks parameter
      was  passed to backup, because there won't be a FLUSH.
      
      For the reference,in Percona's xtrabackup --lock-ddl-per-connection
      silently implies --no-lock ie FLUSH is always skipped there.
      
      A rather large part of fix is introducing DBUG capability to start
      a query  the new connection at the right moment of backup
      compensating somewhat for mariabackup' lack of send_query or DBUG_SYNC.
      27c24808
  27. 15 Feb, 2018 1 commit
  28. 13 Nov, 2017 1 commit
  29. 03 Nov, 2017 1 commit
  30. 10 Oct, 2017 1 commit
    • Marko Mäkelä's avatar
      MDEV-13311 Presence of old logs in 10.2.7 will corrupt restored instance (change in behavior) · 1b478a7a
      Marko Mäkelä authored
      Mariabackup 10.2.7 would delete the redo log files after a successful
      --prepare operation. If the user is manually copying the prepared files
      instead of using the --copy-back option, it could happen that some old
      redo log file would be preserved in the restored location. These old
      redo log files could cause corruption of the restored data files when
      the server is started up.
      
      We prevent this scenario by creating a "poisoned" redo log file
      ib_logfile0 at the end of the --prepare step. The poisoning consists
      of simply truncating the file to an empty file. InnoDB will refuse
      to start up on an empty redo log file.
      
      copy_back(): Delete all redo log files in the target if the source
      file ib_logfile0 is empty. (Previously we did this if the source
      file is missing.)
      
      SRV_OPERATION_RESTORE_EXPORT: A new variant of SRV_OPERATION_RESTORE
      when the --export option is specified. In this mode, we will keep
      deleting all redo log files, instead of truncating the first one.
      
      delete_log_files(): Add a parameter for the first file to delete,
      to be passed as 0 or 1.
      
      innobase_start_or_create_for_mysql(): In mariabackup --prepare,
      tolerate an empty ib_logfile0 file. Otherwise, require the first
      redo log file to be longer than 4 blocks (2048 bytes). Unless
      --export was specified, truncate the first log file at the
      end of --prepare.
      1b478a7a
  31. 15 Sep, 2017 1 commit
  32. 06 Sep, 2017 1 commit
  33. 18 Aug, 2017 1 commit
    • Marko Mäkelä's avatar
      MDEV-13575 On failure, Mariabackup --backup --safe-slave-backup may forget to... · 8a3e2970
      Marko Mäkelä authored
      MDEV-13575 On failure, Mariabackup --backup --safe-slave-backup may forget to START SLAVE SQL_THREAD
      
      backup_release(): New function, refactored from backup_finish().
      Release some resources that may have been acquired by backup_startup()
      and should be released even after a failed operation.
      
      xtrabackup_backup_low(): Refactored from xtrabackup_backup_func().
      
      xtrabackup_backup_func(): Always call backup_release() after calling
      backup_start().
      8a3e2970
  34. 06 Jul, 2017 1 commit
  35. 05 Jul, 2017 1 commit
    • Marko Mäkelä's avatar
      MDEV-12548 Initial implementation of Mariabackup for MariaDB 10.2 · 8c71c6aa
      Marko Mäkelä authored
      InnoDB I/O and buffer pool interfaces and the redo log format
      have been changed between MariaDB 10.1 and 10.2, and the backup
      code has to be adjusted accordingly.
      
      The code has been simplified, and many memory leaks have been fixed.
      Instead of the file name xtrabackup_logfile, the file name ib_logfile0
      is being used for the copy of the redo log. Unnecessary InnoDB startup and
      shutdown and some unnecessary threads have been removed.
      
      Some help was provided by Vladislav Vaintroub.
      
      Parameters have been cleaned up and aligned with those of MariaDB 10.2.
      
      The --dbug option has been added, so that in debug builds,
      --dbug=d,ib_log can be specified to enable diagnostic messages
      for processing redo log entries.
      
      By default, innodb_doublewrite=OFF, so that --prepare works faster.
      If more crash-safety for --prepare is needed, double buffering
      can be enabled.
      
      The parameter innodb_log_checksums=OFF can be used to ignore redo log
      checksums in --backup.
      
      Some messages have been cleaned up.
      Unless --export is specified, Mariabackup will not deal with undo log.
      The InnoDB mini-transaction redo log is not only about user-level
      transactions; it is actually about mini-transactions. To avoid confusion,
      call it the redo log, not transaction log.
      
      We disable any undo log processing in --prepare.
      
      Because MariaDB 10.2 supports indexed virtual columns, the
      undo log processing would need to be able to evaluate virtual column
      expressions. To reduce the amount of code dependencies, we will not
      process any undo log in prepare.
      
      This means that the --export option must be disabled for now.
      
      This also means that the following options are redundant
      and have been removed:
      	xtrabackup --apply-log-only
      	innobackupex --redo-only
      
      In addition to disabling any undo log processing, we will disable any
      further changes to data pages during --prepare, including the change
      buffer merge. This means that restoring incremental backups should
      reliably work even when change buffering is being used on the server.
      Because of this, preparing a backup will not generate any further
      redo log, and the redo log file can be safely deleted. (If the
      --export option is enabled in the future, it must generate redo log
      when processing undo logs and buffered changes.)
      
      In --prepare, we cannot easily know if a partial backup was used,
      especially when restoring a series of incremental backups. So, we
      simply warn about any missing files, and ignore the redo log for them.
      
      FIXME: Enable the --export option.
      
      FIXME: Improve the handling of the MLOG_INDEX_LOAD record, and write
      a test that initiates a backup while an ALGORITHM=INPLACE operation
      is creating indexes or rebuilding a table. An error should be detected
      when preparing the backup.
      
      FIXME: In --incremental --prepare, xtrabackup_apply_delta() should
      ensure that if FSP_SIZE is modified, the file size will be adjusted
      accordingly.
      8c71c6aa
  36. 19 Jun, 2017 1 commit
  37. 27 Apr, 2017 2 commits