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

5281 Commits

Author SHA1 Message Date
forkfun
34dd221590 Merge branch '13.0' into 'main' 2026-06-25 14:49:32 +02:00
forkfun
5ce03b5806 Merge branch '12.3' into '13.0' 2026-06-24 17:31:40 +02:00
forkfun
3170875cb6 Merge branch '11.8' into '12.3' 2026-06-24 12:27:13 +02:00
forkfun
867d16cea7 Merge branch '11.4' into '11.8' 2026-06-23 12:52:39 +02:00
forkfun
bbd558c386 Merge branch '10.11' into '11.4' 2026-06-22 12:26:09 +02:00
Oleksandr Byelkin
0d59c434fa Merge branch '10.6' into 10.11 2026-06-21 15:32:20 +02:00
Jan Lindström
f139e20717 MDEV-40027 : Galera Cluster-peer > Donor command execution
An appropriately privileged user (with SUPER privileges) could
execute shell commands as the uid of the mariadbd process
because the values of the system variable wsrep_sst_auth,
which can be modified at runtime, were not properly
sanitized when used to construct a shell command.

Combined rsync and mariabackup test cases and added
test case for incorrect values for wsrep_sst_auth.
2026-06-21 11:36:16 +02:00
Kristian Nielsen
039def0efd Merge 13.0 to main
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2026-06-16 15:03:05 +02:00
Kristian Nielsen
37964c65fa Merge 12.3 to 13.0
This patch to mysqldump is only merged partially:

  commit 666ff1db36
  Author: Monty <monty@mariadb.org>
  Date:   Fri May 15 16:39:35 2026 +0300

      MDEV-39519 Change mariadb-dump to use SHOW REPLICA STATUS instead of SHOW SLAVE STATUS

The functionality for --dump-slave cannot be merged as the underlying
functionality was removed in this commit:

  commit 21c940d599
  Author: ParadoxV5 <paradox.ver5@gmail.com>
  Date:   Thu Dec 4 21:22:20 2025 -0700

      MDEV-37146 mariadb-dump: Replace SHOW SLAVE STATUS usage with information_schema.SLAVE_STATUS

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2026-06-16 12:24:32 +02:00
Kristian Nielsen
fcc5fc8916 Merge 11.8 to 12.3
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2026-06-15 16:53:03 +02:00
Kristian Nielsen
420e28ce28 Merge 11.4 to 11.8
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2026-06-15 15:15:10 +02:00
Kristian Nielsen
85ec122c15 Merge 10.11 to 11.4
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2026-06-15 12:50:45 +02:00
Kristian Nielsen
40d6228811 Fix inconsistent terminology
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2026-06-15 10:43:23 +02:00
Jan Lindström
02e1853c89 MDEV-29909 : SST fails when table is defined with DATA DIRECTORY='/path/to' and datafile is larger than datadir space
Problem is that default path for SST is datadir and if there is not
enough space for all datafiles it fails.

In this patch wsrep_sst_tmp_dir configuration parameter is introduced.
User can now configure path where SST transfers datafiles in joiner
while operation is running. Additionally, if available transfer
size is compared to available disk space and if not necessary
big error is produced. When transfer is completed MariaBackup
will move datafiles to their correct locations.

Current rules for wsrep_sst_tmp_dir
* can be nullptr or empty and will not be used
* must be existing path and directory or not used
* may not be same as datadir or not used
* if total estimated SST payload available it should have enough available space
* similar to current behaviour temporal .sst directory is created
on path and this directory is removed after SST has finished
2026-06-04 09:23:29 +03:00
Oleksandr Byelkin
8ffeb81e2b Merge branch '12.3 release' into 12.3 2026-05-28 10:21:35 +02:00
Oleksandr Byelkin
9f98f82b14 Merge branch '11.8' into 12.3 2026-05-26 21:15:58 +02:00
Oleksandr Byelkin
e3d0d66f5b Merge branch 'bb-12.3-release' into bb-13.0-release 2026-05-26 20:40:49 +02:00
Oleksandr Byelkin
fc65e7e12a Merge branch 'bb-11.8-release' into bb-12.3-release 2026-05-26 20:40:41 +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 2026-05-23 16:59:15 +02:00
Sergei Golubchik
197f92bee0 Merge branch '10.6' into 10.11 2026-05-23 16:55:50 +02:00
Sergei Golubchik
b2050fdb4a strengthen safe() in wsrep_sst_common, just in case 2026-05-23 12:31:36 +02:00
Oleksandr Byelkin
f572addcc1 Merge branch '12.3' into 13.0 2026-05-22 09:52:05 +02:00
Oleksandr Byelkin
3f388a1cce Merge branch '11.8' into 12.3 2026-05-22 09:27:18 +02:00
Daniel Black
66b3c67846 MDEV-39675 mariadb_upgrade utility failed when path=nonexist
The upgrade SQL assumes the functions will resolve.

