X-Git-Url: https://git.tld-linux.org/?p=packages%2Fmysql.git;a=blobdiff_plain;f=mysqldumpslow-clusters.patch;fp=mysqldumpslow-clusters.patch;h=0000000000000000000000000000000000000000;hp=415ab93477bfb45634704c6928d641a561178c76;hb=fc6ec779771b0ad7c2c8b46475a46deae4866bef;hpb=0204681216a80b2555e050f24f5ff4d1e947d15a diff --git a/mysqldumpslow-clusters.patch b/mysqldumpslow-clusters.patch deleted file mode 100644 index 415ab93..0000000 --- a/mysqldumpslow-clusters.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- percona-server-5.6.20-68.0/scripts/mysqldumpslow.sh~ 2014-08-29 10:58:05.000000000 +0300 -+++ percona-server-5.6.20-68.0/scripts/mysqldumpslow.sh 2014-09-06 20:50:22.000000000 +0300 -@@ -51,8 +51,33 @@ - - $opt{'help'} and usage(); - -+# find config file for first defined cluster -+sub get_defaults_file { -+ my $clusters_file = '/etc/mysql/clusters.conf'; -+ return unless -f $clusters_file; -+ -+ open(my $fh , "< $clusters_file") or return; -+ while (<$fh>) { -+ my ($config, $clusterdir) = m{^([^#]+)\s*=\s*(.+)$}; -+ next unless $config; -+ -+ if ($config !~ m{/}) { -+ my $f = "/etc/mysql/$config"; -+ return $f if -f $f; -+ -+ my $f = "$clusterdir/$config"; -+ return $f if -f $f; -+ } -+ return $config; -+ } -+ close($fh) or die $!; -+ return undef; -+} -+ - unless (@ARGV) { -- my $defaults = `my_print_defaults mysqld`; -+ my $defaults_file = get_defaults_file; -+ my $defaults_arg = "-c $defaults_file" if $defaults_file; -+ my $defaults = `my_print_defaults $defaults_arg mysqld`; - my $basedir = ($defaults =~ m/--basedir=(.*)/)[0] - or die "Can't determine basedir from 'my_print_defaults mysqld' output: $defaults"; - warn "basedir=$basedir\n" if $opt{v}; -@@ -61,7 +86,7 @@ - my $slowlog = ($defaults =~ m/--slow-query-log-file=(.*)/)[0]; - if (!$datadir or $opt{i}) { - # determine the datadir from the instances section of /etc/my.cnf, if any -- my $instances = `my_print_defaults instances`; -+ my $instances = `my_print_defaults $defaults_arg instances`; - die "Can't determine datadir from 'my_print_defaults mysqld' output: $defaults" - unless $instances; - my @instances = ($instances =~ m/^--(\w+)-/mg);