New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ipv6 support #1

Merged
merged 3 commits into from Dec 8, 2015
Jump to file or symbol
Failed to load files and symbols.
+9 −8
Diff settings

Always

Just for now

View
@@ -11,7 +11,7 @@ Package: mha4mysql-manager
Architecture: all
Depends: ${misc:Depends}, ${perl:Depends},
libdbi-perl,
libdbd-mysql-perl,
libdbd-mysql-perl (>= 4.031),
libconfig-tiny-perl,
liblog-dispatch-perl,
libparallel-forkmanager-perl,
View
@@ -152,7 +152,7 @@ sub connect_util {
my $port = shift;
my $user = shift;
my $password = shift;
my $dsn = "DBI:mysql:;host=$host;port=$port;mysql_connect_timeout=1";
my $dsn = "DBI:mysql:;host=[$host];port=$port;mysql_connect_timeout=1";
my $dbh = DBI->connect( $dsn, $user, $password, { PrintError => 0 } );
return $dbh;
}
@@ -195,7 +195,7 @@ sub connect {
$self->{dbh} = undef;
unless ( $self->{dsn} ) {
$self->{dsn} = "DBI:mysql:;host=$host;port=$port;mysql_connect_timeout=4";
$self->{dsn} = "DBI:mysql:;host=[$host];port=$port;mysql_connect_timeout=4";
}
my $defaults = {
PrintError => 0,
View
@@ -95,7 +95,7 @@ sub connect {
}
my $log = $self->{logger};
$self->{dbh} = DBI->connect(
"DBI:mysql:;host=$self->{ip};"
"DBI:mysql:;host=[$self->{ip}];"
. "port=$self->{port};mysql_connect_timeout=$connect_timeout",
$self->{user},
$self->{password},
@@ -13,6 +13,7 @@ Requires: perl(Config::Tiny)
Requires: perl(Log::Dispatch)
Requires: perl(Parallel::ForkManager)
Requires: mha4mysql-node >= 0.54
Requires: perl(DBD::mysql) >= 4.031
Source0: mha4mysql-manager-%{version}.tar.gz
%description
@@ -7,7 +7,7 @@
my ( $port, $user, $pass, $start, $stop, $commit_interval ) = @ARGV;
my $pk = $start;
my $committed_rows = 0;
my $dsn = "DBI:mysql:test;host=127.0.0.1;port=$port";
my $dsn = "DBI:mysql:test;host=[127.0.0.1];port=$port";
my $dbh = DBI->connect( $dsn, $user, $pass );
if ( $commit_interval == 1 ) {
$dbh->do("SET AUTOCOMMIT=1");
View
@@ -7,7 +7,7 @@
my ( $port, $user, $pass, $start, $stop, $single_tran, $rollback ) = @ARGV;
$rollback = 0 if ( !defined($rollback) );
my $dsn = "DBI:mysql:test;host=127.0.0.1;port=$port";
my $dsn = "DBI:mysql:test;host=[127.0.0.1];port=$port";
my $dbh = DBI->connect( $dsn, $user, $pass );
my $sth;
View
@@ -21,7 +21,7 @@
close($in);
unlink $file;
my $dsn = "DBI:mysql:test;host=127.0.0.1;port=$port";
my $dsn = "DBI:mysql:test;host=[127.0.0.1];port=$port";
my $dbh = DBI->connect( $dsn, $user, $pass );
my $value= $buf;
View
@@ -7,7 +7,7 @@
my ( $port, $user, $pass, $start, $stop, $commit_interval ) = @ARGV;
my $pk = $start;
my $committed_rows = 0;
my $dsn = "DBI:mysql:test;host=127.0.0.1;port=$port";
my $dsn = "DBI:mysql:test;host=[127.0.0.1];port=$port";
my $dbh = DBI->connect( $dsn, $user, $pass );
if ( $commit_interval == 1 ) {
$dbh->do("SET AUTOCOMMIT=1");
ProTip! Use n and p to navigate between commits in a pull request.