Commit graph

2684 commits

Author SHA1 Message Date
Marko Mäkelä
27a3366663 Merge 10.6 into 10.11 2024-06-27 10:26:09 +03:00
Marko Mäkelä
0076eb3d4e Merge 10.5 into 10.6 2024-06-24 13:09:47 +03:00
Christian Hesse
3d2e54ff8c MDEV-20053: update systemd unit
Now that we have proper paths in `galera_recovery` changing the
directory is no longer required.
2024-06-22 17:19:49 +10:00
Tony Chen
5357110556 Fix error behaviour in mini-benchmark
In commit f5ca4077, an the "--log" option was added but it was implemented by
invoking a sub-shell. Any errors in the sub-shell would not be propagated and
thus cause mini-benchmark to suppress errors.

The fix here is to propagate the exit status of the sub-shell.

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. I
am contributing on behalf of my employer Amazon Web Services, Inc.
2024-04-06 18:18:10 -07:00
Tony Chen
2b0e0730c7 Add cpu-limit option for mini-benchmark
As performance improves, the permitted number of CPU cycles to be used
during the benchmark should be lowered to catch performance regressions. An
option is added to better support this.

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. I
am contributing on behalf of my employer Amazon Web Services, Inc.
2024-04-06 18:18:10 -07:00
Marko Mäkelä
788953463d Merge 10.6 into 10.11
Some fixes related to commit f838b2d799 and
Rows_log_event::do_apply_event() and Update_rows_log_event::do_exec_row()
for system-versioned tables were provided by Nikita Malyavin.
This was required by test versioning.rpl,trx_id,row.
2024-03-28 09:16:57 +02:00
Robin Newhouse
6efa75a8cb Enable mini-benchmark to run with perf
The mini-benchmark.sh script failed to run in the latest Fedora
distributions in GitLab CI. Executing the benchmark inside a Docker
container had failed because the check for `perf` was done in a way that
caused the benchmark to exit because of the `set -e` option. Test and
skip `perf` to allowing the remaining benchmark activities to proceed.

This check was added in acb6684 but inadvertantly reverted in 42a1f94.

Logic was corrected to only run perf when the flag is enabled, and to
prevent perf stat and perf record from being simultaneously enabled.

Set -ex is also added to enable easier identification of mini-benchmark
issues in the future.

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. I am contributing on behalf of my employer Amazon Web
Services, Inc.
2024-03-27 22:40:33 -07:00
Marko Mäkelä
ccb7a1e9a1 Merge 10.5 into 10.6 2024-03-27 15:00:56 +02:00
Daniel Black
76a27155b4 MDEV-33301 memlock with systemd still not working
.. even with MDEV-9095 fix

CapabilityBounding sets require filesystem setcap attributes
for the executable to gain privileges during execution.

A side effect of this however is the getauxvec(AT_SECURE) gets
set, and the secure_getenv from OpenSSL internals on
OPENSSL_CONF environment variable will get ignored (openssl gh issue
21770).

According to capabilities(7), Ambient capabilities don't trigger
ld.so triggering the secure execution mode.

Include SELinux and Apparmor capabilities for ipc_lock
2024-03-27 13:36:31 +11:00
Daniel Black
ee2ed1a036 Revert "MDEV-33636: RPM caps is on mariadbd exe"
This was the orginal implementation that reverted with a bunch of
commits.

This reverts commit a13e521bc5.

Revert "cmake: append to the array correctly"
This reverts commit 51e3f1daf5.

Revert "build failure with cmake < 3.10"
This reverts commit 49cf702ee5.

Revert "MDEV-33301 memlock with systemd still not working"
This reverts commit 8a1904d782.
2024-03-27 13:36:31 +11:00
Marko Mäkelä
c3a00dfa53 Merge 10.5 into 10.6 2024-03-12 09:19:57 +02:00
Daniel Black
8a1904d782 MDEV-33301 memlock with systemd still not working
CapabilityBoundingSet included CAP_IPC_LOCK in MDEV-9095, however
it requires that the executable has the capability marked in extended
attributes also.

The alternate to this is raising the RLIMIT_MEMLOCK for the service/
process to be able to complete the mlockall system call. This needs to
be adjusted to whatever the MariaDB server was going to allocate.
Rather than leave the non-obvious mapping of settings and tuning,
add the capability so its easier for the user.

We set the capability, if possible, but may never be used depending
on user settings. As such in the Debian postinst script, don't
complain if this fails.

The CAP_IPC_LOCK also facilitates the mmaping of huge memory pages.
(see man mmap), like mariadb uses with --large-pages.
2024-02-15 12:58:13 +11:00
Dishon Merkhai
f5ca4077d8 MDEV-30839: Add new options to mini-benchmark and fixes
Add new options to mini-benchmark.sh so it is more useful, such as
`--log` to avoid output from `lscpu` and other commands being lost.

