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

1890 Commits

Author SHA1 Message Date
Oleksandr Byelkin
3b8db45403 Merge branch '11.4' into 11.8 2026-08-19 11:28:01 +02:00
Oleksandr Byelkin
170b1d7073 Merge branch '10.11' into 11.4 2026-08-19 08:40:05 +02:00
Oleksandr Byelkin
e2b15641ec Merge branch '10.6' into 10.11 2026-08-19 08:13:54 +02:00
Sergei Golubchik
851f52470d MDEV-40678 mysql_json plugin OOB reads 2026-08-09 09:53:09 +02:00
Sergei Golubchik
0931994096 MDEV-40670 qc_info OOB read if query contains \0
qc_info cannot parse query cache key, this cannot be done
without changing query cache key format.

let's limit the (possibly incorrect) db_length to make sure
it does not extend beyond the db name end, this way there will be no
OOB reads and no information leak.
2026-08-07 22:54:50 +02:00
Sergei Golubchik
69ce9cbcc2 MDEV-40658 file_key_management crash on empty FILE: file 2026-08-06 20:49:23 +02:00
Teemu Ollakka
af9e20aac1 wsrep_info MTR: disable SSL by default for SST 2026-08-04 15:09:08 +03:00
Oleksandr Byelkin
c57069561c New CC 3.4 2026-07-31 10:38:14 +02:00
forkfun
eaca80bf32 Merge branch '11.4' into '11.8' 2026-07-29 12:27:46 +02:00
forkfun
08eeb6a417 Merge branch '10.11' into '11.4' 2026-07-28 13:14:38 +02:00
Sergei Golubchik
3f6f51e662 MDEV-40425 handlersocket crashes on read with huge number of fields
* fix handlersocket to unlink it's THD, this apparently was broken
  for years
* add a check for fldnum
* add a first ever handlersocket test
2026-07-24 17:06:40 +02:00
Sergei Golubchik
03a9678f15 MDEV-39841 handlersocket plugin default secret is empty
if handlersocket_plain_secret is not specified, generate a random one.
one can still set an empty secret in my.cnf if needed.
2026-07-24 17:06:40 +02:00
forkfun
ad7f29afb3 Merge branch 10.6 into 10.11 2026-07-23 11:12:27 +02:00
Daniel Black
1e972a8d70 Merge 10.11 into 11.4 2026-07-14 12:49:36 +10:00
Vladislav Vaintroub
1088d51f66 MDEV-34074 server_audit crashes in get_loc_info() with NULL loc_info
THDVAR(thd, loc_info) can return NULL if the plugin was previously
uninstalled. get_loc_info() and its callers dereferenced it.

Guard against a NULL loc_info in get_loc_info(), auditing() and
log_current_query(). Such a session is not audited.
2026-07-06 12:01:04 +03:00
Vladislav Vaintroub
0579ceb68d MDEV-37187 hashicorp plugin: avoid expensive clock() in hot path
The plugin used clock() only to timestamp cache entries and measure
elapsed time against millisecond timeouts. As shown in MDEV-12345,
clock() is prohibitively expensive, and we do not need per-thread or
per-process CPU time here, only time differences.

Replace clock()/clock_t with the monotonic std::chrono::steady_clock.
Timeouts are kept as std::chrono::milliseconds
2026-06-30 12:19:26 +03:00
Sergei Golubchik
9cc1471be8 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
2026-06-27 13:12:30 +10:00
forkfun
867d16cea7 Merge branch '11.4' into '11.8' 2026-06-23 12:52:39 +02:00
Sergei Golubchik
0bf0e13a22 MDEV-40058 cached_sha2_password crashes on zero-length password
valid encrypted password cannot have zero length and must end with '\0'
2026-06-17 16:46:39 +02: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
Daniel Black
7efbb0d0b2 MDEV-38913: pam_mariadb_mtr.so installation path change
This reverts the effect of MDEV-21654 and includes
pam_mariadb_mtr in the mariadb-test-data Deb package.

This allows our CI systems to run tests on the
pam implementation on Debian systems.

