- 25 Sep, 2023 1 commit
-
-
Alexey Botchkov authored
Fix the Cache_flip_event_log constructor.
-
- 24 Sep, 2023 1 commit
-
-
Sergei Golubchik authored
-
- 23 Sep, 2023 2 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
- 19 Sep, 2023 1 commit
-
-
Marko Mäkelä authored
ibuf_bitmap_buffered(): A new predicate, to check if the IBUF_BITMAP_BUFFERED bit for a particular page is set. ibuf_merge(): If ibuf_bitmap_buffered() does not hold, skip the records for the page. One reason why we might have this situation is the bug that was fixed in commit 34c283ba (MDEV-32132).
-
- 15 Sep, 2023 1 commit
-
-
Lena Startseva authored
Fixed tests: main.flush_corruption - disabled service connection for some queries since it is necessary that the query SELECT pass in the same session
-
- 11 Sep, 2023 1 commit
-
-
Thirunarayanan Balathandayuthapani authored
sys_shrink_buffer_pool to make it as generic name.
-
- 08 Sep, 2023 1 commit
-
-
Sergei Golubchik authored
avoid deprecation warning
-
- 30 Aug, 2023 1 commit
-
-
Federico Razzoli authored
-
- 24 Aug, 2023 3 commits
-
-
Oleksandr Byelkin authored
Fix of incorrect merge of MDEV-31877: ASAN errors in Exec_time_tracker::get_cycles with innodb slow log verbosity (8d210fc2)
-
Oleksandr Byelkin authored
-
Oleksandr Byelkin authored
-
- 21 Aug, 2023 2 commits
-
-
Daniel Bartholomew authored
-
Daniel Bartholomew authored
-
- 18 Aug, 2023 2 commits
-
-
Yuchen Pei authored
The original test in the report of MDEV-31463 is contrived and nondeterministic, causing MDEV-31586. We update the test to make it more directly addresses the underlying cause of MDEV-31463, namely errors from queries sent to the data node not consumed when trying to set lock wait timeout. This is achieved through the debug sync facility.
-
Alexander Barkov authored
-
- 17 Aug, 2023 3 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
don't use ps2 mode for selects with side effects
-
Sergei Petrunia authored
-
- 16 Aug, 2023 3 commits
-
-
Sergei Petrunia authored
Before this patch, the code in Item_field::print() used this convention (described in sql_explain.h:ExplainDataStructureLifetime): - By default, the table that Item_field refers to is accessible. - ANALYZE and SHOW {EXPLAIN|ANALYZE} may print Items after some temporary tables have been dropped. They use QT_DONT_ACCESS_TMP_TABLES flag. When it is ON, Item_field::print will not access the table it refers to, if it is a temp.table The bug was that EXPLAIN statement also may compute subqueries (depending on subquery context and @@expensive_subquery_limit setting). After the computation, the subquery calls JOIN::cleanup(true) which drops some of its temporary tables. Calling Item_field::print() that refer to such table will cause an access to free'd memory. In this patch, we take into account that query optimization can compute a subquery and discard its temporary tables. Item_field::print() now assumes that any temporary table might have already been dropped. This means QT_DONT_ACCESS_TMP_TABLES flag is not needed - we imply it is always present. But we also make one exception: derived tables are not freed in JOIN::cleanup() call. They are freed later in close_thread_tables(), at the same time when regular tables are closed. Because of that, Item_field::print may assume that temp.tables representing derived tables are available. Initial patch by: Rex Jonston Reviewed by: Monty <monty@mariadb.org>
-
Marko Mäkelä authored
-
Alexander Barkov authored
Something went wrong during a merge (from 10.5 to 10.6) of 68403eed (fixing bugs MDEV-27207 and MDEV-31719). Originally (in 10.5) the fix was done in_inet6::set() in plugin/type_inet/sql_type_inet.cc. In 10.6 this code resides in a different place: in the method in_fbt::set() of a template class in sql/sql_type_fixedbin.h. During the merge: - the fix did not properly migrate to in_fbt::set() - the related MTR tests disappeared This patch fixes in_fbt::set() properly and restores MTR tests.
-
- 15 Aug, 2023 18 commits
-
-
Monty authored
The problem is that the first execution of the prepared statement makes a permanent optimization of converting the LEFT JOIN to an INNER JOIN. This is based on the assumption that all the user parameters (?) are always constants and that parameters to Item_cond() will not change value from true and false between different executions. (The example was using IS NULL, which will change value if parameter depending on if the parameter is NULL or not). The fix is to change Item_cond::fix_fields() and Item_cond::eval_not_null_tables() to not threat user parameters as constants. This will ensure that we don't do the LEFT_JOIN -> INNER JOIN conversion that causes problems. There is also some things that needs to be improved regarding calculations of not_null_tables_cache as we get a different value for WHERE 1 or t1.a=1 compared to WHERE t1.a= or 1 Changes done: - Mark Item_param with the PARAM flag to be able to quickly check in Item_cond::eval_not_null_tables() if an item contains a prepared statement parameter (just like we check for stored procedure parameters). - Fixed that Item_cond::not_null_tables_cache is not depending on order of arguments. - Don't call item->eval_const_cond() for items that are NOT on the top level of the WHERE clause. This removed a lot of unnecessary warnings in the test suite! - Do not reset not_null_tables_cache for not top level items. - Simplified Item_cond::fix_fields by calling eval_not_null_tables() instead of having duplication of all the code in eval_not_null_tables(). - Return an error if Item_cond::fix_field() generates an error The old code did generate an error in some cases, but not in all cases. - Fixed all handling of the above error in make_cond_for_tables(). The error handling by the callers did not exists before which could lead to asserts in many different places in the old code). - All changes in sql_select.cc are just checking the return value of fix_fields() and make_cond_for_tables() and returning an error value if fix_fields() returns true or make_cond_for_tables() returns NULL and is_error() is set. - Mark Item_cond as const_item if all arguments returns true for can_eval_in_optimize(). Reviewer: Sergei Petrunia <sergey@mariadb.com>
-
Kristian Nielsen authored
Signed-off-by:
Kristian Nielsen <knielsen@knielsen-hq.org>
-
Kristian Nielsen authored
Signed-off-by:
Kristian Nielsen <knielsen@knielsen-hq.org>
-
Kristian Nielsen authored
Remove the exception that InnoDB does not report auto-increment locks waits to the parallel replication. There was an assumption that these waits could not cause conflicts with in-order parallel replication and thus need not be reported. However, this assumption is wrong and it is possible to get conflicts that lead to hangs for the duration of --innodb-lock-wait-timeout. This can be seen with three transactions: 1. T1 is waiting for T3 on an autoinc lock 2. T2 is waiting for T1 to commit 3. T3 is waiting on a normal row lock held by T2 Here, T3 needs to be deadlock killed on the wait by T1. Signed-off-by:
Kristian Nielsen <knielsen@knielsen-hq.org>
-
Kristian Nielsen authored
Restore code to make InnoDB choose the second transaction as a deadlock victim if two transactions deadlock that need to commit in-order for parallel replication. This code was erroneously removed when VATS was implemented in InnoDB. Also add a test case for InnoDB choosing the right deadlock victim. Also fixes this bug, with testcase that reliably reproduces: MDEV-28776: rpl.rpl_mark_optimize_tbl_ddl fails with timeout on sync_with_master Reviewed-by:
Marko Mäkelä <marko.makela@mariadb.com> Signed-off-by:
Kristian Nielsen <knielsen@knielsen-hq.org>
-
Kristian Nielsen authored
Restore code to make InnoDB choose the second transaction as a deadlock victim if two transactions deadlock that need to commit in-order for parallel replication. This code was erroneously removed when VATS was implemented in InnoDB. Also add a test case for InnoDB choosing the right deadlock victim. Also fixes this bug, with testcase that reliably reproduces: MDEV-28776: rpl.rpl_mark_optimize_tbl_ddl fails with timeout on sync_with_master Note: This should be null-merged to 10.6, as a different fix is needed there due to InnoDB locking code changes. Signed-off-by:
Kristian Nielsen <knielsen@knielsen-hq.org>
-
Kristian Nielsen authored
Remove the exception that InnoDB does not report auto-increment locks waits to the parallel replication. There was an assumption that these waits could not cause conflicts with in-order parallel replication and thus need not be reported. However, this assumption is wrong and it is possible to get conflicts that lead to hangs for the duration of --innodb-lock-wait-timeout. This can be seen with three transactions: 1. T1 is waiting for T3 on an autoinc lock 2. T2 is waiting for T1 to commit 3. T3 is waiting on a normal row lock held by T2 Here, T3 needs to be deadlock killed on the wait by T1. Note: This should be null-merged to 10.6, as a different fix is needed there due to InnoDB lock code changes. Signed-off-by:
Kristian Nielsen <knielsen@knielsen-hq.org>
-
Nikita Malyavin authored
Add LOCK_ALTER_TABE_COPY bit to old_mode. Disables online copy by default, but still allows to force it with explicit lock=none
-
Nikita Malyavin authored
... upon replicating online ALTER When an online event is applied and slave_exec_mode is idempotent, Write_rows_log_event::do_before_row_operations had reset thd->lex->sql_command to SQLCOM_REPLACE. This led to that a statement was detected as a row-type during binlogging, and was logged as not standalone. So the corresponding Gtid_log_event, when applied on replica, did not exit early and created a new PSI transaction. Hence the difference with non-online ALTER.
-
Nikita Malyavin authored
Pack these fields together: event_owns_temp_buf cache_type slave_exec_mode checksum_alg Make them bitfields to fit a single 2-byte hole. This saves 24 bytes per event. SLAVE_EXEC_MODE_LAST_BIT is rewritten as > SLAVE_EXEC_MODE_LAST= SLAVE_EXEC_MODE_IDEMPOTENT to avoid a false-positive -Wbitfield-enum-conversion warning: Bit-field 'slave_exec_mode' is not wide enough to store all enumerators of 'enum_slave_exec_mode'.
-
Nikita Malyavin authored
Replica honors its own binlog_row_image value when it sets up read_set. When a slave thread is applying replicated row events in parallel with the running online alter, we need all columns to be read from the table (for the online alter logged row event) not only those that were present in the pre-image for the replicated row event. Avoid shrinking the set when online alter is running, i.e. leave it all set
-
Nikita Malyavin authored
s3 is read-only. No need to update to a read-only engine with LOCK=NONE.
-
Nikita Malyavin authored
Forbid Online for CONNECT.
-
Nikita Malyavin authored
Adding an auto_increment column online leads to an undefined behavior. Basically any DEFAULTs that depend on a row order in the table, or on the non-deterministic (in scope of the ALTER TABLE statement) function is UB. For example, NOW() is considered generally non-deterministic (Item_func_now_utc is marked with VCOL_NON_DETERMINISTIC), but it's fixed in scope of a single statement. Same for any other function that depends only on the session/status vars apart from its arguments. Only two UB cases are known: * adding new AUTO_INCREMENT column. Modifying the existing column may be fine under certain circumstances, see MDEV-31058. * adding new column with DEFAULT(nextval(...)). Modifying the existing column is possible, since its value will be always present in the online event, except for the NULL -> NOT NULL modification
-
Nikita Malyavin authored
Add a new virtual function that will increase the inserted rows count for the insert log event and decrease it for the delete event. Reuses Rows_log_event::m_row_count on the replication side, which was only set on the logging side.
-
Nikita Malyavin authored
Forbid online for sequences. It doesn't work now and sequence tables are always only one row, so not worth the extra complexity.
-
Nikita Malyavin authored
-
Nikita Malyavin authored
-