Also fix following errors:

- Fix if condition for the cycle count regression verdict. The condition
  checked if the cycle count was greater than 850 billion, but `$RESULT`
  is only 3 digits and represents the number of cycles in billions.

- Fix flamegraph width. The original width caused the flamegraph to be
  cut-off on most screen sizes in the browser.

- Fix ShellCheck warnings and suggestions.

- Fix condition to check if perf has permission to run on the system.

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. I am contributing on behalf of my employer Amazon Web
Services, Inc.
2024-01-30 12:26:09 +11:00
Sergei Golubchik
fd0b47f9d6 Merge branch '10.6' into 10.11 2023-12-18 11:19:04 +01:00
Sergei Golubchik
e95bba9c58 Merge branch '10.5' into 10.6 2023-12-17 11:20:43 +01:00
Sergei Golubchik
98a39b0c91 Merge branch '10.4' into 10.5 2023-12-02 01:02:50 +01:00
Daniel Black
d4be70afb4 MDEV-30236 set TaskMax=99% in the MariaDB systemd unit
Originally requested to be infinity, but rolled back to 99%
to allow for a remote ssh connection or the odd needed system
job. This is up from 15% which is the effective default of
DefaultTasksMax.

Thanks Rick Pizzi for the bug report.
2023-11-16 09:03:03 +11:00
Marko Mäkelä
2ecc0443ec Merge 10.10 into 10.11 2023-10-17 16:04:21 +03:00
Marko Mäkelä
d5e15424d8 Merge 10.6 into 10.10
The MDEV-29693 conflict resolution is from Monty, as well as is
a bug fix where ANALYZE TABLE wrongly built histograms for
single-column PRIMARY KEY.
Also includes a fix for safe_malloc error reporting.

Other things:
- Copied main.log_slow from 10.4 to avoid mtr issue

Disabled test:
- spider/bugfix.mdev_27239 because we started to get
  +Error	1429 Unable to connect to foreign data source: localhost
  -Error	1158 Got an error reading communication packets
- main.delayed
  - Bug#54332 Deadlock with two connections doing LOCK TABLE+INSERT DELAYED
    This part is disabled for now as it fails randomly with different
    warnings/errors (no corruption).
2023-10-14 13:36:11 +03:00
Marko Mäkelä
0dd25f28f7 Merge 10.5 into 10.6 2023-09-11 14:46:39 +03:00
Marko Mäkelä
f8f7d9de2c Merge 10.4 into 10.5 2023-09-11 11:29:31 +03:00
Sergei Golubchik
fe86d04ea7 MDEV-30904 "rpm --setugids" breaks PAM authentication
move user/group creation from %post to %pre as Fedora packaging
guidelines say. This allows to use %attr() to set the correct
ownership of files
2023-09-06 22:38:41 +02:00
Andrew Hutchings
161ce045a7 Revert "use environment file in systemd units for _WSREP_START_POSITION"
This reverts commit 6c40590405.
2023-08-08 15:46:39 +01:00
Andrew Hutchings
48e6918c94 Revert "update galera_new_cluster to use environment file"
This reverts commit b54e4bf00b.
2023-08-08 15:46:39 +01:00
Christian Hesse
b54e4bf00b update galera_new_cluster to use environment file
Now that the systemd unit files use an environment file to pass
_WSREP_START_POSITION we have to update galera_new_cluster as well.
2023-08-02 17:16:37 +01:00
Christian Hesse
6c40590405 use environment file in systemd units for _WSREP_START_POSITION
We used to run `systemctl set-environment` to pass
_WSREP_START_POSITION. This is bad because:

* it clutter systemd's environment (yes, pid 1)
* it requires root privileges
* options (like LimitNOFILE=) are not applied

Let's just create an environment file in ExecStartPre=, that is read
before ExecStart= kicks in. We have _WSREP_START_POSITION around for the
main process without any downsides.
2023-08-02 17:16:37 +01:00
karmengc
7c9f275ee4 server.cnf: adjust major version to 10.11
Bump section header to 10.11 at rpm file server.cnf
2023-05-11 16:17:23 +01:00
Marko Mäkelä
c50f849d64 Merge 10.10 into 10.11 2023-03-17 07:00:03 +02:00
Robin Newhouse
20d2c9038a Fix mini-benchmark
The mini-benchmark.sh script failed to run in the latest Fedora
distributions in GitLab CI. It requires `lscpu` resolved by installing
util-linux.

Additionally, executing the benchmark inside a Docker container had
failed because of increased Docker security in recent updates. In
particular the `renice` and `taskset` operations are not permitted.
Neither are the required `perf` operations.
https://docs.docker.com/engine/security/seccomp/

