Commit graph

202280 commits

Author SHA1 Message Date
Yuriy Kohut
ce3d0cd5b4 MDEV-35407 Suppress STDERR while determining rpm package vendor
... and version in %prein scriptlet

%prein(MariaDB-server-11.4.3-1.el9.x86_64) scriptlet failed, exit status 1

The message is:
"The current MariaDB server package is provided by a different vendor (warning: Signature not supported. Hash algorithm SHA1 not available. MariaDB Foundation)".

The "warning: Signature not supported. Hash algorithm SHA1 not available." is taken from the STDERR.

warning: Signature not supported. Hash algorithm SHA1 not available.
gpg-pubkey-73e3b907-6581b071

rpm package vendor and version should be grepped from STDIN only.

Reviewer: Daniel Black
2024-11-13 10:24:30 +11:00
Brandon Nesterenko
155a82e0b1 MDEV-35350: Backport search_pattern_in_file.inc SEARCH_WAIT to 10.5
MDEV-35350 consolidated two methods that MTR tests
would wait until a file had certain content
written to it, which were only available in 10.6+.
This patch only backports the functionality to
10.5 in case some test wants to use it (nothing
uses it in 10.5 at present).

The cleanup bc46f1a7d9 from 10.6 is also
backported so SEARCH_TYPE doesn't need to be
accounted for in the new search_pattern_in_file.inc
logic.
2024-11-12 05:54:50 -07:00
Marko Mäkelä
ccb6cd8053 MDEV-35189: Updating cache for INNODB_LOCKS et al is suboptimal
ha_storage_put_memlim(): Invoke my_crc32c() to "fold", and traverse
the hash table only once.

fold_lock(): Remove some redundant conditions and use my_crc32c()
instead of ut_fold_ulint_pair().

trx_i_s_cache_t::add(): Replaces add_lock_to_cache(),
search_innodb_locks(), and locks_row_eq_lock(). Avoid duplicated
traversal of the hash table.

Reviewed by: Debarun Banerjee
2024-11-12 12:17:34 +02:00
Hartmut Holzgraefe
a927e59e63 MDEV-34847 : Unquoted argument in {{logger}} call leads to invalid argument warnings
Make sure that even a quoted argument starting with '-' is not interpreted
as a command line option by adding '--' marker before message text
2024-11-12 21:14:03 +11:00
Hartmut Holzgraefe
1802785cc2 MDEV-34847 : Unquoted argument in {{logger}} call leads to invalid argument warnings
Added missing logger command argument quoting.

And fixed a wsrep_log call typo.
2024-11-12 21:14:03 +11:00
Daniel Black
54ab281de8 MDEV-34915 track session variables - test adjust
With MDEV-34915 adjusting the mtr output of session
variables to be in order, the original variable omission for
x86_32 (added by MDEV-31609 - e0b6db2) is no longer required.
2024-11-12 17:06:24 +11:00
Yuchen Pei
df4b1349d9
fixup of MDEV-26345: make initialisation of a local bitmap earlier
This avoids freeing the map without initialisation.
2024-11-11 10:34:21 +11:00
Sergei Golubchik
74331a48dd bump the VERSION 2024-11-10 19:30:33 +01:00
Sergei Golubchik
2ac98bcb3c MDEV-35354 fix the test for --embedded
MYSQL_TMP_DIR is not necessarily under MYSQLTEST_VARDIR (it's
definitely not in --parallel), so LOAD DATA INFILE cannot use
MYSQL_TMP_DIR, because secure_file_priv=MYSQLTEST_VARDIR

Except for LOAD DATA LOCAL INFILE, which reads the file through the
client, but only in non-embedded builds.

followup for 7aa28a2a54
2024-11-10 19:22:39 +01:00
Oleksandr Byelkin
b12ff287ec Merge branch '11.6' into 11.7 2024-11-10 19:22:21 +01:00
Oleksandr Byelkin
d8dad8c3b5 New CC 3.4 2024-11-08 15:35:01 +01:00
Thirunarayanan Balathandayuthapani
074831ec61 Merge branch 10.5 into 10.6 2024-11-08 18:17:15 +05:30
Oleg Smirnov
41f54da46f MDEV-35342 Server crashes when creating index on a rocksdb table
Debug assertion, added with MDEV-34880, did not take into account
that MyRocks sometimes uses hidden indexes that SQL layer isn't
aware of. This commit adds a proper handling for such cases
2024-11-08 19:35:20 +07:00
Thirunarayanan Balathandayuthapani
7afee25b08 MDEV-35115 Inconsistent Replace behaviour when multiple unique index exist
- Replace statement fails with duplicate key error when multiple
unique key conflict happens. Reason is that Server expects the
InnoDB engine to store the confliciting keys in ascending order.
But the InnoDB doesn't store the conflicting keys
in ascending order.

