- 14 Feb, 2024 1 commit
-
-
Yuchen Pei authored
After MDEV-31400, plugins are allowed to ask for retries when failing initialisation. However, such failures also cause plugin system variables to be deleted (plugin_variables_deinit()) before retrying and are not re-added during retry. We fix this by checking that if the plugin has requested a retry the variables are not deleted. Because plugin_deinitialize() also calls plugin_variables_deinit(), if the retry fails, the variables will still be deleted. Alternatives considered: - remove the plugin_variables_deinit() from plugin_initialize() error handling altogether. We decide to take a more conservative approach here. - re-add the system variables during retry. It is more complicated than simply iterating over plugin->system_vars and call my_hash_insert(). For example we will need to assign values to the test_load field and extract more code from test_plugin_options(), if that is possible.
-
- 04 Feb, 2024 1 commit
-
-
Oleksandr Byelkin authored
-
- 02 Feb, 2024 2 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
- 01 Feb, 2024 4 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
FMT_STATIC_THOUSANDS_SEPARATOR stopped working in 10.0.0 Let's not use this fmt version for now
-
Sergei Golubchik authored
even if pkg-config has it. otherwise build dependencies aren't detected.
-
- 31 Jan, 2024 7 commits
-
-
Brandon Nesterenko authored
After MDEV-32551, in a master/slave setup, if the replica's IO thread quickly and successively reconnects (i.e quickly running STOP SLAVE IO_THREAD followed by START SLAVE IO_THREAD), the relay log rotation behavior changes. That is, MDEV-32551 changed the logic of the binlog_dump_thread on the primary, such that it can stop itself before sending any events if it sees a new connection has been created to a replica with the same server_id. Pre MDEV-32551, the connection would establish and it would send a "fake" rotate event to populate the log name. Post MDEV-32551, the connection stops itself, and a rotate event is not sent. This made the test rpl.rpl_mariadb_slave_capability unstable because it is reliant on the name of the relay logs (which is dependent on the number of rotates); and the pre-amble of the test would quickly start/stop the IO thread. There a binlog dump thread could end itself before sending a rotate event to the replica, thereby changing the name of the relay log. This patch fixes this by adding in a synchronization in-between IO thread restarts, such that it waits for the primary's binlog dump threads to sync up with the state of the replica.
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
-
Sergei Golubchik authored
test disabled, until fixed
-
- 30 Jan, 2024 6 commits
-
-
Oleksandr Byelkin authored
-
Oleksandr Byelkin authored
-
Oleksandr Byelkin authored
-
Oleksandr Byelkin authored
-
Oleksandr Byelkin authored
-
Brandon Nesterenko authored
rpl.rpl_seconds_behind_master_spike uses the DEBUG_SYNC mechanism to count how many format descriptor events (FDEs) have been executed, to attempt to pause on a specific relay log FDE after executing transactions. However, depending on when the IO thread is stopped, it can send an extra FDE before sending the transactions, forcing the test to pause before executing any transactions, resulting in a table not existing, that is attempted to be read for COUNT. This patch fixes this by no longer counting FDEs, but rather by programmatically waiting until the SQL thread has executed the transaction and then automatically activating the DEBUG_SYNC point to trigger at the next relay log FDE.
-
- 27 Jan, 2024 3 commits
- 26 Jan, 2024 5 commits
-
-
Brandon Nesterenko authored
A debug_sync signal could remain for the SQL thread that should have begun a wait_for upon seeing a GTID event, but would instead see the old signal and continue on without waiting. This broke an "idle" condition in SHOW SLAVE STATUS which should have automatically negated Seconds_Behind_Master. Instead, because the SQL thread had already processed the GTID event, it set sql_thread_caught_up to false, and thereby calculated the value of Seconds_behind_master, when the test expected 0. This patch fixes this by resetting the debug_sync state before creating a new transaction which sends a GTID event to the replica
-
Rucha Deodhar authored
-
Vladislav Vaintroub authored
-
Marko Mäkelä authored
Let us suppress this timing-sensitive warning globally. We added it in commit d34479dc (MDEV-33053) so that in case InnoDB hangs due to running out of buffer pool, there would be a warning about it. On a heavily loaded system that is running with a small buffer pool, these warnings may be occasionally issued while page writes are in progress.
-
Alexander Barkov authored
MDEV-33299 Assertion `(tm->tv_usec % (int) log_10_int[6 - dec]) == 0' failed in void my_timestamp_to_binary(const timeval*, uchar*, uint) This original query: (1) SELECT ts0 FROM t1 WHERE DATE(ts0) <= '2024-01-23'; was rewritten (by MDEV-8320) to: (2) SELECT ts0 FROM t1 WHERE ts0 <= '2024-01-23 23:59.59.999999'; -- DATETIME comparison, Item_datetime on the right side which was further optimized (by MDEV-32148) to: (3) SELECT ts0 FROM t1 WHERE ts0 <= TIMESTAMP/* WITH LOCAL TIME ZONE*/ '2024-01-23 23:59.59.999999'; -- TIMESTAMP comparison, Item_timestamp_literal on the right side The origin of the problem was in (2) - in the MDEV-8320 related code. The recent new code for MDEV-32148 revealed this problem. Item_datetime on step (2) was always created in an inconsistent way: - with Item::decimals==0 - with ltime.second_part==999999, without taking into account the precision of the left side (e.g. ts0 in the above example) On step (3), Item_timestamp_literal was created in an inconsistent way too, because it copied the inconsistent data from step (2): - with Item::decimals==0 (copied from Item_datetime::decimals) - with m_value.tv_usec==999999 (copied from ltime.second_part of Item_datetime) Later, the Item_timestamp_literal performed save_in_field() and crashed in my_timestamp_to_binary() on a DBUG_ASSERT checking consistency between the fractional precision and the fractional seconds value. Fix: On step (2) create Item_datetime with truncating maximum possible second_part value of 999999 according to the the left side fractional second precision. So for example it sets second_part as follows: - 000000 for TIMESTAMP(0) - 999000 for TIMESTAMP(3) - 999999 for TIMESTAMP(6) This automatically makes the code create a consistent Item_timestamp_literal on step (3). This also makes TIMESTAMP comparison work faster, because now Item_timestamp_literal is created with Item::decimals value equal to the Item_field (which is on the other side of the comparison), so the low level function Type_handler_timestamp_common::cmp_native() goes the fastest execution path optimized for the case when both sides have equal fractional precision. Adding a helper class TimeOfDay to reuse the code when populating: - the last datetime point for YEAR() - the last datetime point for DATE() with a given fractional precision. This class also helped to unify the equal code in create_start_bound() and create_end_bound() into a single method create_bound().
-
- 25 Jan, 2024 4 commits
-
-
Vladislav Vaintroub authored
-
Vladislav Vaintroub authored
With this patch, 4-component MSI version can be used, e.g by setting TINY_VERSION variable in CMake, or by adding a string, e.g MYSQL_VERSION_EXTRA=-2 which sets TINY_VERSION to 2, and also changes the package name. The 4-component MSI versions do not support MSI major upgrades, only minor ones, i.e do not reinstall components, just update existing ones based on versioning rules. To support these rules, add DefaultVersion for the files that won't otherwise be versioned - headers, static and import libraries, pdbs, text - xml, python and perl scripts Also silence WiX warning that MSI won't store hashes for those files anymore.
-
Vladislav Vaintroub authored
Testing exit code from popen(), comparing it with 1, and deciding that perl.exe is not there, is a) wrong conclusion, and b) uninteresting, because MTR always runs with perl, and with MTR_PERL set. Background: Recent change in 7af50e4d introduced exit code 1 from perl snippet, that broke Windows CI. Do not want to debug this ever again.
-
Yuchen Pei authored
There are two array fields in spider_share with similar names: share->use_sql_dbton_ids that maps from i to the i-th dbton used by share. Thus it should be used only when i iterates over all distinct dbtons used by share. share->sql_dbton_ids that maps from i to the dbton used by the i-th link of the share. Thus it should be used only when i iterates over all links of a share. We correct instances where share->sql_dbton_ids should be used instead of share->use_sql_dbton_ids.
-
- 24 Jan, 2024 3 commits
-
-
Alexander Barkov authored
write_record() when performing REPLACE has an optimization: - if the unique violation happened in the last unique key, then do UPDATE - otherwise, do DELETE+INSERT This patch changes the way of detecting if this optimization can be applied if the table has long (hash based) unique (i.e. UNIQUE..USING HASH) constraints. Problem: The old condition did not take into account that TABLE_SHARE and TABLE see long uniques differently: - TABLE_SHARE sees as HA_KEY_ALG_LONG_HASH and HA_NOSAME - TABLE sees as usual non-unique indexes So the old condition could erroneously decide that the UPDATE optimization is possible when there are still some unique hash constraints in the table. Fix: - If the current key is a long unique, it now works as follows: UPDATE can be done if the current long unique is the last long unique, and there are no in-engine (normal) uniques. - For in-engine uniques nothing changes, it still works as before: If the current key is an in-engine (normal) unique: UPDATE can be done if it is the last normal unique.
-
Alexander Barkov authored
Turning REGEXP_REPLACE into two schema-qualified functions: - mariadb_schema.regexp_replace() - oracle_schema.regexp_replace() Fixing oracle_schema.regexp_replace(subj,pattern,replacement) to treat NULL in "replacement" as an empty string. Adding new classes implementing oracle_schema.regexp_replace(): - Item_func_regexp_replace_oracle - Create_func_regexp_replace_oracle Adding helper methods: - String *Item::val_str_null_to_empty(String *to) - String *Item::val_str_null_to_empty(String *to, bool null_to_empty) and reusing these methods in both Item_func_replace and Item_func_regexp_replace.
-
Alexey Botchkov authored
The IDENT_sys doesn't include keywords, so the function with the keyword name can be created, but cannot be called. Moving keywords to new rules keyword_func_sp_var_and_label and keyword_func_sp_var_not_label so the functions with these names are allowed.
-
- 23 Jan, 2024 4 commits
-
-
Daniel Black authored
When CMAKE_OSX_ARCHITECTURES isn't set we end up with "Packaging as: mariadb-10.4.33-osx10.19-x86_64" on arm64 builders. Instead of implying 64bit is x86, use CMAKE_SYSTEM_PROCESSOR to form the filename.
-
Vicențiu Ciorbaru authored
More in depth check to cover all used readline functions.
-
Rucha Deodhar authored
-
Sergei Golubchik authored
use the original, not the truncated, field in the long unique prefix, that is, in the hash(left(field, length)) expression. because MyISAM CHECK/REPAIR in compute_vcols() moves table->field but not prefix fields from keyparts. Also, implement Field_string::cmp_prefix() for prefix comparison of CHAR columns to work.
-