- 15 Oct, 2019 1 commit
-
-
Monty authored
Problem was in a combination of LOCK TABLES on several Aria tables followed by an ALTER TABLE. After the ALTER TABLE there was a force close + reopen of the alter table. The close failed because the table was still part of a transaction. Fixed by calling extra(HA_EXTRA_PREPARE_FOR_FORCED_CLOSE) as part of closing the table, which ensures that the table is not anymore part of the current transaction.
-
- 14 Oct, 2019 5 commits
-
-
Eugene Kosov authored
Proper C-style type erasure is done via void*, not via char* or something else. free_key_cache() free_rpl_filter(): types were fixed to avoid function pointer type cast which is still undefined behavior. Note, that casting from void* to any other pointer type is safe and correct.
-
Marko Mäkelä authored
fil_crypt_rotate_page(): Skip the key rotation for pages that carry 0 in FIL_PAGE_TYPE. This avoids not only unnecessary writes, but also failures of the recently added debug assertion in buf_flush_init_for_writing() that the FIL_PAGE_TYPE should be nonzero. Note: the debug assertion can fail if the file was originally created before MySQL 5.5. In old InnoDB versions, FIL_PAGE_TYPE was only initialized for B-tree pages, to FIL_PAGE_INDEX. For any other pages, the field could be garbage, including FIL_PAGE_INDEX. In MariaDB 10.2 and later, buf_flush_init_for_writing() would initialize the FIL_PAGE_TYPE on such old pages, but only after passing the debug assertion that insists that pages have a nonzero FIL_PAGE_TYPE. Thus, the debug assertion at the start of buf_flush_init_for_writing() can fail when upgrading from very old debug files. This assertion is only present in debug builds, not release builds.
-
Marko Mäkelä authored
Do not merge the InnoDB changes for MDEV-20813.
-
Marko Mäkelä authored
Old InnoDB/XtraDB versions only initialized FIL_PAGE_TYPE for B-tree pages (to FIL_PAGE_INDEX), and left it uninitialized (possibly containing FIL_PAGE_INDEX) for others. In MySQL or MariaDB 5.5, the field is initialized on almost all pages, but still not all of them. In MariaDB 10.2 and later, buf_flush_init_for_writing() would initialize the FIL_PAGE_TYPE on such old pages, but only after passing the debug assertion that we are now removing from 10.1. There, we will be able to modify fil_crypt_rotate_page() so that it will skip the key rotation for pages that contain 0 in FIL_PAGE_TYPE. In MariaDB 10.1, there is no logic that would initialize FIL_PAGE_TYPE on data pages in old data files after an update. So, encryption key rotation may routinely cause page flushes on pages that contain 0 in FIL_PAGE_TYPE.
-
Marko Mäkelä authored
This is a backport of commit ec28f953 to MariaDB Server 10.1.
-
- 12 Oct, 2019 2 commits
-
-
Marko Mäkelä authored
MDEV-20813 Assertion failure in buf_flush_init_for_writing() for innodb_immediate_scrub_data_uncompressed=ON The assertion that was added in commit c0c003be to augment the fix of MDEV-20805 turns out to be invalid when innodb_immediate_scrub_data_uncompressed is enabled. In this mode, fsp_init_file_page() will be invoked on data pages that have been freed, causing writes of almost-all-zero pages. btr_page_free(): Adjust the comment. buf_flush_init_for_writing(): Disable the assertion with a note that it should be re-enabled in MDEV-15528.
-
Marko Mäkelä authored
-
- 11 Oct, 2019 13 commits
-
-
Julius Goryavsky authored
When the mysqld_multi script passes the --defaults-group-suffix option to mysqld, it must remove the initial substring with the group name ("mysqld") from option value, because otherwise substring "mysqld" will be added to the group name and then the group name will contain the word "mysqld" twice, which is wrong, because mysqld itself adds the suffix received to the group name.
-
Julius Goryavsky authored
When the mysqld_multi script passes the --defaults-group-suffix option to mysqld, it must remove the initial substring with the group name ("mysqld") from option value, because otherwise substring "mysqld" will be added to the group name and then the group name will contain the word "mysqld" twice, which is wrong, because mysqld itself adds the suffix received to the group name.
-
Marko Mäkelä authored
This is another follow-up fix to commit b393e2cb which turned out to be still broken. Replace the C++11 keyword 'constexpr' with #define. debug_sync_t::str: Remove the zero-length array. Replace sync->str with reinterpret_cast<char*>(&sync[1]).
-
Marko Mäkelä authored
During IMPORT TABLESPACE, we do invoke buf_flush_init_for_writing() with block==NULL and newest_lsn!=0.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Remove unused variables and type mismatch that was introduced in commit b393e2cb Also, fix a typo in the documentation of the parameter, and update the test.
-
Marko Mäkelä authored
buf_flush_init_for_writing(): Assert that FIL_PAGE_TYPE is set except when creating a new data file with a dummy first page. buf_dblwr_create(): Ensure that FIL_PAGE_TYPE on all pages will be initialized. Reset buf_dblwr_being_created at the end.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
In the function recv_parse_or_apply_log_rec_body() there are debug checks for validating the state of the page when redo log records are being applied. Most notably, FIL_PAGE_TYPE should be set before anything else is being written to the page. ibuf_add_free_page(): Set FIL_PAGE_TYPE before performing any other changes.
-
Marko Mäkelä authored
Apply the correct pattern for debug instrumentation: SET @save_dbug=@@debug_dbug; SET debug_dbug='+d,...'; ... SET debug_dbug=@save_dbug; Numerous tests use statements of the form SET debug_dbug='-d,...'; which will inadvertently enable all DBUG tracing output, causing unnecessary waste of resources.
-
Marko Mäkelä authored
The test main.index_merge_innodb is taking very much time, especially on later versions (10.2 and 10.3). Some of this could be attributed to the use of INSERT...SELECT, which is time-consumingly creating explicit record locks in InnoDB for the locking read in the SELECT part. In 10.3 and later, some slowness can be attributed to MDEV-12288, which makes the InnoDB purge thread spend time to reset transaction identifiers in the inserted records. If we prevent purge from running before all tables are dropped, the test seems to be 10% faster on an unoptimized debug build on 10.5. (A proper fix would be to implement MDEV-515 and stop writing row-level undo log records for inserts into an empty table or partition.) At the same time, it should not hurt to make main.index_merge_myisam to use the sequence engine. Not only could it be a little faster, but the test would be slightly more readable.
-
Nikita Malyavin authored
the bug was already fixed in MDEV-17005, so now only test is added
-
Nikita Malyavin authored
-
- 10 Oct, 2019 2 commits
-
-
Marko Mäkelä authored
In MDEV-11369 (instant ADD COLUMN) in MariaDB Server 10.3, we introduced the hidden metadata record that must be the first record in the clustered index if and only if index->is_instant() holds. To catch MDEV-19783, in commit ed0793e0 and commit 99dc40d6 we added some assertions to find cases where the metadata record is missing while it should not be, or a record exists when it should not. Those assertions were invalid when traversing the PAGE_FREE list. That list can contain anything; we must only be able to determine the successor and the size of each garbage record in it. page_validate(), page_simple_validate_old(), page_simple_validate_new(): Do not invoke page_rec_get_next_const() for traversing the PAGE_FREE list, but instead use a lower-level accessor that does not attempt to validate the REC_INFO_MIN_REC_FLAG. page_copy_rec_list_end_no_locks(), page_copy_rec_list_start(), page_delete_rec_list_start(): Add assertions. btr_page_get_split_rec_to_left(): Remove a redundant return value, and make the output parameter the return value. btr_page_get_split_rec_to_right(), btr_page_split_and_insert(): Clean up.
-
Michael Widenius authored
-
- 09 Oct, 2019 6 commits
-
-
Marko Mäkelä authored
The function was always called with lsn=LSN_MAX. Remove that redundant parameter. Spotted by Thirunarayanan Balathandayuthapani.
-
Thirunarayanan Balathandayuthapani authored
The field buf_page_t::encrypted was added in MDEV-8588. It was made mostly redundant in MDEV-12699. Remove the field.
-
Marko Mäkelä authored
-
Eugene Kosov authored
btr_cur_pessimistic_delete(): code changed in a way that allows to put more REC_INFO_MIN_REC_FLAG assertions inside btr_set_min_rec_mark(). Without that change tests innodb.innodb-table-online, innodb.temp_table_savepoint and innodb_zip.prefix_index_liftedlimit fail. Removed basically duplicated page_zip_validate() calls which fails because of temporary(!) invariant violation. That fixed innodb_zip.wl5522_debug_zip and innodb_zip.prefix_index_liftedlimit
-
Eugene Kosov authored
The bug affects MariaDB Server 10.3 or later, but it makes sense to improve CHECK TABLE in earlier versions already. page_validate(): Check REC_INFO_MIN_REC_FLAG in the records. This allows CHECK TABLE to catch more bugs.
-
Marko Mäkelä authored
Until now, InnoDB inefficiently compared the aligned fields FIL_PAGE_PREV, FIL_PAGE_NEXT to the byte-order-agnostic value FIL_NULL. This is a backport of 32170f8c from MariaDB Server 10.3.
-
- 08 Oct, 2019 2 commits
-
-
Marko Mäkelä authored
-
Sachin Setiya authored
MDEV-20574 Position of events reported by mysqlbinlog is wrong with encrypted binlogs, SHOW BINLOG EVENTS reports the correct one. Analysis Mysqlbinlog output for encrypted binary log #Q> insert into tab1 values (3,'row 003') #190912 17:36:35 server id 10221 end_log_pos 980 CRC32 0x53bcb3d3 Table_map: `test`.`tab1` mapped to number 19 # at 940 #190912 17:36:35 server id 10221 end_log_pos 1026 CRC32 0xf2ae5136 Write_rows: table id 19 flags: STMT_END_F Here we can see Table_map_log_event ends at 980 but Next event starts at 940. And the reason for that is we do not send START_ENCRYPTION_EVENT to the slave Solution:- Send Start_encryption_log_event as Ignorable_log_event to slave(mysqlbinlog), So that mysqlbinlog can update its log_pos. Since Slave can request multiple FORMAT_DESCRIPTION_EVENT while master does not have so We only update slave master pos when master actually have the FORMAT_DESCRIPTION_EVENT. Similar logic should be applied for START_ENCRYPTION_EVENT. Also added the test case when new server reads the data from old server which does not send START_ENCRYPTION_EVENT to slave. Master Slave Upgrade Scenario. When Slave is updated first, Slave will have extra logic of handling START_ENCRYPTION_EVENT But master willnot be sending START_ENCRYPTION_EVENT. So there will be no issue. When Master is updated first, It will send START_ENCRYPTION_EVENT to slave , But slave will ignore this event in queue_event.
-
- 07 Oct, 2019 2 commits
-
-
Marko Mäkelä authored
The function was declared but not defined in commit 9d6d1902
-
Sergey Vojtovich authored
read_statistics_for_tables_if_needed Regression after 279a907f, read_statistics_for_tables_if_needed() was called after open_normal_and_derived_tables() failure. Fixed by moving read_statistics_for_tables() call to a branch of get_schema_stat_record() where result of open_normal_and_derived_tables() is checked. Removed THD::force_read_stats, added read_statistics_for_tables() instead. Simplified away statistics_for_command_is_needed().
-
- 04 Oct, 2019 1 commit
-
-
Oleksandr Byelkin authored
-
- 03 Oct, 2019 1 commit
-
-
Eugene Kosov authored
-
- 02 Oct, 2019 1 commit
-
-
Sergey Vojtovich authored
Moved EITS allocation inside read_statistics_for_tables_if_needed(). Removed redundant is_safe argument.
-
- 01 Oct, 2019 4 commits
-
-
Vlad Lesin authored
When "--export" mariabackup option is used, mariabackup starts the server in bootstrap mode to generate *.cfg files for the certain innodb tables. The started instance of the server reads options from the file, pointed out in "--defaults-file" mariabackup option. If the server uses the same config file as mariabackup, and binlog is switched on in that config file, then "mariabackup --prepare --export" will create binary log files in the server's binary log directory, what can cause issues. The fix is to add "--skip-log-bin" in mysld options when the server is started to generate *.cfg files.
-
Alexander Barkov authored
-
Alexander Barkov authored
-
Alexander Barkov authored
-