summaryrefslogtreecommitdiff
path: root/extra
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-23335 MariaBackup Incremental Does Not Reflect Dropped/Created DatabasesAlexander Barkov2023-01-191-1/+48
|
* 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-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
* 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).
* 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.
* 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
|
* MDEV-28689, MDEV-28690: Remove ctrl_mutexMarko Mäkelä2022-07-111-70/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts the revert 4f62dfe676c29437b4a19c4d229e2accd2dda4a6 and fixes the hang that was introduced when ctrl_mutex was removed. The test mariabackup.compress_qpress covers this code, but the test is skipped if a stand-alone qpress executable is not available. It is not available in many software repositories, possibly because the code base has not been updated since 2010. This was tested with an executable that was compile from the source code at http://www.quicklz.com/qpress-11-source.zip (after adding a missing #include <unistd.h> for the definition of isatty()). Compared to the grandparent commit (before the revert), the changes are as follows: comp_thread_ctxt_t::done_cond: A separate condition for completed compression, signaling that thd->to_len has been updated. compress_write(): Replace some threads[i] with thd. Reset thd->to_len = 0 after consuming the compressed data. compress_worker_thread_func(): After consuming the uncompressed data, set thd->data_avail = FALSE. After compressing, signal thd->done_cond.
* Revert "MDEV-28689, MDEV-28690: Incorrect error handling for ctrl_mutex"Vladislav Vaintroub2022-07-111-22/+55
| | | | This reverts commit 863c3eda872b19f70ce6045119bf621584e1312d.
* Fix clang-15 -Wdeprecated-non-prototypeMarko Mäkelä2022-07-011-13/+6
| | | | | K&R style function definitions are deprecated in all versions of C and not supported in C2x.
* MDEV-28719: compress_write() leaks data_mutex on errorMarko Mäkelä2022-06-011-12/+11
|
* MDEV-28689, MDEV-28690: Incorrect error handling for ctrl_mutexMarko Mäkelä2022-05-301-55/+22
| | | | | | | | | | | | | | | | | comp_thread_ctxt_t: Remove ctrl_mutex, ctrl_cond, started. We do not actually need them for anything. destroy_worker_thread(): Split from destroy_worker_threads(). create_worker_threads(): We already initialize thd->data_avail=FALSE and thd->cancelled=FALSE before invoking pthread_create(). If any thread creation fails, clean up by destroy_worker_thread(). compress_worker_thread_func(): Assume that thd->started and thd->data_avail are already initialized. Reviewed by: Vladislav Vaintroub
* Merge branch '10.2' into 10.3Oleksandr Byelkin2022-05-032-81/+333
|\
| * MDEV-28446 mariabackup prepare fails for incrementals if a new schema is ↵Alexander Barkov2022-05-021-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | created after full backup is taken When "mariabackup --target-dir=$basedir --incremental-dir=$incremental_dir" is running and is moving a new table file (e.g. `db1/t1.new`) from the incremental directory to the base directory, it needs to verify that the base backup database directory (e.g. `$basedir/db1`) really exists (or create it otherwise). The table `db1/t1` can come from a new database `db1` which was created during the base mariabackup execution time. In such case the directory `db1` exists only in the incremental directory, but does not exist in the base directory.
| * MDEV-21037 mariabackup does not detect multi-source replication slaveAlexander Barkov2022-04-251-79/+319
| |
* | MDEV-24317 Data race in LOGGER::init_error_log at sql/log.cc:1443 and in ↵Sergei Golubchik2022-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | LOGGER::error_log_print at sql/log.cc:1181 don't initialize error_log_handler_list in set_handlers() * error_log_handler_list is initialized to LOG_FILE early, in init_base() * set_handlers always reinitializes it to LOG_FILE, so it's pointless * after init_base() concurrent threads start using sql_log_warning, so following set_handlers() shouldn't modify error_log_handler_list without some protection
* | MDEV-25975 innodb_disallow_writes causes shutdown to hangMarko Mäkelä2022-04-061-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We will remove the parameter innodb_disallow_writes because it is badly designed and implemented. The parameter was never allowed at startup. It was only internally used by Galera snapshot transfer. If a user executed SET GLOBAL innodb_disallow_writes=ON; the server could hang even on subsequent read operations. During Galera snapshot transfer, we will block writes to implement an rsync friendly snapshot, as follows: sst_flush_tables() will acquire a global lock by executing FLUSH TABLES WITH READ LOCK, which will block any writes at the high level. sst_disable_innodb_writes(), invoked via ha_disable_internal_writes(true), will suspend or disable InnoDB background tasks or threads that could initiate writes. As part of this, log_make_checkpoint() will be invoked to ensure that anything in the InnoDB buf_pool.flush_list will be written to the data files. This has the nice side effect that the Galera joiner will avoid crash recovery. The changes to sql/wsrep.cc and to the tests are based on a prototype that was developed by Jan Lindström. Reviewed by: Jan Lindström
* | Merge 10.2 into 10.3Marko Mäkelä2022-04-061-22/+22
|\ \ | |/
| * MDEV-27835 innochecksum -S crashes for encrypted .ibd tablespaceVlad Lesin2022-03-291-24/+24
| | | | | | | | | | | | | | | | | | | | As main() invokes parse_page() when -S or -D are set, it can be a case when parse_page() is invoked when -D filename is not set, that is why any attempt to write to page dump file must be done only if the file name is set with -D. The bug is caused by 2ef7a5a13a988842450cbeeaceaf0ea1a78a3c27 (MDEV-13443).
* | Merge 10.2 into 10.3Marko Mäkelä2022-02-257-98/+339
|\ \ | |/
| * MDEV-27524: Incorrect binlogs after Galera SST using rsync and mariabackupJulius Goryavsky2022-02-227-89/+330
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds correct handling of binlogs for SST using rsync or mariabackup. Before this fix, binlogs were handled incorrectly - - only one (last) binary log file was transferred during SST, which then led to various failures (for example, when trying to list all events from the binary log). These bugs were long masked by flaws in the primitive binlogs handling code in the SST scripts, which causing binary logs files to be erased after transfer or not added to the binlog index on the joiner node. Now the correct transfer of all binary logs (not just the last of the binary log files) has been implemented both for the rsync (at the script level) and for the mariabackup (at the level of the main utility code). This commit also adds a new sst_max_binlogs=<n> parameter, which can be located in the [sst] section or in the [xtrabackup] section (historically, supported for mariabackup only, not for rsync), or in one of the server sections. This parameter specifies the number of binary log files to be sent to the joiner node during SST. This option is added for compatibility with old SST scripting behavior, which can be emulated by setting the sst_max_binlogs=1 (although in general this can cause problems for the reasons described above). In addition, setting the sst_max_binlogs=0 can be used to suppress the transmission of binary logs to the joiner nodes during SST (although sometimes a single file with the current binary log can still be transmitted to the joiner, even with sst_max_binlogs=0, because this sometimes necessary in modes that involve the use of GTIDs with Galera). Also, this commit ensures correct handling of paths to various innodb files and directories in the SST scripts, and fixes some problems with this that existed in mariabackup utility (which were associated with incorrect handling of the innodb_data_dir parameter in some scenarios). In addition, this commit contains the following enhancements: 1) Added tests for mtr, which check the correct work with binlogs after SST (using rsync and mariabackup); 2) Added correct handling of slashes at the end of all paths that the SST script receives as parameters; 3) Improved parsing code for --mysqld-args parameters. Now it correctly processes the sequence "--" after the name of the one-letter option; 4) Checking the secret signature during joiner authentication is made independent of presence of bash (as a unix shell) in the system and diff utility no longer needed to check certificates compliance; 5) All directories that are necessary for the correct placement of various logs are automatically created by SST scripts in advance (before running mariabackup on the joiner node); 6) Removal of old binary logs on joiner is done using the binlog index (if it exists) (not only by fixed pattern that based on the current binlog name, as before); 7) Paths for placing binary logs are correctly processed if they are set as relative paths (to the datadir); 8) SST scripts are made even more resistant to spaces in filenames (now for binlogs); 9) In case of failure, SST scripts now always end with an exit code other than zero; 10) SST script for rsync now correctly create a tar file with the binlogs, even if the paths to them (in the binlog index file) are specified as a mix of absolute and relative paths, and even if they do not match with the datadir path specified in the current configuration settings.
| * mariabackup: cosmetic changes (whitespaces and indentation)Julius Goryavsky2022-02-221-9/+9
| |
* | Merge branch '10.2' into 10.3mariadb-10.3.33Oleksandr Byelkin2022-01-291-3/+3
|\ \ | |/
| * MDEV-27494 Rename .ic files to .inlVladislav Vaintroub2022-01-171-3/+3
| |
* | Merge branch 10.2 into 10.3Julius Goryavsky2021-12-231-1/+1
|\ \ | |/
| * MDEV-27181 fixup: compatibility with Windows + small correctionsbb-10.2-MDEV-27181-fixJulius Goryavsky2021-12-171-1/+1
| | | | | | | | | | | | | | 1) Removed symlinks that are not very well supported in tar under Windows. 2) Added comment + changed code formatting in viosslfactories.c 3) Fixed a small bug in the yassl code. 4) Fixed a typo in the script code.
* | Merge 10.2 into 10.3Marko Mäkelä2021-11-292-3/+2
|\ \ | |/
| * MDEV-26558 Fix a deadlock due to cyclic dependencebb-10.2-robertryancaicse2021-11-241-1/+1
| | | | | | Fix a potential deadlock bug between locks ctrl_mutex and entry->mutex
| * MDEV-22522 RPM packages have meaningless summary/descriptionbb-10.2-MDEV-22522Alexey Bychko2021-11-231-2/+1
| | | | | | | | | | this patch moves cpack summury and description for optional packages to the appropriate CMakeLists.txt files
* | Merge 10.2 into 10.3Marko Mäkelä2021-11-091-0/+8
|\ \ | |/
| * MDEV-26561 mariabackup release locksDaniel Black2021-11-091-0/+7
| | | | | | | | | | | | | | The previous threads locked need to be released too. This occurs if the initialization of any of the non-first mutex/conditition variables errors occurs.
| * MDEV-26561 Fix a bug due to unreleased lockryancaicse2021-11-091-0/+1
| | | | | | | | Fix a bug of unreleased lock ctrl_mutex in the method create_worker_threads
* | Merge 10.2 into 10.3Marko Mäkelä2021-09-225-322/+7
|\ \ | |/
| * MDEV-26574 An improper locking bug due to unreleased lock in the ds_xbstream.ccVladislav Vaintroub2021-09-151-3/+7
| | | | | | | | release lock in all as cases n xbstream_open, also fix the case where malloc would return NULL.
| * MDEV-26573 : A static analyzer warning about ds_archive.ccVladislav Vaintroub2021-09-154-318/+0
| | | | | | | | | | This file had not been compiled for long time. Remove this from the tree.
* | Merge branch '10.2' into 10.3Vicențiu Ciorbaru2021-09-071-0/+2
|\ \ | |/
| * Fix potential null pointer access after the allocation errorVladislav Vaintroub2021-09-011-0/+2
| |
* | Merge 10.2 into 10.3Marko Mäkelä2021-08-311-1/+1
|\ \ | |/
| * typo fixedSergei Golubchik2021-08-261-1/+1
| |
* | Merge 10.2 into 10.3Marko Mäkelä2021-07-222-88/+92
|\ \ | |/
| * MDEV-25361 fixup: Fix integer type mismatchMarko Mäkelä2021-07-221-89/+92
| | | | | | | | | | | | | | | | | | | | InnoDB tablespace identifiers and page numbers are 32-bit numbers. Let us use a 32-bit type for them in innochecksum. The changes in commit 1918bdf32cdbd1f190cc4479f4076ee4a467f25d broke the build on 32-bit Windows. Thanks to Vicențiu Ciorbaru for an initial version of this fixup.
| * Add feature summary at the end of cmake.Heinz Wiesinger2021-07-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This gives a short overview over found/missing dependencies as well as enabled/disabled features. Initial author Heinz Wiesinger <heinz@m2mobi.com> Additions by Vicențiu Ciorbaru <vicentiu@mariadb.org> * Report all plugins enabled via MYSQL_ADD_PLUGIN * Simplify code. Eliminate duplication by making use of WITH_xxx variable values to set feature "ON" / "OFF" state. Reviewed by: wlad@mariadb.com (code details) serg@mariadb.com (the idea)
* | Merge branch '10.2' into 10.3Sergei Golubchik2021-07-213-15/+21
|\ \ | |/
| * avoid searching std::map twice in innochecksumEugene Kosov2021-07-201-6/+1
| |
| * MDEV-25361 innochecksum must not report errors for freed pagesEugene Kosov2021-07-201-7/+18
| | | | | | | | | | | | | | | | Store and maintain xdes pages always. And doesn't verify checksums for freed pages. innochecksum can work only with the first space file of multiple ones. Tell about it and abort in case of not the first file.
| * Typo fix in extrabackup.cc and innobackupex.ccOli Sennhauser2021-07-152-2/+2
| | | | | | | | | | Thanks to @shinguz for helping with this. This a backport commit from 10.7
* | MDEV-15912: Remove traces of insert_undoMarko Mäkelä2021-06-211-34/+5
| | | | | | | | | | | | | | | | | | | | | | | | Let us simply refuse an upgrade from earlier versions if the upgrade procedure was not followed. This simplifies the purge, commit, and rollback of transactions. Before upgrading to MariaDB 10.3 or later, a clean shutdown of the server (with innodb_fast_shutdown=1 or 0) is necessary, to ensure that any incomplete transactions are rolled back. The undo log format was changed in MDEV-12288. There is only one persistent undo log for each transaction.
* | Merge 10.2 into 10.3Marko Mäkelä2021-06-012-144/+41
|\ \ | |/
| * MDEV-20556 Remove references to "xtrabackup" and "innobackupex" in ↵Vladislav Vaintroub2021-05-312-143/+41
| | | | | | | | mariabackup --help
* | Merge 10.2 into 10.3Marko Mäkelä2021-04-211-1/+1
|\ \ | |/