- 11 Oct, 2019 3 commits
-
-
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.
-
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
-
- 30 Sep, 2019 3 commits
-
-
Robert Bindar authored
-
Marko Mäkelä authored
For release builds, do not declare unused variables. unpack_row(): Omit a debug-only variable from WSREP diagnostic message. create_wsrep_THD(): Fix -Wmaybe-uninitialized for the PSI_thread_key.
-
Sujatha authored
MDEV-20645: Replication consistency is broken as workers miss the error notification from an earlier failed group. Analysis: ======== In general if there are three groups. 1 - Inserts 32 which fails due to local entry '32' on slave. 2 - Inserts 33 3 - Inserts 34 Each group considers itself as a waiter and it waits for prior group 'waitee'. This is done in 'register_wait_for_prior_event_group_commit'. If there is no other parallel group being scheduled then no waitee will be there. Let us assume 3 groups are being scheduled in parallel. 3-> waits for 2-> waits for->1 '1' upon completion it checks is there any registered subsequent waiter. If so it wakes up the subsequent waiter with its execution status. This execution status is stored in wakeup_error. If '1' failed then it sends corresponding wakeup_error to 2. Then '2' aborts and it propagates error to '3'. So all further commits are aborted. This mechanism works only when all transactions reach a stage where they are waiting for their prior commit to complete. In case of optimistic following scenario occurs. 1,2,3 are scheduled in parallel. 3 - Reaches group_commit_code waits for 2 to complete. 1 - errors out sets stop_on_error_sub_id=1. When a group execution results in error its corresponding sub_id is set to 'stop_on_error_sub_id'. Any new groups queued for execution will check if their sub_id is > stop_on_error_sub_id. If it is true their execution will be skipped as prior group execution failed. 'skip_event_group=1' will be set. Since the execution of SQL thread is about to stop we just skip execution of all the following event groups. We still do all the normal waiting and wakeup processing between the event groups as a simple way to ensure that everything is stopped and cleaned up correctly. Upon error '1' transaction checks for registered waiters. Since no one is there it simply goes away. 2 - Starts the execution. It checks do I have a waitee. Since wait_commit_sub_id == entry->last_committed_sub_id no waitee is set. Secondly: 'entry->stop_on_error_sub_id' is set by '1'st execution. Now 'handle_parallel_thread' code checks if the current group 'sub_id' is greater than the 'sub_id' set within 'stop_on_error_sub_id'. Since the above is true 'skip_event_group=true' is set. Simply call 'wait_for_prior_commit' to wakeup all waiters. Group '2' didn't had any waitee and its execution is skipped. Hence its wakeup_error=0.It sends a positive wakeup signal to '3'. Which commits. This results in a missed transaction. i.e 33 is missed and 34 is committed. Fix: === When a worker learns that an earlier transaction execution has failed, and it should not proceed for further execution, it should mark its own execution status as failed so that it alerts its followers to abort as well.
-
- 27 Sep, 2019 7 commits
-
-
Julius Goryavsky authored
A syntax error in the mysqld_multi.sh script has been fixed here + a "--defaults-group-suffix" option has been moved to the top of the mysqld options list.
-
Thirunarayanan Balathandayuthapani authored
The test encryption.innodb-redo-badkey was accidentally disabled until commit 23657a21 enabled it recently. Once it was enabled, it started failing randomly. recv_recover_corrupt_page(): Do not assume that any redo log exists for the page. A page may be unnecessarily read by read-ahead. When noting the corruption, reset recv_addr->state to RECV_PROCESSED, so that even if the same page is re-read again, we will only decrement recv_sys->n_addrs once.
-
Marko Mäkelä authored
Spotted by Thirunarayanan Balathandayuthapani.
-
Marko Mäkelä authored
rw_lock_own(), rw_lock_own_flagged(): Traverse the rw_lock_t::debug_list only after quickly checking if the thread is holding X-latch or SX-latch.
-
Sergei Golubchik authored
chkconfig --add and --del [might] invoke /sbin/insserv and even if chkconfig exists, insserv might not (SLES15). Ignore chkconfig --del errors - it's a "best effort" cleanup anyway
-
Marko Mäkelä authored
The test innodb_fts.fulltext_table_evict was only creating 1000 tables with fulltext indexes, only to check that no tables with fulltext indexes are being evicted. The reason why tables containing fulltext indexes cannot be evicted is that fts_optimize_init() invokes dict_table_prevent_eviction().
-
Marko Mäkelä authored
For CMAKE_BUILD_TYPE=Debug, the default MYSQL_MAINTAINER_MODE=AUTO implies -Werror along with other flags in cmake/maintainer.cmake, which would break the debug builds when CMAKE_CXX_FLAGS include -O2. This fix includes a backport of 6dd3f240 from MariaDB 10.3.
-
- 26 Sep, 2019 4 commits
-
-
Marko Mäkelä authored
Test innodb_read_only startup (which will be refused after a crash), and test also innodb_force_recovery=5, and extract some change buffer merge statistics. Omit any statistics about delete (purge) buffering, because purge could happen at any time. Use the sequence storage engine for populating the table.
-
Marko Mäkelä authored
Add a test case. MariaDB Server 10.2 is not affected.
-
Marko Mäkelä authored
-
Julius Goryavsky authored
A syntax error in the mysqld_multi.sh script has been fixed here + a "--defaults-group-suffix" option has been moved to the top of the mysqld options list.
-
- 25 Sep, 2019 1 commit
-
-
Marko Mäkelä authored
Eliminate one InnoDB table with 128*16384 rows, and use the sequence engine instead. Also, run everything in a single transaction, to prevent purge from running concurrently unnecessarily. (Starting with MariaDB Server 10.3, purge would reset the DB_TRX_ID after INSERT.)
-
- 24 Sep, 2019 3 commits
-
-
Alexander Barkov authored
-
Alexander Barkov authored
-
Rasmus Johansson authored
-