summaryrefslogtreecommitdiff
path: root/extra
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-14975: Cleanup check_all_privileges()Marko Mäkelä2018-12-281-21/+10
| | | | | Remove an unused variable, and propagate the error to the caller instead of calling exit().
* Merge 10.3 into 10.4Marko Mäkelä2018-12-184-8/+190
|\
| * Merge 10.2 into 10.3Marko Mäkelä2018-12-184-8/+190
| |\
| | * Merge 10.1 into 10.2Marko Mäkelä2018-12-172-4/+18
| | |\
| | | * 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-14975 : fix last commit's typo.Vladislav Vaintroub2018-12-151-1/+1
| | | |
| | * | MDEV-14975 mariabackup starts with unprivileged user.Vladislav Vaintroub2018-12-142-5/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ported privilege checking from xtrabackup. Now, mariabackup would terminate early if either RELOAD or PROCESS privilege is not held, not at the very end of backup The behavior can be disabled with nre setting --check-privileges=0. Also , --no-lock does not need all of these privileges, since it skips FTWRL and SHOW ENGINE STATUS INNODB.
* | | | Merge 10.3 into 10.4Marko Mäkelä2018-12-141-21/+49
|\ \ \ \ | |/ / /
| * | | Merge 10.2 into 10.3Marko Mäkelä2018-12-141-21/+49
| |\ \ \ | | |/ /
| | * | Merge 10.1 into 10.2Marko Mäkelä2018-12-141-21/+49
| | |\ \ | | | |/
| | | * 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
| | | |\
| * | | \ Merge 10.2 into 10.3Marko Mäkelä2018-12-141-0/+3
| |\ \ \ \ | | |/ / /
| | * | | MDEV-17958: Make innochecksum follow the build optionMarko Mäkelä2018-12-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Innochecksum was being built as if WITH_INNODB_BUG_ENDIAN_CRC32:BOOL=OFF had been specified. Also, clean up tests: innodb.innochecksum: Useless; superceded by innodb_zip.innochecksum. innodb.innodb_zip_innochecksum: Remove; duplicated innodb_zip.innochecksum. innodb.innodb_zip_innochecksum2: Remove; duplicated innodb_zip.innochecksum_2. innodb.innodb_zip_innochecksum3: Remove; duplicated innodb_zip.innochecksum_3. No test case was added. I tested manually by adding debug instrumentation to both innochecksum and buf_page_is_checksum_valid_crc32() to make innochecksum write the buggy crc32, and to get warnings for falling back to the buggy checksum. Automating this would require that tests be adjusted depending on the build options.
* | | | | Replace dict_instant_t::non_pk_col_map with field_mapAleksey Midenkov2018-12-131-11/+1
| | | | |
* | | | | Fix lock_ddl_per_table handling in mariabackup.Vladislav Vaintroub2018-12-102-89/+2
| | | | | | | | | | | | | | | | | | | | | | | | | mariabackup.lock_ddl_per_table was broken, after MDEV-17772 got fixed. Fix removes MDL waiter killer, it is is not needed anymore.
* | | | | MDEV-17308 mariabackup to use the BACKUP statement instead of FTWRLVladislav Vaintroub2018-12-092-31/+21
| | | | |
* | | | | Changed some MySQL names in messages to MariaDBMonty2018-12-092-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | - Remove obsolete documentation files - Removed old obsolete information from some documentation files
* | | | | More InnoDB preprocessor cleanupMarko Mäkelä2018-11-301-15/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unnecessary #include. Remove references to UNIV_MATERIALIZE, UNIV_INLINE_ORIGINAL, UNIV_NONINL that are never defined.
* | | | | Merge 10.3 into 10.4Marko Mäkelä2018-11-302-2/+0
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.2 into 10.3Marko Mäkelä2018-11-302-2/+0
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | | | | | | Also, related to MDEV-15522, MDEV-17304, MDEV-17835, remove the Galera xtrabackup tests, because xtrabackup never worked with MariaDB Server 10.3 due to InnoDB redo log format changes.
| | * | | Remove some unnecessary InnoDB #includeMarko Mäkelä2018-11-292-2/+0
| | | | |
* | | | | Merge 10.3 into 10.4Marko Mäkelä2018-11-282-58/+15
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.2 into 10.3Marko Mäkelä2018-11-282-58/+15
| |\ \ \ \ | | |/ / /
| | * | | MDEV-17849 Undo tablespace truncation recovery fails to shrink fileMarko Mäkelä2018-11-272-56/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fil_space_t::add(): Replaces fil_node_create(), fil_node_create_low(). Let the caller pass fil_node_t::handle, to avoid having to close and re-open files. fil_node_t::read_page0(): Refactored from fil_node_open_file(). Read the first page of a data file. fil_node_open_file(): Open the file only once. srv_undo_tablespace_open(): Set the file handle for the opened undo tablespace. This should ensure that ut_ad(file->is_open()) no longer fails in recv_add_trim(). xtrabackup_backup_func(): Remove some dead code. xb_fil_cur_open(): Open files only if needed. Undo tablespaces should already have been opened.
| | * | | Remove the redundant variable fil_n_file_openedMarko Mäkelä2018-11-271-2/+0
| | | | |
* | | | | Merge 10.3 into 10.4Marko Mäkelä2018-11-261-4/+12
|\ \ \ \ \ | |/ / / /
| * | | | Fixed compiler warningsMonty2018-11-211-4/+12
| | | | |
* | | | | Merge 10.3 into 10.4Marko Mäkelä2018-11-065-38/+39
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.2 into 10.3Marko Mäkelä2018-11-065-38/+39
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | main.derived_cond_pushdown: Move all 10.3 tests to the end, trim trailing white space, and add an "End of 10.3 tests" marker. Add --sorted_result to tests where the ordering is not deterministic. main.win_percentile: Add --sorted_result to tests where the ordering is no longer deterministic.
| | * | | MDEV-17195 Speedup lock-ddl-per-table, if there is a large number of tablesVladislav Vaintroub2018-10-311-29/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Query INFORMATION_SCHEMA.INNODB_SYS_TABLES only once, and cache results. As a small cleanup, remove mdl_lock_con_mutex, the MDL handling connection is never accessed by multiple threads at the same time.
| | * | | MDEV-14267: correct FSF addressDaniel Black2018-10-305-9/+9
| | | | |
| | * | | MDEV-13564 Mariabackup does not work with TRUNCATEMarko Mäkelä2018-09-251-6/+2
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement undo tablespace truncation via normal redo logging. Implement TRUNCATE TABLE as a combination of RENAME to #sql-ib name, CREATE, and DROP.
* | | | | | my_print_defaults: remove --config-file/extra-fileDaniel Black2018-10-311-26/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There have been deprecated since before 5.5 Closes #548
* | | | | | Merge 10.3 into 10.4Marko Mäkelä2018-10-054-100/+179
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge branch '10.2' into 10.3Sergei Golubchik2018-09-284-100/+180
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge branch '10.1' into 10.2Sergei Golubchik2018-09-241-2/+33
| | |\ \ \ \ | | | | |/ / | | | |/| |
| | | * | | 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.
| | * | | | Fix mariabackup leaks (except my_load_defaults)Marko Mäkelä2018-09-213-22/+27
| | | | | |
| | * | | | Windows : Fix application verifier errors.Vladislav Vaintroub2018-09-202-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make different threads that are running data_copy_thread_func() use the same pthread_mutex for locking (not the copies of the same pthread_mutex_t).
| | * | | | Amend fix for MDEV-17236Vladislav Vaintroub2018-09-201-17/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify, and make it work with system tablespace outside of innodb data home. Also, do not reread TRX_SYS page in endless loop, if it appears to be corrupted. Use finite number of attempts.
| | * | | | MDEV-17236 mariabackup incorrectly tries to open ibdata1Thirunarayanan Balathandayuthapani2018-09-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if custom undo tablespace is defined - In case of multiple undo tablespace, mariabackup have to open system tablespace to find the list of undo tablespace present in TRX_SYS page. For opening system tablespace, mariabackup should fetch the file name from already initialized system tablespace object.
| | * | | | Follow-up to "Fixed wrong printf in mariabackup"Marko Mäkelä2018-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This amends commit 4dc20ff687d50b2a5d889653c11674fb1d310cf8. Starting with MariaDB 10.2, InnoDB defines typedef size_t ulint; The standard format for size_t uses the z modifier, for example, "%zu" as in the macro ULINTPF. "%lu" is wrong for size_t, because sizeof(unsigned long) can be something else than sizeof(size_t). On Windows, the former would always be 4 bytes, while size_t would be 4 or 8 bytes.
| | * | | | Fixed wrong printf in mariabackupMichael Widenius2018-09-161-1/+1
| | | | | |
| | * | | | MDEV-17192 Backup with -no-lock should fail, if DDL is detected at the end ↵Vladislav Vaintroub2018-09-141-5/+65
| | | | | | | | | | | | | | | | | | | | | | | | of backup
| | * | | | Merge branch '10.1' into 10.2Oleksandr Byelkin2018-09-141-33/+33
| | |\ \ \ \ | | | |/ / /
| | | * | | 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'
| | * | | | MDEV-17168 mariabackup reports "failed to open bitmap directory"Vladislav Vaintroub2018-09-111-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MariaDB does not support changed page tracking, since 10.2. Remove bitmap initialization
* | | | | | MDEV-13564: Remove old crash-upgrade logic in 10.4Marko Mäkelä2018-09-111-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stop supporting the additional *trunc.log files that were introduced via MySQL 5.7 to MariaDB Server 10.2 and 10.3. DB_TABLESPACE_TRUNCATED: Remove. purge_sys.truncate: A new structure to track undo tablespace file truncation. srv_start(): Remove the call to buf_pool_invalidate(). It is no longer necessary, given that we no longer access things in ways that violate the ARIES protocol. This call was originally added for innodb_file_format, and it may later have been necessary for the proper function of the MySQL 5.7 TRUNCATE recovery, which we are now removing. trx_purge_cleanse_purge_queue(): Take the undo tablespace as a parameter. trx_purge_truncate_history(): Rewrite everything mostly in a single function, replacing references to undo::Truncate. recv_apply_hashed_log_recs(): If any redo log is to be applied, and if the log_sys.log.subformat indicates that separately logged truncate may have been used, refuse to proceed except if innodb_force_recovery is set. We will still refuse crash-upgrade if TRUNCATE TABLE was logged. Undo tablespace truncation would only be logged in undo*trunc.log files, which we are no longer checking for.
* | | | | | Merge 10.3 into 10.4Marko Mäkelä2018-09-111-6/+1
|\ \ \ \ \ \ | |/ / / / /