- 18 Mar, 2024 3 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Let us skip the recently added test main.mysql-interactive if an instrumented ncurses library is not available. In InnoDB, let us work around an uninstrumented libnuma, by declaring that the objects returned by numa_get_mems_allowed() are initialized.
-
Marko Mäkelä authored
Starting with clang-16, MemorySanitizer appears to check that uninitialized values not be passed by value nor returned. Previously, it was allowed to copy uninitialized data in such cases. get_foreign_key_info(): Remove a local variable that was passed uninitialized to a function. DsMrr_impl: Initialize key_buffer, because DsMrr_impl::dsmrr_init() is reading it. test_bind_result_ext1(): MYSQL_TYPE_LONG is 32 bits, hence we must use a 32-bit type, such as int. sizeof(long) differs between LP64 and LLP64 targets.
-
- 15 Mar, 2024 5 commits
-
-
Kristian Nielsen authored
maria_repair_parallel() clears the MY_THREAD_SPECIFIC flag for allocations since it uses different threads. But it still did one _ma_alloc_buffer() call as thread-specific which would later assert if another thread needed to extend the buffer with realloc. This patch, due to Monty, removes the MY_THREAD_SPECIFIC flag for allocations that need to realloc in different threads, and preserves it for those that are allocated/freed in the user's thread. Also fixes MDEV-33562. Reviewed-by: Monty <monty@mariadb.org> Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
-
Kristian Nielsen authored
Remove work-around that disables bulk insert optimization in replication The root cause of the original problem is now fixed (MDEV-33475). Though the bulk insert optimization will still be disabled in replication, as it is only enabled in special circumstances meant for loading a mysqldump. Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
-
Kristian Nielsen authored
An earlier patch for MDEV-13577 fixed the most common instances of this, but missed one case for tables without primary key when the scan reaches the end of the table. This patch adds similar code to handle this case, converting the error to HA_ERR_RECORD_CHANGED when doing optimistic parallel apply. Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
-
Kristian Nielsen authored
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
-
Kristian Nielsen authored
This patch makes the server wait for the manager thread to actually start before proceeding with server startup. Without this, if thread scheduling is really slow and the server shutdowns quickly, then it is possible that the manager thread is not yet started when shutdown_performance_schema() is called. If the manager thread starts at just the wrong moment and just before the main server reaches exit(), the thread can try to access no longer available performance schema data. This was seen as occasional assertion in the main.bootstrap test. As an additional improvement, make sure to run all pending actions before exiting the manager thread. Reviewed-by: Monty <monty@mariadb.org> Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
-
- 14 Mar, 2024 8 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
it was generating broken spec files
-
Sergei Petrunia authored
eliminate_item_equal() uses quick_fix_field() for Item objects it creates. It computes some of their attributes on its own (see update_used_tables() call) but it doesn't update not_null_tables_cache. Recompute not_null_tables_cache also. Not computing it is currently harmless, except for producing MSAN error when some other code propagates the wrong value of not_null_tables_cache to other item.
-
Sergei Golubchik authored
cmake bug #14362
-
Sergei Golubchik authored
-
Thirunarayanan Balathandayuthapani authored
- Suppress the "Difficult to find free blocks" warning globally to avoid many different test case failing. - Demote the error information in validate_first_page() to note. So first page can recovered from doublewrite buffer and can throw error in case the page wasn't found in doublewrite buffer.
-
- 13 Mar, 2024 10 commits
-
-
Sergei Golubchik authored
to iterate over all status variables one should use LOCK_all_status_vars not LOCK_status this fixes sporadic mutex lock inversion in plugins.password_reuse_check: * acl_cache->lock is taken over complex operations that might increment status counters (under LOCK_status). * acl_cache->lock is needed to get the values of Acl% status variables when iterating over status variables
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
it broke tests on Windows. Use SEARCH_ABORT instead. also, remove redundant features and simplify
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
when changing charset from latin1 to utf8, adjust max_length accordingly
-
Dmitry Shulga authored
Follow-up to fix comiler warings caused by present of the clause override in declaration of the method Item_param::cleanup
-
- 12 Mar, 2024 4 commits
-
-
Monty authored
MDEV-33622 Server crashes when the UPDATE statement (which has duplicate key) is run after setting a low thread_stack This was caused by wrong allocation of variable on stack. (Was allocating 4K of data instead of 512 bytes). No test case as the original MDEV test cases is not usable for mtr.
-
Dmitry Shulga authored
UPDATE statement that is run in PS mode and uses positional parameter handles columns declared with the clause DEFAULT NULL incorrectly in case the clause DEFAULT is passed as actual value for the positional parameter of the prepared statement. Similar issue happens in case an expression specified in the DEFAULT clause of table's column definition. The reason for incorrect processing of columns declared as DEFAULT NULL is that setting of null flag for a field being updated was missed in implementation of the method Item_param::assign_default(). The reason for incorrect handling of an expression in DEFAULT clause is also missed saving of a field inside implementation of the method Item_param::assign_default().
-
Marko Mäkelä authored
log_free_check(): Assert that the current thread is not holding lock_sys.latch in any mode. This fixes up commit 5f2dcd11
-
Marko Mäkelä authored
-
- 11 Mar, 2024 5 commits
-
-
Marko Mäkelä authored
signal_hand(): Remove the cmake -DWITH_DBUG_TRACE=ON instrumentation. It can cause a crash on shutdown when the only other thread is waiting in wait_for_signal_thread_to_end().
-
mariadb-DebarunBanerjee authored
innodb.autoinc_debug: Correct the test case for predictable deadlock.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
In the JSON functions, the debug injection for stack overflows is inaccurate and may cause actual stack overflows. Let us simply inject stack overflow errors without actually relying on the ability of check_stack_overrun() to do so. Reviewed by: Rucha Deodhar
-
Marko Mäkelä authored
-
- 09 Mar, 2024 1 commit
-
-
Monty authored
-
- 08 Mar, 2024 3 commits
-
-
Daniele Sciascia authored
Fix a scenario where `mariabackup --prepare` fails with assertion `!m_modifications || !recv_no_log_write' in `mtr_t::commit()`. This happens if the prepare step of the backup encounters a data directory which happens to store wsrep xid position in TRX SYS page (this is no longer the case since 10.3.5). And since MDEV-17458, `trx_rseg_array_init()` handles this case by copying the xid position to rollback segments, before clearing the xid from TRX SYS page. However, this step should be avoided when `trx_rseg_array_init()` is invoked from mariabackup. The relevant code was surrounded by the condition `srv_operation == SRV_OPERATION_NORMAL`. An additional check ensures that we are not trying to copy a xid position which has already zeroed.
-
Monty authored
MDEV-33502 Slowdown when running nested statement with many partitions caused this error as I failed to take into account bigendian architectures. This patch also introduces bitmap_import() and bitmap_export() to be used when one wants to store bitmaps in files/logs in a portable way. Reviewed-by: Kristian Nielsen <knielsen@knielsen-hq.org>
-
Monty authored
This will makes it easier to find out what replication workers are doing and what they are waiting for. Things changed in processlist: - Slave_SQL time was not consistent. Now time for state "Slave has read all relay log; waiting for more updates" shows how long it has waited for getting the next event. - Slave_worker threads did often show "Closing tables" for a long time. Now the state is reverted to the previous state after "Closing tables" is done. - Commit and Rollback states where not shown for replication (and some other threads). Now Commit and Rollback states are always shown and the state is reverted to previous state when the Commit/Rollback have finished. Code changes: - Added thd->set_time_for_next_stage() for parallel replication when when starting to wait for prior transactions to commit, group commit, and FTWRL and for free space in thread pool. Before we reset the time only after the above events. - Moved THD_STAGE_INFO(stage_rollback) and THD_STAGE_INFO(stage_commit) from sql_parse.cc to transaction.cc to ensure this is done for all commits and not only 'normal connection queries'. Test case changes: - close_thread_tables() reverting stage to previous stage caused the counter in performance_schema to be increased. In many case it is the 'sql/starting' stage that was effected. - We only change to "Commit" stage if there is a need for a commit. This caused some "Commit" stages to disapper from perfschema reports. TODO in 11.#: - Slave_IO always showes "Waiting for master to send event" and the time is from SLAVE START. We should in 11.# change this to be the time since reading the last event.
-
- 07 Mar, 2024 1 commit
-
-
mariadb-DebarunBanerjee authored
The issue here is ha_innobase::get_auto_increment() could cause a deadlock involving auto-increment lock and rollback the transaction implicitly. For such cases, storage engines usually call thd_mark_transaction_to_rollback() to inform SQL engine about it which in turn takes appropriate actions and close the transaction. In innodb, we call it while converting Innodb error code to MySQL. However, since ::innobase_get_autoinc() returns void, we skip the call for error code conversion and also miss marking the transaction for rollback for deadlock error. We assert eventually while releasing a savepoint as the transaction state is not active. Since convert_error_code_to_mysql() is handling some generic error handling part, like invoking the callback when needed, we should call that function in ha_innobase::get_auto_increment() even if we don't return the resulting mysql error code back.
-