mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-02 02:34:19 +00:00
Fixes for MasterSlave.pm
This commit is contained in:
@@ -2306,7 +2306,7 @@ report_mysql_summary () {
|
|||||||
name_val "InnoDB compression" "$(get_plugin_status "$dir/mysql-plugins" "INNODB_CMP")"
|
name_val "InnoDB compression" "$(get_plugin_status "$dir/mysql-plugins" "INNODB_CMP")"
|
||||||
|
|
||||||
local has_query_cache=$(get_var have_query_cache "$dir/mysql-variables")
|
local has_query_cache=$(get_var have_query_cache "$dir/mysql-variables")
|
||||||
if [ "$has_query_cache == 'YES' ]; then
|
if [ "$has_query_cache" = 'YES' ]; then
|
||||||
section "Query cache"
|
section "Query cache"
|
||||||
local query_cache_size=$(get_var query_cache_size "$dir/mysql-variables")
|
local query_cache_size=$(get_var query_cache_size "$dir/mysql-variables")
|
||||||
local used=$(( ${query_cache_size} - $(get_var Qcache_free_memory "$dir/mysql-status") ))
|
local used=$(( ${query_cache_size} - $(get_var Qcache_free_memory "$dir/mysql-status") ))
|
||||||
|
@@ -2012,7 +2012,7 @@ sub main {
|
|||||||
my $grant = $_;
|
my $grant = $_;
|
||||||
PTDEBUG && _d($grant);
|
PTDEBUG && _d($grant);
|
||||||
my ( $grants, $on_what, $user ) = $grant
|
my ( $grants, $on_what, $user ) = $grant
|
||||||
=~ m/GRANT (.*?) ON (.*?) TO ([`'][^'`]*[`']\@[`'][^'`]*[`'])/;
|
=~ m/GRANT (.*?) ON (.*?) TO ([`'][^'`]*[`']\@[`'][^'`]*[`'])/; # MySQL 8 uses ` instead of ' for `user`@`host`
|
||||||
PTDEBUG && _d('grants:', $grants, 'on_what:', $on_what,
|
PTDEBUG && _d('grants:', $grants, 'on_what:', $on_what,
|
||||||
'user:', $user);
|
'user:', $user);
|
||||||
|
|
||||||
|
BIN
sandbox/servers/8.0/data.tar.gz
Normal file
BIN
sandbox/servers/8.0/data.tar.gz
Normal file
Binary file not shown.
@@ -3,7 +3,6 @@ user = msandbox
|
|||||||
password = msandbox
|
password = msandbox
|
||||||
port = PORT
|
port = PORT
|
||||||
socket = /tmp/PORT/mysql_sandboxPORT.sock
|
socket = /tmp/PORT/mysql_sandboxPORT.sock
|
||||||
loose-local-infile=1
|
|
||||||
|
|
||||||
[mysqld]
|
[mysqld]
|
||||||
port = PORT
|
port = PORT
|
||||||
|
@@ -326,12 +326,17 @@ like($EVAL_ERROR, qr/has no connected slaves/, 'slave 1 is not slave of slave 2'
|
|||||||
map { $ms->stop_slave($_) } @slaves;
|
map { $ms->stop_slave($_) } @slaves;
|
||||||
map { $ms->start_slave($_) } @slaves;
|
map { $ms->start_slave($_) } @slaves;
|
||||||
|
|
||||||
|
# Give the slaves so time to restart
|
||||||
|
sleep(5);
|
||||||
|
|
||||||
my $res;
|
my $res;
|
||||||
$res = $ms->wait_for_master(
|
$res = $ms->wait_for_master(
|
||||||
master_status => $ms->get_master_status($dbh),
|
master_status => $ms->get_master_status($dbh),
|
||||||
slave_dbh => $slaves[0],
|
slave_dbh => $slaves[0],
|
||||||
timeout => 1,
|
timeout => 10,
|
||||||
);
|
);
|
||||||
|
warn "res->{result}: $res->{result}";
|
||||||
|
|
||||||
ok($res->{result} >= 0, 'Wait was successful');
|
ok($res->{result} >= 0, 'Wait was successful');
|
||||||
|
|
||||||
$ms->stop_slave($slaves[0]);
|
$ms->stop_slave($slaves[0]);
|
||||||
|
@@ -59,8 +59,9 @@ ok(
|
|||||||
# entirely by the first iteration.
|
# entirely by the first iteration.
|
||||||
ok(
|
ok(
|
||||||
no_diff($run_with . 'slow002.txt --iterations 2 --report-format=query_report,profile --limit 1',
|
no_diff($run_with . 'slow002.txt --iterations 2 --report-format=query_report,profile --limit 1',
|
||||||
"t/pt-query-digest/samples/slow002_iters_2.txt"),
|
"t/pt-query-digest/samples/slow002_iters_2.txt",
|
||||||
'--iterations'
|
),
|
||||||
|
'--iterations' ,
|
||||||
);
|
);
|
||||||
|
|
||||||
# #############################################################################
|
# #############################################################################
|
||||||
|
Reference in New Issue
Block a user