Fix:
===
- Enable HA_DUPLICATE_KEY_NOT_IN_ORDER for InnoDB storage engine
only when unique index order is different in .frm and innodb dictionary.
2024-11-08 16:46:41 +05:30
Marko Mäkelä
ba4541ba7f MDEV-29015/MDEV-29260/MDEV-34938 test fixup
The merge f00711bba2 included a change
of the test innodb.log_file_name, which would try to ensure that
in the presence of the code fix decdd4bf49
we would get an error on Linux when invoking lseek() on a directory.
It turns out that this is not the case in at least one Linux based
cloud environment.
2024-11-08 09:55:47 +02:00
Nikita Malyavin
044d8c50c6 ed25519: support empty password 2024-11-08 07:17:54 +01:00
Nikita Malyavin
583a5a79c9 MDEV-34854 Parsec sends garbage when using an empty password
When an empty password is set, the server doesn't call
st_mysql_auth::hash_password and leaves MYSQL_SERVER_AUTH_INFO::auth_string
empty.

Fix:
generate hashes by calling hash_password for empty passwords as well. This
changes the api behavior slightly, but since even old plugins support it,
we can ignore this.

Some empty passwords could be already stored with no salt, though. The user
will have to call SET PASSWORD once again, anyway the authentication wouldn't
have worked for such password.
2024-11-08 07:17:44 +01:00
Oleksandr Byelkin
9e1fb104a3 MariaDB 11.4.4 release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEF39AEP5WyjM2MAMF8WVvJMdM0dgFAmck77AACgkQ8WVvJMdM
 0dgccQ/+Lls8fWt4D+gMPP7x+drJSO/IE/gZFt3ugbWF+/p3B2xXAs5AAE83wxEh
 QSbp4DCkb/9PnuakhLmzg0lFbxMUlh4rsJ1YyiuLB2J+YgKbAc36eQQf+rtYSipd
 DT5uRk36c9wOcOXo/mMv4APEvpPXBIBdIL4VvpKFbIOE7xT24Sp767zWXdXqrB1f
 JgOQdM2ct+bvSPC55oZ5p1kqyxwvd6K6+3RB3CIpwW9zrVSLg7enT3maLjj/761s
 jvlRae+Cv+r+Hit9XpmEH6n2FYVgIJ3o3WhdAHwN0kxKabXYTg7OCB7QxDZiUHI9
 C/5goKmKaPB1PCQyuTQyLSyyK9a8nPfgn6tqw/p/ZKDQhKT9sWJv/5bSWecrVndx
 LLYifSTrFC/eXLzgPvCnNv/U8SjsZaAdMIKS681+qDJ0P5abghUIlGnMYTjYXuX1
 1B6Vrr0bdrQ3V1CLB3tpkRjpUvicrsabtuAUAP65QnEG2G9UJXklOer+DE291Gsl
 f1I0o6C1zVGAOkUUD3QEYaHD8w7hlvyfKme5oXKUm3DOjaAar5UUKLdr6prxRZL4
 ebhmGEy42Mf8fBYoeohIxmxgvv6h2Xd9xCukgPp8hFpqJGw8abg7JNZTTKH4h2IY
 J51RpD10h4eoi6WRn3opEcjexTGvZ+xNR7yYO5WxWw6VIre9IUA=
 =s+WW
 -----END PGP SIGNATURE-----

Merge tag '11.4' into 11.6

MariaDB 11.4.4 release
2024-11-08 07:17:00 +01:00
Thirunarayanan Balathandayuthapani
98d57719e2 MDEV-32667 dict_stats_save_index_stat() reads uninitialized index->stats_error_printed
Problem:
========
- dict_stats_table_clone_create() does not initialize the
flag stats_error_printed in either dict_table_t or dict_index_t.
Because dict_stats_save_index_stat() is operating on a copy
of a dict_index_t object, it appears that
dict_index_t::stats_error_printed will always be false
for actual metadata objects, and uninitialized in
dict_stats_save_index_stat().

Solution:
=========
dict_stats_table_clone_create(): Assign stats_error_printed
for table and index while copying the statistics
2024-11-08 11:35:19 +05:30
Brandon Nesterenko
716ed2ce22 MDEV-35350: Consolidate MTR wait_for_pattern_in_file.inc and SEARCH_WAIT in search_pattern_in_file.inc
Replace wait_for_pattern_in_file.inc and all of its uses
to use search_pattern_in_file.inc with SEARCH_WAIT.

