1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00
Commit Graph

205030 Commits

Author SHA1 Message Date
Oleksandr Byelkin
9f98f82b14 Merge branch '11.8' into 12.3 mariadb-12.3.2 2026-05-26 21:15:58 +02:00
Sergei Golubchik
46a8eb42a5 fix plugins.feedback_os_release failure on sles-1600
just the comment at the beginning of its /etc/os-release
is already more than 256 bytes
mariadb-11.8.8
2026-05-24 11:53:55 +02:00
Sergei Golubchik
6b35f1748d Merge branch '11.4' into 11.8 2026-05-23 21:43:50 +02:00
Sergei Golubchik
b4a80422bf Merge branch '10.11' into 11.4 mariadb-11.4.12 2026-05-23 16:59:15 +02:00
Sergei Golubchik
197f92bee0 Merge branch '10.6' into 10.11 mariadb-10.11.18 2026-05-23 16:55:50 +02:00
Daniel Bartholomew
fafcaa81f9 bump the VERSION 2026-05-23 16:54:04 +02:00
Sergei Golubchik
b2050fdb4a strengthen safe() in wsrep_sst_common, just in case mariadb-10.6.27 2026-05-23 12:31:36 +02:00
Hemant Dangi
ed8404a73f MDEV-39721: wsrep_notify.cc: reject shell-unsafe characters in joiner-supplied member fields
Issue:
wsrep_notify_status() interpolated members[i].name() (the peer's
wsrep_node_name) and members[i].incoming() verbatim into a command
string that is then executed via 'sh -c' by wsp::process. A peer
joining the cluster with shell metacharacters in its wsrep_node_name
or wsrep_node_incoming_address caused arbitrary commands to run on
every cluster member that had wsrep_notify_cmd configured.
MDEV-39413 introduced safe() for the same threat class in the SST
scripts but did not cover the C++ wsrep_notify path.

Solution:
Validate each substituted field against a narrow whitelist before
interpolating. Node name allows alnum and -_. ; node address
additionally allows :[]/ for host:port and [ipv6] forms. On bad
input the notification is skipped with an error log instead of
forwarding the unsafe value to sh -c.
2026-05-22 20:13:20 +02:00
Sergei Golubchik
29c00416c6 MDEV-39654 schema-qualified unquoted table name starting with digit fails to parse
add tests
2026-05-21 16:15:36 +02:00
Sergei Golubchik
e7374f2ae7 Revert "MDEV-17677: Keywords followed by .number parsed as identifiers"
This reverts commit 895b28d672.
2026-05-21 16:15:35 +02:00
Jan Lindström
f2296f377e MDEV-39685 : galera multi table update crash
This is regression caused by MDEV-28750 commit 1f349968.

In multi-table update table list could contain tables
that are not yet opened because update does not really
change them. This can happen e.g. when update changes
table that is referenced by foreign key by table that
is not part of multi-table update.

Fixed by first checking is wsrep write set size limited.
If it is not multi-table update can continue normally.
If write set size is limited then check has update
updated both transactional and non-transactional tables
and those tables that have not yet been opened can be
safely skipped as they are not updated.
2026-05-21 16:15:26 +02:00
Sergei Golubchik
a9e2f7f648 MDEV-39676 disallow global.wsrep_sst_donor=NULL again
it crashes in galera.mdev-28433
2026-05-21 11:19:44 +02:00
Hemant Dangi
dae315a7b2 MDEV-39648: wsrep_sst_rsync.sh: apply safe() to joiner-supplied parameters
Issue:
wsrep_sst_rsync.sh interpolated WSREP_SST_OPT_REMOTE_USER and
WSREP_SST_OPT_REMOTE_PSWD verbatim. Because both values originate from
the joiner side of the SST request, a newline in either could splice
an extra directive into the donor-written stunnel.conf (silently
downgrading peer-cert verification) or an extra line into the rsync
magic file. MDEV-39413 had introduced safe() for the same threat class
in wsrep_sst_mariabackup but did not extend it to the rsync script.

Solution:
Routing the rsync interpolations through safe() closes the gap, and
extending safe() to also reject tab and newline ensures multi-line
values cannot survive into a config-file heredoc.
2026-05-20 22:49:21 +02:00
Sergei Golubchik
5cedbdfcc6 fix columnstore for new cmake 2026-05-20 22:49:21 +02:00
Sergei Golubchik
fe3039eef7 MDEV-39673 group_concat ignores max_allowed_packet
GROUP_CONCAT is limited by group_concat_max_len,
but also, as a string function it must respect max_allowed_packet.

Let's introduce THD::gconcat_max_len() helper to simplify checks.

Also:
* make max group_concat_max_len value the same as max max_allowed_packet
* use the same MY_MIN((ulonglong) ..., UINT_MAX32) in
  Item_func_json_objectagg as in Item_func_group_concat