With a non-default path this isn't true and results in:

ERROR 1305 (42000) at line 3211: FUNCTION extract_schema_from_file_name does not exist

Resolve by setting PATH = 'CURRENT_SCHEMA' for the upgrade.

Idea thanks to Sergei Golubchik
2026-05-22 11:17:37 +10:00
Sergei Golubchik
a343e60d2f Merge branch '11.4' into 11.8 2026-05-21 20:17:03 +02:00
Sergei Golubchik
5000962deb Merge branch '10.11' into 11.4 2026-05-21 16:54:28 +02:00
Sergei Golubchik
4b2289fec6 Merge branch '10.6' into 10.11 2026-05-21 16:19:19 +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
Marko Mäkelä
b89cb5d5c7 Merge mariadb-10.11.17 into 10.11 2026-05-19 08:12:14 +03:00
Daniel Black
8923afa5c2 MDEV-39584: update help sql tables and replace KB links
scripts/fill_help_tables.sql from
https://github.com/mariadb-corporation/mariadb-docs/ as of
3fb208fcdfed06beb52ef9e305017de2387ff012

Other URL changes are taken from the HTTP redirection URL
from the old KB.

Some test cases where impacted:
* ps_missed_cmds{,_bin_prot} - used a topic_id of 0 that is
 now used, used MAX_INT instead.

* range_notembedded used the help data as a test case. As its not
  a stable table data, replaces with static data. Test case valid
  by ensuring the ANALYZE EXPLAIN and optimizer trace had the same
  structure. Also valided the MDEV-24739/MDEV-25069 bug fixes from
  where the test case originaled, when reverted, exhibited the
  previous behavour before the bug fixes.
2026-05-15 13:30:21 +10:00
Oleksandr Byelkin
9cb70f0220 Merge branch '11.4' into 11.8 2026-05-08 08:11:03 +02:00
Oleksandr Byelkin
7598e4e95d Merge branch '10.11' into 11.4 2026-05-08 08:00:01 +02:00
Oleksandr Byelkin
6828ff7390 Merge branch '10.6' into 10.11 2026-05-08 07:38:22 +02:00
Marko Mäkelä
e13d89949c Merge 12.3 into main 2026-05-05 13:14:42 +03:00
Daniel Black
aafcc57c25 MDEV-30953: Add MariaDB-server-galera (RPM) fix
In the build directory the galera sst scripts where
without executable permissions.

This is as a result of [1]. In this patch removing
WSREP_SST_SCRIPTS out of SERVER_SCRIPTS resulting
in the missing from BIN_SCRIPTS which all had an
explicit chmod executed on the script.

Corrected by explictly changing the permission on
the script as would have been done previously.

Thanks Marko Mäkelä for reporting.

[1] efb70285b908be57cc50934a6c8f994773d7583
2026-04-29 19:58:28 +10:00
Aquila Macedo
14502365ef MDEV-39290 mytop use invoking login as default user on Unix
On non-Windows systems, use the invoking user's login name as the
default MariaDB username instead of hardcoding root.

Resolve the username from getpwuid($<), falling back to LOGNAME, USER,
and finally root. Keep the existing root default on Windows.

This makes mytop behave more like the mysql and mariadb clients and
avoids confusing authentication failures on systems where local socket
access is configured for the OS user rather than root.

Also update the connection error text and POD to describe the actual
default behavior.
2026-04-28 18:53:06 +03:00
Gabriele Bocchi
2752a54e8b MDEV-39262: galera_new_cluster.sh ignores service name
due to argument due to hardcoded mariadb.service.

Fixes: 649216e70d
2026-04-28 10:12:26 +10:00
Sergei Golubchik
3e3c5d72c8 MDEV-39413 wsrep unsafe handling of parameters
introduce safe() wrapper for parameters that can later be interpolated
into command line.
Use as

- var="foo$BAR"
+ var="foo$(safe BAR)"

A parameter is safe, if it contains no spaces, single quotes or backticks
2026-04-24 12:36:24 +02:00
Daniel Black
6efb70285b MDEV-30953: Add MariaDB-server-galera (RPM) fix
The wsrep SST scripts weren't part of the server-galera
component so CPack didn't put them in the MariaDB-server-galera
package.

