- 27 Mar, 2024 4 commits
-
-
Alexander Barkov authored
Item_func_group_concat::print() did not take into account that Item_func_group_concat::separator can be of a different character set than the "String *str" (when the printing is being done to). Therefore, printing did not work correctly for: - non-ASCII separators when GROUP_CONCAT is done on 8bit data or multi-byte data with mbminlen==1. - all separators (even including simple ones like comma) when GROUP_CONCAT is done on ucs2/utf16/utf32 data (mbminlen>1). Because of this problem, VIEW definitions did not print correctly to their FRM files. This later led to a wrong SELECT and SHOW CREATE output. Fix: - Adding new String methods: bool append_for_single_quote_using_mb_wc(const char *str, size_t length, CHARSET_INFO *cs); bool append_for_single_quote_opt_convert(const char *str, size_t length, CHARSET_INFO *cs) which perform both escaping and character set conversion at the same time. - Adding a new String method escaped_wc_for_single_quote(), to reuse the code between the old and the new methods. - Fixing Item_func_group_concat::print() to use the new method append_for_single_quote_opt_convert().
-
Dave Gosselin authored
Queries that select concatenated constant strings now have colname and value that match. For example, SELECT '123' 'x'; will return a result where the column name and value both are '123x'. Review: Daniel Black
-
Daniel Black authored
.. even with MDEV-9095 fix CapabilityBounding sets require filesystem setcap attributes for the executable to gain privileges during execution. A side effect of this however is the getauxvec(AT_SECURE) gets set, and the secure_getenv from OpenSSL internals on OPENSSL_CONF environment variable will get ignored (openssl gh issue 21770). According to capabilities(7), Ambient capabilities don't trigger ld.so triggering the secure execution mode. Include SELinux and Apparmor capabilities for ipc_lock
-
Daniel Black authored
This was the orginal implementation that reverted with a bunch of commits. This reverts commit a13e521b. Revert "cmake: append to the array correctly" This reverts commit 51e3f1da. Revert "build failure with cmake < 3.10" This reverts commit 49cf702e. Revert "MDEV-33301 memlock with systemd still not working" This reverts commit 8a1904d7.
-
- 25 Mar, 2024 2 commits
-
-
Julius Goryavsky authored
-
Jan Lindström authored
MDEV-32787 : Assertion `!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row()) || thd->wsrep_cs().transaction().state() == wsrep::transaction::s_aborted' failed in void wsrep_commit_empty(THD*, bool) When we commit empty transaction we should allow wsrep transaction to be on s_must_replay state for DDL that was killed during certification. Fix is tested with RQG because deterministic mtr-testcase was not found. Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
-
- 22 Mar, 2024 2 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
MONITOR_INC_VALUE_CUMULATIVE is a multiline macro, so the second statement will be executed always, regardless of "if" condition. These problems first started with commit b1ab211d (MDEV-15053). Thanks to Yury Chaikou from ServiceNow for the report.
-
- 19 Mar, 2024 1 commit
-
-
Vladislav Vaintroub authored
Make WITHOUT_DYNAMIC_PLUGINS ignore mrooonga also in its own DIY version of MYSQL_ADD_PLUGIN
-
- 18 Mar, 2024 3 commits
-
-
Daniel Black authored
Postfix on 51e3f1da that mariadbd should be the executable name rather than capabilities on a symlink.
-
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 2 commits
-
-
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 5 commits
-
-
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 4 commits
-
-
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 1 commit
-
-
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().
-
- 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
-
- 08 Mar, 2024 1 commit
-
-
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.
-
- 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.
-
- 06 Mar, 2024 3 commits
-
-
Thirunarayanan Balathandayuthapani authored
Problem: ======== During upgrade, InnoDB does write the redo log for adjusting the tablespace size or tablespace flags even before the log has upgraded to configured format. This could lead to data inconsistent if any crash happened during upgrade process. Fix: === srv_start(): Write the tablespace flags adjustment, increased tablespace size redo log only after redo log upgradation. log_write_low(), log_reserve_and_write_fast(): Check whether the redo log is in physical format.
-
Thirunarayanan Balathandayuthapani authored
- During update operation, InnoDB should avoid the initializing the FTS_DOC_ID of foreign table if the foreign table is discarded
-
Thirunarayanan Balathandayuthapani authored
- Adjust the test case to check whether all tablespaces are encrypted by comparing it with existing table count.
-
- 04 Mar, 2024 1 commit
-
-
Yuchen Pei authored
-
- 03 Mar, 2024 1 commit
-
-
Yuchen Pei authored
Like the fix for MDEV-32753 and MDEV-33242, spider init queries creates new connections that use the global sql_mode of the existing connection.
-
- 02 Mar, 2024 1 commit
-
-
Alexey Botchkov authored
Few Item_func_json_xxx::fix_length_and_dec() functions fixed.
-
- 01 Mar, 2024 2 commits
-
-
Monty authored
The problem was that SHOW PROCESSLIST was done before the command of the default connection was cleared. Reviewer: Sergei Golubchik <serg@mariadb.org>
-
Tony Chen authored
Previously, the behavior was to error out on the first invalid option encountered. With this change, a best effort approach is made so that all invalid options processed will be printed before exiting. There is a caveat. The options are processed many times at varying stages of server startup because the server is not aware of all valid options immediately (e.g. plugins have to be loaded first before the server knows what are the available plugin options). So, there are some options that the server can determine are invalid "early" on, and there are some options that the server cannot determine are invalid until "later" on. For example, the server can determine an option such as `--a` is an ambiguous option very early on but an option such as `--this-does-not-match-any-option` cannot be labelled as invalid until the server is aware of all available options. Thus, it is possible that the server will still fail before printing out all "invalid" options. You can see this by passing `--a --obvious-invalid-option`. Test cases were added to `mysqld_option_err.test` to validate that multiple invalid options will be displayed in the error message. 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.
-
- 27 Feb, 2024 1 commit
-
-
mariadb-DebarunBanerjee authored
The root cause is the WAL logging of file operation when the actual operation fails afterwards. It creates a situation with a log entry for a operation that would always fail. I could simulate both the backup scenario error and Innodb recovery failure exploiting the weakness. We are following WAL for file rename operation and once logged the operation must eventually complete successfully, or it is a major catastrophe. Right now, we fail for rename and handle it as normal error and it is the problem. I created a patch to address RENAME operation to a non existing schema where the destination schema directory is missing. The patch checks for the missing schema before logging in an attempt to avoid the failure after WAL log is written/flushed. I also checked that the schema cannot be dropped or there cannot be any race with other rename to the same file. This is protected by the MDL lock in SQL today. The patch should this be a good improvement over the current situation and solves the issue at hand.
-