summaryrefslogtreecommitdiff
path: root/mysql-test/suite/encryption/t
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-30205: /usr/share/mysql-test -> mariadb-test (fix)Daniel Black2023-04-111-0/+1
| | | | | A suppression was needed for encryption.innodb-bad-key-change due to the path change.
* Merge 11.0 into 11.1Marko Mäkelä2023-03-172-0/+3
|\
| * Merge 10.11 into 11.0Marko Mäkelä2023-03-172-0/+3
| |\
| | * Merge 10.8 into 10.9Marko Mäkelä2023-03-172-0/+3
| | |\
| | | * Merge 10.6 into 10.8Marko Mäkelä2023-03-162-0/+3
| | | |\
| | | | * Merge 10.5 into 10.6Marko Mäkelä2023-03-162-0/+3
| | | | |\
* | | | | | MDEV-30545 Remove innodb_defragment and related parametersMarko Mäkelä2023-03-113-53/+0
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The deprecated parameters will be removed: innodb_defragment innodb_defragment_n_pages innodb_defragment_stats_accuracy innodb_defragment_fill_factor_n_recs innodb_defragment_fill_factor innodb_defragment_frequency The mysql.innodb_index_stats.stat_name values 'n_page_split' and 'n_pages_freed' will lose their special meaning. The related changes to OPTIMIZE TABLE in InnoDB will be removed as well. The parameter innodb_optimize_fulltext_only will retain its special meaning in OPTIMIZE TABLE. Tested by: Matthias Leich
* | | | | Merge 10.11 into 11.0Marko Mäkelä2023-02-161-0/+1
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.8' into 10.9Oleksandr Byelkin2023-01-311-0/+1
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '10.7' into 10.8Oleksandr Byelkin2023-01-311-0/+1
| | |\ \ \
| | | * \ \ Merge branch '10.6' into 10.7Oleksandr Byelkin2023-01-311-0/+1
| | | |\ \ \ | | | | |/ /
| | | | * | MDEV-29374 fixup: Suppress an error in a testMarko Mäkelä2023-01-251-0/+1
| | | | | |
* | | | | | MDEV-29694 Remove the InnoDB change bufferMarko Mäkelä2023-01-112-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of the change buffer was to reduce random disk access, which could be useful on rotational storage, but maybe less so on solid-state storage. When we wished to (1) insert a record into a non-unique secondary index, (2) delete-mark a secondary index record, (3) delete a secondary index record as part of purge (but not ROLLBACK), and the B-tree leaf page where the record belongs to is not in the buffer pool, we inserted a record into the change buffer B-tree, indexed by the page identifier. When the page was eventually read into the buffer pool, we looked up the change buffer B-tree for any modifications to the page, applied these upon the completion of the read operation. This was called the insert buffer merge. We remove the change buffer, because it has been the source of various hard-to-reproduce corruption bugs, including those fixed in commit 5b9ee8d8193a8c7a8ebdd35eedcadc3ae78e7fc1 and commit 165564d3c33ae3d677d70644a83afcb744bdbf65 but not limited to them. A downgrade will fail with a clear message starting with commit db14eb16f9977453467ec4765f481bb2f71814ba (MDEV-30106). buf_page_t::state: Merge IBUF_EXIST to UNFIXED and WRITE_FIX_IBUF to WRITE_FIX. buf_pool_t::watch[]: Remove. trx_t: Move isolation_level, check_foreigns, check_unique_secondary, bulk_insert into the same bit-field. The only purpose of trx_t::check_unique_secondary is to enable bulk insert into an empty table. It no longer enables insert buffering for UNIQUE INDEX. btr_cur_t::thr: Remove. This field was originally needed for change buffering. Later, its use was extended to cover SPATIAL INDEX. Much of the time, rtr_info::thr holds this field. When it does not, we will add parameters to SPATIAL INDEX specific functions. ibuf_upgrade_needed(): Check if the change buffer needs to be updated. ibuf_upgrade(): Merge and upgrade the change buffer after all redo log has been applied. Free any pages consumed by the change buffer, and zero out the change buffer root page to mark the upgrade completed, and to prevent a downgrade to an earlier version. dict_load_tablespaces(): Renamed from dict_check_tablespaces_and_store_max_id(). This needs to be invoked before ibuf_upgrade(). btr_cur_open_at_rnd_pos(): Specialize for use in persistent statistics. The change buffer merge does not need this function anymore. btr_page_alloc(): Renamed from btr_page_alloc_low(). We no longer allocate any change buffer pages. btr_cur_open_at_rnd_pos(): Specialize for use in persistent statistics. The change buffer merge does not need this function anymore. row_search_index_entry(), btr_lift_page_up(): Add a parameter thr for the SPATIAL INDEX case. rtr_page_split_and_insert(): Specialized from btr_page_split_and_insert(). rtr_root_raise_and_insert(): Specialized from btr_root_raise_and_insert(). Note: The support for upgrading from the MySQL 3.23 or MySQL 4.0 change buffer format that predates the MySQL 4.1 introduction of the option innodb_file_per_table was removed in MySQL 5.6.5 as part of mysql/mysql-server@69b6241a79876ae98bb0c9dce7c8d8799d6ad273 and MariaDB 10.0.11 as part of 1d0f70c2f894b27e98773a282871d32802f67964. In the tests innodb.log_upgrade and innodb.log_corruption, we create valid (upgraded) change buffer pages. Tested by: Matthias Leich
* | | | | | MDEV-29983 Deprecate innodb_file_per_tableMarko Mäkelä2023-01-1112-22/+0
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before commit 6112853cdab2770e92f9cfefdfef9c0a14b71cb7 in MySQL 4.1.1 introduced the parameter innodb_file_per_table, all InnoDB data was written to the InnoDB system tablespace (often named ibdata1). A serious design problem is that once the system tablespace has grown to some size, it cannot shrink even if the data inside it has been deleted. There are also other design problems, such as the server hang MDEV-29930 that should only be possible when using innodb_file_per_table=0 and innodb_undo_tablespaces=0 (storing both tables and undo logs in the InnoDB system tablespace). The parameter innodb_change_buffering was deprecated in commit b5852ffbeebc3000982988383daeefb0549e058a. Starting with commit baf276e6d4a44fe7cdf3b435c0153da0a42af2b6 (MDEV-19229) the number of innodb_undo_tablespaces can be increased, so that the undo logs can be moved out of the system tablespace of an existing installation. If all these things (tables, undo logs, and the change buffer) are removed from the InnoDB system tablespace, the only variable-size data structure inside it is the InnoDB data dictionary. DDL operations on .ibd files was optimized in commit 86dc7b4d4cfe15a2d37f8b5f60c4fce5dba9491d (MDEV-24626). That should have removed any thinkable performance advantage of using innodb_file_per_table=0. Since there should be no benefit of setting innodb_file_per_table=0, the parameter should be deprecated. Starting with MySQL 5.6 and MariaDB Server 10.0, the default value is innodb_file_per_table=1.
* | | | | Merge branch '10.8' into 10.9Daniel Black2022-12-151-0/+2
|\ \ \ \ \ | |/ / / /
| * | | | Add missing error suppressionMarko Mäkelä2022-12-141-0/+2
| |/ / /
* | | | Merge 10.8 into 10.9Marko Mäkelä2022-11-306-12/+20
|\ \ \ \ | |/ / /
| * | | Merge 10.6 into 10.7Marko Mäkelä2022-11-306-12/+20
| |\ \ \ | | |/ /
| | * | MDEV-30119 INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION.NAME is NULL for ↵Thirunarayanan Balathandayuthapani2022-11-296-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | undo tablespaces - Information_schema.innodb_tablespaces_encryption should print undo tablespace name as innodb_undo001, innodb_undo002 and soon. - Encryption test should include undo tablespaces count when the tests are waiting for the condition to check whether all tables are encrypted or decrypted.
* | | | Merge 10.8 into 10.9Marko Mäkelä2022-11-241-3/+3
|\ \ \ \ | |/ / /
| * | | Merge 10.6 into 10.7Marko Mäkelä2022-11-241-3/+3
| |\ \ \ | | |/ /
| | * | Merge 10.5 into 10.6Marko Mäkelä2022-11-231-3/+3
| | |\ \ | | | |/
| | | * MDEV-30068 Confusing error message when encryption is not available on recoveryMarko Mäkelä2022-11-221-3/+3
| | | | | | | | | | | | | | | | | | | | fil_name_process(): If fil_ibd_load() returns FIL_LOAD_INVALID, display the file name and the tablespace identifier.
* | | | Merge 10.8 into 10.9Marko Mäkelä2022-11-211-0/+14
|\ \ \ \ | |/ / /
| * | | Merge 10.6 into 10.7Marko Mäkelä2022-11-171-0/+14
| |\ \ \ | | |/ /
| | * | Merge 10.5 into 10.6Marko Mäkelä2022-11-171-1/+1
| | |\ \ | | | |/
| | | * MDEV-29982 fixup: Relax the testMarko Mäkelä2022-11-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The log overwrite warnings are not being reliably emitted in all debug-instrumented environments. It may be related to the scheduling of some InnoDB internal activity, such as the purging of committed transaction history.
| | * | Merge 10.5 into 10.6Marko Mäkelä2022-11-141-0/+14
| | |\ \ | | | |/
| | | * MDEV-29982 Improve the InnoDB log overwrite error messageMarko Mäkelä2022-11-141-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The InnoDB write-ahead log ib_logfile0 is of fixed size, specified by innodb_log_file_size. If the tail of the log manages to overwrite the head (latest checkpoint) of the log, crash recovery will be broken. Let us clarify the messages about this, including adding a message on the completion of a log checkpoint that notes that the dangerous situation is over. To reproduce the dangerous scenario, we will introduce the debug injection label ib_log_checkpoint_avoid_hard, which will avoid log checkpoints even harder than the previous ib_log_checkpoint_avoid. log_t::overwrite_warned: The first known dangerous log sequence number. Set in log_close() and cleared in log_write_checkpoint_info(), which will output a "Crash recovery was broken" message.
* | | | Merge branch '10.8' into 10.9Oleksandr Byelkin2022-11-017-0/+32
|\ \ \ \ | |/ / /
| * | | Merge branch '10.6' into 10.7Oleksandr Byelkin2022-10-297-0/+32
| |\ \ \ | | |/ /
| | * | Merge 10.5 into 10.6Marko Mäkelä2022-10-257-0/+32
| | |\ \ | | | |/ | | | | | | | | | | | | | | | | To prevent ASAN heap-use-after-poison in the MDEV-16549 part of ./mtr --repeat=6 main.derived the initialization of Name_resolution_context was cleaned up.
| | | * Merge 10.4 into 10.5Marko Mäkelä2022-10-257-0/+32
| | | |\
| | | | * Merge 10.3 into 10.4Marko Mäkelä2022-10-257-0/+32
| | | | |\
| | | | | * MDEV-25343 Error log message not helpful when filekey is too longkurt2022-10-217-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a test related to the Encrypted Key File by following instructions in kb example https://mariadb.com/kb/en/file-key-management-encryption-plugin/#creating-the-key-file Reviewed by Daniel Black (with minor formatting and re-org of duplicate close(f) calls).
| | | | | * Revert "MDEV-25343 add read secret size in file key plugin"Daniel Black2022-10-193-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cee7175b79a22c29a82ef328aba208f90afcea86.
| | | | | * MDEV-25343 add read secret size in file key pluginkurt2022-10-193-0/+11
| | | | | |
* | | | | | Merge branch '10.8' into 10.9Oleksandr Byelkin2022-10-041-1/+0
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge branch '10.6' into 10.7Oleksandr Byelkin2022-10-041-1/+0
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge 10.5 into 10.6Marko Mäkelä2022-09-261-1/+0
| | |\ \ \ \ | | | |/ / /
| | | * | | Merge 10.4 into 10.5Marko Mäkelä2022-09-261-1/+0
| | | |\ \ \ | | | | |/ /
| | | | * | MDEV-29613 Improve WITH_DBUG_TRACE=OFFMarko Mäkelä2022-09-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 28325b08633372cc343dfcbc41fe252020cf6e6e a compile-time option was introduced to disable the macros DBUG_ENTER and DBUG_RETURN or DBUG_VOID_RETURN. The parameter name WITH_DBUG_TRACE would hint that it also covers DBUG_PRINT statements. Let us do that: WITH_DBUG_TRACE=OFF shall disable DBUG_PRINT() as well. A few InnoDB recovery tests used to check that some output from DBUG_PRINT("ib_log", ...) is present. We can live without those checks. Reviewed by: Vladislav Vaintroub
* | | | | | Merge 10.8 into 10.9Jan Lindström2022-09-062-0/+2
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge 10.6 into 10.7Jan Lindström2022-09-052-0/+2
| |\ \ \ \ \ | | |/ / / /
| | * | | | MDEV-29374 InnoDB recovery fails with "Data structure corruption"Marko Mäkelä2022-08-312-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | recv_sys_t::free_corrupted_page(): Identify the corrupted page in an error or warning message. buf_page_free(): Just in case, register the page as modified. This should already have been done in mtr_t::free() as part of fseg_free_page_low(). mtr_t::memo_push(): Simplify a condition, so that when invoked with MTR_MEMO_PAGE_X_MODIFY, we will do the right thing. fseg_free_page_low(): Remove an accidentally added return statement that prevented mtr_t::free() from being called. This fixes a regression that was introduced in commit 0b47c126e31cddda1e94588799599e138400bcf8 (MDEV-13542).
* | | | | | Merge branch '10.8' into 10.9Oleksandr Byelkin2022-08-096-6/+6
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge branch '10.6' into 10.7Oleksandr Byelkin2022-08-086-6/+6
| |\ \ \ \ \ | | |/ / / /
| | * | | | MDEV-13542 fixup: Improve a recovery error messageMarko Mäkelä2022-08-056-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A message used to say "failed to read or decrypt" but the "or decrypt" part was removed in commit 0b47c126e31cddda1e94588799599e138400bcf8 without adjusting rarely needed error message suppressions in some encryption tests. Let us improve the error message so that it mentions the file name, and adjust all error message suppressions in tests. Thanks to Oleksandr Byelkin for noticing one test failure.
* | | | | | Merge 10.8 into 10.9Marko Mäkelä2022-07-282-0/+12
|\ \ \ \ \ \ | |/ / / / /
| * | | | | MDEV-28679 After upgrade to 10.7.3-1 with enabled data-at-rest encryption ↵Thirunarayanan Balathandayuthapani2022-07-262-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unable to restore dump file. - InnoDB bulk insert fails to use encryption buffer for encrypting the temporary log file. Declare the m_crypt_block, m_crypt_pfx in row_merge_bulk_t to be used for encrypting the temporary file.