- 15 Jan, 2019 2 commits
-
-
mkaruza authored
If galera.galera_gtid_slave_sst_rsync is repeated more than once it will fail due incorrect GTID position. After stopping SLAVE node reset also GTID_SLAVE_POS variable.
-
Vladislav Vaintroub authored
This mutex can be freed when server shuts down (when thread_count goes down to 0) , but it is still used inside THD::~THD() when Statement_map is destroyed. The fix is to call Statement_map::reset() at the point where thread_count is still positive, and avoid locking LOCK_prepared_stmt_count in THD destructor.
-
- 14 Jan, 2019 1 commit
-
-
FaramosCZ authored
Closes #983, #984
-
- 07 Jan, 2019 1 commit
-
-
Jan Lindström authored
During database recovery, a transaction with wsrep XID is recovered from InnoDB in prepared state. However, when the transaction is looked up with trx_get_trx_by_xid() in innobase_commit_by_xid(), trx->xid gets cleared in trx_get_trx_by_xid_low() and commit time serialization history write does not update the wsrep XID in trx sys header for that recovered trx. As a result the transaction gets committed during recovery but the wsrep position does not get updated appropriately. As a fix, we preserve trx->xid for Galera over transaction commit in recovery phase. Fix authored by: Teemu Ollakka (GaleraCluster) and Marko Mäkelä. modified: mysql-test/suite/galera/disabled.def modified: mysql-test/suite/galera/r/galera_gcache_recover_full_gcache.result modified: mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result modified: mysql-test/suite/galera/t/galera_gcache_recover_full_gcache.test modified: mysql-test/suite/galera/t/galera_gcache_recover_manytrx.test modified: storage/innobase/trx/trx0trx.cc modified: storage/xtradb/trx/trx0trx.cc
-
- 03 Jan, 2019 2 commits
-
-
Marko Mäkelä authored
MDEV-18129 Backup fails for encrypted tables: mariabackup: Database page corruption detected at page 1 If an encrypted table is created during backup, then mariabackup --backup could wrongly fail. This caused a failure of the test mariabackup.huge_lsn once on buildbot. This is due to the way how InnoDB creates .ibd files. It would first write a dummy page 0 with no encryption information. Due to this, xb_fil_cur_open() could wrongly interpret that the table is not encrypted. Subsequently, page_is_corrupted() would compare the computed page checksum to the wrong checksum. (There are both "before" and "after" checksums for encrypted pages.) To work around this problem, we introduce a Boolean option --backup-encrypted that is enabled by default. With this option, Mariabackup will assume that a nonzero key_version implies that the page is encrypted. We need this option in order to be able to copy encrypted tables from MariaDB 10.1 or 10.2, because unencrypted pages that were originally created before MySQL 5.1.48 could contain nonzero garbage in the fields that were repurposed for encryption. Later, MDEV-18128 would clean up the way how .ibd files are created, to remove the need for this option. page_is_corrupted(): Add missing const qualifiers, and do not check space->crypt_data unless --skip-backup-encrypted has been specified. xb_fil_cur_read(): After a failed page read, output a page dump.
-
Sergei Golubchik authored
-
- 02 Jan, 2019 4 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
- 29 Dec, 2018 5 commits
-
-
Sergei Golubchik authored
-
Marko Mäkelä authored
This is a regression caused by commit 8c43f963 that was part of the MDEV-12112 fixes. page_is_corrupted(): Never interpret page_no=0 as encrypted.
-
Eugene Kosov authored
This is a regression after MDEV-13671. The bug is related to key part prefix lengths wich are stored in SYS_FIELDS. Storage format is not obvious and was handled incorrectly which led to data dictionary corruption. SYS_FIELDS.POS actually contains prefix length too in case if any key part has prefix length. innobase_rename_column_try(): fixed prefixes handling Tests for prefixed indexes added too. Closes #1063
-
Marko Mäkelä authored
-
Vladislav Vaintroub authored
would not hide more interesting information, like invalid memory accesses. some "leaks" are expected - partly this is due to weird options parsing, that runs twice, and does not free memory after the first run. - also we do not mind to exit() whenever it makes sense, without full cleanup.
-
- 28 Dec, 2018 2 commits
-
-
Eugene Kosov authored
MDEV-17470 Orphan temporary files after interrupted ALTER cause InnoDB: Operating system error number 17 and eventual fatal error 71 Orphan #sql* tables may remain after ALTER TABLE was interrupted by timeout or KILL or client disconnect. This is a regression caused by MDEV-16515. Similar to temporary tables (MDEV-16647), we had better ignore the KILL when dropping the original table in the final part of ALTER TABLE. Closes #1020
-
Marko Mäkelä authored
This fixes a regression that was introduced in MySQL 5.6.6 in an error handling code path, in the following change: commit 024f363d6b5f09b20d1bba411af55be95c7398d3 Author: kevin.lewis@oracle.com <> Date: Fri Jun 15 09:01:42 2012 -0500 Bug #14169459 INNODB; DROP TABLE DOES NOT DELETE THE IBD FILE FOR A TEMPORARY TABLE.
-
- 22 Dec, 2018 1 commit
-
-
Rakshit Kumar authored
Docs grammar fixed
-
- 21 Dec, 2018 1 commit
-
-
Marko Mäkelä authored
When using a wrong key, all encrypted pages will look corrupted, and occasionally the test may access other pages than the clustered index root page.
-
- 20 Dec, 2018 4 commits
-
-
Vladislav Vaintroub authored
- 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.
-
Marko Mäkelä authored
In MDEV-13103, I made a mistake in the error handling of page_compressed=1 decryption when the default innodb_compression_algorithm=zlib is used. Due to this mistake, with certain versions of zlib, MariaDB would fail to detect a corrupted page. The problem was uncovered by the following tests: mariabackup.unencrypted_page_compressed mariabackup.encrypted_page_compressed
-
Sergei Golubchik authored
-
Sergei Golubchik authored
MDEV-17975 Assertion `! is_set()' or `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed upon REVOKE under LOCK TABLE open_grant_tables() returns -1/0/1, where -1 is an error, while 1 is not. Don't store it's return value in bool
-
- 19 Dec, 2018 4 commits
-
-
Sachin authored
Relevant if exists flag are added for create database and drop database.
-
Marko Mäkelä authored
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.
-
Varun Gupta authored
Create a new constant MAX_DATA_LENGTH_FOR_KEY. Replace the value of MAX_KEY_LENGTH to also include the LENGTH and NULL BYTES of a field.
-
Varun Gupta authored
-
- 18 Dec, 2018 4 commits
-
-
Marko Mäkelä authored
The fix was accidentally only applied to InnoDB, and encryption tests were not adjusted.
-
Sergey Vojtovich authored
Workaround glibc bug: https://sourceware.org/bugzilla/show_bug.cgi?id=20116 by making unittest threads joinable. It makes code better anyway.
-
Thirunarayanan Balathandayuthapani authored
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.
-
Marko Mäkelä authored
Starting with commit 6b698715 the encrypted page checksum is only computed with crc32. Encrypted data pages that were written earlier can contain other checksums, but new ones will only contain crc32. Because of this, it does not make sense to implement strict checks of innodb_checksum_algorithm for other than strict_crc32. fil_space_verify_crypt_checksum(): Treat strict_innodb as innodb and strict_none as none. That is, allow a match from any of the algorithms none, innodb, crc32. (This is how it worked before the second MDEV-12112 fix.) Thanks to Thirunarayanan Balathandayuthapani for pointing this out.
-
- 17 Dec, 2018 6 commits
-
-
Sergei Golubchik authored
This reverts part of c5427172
-
Marko Mäkelä authored
fil_space_verify_crypt_checksum(): Add a dummy return statement in case memory is corrupted and innodb_checksum_algorithm has an invalid value.
-
Marko Mäkelä authored
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.
-
Jan Lindström authored
Remove provider defaults check from 'galera_defaults' MTR test
-
Jan Lindström authored
Problem is that if you use bundled yassl AES_CTR is not supported. There is a way to detect that but as we really want to keep this test enabled did not add skip for missing support. Changed method to AES_CBC as there is no need to use AES_CTR.
-
Jan Lindström authored
Add check that file key management plugin is found.
-
- 16 Dec, 2018 1 commit
-
-
Varun Gupta authored
with InnoDB, joins, AND/OR conditions The inited parameter handler is not initialised when we do a quick_select after a table scan.
-
- 14 Dec, 2018 2 commits
-
-
Alexey Yurchenko authored
From time to time Galera adds new parameters or changes defaults to existing ones. Every time this happens galera_defaults test needs a fix (and a commit) because it insists on checking these defaults. This is making life hard because any Galera update may require a fix to MariaDB code even though it is totally unrelated and defeats the whole idea of a provider living its own life. This commit removes checking for provider defaults to avoid false positive failures on MariaDB side.
-
Marko Mäkelä authored
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.
-