- 08 Jul, 2024 1 commit
-
-
Alexander Barkov authored
-
- 06 Jul, 2024 2 commits
- 02 Jul, 2024 1 commit
-
-
Monty authored
Storage engines generally expects that my_errno is set in case of errors
-
- 28 Jun, 2024 3 commits
-
-
Monty authored
Affects: MDEV-34150 Assertion failure in Diagnostics_area::set_error_status upon binary logging hitting tmp space limit MDEV-9101 Limit size of created disk temporary files and tables This bug was caused by moving flushing of the in-memory-row-events from close_thread_tables() to binlog_commit() in MDEV-34150. This was needed to be able to handle the case where binlog writes could fail. Galera have two case where the change caused problems: - Row events in commit_one_phase_2() was not done in the case the standard binary log was not enabled but Galera was using the binary log internally. - Galera disabled the call to binlog_commit_flush_stmt_cache() for not ending transactions. Fixed by adding code that flushes the in-memory-row-events to the binary log (write, but now sync) in the two above cases if Galera is enabled.
-
Monty authored
-
Nikita Malyavin authored
realloc can't be done for mysql->passwd. There's also no pretty way to pass the ext-salt into hash_password, so let's use thread_local instead. For GCC < 4.9 (SLES 12, CentOS 7), which don't support _Thread_local, pk will be recalculated instead
-
- 20 Jun, 2024 1 commit
-
-
Daniel Black authored
Since MDEV-25829 Change default Unicode collation to uca1400_ai_ci there is no need to set character-set-collations explicitly as its the default. Further mode the change in defaults affects all character sets that support the uca1400_ai_ci collation.
-
- 18 Jun, 2024 1 commit
-
-
Andre Alves authored
-
- 17 Jun, 2024 5 commits
-
-
Alexander Barkov authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
- 16 Jun, 2024 2 commits
-
-
Monty authored
This avoids a lot of SETVAL() results when applying a mysqldump with sequences.
-
Monty authored
To make this possible, it was also necessary to enhance the mariadb client with the option --print-query-on-error. This option can also be very useful when running a batch of queries through the mariadb client and one wants to find out where things goes wrong. TODO: It would be good to enhance mariadb_upgrade to not call the mariadb client for executing queries but instead do this internally. This would have made this patch much easier! Reviewed by: Sergei Golubchik <serg@mariadb.com>
-
- 14 Jun, 2024 2 commits
-
-
Marko Mäkelä authored
-
Thirunarayanan Balathandayuthapani authored
- During recovery, InnoDB may fail to shrink the undo tablespaces when there are no pages to recover while applying the redo log. This issue exists only when innodb_undo_truncate is enabled. trx_lists_init_at_db_start() could've applied the redo logs for undo tablespace page0.
-
- 13 Jun, 2024 6 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
This fixes up the merge commit 829cb1a4
-
Marko Mäkelä authored
-
Oleksandr Byelkin authored
-
Monty authored
-
Marko Mäkelä authored
-
- 12 Jun, 2024 3 commits
-
-
Thirunarayanan Balathandayuthapani authored
- InnoDB ignores the error while traversing the used extents during shrinking process. Made changes in fsp_traverse_extents() to handle error condition correctly
-
Brandon Nesterenko authored
On an UBSAN clang-15 build, if running with UBSAN option halt_on_error=1 (the issue doesn't show up without it), MTR fails during mysqld --bootstrap with UBSAN error: call to function io_callback(tpool::aiocb*) through pointer to incorrect function type 'void (*)(void *)' This patch corrects the parameter type of io_callback to match its expected type defined by callback_func, i.e. (void*). Reviewed By: ============ <TODO>
-
Marko Mäkelä authored
-
- 11 Jun, 2024 3 commits
-
-
Thirunarayanan Balathandayuthapani authored
Problem: ======= During recovery, InnoDB fails to apply the redo log for compressed tablespace. The reason is that InnoDB assumes that pages has been freed while applying the redo log for it. During multiple scan of redo logs, InnoDB stores the freed page information when it have sufficient buffer pool pages. Once it ran out of memory, InnoDB doesn't store freed page information. But InnoDB assigns the freed page ranges to tablespace in recv_init_crash_recovery_spaces() even though InnoDB doesn't have complete freed range information. While applying the redo log, InnoDB wrongly assumes that page has been freed and it could lead to corruption of tablespace. This issue is caused by commit 941af1fa (MDEV-31803) and commit 2f9e2647 (MDEV-29911). Solution: ======== During recovery, set recovery size and freed page information for all tablespace irrespective of memory.
-
Marko Mäkelä authored
-
Vladislav Vaintroub authored
The bug can happens on macOS, if server closes the socket without sending error packet to client. Closing the socket on server side is legitimate, and happen e.g when write timeout occurs, perhaps also other situations. However mysqltest is not prepared to handle mysql_errno 0, and erroneously thinks connection was successfully established. The fix/workaround in mysqltest is to treat client failure with mysql_errno 0 the same as CR_SERVER_LOST (generic client-side communication error) The real fix in client library would ensure that mysql_errno is set on errors.
-
- 10 Jun, 2024 9 commits
-
-
Yuchen Pei authored
Otherwise it may result in nonsensical values like 190 for a boolean.
-
Sergei Golubchik authored
-
Dave Gosselin authored
Immediately close down the signal handler loop when we decide to break connections as it's the start of process termination anyway, and there's no need to wait once we've invoked break_connections.
-
Brandon Nesterenko authored
The problem is that the test could query the status variable Rpl_semi_sync_slave_send_ack before the slave actually updated it. This would result in an immediate --die assertion killing the rest of the test. The bottom of this commit message has a small patch that can be applied to reproduce the test failure. This patch fixes the test failure by waiting for the variable to be updated before querying its value. diff --git a/sql/semisync_slave.cc b/sql/semisync_slave.cc index 9ddd4c5c8d7..60538079fce 100644 --- a/sql/semisync_slave.cc +++ b/sql/semisync_slave.cc @@ -303,7 +303,10 @@ int Repl_semi_sync_slave::slave_reply(Master_info *mi) reply_res= DBUG_EVALUATE_IF("semislave_failed_net_flush", 1, net_flush(net)); if (!reply_res) + { + sleep(1); rpl_semi_sync_slave_send_ack++; + } } DBUG_RETURN(reply_res); }
-
Alexander Barkov authored
--skip-not-found switch tells mtr to skip not found tests instead of aborting. But it failed to skip the test if the suite name was not found. This problem also made the *last-N-failed builbot builders fail to run `mtr --skip-not-found` if the last commit removed a file in the mysql-test/include/ directory. This commit fixes it, now the not found test is properly skipped, no matter what component of the test name was not found: $ ./mtr main.foo --skip-not-found foo.main ... ============================================================================== TEST WORKER RESULT TIME (ms) or COMMENT -------------------------------------------------------------------------- foo.main [ skipped ] not found main.foo [ skipped ] not found --------------------------------------------------------------------------
-
Marko Mäkelä authored
-
Marko Mäkelä authored
In cmake -DWITH_UBSAN=ON builds with clang but not with GCC, -fsanitize=undefined will flag several runtime errors on function pointer mismatch related to the lock-free hash table LF_HASH. Let us use matching function signatures and remove function pointer casts in order to avoid potential bugs due to undefined behaviour. These errors could be caught at compilation time by -Wcast-function-type-strict, which is available starting with clang-16, but not available in any version of GCC as of now. The old GCC flag -Wcast-function-type is enabled as part of -Wextra, but it specifically does not catch these errors. Reviewed by: Vladislav Vaintroub
-
Alexander Barkov authored
MDEV-34227 On startup: UBSAN: runtime error: applying non-zero offset in JOIN::make_aggr_tables_info in sql/sql_select.cc Avoid undefined behaviour (applying offset to nullptr). The reported scenario is covered in mysql-test/connect-no-db.test No new tests needed.
-
Alexander Barkov authored
MDEV-32376 SHOW CREATE DATABASE statement crashes the server when db name contains some unicode characters, ASAN stack-buffer-overflow Adding the test for the length of lex->name into show_create_db(). Without this test writes beyond the end of db_name_buff were possible upon a too long database name.
-
- 09 Jun, 2024 1 commit
-
-
Brandon Nesterenko authored
MDEV-34237: On Startup: UBSAN: runtime error: call to function MDL_lock::lf_hash_initializer lf_hash_insert through pointer to incorrect function type 'void (*)(st_lf_hash *, void *, const void *)' A few different incorrect function type UBSAN issues have been grouped into this patch. The only real potentially undefined behavior is an error about show_func_mutex_instances_lost, which when invoked in sql_show.cc::show_status_array(), puts 5 arguments onto the stack; however, the implementing function only actually has 3 parameters (so only 3 would be popped). This was fixed by adding in the remaining parameters to satisfy the type mysql_show_var_func. The rest of the findings are pointer type mismatches that wouldn't lead to actual undefined behavior. The lf_hash_initializer function type definition is typedef void (*lf_hash_initializer)(LF_HASH *hash, void *dst, const void *src); but the MDL_lock and table cache's implementations of this function do not have that signature. The MDL_lock has specific MDL object parameters: static void lf_hash_initializer(LF_HASH *hash __attribute__((unused)), MDL_lock *lock, MDL_key *key_arg) and the table cache has specific TDC parameters: static void tdc_hash_initializer(LF_HASH *, TDC_element *element, LEX_STRING *key) leading to UBSAN runtime errors when invoking these functions. This patch fixes these type mis-matches by changing the implementing functions to use void * and const void * for their respective parameters, and later casting them to their expected type in the function body. Note too the functions tdc_hash_key and tc_purge_callback had a similar problem to tdc_hash_initializer and was fixed similarly. Reviewed By: ============ Sergei Golubchik <serg@mariadb.com>
-