As the pam configuration can include a full path,
we've change the installation of the pam module
pam_mariadb_mtr.so to under the /usr/lib*/plugins/test_pam_modules
directory and configured the pam configuration file,
suite/plugins/pam/mariadb_mtr, to include the
full path to pam_mariadb_mtr.so.
2026-05-03 19:17:17 +10:00
Sergei Golubchik
e1c2bb860a bump the maturity of caching_sha2_password and parsec plugins 2026-04-30 09:48:04 +02:00
Sergei Golubchik
f34afeaf6b MDEV-39318 MTR: fix test failures when running with --ssl
make sure P_S.{global|session}_status and I_S.feedback plugin table
have a column of the same width as I_S.global_status.

Otherwise long status strings (e.g. Ssl_cipher_list) won't fit
and trigger a data truncation warning (an error in the strict mode)
2026-04-28 16:05:51 +02:00
Anway Durge
a96ebfcb2a MDEV-39126: Feedback plugin to use /etc/os-release
Update prepare_linux_info() to use /etc/os-release
(PRETTY_NAME) as the primary source for OS detection.

Retain fallback support for /etc/lsb-release and
/etc/*-release for older systems.

Add MTR regression test feedback_os_release.

Signed-off-by: Anway Durge <124391429+itzanway@users.noreply.github.com>
2026-04-22 09:20:15 +10:00
Mikhail Pochatkin
cbcff6324a MDEV-39173 Replace sprintf with snprintf, remove deprecated pragma
Remove the unscoped #pragma GCC diagnostic ignored
"-Wdeprecated-declarations" from include/violite.h and replace all
sprintf/vsprintf calls with snprintf/vsnprintf across the codebase.

Where possible, pass actual buffer sizes as function parameters
instead of using hardcoded constants or recomputing strlen().
Notable API changes:
- get_date(): added to_len parameter for buffer size
- nice_time(), end_timer() in client/mysql.cc: added buff_size
- generate_new_name(): added name_size parameter
- calc_md5(): added buffer_size parameter (fixes off-by-one)
- MD5_HASH_TO_STRING macro: added _size parameter
- Added MYSQL_UDF_MAX_RESULT_LENGTH constant in mysql_com.h

Also fixed a pre-existing bug in sql/rpl_mi.cc where the ellipsis
"..." was written to the wrong buffer (dbuff instead of buff).

Vendored code is excluded: extra/readline, extra/wolfssl,
wsrep-lib, libmariadb, storage/mroonga/vendor, zlib.
2026-04-16 19:00:12 +10:00
Marko Mäkelä
1a144f713a Merge 11.4 into 11.8 2026-04-01 15:03:59 +03:00
Vladislav Vaintroub
330f9b133f MDEV-28115 Hashicorp MTR tests aren't runnable on WIndows
- Fixed detection of "vault" utility
- Removed include/not_windows.inc from common include
- On Windows, skip 2 tests that rely on "grep"
- in mtr, set PATH to include mtr plugin directory (this is necessary
  to load vcpkg dependencies)
2026-03-25 19:36:23 +01:00
Sergei Golubchik
9bfea48ce1 Merge branch '11.4' into 11.8 2026-01-31 14:08:54 +01:00
Sergei Golubchik
40f7084661 Merge branch '10.11' into 11.4 2026-01-28 21:52:18 +01:00
Sergei Golubchik
b29d3779e4 Merge branch '10.6' into 10.11 2026-01-28 14:22:20 +01:00
Sergei Golubchik
12578d8a69 MDEV-38604 fix SP execution too 2026-01-26 23:15:34 +01:00
Sergei Golubchik
b6d0e23d76 MDEV-38365 SHA2 auth plugin crash on large packets
use my_safe_alloca() as the key_len comes directly from the client

Reported by Pavel Kohout, Aisle Research, www.aisle.com
2026-01-23 14:31:12 +01:00
Sergei Golubchik
cb31d7536b MDEV-38604 Assertion `thd->utime_after_query >= thd->utime_after_lock' failed in query_response_time_audit_notify on 2nd execution of SP with query cache
even when PS is served from a query cache, thd->utime_after_query
must be updated.

also, backport the assert from 11.8
2026-01-23 12:15:34 +01:00
Oleg Smirnov
f2b48e565c MDEV-38574 Rename cloning functions of class Item and descendants
Rename cloning methods of class Item and its descendants
in the following way:

   (from)            (to)
do_build_clone  -> deep_copy
   build_clone  -> deep_copy_with_checks

do_get_copy  -> shallow_copy
   get_copy  -> shallow_copy_with_checks

to better reflect their functionality.

Also make Item::deep_copy() and shallow_copy() protected.
Outside users should call deep_copy_with_checks()
and shallow_copy_with_checks().
2026-01-22 12:57:48 +01:00
Marko Mäkelä
08c57c5ebf MDEV-37600 fixup: clang 21 -Wunterminated-string-initialization 2026-01-20 08:55:59 +02:00
Vladislav Vaintroub
f2cb54849f MDEV-38203 fix build error on Windows 2026-01-19 16:36:55 +01:00
Vladislav Vaintroub
42c260bc0f MDEV-37997 vcpkg's FIND_PACKAGE throws error for zlib dependent packages
Build with vcpkg and WITH_ZLIB=bundled throws error
"Broken installation of vcpkg port zlib" in FIND_PACKAGE(CURL)

Set CMAKE_DISABLE_FIND_PACKAGE_ZLIB to workaround.

Previously, this workaround was hashicorp specific, now we need this also
for videx. Thus setting CMAKE_DISABLE_FIND_PACKAGE_ZLIB was moved to
correct place,  inside MYSQL_USE_BUNDLED_ZLIB macro.
2026-01-19 16:36:55 +01:00
Sergei Golubchik
b998e3a7b9 MDEV-38203 Hashicorp plugin lets keys timeout and doesn't use cached keys on vault errors
* let use_cache_on_timeout apply to other errors
* enable use_cache_on_timeout by default and deprecate it
* increase cache_timeout to max and deprecate it
* change it from long to portable longlong
* delete both in 13.3
2026-01-14 19:44:30 +01:00
Tony Chen
4e674a20c4 Simplify event filtering logic in server_audit plugin
Replace if-else chain with a single bitwise AND check when filtering query
events by type (DDL, DML, DCL, etc.).

The removes the need for the goto statements.

Additionally, we remove the orig_query variable as it served no purpose.

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license
2026-01-14 16:39:23 +01:00
Sergei Golubchik
c1fcedf443 Merge branch '11.4' into 11.8 2026-01-05 20:34:44 +01:00
Marko Mäkelä
678ff03ee7 Merge 10.11 into 11.4 2026-01-02 11:53:09 +02:00
Marko Mäkelä
8fab129382 Merge 10.6 into 10.11 2026-01-02 11:06:05 +02:00
Sergei Golubchik
635559a2ad MDEV-38375 audit plugin implements its own (simple) SQL parser
remove the parser, use thd_sql_command(thd)
2025-12-26 23:49:47 +01:00
Marko Mäkelä
2d974c4937 Merge 11.4 into 11.8 2025-11-12 07:46:27 +02:00
Marko Mäkelä
12e93b97e1 Merge 10.11 into 11.4 2025-11-11 10:34:33 +02:00
Sergei Golubchik
5ce9a03602 Merge branch '11.4' into 11.8 2025-11-04 12:39:27 +01:00
Vladislav Vaintroub
6fea5712d1 MDEV-3799 Windows WITH_ZLIB=bundled build errors with hashicorp_key_management
We compile curl with vcpkg. vcpkg prefers dependencies of the vcpkg
package to come from vcpkg as well. We break its logic by setting
and ZLIB_LIBRARY in cmake/zlib.cmake to the static library that we
compile outselves. This vcpkg check is not critical or needed
when shared libraries are used.

As a workaround, set CMAKE_DISABLE_FIND_PACKAGE_ZLIB when compiling
hashicorp_key_management, in this case vcpkg skips the zlib check.
2025-10-30 16:46:33 +01:00
Sergei Golubchik
bcb77590f0 cleanup: CREATE_TYPELIB_FOR() helper
(cherry picked from commit d046aca0c7)
2025-10-25 00:19:11 +07:00
Oleksandr Byelkin
6d0be016fa Merge branch '11.4' into bb-11.8-release 2025-10-24 12:25:01 +02:00