summaryrefslogtreecommitdiff
path: root/extra
Commit message (Collapse)AuthorAgeFilesLines
* 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
|\ \ \ \ \ | |/ / / /
| * | | | MDEV-13564 Mariabackup does not work with TRUNCATEMarko Mäkelä2018-09-071-6/+1
| |\ \ \ \ | | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a merge from 10.2, but the 10.2 version of this will not be pushed into 10.2 yet, because the 10.2 version would include backports of MDEV-14717 and MDEV-14585, which would introduce a crash recovery regression: Tables could be lost on table-rebuilding DDL operations, such as ALTER TABLE, OPTIMIZE TABLE or this new backup-friendly TRUNCATE TABLE. The test innodb.truncate_crash occasionally loses the table due to the following bug: MDEV-17158 log_write_up_to() sometimes fails
| | * | | MDEV-14717: Prevent crash-downgrade to earlier MariaDB 10.2Marko Mäkelä2018-09-071-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A crash-downgrade of a RENAME (or TRUNCATE or table-rebuilding ALTER TABLE or OPTIMIZE TABLE) operation to an earlier 10.2 version would trigger a debug assertion failure during rollback, in trx_roll_pop_top_rec_of_trx(). In a non-debug build, the TRX_UNDO_RENAME_TABLE record would be misinterpreted as an update_undo log record, and typically the file name would be interpreted as DB_TRX_ID,DB_ROLL_PTR,PRIMARY KEY. If a matching record would be found, row_undo_mod() would hit ut_error in switch (node->rec_type). Typically, ut_a(table2 == NULL) would fail when opening the table from SQL. Because of this, we prevent a crash-downgrade to earlier MariaDB 10.2 versions by changing the InnoDB redo log format identifier to the 10.3 identifier, and by introducing a subformat identifier so that 10.2 can continue to refuse crash-downgrade from 10.3 or later. After a clean shutdown, a downgrade to MariaDB 10.2.13 or later would still be possible thanks to MDEV-14909. A downgrade to older 10.2 versions is only possible after removing the log files (not recommended). LOG_HEADER_FORMAT_CURRENT: Change to 103 (originally the 10.3 format). log_group_t: Add subformat. For 10.2, we will use subformat 1, and will refuse crash recovery from any other subformat of the 10.3 format, that is, a genuine 10.3 redo log. recv_find_max_checkpoint(): Allow startup after clean shutdown from a future LOG_HEADER_FORMAT_10_4 (unencrypted only). We cannot handle the encrypted 10.4 redo log block format, which was introduced in MDEV-12041. Allow crash recovery from the original 10.2 format as well as the new format. In Mariabackup --backup, do not allow any startup from 10.3 or 10.4 redo logs. recv_recovery_from_checkpoint_start(): Skip redo log apply for clean 10.3 redo log, but not for the new 10.2 redo log (10.3 format, subformat 1). srv_prepare_to_delete_redo_log_files(): On format or subformat mismatch, set srv_log_file_size = 0, so that we will display the correct message. innobase_start_or_create_for_mysql(): Check for format or subformat mismatch. xtrabackup_backup_func(): Remove debug assertions that were made redundant by the code changes in recv_find_max_checkpoint().
| | * | | MDEV-13564 Mariabackup does not work with TRUNCATEMarko Mäkelä2018-09-071-0/+1
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement undo tablespace truncation via normal redo logging. Implement TRUNCATE TABLE as a combination of RENAME to #sql-ib name, CREATE, and DROP. Note: Orphan #sql-ib*.ibd may be left behind if MariaDB Server 10.2 is killed before the DROP operation is committed. If MariaDB Server 10.2 is killed during TRUNCATE, it is also possible that the old table was renamed to #sql-ib*.ibd but the data dictionary will refer to the table using the original name. In MariaDB Server 10.3, RENAME inside InnoDB is transactional, and #sql-* tables will be dropped on startup. So, this new TRUNCATE will be fully crash-safe in 10.3. ha_mroonga::wrapper_truncate(): Pass table options to the underlying storage engine, now that ha_innobase::truncate() will need them. rpl_slave_state::truncate_state_table(): Before truncating mysql.gtid_slave_pos, evict any cached table handles from the table definition cache, so that there will be no stale references to the old table after truncating. == TRUNCATE TABLE == WL#6501 in MySQL 5.7 introduced separate log files for implementing atomic and crash-safe TRUNCATE TABLE, instead of using the InnoDB undo and redo log. Some convoluted logic was added to the InnoDB crash recovery, and some extra synchronization (including a redo log checkpoint) was introduced to make this work. This synchronization has caused performance problems and race conditions, and the extra log files cannot be copied or applied by external backup programs. In order to support crash-upgrade from MariaDB 10.2, we will keep the logic for parsing and applying the extra log files, but we will no longer generate those files in TRUNCATE TABLE. A prerequisite for crash-safe TRUNCATE is a crash-safe RENAME TABLE (with full redo and undo logging and proper rollback). This will be implemented in MDEV-14717. ha_innobase::truncate(): Invoke RENAME, create(), delete_table(). Because RENAME cannot be fully rolled back before MariaDB 10.3 due to missing undo logging, add some explicit rename-back in case the operation fails. ha_innobase::delete(): Introduce a variant that takes sqlcom as a parameter. In TRUNCATE TABLE, we do not want to touch any FOREIGN KEY constraints. ha_innobase::create(): Add the parameters file_per_table, trx. In TRUNCATE, the new table must be created in the same transaction that renames the old table. create_table_info_t::create_table_info_t(): Add the parameters file_per_table, trx. row_drop_table_for_mysql(): Replace a bool parameter with sqlcom. row_drop_table_after_create_fail(): New function, wrapping row_drop_table_for_mysql(). dict_truncate_index_tree_in_mem(), fil_truncate_tablespace(), fil_prepare_for_truncate(), fil_reinit_space_header_for_table(), row_truncate_table_for_mysql(), TruncateLogger, row_truncate_prepare(), row_truncate_rollback(), row_truncate_complete(), row_truncate_fts(), row_truncate_update_system_tables(), row_truncate_foreign_key_checks(), row_truncate_sanity_checks(): Remove. row_upd_check_references_constraints(): Remove a check for TRUNCATE, now that the table is no longer truncated in place. The new test innodb.truncate_foreign uses DEBUG_SYNC to cover some race-condition like scenarios. The test innodb-innodb.truncate does not use any synchronization. We add a redo log subformat to indicate backup-friendly format. MariaDB 10.4 will remove support for the old TRUNCATE logging, so crash-upgrade from old 10.2 or 10.3 to 10.4 will involve limitations. == Undo tablespace truncation == MySQL 5.7 implements undo tablespace truncation. It is only possible when innodb_undo_tablespaces is set to at least 2. The logging is implemented similar to the WL#6501 TRUNCATE, that is, using separate log files and a redo log checkpoint. We can simply implement undo tablespace truncation within a single mini-transaction that reinitializes the undo log tablespace file. Unfortunately, due to the redo log format of some operations, currently, the total redo log written by undo tablespace truncation will be more than the combined size of the truncated undo tablespace. It should be acceptable to have a little more than 1 megabyte of log in a single mini-transaction. This will be fixed in MDEV-17138 in MariaDB Server 10.4. recv_sys_t: Add truncated_undo_spaces[] to remember for which undo tablespaces a MLOG_FILE_CREATE2 record was seen. namespace undo: Remove some unnecessary declarations. fil_space_t::is_being_truncated: Document that this flag now only applies to undo tablespaces. Remove some references. fil_space_t::is_stopping(): Do not refer to is_being_truncated. This check is for tablespaces of tables. Potentially used tablespaces are never truncated any more. buf_dblwr_process(): Suppress the out-of-bounds warning for undo tablespaces. fil_truncate_log(): Write a MLOG_FILE_CREATE2 with a nonzero page number (new size of the tablespace in pages) to inform crash recovery that the undo tablespace size has been reduced. fil_op_write_log(): Relax assertions, so that MLOG_FILE_CREATE2 can be written for undo tablespaces (without .ibd file suffix) for a nonzero page number. os_file_truncate(): Add the parameter allow_shrink=false so that undo tablespaces can actually be shrunk using this function. fil_name_parse(): For undo tablespace truncation, buffer MLOG_FILE_CREATE2 in truncated_undo_spaces[]. recv_read_in_area(): Avoid reading pages for which no redo log records remain buffered, after recv_addr_trim() removed them. trx_rseg_header_create(): Add a FIXME comment that we could write much less redo log. trx_undo_truncate_tablespace(): Reinitialize the undo tablespace in a single mini-transaction, which will be flushed to the redo log before the file size is trimmed. recv_addr_trim(): Discard any redo logs for pages that were logged after the new end of a file, before the truncation LSN. If the rec_list becomes empty, reduce n_addrs. After removing any affected records, actually truncate the file. recv_apply_hashed_log_recs(): Invoke recv_addr_trim() right before applying any log records. The undo tablespace files must be open at this point. buf_flush_or_remove_pages(), buf_flush_dirty_pages(), buf_LRU_flush_or_remove_pages(): Add a parameter for specifying the number of the first page to flush or remove (default 0). trx_purge_initiate_truncate(): Remove the log checkpoints, the extra logging, and some unnecessary crash points. Merge the code from trx_undo_truncate_tablespace(). First, flush all to-be-discarded pages (beyond the new end of the file), then trim the space->size to make the page allocation deterministic. At the only remaining crash injection point, flush the redo log, so that the recovery can be tested.
* | | | Merge 10.3 into 10.4Marko Mäkelä2018-09-112-17/+64
|\ \ \ \ | |/ / /
| * | | Merge 10.2 into 10.3Marko Mäkelä2018-09-072-9/+48
| |\ \ \ | | |/ /
| | * | MDEV-16671 - crash in mariabackup with my.cnf with plugin-load=ha_rocksdbVladislav Vaintroub2018-09-072-9/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove plugin-load option from mariabackup. It does not needed to be an option (we only need to store the plugin-load value during backup phase, and reuse the same value during --prepare). Fix is to read plugin-load from backup-my.cnf during prepare.
| * | | Merge 10.2 into 10.3Marko Mäkelä2018-09-061-1/+1
| |\ \ \ | | |/ /
| | * | MDEV-17149 mariabackup hangs if innodb is not startedVladislav Vaintroub2018-09-061-1/+1
| | | | | | | | | | | | | | | | Fix exit condition for the log copying thread.
| * | | Merge 10.2 into 10.3Marko Mäkelä2018-08-281-7/+15
| |\ \ \ | | |/ /
| | * | MDEV-13564: Refuse MLOG_TRUNCATE in mariabackupMarko Mäkelä2018-08-161-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MySQL 5.7 TRUNCATE TABLE is inherently incompatible with hot backup, because it is creating and deleting a separate log file, and it is not writing redo log for all changes of the InnoDB data dictionary tables. Refuse to create a corrupted backup if the unsafe form of TRUNCATE was executed. Note: Undo log tablespace truncation cannot be detected easily. Also it is incompatible with backup, for similar reasons. xtrabackup_backup_func(): "Subscribe to" the log events before the first invocation of xtrabackup_copy_logfile(). recv_parse_or_apply_log_rec_body(): If the function pointer log_truncate is set, invoke it to report MLOG_TRUNCATE.
| | * | MDEV-16996 mariabackup --prepare does not use native AIO on Linux by defaultVladislav Vaintroub2018-08-161-1/+1
| | | |
* | | | Merge 10.3 into 10.4Marko Mäkelä2018-08-1610-81/+651
|\ \ \ \ | |/ / /
| * | | After-merge fix: Restore DECLARE_THREAD to fix Windows buildMarko Mäkelä2018-08-161-1/+1
| | | |
| * | | Merge 10.2 into 10.3Marko Mäkelä2018-08-166-60/+593
| |\ \ \ | | |/ /
| | * | MDEV-16791 mariabackup : Support DDL commands during backupVladislav Vaintroub2018-08-146-57/+583
| | | |
| | * | MDEV-15680 xb_aws_key_management fails in buildbot.Vladislav Vaintroub2018-08-131-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aws_key_management needs current directory to be datadir during initalization, it scans current directory for encrypted keys. Fix is to ensure, that plugin initialization in mariabackup happens after the call to my_setwd(mysql_real_data_home).
| * | | Merge branch '10.2' into 10.3Sergei Golubchik2018-08-121-1/+1
| |\ \ \ | | |/ /
| | * | compiler warningSergei Golubchik2018-08-091-1/+1
| | | | | | | | | | | | | | | | warning: suggest a space before ‘;’ or explicit braces around empty body in ‘for’ statement