Allow these operations to fail gracefully, and test then skip `perf`,
allowing the remaining benchmark activities to proceed.

Other minor changes to the CI are included such as allowing sanitizer
jobs to fail and using "needs" in the mini-benchmark pipeline.

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. I am contributing on behalf of my employer
Amazon Web Services, Inc.
2023-03-08 13:26:45 +00:00
Daniel Black
802e26c347 Merge branch '10.10' into 10.11 2022-12-15 10:32:58 +11:00
Daniel Black
7df06dcbc3 Merge branch 10.5 into 10.6 2022-12-15 09:32:54 +11:00
Daniel Black
89480340ba Merge commit 10.7 into 10.8 2022-12-15 08:37:57 +11:00
Daniel Black
6524551bcf Merge branch 10.6 into 10.7 2022-12-15 08:33:20 +11:00
Daniel Black
930ee43507 Merge branch '10.5' into 10.6 2022-12-15 08:30:51 +11:00
Daniel Black
0f351b620a rpm: server-post - use mariadb-install-db 2022-12-14 20:52:06 +00:00
Marko Mäkelä
0aca3012a1 Merge 10.10 into 10.11 2022-12-14 09:18:30 +02:00
Marko Mäkelä
d7a4ce3c80 Merge 10.7 into 10.8 2022-12-13 18:11:24 +02:00
Marko Mäkelä
25b91c3f13 Merge 10.6 into 10.7 2022-12-13 18:01:49 +02:00
Daniel Black
3b249a6e56 Merge branch '10.5' into 10.6
Adjust galera/galera_3nodes disabled tests.
2022-12-13 11:12:24 +11:00
Daniel Black
72f1384c3a Merge branch 10.4 into 10.5 2022-12-13 09:57:19 +11:00
Julius Goryavsky
a491400833 MDEV-29814: galera_var_notify_ssl_ipv6 causes testing system to hang
This commit fixes the test system hanging due to
the galera_var_notify_ssl_ipv6 test and also brings
the wsrep_notify[_ssl].sh files in line with each other
between the user template and the mtr suite.

Quotes are also added here to avoid problems if the
user specifies the value of one of the variables at the
beginning of the file containing shell-specific characters,
for example, if the password or username specified in the
PSWD and USER variables will contain the "$" character.

Also fixed an issue with automatic --ssl-verify-server-cert
option substitution when the corresponding value is set
by the user to "1" or "on".

Also fixed some tests here to avoid joining one of the nodes
to another cluster when the nodes are restarted from the mtr
side, which can lead to random failures when testing with
buildbot.
2022-12-10 01:11:55 +01:00
Marko Mäkelä
b81b194393 Merge 10.10 into 10.11 2022-11-30 12:59:57 +02:00
Marko Mäkelä
0751bfbcaf Merge 10.7 into 10.8 2022-11-30 12:12:07 +02:00
Marko Mäkelä
b7ae4d442a Merge 10.6 into 10.7 2022-11-30 12:09:01 +02:00
Marko Mäkelä
c59985fcf5 Merge 10.5 into 10.6 2022-11-30 07:06:41 +02:00
Daniel Black
7b44d0ba57
MDEV-23230 wsrep files installed when built without WSREP (#2334)
Prevent wsrep files from being installed if WITH_WSREP=OFF.

Reviewed by Daniel Black
Additionally excluded #include wsrep files and galera* files
along with galera/wsrep tests.

mysql-test/include/have_wsrep.inc remainds as its used by
a few isolated tests.

Co-authored-by: Chris Ross <cross2@cisco.com>
2022-11-28 18:21:03 +00:00
Otto Kekäläinen
fd0dcad676 MDEV-22659: Create one single unified and optimal logrotate config
Replace mysql-log-rotate.sh and debian/...mysql-server.logrotate with one
new unified and well documented version.

Name is mariadb.logrotate.in as in 10.11 branch onward we use now the
'mariadb' name, and use 'logrotate' to match the actual name of the
utility.

Also automatically disable deprecated /etc/logrotate.d/mysql-server
file on deb upgrades.

Reviewer: Daniel Black

Reviewer edits made:
* Added 'su mysql mysql' to the logrotate this is more RPM friendly.
  This is commented on Debian
* /var/log/mysql is the path on SuSe based distributions
2022-10-27 10:28:14 +11:00
Marko Mäkelä
618d820646 Merge 10.7 into 10.8 2022-10-13 10:42:41 +03:00
Marko Mäkelä
588efca237 Merge 10.6 into 10.7 2022-10-13 10:05:29 +03:00
Marko Mäkelä
a992c615a6 Merge 10.5 into 10.6 2022-10-12 12:14:13 +03:00