Blame SOURCES/upstream_5cc2096f93b7f130b36f8bc0fc43440db9a848e4.patch

a41a5b
From 5cc2096f93b7f130b36f8bc0fc43440db9a848e4 Mon Sep 17 00:00:00 2001
a41a5b
From: Pali <pali@cpan.org>
a41a5b
Date: Fri, 7 Jun 2019 16:30:27 +0200
a41a5b
Subject: [PATCH] Switch Perl DBI scripts from DBD::mysql to DBD::MariaDB
a41a5b
 driver
a41a5b
a41a5b
Perl DBD::MariaDB driver is available CPAN and is already used in
a41a5b
production environment.
a41a5b
---
a41a5b
 Docs/INSTALL-BINARY                           |  2 +-
a41a5b
 man/mysql_convert_table_format.1              |  2 +-
a41a5b
 man/mysql_setpermission.1                     |  2 +-
a41a5b
 ...dbd-mysql.inc => have_dbi_dbd-mariadb.inc} | 10 ++--
a41a5b
 mysql-test/include/mysqlhotcopy.inc           |  4 +-
a41a5b
 ...I_DBD-mysql.pl => checkDBI_DBD-MariaDB.pl} | 26 ++++----
a41a5b
 plugin/handler_socket/client/hspool_test.pl   |  4 +-
a41a5b
 plugin/handler_socket/client/hstest.pl        |  4 +-
a41a5b
 .../handler_socket/regtest/common/hstest.pm   |  8 +--
a41a5b
 scripts/mysql_convert_table_format.sh         |  4 +-
a41a5b
 scripts/mysqlhotcopy.sh                       |  8 +--
a41a5b
 scripts/mytop.sh                              |  6 +-
a41a5b
 sql-bench/server-cfg.sh                       |  4 +-
a41a5b
 storage/maria/ma_ft_test1.h                   |  2 +-
a41a5b
 tests/big_record.pl                           |  6 +-
a41a5b
 tests/check_async_queries.pl                  |  2 +-
a41a5b
 tests/consistent_snapshot.pl                  |  2 +-
a41a5b
 tests/drop_test.pl                            | 12 ++--
a41a5b
 tests/fork_big.pl                             | 28 ++++-----
a41a5b
 tests/fork_big2.pl                            | 32 +++++-----
a41a5b
 tests/index_corrupt.pl                        | 10 ++--
a41a5b
 tests/insert_and_repair.pl                    | 10 ++--
a41a5b
 tests/mail_to_db.pl                           |  6 +-
a41a5b
 tests/pmail.pl                                |  2 +-
a41a5b
 tests/rename_test.pl                          | 12 ++--
a41a5b
 tests/test_delayed_insert.pl                  | 22 +++----
a41a5b
 tests/truncate.pl                             |  6 +-
a41a5b
 35 files changed, 161 insertions(+), 166 deletions(-)
a41a5b
 rename mysql-test/include/{have_dbi_dbd-mysql.inc => have_dbi_dbd-mariadb.inc} (91%)
a41a5b
 rename mysql-test/std_data/{checkDBI_DBD-mysql.pl => checkDBI_DBD-MariaDB.pl} (80%)
a41a5b
a41a5b
diff --git a/Docs/INSTALL-BINARY b/Docs/INSTALL-BINARY
a41a5b
index 2bd6daaea17c..64d5192a49dd 100644
a41a5b
--- a/Docs/INSTALL-BINARY
a41a5b
+++ b/Docs/INSTALL-BINARY
a41a5b
@@ -154,7 +154,7 @@ shell> chown -R mysql data
a41a5b
        script itself and at
a41a5b
        https://mariadb.com/kb/en/starting-and-stopping-mariadb-automatically.
a41a5b
    10. You can set up new accounts using the bin/mysql_setpermission
a41a5b
-       script if you install the DBI and DBD::mysql Perl modules. See
a41a5b
+       script if you install the DBI and DBD::MariaDB Perl modules. See
a41a5b
        Section 4.6.14, "mysql_setpermission --- Interactively Set
a41a5b
        Permissions in Grant Tables." For Perl module installation
a41a5b
        instructions, see Section 2.15, "Perl Installation Notes."
a41a5b
diff --git a/man/mysql_convert_table_format.1 b/man/mysql_convert_table_format.1
a41a5b
index 0c35c2954192..faa35afbe560 100644
a41a5b
--- a/man/mysql_convert_table_format.1
a41a5b
+++ b/man/mysql_convert_table_format.1
a41a5b
@@ -26,7 +26,7 @@ by default)\&.
a41a5b
 is written in Perl and requires that the
a41a5b
 DBI
a41a5b
 and
