Commit graph

2711 commits

Author SHA1 Message Date
Marko Mäkelä
33907f9ec6 Merge 11.4 into 11.7 2024-12-02 17:51:17 +02:00
Marko Mäkelä
2719cc4925 Merge 10.11 into 11.4 2024-12-02 11:35:34 +02:00
Marko Mäkelä
3d23adb766 Merge 10.6 into 10.11 2024-11-29 13:43:17 +02:00
Marko Mäkelä
7d4077cc11 Merge 10.5 into 10.6 2024-11-29 12:37:46 +02:00
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
Robin Newhouse
4016c905cb Update mini-benchmark to use constant transactions
Mini-benchmark was using total time instead of total transactions
(events) to measure performance. This could give inconsistent results,
particulary when used to count CPU cycles. This changes the sysbench
command to use events x threads in each benchmark job, making the
benchmark more informative.

When `perf` [1] is available and enabled, mini-benchmark will measure how
many CPU cycles are required to do a fixed amount of work/queries. If
`perf` is unavailable, mini-benchmark will measure the peak queries per
second (QPS) during the execution of this work, regardless of the
duration.

[1] https://perf.wiki.kernel.org
2024-10-05 18:53:18 -07:00
Oleksandr Byelkin
d6444022ca Merge branch 'bb-11.5-release' into bb-11.6-release 2024-08-06 17:28:38 +02:00
Oleksandr Byelkin
1640c9b06e Merge branch '11.2' into 11.4 2024-08-04 17:27:48 +02:00
Oleksandr Byelkin
80abd847da Merge branch '10.11' into 11.1 2024-08-03 09:32:42 +02:00
Oleksandr Byelkin
0fe39d368a Merge branch '10.6' into 10.11 2024-07-22 15:14:50 +02:00
Oleksandr Byelkin
9af2caca33 Merge branch '10.5' into 10.6 2024-07-18 16:25:33 +02:00
Sergei Golubchik
8ac30517af MDEV-34384 restorecon call in RPM POSTIN script has hardcoded datadir path 2024-07-17 21:25:40 +02:00
Alexander Barkov
a2a5ba14a8 Merge remote-tracking branch 'origin/11.5' into 11.6 2024-07-10 19:18:52 +04:00
Alexander Barkov
5fb07d942b Merge remote-tracking branch 'origin/11.2' into 11.4 2024-07-09 21:45:37 +04:00
Oleksandr Byelkin
2447dda2c0 Merge branch '10.11' into 11.1 2024-07-08 22:40:16 +02:00
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
Christian Hesse
aeffec60f6 MDEV-19210: do not run pre and post scripts as root
Now that we do not pollute systemd's environment but write private
environment files running these as root is not longer required. So
let's drop `PermissionsStartOnly=true`.

Debian adds extra `ExecStartPre=` and `ExecStartPost=`, though.
Use special executable prefix for full privileges there. (See
systemd.service(5) for details.)
2024-05-29 10:01:19 +01:00
Christian Hesse
7936254012 MDEV-19210: 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.
2024-05-29 10:01:19 +01:00
Oleksandr Byelkin
99b370e023 Merge branch '11.2' into 11.4 2024-05-21 19:38:51 +02:00
Sergei Golubchik
f0a5412037 Merge branch '11.0' into 11.1 2024-05-13 09:52:30 +02: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ä
683fbced6b Merge 11.0 into 11.1 2024-03-28 12:15:36 +02: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
Sergei Golubchik
ec3d9dafe4 MDEV-33459 upgrades 11.X.2→11.(X+1).2
allow RPM upgrades from a different minor version,
if the major version is the same.
2024-03-09 00:40:00 +01: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
c154aafe1a Merge remote-tracking branch '11.3' into 11.4 2023-12-21 15:40:55 +01:00
Sergei Golubchik
7a5448f8da Merge branch '11.0' into 11.1 2023-12-19 20:11:54 +01: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
6b2287fff2 MDEV-15543: tmpfile.d not for datadir
With the default datadir path of /var/lib/mysql the same
as the path of the unix socket, this tmpfiles.d file
was generated to "create" a datadir. This wasn't intended.

In this case we comment out the entry and explain why.

Add extra ideas on other temporary directories that
may be specified in this file.
2023-11-28 17:55:00 +11: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ä
9b2a65e41a Merge 11.0 into 11.1 2023-10-19 08:26:16 +03: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