- 30 Sep, 2024 1 commit
-
-
Rex authored
Fields referencing tables more outward (i.e. closer to the top most query) embedded within subqueries can sometimes require further name resolution after query merges during optimization. An example of this is select * from ( select * from t3 where c in ( select a from t1 where ( select b from t2 where a > 0 and b < 3 ) <> 0 ) ) dt here field _a_ in a single row subselect has a context that points to the select "select a from t1". After optimization, this select lex has been merged with it's parent. If run as a prepared statement, on second execution, name resolution on this field will reference a context points to this (now invalid) select_lex. Further name resolution can also be invoked on the first execution when conditions are moved from having to where, such as this select * from ( select * from t1 where a in ( select a from t1 where ( select b from t2 where b < 3 group by a having a > 0 ) <> 0 ) ) dt Fixed by implementing a smart Name_resolution_context::outer_select() method that skips merged SELECT_LEXs and disabling direct access to these members of Name_resolution_context.
-
- 25 Sep, 2024 4 commits
-
-
Dave Gosselin authored
Move memory allocations performed during Sys_var_gtid_binlog_state::do_check to Sys_var_gtid_binlog_state::global_update where they will be freed before the latter method returns.
-
Sergei Petrunia authored
A call to dbug_print_join_prefix(join_positions, idx, s) returns a const char* ponter to string with current join prefix, including the table being added to it.
-
Daniel Black authored
All the options that where in buildbot, should be in the server making it accessible to all without any special invocation. If WITH_MSAN=ON, we want to make sure that the compiler options are supported and it will result in an error if not supported. We make the -WITH_MSAN=ON append -stdlib=libc++ to the CXX_FLAGS if supported. With SECURITY_HARDENING options the bootstrap currently crashes, so for now, we disable SECRUITY_HARDENING if there is MSAN enable. Option WITH_DBUG_TRACE has no effect in MSAN builds.
-
Lena Startseva authored
This is a limitation of the view protocol. Tests were fixed with workaround (via disable/enable service connection)
-
- 24 Sep, 2024 3 commits
-
-
Max Kellermann authored
Each time a listener socket becomes ready, MariaDB calls accept() ten times (MAX_ACCEPT_RETRY), even if all but the first one return EAGAIN because there are no more connections. This causes unnecessary CPU usage - on our server, the CPU load of that thread, which does nothing but accept(), saturates one CPU core by ~45%. The loop should stop after the first EAGAIN. Perf report: 11.01% mariadbd libc.so.6 [.] accept4 6.42% mariadbd [kernel.kallsyms] [k] finish_task_switch.isra.0 5.50% mariadbd [kernel.kallsyms] [k] _raw_spin_unlock_irqrestore 5.50% mariadbd [kernel.kallsyms] [k] syscall_enter_from_user_mode 4.59% mariadbd [kernel.kallsyms] [k] __fget_light 3.67% mariadbd [kernel.kallsyms] [k] kmem_cache_alloc 2.75% mariadbd [kernel.kallsyms] [k] fput 2.75% mariadbd [kernel.kallsyms] [k] mod_objcg_state 1.83% mariadbd [kernel.kallsyms] [k] __inode_wait_for_writeback 1.83% mariadbd [kernel.kallsyms] [k] __sys_accept4 1.83% mariadbd [kernel.kallsyms] [k] _raw_spin_unlock_irq 1.83% mariadbd [kernel.kallsyms] [k] alloc_inode 1.83% mariadbd [kernel.kallsyms] [k] call_rcu
-
Sergei Golubchik authored
put the command line at the end. so that when a very long command line is truncated, it doesn't take the actual error message with it
-
Sergei Golubchik authored
set transferfmt in .cnf file like other galera tests do. otherwise it defaults to socat when mtr detected that only nc is available
-
- 23 Sep, 2024 3 commits
-
-
Oleksandr Byelkin authored
Bring info about cause of closing connection in the place where we increment statistics to do it correctly.
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
- 20 Sep, 2024 4 commits
-
-
Alexander Barkov authored
MDEV-32891 Assertion `value <= ((ulonglong) 0xFFFFFFFFL) * 10000ULL' failed in str_to_DDhhmmssff_internal Fixing the wrong assert.
-
Alexander Barkov authored
MDEV-31302 Assertion `mon > 0 && mon < 13' failed in my_time_t sec_since_epoch(int, int, int, int, int, int) The code erroneously called sec_since_epoch() for dates with zeros, e.g. '2024-00-01'. Fixi: adding a test that the date does not have zeros before calling TIME_to_native().
-
Alexander Barkov authored
MDEV-31221 UBSAN runtime error: negation of -9223372036854775808 cannot be represented in type 'long long int' in my_strtoll10_utf32 The code in my_strtoll10_mb2 and my_strtoll10_utf32 could hit undefinite behavior by negation of LONGLONG_MIN. Fixing to avoid this. Also, fixing my_strtoll10() in the same style. The previous reduction produced a redundant warning on CAST(_latin1'-9223372036854775808' AS SIGNED)
-
Alexander Barkov authored
MDEV-28386 UBSAN: runtime error: negation of -X cannot be represented in type 'long long int'; cast to an unsigned type to negate this value to itself in my_strntoull_8bit on SELECT ... OCT The code in my_strntoull_8bit() and my_strntoull_mb2_or_mb4() could hit undefinite behavior by negating of LONGLONG_MIN. Fixing the code to avoid this.
-
- 18 Sep, 2024 3 commits
-
-
Lena Startseva authored
Updated tests: cases with bugs or which cannot be run with the cursor-protocol were excluded with "--disable_cursor_protocol"/"--enable_cursor_protocol" Fix for v.10.5
-
Lena Startseva authored
Added ability to disable/enable (--disable_cursor_protocol/ --enable_cursor_protocol) cursor-protocol in tests. If "--disable_cursor_protocol" is used then ps-protocol is also disabled. With cursor-protocol prepare statement is executed only once. For "--cursor-protocol" added filter for queries: it is executed only for "SELECT" queries.
-
Daniel Black authored
The loose regex for the MDEV-34539 test ended up matching the opensuse in the path in buildbot. Adjust to more complete regex including space, backtick and \n, which becomes much less common as a path name.
-
- 17 Sep, 2024 2 commits
-
-
Brandon Nesterenko authored
The failing test case validates Seconds_Behind_Master for a delayed slave, while STOP SLAVE is executed during a delay. The test fixes initially added to the test (commit b04c8575) added a table lock to ensure a transaction could not finish before validating the Seconds_Behind_Master field after SLAVE START, but did not address a possibility that the transaction could finish before running the STOP SLAVE command, which invalidates the validations for the rest of the test case. Specifically, this would result in 1) a timeout in “Waiting for table metadata lock” on the replica, which expects the transaction to retry after slave restart and hit a lock conflict on the locked tables (added in b04c8575), and 2) that Seconds_Behind_Master should have increased, but did not. The failure can be reproduced by synchronizing the slave to the master before the MDEV-32265 echo statement (i.e. before the SLAVE STOP). This patch fixes the test by adding a mechanism to use DEBUG_SYNC to synchronize a MASTER_DELAY, rather than continually increase the duration of the delay each time the test fails on buildbot. This is to ensure that on slow machines, a delay does not pass before the test gets a chance to validate results. Additionally, it decreases overall test time because the test can continue immediately after validation, thereby bypassing the remainder of a full delay for each transaction.
-
Alexander Barkov authored
MDEV-25900 Assertion `octets < 1024' failed in Binlog_type_info_fixed_string::Binlog_type_info_fixed_string OR Assertion `field_length < 1024' failed in Field_string::save_field_metadata A CHAR column cannot be longer than 1024, because Binlog_type_info_fixed_string::Binlog_type_info_fixed_string replies on this fact - it cannot store binlog metadata for longer columns. In case of the filename character set mbmaxlen is equal to 5, so only 1024/5=204 characters can fit into the 1024 limit. - In strict mode: Disallowing creation of a CHAR column with octet length grater than 1024. - In non-strict mode: Automatically convert CHAR with octet length>1024 into VARCHAR.
-
- 16 Sep, 2024 1 commit
-
-
Julius Goryavsky authored
-
- 15 Sep, 2024 12 commits
-
-
Julius Goryavsky authored
-
Julius Goryavsky authored
-
Julius Goryavsky authored
-
Julius Goryavsky authored
-
Julius Goryavsky authored
-
Julius Goryavsky authored
The lsof utility is prone to blocking on system calls that it uses to obtain information about sockets (or files, devices, etc.). This behavior is described in its own documentation. It has a '-b' option (in combination with warnings suppression via '-w') that reduces the probability of blocking, introducing new problems (luckily probably not relevant for our use case). However, there is no guarantee that it will not hang on some distributions, with some TCP/IP stack implementations, or with some filesystems, etc. Also, of the three utilities that are suitable for our purposes, lsof is the slowest. So if there are other utilities that we use during SST, such as 'ss' or 'sockstat', it is reasonable to use them instead of lsof. This commit changes the prioritization of utilities, it does not need additional tests (besides the numerous SST tests already available in the galera suites). If the system still need to use lsof, this commit adds the '-b' and '-w' options to it command line - to reduce the likelihood of blocking.
-
Julius Goryavsky authored
-
Julius Goryavsky authored
-
Julius Goryavsky authored
-
Julius Goryavsky authored
Removed handling of the long-unsupported xtrabackup_pid file, as it is not even created by modern versions of mariabackup. Instead, added stopping of the asynchronous process that mariabackup runs (if it is still active) to the exception handler.
-
Julius Goryavsky authored
This commit makes the SST script for mariabackup more resilient to unexpected terminations or hangs while mariabackup or when SST scripts in a previous session are still running (in reality they were hung while waiting for something).
-
Julius Goryavsky authored
-
- 14 Sep, 2024 1 commit
-
-
Marko Mäkelä authored
GCC 12.2.0 could issue -Wnonnull for an unreachable call to strlen(new_path). Let us prevent that by replacing the condition (type == FILE_RENAME) with the equivalent (new_path). This should also optimize the generated code, because the life time of the parameter "type" will be reduced.
-
- 13 Sep, 2024 1 commit
-
-
Marko Mäkelä authored
my_b_encr_write(): Initialize also block_length, and at the same time last_block_length, so that all 128 bits can be initialized with fewer writes. This fixes an error that was caught in the test encryption.tempfiles_encrypted. test_my_safe_print_str(): Skip a test that would attempt to display uninitialized data in the test unit.stacktrace. Previously, our CI did not build unit tests with MemorySanitizer. handle_delayed_insert(): Remove a redundant call to pthread_exit(0), which would for some reason cause MemorySanitizer in clang-19 to report a stack overflow in a RelWithDebInfo build. This fixes a failure of several tests. Reviewed by: Vladislav Vaintroub
-
- 12 Sep, 2024 2 commits
-
-
Dave Gosselin authored
Emit a warning in the event that we finished processing input files before reaching the boundary indicated by --stop-datetime.
-
Dave Gosselin authored
Emit a warning in the event that we finished processing input files before reaching the boundary indicated by --stop-position.
-
- 10 Sep, 2024 3 commits
-
-
Yuchen Pei authored
MDEV-31788 Factor functions to reduce duplication around spider_check_and_init_casual_read in ha_spider.cc factored out static functions: - spider_prep_loop - spider_start_bg - spider_send_queries
-
Yuchen Pei authored
-
Yuchen Pei authored
-