Reviewed By:
============
Kristian Nielsen <knielsen@knielsen-hq.org>
Sergei Golubchik <serg@mariadb.org>
2024-11-07 13:25:58 -07:00
Brandon Nesterenko
8c9f68cd0f MDEV-35350: Backport search_pattern_in_file.inc for SEARCH_WAIT functionality
For easier diff comparison, this commit takes
search_pattern_in_file.inc from 10.11 as-is for the
SEARCH_WAIT functionality added by Kristian Nielsen.
The changes to make it replace
wait_for_pattern_in_file.inc are in the following
commit.

Note that this commit breaks existing
wait_for_pattern_in_file.inc usage, so any tests which
use it will fail if building here.
2024-11-07 12:56:30 -07:00
Sergei Golubchik
7aa28a2a54 MDEV-35354 InnoDB: Failing assertion: node->pcur->rel_pos == BTR_PCUR_ON upon LOAD DATA REPLACE with unique blob
restore erroneously changed line

followup for f2512c0fa8
2024-11-07 06:16:03 -08:00
Sergei Golubchik
f24ebbaa5c cleanup: main.loaddata_autocom_innodb 2024-11-07 06:12:54 -08:00
Alexander Barkov
b9f9d804f2 MDEV-28686 Assertion `0' in Type_handler_string_result::make_sort_key or unexpected result
The code in the can_eval_in_optimize() branch in
Item_func_pad::fix_length_and_dec() did not take into account
that the constant can be negative. So the function will return NULL.

This later crashed on DBUG_ASSERT() because a NOT NULL function returned NULL.

Adding set_maybe_null() into this branch if the constant is negative.
2024-11-06 15:45:59 +04:00
Alexander Barkov
4ded2cbe13 MDEV-31910 ASAN memcpy-param-overlap upon CONCAT in ORACLE mode
Fixing Item_func_concat_operator_oracle::val_str() to use
String::copy_or_move(), like Item_func_oracle::val_str() does.
2024-11-06 11:39:50 +04:00
Jan Lindström
4b38af06a4 MDEV-35157 : wrong binlog timestamps on secondary nodes of a galera cluster
Problem was missing thd->set_time() before binlog event
execution in wsrep_apply_events.

Removed part of earlier commit 1363580 because it had
nothing to do with VERSIONED tables.

Note that this commit does not contain mtr-testcase
because actual timestamps on binlog file depends the
actual time when events are executed and how long
their execution takes.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2024-11-06 04:59:10 +01:00
Julius Goryavsky
db68eb69f9 MDEV-35344: post-fix correction for other galera tests 2024-11-06 04:59:10 +01:00
Jan Lindström
e4a3a11dcc MDEV-35344 : Galera test failure on galera_sync_wait_upto
Ignoring configured server_id should not be a warning because
correct configuration is documented. Changed message to info
level with more detailed message what was configured and
what will be actually used.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2024-11-06 04:59:10 +01:00
Jan Lindström
eb891b6a95 MDEV-35345 : Galera test failure on MW-402
Add missing have_debug[_sync].inc include.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2024-11-06 04:59:09 +01:00
Denis Protivensky
6d5fe9ed0d MDEV-28378: Don't hang trying to peek log event past the end of log
While applying CTAS log event, we peek the relay log to see if CTAS
contains inserted rows or if it's empty.
The peek function didn't check for end-of-file condition when tried to
get the next event from the log, and thus it hanged.

The fix includes checking for end-of-file while peeking for log events
and considering returned XID_EVENT value as a sign of an empty CTAS.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
2024-11-06 04:59:09 +01:00
Sergei Golubchik
ebbbe9d960 MDEV-35319 ER_LOCK_DEADLOCK not detected upon DML on table with vector key, server crashes
cannot ignore the error in MHNSW_Share::acquire() - it could be a deadlock
signal, after which no further operations are allowed
2024-11-05 14:00:52 -08:00
Sergei Golubchik
574e18f80d MDEV-35308 NO_KEY_OPTIONS SQL mode has no effect on engine key options
hide INVISIBLE and engine field options under sql_mode=no_field_options
hide PARSER and engine key options under sql_mode=no_key_options
2024-11-05 14:00:52 -08:00
Sergei Golubchik
e5a5d2b78d MDEV-35214 Server crashes in FVectorNode::gref_len with insufficient mhnsw_max_cache_size
now with streaming (MDEV-35032) we cannot longer free MHNSW_Trx
at the end of the search. Cannot even free it at the end of the
mhnsw_insert, because there can be a search running (INSERT ... SELECT).

Let's do reference counting, even though it's a thread-local object.
2024-11-05 14:00:52 -08:00
Sergei Golubchik
cbc2812f80 MDEV-35287 ER_KEY_NOT_FOUND upon INSERT into InnoDB table with vector key under READ COMMITTED
InnoDB cannot enable internal bulk insert for hlindex tables
2024-11-05 14:00:52 -08:00
Sergei Golubchik
ad33ffc0b5 MDEV-35296 DESC does not work in ORDER BY with vector key
only user vector indexes for ORDER BY ... ASC
2024-11-05 14:00:52 -08:00
Sergei Golubchik
7feec30939 relax the XA recovery error
it's just a suggestion anyway, not a bullet-proof check,
let's not act as if it is
2024-11-05 14:00:52 -08:00
Sergei Golubchik
b09c8b03d7 MDEV-35244 Vector-related system variables could use better names
considering that users don't interact with MariaDB vector search directly,
but primarily use AI frameworks, we should use names familiar
to vector store connector writers and for AI framework users.
That is industry standard M and ef.

mhnsw_cache_size -> mhnsw_max_cache_size
mhnsw_distance_function -> mhnsw_default_distance
mhnsw_max_edges_per_node -> mhnsw_default_m
mhnsw_min_limit -> mhnsw_ef_search

inside CREATE TABLE:
max_edges_per_node -> m
distance_function -> distance
2024-11-05 14:00:52 -08:00
Sergei Golubchik
784becf3e1 MDEV-35267 Server crashes in _ma_reset_history upon altering on Aria table with vector key under lock
ALTER TABLE needs to open hlindex tables early enough, right after they
were created, so that cleanup after an error would see and delete them.

But they need to be external_lock-ed only in copy_data_between_tables,
after mysql_trans_prepare_alter_copy_data().

Let's move locking out of hlindex_open() into hlindex_lock()
2024-11-05 14:00:52 -08:00
Sergei Golubchik
5d9ebef41e MDEV-35258 Mariabackup does not work with MyISAM tables with vector keys
recognize *#i#* files in mariadb-backup
2024-11-05 14:00:52 -08:00
Sergei Golubchik
0b9bc6c3cd MDEV-35246 Vector search skips a row in the table
stronger condition in select_neighbors() to reject exact matches too
2024-11-05 14:00:52 -08:00
Sergey Vojtovich
d50663198c DDL recovery for high-level indexes 2024-11-05 14:00:52 -08:00
Sergey Vojtovich
883fb66cd4 MDEV-35130 Assertion fails in trx_t::check_bulk_buffer upon CREATE.. SELECT with vector key
Similarly to "ALTER TABLE fixes for high-level indexes", don't enable bulk
insert when issuing create ... insert into a table containing vector
index. InnoDB can't handle situation when bulk insert is enabled for
one table but disabled for another. We can't do bulk insert on vector
index as it does table updates currently.
2024-11-05 14:00:52 -08:00
Sergei Golubchik
f6de9a379a MDEV-34919 post-fix
* add Aria truncate checks
* do store_lock() with a correct TL_xxx level
* remove InnoDB workaround for missing store_lock (from MDEV-35032)
* don't start transaction in temp tables (for Aria, with a test case)
2024-11-05 14:00:52 -08:00
Sergey Vojtovich
1cc7ef52e3 MDEV-34919 Aria crashes with high-level (vector) indexes
Since high-level index tables do not participate in thr_multi_lock(), added
explicit call to THR_LOCK::start_trans(). This is needed mostly for Aria to
handle transaction logging.
2024-11-05 14:00:52 -08:00
Sergei Golubchik
72839c1435 MDEV-35245 SHOW CREATE TABLE produces unusable statement for vector fields with constant default value
print default values for binary types as binary strings
2024-11-05 14:00:52 -08:00
Sergei Golubchik
053bd80d43 MDEV-35230 ASAN errors upon reading from joined temptable views with vector type
fix Field_vector::get_copy_func() for the case when length_bytes differ

fix do_copy_vec() to not guess length_bytes but take it from the field
(for keys length_bytes is always 2 for any length)
2024-11-05 14:00:52 -08:00
Sergei Golubchik
7d081c1b83 MDEV-35223 REPAIR does not fix MyISAM table with vector key after crash recovery
resort to alter for repair too
2024-11-05 14:00:52 -08:00
Sergei Golubchik
e8cff8e829 MDEV-35219 Unexpected ER_DUP_KEY after OPTIMIZE on MyISAM table with vector key
in-engine optimize can break hlindexes. let's fallback to ALTER
2024-11-05 14:00:52 -08:00
Sergei Golubchik
8988decbfe MDEV-35220 Assertion `!item->null_value' failed upon VEC_TOTEXT call
don't forget to reset null_value for each row
2024-11-05 14:00:52 -08:00
Sergei Golubchik
14364b09b9 MDEV-35236 Assertion `(mem_root->flags & 4) == 0' failed in safe_lexcstrdup_root
followup for MDEV-35092
2024-11-05 14:00:52 -08:00