Blob Blame History Raw
From 5cc2096f93b7f130b36f8bc0fc43440db9a848e4 Mon Sep 17 00:00:00 2001
From: Pali <pali@cpan.org>
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/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/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/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/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 <host> <user> <password> <database>\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/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;