summaryrefslogtreecommitdiff
path: root/extra
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup recent mariabackup validation patches.Vladislav Vaintroub2018-12-203-73/+93
| | | | | | | | | | | - Refactor code to isolate page validation in page_is_corrupted() function. - Introduce --extended-validation parameter(default OFF) for mariabackup --backup to enable decryption of encrypted uncompressed pages during backup. - mariabackup would still always check checksum on encrypted data, it is needed to detect partially written pages.
* MDEV-18025: Improve test case and consistency checksMarko Mäkelä2018-12-191-8/+30
| | | | | | | | | | | | Write a test case that computes valid crc32 checksums for an encrypted page, but zeroes out the payload area, so that the checksum after decryption fails. xb_fil_cur_read(): Validate the page number before trying any checksum calculation or decrypting or decompression. Also, skip zero-filled pages. For page_compressed pages, ensure that the FIL_PAGE_TYPE was changed. Also, reject FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED if no decryption was attempted.
* MDEV-18025 Mariabackup fails to detect corrupted page_compressed=1 tablesThirunarayanan Balathandayuthapani2018-12-181-4/+25
| | | | | | | | | | | | | | Problem: ======= Mariabackup seems to fail to verify the pages of compressed tables. The reason is that both fil_space_verify_crypt_checksum() and buf_page_is_corrupted() will skip the validation for compressed pages. Fix: ==== Mariabackup should call fil_page_decompress() for compressed and encrypted compressed page. After that, call buf_page_is_corrupted() to check the page corruption.
* Follow-up to MDEV-12112: corruption in encrypted table may be overlookedMarko Mäkelä2018-12-172-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The initial fix only covered a part of Mariabackup. This fix hardens InnoDB and XtraDB in a similar way, in order to reduce the probability of mistaking a corrupted encrypted page for a valid unencrypted one. This is based on work by Thirunarayanan Balathandayuthapani. fil_space_verify_crypt_checksum(): Assert that key_version!=0. Let the callers guarantee that. Now that we have this assertion, we also know that buf_page_is_zeroes() cannot hold. Also, remove all diagnostic output and related parameters, and let the relevant callers emit such messages. Last but not least, validate the post-encryption checksum according to the innodb_checksum_algorithm (only accepting one checksum for the strict variants), and no longer try to validate the page as if it was unencrypted. buf_page_is_zeroes(): Move to the compilation unit of the only callers, and declare static. xb_fil_cur_read(), buf_page_check_corrupt(): Add a condition before calling fil_space_verify_crypt_checksum(). This is a non-functional change. buf_dblwr_process(): Validate the page only as encrypted or unencrypted, but not both.
* MDEV-12112 corruption in encrypted table may be overlookedMarko Mäkelä2018-12-143-39/+61
| | | | | | | | | | | After validating the post-encryption checksum on an encrypted page, Mariabackup should decrypt the page and validate the pre-encryption checksum as well. This should reduce the probability of accepting invalid pages as valid ones. This is a backport and refactoring of a patch that was originally written by Thirunarayanan Balathandayuthapani for the 10.2 branch.
* Merge branch '10.0' into 10.1Sergei Golubchik2018-10-301-1/+1
|\
* | MDEV-12956 provide default datadir for mariabackup --copy-backVladislav Vaintroub2018-09-111-2/+33
| | | | | | | | | | | | | | | | On Unix, it is compiled-in datadir value. On Windows, the directory is ..\data, relative to directory mariabackup.exe server uses the same logic to determine datadir.
* | compiler warnings (clang 4.0.1 on i386)Sergei Golubchik2018-09-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | extra/mariabackup/fil_cur.cc:361:42: warning: format specifies type 'unsigned long' but the argument has type 'ib_int64_t' (aka 'long long') [-Wformat] extra/mariabackup/fil_cur.cc:376:9: warning: format specifies type 'unsigned long' but the argument has type 'ib_int64_t' (aka 'long long') [-Wformat] sql/handler.cc:6196:45: warning: format specifies type 'unsigned long' but the argument has type 'wsrep_trx_id_t' (aka 'unsigned long long') [-Wformat] sql/log.cc:1681:16: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] sql/log.cc:1687:16: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] sql/wsrep_sst.cc:1388:86: warning: format specifies type 'long' but the argument has type 'wsrep_seqno_t' (aka 'long long') [-Wformat] sql/wsrep_sst.cc:232:86: warning: format specifies type 'long' but the argument has type 'wsrep_seqno_t' (aka 'long long') [-Wformat] storage/connect/filamdbf.cpp:450:47: warning: format specifies type 'short' but the argument has type 'int' [-Wformat] storage/connect/filamdbf.cpp:970:47: warning: format specifies type 'short' but the argument has type 'int' [-Wformat] storage/connect/inihandl.cpp:197:16: warning: address of array 'key->name' will always evaluate to 'true' [-Wpointer-bool-conversion] storage/innobase/btr/btr0scrub.cc:151:17: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/innobase/buf/buf0buf.cc:5085:8: warning: nonnull parameter 'bpage' will evaluate to 'true' on first encounter [-Wpointer-bool-conversion] storage/innobase/fil/fil0crypt.cc:2454:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/innobase/handler/ha_innodb.cc:18685:7: warning: format specifies type 'unsigned long' but the argument has type 'wsrep_trx_id_t' (aka 'unsigned long long') [-Wformat] storage/innobase/row/row0mysql.cc:3319:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/innobase/row/row0mysql.cc:3327:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/maria/ma_norec.c:35:10: warning: implicit conversion from 'int' to 'my_bool' (aka 'char') changes value from 131 to -125 [-Wconstant-conversion] storage/maria/ma_norec.c:42:10: warning: implicit conversion from 'int' to 'my_bool' (aka 'char') changes value from 131 to -125 [-Wconstant-conversion] storage/maria/ma_test2.c:1009:12: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] storage/maria/ma_test2.c:1010:12: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] storage/mroonga/ha_mroonga.cpp:9189:44: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand] storage/mroonga/vendor/groonga/lib/expr.c:4987:22: warning: comparison of constant -1 with expression of type 'grn_operator' is always false [-Wtautological-constant-out-of-range-compare] storage/xtradb/btr/btr0scrub.cc:151:17: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/xtradb/buf/buf0buf.cc:5047:8: warning: nonnull parameter 'bpage' will evaluate to 'true' on first encounter [-Wpointer-bool-conversion] storage/xtradb/fil/fil0crypt.cc:2454:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/xtradb/row/row0mysql.cc:3324:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/xtradb/row/row0mysql.cc:3332:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] unittest/sql/mf_iocache-t.cc:120:35: warning: format specifies type 'unsigned long' but the argument has type 'int' [-Wformat] unittest/sql/mf_iocache-t.cc:96:35: note: expanded from macro 'INFO_TAIL'
* | Fix -Wclass-memaccess in WSREP,InnoDB,XtraDBMarko Mäkelä2018-08-032-5/+17
| |
* | Adopt Debian's fix-FTBFS-on-GNU-Hurd.patch.Sergei Petrunia2018-06-291-8/+22
| | | | | | | | | | | | | | - Took the original patch by Ondrej Sury; - Applied a fix for a known problem in the patch: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=882062 - Fixed a few other issues
* | MDEV-16105: Mariabackup does not support SSLVladislav Vaintroub2018-05-083-9/+11
| | | | | | | | The reason is the missing HAVE_OPENSSL define for mariabackup.
* | MDEV-15988 Crash in ./mtr mariabackup.undo_space_idMarko Mäkelä2018-04-241-2/+2
| | | | | | | | | | xb_assign_undo_space_start(): Correctly pass the length of the buffer, so that the file name will not be truncated.
* | MDEV-15779 - mariabackup incremental prepare fails on CIFS mount.Vladislav Vaintroub2018-04-121-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | CIFS does not like O_DIRECT flag (it is set successfully, but pread would fail). The fix is not to use O_DIRECT, there is not need for it. posix_fadvise() was used already that should prevent buffer cache pollution on Linux. As recommended by documentation of posix_fadvise(), we'll also fsync() tablespaces after a batch of writes.
* | MDEV-15780 : Mariabackup with absolute paths in innodb_data_file_pathVladislav Vaintroub2018-04-122-4/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | MDEV-15713 mariabackup: throw warning, if --stream is used without --backupVladislav Vaintroub2018-04-091-0/+4
| |
* | MDEV-15825 Mariabackup help mentions Percona and PXC but not MariaDBVladislav Vaintroub2018-04-092-2/+2
| |
* | compiler warningSergei Golubchik2018-03-241-1/+1
| | | | | | | | extra/mariabackup/ds_buffer.c:145:9: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
* | MDEV-13023 mariabackup does not preserve holes for page compressed tables.Vladislav Vaintroub2018-03-2311-166/+281
| | | | | | | | | | | | | | Changed "local" datasink logic to detect page compressed Innodb tables. Whenever such table is detected, holes in the copied files are created by skipping over binary zeros at the end of each compressed page.
* | MDEV-13561 Mariabackup is incompatible with retroactively created ↵Thirunarayanan Balathandayuthapani2018-03-222-1/+88
| | | | | | | | | | | | | | innodb_undo_tablespaces - Mariabackup supports starting undo tablespace id which is greater than 1.
* | Merge 10.0 into 10.1Marko Mäkelä2018-03-201-0/+10
|\ \ | |/
| * Merge 5.5 into 10.0Marko Mäkelä2018-03-201-0/+10
| |\
| | * MDEV-12190 YASSL isn't able to negotiate TLS version correctlyVladislav Vaintroub2018-03-141-0/+10
| | | | | | | | | | | | Backport from 10.2
* | | MDEV-14265 - RPMLint warning: shared-lib-calls-exitSergey Vojtovich2018-03-163-13/+9
| | | | | | | | | | | | Eliminated last exit() call from libmysqld.
* | | Fix a warning about possibly unused variableMarko Mäkelä2018-02-031-17/+6
| | | | | | | | | | | | xtrabackup_init_temp_log(): Remove a redundant variable and limit scope.
* | | Merge branch 'github/10.0' into 10.1Sergei Golubchik2018-02-021-1/+6
|\ \ \ | |/ /
* | | MDEV-14746 : read [mariabackup] section from config file.Vladislav Vaintroub2018-01-221-2/+2
| | |
* | | MDEV-14150 - backup should fail early if rsync is missingVladislav Vaintroub2018-01-221-3/+13
| | | | | | | | | | | | | | | check availability of rsync utility early , when starting backup with --rsync. Fail if it is not there.
* | | mariabackup : improve help textVladislav Vaintroub2018-01-221-1/+1
| | |
* | | MDEV-14874 innodb_encrypt_log corrupts the log when the LSN crosses 32-bit ↵Marko Mäkelä2018-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | boundary This bug affects both writing and reading encrypted redo log in MariaDB 10.1, starting from version 10.1.3 which added support for innodb_encrypt_log. That is, InnoDB crash recovery and Mariabackup will sometimes fail when innodb_encrypt_log is used. MariaDB 10.2 or Mariabackup 10.2 or later versions are not affected. log_block_get_start_lsn(): Remove. This function would cause trouble if a log segment that is being read is crossing a 32-bit boundary of the LSN, because this function does not allow the most significant 32 bits of the LSN to change. log_blocks_crypt(), log_encrypt_before_write(), log_decrypt_after_read(): Add the parameter "lsn" for the start LSN of the block. log_blocks_encrypt(): Remove (unused function).
* | | MDEV-14265 - RPMLint warning: shared-lib-calls-exitSergey Vojtovich2017-12-191-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | find_type_or_exit() client helper did exit(1) on error, exit(1) moved to clients. mysql_read_default_options() did exit(1) on error, error is passed through and handled now. my_str_malloc_default() did exit(1) on error, replaced my_str_ allocator functions with normal my_malloc()/my_realloc()/my_free(). sql_connect.cc did many exit(1) on hash initialisation failure. Removed error check since my_hash_init() never fails. my_malloc() did exit(1) on error. Replaced with abort(). my_load_defaults() did exit(1) on error, replaced with return 2. my_load_defaults() still does exit(0) when invoked with --print-defaults.
* | | MDEV-13620 - improve help message for 'plugin-dir' and 'plugin-load'Vladislav Vaintroub2017-12-181-2/+4
| | | | | | | | | | | | options.
* | | MDEV-14536 : In mariabackup, reread redo log blocks , if checksum mismatchVladislav Vaintroub2017-11-291-9/+22
| | | | | | | | | | | | | | | | | | is detected. The checksum mismatch can be due to partial write, thus retry the read
* | | MDEV-14447 mariabackup incremental incorrectly extends system tablespaceVladislav Vaintroub2017-11-241-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | for multi-file innodb_data_file_path. Use fil_extend_space_to_desired_size() to correctly extend system tablespace. Make sure to get tablespace size from the first tablespace part.
* | | MDEV-14283 : Fix compilation of mariabackup for gcc3.xVladislav Vaintroub2017-11-211-1/+1
| | |
* | | MDEV-14077 Incremental backup extremly slowVladislav Vaintroub2017-11-092-11/+12
| | | | | | | | | | | | | | | Remove the main bottleneck - the memset() call mentioned in the bug. Use os_mem_alloc_large() instead of malloc()/memset().
* | | MDEV-13560 Copy all innodb undo tablespaces from the backup directory to ↵Vladislav Vaintroub2017-11-031-15/+17
| | | | | | | | | | | | | | | | | | | | | destination. Do not check or rely on innodb_undo_tablespaces in copy-back, there is no good reason for that.
* | | MDEV-13496 Use "mariabackup" rather than "xtrabackup" in console outputMarko Mäkelä2017-10-253-23/+22
| | | | | | | | | | | | Replace the remaining "xtrabackup:" references in the code.
* | | MDEV-13496 Use "mariabackup" rather than "xtrabackup" in console outputVladislav Vaintroub2017-10-233-164/+158
| | |
* | | MDEV-14102 restore --remove-original options for mariabackupVladislav Vaintroub2017-10-231-0/+5
| | |
* | | Various compier warningsSergei Golubchik2017-10-222-4/+4
| | | | | | | | | | | | gcc 5.4 and 7.1, Debug and Release builds
* | | Merge branch '10.0' into 10.1Sergei Golubchik2017-10-226-17/+39
|\ \ \ | |/ /
| * | Merge branch '5.5' into 10.0Sergei Golubchik2017-10-186-17/+39
| |\ \ | | |/
| | * Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2017-10-174-8/+24
| | |\
| | | * Bug#26482173: TLS CIPHER NEGOTIATION INCORRECTLY MATCHES ONArun Kuruvila2017-08-247-164/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LAST BYTE ONLY (YASSL) Description:- TLS cipher negociation happens incorrectly leading to the use of a different Analysis:- YaSSL based MySQL server will compare only the last byte of each cipher sent in the Client Hello message. This can cause TLS connections to fail, due to the server picking a cipher which the client doesn't actually support. Fix:- A fix for detecting cipher suites with non leading zeros is included as YaSSL only supports cipher suites with leading zeros.
| | | * Bug #24740291: YASSL UPDATE TO 2.4.2Robert Golebiowski2016-09-2711-122/+274
| | | |
| | * | MDEV-13459 Warnings, when compiling with gcc-7.xSergei Golubchik2017-10-172-8/+14
| | | | | | | | | | | | | | | | mostly caused by -Wimplicit-fallthrough
* | | | MDEV-13310 Preparing an incremental backup twice can corrupt dataVladislav Vaintroub2017-10-071-1/+4
| | | | | | | | | | | | | | | | Remove .delta file after it was successfully applied
* | | | MDEV-13798 - fix incorrect alignment of the buffer in incremental backupVladislav Vaintroub2017-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | This incorrect alignment can later lead to memcpy over buffer boundaries, and to a crash.
* | | | MDEV-13822 mariabackup incremental prepare incorrectly sets file size.Vladislav Vaintroub2017-10-071-52/+11
| | | | | | | | | | | | | | | | | | | | Fix incremental prepare to change file size while applying delta file, if delta file contains page 0 with the new size.
* | | | Merge branch '10.0' into 10.1Vicențiu Ciorbaru2017-09-192-9/+0
|\ \ \ \ | |/ / /