An error occurred fetching the project authors.
- 20 Sep, 2024 1 commit
-
-
Dave Gosselin authored
Ensure that select_thread_in_use is cleared before calling unireg_abort(), otherwise when unireg_abort() calls wait_for_signal_thread_to_end(), it will block indefinitely. Factored this common pattern in mysqld_main to a helper function to ensure this is done uniformly.
-
- 05 Sep, 2024 1 commit
-
- 17 Jul, 2024 1 commit
-
-
Sergei Golubchik authored
This reverts commit 938b9293. Not needed after 90d376e0.
-
- 10 Jul, 2024 1 commit
-
-
Vladislav Vaintroub authored
The server does not log errors after startup when it is started without the --console parameter and not as a service. This issue arises due to an undocumented behavior of FreeConsole() in Windows when only a single process (mariadbd/mysqld) is attached to it, causing the window to close. In this case stderr is redirected to a file before FreeConsole() is called. Procmon shows FreeConsole closing file handle subsequent writes to stderr fail with ERROR_INVALID_HANDLE because WriteFile() cannot operate on the closed handle. This results in losing all messages after startup, including warnings, errors, notes, and crash reports. Additionally, some users reported stderr being redirected to multi-master.info and failing at startup, but this could not be reproduced here. The workaround involves calling FreeConsole() right before the redirection of stdout/stderr. This fix has been tested with XAMPP and via cmd.exe using "start mysqld". Automated testing using MTR is challenging for this case. The fix is only applicable to version 10.5. In later versions, the FreeConsole() call has been removed.
-
- 02 Jul, 2024 2 commits
-
-
Monty authored
The feedback plugin server_uid variable and the calculate_server_uid() function is moved from feedback/utils.cc to sql/mysqld.cc server_uid is added as a global variable (shown in 'show variables') and is written to the error log on server startup together with server version and server commit id.
-
Monty authored
We have an issue if a user have the following in a configuration file: log_slow_filter="" # Log everything to slow query log log_queries_not_using_indexes=ON This set log_slow_filter to 'not_using_index' which disables slow_query_logging of most queries. In effect, on should never use log_slow_filter="" in config files but instead use log_slow_filter=ALL. Fixed by changing log_slow_filter="" that comes either from a configuration file or from the command line, when starting to the server, to log_slow_filter=ALL. A warning will be printed when this happens. Other things: - One can now use =ALL for any 'set' variable to set all options at once. (backported from 10.6)
-
- 10 Jun, 2024 1 commit
-
-
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.
-
- 08 May, 2024 1 commit
-
-
Sergei Golubchik authored
FreeBSD doesn't like it and hangs. As we don't wait for signal handler, let's disable SIGHUP in bootstrap too
-
- 05 May, 2024 2 commits
-
-
Sergei Golubchik authored
- 30 Apr, 2024 1 commit
-
-
Dimitri John Ledkov authored
Improve detection for DES support in OpenSSL, to allow compilation against system OpenSSL without DES. Note that MariaDB needs to be compiled against OpenSSL-like library that itself has DES support which cmake detected. Positive detection is indicated with CMake variable HAVE_des 1. Signed-off-by:
Dimitri John Ledkov <dimitri.ledkov@surgut.co.uk>
-
- 13 Apr, 2024 1 commit
-
-
Tony Chen authored
- Add additional MTRs for more coverage on invalid options - Updating a few error messages to be more informative - Use the exit code from handle_options() when there is an error processing user options All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
-
- 09 Apr, 2024 1 commit
-
-
Brandon Nesterenko authored
The signal handler thread can use various different runtime resources when processing a SIGHUP (e.g. master-info information) due to calling into reload_acl_and_cache(). Currently, the shutdown process waits for the termination of the signal thread after performing cleanup. However, this could cause resources actively used by the signal handler to be freed while reload_acl_and_cache() is processing. The specific resource that caused MDEV-30260 is a race condition for the hostname_cache, such that mysqld would delete it in clean_up()::hostname_cache_free(), before the signal handler would use it in reload_acl_and_cache()::hostname_cache_refresh(). Another similar resource is the active_mi/master_info_index. There was a race between its deletion by the main thread in end_slave(), and their usage by the Signal Handler as a part of Master_info_index::flush_all_relay_logs.read(active_mi) in reload_acl_and_cache(). This patch fixes these race conditions by relocating where server shutdown waits for the signal handler to die until after server-level threads have been killed (i.e., as a last step of close_connections()). With respect to the hostname_cache, active_mi and master_info_cache, this ensures that they cannot be destroyed while the signal handler is still active, and potentially using them. Additionally: 1) This requires that Events memory is still in place for SIGHUP handling's mysql_print_status(). So event deinitialization is moved into clean_up(), but the event scheduler still needs to be stopped in close_connections() at the same spot. 2) The function kill_server_thread is no longer used, so it is deleted 3) The timeout to wait for the death of the signal thread was not consistent with the comment. The comment mentioned up to 10 seconds, whereas it was actually 0.01s. The code has been fixed to wait up to 10 seconds. 4) A warning has been added if the signal handler thread fails to exit in time. 5) Added pthread_join() to end of wait_for_signal_thread_to_end() if it hadn't ended in 10s with a warning. Note this also removes the pthread_detached attribute from the signal_thread to allow for the pthread_join(). Reviewed By: =========== Vladislav Vaintroub <wlad@mariadb.com> Andrei Elkin <andrei.elkin@mariadb.com>
-
- 25 Mar, 2024 1 commit
-
-
Yuchen Pei authored
-
- 11 Mar, 2024 1 commit
-
-
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().
-
- 20 Feb, 2024 1 commit
-
-
Monty authored
This removes the error: "Failed to load slave replication state from table mysql.gtid_slave_pos: 1017: Can't find file: './mysql/' (errno: 2 "No such file or directory")
-
- 16 Feb, 2024 1 commit
-
-
Kristian Nielsen authored
my_malloc_size_cb_func() can be called from contexts where it is not safe to wait for LOCK_thd_kill, for example while holding LOCK_plugin. This could lead to (probably very unlikely) deadlock of the server. Fix by skipping the enforcement of --max-session-mem-used in the rare cases when LOCK_thd_kill cannot be obtained. The limit will instead be enforced on the following memory allocation. This does not significantly degrade the behaviour of --max-session-mem-used; that limit is in any case only enforced "softly", not taking effect until the next point at which the thread does a check_killed(). Reviewed-by:
Monty <monty@mariadb.org> Signed-off-by:
Kristian Nielsen <knielsen@knielsen-hq.org>
-
- 13 Feb, 2024 1 commit
-
-
Alexey Botchkov authored
The '<replication_slave>' user is assigned to the slave replication thread so this name appears in the auditing logs.
-
- 12 Feb, 2024 1 commit
-
-
Brandon Nesterenko authored
This test was prone to failures for a few reasons, summarized below: 1) MDEV-32168 introduced “only_running_threads=1” to slave_stop.inc, which allowed the stop logic to bypass an attempting-to-reconnect IO thread. That is, the IO thread could realize the master shutdown in `read_event()`, and thereby call into `try_to_reconnect()`. This would leave the IO thread up when the test expected it to be stopped. Fixed by explicitly stopping the IO thread and allowing an error state, as the above case would lead to errno 2003. 2) On slow systems (or those running profiling tools, e.g. MSAN), the waiting-for-ack transaction can complete before the system processes the `SHUTDOWN WAIT FOR ALL SLAVES`. There was shutdown preparation logic in-between the transaction and shutdown itself, which contributes to this problem. This patch also moves this preparation logic before the transaction, so there is less to do in-between the calls. 3) Changed work-around for MDEV-28141 to use debug_sync instead of sleep delay, as it was still possible to hit the bug on very slow systems. 4) Masked MTR variable reset with disable/enable query log Reviewed By: ============ Kristian Nielsen <knielsen@knielsen-hq.org>
-
- 10 Jan, 2024 1 commit
-
-
Sergei Golubchik authored
remove thr_setconcurrency() followup for 8bbcaab1 Fix by Rainer Orth
-
- 04 Jan, 2024 1 commit
-
-
Marko Mäkelä authored
In commit b4ff6456 the signature of mysql_show_var_func was changed, but not all functions of that type were adjusted. When the server is configured with `cmake -DWITH_ASAN=ON` and compiled with clang, runtime errors would be flagged for invoking functions through an incompatible function pointer. Reviewed by: Michael 'Monty' Widenius
-
- 05 Nov, 2023 2 commits
-
-
Alexey Botchkov authored
Backported from 10.7. The reason for the crash was a bug in MDEV-19275, after which shutdown does not wait for binlog threads anymore.
-
Alexey Botchkov authored
The SQL SERVICE backported into the 10.4.
-
- 13 Sep, 2023 1 commit
-
-
Daniel Black authored
Remove TLSv1.1 from the default tls_version system variable. Output a warning if TLSv1.0 or TLSv1.1 are selected. Thanks Tingyao Nian for the feature request.
-
- 04 Sep, 2023 1 commit
-
-
Daniel Black authored
Create test for for case insensitive gives a basic warning on creating a test file and the next thing a user might see is an abort. ProtectHome and other systemd setting protect system services from accessing user data. Unfortunately some of our users do put things on /home due space or other reasons. Rather than enumberate the systemd options in a very clunkly fragile way we put an error associated with the "Can't create test file" and hope the user can work it out from there. %M tip thanks Sergei.
-
- 06 Jun, 2023 1 commit
-
-
Brandon Nesterenko authored
This reverts commit 0a99d457 because it should go into only 10.5+
-
- 05 Jun, 2023 1 commit
-
-
Brandon Nesterenko authored
The problem is that a parallel replica would not immediately stop running/queued transactions when issued STOP SLAVE. That is, it allowed the current group of transactions to run, and sometimes the transactions which belong to the next group could be started and run through commit after STOP SLAVE was issued too, if the last group had started committing. This would lead to long periods to wait for all waiting transactions to finish. This patch updates a parallel replica to try and abort immediately and roll-back any ongoing transactions. The exception to this is any transactions which are non-transactional (e.g. those modifying sequences or non-transactional tables), and any prior transactions, will be run to completion. The specifics are as follows: 1. A new stage was added to SHOW PROCESSLIST output for the SQL Thread when it is waiting for a replica thread to either rollback or finish its transaction before stopping. This stage presents as “Waiting for worker thread to stop” 2. Worker threads which error or are killed no longer perform GCO cleanup if there is a concurrently running prior transaction. This is because a worker thread scheduled to run in a future GCO could be killed and incorrectly perform cleanup of the active GCO. 3. Refined cases when the FL_TRANSACTIONAL flag is added to GTID binlog events to disallow adding it to transactions which modify both transactional and non-transactional engines when the binlogging configuration allow the modifications to exist in the same event, i.e. when using binlog_direct_non_trans_update == 0 and binlog_format == statement. 4. A few existing MTR tests relied on the completion of certain transactions after issuing STOP SLAVE, and were re-recorded (potentially with added synchronizations) under the new rollback behavior. Reviewed By =========== Andrei Elkin <andrei.elkin@mariadb.com>
-
- 26 Apr, 2023 1 commit
-
-
Sergei Golubchik authored
remove ancient hard-coded treatment of --core-file. This enables normal my_getopt behavior for the already existing sysvar
-
- 09 Mar, 2023 1 commit
-
-
Sergei Golubchik authored
in bootstrap the server reads stdin and does not listen to network. it won't use ssl anyway
-
- 09 Feb, 2023 1 commit
-
-
Vicențiu Ciorbaru authored
This patch is the result of running run-clang-tidy -fix -header-filter=.* -checks='-*,modernize-use-equals-default' . Code style changes have been done on top. The result of this change leads to the following improvements: 1. Binary size reduction. * For a -DBUILD_CONFIG=mysql_release build, the binary size is reduced by ~400kb. * A raw -DCMAKE_BUILD_TYPE=Release reduces the binary size by ~1.4kb. 2. Compiler can better understand the intent of the code, thus it leads to more optimization possibilities. Additionally it enabled detecting unused variables that had an empty default constructor but not marked so explicitly. Particular change required following this patch in sql/opt_range.cc result_keys, an unused template class Bitmap now correctly issues unused variable warnings. Setting Bitmap template class constructor to default allows the compiler to identify that there are no side-effects when instantiating the class. Previously the compiler could not issue the warning as it assumed Bitmap class (being a template) would not be performing a NO-OP for its default constructor. This prevented the "unused variable warning".
-
- 06 Feb, 2023 1 commit
-
-
Daniel Black authored
Warning on a normal graceful disconnnect is excessive, so lets not do it. MDEV-19282 restructed the code from 10.3 so applying this as a 10.4+ fix.
-
- 20 Jan, 2023 1 commit
-
-
Mikhail Chalov authored
Minimize unsafe C functions usage - replace strcat() and strcpy() (and strncat() and strncpy()) with custom safe_strcat() and safe_strcpy() functions The MariaDB code base uses strcat() and strcpy() in several places. These are known to have memory safety issues and their usage is discouraged. Common security scanners like Flawfinder flags them. In MariaDB we should start using modern and safer variants on these functions. This is similar to memory issues fixes in 19af1890 and 9de9f105 but now replace use of strcat() and strcpy() with safer options strncat() and strncpy(). However, add '\0' forcefully to make sure the result string is correct since for these two functions it is not guaranteed what new string will be null-terminated. Example: size_t dest_len = sizeof(g->Message); strncpy(g->Message, "Null json tree", dest_len); strncat(g->Message, ":", sizeof(g->Message) - strlen(g->Message)); size_t wrote_sz = strlen(g->Message); size_t cur_len = wrote_sz >= dest_len ? dest_len - 1 : wrote_sz; g->Message[cur_len] = '\0'; All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services -- Reviewer and co-author Vicențiu Ciorbaru <vicentiu@mariadb.org> -- Reviewer additions: * The initial function implementation was flawed. Replaced with a simpler and also correct version. * Simplified code by making use of snprintf instead of chaining strcat. * Simplified code by removing dynamic string construction in the first place and using static strings if possible. See connect storage engine changes.
-
- 07 Jan, 2023 1 commit
-
-
Daniel Black authored
Don't display the source revision in the mysqld --help output.
-
- 06 Jan, 2023 1 commit
-
-
Haidong Ji authored
MariaDB MDEV-12583 added `SOURCE_REVISION` variable that exposes the SHA1 of source code commit that the current running engine was built from. This info is useful for troubleshooting and debugging. This commit does the following: - addes the `SOURCE_REVISION` value into engine error log. - when a crash triggers handle_fatal_signal, the `SOURCE_REVISION` will be included in crash report. - resolves MDEV-20344: startup messages belong in stderr/error-log not stdout All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
-
- 01 Jan, 2023 1 commit
-
-
Sergei Golubchik authored
custom code in `case OPT_SKIP_RESOLVE` was overriding the correct value from handle_options().
-
- 17 Nov, 2022 1 commit
-
-
Alexander Barkov authored
MDEV-29473 UBSAN: Signed integer overflow: X * Y cannot be represented in type 'int' in strings/dtoa.c Fixing a few problems relealed by UBSAN in type_float.test - multiplication overflow in dtoa.c - uninitialized Field::geom_type (and Field::srid as well) - Wrong call-back function types used in combination with SHOW_FUNC. Changes in the mysql_show_var_func data type definition were not properly addressed all around the code by the following commits: b4ff6456 18feb62f 0ee879ff Adding a helper SHOW_FUNC_ENTRY() function and replacing all mysql_show_var_func declarations using SHOW_FUNC to SHOW_FUNC_ENTRY, to catch mysql_show_var_func in the future at compilation time.
-
- 28 Oct, 2022 1 commit
-
-
Daniel Black authored
Per the code my_set_max_open_files 3 lines earlier, we attempt to set the nofile (number of open files), rlimit to max_open_files. We should use this in the warning because wanted_files may not be the number.
-
- 25 Oct, 2022 1 commit
-
-
Vladislav Vaintroub authored
Abort startup, if SSL setup fails. Also, for the server always check that certificate matches private key (even if ssl_cert is not set, OpenSSL will try to use default one)
-
- 19 Oct, 2022 1 commit
-
-
Monty authored
This was caused by the short_option_1-master.opt file that had the option -T12, which means (among other things) to use blocking for sockets. This was supported up to MariaDB 10.4, but not in 10.5 where we removed the code that changes blocking sockets to non blocking in case of errors. Fixed by ignoring the TEST_BLOCKING flag and also by not using the -T12 argument in short_option_1. Other things: - Added back support for valgrind (the original issue had nothing to do with valgrind). - While debugging I noticed that the retry loop in handle_connections_sockets() was doing a lot of work during shutdown. Fixed by not doing retrys during shutdown.
-
- 11 Oct, 2022 1 commit
-
-
Vladislav Vaintroub authored
MDEV-19243 introduced a regression on Windows. In (supposedly rare) case, where environment variable TZ was set, @@system_time_zone no longer derives from TZ. Instead, it incorrecty refers to system default time zone, eventhough UTC time conversion takes TZ into account. The fix is to restore TZ-aware handling (timezone name derives from tzname), if TZ is set.
-