summaryrefslogtreecommitdiff
path: root/mysql-test/suite/encryption
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | Merge 10.7 into 10.8Marko Mäkelä2022-07-283-0/+19
| |\ \ \ \ \ \ | | |/ / / / /
| | * | | | | MDEV-28679 After upgrade to 10.7.3-1 with enabled data-at-rest encryption ↵Thirunarayanan Balathandayuthapani2022-07-263-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | Merge 10.8 into 10.9Marko Mäkelä2022-06-292-0/+6
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Merge 10.7 into 10.8Marko Mäkelä2022-06-292-0/+6
| |\ \ \ \ \ \ | | |/ / / / /
| | * | | | | Merge 10.6 into 10.7Marko Mäkelä2022-06-292-0/+6
| | |\ \ \ \ \ | | | |/ / / /
| | | * | | | MDEV-18976 fixup: encryption.innodb-redo-nokeysMarko Mäkelä2022-06-282-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test failure is similar to encryption.innodb-redo-badkey, which was fixed in commit 0f0a45b2dc9fe3c54ca9d146db8068b50fc97138.
* | | | | | | Merge 10.8 into 10.9Marko Mäkelä2022-06-232-0/+4
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Merge 10.7 into 10.8Marko Mäkelä2022-06-232-0/+4
| |\ \ \ \ \ \ | | |/ / / / /
| | * | | | | Merge 10.6 into 10.7Marko Mäkelä2022-06-232-0/+4
| | |\ \ \ \ \ | | | |/ / / /
| | | * | | | MDEV-18976 fixup: encryption.innodb-redo-badkeyMarko Mäkelä2022-06-222-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When attempting to recover a database with an incorrect encryption key, the unencrypted page contents should be expected to differ from what was written before recovery. Let us suppress some more messages. This caused intermittent failures, depending on when the latest log checkpoint was triggered.
* | | | | | | Merge 10.8 into 10.9Marko Mäkelä2022-06-0710-14/+16
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Merge 10.7 into 10.8Marko Mäkelä2022-06-0610-14/+16
| |\ \ \ \ \ \ | | |/ / / / /
| | * | | | | Merge 10.6 into 10.7Marko Mäkelä2022-06-0610-14/+16
| | |\ \ \ \ \ | | | |/ / / /
| | | * | | | MDEV-13542: Crashing on corrupted page is unhelpfulMarko Mäkelä2022-06-0610-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The approach to handling corruption that was chosen by Oracle in commit 177d8b0c125b841c0650d27d735e3b87509dc286 is not really useful. Not only did it actually fail to prevent InnoDB from crashing, but it is making things worse by blocking attempts to rescue data from or rebuild a partially readable table. We will try to prevent crashes in a different way: by propagating errors up the call stack. We will never mark the clustered index persistently corrupted, so that data recovery may be attempted by reading from the table, or by rebuilding the table. This should also fix MDEV-13680 (crash on btr_page_alloc() failure); it was extensively tested with innodb_file_per_table=0 and a non-autoextend system tablespace. We should now avoid crashes in many cases, such as when a page cannot be read or allocated, or an inconsistency is detected when attempting to update multiple pages. We will not crash on double-free, such as on the recovery of DDL in system tablespace in case something was corrupted. Crashes on corrupted data are still possible. The fault injection mechanism that is introduced in the subsequent commit may help catch more of them. buf_page_import_corrupt_failure: Remove the fault injection, and instead corrupt some pages using Perl code in the tests. btr_cur_pessimistic_insert(): Always reserve extents (except for the change buffer), in order to prevent a subsequent allocation failure. btr_pcur_open_at_rnd_pos(): Merged to the only caller ibuf_merge_pages(). btr_assert_not_corrupted(), btr_corruption_report(): Remove. Similar checks are already part of btr_block_get(). FSEG_MAGIC_N_BYTES: Replaces FSEG_MAGIC_N_VALUE. dict_hdr_get(), trx_rsegf_get_new(), trx_undo_page_get(), trx_undo_page_get_s_latched(): Replaced with error-checking calls. trx_rseg_t::get(mtr_t*): Replaces trx_rsegf_get(). trx_rseg_header_create(): Let the caller update the TRX_SYS page if needed. trx_sys_create_sys_pages(): Merged with trx_sysf_create(). dict_check_tablespaces_and_store_max_id(): Do not access DICT_HDR_MAX_SPACE_ID, because it was already recovered in dict_boot(). Merge dict_check_sys_tables() with this function. dir_pathname(): Replaces os_file_make_new_pathname(). row_undo_ins_remove_sec(): Do not modify the undo page by adding a terminating NUL byte to the record. btr_decryption_failed(): Report decryption failures dict_set_corrupted_by_space(), dict_set_encrypted_by_space(), dict_set_corrupted_index_cache_only(): Remove. dict_set_corrupted(): Remove the constant parameter dict_locked=false. Never flag the clustered index corrupted in SYS_INDEXES, because that would deny further access to the table. It might be possible to repair the table by executing ALTER TABLE or OPTIMIZE TABLE, in case no B-tree leaf page is corrupted. dict_table_skip_corrupt_index(), dict_table_next_uncorrupted_index(), row_purge_skip_uncommitted_virtual_index(): Remove, and refactor the callers to read dict_index_t::type only once. dict_table_is_corrupted(): Remove. dict_index_t::is_btree(): Determine if the index is a valid B-tree. BUF_GET_NO_LATCH, BUF_EVICT_IF_IN_POOL: Remove. UNIV_BTR_DEBUG: Remove. Any inconsistency will no longer trigger assertion failures, but error codes being returned. buf_corrupt_page_release(): Replaced with a direct call to buf_pool.corrupted_evict(). fil_invalid_page_access_msg(): Never crash on an invalid read; let the caller of buf_page_get_gen() decide. btr_pcur_t::restore_position(): Propagate failure status to the caller by returning CORRUPTED. opt_search_plan_for_table(): Simplify the code. row_purge_del_mark(), row_purge_upd_exist_or_extern_func(), row_undo_ins_remove_sec_rec(), row_undo_mod_upd_del_sec(), row_undo_mod_del_mark_sec(): Avoid mem_heap_create()/mem_heap_free() when no secondary indexes exist. row_undo_mod_upd_exist_sec(): Simplify the code. row_upd_clust_step(), dict_load_table_one(): Return DB_TABLE_CORRUPT if the clustered index (and therefore the table) is corrupted, similar to what we do in row_insert_for_mysql(). fut_get_ptr(): Replace with buf_page_get_gen() calls. buf_page_get_gen(): Return nullptr and *err=DB_CORRUPTION if the page is marked as freed. For other modes than BUF_GET_POSSIBLY_FREED or BUF_PEEK_IF_IN_POOL this will trigger a debug assertion failure. For BUF_GET_POSSIBLY_FREED, we will return nullptr for freed pages, so that the callers can be simplified. The purge of transaction history will be a new user of BUF_GET_POSSIBLY_FREED, to avoid crashes on corrupted data. buf_page_get_low(): Never crash on a corrupted page, but simply return nullptr. fseg_page_is_allocated(): Replaces fseg_page_is_free(). fts_drop_common_tables(): Return an error if the transaction was rolled back. fil_space_t::set_corrupted(): Report a tablespace as corrupted if it was not reported already. fil_space_t::io(): Invoke fil_space_t::set_corrupted() to report out-of-bounds page access or other errors. Clean up mtr_t::page_lock() buf_page_get_low(): Validate the page identifier (to check for recently read corrupted pages) after acquiring the page latch. buf_page_t::read_complete(): Flag uninitialized (all-zero) pages with DB_FAIL. Return DB_PAGE_CORRUPTED on page number mismatch. mtr_t::defer_drop_ahi(): Renamed from mtr_defer_drop_ahi(). recv_sys_t::free_corrupted_page(): Only set_corrupt_fs() if any log records exist for the page. We do not mind if read-ahead produces corrupted (or all-zero) pages that were not actually needed during recovery. recv_recover_page(): Return whether the operation succeeded. recv_sys_t::recover_low(): Simplify the logic. Check for recovery error. Thanks to Matthias Leich for testing this extensively and to the authors of https://rr-project.org for making it easy to diagnose and fix any failures that were found during the testing.
* | | | | | | Merge branch '10.8' into 10.9mariadb-10.9.1Sergei Golubchik2022-05-194-8/+50
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Merge branch '10.7' into 10.8Sergei Golubchik2022-05-114-8/+50
| |\ \ \ \ \ \ | | |/ / / / /
| | * | | | | Merge branch '10.6' into 10.7Sergei Golubchik2022-05-114-8/+50
| | |\ \ \ \ \ | | | |/ / / /
| | | * | | | Merge branch '10.5' into 10.6Sergei Golubchik2022-05-101-0/+45
| | | |\ \ \ \ | | | | |/ / /
| | | | * | | Merge branch '10.4' into 10.5Sergei Golubchik2022-05-091-0/+42
| | | | |\ \ \ | | | | | |/ /
| | | | | * | Merge branch '10.3' into 10.4Sergei Golubchik2022-05-081-0/+42
| | | | | |\ \ | | | | | | |/
| | | | | | * Merge branch '10.2' into 10.3Sergei Golubchik2022-05-071-0/+42
| | | | | | |\
| | | | | | | * Update test results after fix for MDEV-19398Sergei Petrunia2022-05-061-0/+42
| | | | | | | |
| | | * | | | | MDEV-28484 InnoDB encryption key rotation is not being marked completedMarko Mäkelä2022-05-063-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fil_crypt_flush_space(): Correct a condition that was refactored incorrectly in commit aaef2e1d8c843d1e40b1ce0c5199c3abb3c5da28
* | | | | | | | Merge 10.8 into 10.9Marko Mäkelä2022-04-283-17/+30
|\ \ \ \ \ \ \ \ | |/ / / / / / /
| * | | | | | | Merge 10.7 into 10.8Marko Mäkelä2022-04-273-17/+30
| |\ \ \ \ \ \ \ | | |/ / / / / /
| | * | | | | | Merge 10.6 into 10.7Marko Mäkelä2022-04-263-17/+30
| | |\ \ \ \ \ \ | | | |/ / / / /
| | | * | | | | Merge 10.5 into 10.6Marko Mäkelä2022-04-153-17/+30
| | | |\ \ \ \ \ | | | | |/ / / /
| | | | * | | | MDEV-9948 Failing assertion: new_state->key_version != ↵Marko Mäkelä2022-04-153-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ENCRYPTION_KEY_VERSION_INVALID in fil0crypt.cc The test encryption.innodb-redo-nokeys did not actually test recovery without valid keys, because due to the setting innodb_encrypt_tables, InnoDB refused to start up at all, without even attempting any crash recovery. fil_ibd_load(): If the encryption key is not available, refuse to load the file.
* | | | | | | | Merge 10.8 into 10.9Marko Mäkelä2022-04-062-3/+3
|\ \ \ \ \ \ \ \ | |/ / / / / / /
| * | | | | | | Merge 10.7 into 10.8Marko Mäkelä2022-04-062-3/+3
| |\ \ \ \ \ \ \ | | |/ / / / / /
| | * | | | | | Merge 10.6 into 10.7Marko Mäkelä2022-04-062-3/+3
| | |\ \ \ \ \ \ | | | |/ / / / /
| | | * | | | | Merge 10.5 into 10.6Marko Mäkelä2022-04-062-3/+3
| | | |\ \ \ \ \ | | | | |/ / / /
| | | | * | | | Merge 10.4 into 10.5Marko Mäkelä2022-04-062-3/+3
| | | | |\ \ \ \ | | | | | |/ / /
| | | | | * | | Merge 10.3 into 10.4Marko Mäkelä2022-04-062-3/+3
| | | | | |\ \ \ | | | | | | |/ /
| | | | | | * | Merge 10.2 into 10.3Marko Mäkelä2022-04-062-3/+3
| | | | | | |\ \ | | | | | | | |/
| | | | | | | * MDEV-27835 innochecksum -S crashes for encrypted .ibd tablespaceVlad Lesin2022-03-292-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.8 into 10.9Marko Mäkelä2022-03-301-0/+5
|\ \ \ \ \ \ \ \ | |/ / / / / / /
| * | | | | | | Merge 10.7 into 10.8Daniel Black2022-03-251-0/+5
| |\ \ \ \ \ \ \ | | |/ / / / / /
| | * | | | | | Merge 10.6 into 10.7Daniel Black2022-03-251-0/+5
| | |\ \ \ \ \ \ | | | |/ / / / /
| | | * | | | | Merge 10.5 to 10.6Daniel Black2022-03-251-0/+5
| | | |\ \ \ \ \ | | | | |/ / / /
| | | | * | | | MDEV-23974 Tests fail due to [Warning] InnoDB: Trying to delete tablespaceMarko Mäkelä2022-03-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A few regression tests invoke heavy flushing of the buffer pool and may trigger warnings that tablespaces could not be deleted because of pending writes. Those warnings are to be expected during the execution of such tests. The warnings are also frequently seen with Valgrind or MemorySanitizer. For those, the global suppression in have_innodb.inc does the trick.
* | | | | | | | MDEV-27712 Reduce the size of Lex_length_and_dec_st from 16 to 8Alexander Barkov2022-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | User visible change: Removing the length specified by user from error messages: ER_TOO_BIG_SCALE and ER_TOO_BIG_PRECISION as discussed with Sergei.
* | | | | | | | Merge 10.8 into 10.9Marko Mäkelä2022-02-251-0/+8
|\ \ \ \ \ \ \ \ | |/ / / / / / /
| * | | | | | | Merge 10.7 into 10.8Marko Mäkelä2022-02-251-0/+8
| |\ \ \ \ \ \ \ | | |/ / / / / /
| | * | | | | | Merge 10.6 into 10.7Marko Mäkelä2022-02-251-0/+8
| | |\ \ \ \ \ \ | | | |/ / / / /
| | | * | | | | Merge 10.5 into 10.6Marko Mäkelä2022-02-251-0/+8
| | | |\ \ \ \ \ | | | | |/ / / /
| | | | * | | | Merge 10.4 into 10.5Marko Mäkelä2022-02-251-0/+8
| | | | |\ \ \ \ | | | | | |/ / /
| | | | | * | | Merge 10.3 into 10.4Marko Mäkelä2022-02-251-0/+8
| | | | | |\ \ \ | | | | | | |/ /
| | | | | | * | Merge 10.2 into 10.3Marko Mäkelä2022-02-251-0/+8
| | | | | | |\ \ | | | | | | | |/
| | | | | | | * MDEV-15208: server crashed, when using ORDER BY with window function and UNIONVarun Gupta2022-02-221-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Edits by SergeiP: fix encryption.tempfiles_encrypted, re-word comment) Global ORDER BY clause of a UNION may not refer to 1) aggregate functions or 2) window functions. setup_order() checked for #1 but not for #2.