* use overflow-safe type for lengths in Item_func_quote
  (MAX_MAX_ALLOWED_PACKET is 1G so uint cannot overflow yet, but it's
  a fragile assumption)
2026-05-20 22:49:21 +02:00
Sergei Golubchik
52bbe5b6e7 MDEV-39658 ASAN crash on invalid proxy_protocol_networks value
max_subnet estimate was off by one.

* only allow address with a known family
  (trips an assert in addr_matches_subnet())
* adjust max_subnet estimate accordinly
2026-05-20 22:49:20 +02:00
Sergei Golubchik
32ab8a2d4c MDEV-39657 ASAN error on malformed WKB point
check data length for Gis_point
2026-05-20 22:49:20 +02:00
Sergei Golubchik
11c41cd93d MDEV-39622 OBJECT_INSTANCE_BEGIN in P_S are unstable, difficult to compare
let's show stable values that don't change between runs
2026-05-20 22:49:20 +02:00
Sergei Golubchik
9a3e153188 MDEV-39581 dynamic column header missing sanity checks 2026-05-20 22:49:20 +02:00
Sergei Golubchik
05663d1910 MDEV-39576 PROXY v2 protocol uninitialized memory reads 2026-05-20 22:49:20 +02:00
Sergei Golubchik
31319c7bc6 proxy protocol v2: fix a harmless typo
according to the rfc, the length is 2 bytes,
but the max length is 226 and there's a validity
check for length <= 240.
2026-05-20 22:49:20 +02:00
Sergei Golubchik
c5409caab0 MDEV-39564 One-byte OOB write in PROXY protocol v1 header parser 2026-05-20 22:49:20 +02:00
Sergei Golubchik
1648170c5c MDEV-39565 missing filename check in mariadb-backup --decompress
check for tablename-safe characters in backed up table files
2026-05-20 22:49:20 +02:00
Jan Lindström
3a3c1e403b Prepare for Galera library version 26.4.27 2026-05-20 22:47:51 +02:00
Jan Lindström
03e040ea90 Fix test failure on galera_sst_mariabackup_encrypt_with_key_server
Joiner mariadbd exits when SST is aborted; the exit code varies by
platform (clean 0 on some systems, signalled 134 / 1 on others).

pkill exit code can also vary by platform (clean 0 on some systems,
signalled 1 others).
2026-05-20 22:47:51 +02:00
Jan Lindström
13e6808f01 MDEV-39676 : Galera Cluster-peer > Donor command execution
Add verification of wsrep_sst_donor, wsrep_sst_method and
wsrep_sst_receive_address so that they contain only
supported characters. But allow NULL or empty value.
2026-05-20 22:47:51 +02:00
Oleksandr Byelkin
19c59f2c79 Merge branch '11.4' into 11.4 release 2026-05-20 14:15:25 +02:00
Alexey Botchkov
6b79d98fc0 MDEV-39653 AddressSanitizer: heap-use-after-free in my_mb_wc_latin1/../Field_xmltype::store after invalid xml.
The Field_blob::store can affect the 'from' argument so it can't be used
after it.
2026-05-20 10:25:47 +04:00
Jan Lindström
cbf32fbe82 MDEV-39662 : Wrong results sent to client after BF abort
This issue is regression caused by MDEV-38019 Send ok packet
to client earlier.

BF aborts may be detected very late in command exectution,
somewhere near the end of do_command(). If the ok packet has
already been sent and BF abort is detected very late, this
could cause the protocol packets becoming out of sync.

This is a result of reverting order of releasing MDL and
sending ok packet to the client. If it happens in the
opposite order than before, there will remain some time
window where the select is complete and MDL locks still
held. DROP hits that time window, causing a BF abort,
and extra error packet gets injected into client-server
communication stream.

Fixed by not sending ok packet to client earlier
in wsrep case.

There is a repeatable test case that shows failure
if ok packet is sent client earlier by using
debug sync point. However, this fix skips sending ok
packet earlier causing also skipping the sync
point. Therefore, test case is not usable.

Test case galera_sr.mysql-wsrep-features#8 was failing
because of this regression but it is sporadic.

