summaryrefslogtreecommitdiff
path: root/extra
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Fixes for WolfSSL 5.4.0Vladislav Vaintroub2022-07-272-1/+4
| | |
* | | Merge 10.4 into 10.5Marko Mäkelä2022-07-271-18/+22
|\ \ \ | |/ /
| * | Merge branch '10.3' into 10.4Oleksandr Byelkin2022-07-271-15/+15
| |\ \ | | |/
| | * 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.
* | | Merge 10.4 into 10.5Marko Mäkelä2022-07-011-13/+6
|\ \ \ | |/ /
| * | Merge 10.3 into 10.4Marko Mäkelä2022-07-011-13/+6
| |\ \ | | |/
| | * 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-28832 infinite loop in mariabackup if log LOG_HEADER_FORMAT field is 0Vlad Lesin2022-06-151-19/+19
| | | | | | | | | | | | Avoid the loop with getting rid of back and forth jumping.
* | | Merge 10.4 into 10.5Marko Mäkelä2022-06-021-67/+33
|\ \ \ | |/ /
| * | Merge 10.3 into 10.4Marko Mäkelä2022-06-021-67/+33
| |\ \ | | |/
| | * 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
* | | MDEV-28473 field_ref_zero is not initialized in xtrabackup_prepare_func()Vlad Lesin2022-05-111-20/+21
| | | | | | | | | | | | | | | The solution is to initialize field_ref_zero in main_low() before xtrabackup_backup_func() and xtrabackup_prepare_func() calls.
* | | Merge branch '10.4' into 10.5Sergei Golubchik2022-05-092-81/+333
|\ \ \ | |/ /
| * | Merge branch '10.3' into 10.4Sergei Golubchik2022-05-082-81/+333
| |\ \ | | |/
| | * 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
| | | |
* | | | Merge 10.4 into 10.5Marko Mäkelä2022-04-213-2/+1
|\ \ \ \ | |/ / /
| * | | WolfSSL v5.2.0-stableMarko Mäkelä2022-04-212-1/+0
| | | |
| * | | Merge 10.3 into 10.4Marko Mäkelä2022-04-211-1/+1
| |\ \ \ | | |/ /
| | * | 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-28250 aix test case failure innodb_zip.innochecksum_3,4k,crc32,innodbDaniel Black2022-04-071-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As discovered by tracing, but also presenting in AIX fseeko documentation, seeking beyond the EOF is acceptable, as you can write there. To display the same error in AIX to other implementations that return errors on seek, we take the EFBIG error code on reading and error the same way. An AIX truss of an aspect of the test: truss extra/innochecksum --page=18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd statx("./mysql-test/var/log/innodb_zip.innochecksum_3-4k,crc32,innodb/mysqld.1/data//test/tab1.ibd", 0x0FFFFFFFFFFFF610, 176, 010) = 0 kopen("./mysql-test/var/log/innodb_zip.innochecksum_3-4k,crc32,innodb/mysqld.1/data//test/tab1.ibd", O_RDONLY|O_LARGEFILE) = 3 kfcntl(3, 12, 0x00000001100006C8) = 0 kfcntl(3, F_GETFL, 0x00000001100A6CF8) = 67108864 kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY klseek(3, 0, 1, 0x0FFFFFFFFFFFF3F0) = 0 kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY kread(3, "DEADBEEF\0\0\0\0FFFFFFFF".., 4096) = 4096 klseek(3, 0, 1, 0x0FFFFFFFFFFFF450) = 0 klseek(3, 17592186040320, 0, 0x0FFFFFFFFFFFF450) = 0 klseek(3, 0, 1, 0x0FFFFFFFFFFFF3F0) = 0 kread(3, "DEADBEEF\0\0\0\0FFFFFFFF".., 4096) Err#27 EFBIG An equivalent Linux trace: ltrace extra/innochecksum --page=18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd stat64(0x7fff10ea2dc3, 0x7fff10ea0670, 88, 0x8026be41) = 0 open64("./mysql-test/var/log/innodb_zip."..., 0, 02072403160) = 3 fcntl64(3, 6, 0x139f180, 1) = 0 fgetpos64(0x615000000080, 0x7fff10ea0760, 1, 0) = 0 fseeko64(0x615000000080, 0xffffffff000, 0, 5 <unfinished ...> pthread_getspecific(0, 0x4d0eb8, 0x7fff10ea0490, 0) = 0x7f7b2806d000 <... fseeko64 resumed> ) = 0 fgetpos64(0x615000000080, 0x7fff10ea0760, 1, 1) = 0 feof(0x615000000080) = 0 feof(0x615000000080) = 1 Error: Unable to seek to necessary offset
* | | | MDEV-25975: Merge 10.4 into 10.5Marko Mäkelä2022-04-061-12/+0
|\ \ \ \ | |/ / /
| * | | MDEV-25975: Merge 10.3 into 10.4Marko Mäkelä2022-04-061-12/+0
| |\ \ \ | | |/ /
| | * | 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.4 into 10.5Marko Mäkelä2022-04-061-22/+22
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2022-04-061-22/+22
| |\ \ \ | | |/ /
| | * | 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.4 into 10.5Marko Mäkelä2022-02-257-100/+342
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2022-02-257-100/+342
| |\ \ \ | | |/ /
| | * | 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.4' into 10.5Oleksandr Byelkin2022-02-014-0/+8
|\ \ \ \ | |/ / /
| * | | Merge branch '10.3' into 10.4Oleksandr Byelkin2022-01-301-0/+6
| |\ \ \ | | |/ /
| | * | 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.
| * | | MDEV-27373 wolfSSL 5.1.1Vladislav Vaintroub2022-01-252-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - compile wolfcrypt with kdf.c, to avoid undefined symbols in tls13.c - define WOLFSSL_HAVE_ERROR_QUEUE to avoid endless loop SSL_get_error - Do not use SSL_CTX_set_tmp_dh/get_dh2048, this would require additional compilation options in WolfSSL. Disable it for WolfSSL build, it works without it anyway. - fix "macro already defined" Windows warning.
| * | | WolfSSL v5.1.1Oleksandr Byelkin2022-01-251-0/+0
| | | |
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-11-292-3/+2
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2021-11-292-3/+2
| |\ \ \ | | |/ /
| | * | 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
| * | | improve build, allow sql library to be built in parallel with builtinsVladislav Vaintroub2021-11-091-2/+4
| | | |