summaryrefslogtreecommitdiff
path: root/extra
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-30986 hybrid build with 10.6 InnoDB10.56-MDEV-30986Marko Mäkelä2023-04-1816-819/+732
|
* Merge remote-tracking branch '10.4' into 10.5Oleksandr Byelkin2023-03-313-10/+35
|\
| * MDEV-29050 mariabackup issues error messages during InnoDB tablespaces ↵Vlad Lesin2023-03-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | export on partial backup preparing The solution is to suppress error messages for missing tablespaces if mariabackup is launched with "--prepare --export" options. "mariabackup --prepare --export" invokes itself with --mysqld parameter. If the parameter is set, then it starts server to feed "FLUSH TABLES ... FOR EXPORT;" queries for exported tablespaces. This is "normal" server start, that's why new srv_operation value is introduced. Reviewed by Marko Makela.
| * MDEV-28187 mariadb-backup doesn't utilise innodb-undo-log-directory (if ↵Vlad Lesin2023-03-211-7/+20
| | | | | | | | | | | | | | | | | | specified as a relative path) during copy-back operation Make absolute destination path from relative one, basing on mysql data directory. Reviewed by Alexander Barkov.
| * MDEV-30758 mariabackup --help only lists server groups read in configurationkevincheng22023-03-071-1/+11
| |
| * MDEV-24005 Updated the --use-memory option usage message in Mariabackup help ↵Debjyoti2023-03-041-1/+2
| | | | | | | | command
| * Fix few vulnerabilities found by CppcheckHugo Wen2023-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While performing SAST scanning using Cppcheck against source code of commit 81196469, several code vulnerabilities were found. Fix following issues: 1. Parameters of `snprintf` function are incorrect. Cppcheck error: client/mysql_plugin.c:1228: error: snprintf format string requires 6 parameters but only 5 are given. It is due to commit 630d7229 introduced option `--lc-messages-dir` in the bootstrap command. However the parameter was not even given in the `snprintf` after changing the format string. Fix: Restructure the code logic and correct the function parameters for `snprintf`. 2. Null pointer is used in a `snprintf` which could cause a crash. Cppcheck error: extra/mariabackup/xbcloud.cc:2534: error: Null pointer dereference The code intended to print the swift_project name, if the opt_swift_project_id is NULL but opt_swift_project is not NULL. However the parameter of `snprintf` was mistakenly using `opt_swift_project_id`. Fix: Change to use the correct string from `opt_swift_project`. 3. Potential double release of a memory Cppcheck error: plugin/auth_pam/testing/pam_mariadb_mtr.c:69: error: Memory pointed to by 'resp' is freed twice. A pointer `resp` is reused and allocated new memory after it has been freed. However, `resp` was not set to NULL after freed. Potential double release of the same pointer if the call back function doesn't allocate new memory for `resp` pointer. Fix: Set the `resp` pointer to NULL after the first free() to make sure the same address is not freed twice. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
* | MDEV-30775 Performance regression in fil_space_t::try_to_close() introduced ↵Vlad Lesin2023-03-101-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in MDEV-23855 fil_node_open_file_low() tries to close files from the top of fil_system.space_list if the number of opened files is exceeded. It invokes fil_space_t::try_to_close(), which iterates the list searching for the first opened space. Then it just closes the space, leaving it in the same position in fil_system.space_list. On heavy files opening, like during 'SHOW TABLE STATUS ...' execution, if the number of opened files limit is reached, fil_space_t::try_to_close() iterates more and more closed spaces before reaching any opened space for each fil_node_open_file_low() call. What causes performance regression if the number of spaces is big enough. The fix is to keep opened spaces at the top of fil_system.space_list, and move closed files at the end of the list. For this purpose fil_space_t::space_list_last_opened pointer is introduced. It points to the last inserted opened space in fil_space_t::space_list. When space is opened, it's inserted to the position just after the pointer points to in fil_space_t::space_list to preserve the logic, inroduced in MDEV-23855. Any closed space is added to the end of fil_space_t::space_list. As opened spaces are located at the top of fil_space_t::space_list, fil_space_t::try_to_close() finds opened space faster. There can be the case when opened and closed spaces are mixed in fil_space_t::space_list if fil_system.freeze_space_list was set during fil_node_open_file_low() execution. But this should not cause any error, as fil_space_t::try_to_close() still iterates spaces in the list. There is no need in any test case for the fix, as it does not change any functionality, but just fixes performance regression.
* | Merge 10.4 into 10.5Marko Mäkelä2023-02-102-0/+14
|\ \ | |/
| * Add more workaround atop existing WolfSSL 5.5.4 workaround to compile ASAN ↵Vladislav Vaintroub2023-02-081-0/+3
| | | | | | | | | | | | | | | | on buildbot The -D flag was not passed to asm compiler, despite SET_PROPERTY(COMPILE_OPTIONS) The exact reason for that remains unknown. It was not seen with gcc, as nor was be reproduced on newer CMake.
| * MDEV-30492 Crash when use mariabackup.exe with config ↵Daniel Black2023-02-071-0/+11
| | | | | | | | | | | | | | 'innodb_flush_method=async_unbuffered' Normalize innodb_flush_method, the same as the service, before attempting to print it.
* | Merge mariadb-10.5.19 into 10.5Marko Mäkelä2023-02-065-13/+62
|\ \
| * \ Merge branch '10.4' into 10.5Oleksandr Byelkin2023-01-301-0/+0
| |\ \ | | |/
| | * Merge branch '10.3' into 10.4Oleksandr Byelkin2023-01-284-13/+62
| | |\
| * | \ Merge branch '10.4' into 10.5Oleksandr Byelkin2023-01-274-13/+62
| |\ \ \
| | * \ \ Merge branch '10.3' into 10.4Oleksandr Byelkin2023-01-264-13/+62
| | |\ \ \ | | | |/ / | | |/| / | | | |/
| | | * Minimize unsafe C functions usage - replace strcat() and strcpy() (and ↵Mikhail Chalov2023-01-203-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | strncat() and strncpy()) with custom safe_strcat() and safe_strcpy() functions The MariaDB code base uses strcat() and strcpy() in several places. These are known to have memory safety issues and their usage is discouraged. Common security scanners like Flawfinder flags them. In MariaDB we should start using modern and safer variants on these functions. This is similar to memory issues fixes in 19af1890b56c6c147c296479bb6a4ad00fa59dbb and 9de9f105b5cb88249acc39af73d32af337d6fd5f but now replace use of strcat() and strcpy() with safer options strncat() and strncpy(). However, add '\0' forcefully to make sure the result string is correct since for these two functions it is not guaranteed what new string will be null-terminated. Example: size_t dest_len = sizeof(g->Message); strncpy(g->Message, "Null json tree", dest_len); strncat(g->Message, ":", sizeof(g->Message) - strlen(g->Message)); size_t wrote_sz = strlen(g->Message); size_t cur_len = wrote_sz >= dest_len ? dest_len - 1 : wrote_sz; g->Message[cur_len] = '\0'; All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services -- Reviewer and co-author Vicențiu Ciorbaru <vicentiu@mariadb.org> -- Reviewer additions: * The initial function implementation was flawed. Replaced with a simpler and also correct version. * Simplified code by making use of snprintf instead of chaining strcat. * Simplified code by removing dynamic string construction in the first place and using static strings if possible. See connect storage engine changes.
| | | * MDEV-23335 MariaBackup Incremental Does Not Reflect Dropped/Created DatabasesAlexander Barkov2023-01-191-1/+48
| | | |
* | | | MDEV-25765 Mariabackup reduced verbosity option for log outputAlexander Barkov2023-01-311-1/+3
| | | |
* | | | MDEV-29244 mariabackup --help output still referst to innobackupexAlexander Barkov2023-01-312-8/+10
|/ / / | | | | | | | | | | | | Changing the tool name in the "mariadb-backup --help" output from "innobackupex" to "mariadb-backup".
* | | MDEV-30423 Deadlock on Replica during BACKUP STAGE BLOCK_COMMIT on XA ↵Andrei2023-01-231-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | transactions The user XA commit execution branch was caught not have been covered with MDEV-21953 fixes. The XA involved deadlock is resolved now to apply the former fixes pattern. Along the fixes the following changes have been implemented. - MDL lock attribute correction - dissociation of the externally completed XA from the current thread's xid_state in the error branches - cleanup_context() preseves the prepared XA - wait_for_prior_commit() is relocated to satisfy both the binlog ON (log-slave-updates and skip-log-bin) and OFF slave execution branches.
* | | Merge branch '10.4' into 10.5Oleksandr Byelkin2023-01-182-0/+2
|\ \ \ | |/ /
| * | v5.5.4-stableOleksandr Byelkin2023-01-172-0/+2
| | |
* | | MDEV-30179 mariabackup --backup fails with FATAL ERROR: ... failedThirunarayanan Balathandayuthapani2023-01-103-8/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to copy datafile - Mariabackup fails to copy the undo log tablespace when it undergoes truncation. So Mariabackup should detect the redo log which does undo tablespace truncation and also backup should read the minimum file size of the tablespace and ignore the error while reading. - Throw error when innodb undo tablespace read failed, but backup doesn't find the redo log for undo tablespace truncation
* | | Merge 10.4 into 10.5Marko Mäkelä2023-01-032-4/+6
|\ \ \ | |/ /
| * | Merge 10.3 into 10.4Marko Mäkelä2023-01-032-4/+6
| |\ \ | | |/
| | * MDEV-30293: mariabackup fail with --galera-info option without GaleraJulius Goryavsky2022-12-272-4/+6
| | | | | | | | | | | | | | | Without Galera, mariabackup should ignore the --galera-info option and not fail with rc != 0 like it does now. This commit fixes this flaw.
* | | MDEV-24685 fixup: Remove srv_n_file_io_threadsMarko Mäkelä2022-12-161-8/+0
| | | | | | | | | | | | | | | | | | The variable was not really being used for anything. The parameters innodb_read_io_threads, innodb_write_io_threads have replaced innodb_file_io_threads.
* | | MDEV-30114 Incremental prepare fails when innodb_undo_tablespaces > 0Thirunarayanan Balathandayuthapani2022-12-021-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Mariabackup fails to open the undo tablespaces while applying delta files to the corresponding data file. Mariabackup opens the undo tablespaces first time in srv_undo_tablespaces_init() and does tries to open the undo tablespaces in xtrabackup_apply_deltas() with conflicting mode and leads to the failure. - Mariabackup should close the undo tablespaces before applying the incremental delta files.
* | | Merge 10.4 into 10.5Marko Mäkelä2022-11-081-4/+0
|\ \ \ | |/ /
| * | Merge 10.3 into 10.4Marko Mäkelä2022-11-081-4/+0
| |\ \ | | |/
| | * MDEV-27121 mariabackup incompatible with disabled dedicated undo log ↵Thirunarayanan Balathandayuthapani2022-11-071-4/+0
| | | | | | | | | | | | | | | | | | | | | tablespaces - mariabackup fails to assign srv_undo_space_id_start when the dedicated undo tablespaces are disabled
* | | Merge branch '10.4' into 10.5Oleksandr Byelkin2022-10-141-0/+0
|\ \ \ | |/ /
| * | v5.5.1-stableOleksandr Byelkin2022-10-141-0/+0
| | |
| * | MDEV-29613 Improve WITH_DBUG_TRACE=OFFMarko Mäkelä2022-09-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 28325b08633372cc343dfcbc41fe252020cf6e6e a compile-time option was introduced to disable the macros DBUG_ENTER and DBUG_RETURN or DBUG_VOID_RETURN. The parameter name WITH_DBUG_TRACE would hint that it also covers DBUG_PRINT statements. Let us do that: WITH_DBUG_TRACE=OFF shall disable DBUG_PRINT() as well. A few InnoDB recovery tests used to check that some output from DBUG_PRINT("ib_log", ...) is present. We can live without those checks. Reviewed by: Vladislav Vaintroub
* | | Merge 10.4 into 10.5Marko Mäkelä2022-09-201-1/+1
|\ \ \ | |/ /
| * | Merge 10.3 into 10.4Marko Mäkelä2022-09-201-1/+1
| |\ \ | | |/
| | * InnoDB cleanup: Replace UNIV_LINUX, UNIV_SOLARIS, UNIV_AIXMarko Mäkelä2022-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Let us use the normal platform-specific preprocessor symbols __linux__, __sun__, _AIX instead of some homebrew ones. The preprocessor symbol UNIV_HPUX must have lost its meaning by f6deb00a56b2e87287d606aba3bcd71290d876ae (note: the symbol UNIV_HPUX10 is being checked for, but only UNIV_HPUX is defined).
* | | Merge 10.4 into 10.5Daniel Black2022-09-191-1/+2
|\ \ \ | |/ /
| * | MDEV-18589 Assertion on info.page_size failed in xb_delta_open_matching_spaceMarko Mäkelä2022-09-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | xb_read_delta_metadata(): For ROW_FORMAT=COMPRESSED tables, initialize the info.zip_size with the physical page size and let info.page_size remain the logical page size, like xb_delta_open_matching_space() expects it to be ever since commit 0a1c3477bf359c55be3e11ec6502bc7b5bb87f29 (MDEV-18493).
* | | mariabackup: remove MySQL wordingDaniel Black2022-08-261-6/+6
| | |
* | | MDEV-23607 MariaBackup - align required GRANTS to cmd optionsDaniel Black2022-08-261-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the 10.5 split of the privileges, the required GRANTs for various mariabackup operations has changed. In the addition of tests, a number of mappings where incorrect: The option --lock-ddl-per-table didn't require connection admin. The option --safe-slave-backup requires SLAVE MONITOR even without the --no-lock option.
* | | Merge 10.4 into 10.5Marko Mäkelä2022-08-221-8/+43
|\ \ \ | |/ /
| * | Merge 10.3 into 10.4Marko Mäkelä2022-08-221-8/+43
| |\ \ | | |/
| | * MDEV-29043 mariabackup --compress hangsMarko Mäkelä2022-08-191-8/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though commit b817afaa1c148437e1016d1981f138d0c46ccbc8 passed the test mariabackup.compress_qpress, that test turned out to be too small to reveal one more problem that had previously been prevented by the existence of ctrl_mutex. I did not realize that there can be multiple concurrent callers to compress_write(). One of them is the log copying thread; further callers are data file copying threads (default: --parallel=1). By default, there is only one compression worker thread (--compress-threads=1). compress_write(): Fix a race condition between threads that would use the same worker thread object. Make thd->data_avail contain the thread identifier of the submitter, and add thd->avail_cond to notify other compress_write() threads that are waiting for a slot.
* | | Merge branch '10.4' into 10.5Oleksandr Byelkin2022-08-0310-343/+81
|\ \ \ | |/ /
| * | Merge branch '10.3' into 10.4Oleksandr Byelkin2022-08-027-342/+77
| |\ \ | | |/
| | * only copy buffer pool dump in SST galera modeSergei Golubchik2022-08-011-39/+16
| | | | | | | | | | | | and then only into the default name, so that the joiner could find it
| | * revert mariabackup part of MDEV-27524, fix the testSergei Golubchik2022-08-017-330/+89
| | |
| * | wolfssl v5.4.0-stableOleksandr Byelkin2022-07-271-0/+0
| | |