Co-Authored by : Teemu Ollakka <teemu.ollakka@mariadb.com>
2026-05-19 13:19:34 +03:00
Marko Mäkelä
61d251c656 MDEV-13542 fixup: Remove orphan trx_print() 2026-05-19 08:27:29 +03:00
Daniel Bartholomew
328ee0c01f bump the VERSION 2026-05-18 12:25:48 -04:00
Daniel Bartholomew
f0ae019e1a bump the VERSION 2026-05-18 12:22:33 -04:00
Alexey Botchkov
6e20438a1c MDEV-39599 AddressSanitizer: heap-use-after-free in escape_string_for_mysql after sp with invalid xml (xmltype)).
Test case added.
2026-05-16 11:18:56 +04:00
Alexey Botchkov
c9421c80ff MDEV-39592 ALTER.. with xmltype silently overwrites row with prior rows data.
tests added.
2026-05-15 23:50:27 +04:00
Alexey Botchkov
6dcd3c9dc0 MDEV-39589 Wrong results with xmltype as a virtual column.
Store value in the XML column even if an error happened.
2026-05-15 20:00:01 +04:00
Alexey Botchkov
2c7c7e1216 MDEV-39573 Server crashes in Item_char_typecast::fix_length_and_dec_internal after select xmltype.
Charset specified for XMLTYPE constructor.
Error returned if XML is in UTF16/UTF32 as we can't parse it yet.
XML check added so only well-formed allowed.
2026-05-15 17:02:33 +04:00
Monty
da58c0c137 Ensure that mtr.out-of-source is not acccidently calling itself
Calling itself will cause extensive memory usage that can kill
the machine when it runs out of memory (happend to me).

Fixed by having mtr.out-of-source checking that it is not calling itself.
In addition added a check for cmake to expand symlinks to make the
check if we are running mtr 'out of source' safer.

Author: Sergei Golubchik <serg@mariadb.org> (CMakeList.txt changes)
2026-05-15 15:11:08 +03:00
Alexey Botchkov
49b2fd7f9e MDEV-39575 Protocol::end_statement(): Assertion `0' failed after insert into xmltype union of valid and invalid xml.
Field_xmltype::store has to do the my_error when it gets invalid XML,
  just the warning with the -1 return results in the DBUG_ASSERT.

Also the UpdateXML function result reverted back to the STRING as
it can legally produce invalid XML, so we can't have columns built
from the UpdateXML to be XMLTYPE.
2026-05-15 13:46:27 +04:00
Sergei Golubchik
e7d1202da3 Merge branch '11.4' into 11.8 mariadb-11.8.7b 2026-05-15 11:06:54 +02:00
Sergei Golubchik
10034c14cd Merge branch '11.4' into bb-11.4-release mariadb-11.4.11b 2026-05-15 10:36:24 +02:00
Kristian Nielsen
a3901c0a8d MDEV-39582: mariadb-binlog missing sanity checks for ibb files
Validate the chunk_len in the binlog chunk reader, so we don't try to read
data outside of the page.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2026-05-14 13:51:05 +02:00
Kristian Nielsen
cfe1e125be MDEV-39582: mariadb-binlog missing sanity checks for ibb files
The binlog page size is currently fixed at 16k. Don't attempt to read
using a different page size found in the file header, the code doesn't
support it.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2026-05-14 13:46:25 +02:00
Kristian Nielsen
ba786cf412 MDEV-39604: binlog_checksum should be ignored in new binlog
Don't attempt to rotate any old-style binlog files if trying to set
@@binlog_checksum. The @@binlog_checksum variable is unused with the
new binlog, and there are no old-style binlog files to rotate.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2026-05-14 13:42:03 +02:00
Alexey Botchkov
bf715bc46e MDEV-39536 ASAN heap-buffer-overflow in process_str_arg upon ER_TRUNCATED_WRONG_VALUE "Incorrect XML value".
Test casse added.
2026-05-14 00:04:43 +04:00
Sergei Golubchik
df2b2ee745 MDEV-39582 mariadb-binlog missing sanity checks for ibb files
check that binlog_page_size <= BINLOG_PAGE_SIZE_MAX
2026-05-13 15:22:40 +02:00
Alexey Botchkov
66632eb126 MDEV-39570 LeakSanitizer: detected memory leaks after insert with xmltype
XML parser should always be freed.
2026-05-13 14:49:09 +04:00
Jan Lindström
ed8f61d5ec MDEV-39488 : Skip Galera test requiring perfschema if -DPLUGIN_PERFSCHEMA=NO
Test change only, this test does not need perfschema.
2026-05-12 14:40:45 +03:00
Alexey Botchkov
181f13ec49 MDEV-39536 ASAN heap-buffer-overflow in process_str_arg upon ER_TRUNCATED_WRONG_VALUE "Incorrect XML value".
XML should be prepared before inserting it into the error message.
2026-05-10 14:29:02 +04:00
Alexey Botchkov
4c371e30f0 MDEV-38809 RBR fails upon DML with XML type.
Add Field_xmltype::rpl_conv_type_from() function to control
replication data types.
2026-05-08 14:09:25 +04:00
Oleksandr Byelkin
b067340c34 Fix after merge test (default charset changed) mariadb-11.8.7 2026-05-08 12:05:30 +02:00