The previous existing per file component wasn't used so this
was simplified.
2026-04-16 07:03:56 +10:00
Mohammad El-Shennawy
d2803e117b MDEV-31669: replace MD5 with XXH3_128bits for SQL digests
- XXH is significantly faster than both MD5 and SHA-256
- Here we use the 128-bit XXH3
- Keep DIGEST_HASH_SIZE at 16 bytes (same as MD5)
- Reduce COL_DIGEST_SIZE to 32 chars
- Keep DIGEST columns as VARCHAR(32)
2026-04-15 21:49:26 +02:00
Tuukka Pasanen
a103be381b MDEV-30953: Add package for Galera server for RPM
Following the previous commit, we apply the same
to RPM.

Add new package Mariadb-server-galera to RPM build
recude mariadb-server package dependencies.
Galera cluster scripts and libraries are currently
in package mariadb-server. Move Galera cluster
scripts and libraries to new package mariadb-server-galera
as most of the people does not need them and
it allows to slim down mariadb-server package

The MariaDB-test package unlike its Debian
equal, didn't depend on the MariaDB-server
(and now it does), except if WITH_WSREP is
specified in which case it depends on the
MariaDB-server-galera package

Also from a865a7c23b
lsof, socat and pv are RECOMMENDS.
* lsof/socat - when selinux is enabled, these aren't used
* pv - the galera sst scripts will silently ignore its absence

Updated/Edited by: Daniel Black <daniel@mariadb.org>
2026-04-02 09:28:48 +11:00
Marko Mäkelä
02aedc1065 Merge 11.8 into 12.3 2026-03-24 09:49:17 +02:00
Marko Mäkelä
e6b8cacfb9 Merge 11.4 into 11.8 2026-03-23 11:57:44 +02:00
Sergei Golubchik
4456eb1a5e Merge branch '12.2' into 12.3 2026-02-07 22:12:32 +01:00
Sergei Golubchik
afc8a33496 mysql.proc.path DEFAULT 'CURRENT_SCHEMA' NOT NULL 2026-02-06 17:46:51 +01:00
Sergei Golubchik
ca78df2492 add new column mysql.proc.path at the end of the table
to simplify downgrades and to avoid breaking applications
2026-02-06 17:46:50 +01:00
sts-kokseng.wong
19fd3c79b0 MDEV-34391 SET PATH statement
Definition
==========
Implement the SET PATH statement.
```
SET PATH 'schema1, schema2, schema3';
```

Function
--------
In MariaDB, the SQL-path will also be used to lookup packages in
package routine invocations, so the following script:

  SET PATH 'sys';
  SELECT UTL_ENCODE.BASE64_DECODE('data');

invokes SYS.UTL_ENCODE.BASE64_DECODE('data'), i.e. the function
BASE64_DECODE() in the packge UTL_ENCODE in the database SYS
(if such package and package routine exist).

MariaDB implementation details
------------------------------
The ticket's requirement stated the grammar should support delimited
identifiers with backticks or double quotes within the string quote,
ie: the single tick. A simple parser was implemented to handle this
requirement in Sql_path::from_text.

Only 16 schemas are supported per session - we do not want too many
schemas in the path anyway since it will impact performance. This also
means that the path cache is a simple static array for easier memory
management.
2026-02-06 17:46:50 +01:00
Sergei Golubchik
d653fcb564 Merge branch '11.8' into 12.2 2026-02-03 14:53:15 +01:00
Alexander Barkov
ae5c8bfe76 MDEV-38698 mysql_upgrade does not fix charset and collation for mysql.user
In case if the view mysql.user was created (e.g. in 10.6) with a
pre- 18edb0959f server with an unexpected
character_set_client or collation_connection, e.g.
utf8mb3 and utf8mb3_general_ci, mysql_upgrade did not fix it to the
expected latin1 and latin1_swedish_ci.

Since 11.8 this could often lead to "Illegax mix of collations" errors
when querying mysql.user, because since 11.8 the default collation for
utf8mb3 is utf8mb3_uca1400_ai_ci, according to the default
@@character_set_collations. For consistency, it's better to fix the
problem starting from 11.4.

For example:

MariaDB [test]> select user,host,is_role from
    -> mysql.user where is_role='N';
ERROR 1267 (HY000): Illegal mix of collations (utf8mb3_general_ci,COERCIBLE)
                    and (utf8mb3_uca1400_ai_ci,COERCIBLE) for operation '='

Fixing mariadb_system_tables_fix.sql to drop the view if it has non-standard
character set or collations, so it gets recreated again correctly by
the CREATE statement in mariadb_system_tables.sql
2026-02-02 09:42:23 +04:00