summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPali <pali@cpan.org>2019-06-07 16:30:27 +0200
committerRobert Bindar <robert@mariadb.org>2019-07-19 13:39:20 +0300
commit5cc2096f93b7f130b36f8bc0fc43440db9a848e4 (patch)
tree48dc24bbde0c7a15181d01b7aea08e43992f4364 /scripts
parent9a7d96e8326377b92406c09fdcb8bd60c45f901c (diff)
downloadmariadb-git-5cc2096f93b7f130b36f8bc0fc43440db9a848e4.tar.gz
Switch Perl DBI scripts from DBD::mysql to DBD::MariaDB driverbb-10.5-MDEV-18565
Perl DBD::MariaDB driver is available CPAN and is already used in production environment.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysql_convert_table_format.sh4
-rw-r--r--scripts/mysql_setpermission.sh2
-rw-r--r--scripts/mysqlhotcopy.sh8
-rw-r--r--scripts/mytop.sh6
4 files changed, 10 insertions, 10 deletions
diff --git a/scripts/mysql_convert_table_format.sh b/scripts/mysql_convert_table_format.sh
index 2001efae392..6b4d758a513 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 71462d28622..66decbd69af 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 c56cdea470c..94e577a94a7 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 3ef0a59f27f..1c4d7a502f5 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