From 7c7ed71daa1858d58d3b294844f334f08460704d Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Feb 20 2021 06:33:32 +0000 Subject: import mariadb-10.5.8-2.module+el8.4.0+10077+caf70fad --- diff --git a/SOURCES/README.mysql-cnf b/SOURCES/README.mysql-cnf deleted file mode 100644 index 3700c7f..0000000 --- a/SOURCES/README.mysql-cnf +++ /dev/null @@ -1,13 +0,0 @@ -This directory contains prepared configuration files with .cnf extension, -which provide a configuration for some common MariaDB deployment scenarios. -These configuration files do not include the default configuration of datadir, -log-file and pid-file locations, as specified in the default my.cnf file, -provided in this distribution. - -Thus, it is recommended to use these configuration files as an addition to the -default my.cnf configuration file. - -Since default my.cnf contains `!includedir @INSTALL_SYSCONF2DIR@` directive, it is -recommended to copy required configuration under @INSTALL_SYSCONF2DIR@ directory, -so the default my.cnf specifications will be extended. - diff --git a/SOURCES/mariadb-logrotate.patch b/SOURCES/mariadb-logrotate.patch index d4ed2b7..aa46e59 100644 --- a/SOURCES/mariadb-logrotate.patch +++ b/SOURCES/mariadb-logrotate.patch @@ -26,9 +26,15 @@ Update 6/2018 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 ---- mariadb-10.5.4/support-files/mysql-log-rotate.sh.old 2020-09-16 13:36:57.247955135 +0200 -+++ mariadb-10.5.4/support-files/mysql-log-rotate.sh 2020-09-16 13:40:59.744220908 +0200 -@@ -3,23 +3,10 @@ +Update 02/2021 +* Enhance the script as proposed in: + https://mariadb.com/kb/en/rotating-logs-on-unix-and-linux/ +* Discussion continues in: + https://jira.mariadb.org/browse/MDEV-16621 + +--- mariadb-10.5.8/support-files/mysql-log-rotate.sh 2021-02-12 08:37:47.857289694 +0100 ++++ mariadb-10.5.8/support-files/mysql-log-rotate.sh_pacthed 2021-02-12 08:40:26.420372325 +0100 +@@ -3,35 +3,22 @@ # in the [mysqld] section as follows: # # [mysqld] @@ -55,10 +61,12 @@ Update 6/2018 notifempty daily rotate 3 -@@ -27,11 +14,9 @@ + missingok compress ++ delaycompress ++ sharedscripts postrotate - # just if mariadbd is really running + # just if mariadbd is really running - if test -x @bindir@/mysqladmin && \ - @bindir@/mysqladmin ping &>/dev/null - then diff --git a/SOURCES/rh-skipped-tests-base.list b/SOURCES/rh-skipped-tests-base.list index a0bb6a8..40d5384 100644 --- a/SOURCES/rh-skipped-tests-base.list +++ b/SOURCES/rh-skipped-tests-base.list @@ -52,3 +52,9 @@ main.ssl_system_ca : # Fails since 10.5.7 innodb.innodb_wl6326_big : plugins.feedback_plugin_load : + +# Fails only on i686 +main.myisampack : + +# Fails everywhere in 10.5.8 +rpl.rpl_innodb_mixed_dml : diff --git a/SOURCES/rh-skipped-tests-ppc.list b/SOURCES/rh-skipped-tests-ppc.list index 403da66..ceff217 100644 --- a/SOURCES/rh-skipped-tests-ppc.list +++ b/SOURCES/rh-skipped-tests-ppc.list @@ -1,5 +1,2 @@ # Fails on ppc64le since 10.4.12 oqgraph.social : - -# Fails since 10.5.2 -rh-skipped-tests-ppc.list : diff --git a/SOURCES/upstream_5cc2096f93b7f130b36f8bc0fc43440db9a848e4.patch b/SOURCES/upstream_5cc2096f93b7f130b36f8bc0fc43440db9a848e4.patch new file mode 100644 index 0000000..f1c2f19 --- /dev/null +++ b/SOURCES/upstream_5cc2096f93b7f130b36f8bc0fc43440db9a848e4.patch @@ -0,0 +1,1128 @@ +From 5cc2096f93b7f130b36f8bc0fc43440db9a848e4 Mon Sep 17 00:00:00 2001 +From: Pali +Date: Fri, 7 Jun 2019 16:30:27 +0200 +Subject: [PATCH] Switch Perl DBI scripts from DBD::mysql to DBD::MariaDB + driver + +Perl DBD::MariaDB driver is available CPAN and is already used in +production environment. +--- + Docs/INSTALL-BINARY | 2 +- + man/mysql_convert_table_format.1 | 2 +- + man/mysql_setpermission.1 | 2 +- + ...dbd-mysql.inc => have_dbi_dbd-mariadb.inc} | 10 ++-- + mysql-test/include/mysqlhotcopy.inc | 4 +- + ...I_DBD-mysql.pl => checkDBI_DBD-MariaDB.pl} | 26 ++++---- + plugin/handler_socket/client/hspool_test.pl | 4 +- + plugin/handler_socket/client/hstest.pl | 4 +- + .../handler_socket/regtest/common/hstest.pm | 8 +-- + scripts/mysql_convert_table_format.sh | 4 +- + scripts/mysql_setpermission.sh | 2 +- + scripts/mysqlhotcopy.sh | 8 +-- + scripts/mytop.sh | 6 +- + sql-bench/server-cfg.sh | 4 +- + storage/maria/ma_ft_test1.h | 2 +- + tests/big_record.pl | 6 +- + tests/check_async_queries.pl | 2 +- + tests/consistent_snapshot.pl | 2 +- + tests/drop_test.pl | 12 ++-- + tests/fork_big.pl | 28 ++++----- + tests/fork_big2.pl | 32 +++++----- + tests/grant.pl | 4 +- + tests/index_corrupt.pl | 10 ++-- + tests/insert_and_repair.pl | 10 ++-- + tests/mail_to_db.pl | 6 +- + tests/pmail.pl | 2 +- + tests/rename_test.pl | 12 ++-- + tests/test_delayed_insert.pl | 22 +++---- + tests/truncate.pl | 6 +- + 35 files changed, 161 insertions(+), 166 deletions(-) + rename mysql-test/include/{have_dbi_dbd-mysql.inc => have_dbi_dbd-mariadb.inc} (91%) + rename mysql-test/std_data/{checkDBI_DBD-mysql.pl => checkDBI_DBD-MariaDB.pl} (80%) + +diff --git a/Docs/INSTALL-BINARY b/Docs/INSTALL-BINARY +index 2bd6daaea17c..64d5192a49dd 100644 +--- a/Docs/INSTALL-BINARY ++++ b/Docs/INSTALL-BINARY +@@ -154,7 +154,7 @@ shell> chown -R mysql data + script itself and at + https://mariadb.com/kb/en/starting-and-stopping-mariadb-automatically. + 10. You can set up new accounts using the bin/mysql_setpermission +- script if you install the DBI and DBD::mysql Perl modules. See ++ script if you install the DBI and DBD::MariaDB Perl modules. See + Section 4.6.14, "mysql_setpermission --- Interactively Set + Permissions in Grant Tables." For Perl module installation + instructions, see Section 2.15, "Perl Installation Notes." +diff --git a/man/mysql_convert_table_format.1 b/man/mysql_convert_table_format.1 +index 0c35c2954192..faa35afbe560 100644 +--- a/man/mysql_convert_table_format.1 ++++ b/man/mysql_convert_table_format.1 +@@ -26,7 +26,7 @@ by default)\&. + is written in Perl and requires that the + DBI + and +-DBD::mysql ++DBD::MariaDB + Perl modules be installed (see + Section\ \&2.15, \(lqPerl Installation Notes\(rq)\&. + .PP +diff --git a/man/mysql_setpermission.1 b/man/mysql_setpermission.1 +index f20f7ceff358..f2f5e3e039c8 100644 +--- a/man/mysql_setpermission.1 ++++ b/man/mysql_setpermission.1 +@@ -25,7 +25,7 @@ is a Perl script that was originally written and contributed by Luuk de Boer\&. + is written in Perl and requires that the + DBI + and +-DBD::mysql ++DBD::MariaDB + Perl modules be installed\&. + .PP + Invoke +diff --git a/mysql-test/include/have_dbi_dbd-mysql.inc b/mysql-test/include/have_dbi_dbd-mariadb.inc +similarity index 91% +rename from mysql-test/include/have_dbi_dbd-mysql.inc +rename to mysql-test/include/have_dbi_dbd-mariadb.inc +index 7c2113a8109b..1495d2891c8a 100644 +--- a/mysql-test/include/have_dbi_dbd-mysql.inc ++++ b/mysql-test/include/have_dbi_dbd-mariadb.inc +@@ -1,7 +1,7 @@ + # + # Originally created by John Embretsen, 2011-01-26. + # +-# Checks for the existence of Perl modules DBI and DBD::mysql as seen from the ++# Checks for the existence of Perl modules DBI and DBD::MariaDB as seen from the + # perl installation used by "external" executable perl scripts, i.e. scripts + # that are executed as standalone scripts interpreted by the perl installation + # specified by the "shebang" line in the top of these scripts. +@@ -30,7 +30,7 @@ + # We jump through some hoops since there is no direct way to check if an + # external command went OK or not from a mysql-test file: + # +-# - In theory, we could do as simple as "exec perl -MDBI -MDBD::mysql -e 1", ++# - In theory, we could do as simple as "exec perl -MDBI -MDBD::MariaDB -e 1", + # however we cannot check the result (exit code) from within a test script. + # Also, this may not yield the same result as other uses of perl due to the + # shebang issue mentioned above. +@@ -55,8 +55,8 @@ + # Instead, we call a separate helper script which checks for the modules in its + # own environment. We call it without "perl" in front. + +---let $perlChecker= $MYSQLTEST_VARDIR/std_data/checkDBI_DBD-mysql.pl +---let $resultFile= $MYSQL_TMP_DIR/dbidbd-mysql.txt ++--let $perlChecker= $MYSQLTEST_VARDIR/std_data/checkDBI_DBD-MariaDB.pl ++--let $resultFile= $MYSQL_TMP_DIR/dbiDBD-MariaDB.txt + + --exec perl $perlChecker + +@@ -64,7 +64,7 @@ + --source $resultFile + + if (!$dbidbd) { +- --skip Test needs Perl modules DBI and DBD::mysql ++ --skip Test needs Perl modules DBI and DBD::MariaDB + } + + # Clean up +diff --git a/mysql-test/include/mysqlhotcopy.inc b/mysql-test/include/mysqlhotcopy.inc +index 2fc14d599d94..306f0acc2084 100644 +--- a/mysql-test/include/mysqlhotcopy.inc ++++ b/mysql-test/include/mysqlhotcopy.inc +@@ -4,7 +4,7 @@ + + --source include/not_windows.inc + --source include/not_embedded.inc +---source include/have_dbi_dbd-mysql.inc ++--source include/have_dbi_dbd-mariadb.inc + + if (!$MYSQLHOTCOPY) + { +@@ -19,7 +19,7 @@ if (!$MYSQLHOTCOPY) + # executable, i.e. not necessarily using the perl interpreter in PATH, + # because that is how the documentation demonstrates it. + # +-# We include have_dbi_dbd-mysql.inc above so that the test will ++# We include have_dbi_dbd-mariadb.inc above so that the test will + # be skipped if Perl modules required by the mysqlhotcopy tool are not + # found when the script is run this way. + +diff --git a/mysql-test/std_data/checkDBI_DBD-mysql.pl b/mysql-test/std_data/checkDBI_DBD-MariaDB.pl +similarity index 80% +rename from mysql-test/std_data/checkDBI_DBD-mysql.pl +rename to mysql-test/std_data/checkDBI_DBD-MariaDB.pl +index 328a7ad774f3..ed0f5b415d7a 100755 +--- a/mysql-test/std_data/checkDBI_DBD-mysql.pl ++++ b/mysql-test/std_data/checkDBI_DBD-MariaDB.pl +@@ -20,7 +20,7 @@ + ################################################################################ + # + # This perl script checks for availability of the Perl modules DBI and +-# DBD::mysql using the "current" perl interpreter. ++# DBD::MariaDB using the "current" perl interpreter. + # + # Useful for test environment checking before testing executable perl scripts + # in the MySQL Server distribution. +@@ -30,8 +30,8 @@ + # support running perl scripts with such a shebang without specifying the + # perl interpreter on the command line. Such a script is mysqlhotcopy. + # +-# When run as "checkDBI_DBD-mysql.pl" the shebang line will be evaluated +-# and used. When run as "perl checkDBI_DBD-mysql.pl" the shebang line is ++# When run as "checkDBI_DBD-MariaDB.pl" the shebang line will be evaluated ++# and used. When run as "perl checkDBI_DBD-MariaDB.pl" the shebang line is + # not used. + # + # NOTE: This script will create a temporary file in MTR's tmp dir. +@@ -43,13 +43,13 @@ + # + # Example: + # +-# --let $perlChecker= $MYSQLTEST_VARDIR/std_data/checkDBI_DBD-mysql.pl +-# --let $resultFile= $MYSQL_TMP_DIR/dbidbd-mysql.txt ++# --let $perlChecker= $MYSQLTEST_VARDIR/std_data/checkDBI_DBD-MariaDB.pl ++# --let $resultFile= $MYSQL_TMP_DIR/dbiDBD-MariaDB.txt + # --chmod 0755 $perlChecker + # --exec $perlChecker + # --source $resultFile + # if (!$dbidbd) { +-# --skip Test needs Perl modules DBI and DBD::mysql ++# --skip Test needs Perl modules DBI and DBD::MariaDB + # } + # + # The calling script is also responsible for cleaning up after use: +@@ -59,7 +59,7 @@ + # Windows notes: + # - shebangs may work differently - call this script with "perl " in front. + # +-# See mysql-test/include/have_dbi_dbd-mysql.inc for example use of this script. ++# See mysql-test/include/have_dbi_dbd-mariadb.inc for example use of this script. + # This script should be executable for the user running MTR. + # + ################################################################################ +@@ -69,13 +69,13 @@ BEGIN + # We need to catch "Can't locate" as well as "Can't load" errors. + eval{ + $FOUND_DBI=0; +- $FOUND_DBD_MYSQL=0; ++ $FOUND_DBD_MARIADB=0; + + # Check for DBI module: + $FOUND_DBI=1 if require DBI; + +- # Check for DBD::mysql module +- $FOUND_DBD_MYSQL=1 if require DBD::mysql; ++ # Check for DBD::MariaDB module ++ $FOUND_DBD_MARIADB=1 if require DBD::MariaDB; + }; + }; + +@@ -83,11 +83,11 @@ BEGIN + # The file must be created whether we write to it or not, otherwise mysql-test + # will complain if trying to source it. + # An empty file indicates failure to load modules. +-open(FILE, ">", $ENV{'MYSQL_TMP_DIR'}.'/dbidbd-mysql.txt'); ++open(FILE, ">", $ENV{'MYSQL_TMP_DIR'}.'/dbiDBD-MariaDB.txt'); + +-if ($FOUND_DBI && $FOUND_DBD_MYSQL) { ++if ($FOUND_DBI && $FOUND_DBD_MARIADB) { + # write a mysql-test command setting a variable to indicate success +- print(FILE 'let $dbidbd= FOUND_DBI_DBD-MYSQL;'."\n"); ++ print(FILE 'let $dbidbd= FOUND_DBI_DBD-MARIADB;'."\n"); + } + + # close the file. +diff --git a/plugin/handler_socket/client/hspool_test.pl b/plugin/handler_socket/client/hspool_test.pl +index 7fe073301b18..091cb4967cb8 100755 +--- a/plugin/handler_socket/client/hspool_test.pl ++++ b/plugin/handler_socket/client/hspool_test.pl +@@ -31,8 +31,8 @@ + my $mysql_user = 'root'; + my $mysql_password = ''; + +-my $dsn = "DBI:mysql:database=;host=$host;port=$mysqlport" +- . ";mysql_server_prepare=$ssps"; ++my $dsn = "DBI:MariaDB:database=;host=$host;port=$mysqlport" ++ . ";mariadb_server_prepare=$ssps"; + my $dbh = DBI->connect($dsn, $mysql_user, $mysql_password, + { RaiseError => 1 }); + my $hsargs = { 'host' => $host, 'port' => $hsport_rd }; +diff --git a/plugin/handler_socket/client/hstest.pl b/plugin/handler_socket/client/hstest.pl +index 4d177b6cdc87..de39fcb6d6c5 100755 +--- a/plugin/handler_socket/client/hstest.pl ++++ b/plugin/handler_socket/client/hstest.pl +@@ -33,8 +33,8 @@ + my $keytype = get_conf("keytype", "varchar(32)"); + my $file = get_conf("file", undef); + +-my $dsn = "DBI:mysql:database=;host=$host;port=$mysqlport" +- . ";mysql_server_prepare=$ssps"; ++my $dsn = "DBI:MariaDB:database=;host=$host;port=$mysqlport" ++ . ";mariadb_server_prepare=$ssps"; + my $dbh = DBI->connect($dsn, $mysqluser, $mysqlpass, { RaiseError => 1 }); + my $hsargs = { 'host' => $host, 'port' => $hsport }; + my $cli = new Net::HandlerSocket($hsargs); +diff --git a/plugin/handler_socket/regtest/common/hstest.pm b/plugin/handler_socket/regtest/common/hstest.pm +index 348242b027f3..89f273c9786b 100644 +--- a/plugin/handler_socket/regtest/common/hstest.pm ++++ b/plugin/handler_socket/regtest/common/hstest.pm +@@ -29,10 +29,10 @@ sub get_dbi_connection { + = ($conf{dbname}, $conf{host}, $conf{myport}, $conf{ssps}, + $conf{user}, $conf{pass}); + my $mycnf = "binary_my.cnf"; +- my $dsn = "DBI:mysql:database=;host=$host;port=$myport" +- . ";mysql_server_prepare=$ssps" +- . ";mysql_read_default_group=perl" +- . ";mysql_read_default_file=../common/$mycnf"; ++ my $dsn = "DBI:MariaDB:database=;host=$host;port=$myport" ++ . ";mariadb_server_prepare=$ssps" ++ . ";mariadb_read_default_group=perl" ++ . ";mariadb_read_default_file=../common/$mycnf"; + my $dbh = DBI->connect($dsn, $user, $pass, { RaiseError => 1 }); + return $dbh; + } +diff --git a/scripts/mysql_convert_table_format.sh b/scripts/mysql_convert_table_format.sh +index 2001efae3929..6b4d758a5131 100644 +--- a/scripts/mysql_convert_table_format.sh ++++ b/scripts/mysql_convert_table_format.sh +@@ -57,10 +57,10 @@ if ($opt_port) + } + if (length($opt_socket)) + { +- $connect_opt.=";mysql_socket=$opt_socket"; ++ $connect_opt.=";mariadb_socket=$opt_socket"; + } + +-$dbh = DBI->connect("DBI:mysql:$opt_database:${opt_host}$connect_opt", ++$dbh = DBI->connect("DBI:MariaDB:$opt_database:${opt_host}$connect_opt", + $opt_user, + $opt_password, + { PrintError => 0}) +diff --git a/scripts/mysql_setpermission.sh b/scripts/mysql_setpermission.sh +index 71462d286229..66decbd69af7 100644 +--- a/scripts/mysql_setpermission.sh ++++ b/scripts/mysql_setpermission.sh +@@ -86,7 +86,7 @@ if ($opt_password eq '') + + + # make the connection to MariaDB +-$dbh= DBI->connect("DBI:mysql:mysql:host=$sqlhost:port=$opt_port:mysql_socket=$opt_socket",$opt_user,$opt_password, {PrintError => 0}) || ++$dbh= DBI->connect("DBI:MariaDB:mysql:host=$sqlhost:port=$opt_port:mariadb_socket=$opt_socket",$opt_user,$opt_password, {PrintError => 0}) || + die("Can't make a connection to the mysql server.\n The error: $DBI::errstr"); + + # the start of the program +diff --git a/scripts/mysqlhotcopy.sh b/scripts/mysqlhotcopy.sh +index c56cdea470c0..94e577a94a7f 100644 +--- a/scripts/mysqlhotcopy.sh ++++ b/scripts/mysqlhotcopy.sh +@@ -192,12 +192,12 @@ $opt{allowold} = 1 if $opt{keepold}; + my $dsn; + $dsn = ";host=" . (defined($opt{host}) ? $opt{host} : "localhost"); + $dsn .= ";port=$opt{port}" if $opt{port}; +-$dsn .= ";mysql_socket=$opt{socket}" if $opt{socket}; ++$dsn .= ";mariadb_socket=$opt{socket}" if $opt{socket}; + +-# use mysql_read_default_group=mysqlhotcopy so that [client] and ++# use mariadb_read_default_group=mysqlhotcopy so that [client] and + # [mysqlhotcopy] groups will be read from standard options files. + +-my $dbh = DBI->connect("dbi:mysql:$dsn;mysql_read_default_group=mysqlhotcopy", ++my $dbh = DBI->connect("DBI:MariaDB:$dsn;mariadb_read_default_group=mysqlhotcopy", + $opt{user}, $opt{password}, + { + RaiseError => 1, +@@ -796,7 +796,7 @@ sub record_log_pos { + + my $row_hash = get_row_hash( $dbh, "show slave status" ); + my ($master_host, $log_file, $log_pos ); +- if ( $dbh->{mysql_serverinfo} =~ /^3\.23/ ) { ++ if ( $dbh->{mariadb_serverinfo} =~ /^3\.23/ ) { + ($master_host, $log_file, $log_pos ) + = @{$row_hash}{ qw / Master_Host Log_File Pos / }; + } else { +diff --git a/scripts/mytop.sh b/scripts/mytop.sh +index 3ef0a59f27f7..1c4d7a502f51 100644 +--- a/scripts/mytop.sh ++++ b/scripts/mytop.sh +@@ -230,11 +230,11 @@ my $dsn; + + ## Socket takes precedence. + +-$dsn ="DBI:mysql:database=$config{db};mysql_read_default_group=mytop;"; ++$dsn ="DBI:MariaDB:database=$config{db};mariadb_read_default_group=mytop;"; + + if ($config{socket} and -S $config{socket}) + { +- $dsn .= "mysql_socket=$config{socket}"; ++ $dsn .= "mariadb_socket=$config{socket}"; + } + else + { +@@ -1877,7 +1877,7 @@ following: + + * Perl 5.005 or newer + * Getopt::Long +- * DBI and DBD::mysql ++ * DBI and DBD::MariaDB + * Term::ReadKey from CPAN + + Most systems are likely to have all of those installed--except for +diff --git a/sql-bench/server-cfg.sh b/sql-bench/server-cfg.sh +index 3991d16c6b18..6ef39c4d91f8 100644 +--- a/sql-bench/server-cfg.sh ++++ b/sql-bench/server-cfg.sh +@@ -116,8 +116,8 @@ sub new + bless $self; + + $self->{'cmp_name'} = "mysql"; +- $self->{'data_source'} = "DBI:mysql:database=$database;host=$host"; +- $self->{'data_source'} .= ";mysql_socket=$socket" if($socket); ++ $self->{'data_source'} = "DBI:MariaDB:database=$database;host=$host"; ++ $self->{'data_source'} .= ";mariadb_socket=$socket" if($socket); + $self->{'data_source'} .= ";$connect_options" if($connect_options); + $self->{'limits'} = \%limits; + $self->{'blob'} = "blob"; +diff --git a/storage/maria/ma_ft_test1.h b/storage/maria/ma_ft_test1.h +index 0f4997a71424..df86eeceb66c 100644 +--- a/storage/maria/ma_ft_test1.h ++++ b/storage/maria/ma_ft_test1.h +@@ -311,7 +311,7 @@ struct { const char *f0, *f2; } data[NDATAS] = { + {"18.4.49", "Problems linking with the C API"}, + {"18.4.50", "How to make a thread-safe client"}, + {"18.5", "MySQL Perl API's"}, +- {"18.5.1", "DBI with DBD::mysql"}, ++ {"18.5.1", "DBI with DBD::MariaDB"}, + {"18.5.1.1", "The DBI interface"}, + {"18.5.1.2", "More DBI/DBD information"}, + {"18.6", "MySQL Java connectivity (JDBC)"}, +diff --git a/tests/big_record.pl b/tests/big_record.pl +index cb1f89984682..b2aeee276586 100755 +--- a/tests/big_record.pl ++++ b/tests/big_record.pl +@@ -37,9 +37,9 @@ + print "Connection to database $test_db\n"; + + $extra_options=""; +-$extra_options.=":mysql_compression=1" if ($opt_compress); ++$extra_options.=":mariadb_compression=1" if ($opt_compress); + +-$dbh = DBI->connect("DBI:mysql:$opt_db:$host$extra_options",$opt_user,$opt_password) || die "Can't connect: $DBI::errstr\n"; ++$dbh = DBI->connect("DBI:MariaDB:$opt_db:$host$extra_options",$opt_user,$opt_password) || die "Can't connect: $DBI::errstr\n"; + + $dbh->do("drop table if exists $opt_table"); + +@@ -65,7 +65,7 @@ + + print "\nReading records\n"; + +-$sth=$dbh->prepare("select * from $opt_table", { "mysql_use_result" => 1}) or die $dbh->errstr; ++$sth=$dbh->prepare("select * from $opt_table", { "mariadb_use_result" => 1}) or die $dbh->errstr; + + $sth->execute() or die $sth->errstr; + +diff --git a/tests/check_async_queries.pl b/tests/check_async_queries.pl +index b599bc334d3c..0039dd90eb9c 100644 +--- a/tests/check_async_queries.pl ++++ b/tests/check_async_queries.pl +@@ -13,7 +13,7 @@ + die "Usage: $0 \n" + unless @ARGV == 4; + +-my $dbh= DBI->connect("DBI:mysql:database=$ARGV[3];host=$ARGV[0]", ++my $dbh= DBI->connect("DBI:MariaDB:database=$ARGV[3];host=$ARGV[0]", + $ARGV[1], $ARGV[2], + { RaiseError => 1, PrintError => 0 }); + +diff --git a/tests/consistent_snapshot.pl b/tests/consistent_snapshot.pl +index 9e53eaea6a1a..5c006b0092d5 100755 +--- a/tests/consistent_snapshot.pl ++++ b/tests/consistent_snapshot.pl +@@ -17,7 +17,7 @@ + my $stop_time= time() + $DURATION; + + sub my_connect { +- my $dbh= DBI->connect("dbi:mysql:mysql_socket=/tmp/mysql.sock;database=test", ++ my $dbh= DBI->connect("DBI:MariaDB:mariadb_socket=/tmp/mysql.sock;database=test", + "root", undef, { RaiseError=>1, PrintError=>0, AutoCommit=>0}); + $dbh->do("SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ"); + $dbh->do("SET SESSION autocommit = 0"); +diff --git a/tests/drop_test.pl b/tests/drop_test.pl +index 329f65eb65da..15a75f4908c6 100755 +--- a/tests/drop_test.pl ++++ b/tests/drop_test.pl +@@ -50,7 +50,7 @@ package main; + $start_time=new Benchmark; + if (!$opt_skip_create) + { +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + $dbh->do("drop table if exists $firsttable, ${firsttable}_1, ${firsttable}_2"); +@@ -81,7 +81,7 @@ package main; + + if (!$opt_skip_delete && !$errors) + { +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + $dbh->do("drop table $firsttable"); +@@ -103,7 +103,7 @@ sub test_insert + { + my ($dbh,$i); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + for ($i=0 ; $i < $opt_loop_count; $i++) +@@ -124,7 +124,7 @@ sub test_drop + my ($id) = @_; + my ($dbh,$i,$sth,$error_counter,$sleep_time); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + $error_counter=0; +@@ -169,7 +169,7 @@ sub test_select + { + my ($dbh,$i,$sth,@row,$error_counter,$sleep_time); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -206,7 +206,7 @@ sub test_flush + { + my ($dbh,$i,$sth,@row,$error_counter,$sleep_time); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +diff --git a/tests/fork_big.pl b/tests/fork_big.pl +index 623377ab5cdd..2f803b7fdd3c 100755 +--- a/tests/fork_big.pl ++++ b/tests/fork_big.pl +@@ -65,7 +65,7 @@ package main; + #### + + $start_time=new Benchmark; +-$dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++$dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + if (!$opt_skip_create) +@@ -155,7 +155,7 @@ package main; + if (!$opt_skip_delete && !$errors) + { + my $table_def; +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -189,7 +189,7 @@ sub test_insert + $from_table=0; $to_table=$numtables-1; + } + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -218,7 +218,7 @@ sub test_select + { + my ($dbh, $i, $j, $count, $loop, $count_query, $row_counts); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -255,7 +255,7 @@ sub test_select_count + { + my ($dbh, $i, $j, $count, $loop); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -285,7 +285,7 @@ sub test_join + { + my ($dbh, $i, $j, $count, $loop, $count_query, $row_counts); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -326,7 +326,7 @@ sub test_delete + + $table_count=2; + $count=0; +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -360,7 +360,7 @@ sub test_delete + sub test_update + { + my ($dbh, $i, $j, $row_counts, $count_query, $count, $loop); +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -403,7 +403,7 @@ sub test_update + sub test_check + { + my ($dbh, $sth, $row, $i, $j, $type, $table); +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -440,7 +440,7 @@ sub test_check + sub test_repair + { + my ($dbh, $sth, $row, $i, $type, $table); +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -474,7 +474,7 @@ sub test_flush + { + my ($dbh,$count,$tables); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -502,7 +502,7 @@ sub test_database + { + my ($database) = @_; + my ($dbh, $sth, $row, $i, $type, $tables); +- $dbh = DBI->connect("DBI:mysql:$database:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$database:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -535,7 +535,7 @@ sub test_database + sub test_alter + { + my ($dbh, $sth, $row, $i, $type, $table); +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -559,7 +559,7 @@ sub test_alter + sub signal_abort + { + my ($dbh); +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +diff --git a/tests/fork_big2.pl b/tests/fork_big2.pl +index c844d2908345..a2b465734dc5 100644 +--- a/tests/fork_big2.pl ++++ b/tests/fork_big2.pl +@@ -81,7 +81,7 @@ package main; + } + + $start_time=new Benchmark; +-$dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++$dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + if (!$opt_skip_create) +@@ -212,7 +212,7 @@ package main; + if (!$opt_skip_drop && !$errors) + { + my $table_def; +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -257,7 +257,7 @@ sub test_insert + $from_table=0; $to_table=$numtables-1; + } + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -286,7 +286,7 @@ sub test_select + { + my ($dbh, $i, $j, $count, $loop); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -323,7 +323,7 @@ sub test_select_count + { + my ($dbh, $i, $j, $count, $loop); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -353,7 +353,7 @@ sub test_join + { + my ($dbh, $i, $j, $count, $loop); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -391,7 +391,7 @@ sub test_join_count + { + my ($dbh, $i, $j, $count, $loop); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -446,7 +446,7 @@ sub test_delete + + $table_count=2; + $count=0; +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -480,7 +480,7 @@ sub test_delete + sub test_update + { + my ($dbh, $i, $j, $row_counts, $count_query, $count, $loop); +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -523,7 +523,7 @@ sub test_update + sub test_check + { + my ($dbh, $row, $i, $j, $type, $table); +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -560,7 +560,7 @@ sub test_check + sub test_repair + { + my ($dbh, $row, $i, $type, $table); +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -594,7 +594,7 @@ sub test_flush + { + my ($dbh,$count,$tables); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -621,7 +621,7 @@ sub test_resize + { + my ($dbh, $key_buffer_size); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -648,7 +648,7 @@ sub test_database + { + my ($database) = @_; + my ($dbh, $row, $i, $type, $tables); +- $dbh = DBI->connect("DBI:mysql:$database:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$database:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -681,7 +681,7 @@ sub test_database + sub test_alter + { + my ($dbh, $row, $i, $type, $table); +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -705,7 +705,7 @@ sub test_alter + sub signal_abort + { + my ($dbh); +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +diff --git a/tests/grant.pl b/tests/grant.pl +index cd6516433166..f8cdc1af4d55 100755 +--- a/tests/grant.pl ++++ b/tests/grant.pl +@@ -60,7 +60,7 @@ + # clear grant tables + # + +-$dbh = DBI->connect("DBI:mysql:mysql:$opt_host", ++$dbh = DBI->connect("DBI:MariaDB:mysql:$opt_host", + $opt_root_user,$opt_password, + { PrintError => 0}) || die "Can't connect to mysql server with user '$opt_root_user': $DBI::errstr\n"; + +@@ -653,7 +653,7 @@ sub user_connect + print "Connecting $opt_user\n" if ($opt_verbose); + $user_dbh->disconnect if (defined($user_dbh)); + +- $user_dbh=DBI->connect("DBI:mysql:$opt_database:$opt_host",$opt_user, ++ $user_dbh=DBI->connect("DBI:MariaDB:$opt_database:$opt_host",$opt_user, + $password, { PrintError => 0}); + if (!$user_dbh) + { +diff --git a/tests/index_corrupt.pl b/tests/index_corrupt.pl +index 6b04ce8a59c5..6f31b85bd614 100755 +--- a/tests/index_corrupt.pl ++++ b/tests/index_corrupt.pl +@@ -51,7 +51,7 @@ package main; + $start_time=new Benchmark; + if (!$opt_skip_create) + { +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + $dbh->do("drop table if exists $firsttable, $secondtable"); +@@ -111,7 +111,7 @@ package main; + + if (!$opt_skip_delete && !$errors) + { +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + $dbh->do("drop table $firsttable, $secondtable"); +@@ -134,7 +134,7 @@ sub insert_in_bench + { + my ($dbh,$rows,$found,$i); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + for ($rows= 1; $rows <= $opt_loop_count ; $rows++) +@@ -179,7 +179,7 @@ sub select_from_bench + { + my ($dbh,$rows,$cursor); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + for ($rows= 1; $rows < $opt_loop_count ; $rows++) +@@ -206,7 +206,7 @@ sub delete_from_bench + { + my ($dbh,$row, $t_value, $t2_value, $statement, $cursor); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +diff --git a/tests/insert_and_repair.pl b/tests/insert_and_repair.pl +index 18091c92718d..dfa490456cb8 100755 +--- a/tests/insert_and_repair.pl ++++ b/tests/insert_and_repair.pl +@@ -49,7 +49,7 @@ package main; + $start_time=new Benchmark; + if (!$opt_skip_create) + { +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + $dbh->do("drop table if exists $firsttable, $secondtable"); +@@ -79,7 +79,7 @@ package main; + + if (!$opt_skip_delete && !$errors) + { +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + $dbh->do("drop table $firsttable,$secondtable"); +@@ -100,7 +100,7 @@ sub insert_in_bench1 + { + my ($dbh,$rows,$found,$i); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + $rows=$found=0; +@@ -123,7 +123,7 @@ sub insert_in_bench2 + { + my ($dbh,$rows,$found,$i); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + $rows=$found=0; +@@ -149,7 +149,7 @@ sub repair_and_check + $table); + $found1=$found2=0; $last_found1=$last_found2= -1; + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +diff --git a/tests/mail_to_db.pl b/tests/mail_to_db.pl +index e50415d96f31..94f3955b2c32 100755 +--- a/tests/mail_to_db.pl ++++ b/tests/mail_to_db.pl +@@ -110,12 +110,12 @@ sub main + die "FATAL: Can't find inbox file: $ARGV[$i]\n" if (! -f $ARGV[$i]); + } + +- $connect_arg = "DBI:mysql:"; ++ $connect_arg = "DBI:MariaDB:"; + push @args, "database=$opt_db" if defined($opt_db); + push @args, "host=$opt_host" if defined($opt_host); + push @args, "port=$opt_port" if defined($opt_port); +- push @args, "mysql_socket=$opt_socket" if defined($opt_socket); +- push @args, "mysql_read_default_group=mail_to_db"; ++ push @args, "mariadb_socket=$opt_socket" if defined($opt_socket); ++ push @args, "mariadb_read_default_group=mail_to_db"; + $connect_arg .= join ';', @args; + $dbh = DBI->connect("$connect_arg", $opt_user, $opt_password, + { PrintError => 0}) +diff --git a/tests/pmail.pl b/tests/pmail.pl +index 359256c25b34..de469923c7d3 100755 +--- a/tests/pmail.pl ++++ b/tests/pmail.pl +@@ -60,7 +60,7 @@ + #### Connect and parsing the query to MySQL + #### + +-$dbh= DBI->connect("DBI:mysql:$opt_db:$opt_host:port=$opt_port:mysql_socket=$opt_socket", $opt_user,$opt_password, { PrintError => 0}) ++$dbh= DBI->connect("DBI:MariaDB:$opt_db:$opt_host:port=$opt_port:mariadb_socket=$opt_socket", $opt_user,$opt_password, { PrintError => 0}) + || die $DBI::errstr; + + main(); +diff --git a/tests/rename_test.pl b/tests/rename_test.pl +index d7097df1e4e3..ff1b73434e54 100755 +--- a/tests/rename_test.pl ++++ b/tests/rename_test.pl +@@ -48,7 +48,7 @@ package main; + $start_time=new Benchmark; + if (!$opt_skip_create) + { +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + $dbh->do("drop table if exists $firsttable, ${firsttable}_1, ${firsttable}_2"); +@@ -81,7 +81,7 @@ package main; + + if (!$opt_skip_delete && !$errors) + { +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + $dbh->do("drop table $firsttable"); +@@ -103,7 +103,7 @@ sub test_insert + { + my ($dbh,$i,$error); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + for ($i=0 ; $i < $opt_loop_count; $i++) +@@ -128,7 +128,7 @@ sub test_rename + my ($id) = @_; + my ($dbh,$i,$error_counter,$sleep_time); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + $error_counter=0; +@@ -158,7 +158,7 @@ sub test_select + { + my ($dbh,$i,$sth,@row,$sleep_time); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -192,7 +192,7 @@ sub test_flush + { + my ($dbh,$i,$sth,@row,$error_counter,$sleep_time); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +diff --git a/tests/test_delayed_insert.pl b/tests/test_delayed_insert.pl +index cb5b86a228d1..2ebb42e08d1c 100755 +--- a/tests/test_delayed_insert.pl ++++ b/tests/test_delayed_insert.pl +@@ -50,7 +50,7 @@ package main; + $start_time=new Benchmark; + if (!$opt_skip_create) + { +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host") || die $DBI::errstr; ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host") || die $DBI::errstr; + $Mysql::QUIET = 1; + $dbh->do("drop table if exists $firsttable,$secondtable"); + $Mysql::QUIET = 0; +@@ -87,7 +87,7 @@ package main; + + if (!$opt_skip_delete && !$errors) + { +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host") || die $DBI::errstr; ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host") || die $DBI::errstr; + $dbh->do("drop table $firsttable"); + $dbh->do("drop table $secondtable"); + } +@@ -107,7 +107,7 @@ sub test_1 + { + my ($dbh,$tmpvar,$rows,$found,$i); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host") || die $DBI::errstr; ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host") || die $DBI::errstr; + $tmpvar=1; + $rows=$found=0; + for ($i=0 ; $i < $opt_loop_count; $i++) +@@ -131,7 +131,7 @@ sub test_delayed_1 + { + my ($dbh,$tmpvar,$rows,$found,$i,$id); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host") || die $DBI::errstr; ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host") || die $DBI::errstr; + $tmpvar=1; + $rows=$found=0; + for ($i=0 ; $i < $opt_loop_count; $i++) +@@ -162,7 +162,7 @@ sub test_delayed_2 + { + my ($dbh,$tmpvar,$rows,$found,$i,$id); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host") || die $DBI::errstr; ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host") || die $DBI::errstr; + $tmpvar=1; + $rows=$found=0; + for ($i=0 ; $i < $opt_loop_count; $i++) +@@ -196,7 +196,7 @@ sub test_2 + { + my ($dbh,$id,$tmpvar,$rows,$found,$i,$max_id,$tmp,$sth,$count); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host") || die $DBI::errstr; ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host") || die $DBI::errstr; + $tmpvar=111111; + $rows=$found=$max_id=$id=0; + for ($i=0 ; $i < $opt_loop_count ; $i++) +@@ -245,7 +245,7 @@ sub test_2 + sub test_3 + { + my ($dbh,$id,$tmpvar,$rows,$i,$count); +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host") || die $DBI::errstr; ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host") || die $DBI::errstr; + $tmpvar=222222; + $rows=0; + for ($i=0 ; $i < $opt_loop_count ; $i++) +@@ -269,7 +269,7 @@ sub test_3 + sub test_4 + { + my ($dbh,$id,$tmpvar,$rows,$i,$count); +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host") || die $DBI::errstr; ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host") || die $DBI::errstr; + $tmpvar=333333; + $rows=0; + for ($i=0 ; $i < $opt_loop_count; $i++) +@@ -288,7 +288,7 @@ sub test_4 + sub test_5 + { + my ($dbh,$id,$tmpvar,$rows,$i,$max_id,$count,$sth); +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host") || die $DBI::errstr; ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host") || die $DBI::errstr; + $tmpvar=444444; + $rows=$max_id=0; + for ($i=0 ; $i < $opt_loop_count ; $i++) +@@ -328,7 +328,7 @@ sub test_5 + sub test_del + { + my ($dbh,$min_id,$i,$sth,$rows); +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host") || die $DBI::errstr; ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host") || die $DBI::errstr; + $rows=0; + for ($i=0 ; $i < $opt_loop_count/3; $i++) + { +@@ -357,7 +357,7 @@ sub test_flush + my ($dbh,$sth,$found1,$last_found1,$i,@row); + $found1=0; $last_found1=-1; + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +diff --git a/tests/truncate.pl b/tests/truncate.pl +index 98791a15b2c6..85a7888bc4af 100755 +--- a/tests/truncate.pl ++++ b/tests/truncate.pl +@@ -47,7 +47,7 @@ package main; + #### + + $start_time=new Benchmark; +-$dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++$dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + if (!$opt_skip_create) +@@ -100,7 +100,7 @@ package main; + if (!$opt_skip_delete && !$errors) + { + my $table_def; +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + +@@ -127,7 +127,7 @@ sub test_truncate + { + my ($dbh,$i,$j,$count,$table_def,$table); + +- $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host", ++ $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host", + $opt_user, $opt_password, + { PrintError => 0}) || die $DBI::errstr; + diff --git a/SPECS/mariadb.spec b/SPECS/mariadb.spec index ba91c9a..bd40bda 100644 --- a/SPECS/mariadb.spec +++ b/SPECS/mariadb.spec @@ -152,7 +152,7 @@ Name: mariadb Version: 10.5.8 -Release: 1%{?with_debug:.debug}%{?dist} +Release: 2%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -163,7 +163,6 @@ License: GPLv2 with exceptions and LGPLv2 and BSD Source0: https://downloads.mariadb.org/interstitial/mariadb-%{version}/source/mariadb-%{version}.tar.gz Source2: mysql_config_multilib.sh Source3: my.cnf.in -Source5: README.mysql-cnf Source6: README.mysql-docs Source7: README.mysql-license Source10: mysql.tmpfiles.d.in @@ -177,10 +176,25 @@ Source50: rh-skipped-tests-base.list Source51: rh-skipped-tests-arm.list Source52: rh-skipped-tests-s390.list Source53: rh-skipped-tests-ppc.list -# Proposed upstream: https://jira.mariadb.org/browse/MDEV-12442 -# General upstream response was slightly positive +# Red Hat OpenStack scripts: +# Clustercheck: +# Maintainer: +# Damien Ciabrini +# Source / Upstream: +# Damien; based on https://github.com/olafz/percona-clustercheck +# not updated in 5 years; low-effort maintenance +# Purpose: +# In Openstack, galera is accessed like an A/P database, we have a +# load balancer (haproxy) that drives traffic to a single node and +# performs failover when the galera node monitor fails. +# clustercheck.sh is the monitoring script that is being called remotely +# by haproxy. It is a glue between haproxy and the local galera node that +# can run SQL commands to check whether the local galera is connected to the galera cluster. +# Proposed to MariaDB upstream: https://jira.mariadb.org/browse/MDEV-12442 +# General upstream response was slightly positive Source70: clustercheck.sh Source71: LICENSE.clustercheck + # Upstream said: "Generally MariaDB has more allows to allow for xtradb sst mechanism". # https://jira.mariadb.org/browse/MDEV-12646 Source72: mariadb-server-galera.te @@ -202,6 +216,8 @@ Patch13: %{pkgnamepatch}-spider_on_armv7hl.patch Patch15: %{pkgnamepatch}-groonga.patch # Patch16: Workaround for "chown 0" with priviledges dropped to "mysql" user Patch16: %{pkgnamepatch}-auth_pam_tool_dir.patch +# Patch17: Revert of an upstream commit +Patch17: upstream_5cc2096f93b7f130b36f8bc0fc43440db9a848e4.patch BuildRequires: cmake gcc-c++ BuildRequires: multilib-rpm-config @@ -463,6 +479,10 @@ Conflicts: community-mysql-server # Bench subpackage has been deprecated in F32 Obsoletes: %{name}-bench <= %{sameevr} +%if %{without tokudb} +Obsoletes: %{name}-tokudb-engine <= %{sameevr} +%endif + %description server MariaDB is a multi-user, multi-threaded SQL database server. It is a client/server implementation consisting of a server daemon (mysqld) @@ -667,6 +687,7 @@ Summary: The test suite distributed with MariaDB Requires: %{name}%{?_isa} = %{sameevr} Requires: %{name}-common%{?_isa} = %{sameevr} Requires: %{name}-server%{?_isa} = %{sameevr} +Requires: patch Requires: perl(Env) Requires: perl(Exporter) Requires: perl(Fcntl) @@ -715,9 +736,7 @@ rm -r storage/rocksdb/ #%patch13 -p1 %patch15 -p1 %patch16 -p1 - -# workaround for upstream bug #56342 -#rm mysql-test/t/ssl_8k_key-master.opt +%patch17 -R -p1 # generate a list of tests that fail, but are not disabled by upstream cat %{SOURCE50} | tee -a mysql-test/unstable-tests @@ -871,16 +890,9 @@ export CFLAGS CXXFLAGS CPPFLAGS # Print all Cmake options values; "-LAH" means "List Advanced Help" -cmake -LAH - -#%cmake_build - -# to safe disk space, do not use ccache -export CCACHE_DISABLE=1 -# do not use %%{?_smp_mflags} to safe memory and avoid build failure due to not enough resources -make -j2 VERBOSE=1 - +cmake -B %{_vpath_builddir} -LAH +%cmake_build # build selinux policy %if %{with galera} @@ -891,8 +903,7 @@ make -f /usr/share/selinux/devel/Makefile %{name}-server-galera.pp %install -#%cmake_install -make DESTDIR=%{buildroot} install +%cmake_install # multilib header support #1625157 for header in mysql/server/my_config.h mysql/server/private/config.h; do @@ -906,7 +917,7 @@ ln -s mysql_config.1.gz %{buildroot}%{_mandir}/man1/mariadb_config.1.gz if [ %multilib_capable ] then mv %{buildroot}%{_bindir}/mysql_config %{buildroot}%{_bindir}/mysql_config-%{__isa_bits} -install -p -m 0755 scripts/mysql_config_multilib %{buildroot}%{_bindir}/mysql_config +install -p -m 0755 %{_vpath_builddir}/scripts/mysql_config_multilib %{buildroot}%{_bindir}/mysql_config # Copy manual page for multilib mysql_config; https://jira.mariadb.org/browse/MDEV-11961 ln -s mysql_config.1 %{buildroot}%{_mandir}/man1/mysql_config-%{__isa_bits}.1 fi @@ -918,8 +929,8 @@ rm %{buildroot}%{_libdir}/pkgconfig/libmariadb.pc # install INFO_SRC, INFO_BIN into libdir (upstream thinks these are doc files, # but that's pretty wacko --- see also %%{name}-file-contents.patch) -install -p -m 644 Docs/INFO_SRC %{buildroot}%{_libdir}/%{pkg_name}/ -install -p -m 644 Docs/INFO_BIN %{buildroot}%{_libdir}/%{pkg_name}/ +install -p -m 644 %{_vpath_builddir}/Docs/INFO_SRC %{buildroot}%{_libdir}/%{pkg_name}/ +install -p -m 644 %{_vpath_builddir}/Docs/INFO_BIN %{buildroot}%{_libdir}/%{pkg_name}/ rm -r %{buildroot}%{_datadir}/doc/%{_pkgdocdirname}/MariaDB-server-%{version}/ # Logfile creation @@ -934,9 +945,9 @@ mkdir -p %{buildroot}%{pidfiledir} install -p -m 0755 -d %{buildroot}%{dbdatadir} %if %{with config} -install -D -p -m 0644 scripts/my.cnf %{buildroot}%{_sysconfdir}/my.cnf +install -D -p -m 0644 %{_vpath_builddir}/scripts/my.cnf %{buildroot}%{_sysconfdir}/my.cnf %else -rm scripts/my.cnf +rm %{_vpath_builddir}/scripts/my.cnf %endif # use different config file name for each variant of server (mariadb / mysql) @@ -945,20 +956,20 @@ mv %{buildroot}%{_sysconfdir}/my.cnf.d/server.cnf %{buildroot}%{_sysconfdir}/my. # remove SysV init script and a symlink to that, we use systemd rm %{buildroot}%{_libexecdir}/rcmysql # install systemd unit files and scripts for handling server startup -install -D -p -m 644 scripts/mysql.service %{buildroot}%{_unitdir}/%{daemon_name}.service -install -D -p -m 644 scripts/mysql@.service %{buildroot}%{_unitdir}/%{daemon_name}@.service +install -D -p -m 644 %{_vpath_builddir}/scripts/mysql.service %{buildroot}%{_unitdir}/%{daemon_name}.service +install -D -p -m 644 %{_vpath_builddir}/scripts/mysql@.service %{buildroot}%{_unitdir}/%{daemon_name}@.service # Install downstream version of tmpfiles -install -D -p -m 0644 scripts/mysql.tmpfiles.d %{buildroot}%{_tmpfilesdir}/%{name}.conf +install -D -p -m 0644 %{_vpath_builddir}/scripts/mysql.tmpfiles.d %{buildroot}%{_tmpfilesdir}/%{name}.conf %if 0%{?mysqld_pid_dir:1} echo "d %{pidfiledir} 0755 mysql mysql -" >>%{buildroot}%{_tmpfilesdir}/%{name}.conf %endif # helper scripts for service starting -install -p -m 755 scripts/mysql-prepare-db-dir %{buildroot}%{_libexecdir}/mysql-prepare-db-dir -install -p -m 755 scripts/mysql-check-socket %{buildroot}%{_libexecdir}/mysql-check-socket -install -p -m 755 scripts/mysql-check-upgrade %{buildroot}%{_libexecdir}/mysql-check-upgrade -install -p -m 644 scripts/mysql-scripts-common %{buildroot}%{_libexecdir}/mysql-scripts-common +install -p -m 755 %{_vpath_builddir}/scripts/mysql-prepare-db-dir %{buildroot}%{_libexecdir}/mysql-prepare-db-dir +install -p -m 755 %{_vpath_builddir}/scripts/mysql-check-socket %{buildroot}%{_libexecdir}/mysql-check-socket +install -p -m 755 %{_vpath_builddir}/scripts/mysql-check-upgrade %{buildroot}%{_libexecdir}/mysql-check-upgrade +install -p -m 644 %{_vpath_builddir}/scripts/mysql-scripts-common %{buildroot}%{_libexecdir}/mysql-scripts-common # install aditional galera selinux policy %if %{with galera} @@ -1007,8 +1018,12 @@ mkdir -p %{buildroot}%{logrotateddir} mv %{buildroot}%{_datadir}/%{pkg_name}/mysql-log-rotate %{buildroot}%{logrotateddir}/%{daemon_name} chmod 644 %{buildroot}%{logrotateddir}/%{daemon_name} +# for compatibility with upstream RPMs, create mysqld symlink in sbin +mkdir -p %{buildroot}%{_sbindir} +ln -s %{_libexecdir}/mysqld %{buildroot}%{_sbindir}/mysqld +ln -s %{_libexecdir}/mariadbd %{buildroot}%{_sbindir}/mariadbd + # copy additional docs into build tree so %%doc will find them -install -p -m 0644 %{SOURCE5} %{basename:%{SOURCE5}} install -p -m 0644 %{SOURCE6} %{basename:%{SOURCE6}} install -p -m 0644 %{SOURCE7} %{basename:%{SOURCE7}} install -p -m 0644 %{SOURCE16} %{basename:%{SOURCE16}} @@ -1022,13 +1037,13 @@ rm %{buildroot}/usr/lib/systemd/system/{mysql,mysqld}.service # install galera config file %if %{with galera} -sed -i -r 's|^wsrep_provider=none|wsrep_provider=%{_libdir}/galera/libgalera_smm.so|' support-files/wsrep.cnf -install -p -m 0644 support-files/wsrep.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/galera.cnf +sed -i -r 's|^wsrep_provider=none|wsrep_provider=%{_libdir}/galera/libgalera_smm.so|' %{_vpath_builddir}/support-files/wsrep.cnf +install -p -m 0644 %{_vpath_builddir}/support-files/wsrep.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/galera.cnf %endif # install the clustercheck script mkdir -p %{buildroot}%{_sysconfdir}/sysconfig touch %{buildroot}%{_sysconfdir}/sysconfig/clustercheck -install -p -m 0755 scripts/clustercheck %{buildroot}%{_bindir}/clustercheck +install -p -m 0755 %{_vpath_builddir}/scripts/clustercheck %{buildroot}%{_bindir}/clustercheck # remove duplicate logrotate script rm %{buildroot}%{logrotateddir}/mysql @@ -1141,7 +1156,6 @@ rm %{buildroot}%{_bindir}/{mariadb-client-test-embedded,mariadb-test-embedded} rm %{buildroot}%{_mandir}/man1/{mysql_client_test_embedded,mysqltest_embedded}.1* rm %{buildroot}%{_mandir}/man1/{mariadb-client-test-embedded,mariadb-test-embedded}.1* %endif # embedded -rm %{buildroot}%{_bindir}/test-connect-t rm %{buildroot}%{_bindir}/{mysql_client_test,mysqltest} rm %{buildroot}%{_bindir}/{mariadb-client-test,mariadb-test} rm %{buildroot}%{_mandir}/man1/{mysql_client_test,mysqltest,my_safe_process}.1* @@ -1152,7 +1166,6 @@ rm %{buildroot}/suite/plugins/pam/pam_mariadb_mtr.so %endif %if %{without galera} -rm %{buildroot}%{_sysconfdir}/my.cnf.d/galera.cnf rm %{buildroot}%{_sysconfdir}/sysconfig/clustercheck rm %{buildroot}%{_bindir}/{clustercheck,galera_new_cluster} rm %{buildroot}%{_bindir}/galera_recovery @@ -1164,13 +1177,21 @@ rm %{buildroot}%{_mandir}/man1/{mysql_,mariadb-}ldb.1* rm %{buildroot}%{_mandir}/man1/myrocks_hotbackup.1* %endif +%if %{without backup} +rm %{buildroot}%{_mandir}/man1/maria{,db-}backup.1* +rm %{buildroot}%{_mandir}/man1/mbstream.1* +%endif + %check %if %{with test} %if %runselftest # hack to let 32- and 64-bit tests run concurrently on same build machine export MTR_PARALLEL=1 -# builds might happen at the same host, avoid collision -export MTR_BUILD_THREAD=%{__isa_bits} +# Builds might happen at the same host, avoid collision +# The port used is calculated as 20 * MTR_BUILD_THREAD + 10000 +# The resulting port must be between 5000 and 32767 +# This is the same as using option "--build-thread" for the "mysql-test-run.pl" +export MTR_BUILD_THREAD=$(( $(date +%s) % 1100 )) # The cmake build scripts don't provide any simple way to control the # options for mysql-test-run, so ignore the make target and just call it @@ -1219,6 +1240,9 @@ export MTR_BUILD_THREAD=%{__isa_bits} %endif # blank line fi + + # There might be a dangling symlink left from the testing, remove it to not be installed + rm -rf ./var ) # NOTE: the Spider SE has 2 more hidden testsuites "oracle" and "oracle2". @@ -1351,7 +1375,6 @@ fi %endif %files server -%doc README.mysql-cnf %{_bindir}/aria_{chk,dump_log,ftdump,pack,read_log} %{_bindir}/mariadb-service-convert @@ -1372,13 +1395,17 @@ fi %{_bindir}/replace %{_bindir}/resolve_stack_dump %{_bindir}/resolveip +%if %{with galera} # wsrep_sst_common should be moved to /usr/share/mariadb: https://jira.mariadb.org/browse/MDEV-14296 %{_bindir}/wsrep_* +%endif %config(noreplace) %{_sysconfdir}/my.cnf.d/%{pkg_name}-server.cnf %config(noreplace) %{_sysconfdir}/my.cnf.d/enable_encryption.preset %config(noreplace) %{_sysconfdir}/my.cnf.d/spider.cnf +%{_sbindir}/mysqld +%{_sbindir}/mariadbd %{_libexecdir}/{mysqld,mariadbd} %{_libdir}/%{pkg_name}/INFO_SRC @@ -1479,7 +1506,7 @@ fi %attr(0750,mysql,mysql) %dir %{logfiledir} # This does what it should. # RPMLint error "conffile-without-noreplace-flag /var/log/mariadb/mariadb.log" is false positive. -%attr(0640,mysql,mysql) %config %ghost %verify(not md5 size mtime) %{logfile} +%attr(0660,mysql,mysql) %config %ghost %verify(not md5 size mtime) %{logfile} %config(noreplace) %{logrotateddir}/%{daemon_name} %{_tmpfilesdir}/%{name}.conf @@ -1604,6 +1631,9 @@ fi %endif %changelog +* Tue Feb 16 2021 Michal Schorm - 10.5.8-2 +- Bump release after several commits cherry-picked from Fedora Rawhide + * Wed Nov 11 2020 Michal Schorm - 10.5.8-1 - Rebase to 10.5.8