The script is likely misleading to users stating 'SUCCESS' about things
it didn't do anything about, leading to false sense of security. Improve
the output to be more clear about what it is doing or is not doing.
After moving the systemd service to using environment files
instead of `systemctl set-environment` in 11.6 (MDEV-19210),
they (wsrep-new-cluster and wsrep-start-position) are located
in /var/lib/mysql along with the socket file in
Fedora/RHEL-based distros. This causes them to have incorrect
selinux permissions and therefore be not readable by systemd.
A solution is to generate these files in the run directory,
instead, which already has correct selinux label mysqld_var_run_t
mysql-selinux-1.0.12. Dissociating these files and the socket
in CMake configs can also prove useful for other things.
This also corrects some of the duplicate code in the build
scripts and made INSTALL_RUNDATADIR into a proper location
and used this for the tmpfiles where the temporary files
are created.
Debian's location is /run/mysqld/ matching its INSTALL_UNIX_ADDRDIR,
which is now a temporary location controlled by tmpfiles.
From downstream bug RHEL-116757, the use of ss to map all the
usage of ports to pids and process names under selinux is rather
limited by the mysqld_exec_t limitations.
The checking of the mapping is a bit excessive in a selinux
environment where binding is limited.
We replace the use of ss under selinux to raw reading of the
/proc/tcp{,} interfaces of the linux that aren't selinux restricted.
Paths are set to "canonical" form and historical practice where
/lib comes before /usr/lib and /bin comes before /usr/bin. This
eliminates the need to skip setting LD_LIBRARY_PATH for FreeBSD,
which may help those users whose LD_LIBRARY_PATH is not configured
properly.
Bootstrapping nodes on FreeBSD 15.0 with mariadb-backup currently broken.
We should not need LD_LIBRARY_PATH trickery on FreeBSD, so skip setting
it same as on Darwin. Alternatively putting /lib before /usr/lib also
fixes it.
WSREP_SST: [INFO] Preparing the backup at /var/db/mysql/.sst (20250608 14:44:04.000)
WSREP_SST: [INFO] Evaluating /usr/local/bin/mariadb-backup --prepare ......
WSREP_SST: [ERROR] Cleanup after exit with status: 1 (20250608 14:44:04.000)
With the following error in /var/db/mysql/mariabackup.prepare.log:
ld-elf.so.1: /usr/local/bin/mariadb-backup: Undefined symbol "_ZNSt3__117bad_function_callD1Ev"
I did not look for the root cause in FreeBSD 15.0 that changed this
behaviour. Calling mariadb-backup directly from the shell works fine on
FreeBSD 14.x and 15.x when LD_LIBRARY_PATH is not set (when using
FreeBSD packages or installing from FreeBSD ports). Setting
LD_LIBRARY_PATH manually like the script does, breaks mariadb-backup
with the "Undefined symbol" error on FreeBSD 15.0 but not on 14.x.
Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
main/statistics_json.result is updated for f8ba5ced55 (MDEV-36099)
The test uses 'delete from t1' in many places and then populates
the table again. The natural order of rows in a MyISAM table is well
defined and the test was implicitly relying on that.
before f8ba5ced55 delete was deleting rows one by one, using
ha_myisam::delete_row() because the connection was stuck in rbr mode.
This caused rows to be shown in the reverse insertion order (because of
the delete link list).
MDEV-36099 fixes this bug and the server now correctly uses
ha_myisam::delete_all_rows(). This makes rows to be shown in the
insertion order as expected.
-Replaced incorrect string comparision in views for is_hashed and is_old
as these columns are integer and not string
Affected Views:
-innodb_buffer_stats_by_schema
-innodb_buffer_stats_by_table
-x_innodb_buffer_stats_by_schema
-x_innodb_buffer_stats_by_table
galera_new_cluster is a script intended solely for use with galera
and shouldn't be installed unless WITH_WSREP=ON.
In 11.6 the installation became part of scripts/CMakeList.txt
and no-longer had a WITH_WSREP=ON condition around installing this file.
The galera_new_cluster in systemd.cmake had no effect as the
script is a generated file and not in the source directory.
Changes:
The scripts/CMakeList.txt has a condition WITH_WSREP=ON for installing
the galera_new_cluster script.
The legacy reference in cmake/systemd.cmake is removed.
Thanks Michal Schorm for the bug report.
As of CMake 3.24 CMAKE_COMPILER_IS_GNU(CC|CXX) are deprecated and should
be replaced with CMAKE_(C|CXX)_COMPILER_ID which were introduced with
CMake 2.6.
As seen with openwrt and some other distros, the
determination of hostname can sometime need alternate
commmands.
This provides a cmake option HOSTNAME for non-windows machines
for the mariadb-install-db and mariadbd-safe scripts
and the support-files init scripts..
Delaying scripts on joiner after SST/IST has been made
a common debug feature for all suitable SST/IST methods.
Also some minor fixes have been made for new tests.
After cluster vote to evict a node that failed a transaction,
current master can't commit anymore.
Error voting for joiner in the JOINED state was broken because
the group-wide commit cut (implicit SUCCESS vote) was not taken
into account when processing error vote request from the JOINED
node.
This commit adds 3 MTR tests to verify the fix in the galera
library works as designed.
Requires Galera library commit 91f0090a05e96c3cc353b80d961ede45cefb9279
(galera library version > 26.4.19).
Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
This fixes server startup segv introduced in MDEV-34716
d2eba35653 when upgrading from server
versions lower than 11.7.
Also construct the JSON Options column when upgrading from a version
without the column.