Compare commits
1 Commits
c8-stream-
...
c9-beta-st
| Author | SHA1 | Date | |
|---|---|---|---|
| 585a816aa9 |
4
.gitignore
vendored
4
.gitignore
vendored
@ -1 +1,3 @@
|
||||
SOURCES/mariadb-10.3.39.tar.gz
|
||||
SOURCES/fmt-12.0.0.zip
|
||||
SOURCES/mariadb-11.8.5.tar.gz
|
||||
SOURCES/pcre2-10.46.zip
|
||||
|
||||
@ -1 +1,3 @@
|
||||
25972d22ed05249782141392f0893e71c7d549a9 SOURCES/mariadb-10.3.39.tar.gz
|
||||
15566e7f8472cc7baa66c0a1e721e611dfc5ff92 SOURCES/fmt-12.0.0.zip
|
||||
a39f90bb51735ec562bbac9927ddcce10aed2aaf SOURCES/mariadb-11.8.5.tar.gz
|
||||
e106ad3e31e9967971eafd15409505b6835d5304 SOURCES/pcre2-10.46.zip
|
||||
|
||||
@ -1,105 +0,0 @@
|
||||
diff --git a/client/mysqldump.c b/client/mysqldump.c
|
||||
index b382dd41..0c30c319 100644
|
||||
--- a/client/mysqldump.c
|
||||
+++ b/client/mysqldump.c
|
||||
@@ -1776,6 +1776,26 @@ static char *cover_definer_clause(const char *stmt_str,
|
||||
return query_str;
|
||||
}
|
||||
|
||||
+
|
||||
+static const char* build_path_for_table(char *to, const char *dir,
|
||||
+ const char *table, const char *ext)
|
||||
+{
|
||||
+ char filename[FN_REFLEN], tmp_path[FN_REFLEN];
|
||||
+ convert_dirname(tmp_path, path, NULL);
|
||||
+ my_load_path(tmp_path, tmp_path, NULL);
|
||||
+ if (check_if_legal_tablename(table))
|
||||
+ strxnmov(filename, sizeof(filename) - 1, table, "@@@", NULL);
|
||||
+ else
|
||||
+ {
|
||||
+ uint errors, len;
|
||||
+ len= my_convert(filename, sizeof(filename) - 1, &my_charset_filename,
|
||||
+ table, (uint32)strlen(table), charset_info, &errors);
|
||||
+ filename[len]= 0;
|
||||
+ }
|
||||
+ return fn_format(to, filename, tmp_path, ext, MYF(MY_UNPACK_FILENAME));
|
||||
+}
|
||||
+
|
||||
+
|
||||
/*
|
||||
Open a new .sql file to dump the table or view into
|
||||
|
||||
@@ -1790,12 +1810,9 @@ static char *cover_definer_clause(const char *stmt_str,
|
||||
*/
|
||||
static FILE* open_sql_file_for_table(const char* table, int flags)
|
||||
{
|
||||
- FILE* res;
|
||||
- char filename[FN_REFLEN], tmp_path[FN_REFLEN];
|
||||
- convert_dirname(tmp_path,path,NullS);
|
||||
- res= my_fopen(fn_format(filename, table, tmp_path, ".sql", 4),
|
||||
- flags, MYF(MY_WME));
|
||||
- return res;
|
||||
+ char filename[FN_REFLEN];
|
||||
+ return my_fopen(build_path_for_table(filename, path, table, ".sql"),
|
||||
+ flags, MYF(MY_WME));
|
||||
}
|
||||
|
||||
|
||||
@@ -3946,15 +3963,9 @@ static void dump_table(const char *table, const char *db, const uchar *hash_key,
|
||||
|
||||
if (path)
|
||||
{
|
||||
- char filename[FN_REFLEN], tmp_path[FN_REFLEN];
|
||||
+ char filename[FN_REFLEN];
|
||||
|
||||
- /*
|
||||
- Convert the path to native os format
|
||||
- and resolve to the full filepath.
|
||||
- */
|
||||
- convert_dirname(tmp_path,path,NullS);
|
||||
- my_load_path(tmp_path, tmp_path, NULL);
|
||||
- fn_format(filename, table, tmp_path, ".txt", MYF(MY_UNPACK_FILENAME));
|
||||
+ build_path_for_table(filename, path, table, ".txt");
|
||||
|
||||
/* Must delete the file that 'INTO OUTFILE' will write to */
|
||||
my_delete(filename, MYF(0));
|
||||
@@ -3963,7 +3974,6 @@ static void dump_table(const char *table, const char *db, const uchar *hash_key,
|
||||
to_unix_path(filename);
|
||||
|
||||
/* now build the query string */
|
||||
-
|
||||
dynstr_append_checked(&query_string, "SELECT /*!40001 SQL_NO_CACHE */ ");
|
||||
dynstr_append_checked(&query_string, select_field_names.str);
|
||||
dynstr_append_checked(&query_string, " INTO OUTFILE '");
|
||||
diff --git a/client/mysqlimport.c b/client/mysqlimport.c
|
||||
index 3ec23b87..7d6f9115 100644
|
||||
--- a/client/mysqlimport.c
|
||||
+++ b/client/mysqlimport.c
|
||||
@@ -320,7 +320,17 @@ static int write_to_table(char *filename, MYSQL *mysql)
|
||||
DBUG_ENTER("write_to_table");
|
||||
DBUG_PRINT("enter",("filename: %s",filename));
|
||||
|
||||
- fn_format(tablename, filename, "", "", 1 | 2); /* removes path & ext. */
|
||||
+ fn_format(tablename, filename, "", "", MYF(MY_REPLACE_DIR | MY_REPLACE_EXT));
|
||||
+ if (strchr(tablename, '@'))
|
||||
+ {
|
||||
+ uint errors, len;
|
||||
+ CHARSET_INFO *cs=
|
||||
+ get_charset_by_csname(default_charset, MY_CS_PRIMARY, MYF(0));
|
||||
+ len= my_convert(escaped_name, sizeof(escaped_name) - 1, cs, tablename,
|
||||
+ (uint32)strlen(tablename), &my_charset_filename, &errors);
|
||||
+ if (!errors)
|
||||
+ strmake(tablename, escaped_name, len);
|
||||
+ }
|
||||
if (!opt_local_file)
|
||||
strmov(hard_path,filename);
|
||||
else
|
||||
@@ -476,7 +486,7 @@ static MYSQL *db_connect(char *host, char *database,
|
||||
mysql_options(mysql, MYSQL_DEFAULT_AUTH, opt_default_auth);
|
||||
if (!strcmp(default_charset,MYSQL_AUTODETECT_CHARSET_NAME))
|
||||
default_charset= (char *)my_default_csname();
|
||||
- mysql_options(mysql, MYSQL_SET_CHARSET_NAME, my_default_csname());
|
||||
+ mysql_options(mysql, MYSQL_SET_CHARSET_NAME, default_charset);
|
||||
mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
|
||||
mysql_options4(mysql, MYSQL_OPT_CONNECT_ATTR_ADD,
|
||||
"program_name", "mysqlimport");
|
||||
9
SOURCES/README.mariadb-docs
Normal file
9
SOURCES/README.mariadb-docs
Normal file
@ -0,0 +1,9 @@
|
||||
MariaDB haven't yet made a document package available for offline.
|
||||
|
||||
You can create your own copy with the instructions here:
|
||||
|
||||
https://mariadb.com/kb/en/meta/mirroring-the-mariadb-knowledge-base/
|
||||
|
||||
You can find view the on-line documentation at:
|
||||
|
||||
https://mariadb.com/kb/en/documentation/
|
||||
@ -1,4 +0,0 @@
|
||||
The official MySQL documentation is not freely redistributable, so we cannot
|
||||
include it in RHEL or Fedora. You can find it on-line at
|
||||
|
||||
http://dev.mysql.com/doc/
|
||||
@ -1,9 +0,0 @@
|
||||
MySQL is distributed under GPL v2, but there are some licensing exceptions
|
||||
that allow the client libraries to be linked with a non-GPL application,
|
||||
so long as the application is under a license approved by Oracle.
|
||||
For details see
|
||||
|
||||
http://www.mysql.com/about/legal/licensing/foss-exception/
|
||||
|
||||
Some innobase code from Percona and Google is under BSD license.
|
||||
Some code related to test-suite is under LGPLv2.
|
||||
@ -1,101 +0,0 @@
|
||||
--- mariadb-10.3.39/mysql-test/include/default_mysqld.cnf 2023-05-03 06:32:44.000000000 +0200
|
||||
+++ ../../mariadb-10.3.39/mysql-test/include/default_mysqld.cnf 2023-07-07 13:58:40.255283041 +0200
|
||||
@@ -127,3 +127,8 @@ local-infile
|
||||
# tables. Let's enable it in the [server] group, because this group
|
||||
# is read after [mysqld] and [embedded]
|
||||
loose-aria
|
||||
+
|
||||
+[mysqltest]
|
||||
+loose-ssl-ca=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem
|
||||
+loose-ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/server-cert.pem
|
||||
+loose-ssl-key=@ENV.MYSQL_TEST_DIR/std_data/server-key.pem
|
||||
|
||||
--- mariadb-10.3.39/mysql-test/include/wait_until_connected_again.inc 2023-05-03 06:32:44.000000000 +0200
|
||||
+++ ../../mariadb-10.3.39/mysql-test/include/wait_until_connected_again.inc 2023-07-07 13:55:30.424368106 +0200
|
||||
@@ -11,7 +11,7 @@ let $counter= 5000;
|
||||
let $mysql_errno= 9999;
|
||||
while ($mysql_errno)
|
||||
{
|
||||
- --error 0,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,ER_LOCK_WAIT_TIMEOUT,2002,2006,2013
|
||||
+ --error 0,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,ER_LOCK_WAIT_TIMEOUT,2002,2006,2013,2026
|
||||
show status;
|
||||
|
||||
dec $counter;
|
||||
|
||||
--- mariadb-10.3.39/mysql-test/suite/rpl/t/rpl_err_ignoredtable.test 2023-05-03 06:32:45.000000000 +0200
|
||||
+++ ../../mariadb-10.3.39/mysql-test/suite/rpl/t/rpl_err_ignoredtable.test 2023-07-07 13:54:31.152082427 +0200
|
||||
@@ -53,7 +53,7 @@ insert into t4 values (3),(4);
|
||||
connection master;
|
||||
# The get_lock function causes warning for unsafe statement.
|
||||
--disable_warnings
|
||||
---error 0,1317,2013
|
||||
+--error 0,1317,2013,2026
|
||||
reap;
|
||||
--enable_warnings
|
||||
connection master1;
|
||||
|
||||
--- mariadb-10.3.39/mysql-test/suite/innodb/t/innodb_bug51920.test 2023-05-03 06:32:44.000000000 +0200
|
||||
+++ ../../mariadb-10.3.39/mysql-test/suite/innodb/t/innodb_bug51920.test 2023-07-07 15:11:39.000404508 +0200
|
||||
@@ -36,7 +36,7 @@ let $wait_condition =
|
||||
# depending on platform.
|
||||
#
|
||||
connection con1;
|
||||
--- error 1317, 2006, 2013, ER_CONNECTION_KILLED
|
||||
+-- error 1317, 2006, 2013, 2026, ER_CONNECTION_KILLED
|
||||
reap;
|
||||
connection default;
|
||||
DROP TABLE bug51920;
|
||||
|
||||
--- mariadb-10.3.39/mysql-test/main/lock_kill.test 2023-05-03 06:32:44.000000000 +0200
|
||||
+++ ../../mariadb-10.3.39/mysql-test/main/lock_kill.test 2023-07-07 15:13:54.335086789 +0200
|
||||
@@ -17,7 +17,7 @@ LOCK TABLE t1 WRITE;
|
||||
eval KILL $conid;
|
||||
--enable_query_log
|
||||
--connection con1
|
||||
---error 0,2006,2013,ER_CONNECTION_KILLED
|
||||
+--error 0,2006,2013,2026,ER_CONNECTION_KILLED
|
||||
reap;
|
||||
--connection default
|
||||
--disconnect con1
|
||||
@@ -35,7 +35,7 @@ LOCK TABLE t1 WRITE, t2 WRITE;
|
||||
eval KILL $conid;
|
||||
--enable_query_log
|
||||
--connection con1
|
||||
---error 0,2006,2013,ER_CONNECTION_KILLED
|
||||
+--error 0,2006,2013,2026,ER_CONNECTION_KILLED
|
||||
reap;
|
||||
--connection default
|
||||
--disconnect con1
|
||||
|
||||
--- mariadb-10.3.39/mysql-test/main/loadxml.test 2023-05-03 06:32:44.000000000 +0200
|
||||
+++ ../../mariadb-10.3.39/mysql-test/main/loadxml.test 2023-07-07 15:15:14.862492763 +0200
|
||||
@@ -83,7 +83,7 @@ connection default;
|
||||
connection addconroot;
|
||||
# Read response from connection to avoid packets out-of-order when disconnecting
|
||||
# Note, that connection can already be dead due to previously issued kill
|
||||
---error 0,2013
|
||||
+--error 0,2013,2026
|
||||
--reap
|
||||
disconnect addconroot;
|
||||
connection default;
|
||||
|
||||
--- mariadb-10.3.39/plugin/disks/mysql-test/disks/disks.test 2023-05-03 06:32:45.000000000 +0200
|
||||
+++ ../../mariadb-10.3.39/plugin/disks/mysql-test/disks/disks.test 2023-07-10 11:48:28.859497746 +0200
|
||||
@@ -1,3 +1,3 @@
|
||||
--replace_regex /varchar\([0-9]+\)/varchar(pathlen)/
|
||||
show create table information_schema.disks;
|
||||
-select sum(Total) > sum(Available), sum(Total)>sum(Used) from information_schema.disks;
|
||||
+select sum(Total) >= sum(Available), sum(Total) >= sum(Used) from information_schema.disks;
|
||||
|
||||
--- mariadb-10.3.39/plugin/disks/mysql-test/disks/disks.result 2023-05-03 06:32:45.000000000 +0200
|
||||
+++ ../../mariadb-10.3.39/plugin/disks/mysql-test/disks/disks.result 2023-07-10 12:47:10.460233056 +0200
|
||||
@@ -7,6 +7,6 @@ DISKS CREATE TEMPORARY TABLE `DISKS` (
|
||||
`Used` bigint(32) NOT NULL,
|
||||
`Available` bigint(32) NOT NULL
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci
|
||||
-select sum(Total) > sum(Available), sum(Total)>sum(Used) from information_schema.disks;
|
||||
-sum(Total) > sum(Available) sum(Total)>sum(Used)
|
||||
+select sum(Total) >= sum(Available), sum(Total) >= sum(Used) from information_schema.disks;
|
||||
+sum(Total) >= sum(Available) sum(Total) >= sum(Used)
|
||||
1 1
|
||||
|
||||
@ -1,13 +0,0 @@
|
||||
Harden the "hardened" flags even more to comply with RHEL8 security rules
|
||||
|
||||
--- mariadb-10.3.25/CMakeLists.txt 2020-10-05 18:19:45.000000000 +0200
|
||||
+++ mariadb-10.3.25/CMakeLists.txt_patched 2020-11-03 01:29:52.369426705 +0100
|
||||
@@ -247,7 +247,7 @@ IF(NOT WITH_TSAN)
|
||||
# security-enhancing flags
|
||||
MY_CHECK_AND_SET_COMPILER_FLAG("-pie -fPIC")
|
||||
MY_CHECK_AND_SET_LINKER_FLAG("-Wl,-z,relro,-z,now")
|
||||
- MY_CHECK_AND_SET_COMPILER_FLAG("-fstack-protector --param=ssp-buffer-size=4")
|
||||
+ MY_CHECK_AND_SET_COMPILER_FLAG("-fstack-protector-strong --param=ssp-buffer-size=4")
|
||||
MY_CHECK_AND_SET_COMPILER_FLAG("-D_FORTIFY_SOURCE=2" RELEASE RELWITHDEBINFO)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
@ -5,7 +5,7 @@
|
||||
# positive result when starting and mysqld_safe could remove
|
||||
# a socket file, which is actually being used by a different daemon.
|
||||
|
||||
source "`dirname ${BASH_SOURCE[0]}`/mysql-scripts-common"
|
||||
source "`dirname ${BASH_SOURCE[0]}`/mariadb-scripts-common"
|
||||
|
||||
if test -e "$socketfile" ; then
|
||||
echo "Socket file $socketfile exists." >&2
|
||||
@ -25,9 +25,9 @@ if test -e "$socketfile" ; then
|
||||
fi
|
||||
|
||||
# some process uses the socket file
|
||||
response=`@bindir@/mysqladmin --no-defaults --socket="$socketfile" --user=UNKNOWN_MYSQL_USER --connect-timeout="${CHECKSOCKETTIMEOUT:-10}" ping 2>&1`
|
||||
response=`@bindir@/mariadb-admin --no-defaults --socket="$socketfile" --user=UNKNOWN_MYSQL_USER --connect-timeout="${CHECKSOCKETTIMEOUT:-10}" ping 2>&1`
|
||||
if [ $? -eq 0 ] || echo "$response" | grep -q "Access denied for user" ; then
|
||||
echo "Is another MySQL daemon already running with the same unix socket?" >&2
|
||||
echo "Is another MariaDB daemon already running with the same unix socket?" >&2
|
||||
echo "Please, stop the process using the socket $socketfile or remove the file manually to start the service." >&2
|
||||
exit 1
|
||||
fi
|
||||
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
source "`dirname ${BASH_SOURCE[0]}`/mysql-scripts-common"
|
||||
source "`dirname ${BASH_SOURCE[0]}`/mariadb-scripts-common"
|
||||
|
||||
upgrade_info_file="$datadir/mysql_upgrade_info"
|
||||
version=0
|
||||
@ -25,14 +25,14 @@ if [ $version -ne $thisversion ] ; then
|
||||
fi
|
||||
|
||||
cat <<EOF >&2
|
||||
The datadir located at $datadir needs to be upgraded using 'mysql_upgrade' tool. This can be done using the following steps:
|
||||
The datadir located at $datadir needs to be upgraded using 'mariadb-upgrade' tool. This can be done using the following steps:
|
||||
|
||||
1. Back-up your data before with 'mysql_upgrade'
|
||||
2. Start the database daemon using 'service @DAEMON_NAME@ start'
|
||||
3. Run 'mysql_upgrade' with a database user that has sufficient privileges
|
||||
1. Back-up your data before with 'mariadb-upgrade'
|
||||
2. Start the database daemon using 'systemctl start @DAEMON_NAME@.service'
|
||||
3. Run 'mariadb-upgrade' with a database user that has sufficient privileges
|
||||
|
||||
Read more about 'mysql_upgrade' usage at:
|
||||
https://mariadb.com/kb/en/mariadb/documentation/sql-commands/table-commands/mysql_upgrade/
|
||||
Read more about 'mariadb-upgrade' usage at:
|
||||
https://mariadb.com/kb/en/mysql_upgrade/
|
||||
EOF
|
||||
fi
|
||||
|
||||
8
SOURCES/mariadb-federated.patch
Normal file
8
SOURCES/mariadb-federated.patch
Normal file
@ -0,0 +1,8 @@
|
||||
--- mariadb-10.11.11/storage/federated/CMakeLists.txt 2025-01-30 12:01:24.000000000 +0100
|
||||
+++ mariadb-10.11.11/storage/federated/CMakeLists.txt_new 2025-05-16 14:06:10.496269412 +0200
|
||||
@@ -14,4 +14,4 @@
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
|
||||
|
||||
SET(FEDERATED_SOURCES ha_federated.cc)
|
||||
-MYSQL_ADD_PLUGIN(federated ${FEDERATED_SOURCES} STORAGE_ENGINE MODULE_ONLY)
|
||||
+MYSQL_ADD_PLUGIN(federated ${FEDERATED_SOURCES} STORAGE_ENGINE DISABLED)
|
||||
37
SOURCES/mariadb-libfmt.patch
Normal file
37
SOURCES/mariadb-libfmt.patch
Normal file
@ -0,0 +1,37 @@
|
||||
MariaDB upstream uses an old version (8.0) of the FMT library, unlike Fedora which packs a current one (10.2)
|
||||
https://src.fedoraproject.org/rpms/fmt
|
||||
https://github.com/MariaDB/server/blob/10.11/cmake/libfmt.cmake#L18
|
||||
|
||||
There is a breaking change between the FMT library version 8 and 10.
|
||||
Sergei Golubchik from MariaDB upstream noticed that and decided to not rebase to the newer version for now. In the same commit:
|
||||
https://github.com/MariaDB/server/commit/b5c367cd88e37091ab5f8dab0396c01c97d037e2
|
||||
He also fixed the CMake file controlling the FMT library.
|
||||
It now correctly detects, whether the system version is able to compile a given code in an expected way.
|
||||
|
||||
The incompatibility between FMT library version has been reported both agains Fedora and FMT upstream
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2266807
|
||||
The upstream created a patch and Fedora backported it
|
||||
https://src.fedoraproject.org/rpms/fmt/c/7d6d6e2c33e845b3cbf3fcaf83f14dfeddfa8a70?branch=rawhide
|
||||
but only in F40 and later.
|
||||
|
||||
To avoid potential issues on systems with FMT library between 8.0 and the one with the fix backported,
|
||||
introduce a bundling mechanism for use on such distributions.
|
||||
We pre-download the sources archive and supply the CMake with it, instead of the web URL.
|
||||
|
||||
This patch is not used at the moment as the current version of the fmt package available in f40-f43 is sufficient
|
||||
therefore we are using it instead of the bundled fmt.
|
||||
|
||||
We are still keeping this patch in case it may be needed in the future and because it is needed in rhel
|
||||
|
||||
diff -Naur mariadb-11.8.5/cmake/libfmt.cmake mariadb-11.8.5_patched/cmake/libfmt.cmake
|
||||
--- mariadb-11.8.5/cmake/libfmt.cmake 2025-11-13 09:45:29.000000000 +0100
|
||||
+++ mariadb-11.8.5_patched/cmake/libfmt.cmake 2025-12-01 15:30:54.285523685 +0100
|
||||
@@ -15,7 +15,7 @@
|
||||
ExternalProject_Add(
|
||||
libfmt
|
||||
PREFIX "${dir}"
|
||||
- URL "https://github.com/fmtlib/fmt/releases/download/12.0.0/fmt-12.0.0.zip"
|
||||
+ URL file:///${dir}/fmt-12.0.0.zip
|
||||
URL_MD5 9bd04e6e8c5b1733e4eefb473604219d
|
||||
INSTALL_COMMAND ""
|
||||
CONFIGURE_COMMAND ""
|
||||
@ -1,79 +1,32 @@
|
||||
Adjust the mysql-log-rotate script in several ways:
|
||||
Adjust the 'mariadb.logrotate.sh' script in several ways:
|
||||
|
||||
* Use the correct log file pathname for Red Hat installations.
|
||||
* Enable creation of the log file by logrotate (needed since
|
||||
/var/log/ isn't writable by mysql user); and set the same 640
|
||||
permissions we normally use.
|
||||
* Comment out the actual rotation commands, so that user must edit
|
||||
the file to enable rotation. This is unfortunate, but the fact
|
||||
that the script will probably fail without manual configuration
|
||||
(to set a root password) means that we can't really have it turned
|
||||
on by default. Fortunately, in most configurations the log file
|
||||
is low-volume and so rotation is not critical functionality.
|
||||
|
||||
See discussions at RH bugs 799735, 547007
|
||||
* Note they are from Fedora 15 / 16
|
||||
* Remove Debian specific code
|
||||
for the very unlikely, but possible scenario
|
||||
in which the debian config file would exist.
|
||||
|
||||
Update 3/2017
|
||||
* it would be big unexpected change for anyone upgrading, if we start shipping it now.
|
||||
Maybe it is good candidate for shipping with MariaDB 10.2 ?
|
||||
* the 'mysqladmin flush logs' doesn´t guarantee, no entries are lost
|
||||
during flushing, the operation is not atomic.
|
||||
We should not ship it in that state
|
||||
|
||||
Update 6/2018
|
||||
* the SIGHUP causes server to flush all logs. No password admin needed, the only constraint is
|
||||
beeing able to send the SIGHUP to the process and read the mysqld pid file, which root can.
|
||||
* Submited as PR: https://github.com/MariaDB/server/pull/807
|
||||
|
||||
Update 01/2022
|
||||
* added delaycompress option
|
||||
* see https://mariadb.com/kb/en/rotating-logs-on-unix-and-linux
|
||||
|
||||
--- mariadb-10.3.32/support-files/mysql-log-rotate.sh 2022-01-14 17:03:27.000000000 +0100
|
||||
+++ mariadb-10.3.32/support-files/mysql-log-rotate.sh_patched 2022-01-17 15:07:54.205379672 +0100
|
||||
@@ -3,36 +3,22 @@
|
||||
# in the [mysqld] section as follows:
|
||||
#
|
||||
# [mysqld]
|
||||
-# log-error=@localstatedir@/mysqld.log
|
||||
-#
|
||||
-# If the root user has a password you have to create a
|
||||
-# /root/.my.cnf configuration file with the following
|
||||
-# content:
|
||||
-#
|
||||
-# [mysqladmin]
|
||||
-# password = <secret>
|
||||
-# user= root
|
||||
-#
|
||||
-# where "<secret>" is the password.
|
||||
-#
|
||||
-# ATTENTION: This /root/.my.cnf should be readable ONLY
|
||||
-# for root !
|
||||
+# log-error=@LOG_LOCATION@
|
||||
--- mariadb-10.11.6/support-files/mariadb.logrotate.sh 2023-11-08 16:51:43.000000000 +0100
|
||||
+++ mariadb-10.11.6/support-files/mariadb.logrotate.sh_patched 2023-12-17 18:03:36.955861025 +0100
|
||||
@@ -6,7 +6,7 @@
|
||||
# Read https://mariadb.com/kb/en/error-log/ to learn more about logging and
|
||||
# https://mariadb.com/kb/en/rotating-logs-on-unix-and-linux/ about rotating logs.
|
||||
|
||||
-@localstatedir@/mysqld.log {
|
||||
- # create 600 mysql mysql
|
||||
-@localstatedir@/mysqld.log @localstatedir@/mariadb.log @logdir@/*.log {
|
||||
+@LOG_LOCATION@ {
|
||||
+ create 600 mysql mysql
|
||||
su mysql mysql
|
||||
notifempty
|
||||
daily
|
||||
rotate 3
|
||||
missingok
|
||||
compress
|
||||
+ delaycompress
|
||||
postrotate
|
||||
# just if mysqld is really running
|
||||
- if test -x @bindir@/mysqladmin && \
|
||||
- @bindir@/mysqladmin ping &>/dev/null
|
||||
- then
|
||||
- @bindir@/mysqladmin --local flush-error-log \
|
||||
- flush-engine-log flush-general-log flush-slow-log
|
||||
- fi
|
||||
+ if [ -e @PID_FILE_DIR@/@DAEMON_NO_PREFIX@.pid ]
|
||||
+ then
|
||||
+ kill -1 $(<@PID_FILE_DIR@/@DAEMON_NO_PREFIX@.pid)
|
||||
+ fi
|
||||
endscript
|
||||
}
|
||||
|
||||
# Depends on a mysql@localhost unix_socket authenticated user with RELOAD privilege
|
||||
@su_user@
|
||||
@@ -45,11 +45,6 @@
|
||||
# has thanks to the default use of Unix socket authentication for the 'mysql'
|
||||
# (or root on Debian) account used everywhere since MariaDB 10.4.
|
||||
postrotate
|
||||
- if test -r /etc/mysql/debian.cnf
|
||||
- then
|
||||
- EXTRAPARAM='--defaults-file=/etc/mysql/debian.cnf'
|
||||
- fi
|
||||
-
|
||||
if test -x @bindir@/mariadb-admin
|
||||
then
|
||||
@bindir@/mariadb-admin $EXTRAPARAM --local flush-error-log \
|
||||
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
--- mariadb-10.3.39/scripts/wsrep_sst_mariabackup.sh 2023-08-11 11:31:40.415022889 +0200
|
||||
+++ ../../mariadb-10.3.39/scripts/wsrep_sst_mariabackup.sh 2023-08-11 11:32:01.924161077 +0200
|
||||
@@ -340,6 +340,9 @@ get_transfer()
|
||||
"Use workaround for socat $SOCAT_VERSION bug"
|
||||
fi
|
||||
fi
|
||||
+ if check_for_version "$SOCAT_VERSION" '1.7.4'; then
|
||||
+ tcmd="$tcmd,no-sni=1"
|
||||
+ fi
|
||||
fi
|
||||
|
||||
if [ "${sockopt#*,dhparam=}" = "$sockopt" ]; then
|
||||
70
SOURCES/mariadb-mtr.patch
Normal file
70
SOURCES/mariadb-mtr.patch
Normal file
@ -0,0 +1,70 @@
|
||||
diff --git a/mysql-test/mariadb-test-run.pl b/mysql-test/mariadb-test-run.pl
|
||||
index 594e052a16e..6a274b2d597 100755
|
||||
--- a/mysql-test/mariadb-test-run.pl
|
||||
+++ b/mysql-test/mariadb-test-run.pl
|
||||
@@ -1491,7 +1491,6 @@ sub command_line_setup {
|
||||
mtr_warning ("Port base $opt_port_base rounded down to multiple of 10");
|
||||
$opt_port_base-= $rem;
|
||||
}
|
||||
- $opt_build_thread= $opt_port_base / 10 - 1000;
|
||||
}
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
@@ -1719,11 +1718,6 @@ sub command_line_setup {
|
||||
# an environment variable can be used to control all ports. A small
|
||||
# number is to be used, 0 - 16 or similar.
|
||||
#
|
||||
-# Note the MASTER_MYPORT has to be set the same in all 4.x and 5.x
|
||||
-# versions of this script, else a 4.0 test run might conflict with a
|
||||
-# 5.1 test run, even if different MTR_BUILD_THREAD is used. This means
|
||||
-# all port numbers might not be used in this version of the script.
|
||||
-#
|
||||
# Also note the limitation of ports we are allowed to hand out. This
|
||||
# differs between operating systems and configuration, see
|
||||
# http://www.ncftp.com/ncftpd/doc/misc/ephemeral_ports.html
|
||||
@@ -1734,10 +1728,14 @@ sub set_build_thread_ports($) {
|
||||
|
||||
if ( lc($opt_build_thread) eq 'auto' ) {
|
||||
my $found_free = 0;
|
||||
- $build_thread = 300; # Start attempts from here
|
||||
- my $build_thread_upper = $build_thread + ($opt_parallel > 1500
|
||||
- ? 3000
|
||||
- : 2 * $opt_parallel) + 300;
|
||||
+ if ($opt_port_base eq "auto") {
|
||||
+ $build_thread = 15000;
|
||||
+ } else {
|
||||
+ $build_thread = $opt_port_base;
|
||||
+ }
|
||||
+ $build_thread += ($thread - 1) * $opt_port_group_size;
|
||||
+ my $build_thread_upper = $build_thread + $opt_parallel * 2;
|
||||
+
|
||||
while (! $found_free)
|
||||
{
|
||||
$build_thread= mtr_get_unique_id($build_thread, $build_thread_upper);
|
||||
@@ -1754,7 +1752,7 @@ sub set_build_thread_ports($) {
|
||||
}
|
||||
else
|
||||
{
|
||||
- $build_thread = $opt_build_thread + $thread - 1;
|
||||
+ $build_thread = $opt_port_base + $thread - 1;
|
||||
if (! check_ports_free($build_thread)) {
|
||||
# Some port was not free(which one has already been printed)
|
||||
mtr_error("Some port(s) was not free")
|
||||
@@ -1763,7 +1761,7 @@ sub set_build_thread_ports($) {
|
||||
$ENV{MTR_BUILD_THREAD}= $build_thread;
|
||||
|
||||
# Calculate baseport
|
||||
- $baseport= $build_thread * $opt_port_group_size + 10000;
|
||||
+ $baseport= $build_thread;
|
||||
if ( $baseport < 5001 or $baseport + $opt_port_group_size >= 32767 )
|
||||
{
|
||||
mtr_error("MTR_BUILD_THREAD number results in a port",
|
||||
@@ -2968,7 +2966,7 @@ sub kill_leftovers ($) {
|
||||
sub check_ports_free ($)
|
||||
{
|
||||
my $bthread= shift;
|
||||
- my $portbase = $bthread * $opt_port_group_size + 10000;
|
||||
+ my $portbase = $bthread;
|
||||
for ($portbase..$portbase+($opt_port_group_size-1)){
|
||||
if (mtr_ping_port($_)){
|
||||
mtr_report(" - 'localhost:$_' was not free");
|
||||
@ -1,33 +1,37 @@
|
||||
diff -up mariadb-10.1.8/support-files/CMakeLists.txt.p9 mariadb-10.1.8/support-files/CMakeLists.txt
|
||||
--- mariadb-10.2.32/support-files/CMakeLists.txt 2020-05-08 13:45:27.000000000 +0200
|
||||
+++ mariadb-10.2.32/support-files/CMakeLists.txt_pacthed 2020-05-13 10:11:30.884190396 +0200
|
||||
@@ -100,7 +100,8 @@ IF(UNIX)
|
||||
ENDIF()
|
||||
--- mariadb-10.4.14/support-files/CMakeLists.txt 2020-08-06 17:28:28.000000000 +0200
|
||||
+++ mariadb-10.4.14/support-files/CMakeLists.txt_patched 2020-09-03 13:21:07.826658279 +0200
|
||||
@@ -187,6 +187,7 @@ IF(UNIX)
|
||||
COMPONENT SharedLibraries)
|
||||
INSTALL(FILES rpm/mysql-clients.cnf DESTINATION ${INSTALL_SYSCONF2DIR}
|
||||
COMPONENT Client)
|
||||
+ CONFIGURE_FILE(rpm/server.cnf ${CMAKE_CURRENT_SOURCE_DIR}/rpm/server.cnf @ONLY)
|
||||
INSTALL(FILES rpm/server.cnf DESTINATION ${INSTALL_SYSCONF2DIR}
|
||||
COMPONENT IniFiles)
|
||||
INSTALL(FILES rpm/enable_encryption.preset DESTINATION ${INSTALL_SYSCONF2DIR}
|
||||
|
||||
diff -Naurp mariadb-11.4.5/support-files/rpm/server.cnf*
|
||||
--- mariadb-11.4.5/support-files/rpm/server.cnf 2025-01-30 18:54:57.000000000 +0100
|
||||
+++ mariadb-11.4.5/support-files/rpm/server.cnf_patched 2025-04-23 12:25:38.052571209 +0200
|
||||
@@ -3,6 +3,11 @@
|
||||
# Use it for options that only the server (but not clients) should see
|
||||
#
|
||||
|
||||
CONFIGURE_FILE(mariadb.pc.in ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc @ONLY)
|
||||
- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc DESTINATION ${INSTALL_LIBDIR}/pkgconfig COMPONENT Development)
|
||||
+ CONFIGURE_FILE(rpm/server.cnf ${CMAKE_CURRENT_BINARY_DIR}/rpm/server.cnf @ONLY)
|
||||
+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc DESTINATION ${INSTALL_SHAREDIR}/pkgconfig COMPONENT Development)
|
||||
|
||||
INSTALL(FILES mysql.m4 DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development)
|
||||
|
||||
diff -up mariadb-10.0.15/support-files/rpm/server.cnf.ownsetup mariadb-10.0.15/support-files/rpm/server.cnf
|
||||
--- mariadb-10.0.15/support-files/rpm/server.cnf.ownsetup 2015-01-24 23:55:55.110063592 +0100
|
||||
+++ mariadb-10.0.15/support-files/rpm/server.cnf 2015-01-24 23:57:42.308114387 +0100
|
||||
@@ -9,7 +9,16 @@
|
||||
[server]
|
||||
|
||||
# this is only for the mysqld standalone daemon
|
||||
+# Settings user and group are ignored when systemd is used.
|
||||
+# If you need to run mysqld under a different user or group,
|
||||
+# customize your systemd unit file for mysqld/mariadb according to the
|
||||
+# customize your systemd unit file for MariaDB according to the
|
||||
+# instructions in http://fedoraproject.org/wiki/Systemd
|
||||
[mysqld]
|
||||
+
|
||||
# this is read by the standalone daemon and embedded servers
|
||||
[server]
|
||||
|
||||
@@ -10,6 +15,10 @@
|
||||
# If you use the same .cnf file for MySQL and MariaDB,
|
||||
# you can put MariaDB-only options here
|
||||
[mariadb]
|
||||
+datadir=@MYSQL_DATADIR@
|
||||
+socket=@MYSQL_UNIX_ADDR@
|
||||
+log-error=@LOG_LOCATION@
|
||||
+pid-file=@PID_FILE_DIR@/@DAEMON_NO_PREFIX@.pid
|
||||
+
|
||||
|
||||
#
|
||||
# * Galera-related settings
|
||||
# * Enable the Feedback plugin and submit anonymous usage information
|
||||
|
||||
@ -1,20 +0,0 @@
|
||||
Use PCDIR CMake option, if configured
|
||||
|
||||
Upstream install the server pkgconfig file into arch-independent directory
|
||||
Reported to upstream as: https://jira.mariadb.org/browse/MDEV-14340
|
||||
|
||||
--- mariadb-10.3.12/support-files/CMakeLists.txt 2019-03-20 15:25:53.423283135 +0100
|
||||
+++ mariadb-10.3.12/support-files/CMakeLists.txt_patched 2019-03-20 15:38:56.372819958 +0100
|
||||
@@ -82,7 +82,12 @@ IF(UNIX)
|
||||
|
||||
CONFIGURE_FILE(mariadb.pc.in ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc @ONLY)
|
||||
CONFIGURE_FILE(rpm/server.cnf ${CMAKE_CURRENT_BINARY_DIR}/rpm/server.cnf @ONLY)
|
||||
+IF(INSTALL_PCDIR)
|
||||
+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc DESTINATION ${INSTALL_PCDIR} COMPONENT Development)
|
||||
+ELSE()
|
||||
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc DESTINATION ${INSTALL_SHAREDIR}/pkgconfig COMPONENT Development)
|
||||
+ENDIF()
|
||||
+
|
||||
|
||||
INSTALL(FILES mysql.m4 DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development)
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script creates the mysql data directory during first service start.
|
||||
# This script creates the MariaDB data directory during first service start.
|
||||
# In subsequent starts, it does nothing much.
|
||||
|
||||
source "`dirname ${BASH_SOURCE[0]}`/mysql-scripts-common"
|
||||
source "`dirname ${BASH_SOURCE[0]}`/mariadb-scripts-common"
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
@ -97,7 +97,7 @@ if should_initialize "$datadir" ; then
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1335849#c19
|
||||
INITDB_TIMESTAMP=`LANG=C date -u`
|
||||
sleep 1
|
||||
@bindir@/mysql_install_db --rpm --datadir="$datadir" --user="$myuser" --skip-test-db >&2
|
||||
@bindir@/mariadb-install-db --rpm --datadir="$datadir" --user="$myuser" --skip-test-db >&2
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ] ; then
|
||||
echo "Initialization of @NICE_PROJECT_NAME@ database failed." >&2
|
||||
@ -1,11 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Some useful functions used in other MySQL helper scripts
|
||||
# Some useful functions used in other MariaDB helper scripts
|
||||
# This scripts defines variables datadir, errlogfile, socketfile
|
||||
|
||||
export LC_ALL=C
|
||||
|
||||
# extract value of a MySQL option from config files
|
||||
# extract value of a MariaDB option from config files
|
||||
# Usage: get_mysql_option VARNAME DEFAULT SECTION [ SECTION, ... ]
|
||||
# result is returned in $result
|
||||
# We use my_print_defaults which prints all options from multiple files,
|
||||
@ -25,7 +25,7 @@ get_mysql_option(){
|
||||
fi
|
||||
}
|
||||
|
||||
# For the case of running more instances via systemd, scrits that source
|
||||
# For the case of running more instances via systemd, scripts that source
|
||||
# this file can get --default-group-suffix or similar option as the first
|
||||
# argument. The utility my_print_defaults needs to use it as well, so the
|
||||
# scripts sourcing this file work with the same options as the daemon.
|
||||
@ -35,20 +35,20 @@ while echo "$1" | grep -q '^--defaults' ; do
|
||||
shift
|
||||
done
|
||||
|
||||
# Defaults here had better match what mysqld_safe will default to
|
||||
# Defaults here had better match what mariadbd-safe will default to
|
||||
# The option values are generally defined on three important places
|
||||
# on the default installation:
|
||||
# 1) default values are hardcoded in the code of mysqld daemon or
|
||||
# mysqld_safe script
|
||||
# 1) default values are hardcoded in the code of mariadbd daemon or
|
||||
# mariadbd-safe script
|
||||
# 2) configurable values are defined in @sysconfdir@/my.cnf
|
||||
# 3) default values for helper scripts are specified bellow
|
||||
# So, in case values are defined in my.cnf, we need to get that value.
|
||||
# In case they are not defined in my.cnf, we need to get the same value
|
||||
# in the daemon, as in the helper scripts. Thus, default values here
|
||||
# must correspond with values defined in mysqld_safe script and source
|
||||
# must correspond with values defined in mariadbd-safe script and source
|
||||
# code itself.
|
||||
|
||||
server_sections="mysqld_safe mysqld server mysqld-@MAJOR_VERSION@.@MINOR_VERSION@ mariadb mariadb-@MAJOR_VERSION@.@MINOR_VERSION@ client-server"
|
||||
server_sections="mysqld_safe mysqld server mysqld-@MAJOR_VERSION@.@MINOR_VERSION@ mariadb mariadb-@MAJOR_VERSION@.@MINOR_VERSION@ mariadbd mariadbd-@MAJOR_VERSION@.@MINOR_VERSION@ client-server galera"
|
||||
|
||||
get_mysql_option "$server_sections" datadir "@MYSQL_DATADIR@"
|
||||
datadir="$result"
|
||||
@ -1,22 +1,22 @@
|
||||
We have some downstream patches and other scripts that include variables to
|
||||
be expanded by cmake. Cmake needs to know about them, so adding them manually.
|
||||
|
||||
--- mariadb-10.3.8/scripts/CMakeLists.txt 2018-07-02 09:34:11.000000000 +0200
|
||||
+++ mariadb-10.3.8/scripts/CMakeLists.txt_patched 2018-07-03 10:58:15.954670153 +0200
|
||||
@@ -361,6 +361,34 @@ ELSE()
|
||||
COMPONENT ${${file}_COMPONENT}
|
||||
)
|
||||
--- mariadb-10.5.5/scripts/CMakeLists.txt.old 2020-09-24 10:13:35.272589689 +0200
|
||||
+++ mariadb-10.5.5/scripts/CMakeLists.txt 2020-09-24 10:17:31.428985798 +0200
|
||||
@@ -377,6 +377,34 @@
|
||||
INSTALL_LINK(${file} ${binname} ${INSTALL_BINDIR} ${${file}_COMPONENT}Symlinks)
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
+
|
||||
+ # files for systemd
|
||||
+ SET(SYSTEMD_SCRIPTS
|
||||
+ mysql.tmpfiles.d
|
||||
+ mariadb.tmpfiles.d
|
||||
+ mysql.service
|
||||
+ mysql@.service
|
||||
+ mysql-prepare-db-dir
|
||||
+ mysql-check-socket
|
||||
+ mysql-check-upgrade
|
||||
+ mysql-scripts-common
|
||||
+ mariadb-prepare-db-dir
|
||||
+ mariadb-check-socket
|
||||
+ mariadb-check-upgrade
|
||||
+ mariadb-scripts-common
|
||||
+ mysql_config_multilib
|
||||
+ clustercheck
|
||||
+ galera_new_cluster
|
||||
|
||||
15
SOURCES/mariadb-server-galera.cil
Normal file
15
SOURCES/mariadb-server-galera.cil
Normal file
@ -0,0 +1,15 @@
|
||||
(optional mariadb-server-galera-1_0
|
||||
(typeattributeset cil_gen_require mysqld_t)
|
||||
(typeattributeset cil_gen_require rsync_exec_t)
|
||||
(typeattributeset cil_gen_require anon_inodefs_t)
|
||||
(typeattributeset cil_gen_require proc_net_t)
|
||||
(typeattributeset cil_gen_require kerberos_port_t)
|
||||
; allow mysqld to run rsyncd
|
||||
(allow mysqld_t self (process (setpgid)))
|
||||
(allow mysqld_t rsync_exec_t (file (read execute execute_no_trans getattr open)))
|
||||
(allow mysqld_t anon_inodefs_t (file (getattr)))
|
||||
(allow mysqld_t proc_net_t (file (read open)))
|
||||
|
||||
; allow rsyncd to listen on port 4444
|
||||
(allow mysqld_t kerberos_port_t (tcp_socket (name_bind name_connect)))
|
||||
)
|
||||
@ -1,23 +0,0 @@
|
||||
|
||||
module mariadb-server-galera 1.0;
|
||||
|
||||
require {
|
||||
type mysqld_t;
|
||||
type rsync_exec_t;
|
||||
type anon_inodefs_t;
|
||||
type proc_net_t;
|
||||
type kerberos_port_t;
|
||||
class file { read execute execute_no_trans getattr open };
|
||||
class tcp_socket { name_bind name_connect };
|
||||
class process { setpgid siginh rlimitinh noatsecure };
|
||||
}
|
||||
|
||||
# allow mysqld to run rsyncd
|
||||
allow mysqld_t self:process setpgid;
|
||||
allow mysqld_t rsync_exec_t:file { read execute execute_no_trans getattr open };
|
||||
allow mysqld_t anon_inodefs_t:file getattr;
|
||||
allow mysqld_t proc_net_t:file { read open };
|
||||
|
||||
# allow rsyncd to listen on port 4444
|
||||
allow mysqld_t kerberos_port_t:tcp_socket { name_bind name_connect };
|
||||
|
||||
8
SOURCES/mariadb.tmpfiles.d.in
Normal file
8
SOURCES/mariadb.tmpfiles.d.in
Normal file
@ -0,0 +1,8 @@
|
||||
# Do not edit this file.
|
||||
# To override this, put /etc/tmpfiles.d/mariadb.conf instead.
|
||||
d @PID_FILE_DIR@ 0755 mysql mysql -
|
||||
|
||||
# Rules for ephemeral file systems (ImageMode)
|
||||
d /var/lib/mysql 0755 mysql mysql -
|
||||
d /var/log/mariadb 0750 mysql mysql -
|
||||
f /var/log/mariadb/mariadb.log 0660 mysql mysql -
|
||||
@ -1,32 +1,24 @@
|
||||
# It's not recommended to modify this file in-place, because it will be
|
||||
# overwritten during package upgrades. If you want to customize, the
|
||||
# best way is to create a file "/etc/systemd/system/@DAEMON_NAME@.service",
|
||||
# containing
|
||||
# .include /usr/lib/systemd/system/@DAEMON_NAME@.service
|
||||
# ...make your changes here...
|
||||
# or create a file "/etc/systemd/system/@DAEMON_NAME@.service.d/foo.conf",
|
||||
# which doesn't need to include ".include" call and which will be parsed
|
||||
# after the file @DAEMON_NAME@.service itself is parsed.
|
||||
# best way is to:
|
||||
#
|
||||
# root> systemctl edit @DAEMON_NAME@.service
|
||||
#
|
||||
# Then add additonal directives under a section (probably [Service]).
|
||||
#
|
||||
# For more info about custom unit files, see systemd.unit(5) or
|
||||
# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F
|
||||
|
||||
# For example, if you want to increase mysql's open-files-limit to 10000,
|
||||
# you need to increase systemd's LimitNOFILE setting, so create a file named
|
||||
# "/etc/systemd/system/@DAEMON_NAME@.service.d/limits.conf" containing:
|
||||
#
|
||||
# For example, if you want to increase MariaDB's open-files-limit to 10000,
|
||||
# you need to increase systemd's LimitNOFILE setting, use the contents below:
|
||||
#
|
||||
# [Service]
|
||||
# LimitNOFILE=10000
|
||||
|
||||
# Note: /usr/lib/... is recommended in the .include line though /lib/...
|
||||
# still works.
|
||||
# Don't forget to reload systemd daemon after you change unit configuration:
|
||||
# root> systemctl --system daemon-reload
|
||||
|
||||
# Use [mysqld.INSTANCENAME] as sections in my.cnf to configure this instance.
|
||||
#
|
||||
|
||||
[Unit]
|
||||
Description=@NICE_PROJECT_NAME@ @MAJOR_VERSION@.@MINOR_VERSION@ database server
|
||||
Documentation=man:mysqld(8)
|
||||
Documentation=man:mariadbd(8)
|
||||
Documentation=https://mariadb.com/kb/en/library/systemd/
|
||||
After=network.target
|
||||
|
||||
@ -40,20 +32,38 @@ Type=notify
|
||||
User=mysql
|
||||
Group=mysql
|
||||
|
||||
ExecStartPre=@libexecdir@/mysql-check-socket
|
||||
# Use an environment file to pass variable _WSREP_NEW_CLUSTER
|
||||
EnvironmentFile=-@INSTALL_RUNDATADIR@/wsrep-new-cluster
|
||||
# Use an environment file to pass variable _WSREP_START_POSITION
|
||||
EnvironmentFile=-@INSTALL_RUNDATADIR@/wsrep-start-position
|
||||
|
||||
ExecStartPre=@libexecdir@/mariadb-check-socket
|
||||
# '%n' expands to 'Full unit name'; man systemd.unit
|
||||
ExecStartPre=@libexecdir@/mysql-prepare-db-dir %n
|
||||
ExecStartPre=@libexecdir@/mariadb-prepare-db-dir %n
|
||||
|
||||
# Perform automatic wsrep recovery. When server is started without wsrep,
|
||||
# galera_recovery simply returns an empty string. In any case, however,
|
||||
# the script is not expected to return with a non-zero status.
|
||||
# It is always safe to remove @INSTALL_RUNDATADIR@/wsrep-start-position
|
||||
# environment file.
|
||||
# Do not panic if galera_recovery script is not available. (MDEV-10538)
|
||||
ExecStartPre=/bin/sh -c "[ ! -e @bindir@/galera_recovery ] && VAR= || \
|
||||
VAR=`@bindir@/galera_recovery`; [ $? -eq 0 ] \
|
||||
&& echo _WSREP_START_POSITION=$VAR > @INSTALL_RUNDATADIR@/wsrep-start-position || exit 1"
|
||||
|
||||
# MYSQLD_OPTS here is for users to set in /etc/systemd/system/@DAEMON_NAME@@.service.d/MY_SPECIAL.conf
|
||||
# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
|
||||
# per bug #547485
|
||||
ExecStart=@libexecdir@/mysqld --basedir=@prefix@ $MYSQLD_OPTS $_WSREP_NEW_CLUSTER
|
||||
ExecStartPost=@libexecdir@/mysql-check-upgrade
|
||||
ExecStart=@libexecdir@/mariadbd --basedir=@prefix@ $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION
|
||||
ExecStartPost=@libexecdir@/mariadb-check-upgrade
|
||||
|
||||
# Unset _WSREP_START_POSITION environment variable.
|
||||
ExecStartPost=/bin/rm -f @INSTALL_RUNDATADIR@/wsrep-start-position
|
||||
|
||||
# Setting this to true can break replication and the Type=notify settings
|
||||
# See also bind-address mysqld option.
|
||||
# See also bind-address MariaDB option.
|
||||
PrivateNetwork=false
|
||||
|
||||
KillMode=process
|
||||
KillSignal=SIGTERM
|
||||
|
||||
# Don't want to see an automated SIGKILL ever
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
# Do not edit this file.
|
||||
# To override this, put /etc/tmpfiles.d/mariadb.conf instead.
|
||||
d @PID_FILE_DIR@ 0755 mysql mysql -
|
||||
@ -1,39 +1,46 @@
|
||||
# Multi instance version of mariadb. For if you run mutiple verions at once.
|
||||
# Multi instance version of MariaDB. For if you run mutiple verions at once.
|
||||
# Also used for @DAEMON_NAME@@bootstrap to bootstrap Galera.
|
||||
#
|
||||
# To use multi instance variant, use [mysqld.INSTANCENAME] as sections in my.cnf
|
||||
# To use multi instance variant, use [mariadbd.INSTANCENAME] as sections in
|
||||
# @sysconfdir@/@my.cnf to change per instance settings. A minimumal necessary
|
||||
# configuration items to change to avoid conflicts between instances is:
|
||||
#
|
||||
# [mariadbd.instancename]
|
||||
# # TCP port to make available for clients
|
||||
# port=3306
|
||||
# # Socket to make available for clients
|
||||
# socket=/tmp/mariadb-instancename.sock
|
||||
# # Where MariaDB should store all its data
|
||||
# datadir=/usr/local/mariadb-instancename/data
|
||||
#
|
||||
# and start the service via:
|
||||
# systemctl start @DAEMON_NAME@@{instancename}.server
|
||||
#
|
||||
# root> systemctl start @DAEMON_NAME@@{instancename}.server
|
||||
#
|
||||
# It's not recommended to modify this file in-place, because it will be
|
||||
# overwritten during package upgrades. If you want to customize, the
|
||||
# best way is to create a file "/etc/systemd/system/@DAEMON_NAME@.service",
|
||||
# containing
|
||||
# .include /usr/lib/systemd/system/@DAEMON_NAME@.service
|
||||
# ...make your changes here...
|
||||
# or create a file "/etc/systemd/system/@DAEMON_NAME@.service.d/foo.conf",
|
||||
# which doesn't need to include ".include" call and which will be parsed
|
||||
# after the file @DAEMON_NAME@.service itself is parsed.
|
||||
# overwritten during package upgrades. If you want to customize, for
|
||||
# all instances, the best way is:
|
||||
#
|
||||
# root> systemctl edit @DAEMON_NAME@@.service
|
||||
#
|
||||
# Then add additonal directives under a section (probably [Service]).
|
||||
#
|
||||
# If you only want to change a specific instance:
|
||||
#
|
||||
# root> systemctl edit @DAEMON_NAME@@{instancename}.server
|
||||
#
|
||||
# For more info about custom unit files, see systemd.unit(5) or
|
||||
# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F
|
||||
|
||||
# For example, if you want to increase mysql's open-files-limit to 10000,
|
||||
# you need to increase systemd's LimitNOFILE setting, so create a file named
|
||||
# "/etc/systemd/system/@DAEMON_NAME@.service.d/limits.conf" containing:
|
||||
#
|
||||
# For example, if you want to increase MariaDB's open-files-limit to 10000,
|
||||
# you need to increase systemd's LimitNOFILE setting, use the contents below:
|
||||
#
|
||||
# [Service]
|
||||
# LimitNOFILE=10000
|
||||
|
||||
# Note: /usr/lib/... is recommended in the .include line though /lib/...
|
||||
# still works.
|
||||
# Don't forget to reload systemd daemon after you change unit configuration:
|
||||
# root> systemctl --system daemon-reload
|
||||
|
||||
# Use [mysqld.INSTANCENAME] as sections in my.cnf to configure this instance.
|
||||
|
||||
[Unit]
|
||||
Description=@NICE_PROJECT_NAME@ @MAJOR_VERSION@.@MINOR_VERSION@ database server
|
||||
Documentation=man:mysqld(8)
|
||||
Documentation=man:mariadbd(8)
|
||||
Documentation=https://mariadb.com/kb/en/library/systemd/
|
||||
After=network.target
|
||||
|
||||
@ -47,19 +54,37 @@ Type=notify
|
||||
User=mysql
|
||||
Group=mysql
|
||||
|
||||
ExecStartPre=@libexecdir@/mysql-check-socket --defaults-group-suffix=.%I
|
||||
ExecStartPre=@libexecdir@/mysql-prepare-db-dir --defaults-group-suffix=.%I %n
|
||||
# Use an environment file to pass variable _WSREP_NEW_CLUSTER
|
||||
EnvironmentFile=-@INSTALL_RUNDATADIR@/wsrep-new-cluster
|
||||
# Use an environment file to pass variable _WSREP_START_POSITION
|
||||
EnvironmentFile=-@INSTALL_RUNDATADIR@/wsrep-start-position
|
||||
|
||||
ExecStartPre=@libexecdir@/mariadb-check-socket --defaults-group-suffix=.%I
|
||||
ExecStartPre=@libexecdir@/mariadb-prepare-db-dir --defaults-group-suffix=.%I %n
|
||||
|
||||
# Perform automatic wsrep recovery. When server is started without wsrep,
|
||||
# galera_recovery simply returns an empty string. In any case, however,
|
||||
# the script is not expected to return with a non-zero status.
|
||||
# It is always safe to remove @INSTALL_RUNDATADIR@/wsrep-start-position
|
||||
# environment file.
|
||||
# Do not panic if galera_recovery script is not available. (MDEV-10538)
|
||||
ExecStartPre=/bin/sh -c "[ ! -e @bindir@/galera_recovery ] && VAR= || \
|
||||
VAR=`@bindir@/galera_recovery`; [ $? -eq 0 ] \
|
||||
&& echo _WSREP_START_POSITION=$VAR > @INSTALL_RUNDATADIR@/wsrep-start-position || exit 1"
|
||||
|
||||
# MYSQLD_OPTS here is for users to set in /etc/systemd/system/@DAEMON_NAME@@.service.d/MY_SPECIAL.conf
|
||||
# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
|
||||
# per bug #547485
|
||||
ExecStart=@libexecdir@/mysqld --defaults-group-suffix=.%I --basedir=@prefix@ $MYSQLD_OPTS $_WSREP_NEW_CLUSTER
|
||||
ExecStartPost=@libexecdir@/mysql-check-upgrade --defaults-group-suffix=.%I
|
||||
ExecStart=@libexecdir@/mariadbd --defaults-group-suffix=.%I --basedir=@prefix@ $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION
|
||||
ExecStartPost=@libexecdir@/mariadb-check-upgrade --defaults-group-suffix=.%I
|
||||
|
||||
# Unset _WSREP_START_POSITION environment variable.
|
||||
ExecStartPost=/bin/rm -f @INSTALL_RUNDATADIR@/wsrep-start-position
|
||||
|
||||
# Setting this to true can break replication and the Type=notify settings
|
||||
# See also bind-address mysqld option.
|
||||
# See also bind-address MariaDB option.
|
||||
PrivateNetwork=false
|
||||
|
||||
KillMode=process
|
||||
KillSignal=SIGTERM
|
||||
|
||||
# Don't want to see an automated SIGKILL ever
|
||||
|
||||
14
SOURCES/pcre_bundling.patch
Normal file
14
SOURCES/pcre_bundling.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff -Naur mariadb-11.8.3/cmake/pcre.cmake mariadb-11.8.3_patched/cmake/pcre.cmake
|
||||
--- mariadb-11.8.3/cmake/pcre.cmake 2025-07-28 21:35:02.000000000 +0200
|
||||
+++ mariadb-11.8.3_patched/cmake/pcre.cmake 2025-11-26 13:38:36.262560264 +0100
|
||||
@@ -64,8 +64,8 @@
|
||||
ExternalProject_Add(
|
||||
pcre2
|
||||
PREFIX "${dir}"
|
||||
- URL "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.45/pcre2-10.45.zip"
|
||||
- URL_MD5 873da56c6469ec207ca5c5ae9688b83a
|
||||
+ URL "file:///${dir}/pcre2-10.46.zip"
|
||||
+ URL_MD5 261f3f9e14b6ce175103c5118a189faa
|
||||
INSTALL_COMMAND ""
|
||||
CMAKE_ARGS
|
||||
"-DCMAKE_WARN_DEPRECATED=FALSE"
|
||||
@ -1,3 +1,2 @@
|
||||
# Fails on aarch64
|
||||
innodb.innodb_buffer_pool_resize :
|
||||
innodb.innodb_buffer_pool_resize_with_chunks :
|
||||
# Fails since 10.11.13
|
||||
main.mysql_client_test_nonblock : #2373007
|
||||
|
||||
@ -1,30 +1,114 @@
|
||||
# Fails everywhere
|
||||
innodb.innodb_defrag_binlog :
|
||||
# The SSL test are failing correctly. Fro more explanation, see:
|
||||
# https://jira.mariadb.org/browse/MDEV-8404?focusedCommentId=84275&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-84275
|
||||
main.ssl_7937 : #1399847
|
||||
main.ssl_8k_key :
|
||||
main.ssl_crl : #1399847
|
||||
|
||||
main.ssl_7937 :
|
||||
main.ssl_8k_key :
|
||||
main.ssl_crl :
|
||||
main.ssl_system_ca :
|
||||
main.userstat :
|
||||
# ------------------------------
|
||||
# Tests that fails because of 'Self Signed Certificate in the Certificate Chain'
|
||||
perfschema.cnf_option :
|
||||
|
||||
perfschema.cnf_option :
|
||||
perfschema.nesting :
|
||||
rpl.rpl_row_img_blobs :
|
||||
rpl.rpl_row_img_eng_min :
|
||||
rpl.rpl_row_img_eng_noblob :
|
||||
|
||||
sys_vars.slave_parallel_threads_basic :
|
||||
|
||||
# ------------------------------
|
||||
# Expected to fail, the plugin is not build with server, but 'mariadb-connector-c' instead
|
||||
plugins.auth_ed25519 :
|
||||
plugins.multiauth :
|
||||
|
||||
# ------------------------------
|
||||
perfschema.nesting : #1399847
|
||||
perfschema.socket_summary_by_instance_func : #1399847
|
||||
perfschema.socket_summary_by_event_name_func :
|
||||
perfschema.socket_summary_by_instance_func :
|
||||
|
||||
plugins.feedback_plugin_load :
|
||||
# ------------------------------
|
||||
# Fails since 10.1.12
|
||||
innodb.innodb_defrag_binlog :
|
||||
|
||||
rpl.rpl_row_img_blobs :
|
||||
rpl.rpl_row_img_eng_min :
|
||||
rpl.rpl_row_img_eng_noblob :
|
||||
# Fails everywhere since 10.4.11
|
||||
sys_vars.tcp_nodelay :
|
||||
|
||||
sys_vars.slave_parallel_threads_basic :
|
||||
# Fails since 10.5.3
|
||||
main.mysqld--help-aria :
|
||||
|
||||
# Fails only on i686
|
||||
main.myisampack :
|
||||
# Fails since 10.5.4
|
||||
main.ssl_system_ca :
|
||||
|
||||
# We don't build the plugin in server; we build it in mariadb-connector-c instead
|
||||
plugins.auth_ed25519 :
|
||||
# Fails on all architectures since 10.5.13
|
||||
oqgraph.regression_mdev6345 :
|
||||
type_test.type_test_double :
|
||||
# Fails on i686 since 10.5.13
|
||||
oqgraph.general-innodb :
|
||||
oqgraph.general-Aria :
|
||||
oqgraph.general-MyISAM :
|
||||
oqgraph.legacy_upgrade :
|
||||
oqgraph.regression_1133093 :
|
||||
oqgraph.regression_1196036 :
|
||||
oqgraph.regression_1213120 :
|
||||
|
||||
# Fails when builder uses a different trimezone than expected
|
||||
main.timezone :
|
||||
# Fails on all architectures since 10.5.18
|
||||
main.loadxml :
|
||||
main.lock_kill :
|
||||
|
||||
# Fails since 10.5.20
|
||||
bg.spider_fixes :
|
||||
bugfix.mdev_29904 : "[Warning] mariadbd: Can't get hardware address with error 0"
|
||||
rpl.rpl_err_ignoredtable :
|
||||
|
||||
# Fails on 10.11.6
|
||||
main.plugin_auth :
|
||||
main.userstat :
|
||||
main.information_schema :
|
||||
|
||||
binlog_encryption.rpl_gtid_basic :
|
||||
perfschema.threads_mysql :
|
||||
rpl.rpl_gtid_basic :
|
||||
rpl.rpl_semi_sync_wait_point :
|
||||
|
||||
# Fails since 10.11.7
|
||||
main.mdev375 :
|
||||
|
||||
perfschema.show_aggregate :
|
||||
|
||||
spider/bugfix.ddl_log :
|
||||
spider/bugfix.mdev_28218 :
|
||||
spider/bugfix.mdev_28218_mixed :
|
||||
spider/bugfix.mdev_30370 :
|
||||
spider/bugfix.mdev_32683 :
|
||||
spider/bugfix.plugin_load_add_all :
|
||||
spider/bugfix.plugin_load_add_spider :
|
||||
spider/bugfix.udf_mysql_func_early :
|
||||
spider/bugfix.udf_mysql_func_early_init_file :
|
||||
|
||||
# Fails since 10.11.8
|
||||
rpl.rpl_get_lock :
|
||||
|
||||
# Fails since 10.11.9
|
||||
plugins.feedback_plugin_load :
|
||||
# Unstable
|
||||
main.init_connect :
|
||||
|
||||
# Fails since 10.11.10
|
||||
main.connect :
|
||||
|
||||
# Fails since 10.11.11
|
||||
main.ssl_cipher :
|
||||
|
||||
# Fails since 11.8.1
|
||||
main.ssl_autoverify :
|
||||
main.tmp_space_usage : extended testsuite
|
||||
binlog.max_binlog_total_size :
|
||||
plugins.parsec :
|
||||
|
||||
# Fails since 11.8.3
|
||||
rpl.rpl_mixed_mixing_engines :
|
||||
rpl.rpl_non_direct_mixed_mixing_engines :
|
||||
|
||||
# Unstable since the previous commit (Fedora downstream: def9e708480f10fbac6869a5e0155d5a358f0f1b)
|
||||
mariabackup.slave_provision_nolock :
|
||||
|
||||
# Fails since 11.8.3
|
||||
main.myisampack :
|
||||
|
||||
@ -1,30 +1,23 @@
|
||||
# Fails on ppc64le
|
||||
parts.partition_alter1_1_innodb :
|
||||
parts.partition_alter1_2_innodb :
|
||||
parts.partition_alter1_1_2_innodb :
|
||||
parts.partition_alter1_2_1_innodb :
|
||||
parts.partition_alter2_1_1_innodb :
|
||||
parts.partition_alter1_2_2_innodb :
|
||||
parts.partition_alter2_1_2_innodb :
|
||||
parts.partition_alter2_2_1_innodb :
|
||||
parts.partition_alter2_2_2_innodb :
|
||||
parts.partition_alter4_innodb :
|
||||
parts.partition_basic_innodb :
|
||||
parts.part_supported_sql_func_innodb :
|
||||
# Fails since 10.5.20
|
||||
innodb.innodb_defrag_concurrent :
|
||||
parts.partition_alter4_innodb :
|
||||
rpl.rpl_parallel_optimistic_xa_lsu_off :
|
||||
|
||||
rpl.rpl_loaddata_m :
|
||||
# Fails on 10.11.6
|
||||
perfschema.threads_innodb :
|
||||
|
||||
#
|
||||
stress.ddl_innodb :
|
||||
|
||||
innodb.innodb_buffer_pool_resize :
|
||||
innodb.innodb_buffer_pool_resize_with_chunks :
|
||||
innodb.innodb_bulk_create_index :
|
||||
innodb.innodb_defrag_binlog :
|
||||
innodb.innodb_defrag_concurrent :
|
||||
innodb_gis.kill_server :
|
||||
gcol.innodb_virtual_basic :
|
||||
|
||||
# Unstable (randomly failing) tests
|
||||
innodb_gis.rtree_search :
|
||||
main.type_ranges :
|
||||
# Fails since 11.8.3
|
||||
encryption.innodb_encryption-page-compression :
|
||||
encryption.innochecksum :
|
||||
encryption.innodb-checksum-algorithm :
|
||||
encryption.innodb-discard-import :
|
||||
encryption.innodb-discard-import-change :
|
||||
encryption.instant_alter_import :
|
||||
encryption.innodb_import : BUG#0
|
||||
encryption.innodb-key-rotation-disable : BUG#0
|
||||
encryption.innodb-force-corrupt : BUG#0
|
||||
encryption.innodb-page_encryption_compression : BUG#0
|
||||
encryption.innodb-bad-key-change3 : BUG#0
|
||||
innodb.instant_alter_import : BUG#0
|
||||
innodb.table_flags : BUG#0
|
||||
innodb.101_compatibility : BUG#0
|
||||
|
||||
@ -1,15 +1,12 @@
|
||||
# Fails on s390x
|
||||
disks.disks :
|
||||
disks.disks_notembedded :
|
||||
# Fails since 10.5.2
|
||||
perfschema.memory_aggregate_32bit :
|
||||
period.overlaps :
|
||||
|
||||
# related to MDEV-20194
|
||||
# first check of `undefined` table causes warning,
|
||||
# instead INSERT and ALTER should cause it
|
||||
innodb.row_size_error_log_warnings_3 :
|
||||
# Fails on 10.11.6
|
||||
innodb_gis.rtree_rollback1 :
|
||||
mariabackup.encrypted_page_corruption :
|
||||
mariabackup.huge_lsn :
|
||||
mariabackup.xb_file_key_management :
|
||||
|
||||
# Fails since 2025
|
||||
archive.archive :
|
||||
compat/oracle.column_compression :
|
||||
main.func_compress :
|
||||
main.column_compression_rpl :
|
||||
main.column_compression :
|
||||
# Fails since 10.11.9
|
||||
main.having_cond_pushdown :
|
||||
|
||||
3024
SPECS/mariadb.spec
3024
SPECS/mariadb.spec
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user