summaryrefslogtreecommitdiff
path: root/extra/mariabackup
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-20230: mariabackup --ftwrl-wait-timeout never times out on explicitbb-10.2-MDEV-20230-ftwrl-wait-timeoutVlad Lesin2020-04-271-55/+69
| | | | | | | | | | | | lock --ftwrl-wait-timeout does not finish mariabackup execution when acquired backup lock can't be grabbed for the certain amount of time, it just waits for a long queries finishing before acquiring the lock to avoid unnecessary locking. This commit extends --ftwrl-wait-timeout so, that mariabackup execution is finished if it waits for backup lock during certain amount of time.
* MDEV-19347: Mariabackup does not honor ignore_db_dirs from serverbb-10.2-MDEV-19347-ignore_db_dirsVlad Lesin2020-04-213-177/+208
| | | | | | | | | | | config. The solution is to read the system variable value on startup and to fill databases_exclude_hash. xb_load_list_string() became non-static and was reformatted. The system variable value is read and processed in get_mysql_vars(), which was also reformatted.
* MDEV-21168: Active XA transactions stop slave from working after backupVlad Lesin2020-04-071-357/+468
| | | | | | | | | was restored. Optionally rollback prepared XA's on "mariabackup --prepare". The fix MUST NOT be ported on 10.5+, as MDEV-742 fix solves the issue for slaves.
* fix use-after-freeEugene Kosov2020-03-101-2/+2
|
* Merge branch '10.1' into 10.2Oleksandr Byelkin2020-01-243-7/+9
|\
| * MDEV-17601: MariaDB Galera does not expect 'mbstream' as streamfmtJulius Goryavsky2020-01-213-7/+9
| | | | | | | | | | | | | | | | | | | | | | Setting "streamfmt=mbstream" in the "[sst]" section causes SST to fail because the format automatically switches to 'tar' by default (insead of mbstream). To fix this, we need to add mbstream to the list of valid values for the format, making it synonymous with xbstream. This must be done both in the SST script and when parsing the options of the corresponding utilities.
* | MDEV-19176 Reduce the memory usage during recoveryThirunarayanan Balathandayuthapani2019-12-231-1/+3
| | | | | | | | | | | | | | | | | | - Moved the recv_sys->heap memory condition inside recv_parse_log_recs(). So that, InnoDB can mark the status as STORE_NO earlier. - InnoDB uses one third of buffer pool chunk size for reading the redo log records. In that case, we can avoid the scenario where buffer ran out of memory issue during recovery.
* | MDEV-21255: Deadlock of parallel slave and mariabackup (with failed logVlad Lesin2019-12-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | copy thread) mariabackup hangs waiting until innodb redo log thread read log till certain LSN, and it waits under FTWRL. If there is redo log read error in the thread, it is finished, and main thread knows nothing about it, what leads to hanging. As it hangs under FTWRL, slave threads on server side can be blocked due to MDL lock conflict. The fix is to finish mariabackup with error message on innodb redo log read failure.
* | MDEV-11345 Compile english error messages into mysqld executable.Vladislav Vaintroub2019-12-111-32/+6
| | | | | | | | | | Simplify loading messages into mariabackup. Do the same as server does We're forcing english, so there is no attempt to load errmsg.sys
* | MDEV-18310: Aria engine: Undo phase failed with "Got error 121 whenVlad Lesin2019-11-291-11/+20
| | | | | | | | | | | | | | | | executing undo undo_key_delete" upon startup on datadir restored from incremental backup aria_log* files were not copied on --prepare --incremental-dir step from incremental to destination backup directory.
* | Merge 10.1 to 10.2Marko Mäkelä2019-11-062-2/+2
|\ \ | |/
| * Fix GCC 9.2.1 -Wstringop-truncationMarko Mäkelä2019-11-043-3/+4
| | | | | | | | | | | | | | | | | | 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.
| * imporve clang buildEugene Kosov2019-06-251-2/+0
| | | | | | | | | | | | | | | | | | cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug Maintainer mode makes all warnings errors. This patch fix warnings. Mostly about deprecated `register` keyword. Too much warnings came from Mroonga and I gave up on it.
* | MDEV-19335 Remove buf_page_t::encryptedThirunarayanan Balathandayuthapani2019-10-091-3/+1
| | | | | | | | | | The field buf_page_t::encrypted was added in MDEV-8588. It was made mostly redundant in MDEV-12699. Remove the field.
* | MDEV-20703: mariabackup creates binlog files in server binlog directory on ↵Vlad Lesin2019-10-011-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --prepare --export step When "--export" mariabackup option is used, mariabackup starts the server in bootstrap mode to generate *.cfg files for the certain innodb tables. The started instance of the server reads options from the file, pointed out in "--defaults-file" mariabackup option. If the server uses the same config file as mariabackup, and binlog is switched on in that config file, then "mariabackup --prepare --export" will create binary log files in the server's binary log directory, what can cause issues. The fix is to add "--skip-log-bin" in mysld options when the server is started to generate *.cfg files.
* | MDEV-18438 Don't stream xtrabackup_info of extra-lsndirSimon Lipp2019-09-194-10/+41
| |
* | MDEV-20060: Failing assertion: srv_log_file_size <= 512ULL << 30 while ↵Vlad Lesin2019-08-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | preparing backup The general reason why innodb redo log file is limited by 512G is that log_block_convert_lsn_to_no() returns value limited by 1G. But there is no need to have unique log block numbers in log group. The fix removes 512G limit and limits log group size by (uint32_t maximum value) * (minimum page size), which, in turns, can be removed if fil_io() is no longer used for innodb redo log io.
* | MDEV-19865: AddressSanitizer error in open_or_create_log_file() in mariabackupVlad Lesin2019-06-261-1/+1
| | | | | | | | Decrease array on stack in open_or_create_log_file() to avoid stack overflow.
* | Fixed compiler warningMonty2019-06-031-1/+5
| | | | | | | | | | | | Wrong compiler warning from GCC: ‘snprintf’ output 2 or more bytes (assuming 4001) into a destination of size 4000
* | MDEV-14192: mariabackup.incremental_backup failed in buildbot with Failing ↵Vlad Lesin2019-05-241-33/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | assertion: byte_offset % OS_FILE_LOG_BLOCK_SIZE == 0 In some cases it's possible that InnoDB redo log file header is re-written so, that checkpoint lsn and checkpoint lsn offset are updated, but checkpoint number stays the same. The fix is to re-read redo log header if at least one of those three parametes is changed at backup start. Repeat the logic of log_group_checkpoint() on choosing InnoDB checkpoint info field on backup start. This does not influence backup correctness, but simplifies bugs analysis.
* | Merge 10.1 into 10.2Marko Mäkelä2019-05-1347-57/+57
|\ \ | |/
| * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-1147-48/+48
| |
| * Update FSF addressVicențiu Ciorbaru2019-05-115-9/+9
| |
* | MDEV-17008 prepare with datadir, on Windows, does not set ACLVladislav Vaintroub2019-05-021-1/+67
| | | | | | | | | | | | | | on tablespace files Fix is to always add Full Control for NetworkService account, for every file that copyback/moveback copies around.
* | MDEV-18544 "missing required privilege PROCESS on *.*" using mariabackup for SSTVladislav Vaintroub2019-05-021-0/+7
| | | | | | | | | | | | | | If required privilege is missing, dump the output from "SHOW GRANTS" into mariabackup log. This will help troubleshooting, and make the bug reproducible.
* | Fix a typoVladislav Vaintroub2019-04-291-1/+1
| |
* | MDEV-19231 make DB_SUCCESS equal to 0Eugene Kosov2019-04-254-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 2e814d4702d71a04388386a9f591d14a35980bfe 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.
* | Do fast exit with error code and FATAL ERROR message, if innodb cannot start ↵Vladislav Vaintroub2019-04-231-3/+1
| | | | | | | | | | | | | | during prepare. Otherwise, it is possible for "prepare" to exit with error code 0, even if it did not work at all.
* | MDEV-19212 4GB Limit on large_pages - integer overflowMarko Mäkelä2019-04-081-5/+0
| | | | | | | | | | | | | | | | | | os_mem_alloc_large(): Invoke the macro ut_2pow_round() with the correct argument type. innobase_large_page_size, innobase_use_large_pages, os_use_large_pages, os_large_page_size: Remove. Simply refer to opt_large_page_size, my_use_large_pages.
* | MDEV-14192 Mariabackup assertion failure: byte_offset % ↵Vlad Lesin2019-04-081-20/+11
| | | | | | | | | | | | | | | | | | | | OS_FILE_LOG_BLOCK_SIZE == 0 xtrabackup_backup_func(): If the log checkpoint header changed since we last read it, search for the most recent checkpoint again. Otherwise, we could corrupt the backup of the redo log, because the least significant bits of checkpoint_lsn_start would not match log_sys->log.lsn.
* | MDEV-12699 preparation: Clean up recv_sysMarko Mäkelä2019-04-061-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recv_sys data structures are accessed not only from the thread that executes InnoDB plugin initialization, but also from the InnoDB I/O threads, which can invoke recv_recover_page(). Assert that sufficient concurrency control is in place. Some code was accessing recv_sys data structures without holding recv_sys->mutex. recv_recover_page(bpage): Refactor the call from buf_page_io_complete() into a separate function that performs necessary steps. The main thread was unnecessarily releasing and reacquiring recv_sys->mutex. recv_recover_page(block,mtr,recv_addr): Pass more parameters from the caller. Avoid redundant lookups and computations. Eliminate some redundant variables. recv_get_fil_addr_struct(): Assert that recv_sys->mutex is being held. That was not always the case! recv_scan_log_recs(): Acquire recv_sys->mutex for the whole duration of the function. (While we are scanning and buffering redo log records, no pages can be read in.) recv_read_in_area(): Properly protect access with recv_sys->mutex. recv_apply_hashed_log_recs(): Check recv_addr->state only once, and continuously hold recv_sys->mutex. The mutex will be released and reacquired inside recv_recover_page() and recv_read_in_area(), allowing concurrent processing by buf_page_io_complete() in I/O threads.
* | Merge 10.1 into 10.2Marko Mäkelä2019-03-264-0/+4
|\ \ | |/
| * Fix resource leakFaramosCZ2019-03-221-0/+1
| | | | | | | | The 'bitmap_dir' has to be closed when no longer needed
| * Fix resource leakFaramosCZ2019-03-221-0/+1
| |
| * Fix resource leakFaramosCZ2019-03-221-0/+1
| |
| * Fix resource leakFaramosCZ2019-03-221-0/+1
| |
* | Merge 10.1 into 10.2Marko Mäkelä2019-03-221-3/+2
|\ \ | |/
| * Cleanup - remove unused variables and functions after MDEV-18917Vladislav Vaintroub2019-03-152-31/+0
| |
* | Remove unused variables from non-debug buildMarko Mäkelä2019-03-211-5/+5
| |
* | Mariabackup: Ensure NUL termination in strncpy()Marko Mäkelä2019-03-212-5/+9
| |
* | post-merge: gcc 8 warningsSergei Golubchik2019-03-152-23/+0
| | | | | | | | | | | | | | note: Inherit String from Sql_alloc, to get operators new and new[] in sync in rocksdb gcc was complaining that non-lvalue was cast to const.
* | Merge branch '10.1' into 10.2Sergei Golubchik2019-03-153-39/+4
|\ \ | |/
| * MDEV-18917 Don't create xtrabackup_binlog_pos_innodb with MariabackupVladislav Vaintroub2019-03-153-36/+4
| |
* | Merge 10.1 into 10.2Marko Mäkelä2019-03-082-3/+22
|\ \ | |/
| * MDEV-18855 Mariabackup should fetch innodb_compression_level from running serverThirunarayanan Balathandayuthapani2019-03-082-3/+23
| | | | | | | | | | | | | | - Fetch innodb_compression_level from the running server.Add the value of innodb_compression_level in backup-my.cnf file during backup phase. So that prepare can use the innodb_compression_level variable from backup-my.cnf
* | Merge 10.1 into 10.2Marko Mäkelä2019-03-064-11/+18
|\ \ | |/
| * MDEV-18659: Fix string truncation/overflow in InnoDB and XtraDBMarko Mäkelä2019-03-064-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Revert "MDEV-18575 Cleanup : remove innodb-encrypt-log parameter from ↵Vladislav Vaintroub2019-02-201-0/+5
| | | | | | | | | | | | | | mariabackup" This reverts commit 3262967008bf2c2978bbf97960a3ea168fec9c26. It was checked in by mistake
| * MDEV-18575 Cleanup : remove innodb-encrypt-log parameter from mariabackupVladislav Vaintroub2019-02-141-5/+0
| |
* | MDEV-18669 mariabackup writes timestamp in version lineVladislav Vaintroub2019-02-211-1/+1
| | | | | | | | Use fprintf(stderr) instead of msg() to print the version line