a41a5b
-DBD::mysql
a41a5b
+DBD::MariaDB
a41a5b
 Perl modules be installed (see
a41a5b
 Section\ \&2.15, \(lqPerl Installation Notes\(rq)\&.
a41a5b
 .PP
a41a5b
diff --git a/man/mysql_setpermission.1 b/man/mysql_setpermission.1
a41a5b
index f20f7ceff358..f2f5e3e039c8 100644
a41a5b
--- a/man/mysql_setpermission.1
a41a5b
+++ b/man/mysql_setpermission.1
a41a5b
@@ -25,7 +25,7 @@ is a Perl script that was originally written and contributed by Luuk de Boer\&.
a41a5b
 is written in Perl and requires that the
a41a5b
 DBI
a41a5b
 and
a41a5b
-DBD::mysql
a41a5b
+DBD::MariaDB
a41a5b
 Perl modules be installed\&.
a41a5b
 .PP
a41a5b
 Invoke
a41a5b
diff --git a/mysql-test/include/have_dbi_dbd-mysql.inc b/mysql-test/include/have_dbi_dbd-mariadb.inc
a41a5b
similarity index 91%
a41a5b
rename from mysql-test/include/have_dbi_dbd-mysql.inc
a41a5b
rename to mysql-test/include/have_dbi_dbd-mariadb.inc
a41a5b
index 7c2113a8109b..1495d2891c8a 100644
a41a5b
--- a/mysql-test/include/have_dbi_dbd-mysql.inc
a41a5b
+++ b/mysql-test/include/have_dbi_dbd-mariadb.inc
a41a5b
@@ -1,7 +1,7 @@
a41a5b
 #
a41a5b
 # Originally created by John Embretsen, 2011-01-26.
a41a5b
 #
a41a5b
-# Checks for the existence of Perl modules DBI and DBD::mysql as seen from the
a41a5b
+# Checks for the existence of Perl modules DBI and DBD::MariaDB as seen from the
a41a5b
 # perl installation used by "external" executable perl scripts, i.e. scripts
a41a5b
 # that are executed as standalone scripts interpreted by the perl installation
a41a5b
 # specified by the "shebang" line in the top of these scripts.
a41a5b
@@ -30,7 +30,7 @@
a41a5b
 # We jump through some hoops since there is no direct way to check if an 
a41a5b
 # external command went OK or not from a mysql-test file:
a41a5b
 #
a41a5b
-#   - In theory, we could do as simple as "exec perl -MDBI -MDBD::mysql -e 1",
a41a5b
+#   - In theory, we could do as simple as "exec perl -MDBI -MDBD::MariaDB -e 1",
a41a5b
 #     however we cannot check the result (exit code) from within a test script. 
a41a5b
 #     Also, this may not yield the same result as other uses of perl due to the 
a41a5b
 #     shebang issue mentioned above.
a41a5b
@@ -55,8 +55,8 @@
a41a5b
 # Instead, we call a separate helper script which checks for the modules in its
a41a5b
 # own environment. We call it without "perl" in front.
a41a5b
 
a41a5b
---let $perlChecker= $MYSQLTEST_VARDIR/std_data/checkDBI_DBD-mysql.pl
a41a5b
---let $resultFile= $MYSQL_TMP_DIR/dbidbd-mysql.txt
a41a5b
+--let $perlChecker= $MYSQLTEST_VARDIR/std_data/checkDBI_DBD-MariaDB.pl
a41a5b
+--let $resultFile= $MYSQL_TMP_DIR/dbiDBD-MariaDB.txt
a41a5b
 
a41a5b
 --exec perl $perlChecker
a41a5b
 
a41a5b
@@ -64,7 +64,7 @@
a41a5b
 --source $resultFile
a41a5b
 
a41a5b
 if (!$dbidbd) {
a41a5b
-    --skip Test needs Perl modules DBI and DBD::mysql
a41a5b
+    --skip Test needs Perl modules DBI and DBD::MariaDB
a41a5b
 } 
a41a5b
 
a41a5b
 # Clean up
a41a5b
diff --git a/mysql-test/include/mysqlhotcopy.inc b/mysql-test/include/mysqlhotcopy.inc
a41a5b
index 2fc14d599d94..306f0acc2084 100644
a41a5b
--- a/mysql-test/include/mysqlhotcopy.inc
a41a5b
+++ b/mysql-test/include/mysqlhotcopy.inc
a41a5b
@@ -4,7 +4,7 @@
a41a5b
 
a41a5b
 --source include/not_windows.inc
a41a5b
 --source include/not_embedded.inc
a41a5b
---source include/have_dbi_dbd-mysql.inc
a41a5b
+--source include/have_dbi_dbd-mariadb.inc
a41a5b
 
a41a5b
 if (!$MYSQLHOTCOPY)
a41a5b
 {
a41a5b
@@ -19,7 +19,7 @@ if (!$MYSQLHOTCOPY)
a41a5b
 #       executable, i.e. not necessarily using the perl interpreter in PATH,
a41a5b
 #       because that is how the documentation demonstrates it.
a41a5b
 #
a41a5b
-#       We include have_dbi_dbd-mysql.inc above so that the test will
a41a5b
+#       We include have_dbi_dbd-mariadb.inc above so that the test will
a41a5b
 #       be skipped if Perl modules required by the mysqlhotcopy tool are not
a41a5b
 #       found when the script is run this way.
a41a5b
 
a41a5b
diff --git a/mysql-test/std_data/checkDBI_DBD-mysql.pl b/mysql-test/std_data/checkDBI_DBD-MariaDB.pl
a41a5b
similarity index 80%
a41a5b
rename from mysql-test/std_data/checkDBI_DBD-mysql.pl
a41a5b
rename to mysql-test/std_data/checkDBI_DBD-MariaDB.pl
a41a5b
index 328a7ad774f3..ed0f5b415d7a 100755
a41a5b
--- a/mysql-test/std_data/checkDBI_DBD-mysql.pl
a41a5b
+++ b/mysql-test/std_data/checkDBI_DBD-MariaDB.pl
a41a5b
@@ -20,7 +20,7 @@
a41a5b
 ################################################################################
a41a5b
 #
a41a5b
 # This perl script checks for availability of the Perl modules DBI and
a41a5b
-# DBD::mysql using the "current" perl interpreter.
a41a5b
+# DBD::MariaDB using the "current" perl interpreter.
a41a5b
 #
a41a5b
 # Useful for test environment checking before testing executable perl scripts
a41a5b
 # in the MySQL Server distribution.
a41a5b
@@ -30,8 +30,8 @@
a41a5b
 #       support running perl scripts with such a shebang without specifying the
a41a5b
 #       perl interpreter on the command line. Such a script is mysqlhotcopy.
a41a5b
 #
a41a5b
-#       When run as "checkDBI_DBD-mysql.pl" the shebang line will be evaluated
a41a5b
-#       and used. When run as "perl checkDBI_DBD-mysql.pl" the shebang line is
a41a5b
+#       When run as "checkDBI_DBD-MariaDB.pl" the shebang line will be evaluated
a41a5b
+#       and used. When run as "perl checkDBI_DBD-MariaDB.pl" the shebang line is
a41a5b
 #       not used.
a41a5b
 #
a41a5b
 # NOTE: This script will create a temporary file in MTR's tmp dir.
a41a5b
@@ -43,13 +43,13 @@
a41a5b
 #
a41a5b
 #       Example:
a41a5b
 #
a41a5b
-#         --let $perlChecker= $MYSQLTEST_VARDIR/std_data/checkDBI_DBD-mysql.pl
a41a5b
-#         --let $resultFile= $MYSQL_TMP_DIR/dbidbd-mysql.txt
a41a5b
+#         --let $perlChecker= $MYSQLTEST_VARDIR/std_data/checkDBI_DBD-MariaDB.pl
a41a5b
+#         --let $resultFile= $MYSQL_TMP_DIR/dbiDBD-MariaDB.txt
a41a5b
 #         --chmod 0755 $perlChecker
a41a5b
 #         --exec $perlChecker
a41a5b
 #         --source $resultFile
a41a5b
 #         if (!$dbidbd) {
a41a5b
-#             --skip Test needs Perl modules DBI and DBD::mysql
a41a5b
+#             --skip Test needs Perl modules DBI and DBD::MariaDB
a41a5b
 #         } 
a41a5b
 #
a41a5b
 #       The calling script is also responsible for cleaning up after use:
a41a5b
@@ -59,7 +59,7 @@
a41a5b
 # Windows notes: 
a41a5b
 #   - shebangs may work differently - call this script with "perl " in front.
a41a5b
 #
a41a5b
-# See mysql-test/include/have_dbi_dbd-mysql.inc for example use of this script.
a41a5b
+# See mysql-test/include/have_dbi_dbd-mariadb.inc for example use of this script.
a41a5b
 # This script should be executable for the user running MTR.
a41a5b
 #
a41a5b
 ################################################################################
a41a5b
@@ -69,13 +69,13 @@ BEGIN
a41a5b
     # We need to catch "Can't locate" as well as "Can't load" errors.
a41a5b
     eval{
a41a5b
         $FOUND_DBI=0;
a41a5b
-        $FOUND_DBD_MYSQL=0;
a41a5b
+        $FOUND_DBD_MARIADB=0;
a41a5b
 
a41a5b
         # Check for DBI module:
a41a5b
         $FOUND_DBI=1 if require DBI;
a41a5b
 
a41a5b
-        # Check for DBD::mysql module
a41a5b
-        $FOUND_DBD_MYSQL=1 if require DBD::mysql;
a41a5b
+        # Check for DBD::MariaDB module
a41a5b
+        $FOUND_DBD_MARIADB=1 if require DBD::MariaDB;
a41a5b
     };
a41a5b
 };
a41a5b
 
a41a5b
@@ -83,11 +83,11 @@ BEGIN
a41a5b
 # The file must be created whether we write to it or not, otherwise mysql-test 
a41a5b
 # will complain if trying to source it. 
a41a5b
 # An empty file indicates failure to load modules.
a41a5b
-open(FILE, ">", $ENV{'MYSQL_TMP_DIR'}.'/dbidbd-mysql.txt');
a41a5b
+open(FILE, ">", $ENV{'MYSQL_TMP_DIR'}.'/dbiDBD-MariaDB.txt');
a41a5b
 
a41a5b
-if ($FOUND_DBI && $FOUND_DBD_MYSQL) {
a41a5b
+if ($FOUND_DBI && $FOUND_DBD_MARIADB) {
a41a5b
     # write a mysql-test command setting a variable to indicate success
a41a5b
-    print(FILE 'let $dbidbd= FOUND_DBI_DBD-MYSQL;'."\n");
a41a5b
+    print(FILE 'let $dbidbd= FOUND_DBI_DBD-MARIADB;'."\n");
a41a5b
 }
a41a5b
 
a41a5b
 # close the file.
a41a5b
diff --git a/plugin/handler_socket/client/hspool_test.pl b/plugin/handler_socket/client/hspool_test.pl
a41a5b
index 7fe073301b18..091cb4967cb8 100755
a41a5b
--- a/plugin/handler_socket/client/hspool_test.pl
a41a5b
+++ b/plugin/handler_socket/client/hspool_test.pl
a41a5b
@@ -31,8 +31,8 @@
a41a5b
 my $mysql_user = 'root';
a41a5b
 my $mysql_password = '';
a41a5b
 
a41a5b
-my $dsn = "DBI:mysql:database=;host=$host;port=$mysqlport"
a41a5b
-        . ";mysql_server_prepare=$ssps";
a41a5b
+my $dsn = "DBI:MariaDB:database=;host=$host;port=$mysqlport"
a41a5b
+        . ";mariadb_server_prepare=$ssps";
a41a5b
 my $dbh = DBI->connect($dsn, $mysql_user, $mysql_password,
a41a5b
 	{ RaiseError => 1 });
a41a5b
 my $hsargs = { 'host' => $host, 'port' => $hsport_rd };
a41a5b
diff --git a/plugin/handler_socket/client/hstest.pl b/plugin/handler_socket/client/hstest.pl
a41a5b
index 4d177b6cdc87..de39fcb6d6c5 100755
a41a5b
--- a/plugin/handler_socket/client/hstest.pl
a41a5b
+++ b/plugin/handler_socket/client/hstest.pl
a41a5b
@@ -33,8 +33,8 @@
a41a5b
 my $keytype = get_conf("keytype", "varchar(32)");
a41a5b
 my $file = get_conf("file", undef);
a41a5b
 
a41a5b
-my $dsn = "DBI:mysql:database=;host=$host;port=$mysqlport"
a41a5b
-	. ";mysql_server_prepare=$ssps";
a41a5b
+my $dsn = "DBI:MariaDB:database=;host=$host;port=$mysqlport"
a41a5b
+	. ";mariadb_server_prepare=$ssps";
a41a5b
 my $dbh = DBI->connect($dsn, $mysqluser, $mysqlpass, { RaiseError => 1 });
a41a5b
 my $hsargs = { 'host' => $host, 'port' => $hsport };
a41a5b
 my $cli = new Net::HandlerSocket($hsargs);
a41a5b
diff --git a/plugin/handler_socket/regtest/common/hstest.pm b/plugin/handler_socket/regtest/common/hstest.pm
a41a5b
index 348242b027f3..89f273c9786b 100644
a41a5b
--- a/plugin/handler_socket/regtest/common/hstest.pm
a41a5b
+++ b/plugin/handler_socket/regtest/common/hstest.pm
a41a5b
@@ -29,10 +29,10 @@ sub get_dbi_connection {
a41a5b
     = ($conf{dbname}, $conf{host}, $conf{myport}, $conf{ssps},
a41a5b
       $conf{user}, $conf{pass});
a41a5b
   my $mycnf = "binary_my.cnf";
a41a5b
-  my $dsn = "DBI:mysql:database=;host=$host;port=$myport"
a41a5b
-    . ";mysql_server_prepare=$ssps"
a41a5b
-    . ";mysql_read_default_group=perl"
a41a5b
-    . ";mysql_read_default_file=../common/$mycnf";
a41a5b
+  my $dsn = "DBI:MariaDB:database=;host=$host;port=$myport"
a41a5b
+    . ";mariadb_server_prepare=$ssps"
a41a5b
+    . ";mariadb_read_default_group=perl"
a41a5b
+    . ";mariadb_read_default_file=../common/$mycnf";
a41a5b
   my $dbh = DBI->connect($dsn, $user, $pass, { RaiseError => 1 });
a41a5b
   return $dbh;
a41a5b
 }
a41a5b
diff --git a/scripts/mysql_convert_table_format.sh b/scripts/mysql_convert_table_format.sh
a41a5b
index 2001efae3929..6b4d758a5131 100644
a41a5b
--- a/scripts/mysql_convert_table_format.sh
a41a5b
+++ b/scripts/mysql_convert_table_format.sh
a41a5b
@@ -57,10 +57,10 @@ if ($opt_port)
a41a5b
 }
a41a5b
 if (length($opt_socket))
a41a5b
 {
a41a5b
-  $connect_opt.=";mysql_socket=$opt_socket";
a41a5b
+  $connect_opt.=";mariadb_socket=$opt_socket";
a41a5b
 }
a41a5b
 
a41a5b
-$dbh = DBI->connect("DBI:mysql:$opt_database:${opt_host}$connect_opt",
a41a5b
+$dbh = DBI->connect("DBI:MariaDB:$opt_database:${opt_host}$connect_opt",
a41a5b
 		    $opt_user,
a41a5b
 		    $opt_password,
a41a5b
 		    { PrintError => 0})
a41a5b
diff --git a/scripts/mysqlhotcopy.sh b/scripts/mysqlhotcopy.sh
a41a5b
index c56cdea470c0..94e577a94a7f 100644
a41a5b
--- a/scripts/mysqlhotcopy.sh
a41a5b
+++ b/scripts/mysqlhotcopy.sh
a41a5b
@@ -192,12 +192,12 @@ $opt{allowold} = 1 if $opt{keepold};
a41a5b
 my $dsn;
a41a5b
 $dsn  = ";host=" . (defined($opt{host}) ? $opt{host} : "localhost");
a41a5b
 $dsn .= ";port=$opt{port}" if $opt{port};
a41a5b
-$dsn .= ";mysql_socket=$opt{socket}" if $opt{socket};
a41a5b
+$dsn .= ";mariadb_socket=$opt{socket}" if $opt{socket};
a41a5b
 
a41a5b
-# use mysql_read_default_group=mysqlhotcopy so that [client] and
a41a5b
+# use mariadb_read_default_group=mysqlhotcopy so that [client] and
a41a5b
 # [mysqlhotcopy] groups will be read from standard options files.
a41a5b
 
a41a5b
-my $dbh = DBI->connect("dbi:mysql:$dsn;mysql_read_default_group=mysqlhotcopy",
a41a5b
+my $dbh = DBI->connect("DBI:MariaDB:$dsn;mariadb_read_default_group=mysqlhotcopy",
a41a5b
                         $opt{user}, $opt{password},
a41a5b
 {
a41a5b
     RaiseError => 1,
a41a5b
@@ -796,7 +796,7 @@ sub record_log_pos {
a41a5b
 	
a41a5b
 	my $row_hash = get_row_hash( $dbh, "show slave status" );
a41a5b
 	my ($master_host, $log_file, $log_pos ); 
a41a5b
-	if ( $dbh->{mysql_serverinfo} =~ /^3\.23/ ) {
a41a5b
+	if ( $dbh->{mariadb_serverinfo} =~ /^3\.23/ ) {
a41a5b
 	    ($master_host, $log_file, $log_pos ) 
a41a5b
 	      = @{$row_hash}{ qw / Master_Host Log_File Pos / };
a41a5b
 	} else {
a41a5b
diff --git a/sql-bench/server-cfg.sh b/sql-bench/server-cfg.sh
a41a5b
index 3991d16c6b18..6ef39c4d91f8 100644
a41a5b
--- a/sql-bench/server-cfg.sh
a41a5b
+++ b/sql-bench/server-cfg.sh
a41a5b
@@ -116,8 +116,8 @@ sub new
a41a5b
   bless $self;
a41a5b
 
a41a5b
   $self->{'cmp_name'}		= "mysql";
a41a5b
-  $self->{'data_source'}	= "DBI:mysql:database=$database;host=$host";
a41a5b
-  $self->{'data_source'} .= ";mysql_socket=$socket" if($socket);
a41a5b
+  $self->{'data_source'}	= "DBI:MariaDB:database=$database;host=$host";
a41a5b
+  $self->{'data_source'} .= ";mariadb_socket=$socket" if($socket);
a41a5b
   $self->{'data_source'} .= ";$connect_options" if($connect_options);
a41a5b
   $self->{'limits'}		= \%limits;
a41a5b
   $self->{'blob'}		= "blob";
a41a5b
diff --git a/storage/maria/ma_ft_test1.h b/storage/maria/ma_ft_test1.h
a41a5b
index 0f4997a71424..df86eeceb66c 100644
a41a5b
--- a/storage/maria/ma_ft_test1.h
a41a5b
+++ b/storage/maria/ma_ft_test1.h
a41a5b
@@ -311,7 +311,7 @@ struct { const char *f0, *f2; } data[NDATAS] = {
a41a5b
    {"18.4.49", "Problems linking with the C API"},
a41a5b
    {"18.4.50", "How to make a thread-safe client"},
a41a5b
    {"18.5", "MySQL Perl API's"},
a41a5b
-   {"18.5.1", "DBI with DBD::mysql"},
a41a5b
+   {"18.5.1", "DBI with DBD::MariaDB"},
a41a5b
    {"18.5.1.1", "The DBI interface"},
a41a5b
    {"18.5.1.2", "More DBI/DBD information"},
a41a5b
    {"18.6", "MySQL Java connectivity (JDBC)"},
a41a5b
diff --git a/tests/big_record.pl b/tests/big_record.pl
a41a5b
index cb1f89984682..b2aeee276586 100755
a41a5b
--- a/tests/big_record.pl
a41a5b
+++ b/tests/big_record.pl
a41a5b
@@ -37,9 +37,9 @@
a41a5b
 print "Connection to database $test_db\n";
a41a5b
 
a41a5b
 $extra_options="";
a41a5b
-$extra_options.=":mysql_compression=1" if ($opt_compress);
a41a5b
+$extra_options.=":mariadb_compression=1" if ($opt_compress);
a41a5b
 
a41a5b
-$dbh = DBI->connect("DBI:mysql:$opt_db:$host$extra_options",$opt_user,$opt_password) || die "Can't connect: $DBI::errstr\n";
a41a5b
+$dbh = DBI->connect("DBI:MariaDB:$opt_db:$host$extra_options",$opt_user,$opt_password) || die "Can't connect: $DBI::errstr\n";
a41a5b
 
a41a5b
 $dbh->do("drop table if exists $opt_table");
a41a5b
 
a41a5b
@@ -65,7 +65,7 @@
a41a5b
 
a41a5b
 print "\nReading records\n";
a41a5b
 
a41a5b
-$sth=$dbh->prepare("select * from $opt_table", { "mysql_use_result" => 1}) or die $dbh->errstr;
a41a5b
+$sth=$dbh->prepare("select * from $opt_table", { "mariadb_use_result" => 1}) or die $dbh->errstr;
a41a5b
 
a41a5b
 $sth->execute() or die $sth->errstr;
a41a5b
 
a41a5b
diff --git a/tests/check_async_queries.pl b/tests/check_async_queries.pl
a41a5b
index b599bc334d3c..0039dd90eb9c 100644
a41a5b
--- a/tests/check_async_queries.pl
a41a5b
+++ b/tests/check_async_queries.pl
a41a5b
@@ -13,7 +13,7 @@
a41a5b
 die "Usage: $0 <host> <user> <password> <database>\n"
a41a5b
     unless @ARGV == 4;
a41a5b
 
a41a5b
-my $dbh= DBI->connect("DBI:mysql:database=$ARGV[3];host=$ARGV[0]",
a41a5b
+my $dbh= DBI->connect("DBI:MariaDB:database=$ARGV[3];host=$ARGV[0]",
a41a5b
                       $ARGV[1], $ARGV[2],
a41a5b
                       { RaiseError => 1, PrintError => 0 });
a41a5b
 
a41a5b
diff --git a/tests/consistent_snapshot.pl b/tests/consistent_snapshot.pl
a41a5b
index 9e53eaea6a1a..5c006b0092d5 100755
a41a5b
--- a/tests/consistent_snapshot.pl
a41a5b
+++ b/tests/consistent_snapshot.pl
a41a5b
@@ -17,7 +17,7 @@
a41a5b
 my $stop_time= time() + $DURATION;
a41a5b
 
a41a5b
 sub my_connect {
a41a5b
-  my $dbh= DBI->connect("dbi:mysql:mysql_socket=/tmp/mysql.sock;database=test",
a41a5b
+  my $dbh= DBI->connect("DBI:MariaDB:mariadb_socket=/tmp/mysql.sock;database=test",
a41a5b
                         "root", undef, { RaiseError=>1, PrintError=>0, AutoCommit=>0});
a41a5b
   $dbh->do("SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ");
a41a5b
   $dbh->do("SET SESSION autocommit = 0");
a41a5b
diff --git a/tests/drop_test.pl b/tests/drop_test.pl
a41a5b
index 329f65eb65da..15a75f4908c6 100755
a41a5b
--- a/tests/drop_test.pl
a41a5b
+++ b/tests/drop_test.pl
a41a5b
@@ -50,7 +50,7 @@ package main;
a41a5b
 $start_time=new Benchmark;
a41a5b
 if (!$opt_skip_create)
a41a5b
 {
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
   $dbh->do("drop table if exists $firsttable, ${firsttable}_1, ${firsttable}_2");
a41a5b
@@ -81,7 +81,7 @@ package main;
a41a5b
 
a41a5b
 if (!$opt_skip_delete && !$errors)
a41a5b
 {
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
   $dbh->do("drop table $firsttable");
a41a5b
@@ -103,7 +103,7 @@ sub test_insert
a41a5b
 {
a41a5b
   my ($dbh,$i);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
   for ($i=0 ; $i < $opt_loop_count; $i++)
a41a5b
@@ -124,7 +124,7 @@ sub test_drop
a41a5b
   my ($id) = @_;
a41a5b
   my ($dbh,$i,$sth,$error_counter,$sleep_time);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
   $error_counter=0;
a41a5b
@@ -169,7 +169,7 @@ sub test_select
a41a5b
 {
a41a5b
   my ($dbh,$i,$sth,@row,$error_counter,$sleep_time);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -206,7 +206,7 @@ sub test_flush
a41a5b
 {
a41a5b
   my ($dbh,$i,$sth,@row,$error_counter,$sleep_time);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
diff --git a/tests/fork_big.pl b/tests/fork_big.pl
a41a5b
index 623377ab5cdd..2f803b7fdd3c 100755
a41a5b
--- a/tests/fork_big.pl
a41a5b
+++ b/tests/fork_big.pl
a41a5b
@@ -65,7 +65,7 @@ package main;
a41a5b
 ####
a41a5b
 
a41a5b
 $start_time=new Benchmark;
a41a5b
-$dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+$dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		    $opt_user, $opt_password,
a41a5b
 		  { PrintError => 0}) || die $DBI::errstr;
a41a5b
 if (!$opt_skip_create)
a41a5b
@@ -155,7 +155,7 @@ package main;
a41a5b
 if (!$opt_skip_delete && !$errors)
a41a5b
 {
a41a5b
   my $table_def;
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -189,7 +189,7 @@ sub test_insert
a41a5b
     $from_table=0; $to_table=$numtables-1;
a41a5b
   }
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -218,7 +218,7 @@ sub test_select
a41a5b
 {
a41a5b
   my ($dbh, $i, $j, $count, $loop, $count_query, $row_counts);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -255,7 +255,7 @@ sub test_select_count
a41a5b
 {
a41a5b
   my ($dbh, $i, $j, $count, $loop);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -285,7 +285,7 @@ sub test_join
a41a5b
 {
a41a5b
   my ($dbh, $i, $j, $count, $loop, $count_query, $row_counts);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -326,7 +326,7 @@ sub test_delete
a41a5b
 
a41a5b
   $table_count=2;
a41a5b
   $count=0;
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -360,7 +360,7 @@ sub test_delete
a41a5b
 sub test_update
a41a5b
 {
a41a5b
   my ($dbh, $i, $j, $row_counts, $count_query, $count, $loop);
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -403,7 +403,7 @@ sub test_update
a41a5b
 sub test_check
a41a5b
 {
a41a5b
   my ($dbh, $sth, $row, $i, $j, $type, $table);
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -440,7 +440,7 @@ sub test_check
a41a5b
 sub test_repair
a41a5b
 {
a41a5b
   my ($dbh, $sth, $row, $i, $type, $table);
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -474,7 +474,7 @@ sub test_flush
a41a5b
 {
a41a5b
   my ($dbh,$count,$tables);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -502,7 +502,7 @@ sub test_database
a41a5b
 {
a41a5b
   my ($database) = @_;
a41a5b
   my ($dbh, $sth, $row, $i, $type, $tables);
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$database:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$database:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -535,7 +535,7 @@ sub test_database
a41a5b
 sub test_alter
a41a5b
 {
a41a5b
   my ($dbh, $sth, $row, $i, $type, $table);
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -559,7 +559,7 @@ sub test_alter
a41a5b
 sub signal_abort
a41a5b
 {
a41a5b
   my ($dbh);
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
diff --git a/tests/fork_big2.pl b/tests/fork_big2.pl
a41a5b
index c844d2908345..a2b465734dc5 100644
a41a5b
--- a/tests/fork_big2.pl
a41a5b
+++ b/tests/fork_big2.pl
a41a5b
@@ -81,7 +81,7 @@ package main;
a41a5b
 }
a41a5b
 
a41a5b
 $start_time=new Benchmark;
a41a5b
-$dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+$dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		    $opt_user, $opt_password,
a41a5b
 		  { PrintError => 0}) || die $DBI::errstr;
a41a5b
 if (!$opt_skip_create)
a41a5b
@@ -212,7 +212,7 @@ package main;
a41a5b
 if (!$opt_skip_drop && !$errors)
a41a5b
 {
a41a5b
   my $table_def;
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -257,7 +257,7 @@ sub test_insert
a41a5b
     $from_table=0; $to_table=$numtables-1;
a41a5b
   }
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -286,7 +286,7 @@ sub test_select
a41a5b
 {
a41a5b
   my ($dbh, $i, $j, $count, $loop);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -323,7 +323,7 @@ sub test_select_count
a41a5b
 {
a41a5b
   my ($dbh, $i, $j, $count, $loop);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -353,7 +353,7 @@ sub test_join
a41a5b
 {
a41a5b
   my ($dbh, $i, $j, $count, $loop);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -391,7 +391,7 @@ sub test_join_count
a41a5b
 {
a41a5b
   my ($dbh, $i, $j, $count, $loop);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -446,7 +446,7 @@ sub test_delete
a41a5b
 
a41a5b
   $table_count=2;
a41a5b
   $count=0;
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -480,7 +480,7 @@ sub test_delete
a41a5b
 sub test_update
a41a5b
 {
a41a5b
   my ($dbh, $i, $j, $row_counts, $count_query, $count, $loop);
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -523,7 +523,7 @@ sub test_update
a41a5b
 sub test_check
a41a5b
 {
a41a5b
   my ($dbh, $row, $i, $j, $type, $table);
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -560,7 +560,7 @@ sub test_check
a41a5b
 sub test_repair
a41a5b
 {
a41a5b
   my ($dbh, $row, $i, $type, $table);
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -594,7 +594,7 @@ sub test_flush
a41a5b
 {
a41a5b
   my ($dbh,$count,$tables);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -621,7 +621,7 @@ sub test_resize
a41a5b
 {
a41a5b
   my ($dbh, $key_buffer_size);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -648,7 +648,7 @@ sub test_database
a41a5b
 {
a41a5b
   my ($database) = @_;
a41a5b
   my ($dbh, $row, $i, $type, $tables);
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$database:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$database:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -681,7 +681,7 @@ sub test_database
a41a5b
 sub test_alter
a41a5b
 {
a41a5b
   my ($dbh, $row, $i, $type, $table);
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -705,7 +705,7 @@ sub test_alter
a41a5b
 sub signal_abort
a41a5b
 {
a41a5b
   my ($dbh);
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
diff --git a/tests/index_corrupt.pl b/tests/index_corrupt.pl
a41a5b
index 6b04ce8a59c5..6f31b85bd614 100755
a41a5b
--- a/tests/index_corrupt.pl
a41a5b
+++ b/tests/index_corrupt.pl
a41a5b
@@ -51,7 +51,7 @@ package main;
a41a5b
 $start_time=new Benchmark;
a41a5b
 if (!$opt_skip_create)
a41a5b
 {
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
   $dbh->do("drop table if exists $firsttable, $secondtable");
a41a5b
@@ -111,7 +111,7 @@ package main;
a41a5b
 
a41a5b
 if (!$opt_skip_delete && !$errors)
a41a5b
 {
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
   $dbh->do("drop table $firsttable, $secondtable");
a41a5b
@@ -134,7 +134,7 @@ sub insert_in_bench
a41a5b
 {
a41a5b
   my ($dbh,$rows,$found,$i);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
   for ($rows= 1; $rows <= $opt_loop_count ; $rows++)
a41a5b
@@ -179,7 +179,7 @@ sub select_from_bench
a41a5b
 {
a41a5b
   my ($dbh,$rows,$cursor);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
   for ($rows= 1; $rows < $opt_loop_count ; $rows++)
a41a5b
@@ -206,7 +206,7 @@ sub delete_from_bench
a41a5b
 {
a41a5b
   my ($dbh,$row, $t_value, $t2_value, $statement, $cursor);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
diff --git a/tests/insert_and_repair.pl b/tests/insert_and_repair.pl
a41a5b
index 18091c92718d..dfa490456cb8 100755
a41a5b
--- a/tests/insert_and_repair.pl
a41a5b
+++ b/tests/insert_and_repair.pl
a41a5b
@@ -49,7 +49,7 @@ package main;
a41a5b
 $start_time=new Benchmark;
a41a5b
 if (!$opt_skip_create)
a41a5b
 {
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
   $dbh->do("drop table if exists $firsttable, $secondtable");
a41a5b
@@ -79,7 +79,7 @@ package main;
a41a5b
 
a41a5b
 if (!$opt_skip_delete && !$errors)
a41a5b
 {
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
   $dbh->do("drop table $firsttable,$secondtable");
a41a5b
@@ -100,7 +100,7 @@ sub insert_in_bench1
a41a5b
 {
a41a5b
   my ($dbh,$rows,$found,$i);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
   $rows=$found=0;
a41a5b
@@ -123,7 +123,7 @@ sub insert_in_bench2
a41a5b
 {
a41a5b
   my ($dbh,$rows,$found,$i);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
   $rows=$found=0;
a41a5b
@@ -149,7 +149,7 @@ sub repair_and_check
a41a5b
       $table);
a41a5b
   $found1=$found2=0; $last_found1=$last_found2= -1;
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
diff --git a/tests/mail_to_db.pl b/tests/mail_to_db.pl
a41a5b
index e50415d96f31..94f3955b2c32 100755
a41a5b
--- a/tests/mail_to_db.pl
a41a5b
+++ b/tests/mail_to_db.pl
a41a5b
@@ -110,12 +110,12 @@ sub main
a41a5b
     die "FATAL: Can't find inbox file: $ARGV[$i]\n" if (! -f $ARGV[$i]);
a41a5b
   }
a41a5b
 
a41a5b
-  $connect_arg = "DBI:mysql:";
a41a5b
+  $connect_arg = "DBI:MariaDB:";
a41a5b
   push @args, "database=$opt_db" if defined($opt_db);
a41a5b
   push @args, "host=$opt_host" if defined($opt_host);
a41a5b
   push @args, "port=$opt_port" if defined($opt_port);
a41a5b
-  push @args, "mysql_socket=$opt_socket" if defined($opt_socket);
a41a5b
-  push @args, "mysql_read_default_group=mail_to_db";
a41a5b
+  push @args, "mariadb_socket=$opt_socket" if defined($opt_socket);
a41a5b
+  push @args, "mariadb_read_default_group=mail_to_db";
a41a5b
   $connect_arg .= join ';', @args;
a41a5b
   $dbh = DBI->connect("$connect_arg", $opt_user, $opt_password,
a41a5b
 		     { PrintError => 0})
a41a5b
diff --git a/tests/pmail.pl b/tests/pmail.pl
a41a5b
index 359256c25b34..de469923c7d3 100755
a41a5b
--- a/tests/pmail.pl
a41a5b
+++ b/tests/pmail.pl
a41a5b
@@ -60,7 +60,7 @@
a41a5b
 #### Connect and parsing the query to MySQL
a41a5b
 ####
a41a5b
 
a41a5b
-$dbh= DBI->connect("DBI:mysql:$opt_db:$opt_host:port=$opt_port:mysql_socket=$opt_socket", $opt_user,$opt_password, { PrintError => 0})
a41a5b
+$dbh= DBI->connect("DBI:MariaDB:$opt_db:$opt_host:port=$opt_port:mariadb_socket=$opt_socket", $opt_user,$opt_password, { PrintError => 0})
a41a5b
 || die $DBI::errstr;
a41a5b
 
a41a5b
 main();
a41a5b
diff --git a/tests/rename_test.pl b/tests/rename_test.pl
a41a5b
index d7097df1e4e3..ff1b73434e54 100755
a41a5b
--- a/tests/rename_test.pl
a41a5b
+++ b/tests/rename_test.pl
a41a5b
@@ -48,7 +48,7 @@ package main;
a41a5b
 $start_time=new Benchmark;
a41a5b
 if (!$opt_skip_create)
a41a5b
 {
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
   $dbh->do("drop table if exists $firsttable, ${firsttable}_1, ${firsttable}_2");
a41a5b
@@ -81,7 +81,7 @@ package main;
a41a5b
 
a41a5b
 if (!$opt_skip_delete && !$errors)
a41a5b
 {
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
   $dbh->do("drop table $firsttable");
a41a5b
@@ -103,7 +103,7 @@ sub test_insert
a41a5b
 {
a41a5b
   my ($dbh,$i,$error);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
   for ($i=0 ; $i < $opt_loop_count; $i++)
a41a5b
@@ -128,7 +128,7 @@ sub test_rename
a41a5b
   my ($id) = @_;
a41a5b
   my ($dbh,$i,$error_counter,$sleep_time);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
   $error_counter=0;
a41a5b
@@ -158,7 +158,7 @@ sub test_select
a41a5b
 {
a41a5b
   my ($dbh,$i,$sth,@row,$sleep_time);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -192,7 +192,7 @@ sub test_flush
a41a5b
 {
a41a5b
   my ($dbh,$i,$sth,@row,$error_counter,$sleep_time);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
diff --git a/tests/test_delayed_insert.pl b/tests/test_delayed_insert.pl
a41a5b
index cb5b86a228d1..2ebb42e08d1c 100755
a41a5b
--- a/tests/test_delayed_insert.pl
a41a5b
+++ b/tests/test_delayed_insert.pl
a41a5b
@@ -50,7 +50,7 @@ package main;
a41a5b
 $start_time=new Benchmark;
a41a5b
 if (!$opt_skip_create)
a41a5b
 {
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host") || die $DBI::errstr;
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host") || die $DBI::errstr;
a41a5b
   $Mysql::QUIET = 1;
a41a5b
   $dbh->do("drop table if exists $firsttable,$secondtable");
a41a5b
   $Mysql::QUIET = 0;
a41a5b
@@ -87,7 +87,7 @@ package main;
a41a5b
 
a41a5b
 if (!$opt_skip_delete && !$errors)
a41a5b
 {
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host") || die $DBI::errstr;
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host") || die $DBI::errstr;
a41a5b
   $dbh->do("drop table $firsttable");
a41a5b
   $dbh->do("drop table $secondtable");
a41a5b
 }
a41a5b
@@ -107,7 +107,7 @@ sub test_1
a41a5b
 {
a41a5b
   my ($dbh,$tmpvar,$rows,$found,$i);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host") || die $DBI::errstr;
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host") || die $DBI::errstr;
a41a5b
   $tmpvar=1;
a41a5b
   $rows=$found=0;
a41a5b
   for ($i=0 ; $i < $opt_loop_count; $i++)
a41a5b
@@ -131,7 +131,7 @@ sub test_delayed_1
a41a5b
 {
a41a5b
   my ($dbh,$tmpvar,$rows,$found,$i,$id);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host") || die $DBI::errstr;
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host") || die $DBI::errstr;
a41a5b
   $tmpvar=1;
a41a5b
   $rows=$found=0;
a41a5b
   for ($i=0 ; $i < $opt_loop_count; $i++)
a41a5b
@@ -162,7 +162,7 @@ sub test_delayed_2
a41a5b
 {
a41a5b
   my ($dbh,$tmpvar,$rows,$found,$i,$id);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host") || die $DBI::errstr;
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host") || die $DBI::errstr;
a41a5b
   $tmpvar=1;
a41a5b
   $rows=$found=0;
a41a5b
   for ($i=0 ; $i < $opt_loop_count; $i++)
a41a5b
@@ -196,7 +196,7 @@ sub test_2
a41a5b
 {
a41a5b
   my ($dbh,$id,$tmpvar,$rows,$found,$i,$max_id,$tmp,$sth,$count);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host") || die $DBI::errstr;
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host") || die $DBI::errstr;
a41a5b
   $tmpvar=111111;
a41a5b
   $rows=$found=$max_id=$id=0;
a41a5b
   for ($i=0 ; $i < $opt_loop_count ; $i++)
a41a5b
@@ -245,7 +245,7 @@ sub test_2
a41a5b
 sub test_3
a41a5b
 {
a41a5b
   my ($dbh,$id,$tmpvar,$rows,$i,$count);
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host") || die $DBI::errstr;
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host") || die $DBI::errstr;
a41a5b
   $tmpvar=222222;
a41a5b
   $rows=0;
a41a5b
   for ($i=0 ; $i < $opt_loop_count ; $i++)
a41a5b
@@ -269,7 +269,7 @@ sub test_3
a41a5b
 sub test_4
a41a5b
 {
a41a5b
   my ($dbh,$id,$tmpvar,$rows,$i,$count);
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host") || die $DBI::errstr;
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host") || die $DBI::errstr;
a41a5b
   $tmpvar=333333;
a41a5b
   $rows=0;
a41a5b
   for ($i=0 ; $i < $opt_loop_count; $i++)
a41a5b
@@ -288,7 +288,7 @@ sub test_4
a41a5b
 sub test_5
a41a5b
 {
a41a5b
   my ($dbh,$id,$tmpvar,$rows,$i,$max_id,$count,$sth);
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host") || die $DBI::errstr;
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host") || die $DBI::errstr;
a41a5b
   $tmpvar=444444;
a41a5b
   $rows=$max_id=0;
a41a5b
   for ($i=0 ; $i < $opt_loop_count ; $i++)
a41a5b
@@ -328,7 +328,7 @@ sub test_5
a41a5b
 sub test_del
a41a5b
 {
a41a5b
   my ($dbh,$min_id,$i,$sth,$rows);
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host") || die $DBI::errstr;
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host") || die $DBI::errstr;
a41a5b
   $rows=0;
a41a5b
   for ($i=0 ; $i < $opt_loop_count/3; $i++)
a41a5b
   {
a41a5b
@@ -357,7 +357,7 @@ sub test_flush
a41a5b
   my ($dbh,$sth,$found1,$last_found1,$i,@row);
a41a5b
   $found1=0; $last_found1=-1;
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
diff --git a/tests/truncate.pl b/tests/truncate.pl
a41a5b
index 98791a15b2c6..85a7888bc4af 100755
a41a5b
--- a/tests/truncate.pl
a41a5b
+++ b/tests/truncate.pl
a41a5b
@@ -47,7 +47,7 @@ package main;
a41a5b
 ####
a41a5b
 
a41a5b
 $start_time=new Benchmark;
a41a5b
-$dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+$dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		    $opt_user, $opt_password,
a41a5b
 		  { PrintError => 0}) || die $DBI::errstr;
a41a5b
 if (!$opt_skip_create)
a41a5b
@@ -100,7 +100,7 @@ package main;
a41a5b
 if (!$opt_skip_delete && !$errors)
a41a5b
 {
a41a5b
   my $table_def;
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b
 
a41a5b
@@ -127,7 +127,7 @@ sub test_truncate
a41a5b
 {
a41a5b
   my ($dbh,$i,$j,$count,$table_def,$table);
a41a5b
 
a41a5b
-  $dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
a41a5b
+  $dbh = DBI->connect("DBI:MariaDB:$opt_db:$opt_host",
a41a5b
 		      $opt_user, $opt_password,
a41a5b
 		    { PrintError => 0}) || die $DBI::errstr;
a41a5b