resolved conflict

This commit is contained in:
frank-cizmich
2015-08-20 18:28:25 -03:00
51 changed files with 947 additions and 956 deletions

View File

@@ -784,6 +784,7 @@ sub new {
'default' => 1, 'default' => 1,
'cumulative' => 1, 'cumulative' => 1,
'negatable' => 1, 'negatable' => 1,
'repeatable' => 1, # means it can be specified more than once
); );
my $self = { my $self = {
@@ -974,6 +975,7 @@ sub _pod_to_specs {
desc => $para desc => $para
. (defined $attribs{default} ? " (default $attribs{default})" : ''), . (defined $attribs{default} ? " (default $attribs{default})" : ''),
group => ($attribs{'group'} ? $attribs{'group'} : 'default'), group => ($attribs{'group'} ? $attribs{'group'} : 'default'),
attributes => \%attribs
}; };
} }
while ( $para = <$fh> ) { while ( $para = <$fh> ) {
@@ -1027,6 +1029,7 @@ sub _parse_specs {
$opt->{is_negatable} = $opt->{spec} =~ m/!/ ? 1 : 0; $opt->{is_negatable} = $opt->{spec} =~ m/!/ ? 1 : 0;
$opt->{is_cumulative} = $opt->{spec} =~ m/\+/ ? 1 : 0; $opt->{is_cumulative} = $opt->{spec} =~ m/\+/ ? 1 : 0;
$opt->{is_repeatable} = $opt->{attributes}->{repeatable} ? 1 : 0;
$opt->{is_required} = $opt->{desc} =~ m/required/ ? 1 : 0; $opt->{is_required} = $opt->{desc} =~ m/required/ ? 1 : 0;
$opt->{group} ||= 'default'; $opt->{group} ||= 'default';
@@ -1170,11 +1173,21 @@ sub _set_option {
return; return;
} }
else { else {
$opt->{value} = $val; if ($opt->{is_repeatable}) {
push @{$opt->{value}} , $val;
}
else {
$opt->{value} = $val;
}
} }
} }
else { else {
$opt->{value} = $val; if ($opt->{is_repeatable}) {
push @{$opt->{value}} , $val;
}
else {
$opt->{value} = $val;
}
} }
$opt->{got} = 1; $opt->{got} = 1;
PTDEBUG && _d('Got option', $long, '=', $val); PTDEBUG && _d('Got option', $long, '=', $val);
@@ -1628,6 +1641,14 @@ sub _read_config_file {
$parse = 0; $parse = 0;
next LINE; next LINE;
} }
if ( $parse
&& !$self->has('version-check')
&& $line =~ /version-check/
) {
next LINE;
}
if ( $parse if ( $parse
&& (my($opt, $arg) = $line =~ m/^\s*([^=\s]+?)(?:\s*=\s*(.*?)\s*)?$/) && (my($opt, $arg) = $line =~ m/^\s*([^=\s]+?)(?:\s*=\s*(.*?)\s*)?$/)
) { ) {
@@ -4921,7 +4942,12 @@ sub version_check {
PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin); PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin);
if ( !$args{force} ) { if ( !$args{force} ) {
if ( $FindBin::Bin if ( $FindBin::Bin
&& (-d "$FindBin::Bin/../.bzr" || -d "$FindBin::Bin/../../.bzr") ) { && (-d "$FindBin::Bin/../.bzr" ||
-d "$FindBin::Bin/../../.bzr" ||
-d "$FindBin::Bin/../.git" ||
-d "$FindBin::Bin/../../.git"
)
) {
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check"); PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
return; return;
} }
@@ -5387,7 +5413,7 @@ sub get_from_mysql {
} }
if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') { if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') {
$item->{vars} = ['version_comment', 'version']; @{$item->{vars}} = grep { $_ eq 'version' || $_ eq 'version_comment' } @{$item->{vars}};
} }
@@ -5559,6 +5585,9 @@ sub main {
if ( $bulk_del && $limit < 2 ) { if ( $bulk_del && $limit < 2 ) {
$o->save_error("--bulk-delete is meaningless with --limit 1"); $o->save_error("--bulk-delete is meaningless with --limit 1");
} }
if ( $o->got('purge') && $o->got('no-delete') ) {
$o->save_error("--purge and --no-delete are mutually exclusive");
}
} }
if ( $bulk_del || $o->get('bulk-insert') ) { if ( $bulk_del || $o->get('bulk-insert') ) {
@@ -5713,17 +5742,23 @@ sub main {
# ######################################################################## # ########################################################################
# Get lag dbh. # Get lag dbh.
# ######################################################################## # ########################################################################
my $lag_dbh; my @lag_dbh;
my $ms; my $ms;
if ( $o->get('check-slave-lag') ) { if ( $o->get('check-slave-lag') ) {
my $dsn_defaults = $dp->parse_options($o); my $dsn_defaults = $dp->parse_options($o);
my $dsn = $dp->parse($o->get('check-slave-lag'), $dsn_defaults); my $lag_slaves_dsn = $o->get('check-slave-lag');
$lag_dbh = $dp->get_dbh($dp->get_cxn_params($dsn), { AutoCommit => 1 }); $ms = new MasterSlave(
$ms = new MasterSlave(
OptionParser => $o, OptionParser => $o,
DSNParser => $dp, DSNParser => $dp,
Quoter => $q, Quoter => $q,
); );
# we get each slave's connection handler (and its id, for debug and reporting)
for my $slave (@$lag_slaves_dsn) {
my $dsn = $dp->parse($slave, $dsn_defaults);
my $lag_dbh = $dp->get_dbh($dp->get_cxn_params($dsn), { AutoCommit => 1 });
my $lag_id = $ms->short_host($dsn);
push @lag_dbh , {'dbh' => $lag_dbh, 'id' => $lag_id}
}
} }
# ######################################################################## # ########################################################################
@@ -6074,6 +6109,7 @@ sub main {
# This row is the first row fetched from each 'chunk'. # This row is the first row fetched from each 'chunk'.
my $first_row = [ @$row ]; my $first_row = [ @$row ];
my $csv_row; my $csv_row;
my $lag_count = 0;
ROW: ROW:
while ( # Quit if: while ( # Quit if:
@@ -6305,14 +6341,24 @@ sub main {
} }
# Check slave lag and wait if slave is too far behind. # Check slave lag and wait if slave is too far behind.
if ( $lag_dbh ) { # Do this check every 100 rows
my $lag = $ms->get_slave_lag($lag_dbh); if (@lag_dbh && $lag_count++ % 100 == 0 ) {
while ( !defined $lag || $lag > $o->get('max-lag') ) { foreach my $lag_server (@lag_dbh) {
PTDEBUG && _d('Sleeping: slave lag is', $lag); my $lag_dbh = $lag_server->{'dbh'};
sleep($o->get('check-interval')); my $id = $lag_server->{'id'};
$lag = $ms->get_slave_lag($lag_dbh); if ( $lag_dbh ) {
$src->{dbh}->do("SELECT 'pt-archiver keepalive'") if $src; my $lag = $ms->get_slave_lag($lag_dbh);
$dst->{dbh}->do("SELECT 'pt-archiver keepalive'") if $dst; while ( !defined $lag || $lag > $o->get('max-lag') ) {
PTDEBUG && _d("Sleeping: slave lag for server '$id' is", $lag);
if ($o->got('progress')) {
_d("Sleeping: slave lag for server '$id' is", $lag);
}
sleep($o->get('check-interval'));
$lag = $ms->get_slave_lag($lag_dbh);
$src->{dbh}->do("SELECT 'pt-archiver keepalive'") if $src;
$dst->{dbh}->do("SELECT 'pt-archiver keepalive'") if $dst;
}
}
} }
} }
} # ROW } # ROW
@@ -6881,13 +6927,16 @@ To disable this check, specify --no-check-columns.
type: time; default: 1s type: time; default: 1s
How often to check for slave lag if L<"--check-slave-lag"> is given. If L<"--check-slave-lag"> is given, this defines how long the tool pauses each
time it discovers that a slave is lagging.
This check is performed every 100 rows.
=item --check-slave-lag =item --check-slave-lag
type: string type: string; repeatable: yes
Pause archiving until the specified DSN's slave lag is less than L<"--max-lag">. Pause archiving until the specified DSN's slave lag is less than L<"--max-lag">.
This option can be specified multiple times for checking more than one slave.
=item --columns =item --columns

View File

@@ -4693,7 +4693,12 @@ sub version_check {
PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin); PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin);
if ( !$args{force} ) { if ( !$args{force} ) {
if ( $FindBin::Bin if ( $FindBin::Bin
&& (-d "$FindBin::Bin/../.bzr" || -d "$FindBin::Bin/../../.bzr") ) { && (-d "$FindBin::Bin/../.bzr" ||
-d "$FindBin::Bin/../../.bzr" ||
-d "$FindBin::Bin/../.git" ||
-d "$FindBin::Bin/../../.git"
)
) {
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check"); PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
return; return;
} }
@@ -5159,7 +5164,7 @@ sub get_from_mysql {
} }
if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') { if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') {
$item->{vars} = ['version_comment', 'version']; @{$item->{vars}} = grep { $_ eq 'version' || $_ eq 'version_comment' } @{$item->{vars}};
} }

View File

@@ -3758,7 +3758,12 @@ sub version_check {
PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin); PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin);
if ( !$args{force} ) { if ( !$args{force} ) {
if ( $FindBin::Bin if ( $FindBin::Bin
&& (-d "$FindBin::Bin/../.bzr" || -d "$FindBin::Bin/../../.bzr") ) { && (-d "$FindBin::Bin/../.bzr" ||
-d "$FindBin::Bin/../../.bzr" ||
-d "$FindBin::Bin/../.git" ||
-d "$FindBin::Bin/../../.git"
)
) {
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check"); PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
return; return;
} }
@@ -4224,7 +4229,7 @@ sub get_from_mysql {
} }
if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') { if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') {
$item->{vars} = ['version_comment', 'version']; @{$item->{vars}} = grep { $_ eq 'version' || $_ eq 'version_comment' } @{$item->{vars}};
} }

View File

@@ -4328,7 +4328,12 @@ sub version_check {
PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin); PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin);
if ( !$args{force} ) { if ( !$args{force} ) {
if ( $FindBin::Bin if ( $FindBin::Bin
&& (-d "$FindBin::Bin/../.bzr" || -d "$FindBin::Bin/../../.bzr") ) { && (-d "$FindBin::Bin/../.bzr" ||
-d "$FindBin::Bin/../../.bzr" ||
-d "$FindBin::Bin/../.git" ||
-d "$FindBin::Bin/../../.git"
)
) {
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check"); PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
return; return;
} }
@@ -4794,7 +4799,7 @@ sub get_from_mysql {
} }
if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') { if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') {
$item->{vars} = ['version_comment', 'version']; @{$item->{vars}} = grep { $_ eq 'version' || $_ eq 'version_comment' } @{$item->{vars}};
} }

View File

@@ -4347,7 +4347,12 @@ sub version_check {
PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin); PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin);
if ( !$args{force} ) { if ( !$args{force} ) {
if ( $FindBin::Bin if ( $FindBin::Bin
&& (-d "$FindBin::Bin/../.bzr" || -d "$FindBin::Bin/../../.bzr") ) { && (-d "$FindBin::Bin/../.bzr" ||
-d "$FindBin::Bin/../../.bzr" ||
-d "$FindBin::Bin/../.git" ||
-d "$FindBin::Bin/../../.git"
)
) {
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check"); PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
return; return;
} }
@@ -4813,7 +4818,7 @@ sub get_from_mysql {
} }
if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') { if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') {
$item->{vars} = ['version_comment', 'version']; @{$item->{vars}} = grep { $_ eq 'version' || $_ eq 'version_comment' } @{$item->{vars}};
} }

View File

@@ -3072,7 +3072,12 @@ sub version_check {
PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin); PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin);
if ( !$args{force} ) { if ( !$args{force} ) {
if ( $FindBin::Bin if ( $FindBin::Bin
&& (-d "$FindBin::Bin/../.bzr" || -d "$FindBin::Bin/../../.bzr") ) { && (-d "$FindBin::Bin/../.bzr" ||
-d "$FindBin::Bin/../../.bzr" ||
-d "$FindBin::Bin/../.git" ||
-d "$FindBin::Bin/../../.git"
)
) {
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check"); PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
return; return;
} }
@@ -3538,7 +3543,7 @@ sub get_from_mysql {
} }
if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') { if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') {
$item->{vars} = ['version_comment', 'version']; @{$item->{vars}} = grep { $_ eq 'version' || $_ eq 'version_comment' } @{$item->{vars}};
} }

View File

@@ -3263,7 +3263,12 @@ sub version_check {
PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin); PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin);
if ( !$args{force} ) { if ( !$args{force} ) {
if ( $FindBin::Bin if ( $FindBin::Bin
&& (-d "$FindBin::Bin/../.bzr" || -d "$FindBin::Bin/../../.bzr") ) { && (-d "$FindBin::Bin/../.bzr" ||
-d "$FindBin::Bin/../../.bzr" ||
-d "$FindBin::Bin/../.git" ||
-d "$FindBin::Bin/../../.git"
)
) {
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check"); PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
return; return;
} }
@@ -3729,7 +3734,7 @@ sub get_from_mysql {
} }
if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') { if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') {
$item->{vars} = ['version_comment', 'version']; @{$item->{vars}} = grep { $_ eq 'version' || $_ eq 'version_comment' } @{$item->{vars}};
} }

View File

@@ -4244,7 +4244,12 @@ sub version_check {
PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin); PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin);
if ( !$args{force} ) { if ( !$args{force} ) {
if ( $FindBin::Bin if ( $FindBin::Bin
&& (-d "$FindBin::Bin/../.bzr" || -d "$FindBin::Bin/../../.bzr") ) { && (-d "$FindBin::Bin/../.bzr" ||
-d "$FindBin::Bin/../../.bzr" ||
-d "$FindBin::Bin/../.git" ||
-d "$FindBin::Bin/../../.git"
)
) {
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check"); PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
return; return;
} }
@@ -4710,7 +4715,7 @@ sub get_from_mysql {
} }
if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') { if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') {
$item->{vars} = ['version_comment', 'version']; @{$item->{vars}} = grep { $_ eq 'version' || $_ eq 'version_comment' } @{$item->{vars}};
} }

View File

@@ -5749,7 +5749,12 @@ sub version_check {
PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin); PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin);
if ( !$args{force} ) { if ( !$args{force} ) {
if ( $FindBin::Bin if ( $FindBin::Bin
&& (-d "$FindBin::Bin/../.bzr" || -d "$FindBin::Bin/../../.bzr") ) { && (-d "$FindBin::Bin/../.bzr" ||
-d "$FindBin::Bin/../../.bzr" ||
-d "$FindBin::Bin/../.git" ||
-d "$FindBin::Bin/../../.git"
)
) {
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check"); PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
return; return;
} }
@@ -6215,7 +6220,7 @@ sub get_from_mysql {
} }
if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') { if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') {
$item->{vars} = ['version_comment', 'version']; @{$item->{vars}} = grep { $_ eq 'version' || $_ eq 'version_comment' } @{$item->{vars}};
} }

View File

@@ -6075,7 +6075,12 @@ sub version_check {
PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin); PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin);
if ( !$args{force} ) { if ( !$args{force} ) {
if ( $FindBin::Bin if ( $FindBin::Bin
&& (-d "$FindBin::Bin/../.bzr" || -d "$FindBin::Bin/../../.bzr") ) { && (-d "$FindBin::Bin/../.bzr" ||
-d "$FindBin::Bin/../../.bzr" ||
-d "$FindBin::Bin/../.git" ||
-d "$FindBin::Bin/../../.git"
)
) {
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check"); PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
return; return;
} }
@@ -6541,7 +6546,7 @@ sub get_from_mysql {
} }
if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') { if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') {
$item->{vars} = ['version_comment', 'version']; @{$item->{vars}} = grep { $_ eq 'version' || $_ eq 'version_comment' } @{$item->{vars}};
} }
@@ -6709,7 +6714,13 @@ sub main {
my $proc_sth; my $proc_sth;
my $kill; # callback to KILL my $kill; # callback to KILL
my $kill_sth; my $kill_sth;
my $kill_sql = $o->get('kill-query') ? 'KILL QUERY ?' : 'KILL ?'; my $kill_sql;
if ( $o->get('rds') ){
$kill_sql = $o->get('kill-query') ? 'CALL mysql.rds_kill_query(?)' : 'CALL mysql.rds_kill(?)';
}
else{
$kill_sql = $o->get('kill-query') ? 'KILL QUERY ?' : 'KILL ?';
}
my $files; my $files;
if ( $files = $o->get('test-matching') ) { if ( $files = $o->get('test-matching') ) {
PTDEBUG && _d('Getting processlist from files:', @$files); PTDEBUG && _d('Getting processlist from files:', @$files);
@@ -7642,6 +7653,14 @@ Note that this is a digest (or hash) of the query's "fingerprint",
so queries of the same form but with different values will have the same ID. so queries of the same form but with different values will have the same ID.
See pt-query-digest for more information. See pt-query-digest for more information.
=item --rds
Denotes the instance in question is on Amazon RDS. By default pt-kill runs
the MySQL command "kill" for L<"--kill"> and "kill query" L<"--kill-query">.
On RDS these two commands are not available and are replaced by function calls.
This option modifies L<"--kill"> to use "CALL mysql.rds_kill(thread-id)" instead
and L<"--kill-query"> to use "CALL mysql.rds_kill_query(thread-id)"
=item --run-time =item --run-time
type: time type: time

View File

@@ -75,6 +75,7 @@ HAVE_EXT_ARGV="" # Got --, everything else is put into EXT_ARGV
OPT_ERRS=0 # How many command line option errors OPT_ERRS=0 # How many command line option errors
OPT_VERSION="" # If --version was specified OPT_VERSION="" # If --version was specified
OPT_HELP="" # If --help was specified OPT_HELP="" # If --help was specified
OPT_ASK_PASS="" # If --ask-pass was specified
PO_DIR="" # Directory with program option spec files PO_DIR="" # Directory with program option spec files
usage() { usage() {
@@ -175,6 +176,7 @@ parse_options() {
OPT_ERRS=0 OPT_ERRS=0
OPT_VERSION="" OPT_VERSION=""
OPT_HELP="" OPT_HELP=""
OPT_ASK_PASS=""
PO_DIR="$PT_TMPDIR/po" PO_DIR="$PT_TMPDIR/po"
if [ ! -d "$PO_DIR" ]; then if [ ! -d "$PO_DIR" ]; then
@@ -489,7 +491,14 @@ mysql_options() {
if [ -n "$OPT_USER" ]; then if [ -n "$OPT_USER" ]; then
MYSQL_ARGS="$MYSQL_ARGS --user=$OPT_USER" MYSQL_ARGS="$MYSQL_ARGS --user=$OPT_USER"
fi fi
if [ -n "$OPT_PASSWORD" ]; then if [ -n "$OPT_ASK_PASS" ]; then
stty -echo
>&2 printf "Enter MySQL password: "
read GIVEN_PASS
stty echo
printf "\n"
MYSQL_ARGS="$MYSQL_ARGS --password=$GIVEN_PASS"
elif [ -n "$OPT_PASSWORD" ]; then
MYSQL_ARGS="$MYSQL_ARGS --password=$OPT_PASSWORD" MYSQL_ARGS="$MYSQL_ARGS --password=$OPT_PASSWORD"
fi fi
@@ -2923,6 +2932,10 @@ All options after -- are passed to C<mysql>.
mysqldump and summarize all databases. See L<"--databases">. mysqldump and summarize all databases. See L<"--databases">.
=item --ask-pass
Prompt for a password when connecting to MySQL.
=item --config =item --config
type: string type: string

View File

@@ -40,7 +40,6 @@ BEGIN {
HTTP::Micro HTTP::Micro
VersionCheck VersionCheck
Percona::XtraDB::Cluster Percona::XtraDB::Cluster
ReadKeyMini
)); ));
} }
@@ -7077,7 +7076,12 @@ sub version_check {
PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin); PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin);
if ( !$args{force} ) { if ( !$args{force} ) {
if ( $FindBin::Bin if ( $FindBin::Bin
&& (-d "$FindBin::Bin/../.bzr" || -d "$FindBin::Bin/../../.bzr") ) { && (-d "$FindBin::Bin/../.bzr" ||
-d "$FindBin::Bin/../../.bzr" ||
-d "$FindBin::Bin/../.git" ||
-d "$FindBin::Bin/../../.git"
)
) {
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check"); PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
return; return;
} }
@@ -7543,7 +7547,7 @@ sub get_from_mysql {
} }
if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') { if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') {
$item->{vars} = ['version_comment', 'version']; @{$item->{vars}} = grep { $_ eq 'version' || $_ eq 'version_comment' } @{$item->{vars}};
} }
@@ -7786,161 +7790,6 @@ sub _d {
# End Percona::XtraDB::Cluster package # End Percona::XtraDB::Cluster package
# ########################################################################### # ###########################################################################
# ###########################################################################
# ReadKeyMini package
# This package is a copy without comments from the original. The original
# with comments and its test file can be found in the Bazaar repository at,
# lib/ReadKeyMini.pm
# t/lib/ReadKeyMini.t
# See https://launchpad.net/percona-toolkit for more information.
# ###########################################################################
{
BEGIN {
package ReadKeyMini;
BEGIN { $INC{"ReadKeyMini.pm"} ||= 1 }
use warnings;
use strict;
use English qw(-no_match_vars);
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
use POSIX qw( :termios_h );
use Fcntl qw( F_SETFL F_GETFL );
use base qw( Exporter );
BEGIN {
our @EXPORT_OK = qw( GetTerminalSize ReadMode );
*ReadMode = *Term::ReadKey::ReadMode = \&_ReadMode;
*GetTerminalSize = *Term::ReadKey::GetTerminalSize = \&_GetTerminalSize;
}
my %modes = (
original => 0,
restore => 0,
normal => 1,
noecho => 2,
cbreak => 3,
raw => 4,
'ultra-raw' => 5,
);
{
my $fd_stdin = fileno(STDIN);
my $flags;
unless ( $PerconaTest::DONT_RESTORE_STDIN ) {
$flags = fcntl(STDIN, F_GETFL, 0)
or warn "Error getting STDIN flags with fcntl: $OS_ERROR";
}
my $term = POSIX::Termios->new();
$term->getattr($fd_stdin);
my $oterm = $term->getlflag();
my $echo = ECHO | ECHOK | ICANON;
my $noecho = $oterm & ~$echo;
sub _ReadMode {
my $mode = $modes{ $_[0] };
if ( $mode == $modes{normal} ) {
cooked();
}
elsif ( $mode == $modes{cbreak} || $mode == $modes{noecho} ) {
cbreak( $mode == $modes{noecho} ? $noecho : $oterm );
}
else {
die("ReadMore('$_[0]') not supported");
}
}
sub cbreak {
my ($lflag) = $_[0] || $noecho;
$term->setlflag($lflag);
$term->setcc( VTIME, 1 );
$term->setattr( $fd_stdin, TCSANOW );
}
sub cooked {
$term->setlflag($oterm);
$term->setcc( VTIME, 0 );
$term->setattr( $fd_stdin, TCSANOW );
if ( !$PerconaTest::DONT_RESTORE_STDIN ) {
fcntl(STDIN, F_SETFL, int($flags))
or warn "Error restoring STDIN flags with fcntl: $OS_ERROR";
}
}
END { cooked() }
}
sub readkey {
my $key = '';
cbreak();
sysread(STDIN, $key, 1);
my $timeout = 0.1;
if ( $key eq "\033" ) {
my $x = '';
STDIN->blocking(0);
sysread(STDIN, $x, 2);
STDIN->blocking(1);
$key .= $x;
redo if $key =~ /\[[0-2](?:[0-9];)?$/
}
cooked();
return $key;
}
BEGIN {
eval { no warnings; local $^W; require 'sys/ioctl.ph' };
if ( !defined &TIOCGWINSZ ) {
*TIOCGWINSZ = sub () {
$^O eq 'linux' ? 0x005413
: $^O eq 'solaris' ? 0x005468
: 0x40087468;
};
}
}
sub _GetTerminalSize {
if ( @_ ) {
die "My::Term::ReadKey doesn't implement GetTerminalSize with arguments";
}
my $cols = $ENV{COLUMNS} || 80;
my $rows = $ENV{LINES} || 24;
if ( open( TTY, "+<", "/dev/tty" ) ) { # Got a tty
my $winsize = '';
if ( ioctl( TTY, &TIOCGWINSZ, $winsize ) ) {
( $rows, $cols, my ( $xpixel, $ypixel ) ) = unpack( 'S4', $winsize );
return ( $cols, $rows, $xpixel, $ypixel );
}
}
if ( $rows = `tput lines 2>/dev/null` ) {
chomp($rows);
chomp($cols = `tput cols`);
}
elsif ( my $stty = `stty -a 2>/dev/null` ) {
($rows, $cols) = $stty =~ /([0-9]+) rows; ([0-9]+) columns;/;
}
else {
($cols, $rows) = @ENV{qw( COLUMNS LINES )};
$cols ||= 80;
$rows ||= 24;
}
return ( $cols, $rows );
}
}
1;
}
# ###########################################################################
# End ReadKeyMini package
# ###########################################################################
# ########################################################################### # ###########################################################################
# This is a combination of modules and programs in one -- a runnable module. # This is a combination of modules and programs in one -- a runnable module.
@@ -7966,8 +7815,19 @@ $Data::Dumper::Indent = 1;
$Data::Dumper::Sortkeys = 1; $Data::Dumper::Sortkeys = 1;
$Data::Dumper::Quotekeys = 0; $Data::Dumper::Quotekeys = 0;
# Import Term::Readkey if available
# Not critical so don't fail if it's not
my $term_readkey = eval {
require Term::ReadKey;
Term::ReadKey->import();
1;
};
use sigtrap 'handler', \&sig_int, 'normal-signals'; use sigtrap 'handler', \&sig_int, 'normal-signals';
my $exit_status = 0; my $exit_status = 0;
my $oktorun = 1; my $oktorun = 1;
my $dont_interrupt_now = 0; my $dont_interrupt_now = 0;
@@ -9260,6 +9120,12 @@ sub main {
$sys_load_pr->start() if $sys_load_pr; $sys_load_pr->start() if $sys_load_pr;
$sys_load->wait(Progress => $sys_load_pr); $sys_load->wait(Progress => $sys_load_pr);
# sleep between chunks to avoid overloading PXC nodes
my $sleep = $args{NibbleIterator}->{OptionParser}->get('sleep');
if ( $sleep ) {
sleep $sleep;
}
return; return;
}, },
done => sub { done => sub {
@@ -10683,12 +10549,10 @@ sub sig_int {
} }
$oktorun = 0; # flag for cleanup tasks $oktorun = 0; # flag for cleanup tasks
print STDERR "# Exiting on SIG$signal.\n"; print STDERR "# Exiting on SIG$signal.\n";
# restore terminal to normal state in case CTL+C issued while # This is to restore terminal to "normal". lp #1396870
# asking for password if ($term_readkey) {
# https://bugs.launchpad.net/percona-toolkit/+bug/1396870 ReadMode(0);
# note: just including ReadKeyMini seems to solve the bug, }
# but lets use it explicitly so we don't forget why we need it
ReadKeyMini::ReadMode 0;
exit 1; exit 1;
} }
@@ -11495,6 +11359,15 @@ value of C<10000>.
The tool prints a warning and continues if a variable cannot be set. The tool prints a warning and continues if a variable cannot be set.
=item --sleep
type: float; default: 0
How long to sleep (in seconds) after copying each chunk. This option is useful
when throttling by L<"--max-lag"> and L<"--max-load"> are not possible.
A small, sub-second value should be used, like 0.1, else the tool could take
a very long time to copy large tables.
=item --socket =item --socket
short form: -S; type: string short form: -S; type: string

View File

@@ -5278,6 +5278,8 @@ $Data::Dumper::Indent = 1;
$Data::Dumper::Sortkeys = 1; $Data::Dumper::Sortkeys = 1;
$Data::Dumper::Quotekeys = 0; $Data::Dumper::Quotekeys = 0;
use Digest::MD5 qw(md5);
use constant BUCK_SIZE => 1.05; use constant BUCK_SIZE => 1.05;
use constant BASE_LOG => log(BUCK_SIZE); use constant BASE_LOG => log(BUCK_SIZE);
use constant BASE_OFFSET => abs(1 - log(0.000001) / BASE_LOG); # 284.1617969 use constant BASE_OFFSET => abs(1 - log(0.000001) / BASE_LOG); # 284.1617969
@@ -5805,6 +5807,7 @@ sub top_events {
my @sorted = reverse sort { # Sorted list of $groupby values my @sorted = reverse sort { # Sorted list of $groupby values
$classes->{$a}->{$args{attrib}}->{$args{orderby}} $classes->{$a}->{$args{attrib}}->{$args{orderby}}
<=> $classes->{$b}->{$args{attrib}}->{$args{orderby}} <=> $classes->{$b}->{$args{attrib}}->{$args{orderby}}
|| tiebreaker($classes->{$a}, $classes->{$b});
} grep { } grep {
defined $classes->{$_}->{$args{attrib}}->{$args{orderby}} defined $classes->{$_}->{$args{attrib}}->{$args{orderby}}
} keys %$classes; # this should first be sorted for test consistency, but many tests already in place would fail } keys %$classes; # this should first be sorted for test consistency, but many tests already in place would fail
@@ -5841,6 +5844,15 @@ sub top_events {
return \@chosen, \@other; return \@chosen, \@other;
} }
sub tiebreaker {
my ($a, $b) = @_;
if (defined $a->{pos_in_log}) {
return $a->{pos_in_log}->{max} cmp $b->{pos_in_log}->{max};
}
return 0;
}
sub add_new_attributes { sub add_new_attributes {
my ( $self, $event ) = @_; my ( $self, $event ) = @_;
return unless $event; return unless $event;
@@ -12333,7 +12345,12 @@ sub version_check {
PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin); PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin);
if ( !$args{force} ) { if ( !$args{force} ) {
if ( $FindBin::Bin if ( $FindBin::Bin
&& (-d "$FindBin::Bin/../.bzr" || -d "$FindBin::Bin/../../.bzr") ) { && (-d "$FindBin::Bin/../.bzr" ||
-d "$FindBin::Bin/../../.bzr" ||
-d "$FindBin::Bin/../.git" ||
-d "$FindBin::Bin/../../.git"
)
) {
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check"); PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
return; return;
} }
@@ -12799,7 +12816,7 @@ sub get_from_mysql {
} }
if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') { if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') {
$item->{vars} = ['version_comment', 'version']; @{$item->{vars}} = grep { $_ eq 'version' || $_ eq 'version_comment' } @{$item->{vars}};
} }

View File

@@ -579,7 +579,7 @@ main() {
eval "PR_$prog_base"="${BASEDIR}/$prog" eval "PR_$prog_base"="${BASEDIR}/$prog"
elif which "curl" >/dev/null 2>&1; then elif which "curl" >/dev/null 2>&1; then
echo "Fetching $prog" >&2 echo "Fetching $prog" >&2
curl "http://www.percona.com/get/$prog" > "$prog" && chmod +x "$prog" curl -L "https://www.percona.com/get/$prog" > "$prog" && chmod +x "$prog"
eval "PR_$prog_base"="./$prog" eval "PR_$prog_base"="./$prog"
else else
echo "Cannot find or fetch required program: $prog" >&2 echo "Cannot find or fetch required program: $prog" >&2

View File

@@ -3597,7 +3597,12 @@ sub version_check {
PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin); PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin);
if ( !$args{force} ) { if ( !$args{force} ) {
if ( $FindBin::Bin if ( $FindBin::Bin
&& (-d "$FindBin::Bin/../.bzr" || -d "$FindBin::Bin/../../.bzr") ) { && (-d "$FindBin::Bin/../.bzr" ||
-d "$FindBin::Bin/../../.bzr" ||
-d "$FindBin::Bin/../.git" ||
-d "$FindBin::Bin/../../.git"
)
) {
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check"); PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
return; return;
} }
@@ -4063,7 +4068,7 @@ sub get_from_mysql {
} }
if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') { if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') {
$item->{vars} = ['version_comment', 'version']; @{$item->{vars}} = grep { $_ eq 'version' || $_ eq 'version_comment' } @{$item->{vars}};
} }

View File

@@ -4246,7 +4246,12 @@ sub version_check {
PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin); PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin);
if ( !$args{force} ) { if ( !$args{force} ) {
if ( $FindBin::Bin if ( $FindBin::Bin
&& (-d "$FindBin::Bin/../.bzr" || -d "$FindBin::Bin/../../.bzr") ) { && (-d "$FindBin::Bin/../.bzr" ||
-d "$FindBin::Bin/../../.bzr" ||
-d "$FindBin::Bin/../.git" ||
-d "$FindBin::Bin/../../.git"
)
) {
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check"); PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
return; return;
} }
@@ -4712,7 +4717,7 @@ sub get_from_mysql {
} }
if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') { if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') {
$item->{vars} = ['version_comment', 'version']; @{$item->{vars}} = grep { $_ eq 'version' || $_ eq 'version_comment' } @{$item->{vars}};
} }

View File

@@ -838,6 +838,7 @@ collect() {
local mutex="SHOW MUTEX STATUS" local mutex="SHOW MUTEX STATUS"
fi fi
innodb_status 1 innodb_status 1
tokudb_status 1
$CMD_MYSQL $EXT_ARGV -e "$mutex" >> "$d/$p-mutex-status1" & $CMD_MYSQL $EXT_ARGV -e "$mutex" >> "$d/$p-mutex-status1" &
open_tables >> "$d/$p-opentables1" & open_tables >> "$d/$p-opentables1" &
@@ -988,6 +989,7 @@ collect() {
fi fi
innodb_status 2 innodb_status 2
tokudb_status 2
$CMD_MYSQL $EXT_ARGV -e "$mutex" >> "$d/$p-mutex-status2" & $CMD_MYSQL $EXT_ARGV -e "$mutex" >> "$d/$p-mutex-status2" &
open_tables >> "$d/$p-opentables2" & open_tables >> "$d/$p-opentables2" &
@@ -1055,6 +1057,13 @@ transactions() {
$CMD_MYSQL $EXT_ARGV -e "SELECT SQL_NO_CACHE * FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS\G" $CMD_MYSQL $EXT_ARGV -e "SELECT SQL_NO_CACHE * FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS\G"
} }
tokudb_status() {
local n=$1
$CMD_MYSQL $EXT_ARGV -e "SHOW ENGINE TOKUDB STATUS\G" \
>> "$d/$p-tokudbstatus$n" || rm -f "$d/$p-tokudbstatus$n"
}
innodb_status() { innodb_status() {
local n=$1 local n=$1

View File

@@ -832,7 +832,12 @@ sub version_check {
PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin); PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin);
if ( !$args{force} ) { if ( !$args{force} ) {
if ( $FindBin::Bin if ( $FindBin::Bin
&& (-d "$FindBin::Bin/../.bzr" || -d "$FindBin::Bin/../../.bzr") ) { && (-d "$FindBin::Bin/../.bzr" ||
-d "$FindBin::Bin/../../.bzr" ||
-d "$FindBin::Bin/../.git" ||
-d "$FindBin::Bin/../../.git"
)
) {
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check"); PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
return; return;
} }
@@ -1298,7 +1303,7 @@ sub get_from_mysql {
} }
if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') { if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') {
$item->{vars} = ['version_comment', 'version']; @{$item->{vars}} = grep { $_ eq 'version' || $_ eq 'version_comment' } @{$item->{vars}};
} }

View File

@@ -9105,7 +9105,12 @@ sub version_check {
PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin); PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin);
if ( !$args{force} ) { if ( !$args{force} ) {
if ( $FindBin::Bin if ( $FindBin::Bin
&& (-d "$FindBin::Bin/../.bzr" || -d "$FindBin::Bin/../../.bzr") ) { && (-d "$FindBin::Bin/../.bzr" ||
-d "$FindBin::Bin/../../.bzr" ||
-d "$FindBin::Bin/../.git" ||
-d "$FindBin::Bin/../../.git"
)
) {
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check"); PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
return; return;
} }
@@ -9571,7 +9576,7 @@ sub get_from_mysql {
} }
if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') { if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') {
$item->{vars} = ['version_comment', 'version']; @{$item->{vars}} = grep { $_ eq 'version' || $_ eq 'version_comment' } @{$item->{vars}};
} }

View File

@@ -4069,7 +4069,12 @@ sub version_check {
PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin); PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin);
if ( !$args{force} ) { if ( !$args{force} ) {
if ( $FindBin::Bin if ( $FindBin::Bin
&& (-d "$FindBin::Bin/../.bzr" || -d "$FindBin::Bin/../../.bzr") ) { && (-d "$FindBin::Bin/../.bzr" ||
-d "$FindBin::Bin/../../.bzr" ||
-d "$FindBin::Bin/../.git" ||
-d "$FindBin::Bin/../../.git"
)
) {
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check"); PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
return; return;
} }
@@ -4535,7 +4540,7 @@ sub get_from_mysql {
} }
if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') { if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') {
$item->{vars} = ['version_comment', 'version']; @{$item->{vars}} = grep { $_ eq 'version' || $_ eq 'version_comment' } @{$item->{vars}};
} }

View File

@@ -4504,7 +4504,12 @@ sub version_check {
PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin); PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin);
if ( !$args{force} ) { if ( !$args{force} ) {
if ( $FindBin::Bin if ( $FindBin::Bin
&& (-d "$FindBin::Bin/../.bzr" || -d "$FindBin::Bin/../../.bzr") ) { && (-d "$FindBin::Bin/../.bzr" ||
-d "$FindBin::Bin/../../.bzr" ||
-d "$FindBin::Bin/../.git" ||
-d "$FindBin::Bin/../../.git"
)
) {
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check"); PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
return; return;
} }
@@ -4970,7 +4975,7 @@ sub get_from_mysql {
} }
if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') { if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') {
$item->{vars} = ['version_comment', 'version']; @{$item->{vars}} = grep { $_ eq 'version' || $_ eq 'version_comment' } @{$item->{vars}};
} }

View File

@@ -6,8 +6,8 @@ Build-Depends: debhelper (>= 4.2)
Build-Depends-Indep: perl (>= 5.6.0-16) Build-Depends-Indep: perl (>= 5.6.0-16)
Standards-Version: 3.7.2 Standards-Version: 3.7.2
Homepage: http://www.percona.com/software/percona-toolkit/ Homepage: http://www.percona.com/software/percona-toolkit/
Vcs-Browser: http://bazaar.launchpad.net/~percona-toolkit-dev/percona-toolkit/0.9/files Vcs-Browser: https://github.com/percona/percona-toolkit
Vcs-Bzr: bzr+ssh://bazaar.launchpad.net/~percona-toolkit-ddev/percona-toolkit/0.9/ Vcs-Git: git://github.com/percona/percona-toolkit.git
Package: percona-toolkit Package: percona-toolkit
Architecture: all Architecture: all

1
docs/user/README Normal file
View File

@@ -0,0 +1 @@
directory used for user documentation

View File

@@ -69,6 +69,7 @@ sub new {
'default' => 1, 'default' => 1,
'cumulative' => 1, 'cumulative' => 1,
'negatable' => 1, 'negatable' => 1,
'repeatable' => 1, # means it can be specified more than once
); );
my $self = { my $self = {
@@ -308,6 +309,7 @@ sub _pod_to_specs {
desc => $para desc => $para
. (defined $attribs{default} ? " (default $attribs{default})" : ''), . (defined $attribs{default} ? " (default $attribs{default})" : ''),
group => ($attribs{'group'} ? $attribs{'group'} : 'default'), group => ($attribs{'group'} ? $attribs{'group'} : 'default'),
attributes => \%attribs
}; };
} }
while ( $para = <$fh> ) { while ( $para = <$fh> ) {
@@ -377,6 +379,7 @@ sub _parse_specs {
$opt->{is_negatable} = $opt->{spec} =~ m/!/ ? 1 : 0; $opt->{is_negatable} = $opt->{spec} =~ m/!/ ? 1 : 0;
$opt->{is_cumulative} = $opt->{spec} =~ m/\+/ ? 1 : 0; $opt->{is_cumulative} = $opt->{spec} =~ m/\+/ ? 1 : 0;
$opt->{is_repeatable} = $opt->{attributes}->{repeatable} ? 1 : 0;
$opt->{is_required} = $opt->{desc} =~ m/required/ ? 1 : 0; $opt->{is_required} = $opt->{desc} =~ m/required/ ? 1 : 0;
$opt->{group} ||= 'default'; $opt->{group} ||= 'default';
@@ -568,11 +571,23 @@ sub _set_option {
return; return;
} }
else { else {
$opt->{value} = $val; # have to make value an array if it is 'repeatable'
if ($opt->{is_repeatable}) {
push @{$opt->{value}} , $val;
}
else {
$opt->{value} = $val;
}
} }
} }
else { else {
$opt->{value} = $val; # have to make value an array if it is 'repeatable'
if ($opt->{is_repeatable}) {
push @{$opt->{value}} , $val;
}
else {
$opt->{value} = $val;
}
} }
$opt->{got} = 1; $opt->{got} = 1;
PTDEBUG && _d('Got option', $long, '=', $val); PTDEBUG && _d('Got option', $long, '=', $val);
@@ -1135,9 +1150,9 @@ sub _read_config_file {
# Silently ignore option [no]-version-check if it is unsupported and it comes from a config file # Silently ignore option [no]-version-check if it is unsupported and it comes from a config file
# TODO: Ideally , this should be generalized for all unsupported options that come from global files # TODO: Ideally , this should be generalized for all unsupported options that come from global files
if ( $parse if ( $parse
&& !$self->has('version-check') && !$self->has('version-check')
&& $line =~ /version-check/ && $line =~ /version-check/
) { ) {
next LINE; next LINE;
} }

View File

@@ -72,7 +72,7 @@ my %server_type = (
node => 1, node => 1,
); );
my $test_dbs = qr/^(?:mysql|information_schema|sakila|performance_schema|percona_test)$/; my $test_dbs = qr/^(?:mysql|information_schema|sakila|performance_schema|percona_test|sys)$/;
sub new { sub new {
my ( $class, %args ) = @_; my ( $class, %args ) = @_;

View File

@@ -105,13 +105,18 @@ sub version_check {
# and it is by default because the option is on by default in PT 2.2. # and it is by default because the option is on by default in PT 2.2.
# However, we do not want dev and testing to v-c, so even though this # However, we do not want dev and testing to v-c, so even though this
# sub is called, force should be false because $o->got('version-check') # sub is called, force should be false because $o->got('version-check')
# is false, then check for a .bzr dir which indicates dev or testing. # is false, then check for a .bzr or .git dir which indicates dev or testing.
# ../.bzr is when a tool is ran from /bin/; ../../.bzr is when a tool # ../.bzr is when a tool is ran from /bin/; ../../.bzr is when a tool
# is ran as a module from /t/<tool>/. # is ran as a module from /t/<tool>/.
PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin); PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin);
if ( !$args{force} ) { if ( !$args{force} ) {
if ( $FindBin::Bin if ( $FindBin::Bin
&& (-d "$FindBin::Bin/../.bzr" || -d "$FindBin::Bin/../../.bzr") ) { && (-d "$FindBin::Bin/../.bzr" ||
-d "$FindBin::Bin/../../.bzr" ||
-d "$FindBin::Bin/../.git" ||
-d "$FindBin::Bin/../../.git"
)
) {
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check"); PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
return; return;
} }

View File

@@ -40,7 +40,15 @@ mysql_options() {
if [ -n "$OPT_USER" ]; then if [ -n "$OPT_USER" ]; then
MYSQL_ARGS="$MYSQL_ARGS --user=$OPT_USER" MYSQL_ARGS="$MYSQL_ARGS --user=$OPT_USER"
fi fi
if [ -n "$OPT_PASSWORD" ]; then # handle ask-pass option (issue lp#1455486)
if [ -n "$OPT_ASK_PASS" ]; then
stty -echo
>&2 printf "Enter MySQL password: "
read GIVEN_PASS
stty echo
printf "\n"
MYSQL_ARGS="$MYSQL_ARGS --password=$GIVEN_PASS"
elif [ -n "$OPT_PASSWORD" ]; then
MYSQL_ARGS="$MYSQL_ARGS --password=$OPT_PASSWORD" MYSQL_ARGS="$MYSQL_ARGS --password=$OPT_PASSWORD"
fi fi

Binary file not shown.

View File

@@ -26,7 +26,7 @@ CREATE TABLE IF NOT EXISTS `slave_master_info` (
`Number_of_lines` int(10) unsigned NOT NULL COMMENT 'Number of lines in the file.', `Number_of_lines` int(10) unsigned NOT NULL COMMENT 'Number of lines in the file.',
`Master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'The name of the master binary log currently being read from the master.', `Master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'The name of the master binary log currently being read from the master.',
`Master_log_pos` bigint(20) unsigned NOT NULL COMMENT 'The master log position of the last read event.', `Master_log_pos` bigint(20) unsigned NOT NULL COMMENT 'The master log position of the last read event.',
`Host` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'The host name of the master.', `Host` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'The host name of the master.',
`User_name` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The user name used to connect to the master.', `User_name` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The user name used to connect to the master.',
`User_password` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The password used to connect to the master.', `User_password` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The password used to connect to the master.',
`Port` int(10) unsigned NOT NULL COMMENT 'The network port used to connect to the master.', `Port` int(10) unsigned NOT NULL COMMENT 'The network port used to connect to the master.',
@@ -61,7 +61,6 @@ CREATE TABLE IF NOT EXISTS `slave_relay_log_info` (
PRIMARY KEY (`Id`) PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Relay Log Information'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Relay Log Information';
CREATE TABLE IF NOT EXISTS `slave_worker_info` ( CREATE TABLE IF NOT EXISTS `slave_worker_info` (
`Id` int(10) unsigned NOT NULL, `Id` int(10) unsigned NOT NULL,
`Relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `Relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
@@ -77,73 +76,3 @@ CREATE TABLE IF NOT EXISTS `slave_worker_info` (
`Checkpoint_group_bitmap` blob NOT NULL, `Checkpoint_group_bitmap` blob NOT NULL,
PRIMARY KEY (`Id`) PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Worker Information'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Worker Information';
CREATE TABLE IF NOT EXISTS `help_category` (
`help_category_id` smallint(5) unsigned NOT NULL,
`name` char(64) NOT NULL,
`parent_category_id` smallint(5) unsigned DEFAULT NULL,
`url` text NOT NULL,
PRIMARY KEY (`help_category_id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='help categories';
CREATE TABLE IF NOT EXISTS `help_keyword` (
`help_keyword_id` int(10) unsigned NOT NULL,
`name` char(64) NOT NULL,
PRIMARY KEY (`help_keyword_id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='help keywords';
CREATE TABLE IF NOT EXISTS `help_relation` (
`help_topic_id` int(10) unsigned NOT NULL,
`help_keyword_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`help_keyword_id`,`help_topic_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='keyword-topic relation';
CREATE TABLE IF NOT EXISTS `help_topic` (
`help_topic_id` int(10) unsigned NOT NULL,
`name` char(64) NOT NULL,
`help_category_id` smallint(5) unsigned NOT NULL,
`description` text NOT NULL,
`example` text NOT NULL,
`url` text NOT NULL,
PRIMARY KEY (`help_topic_id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='help topics';
CREATE TABLE IF NOT EXISTS `time_zone` (
`Time_zone_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`Use_leap_seconds` enum('Y','N') NOT NULL DEFAULT 'N',
PRIMARY KEY (`Time_zone_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Time zones';
CREATE TABLE IF NOT EXISTS `time_zone_leap_second` (
`Transition_time` bigint(20) NOT NULL,
`Correction` int(11) NOT NULL,
PRIMARY KEY (`Transition_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Leap seconds information for time zones';
CREATE TABLE IF NOT EXISTS `time_zone_name` (
`Name` char(64) NOT NULL,
`Time_zone_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`Name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Time zone names';
CREATE TABLE IF NOT EXISTS `time_zone_transition` (
`Time_zone_id` int(10) unsigned NOT NULL,
`Transition_time` bigint(20) NOT NULL,
`Transition_type_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`Time_zone_id`,`Transition_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Time zone transitions';
CREATE TABLE IF NOT EXISTS `time_zone_transition_type` (
`Time_zone_id` int(10) unsigned NOT NULL,
`Transition_type_id` int(10) unsigned NOT NULL,
`Offset` int(11) NOT NULL DEFAULT '0',
`Is_DST` tinyint(3) unsigned NOT NULL DEFAULT '0',
`Abbreviation` char(8) NOT NULL DEFAULT '',
PRIMARY KEY (`Time_zone_id`,`Transition_type_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Time zone transition types';

BIN
t/lib/.VersionCheck.t.swp Normal file

Binary file not shown.

View File

@@ -2123,6 +2123,10 @@ is(
# direct STDOUT to a file and still see the prompt # direct STDOUT to a file and still see the prompt
# ############################################################################# # #############################################################################
SKIP: {
eval {require Term::ReadKey};
skip ('\'prompt_no_echo outputs to STDERR\' because Term::ReadKey not available', 1) if $EVAL_ERROR;
$o = new OptionParser(); $o = new OptionParser();
$output = output( $output = output(
@@ -2141,6 +2145,8 @@ is (
'prompt_no_echo outputs prompt to STDERR' 'prompt_no_echo outputs prompt to STDERR'
); );
} # end skip
# ############################################################################# # #############################################################################
# Issue 1361293: Global config file with no-version-check option makes tools # Issue 1361293: Global config file with no-version-check option makes tools
# that don't recognize the option fail. # that don't recognize the option fail.

View File

@@ -634,8 +634,8 @@ SKIP: {
my $root_dbh = DBI->connect( my $root_dbh = DBI->connect(
"DBI:mysql:host=127.0.0.1;port=12345", 'root', 'msandbox', "DBI:mysql:host=127.0.0.1;port=12345", 'root', 'msandbox',
{ PrintError => 0, RaiseError => 1 }); { PrintError => 0, RaiseError => 1 });
$root_dbh->do("GRANT SELECT ON test.* TO 'user'\@'\%'");
$root_dbh->do('FLUSH PRIVILEGES'); $root_dbh->do(q[GRANT SELECT ON test.* TO 'user'@'%'] ) || die($root_dbh->errstr);
my $user_dbh = DBI->connect( my $user_dbh = DBI->connect(
"DBI:mysql:host=127.0.0.1;port=12345", 'user', undef, "DBI:mysql:host=127.0.0.1;port=12345", 'user', undef,
@@ -970,4 +970,4 @@ diag(`$trunk/sandbox/stop-sandbox $master3_port >/dev/null`);
$sb->wipe_clean($dbh) if $dbh; $sb->wipe_clean($dbh) if $dbh;
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
done_testing; done_testing;
exit; exit;

View File

@@ -28,6 +28,7 @@ elsif ( !$slave1_dbh ) {
plan skip_all => 'Cannot connect to sandbox slave1'; plan skip_all => 'Cannot connect to sandbox slave1';
} }
$sb->create_dbs($master_dbh, ['test']); $sb->create_dbs($master_dbh, ['test']);
my $output; my $output;
@@ -222,6 +223,7 @@ $output = output(
} }
); );
$row = $master_dbh->selectrow_arrayref('SELECT server_id FROM test.heartbeat'); $row = $master_dbh->selectrow_arrayref('SELECT server_id FROM test.heartbeat');
is( is(
$row->[0], $row->[0],
@@ -247,7 +249,7 @@ diag(`/tmp/12345/use -u root -e "REVOKE SUPER ON *.* FROM 'bob'\@'%'"`);
$output = output( $output = output(
sub { pt_heartbeat::main("u=bob,F=/tmp/12346/my.sandbox.cnf", sub { pt_heartbeat::main("u=bob,F=/tmp/12346/my.sandbox.cnf",
qw(-D test --update --replace --run-time 1)) qw(-D test --interval 0.8 --update --replace --run-time 1))
}, },
stderr => 1 stderr => 1
); );
@@ -279,5 +281,6 @@ diag(`/tmp/12345/use -u root -e "DROP USER 'bob'\@'%'"`);
diag(`rm $pid_file $sent_file 2>/dev/null`); diag(`rm $pid_file $sent_file 2>/dev/null`);
$sb->wipe_clean($master_dbh); $sb->wipe_clean($master_dbh);
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox"); ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
done_testing; done_testing;
exit; exit;

View File

@@ -29,7 +29,6 @@ ok(
), ),
'Analysis for binlog001', 'Analysis for binlog001',
) or diag($test_diff); ) or diag($test_diff);
ok( ok(
no_diff( no_diff(
sub { pt_query_digest::main(@args, $sample.'binlog002.txt') }, sub { pt_query_digest::main(@args, $sample.'binlog002.txt') },
@@ -37,7 +36,6 @@ ok(
), ),
'Analysis for binlog002', 'Analysis for binlog002',
) or diag($test_diff); ) or diag($test_diff);
ok( ok(
no_diff( no_diff(
sub { pt_query_digest::main(@args, $sample.'binlog011.txt') }, sub { pt_query_digest::main(@args, $sample.'binlog011.txt') },

View File

@@ -151,37 +151,7 @@ select o.tbl2 = e.tbl2,
# 10s+ ################################################################ # 10s+ ################################################################
BEGIN\G BEGIN\G
# Query 5: 0 QPS, 0x concurrency, ID 0x79BFEA84D0CED05F at byte 1889 _____ # Query 5: 0 QPS, 0x concurrency, ID 0xED69B13F3D0161D0 at byte 2479 _____
# Scores: V/M = 0.00
# Time range: all events occurred at 2007-12-07 12:02:53
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 16 1
# Exec time 16 20661s 20661s 20661s 20661s 20661s 0 20661s
# Query size 24 341 341 341 341 341 0 341
# error code 0 0 0 0 0 0 0 0
# String:
# Databases test1
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s
# 10s+ ################################################################
# Tables
# SHOW TABLE STATUS FROM `test1` LIKE 'tbl6'\G
# SHOW CREATE TABLE `test1`.`tbl6`\G
insert into test1.tbl6
(day, tbl5, misccol9type, misccol9, metric11, metric12, secs)
values
(convert_tz(current_timestamp,'EST5EDT','PST8PDT'), '239', 'foo', 'bar', 1, '1', '16.3574378490448')
on duplicate key update metric11 = metric11 + 1,
metric12 = metric12 + values(metric12), secs = secs + values(secs)\G
# Query 6: 0 QPS, 0x concurrency, ID 0xED69B13F3D0161D0 at byte 2479 _____
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Time range: all events occurred at 2007-12-07 12:02:53 # Time range: all events occurred at 2007-12-07 12:02:53
# Attribute pct total min max avg 95% stddev median # Attribute pct total min max avg 95% stddev median
@@ -215,6 +185,36 @@ select last2metric1 = last1metric1, last2time = last1time,
last1metric1 = last0metric1, last1time = last0time, last1metric1 = last0metric1, last1time = last0time,
last0metric1 = ondeckmetric1, last0time = now() from test2.tbl8 where tbl8 in (10800712)\G last0metric1 = ondeckmetric1, last0time = now() from test2.tbl8 where tbl8 in (10800712)\G
# Query 6: 0 QPS, 0x concurrency, ID 0x79BFEA84D0CED05F at byte 1889 _____
# Scores: V/M = 0.00
# Time range: all events occurred at 2007-12-07 12:02:53
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 16 1
# Exec time 16 20661s 20661s 20661s 20661s 20661s 0 20661s
# Query size 24 341 341 341 341 341 0 341
# error code 0 0 0 0 0 0 0 0
# String:
# Databases test1
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s
# 10s+ ################################################################
# Tables
# SHOW TABLE STATUS FROM `test1` LIKE 'tbl6'\G
# SHOW CREATE TABLE `test1`.`tbl6`\G
insert into test1.tbl6
(day, tbl5, misccol9type, misccol9, metric11, metric12, secs)
values
(convert_tz(current_timestamp,'EST5EDT','PST8PDT'), '239', 'foo', 'bar', 1, '1', '16.3574378490448')
on duplicate key update metric11 = metric11 + 1,
metric12 = metric12 + values(metric12), secs = secs + values(secs)\G
# Profile # Profile
# Rank Query ID Response time Calls R/Call V/M Item # Rank Query ID Response time Calls R/Call V/M Item
# ==== ================== ================ ===== ========== ===== ======== # ==== ================== ================ ===== ========== ===== ========
@@ -222,5 +222,5 @@ select last2metric1 = last1metric1, last2time = last1time,
# 2 0xC356FD9EFD7D799E 20675.0000 16.7% 1 20675.0000 0.00 UPDATE test?.tblo test?.tbl? # 2 0xC356FD9EFD7D799E 20675.0000 16.7% 1 20675.0000 0.00 UPDATE test?.tblo test?.tbl?
# 3 0xB5E55291C7DE1096 20664.0000 16.7% 1 20664.0000 0.00 UPDATE test?.tblo test?.tbl? # 3 0xB5E55291C7DE1096 20664.0000 16.7% 1 20664.0000 0.00 UPDATE test?.tblo test?.tbl?
# 4 0x85FFF5AA78E5FF6A 20664.0000 16.7% 1 20664.0000 0.00 BEGIN # 4 0x85FFF5AA78E5FF6A 20664.0000 16.7% 1 20664.0000 0.00 BEGIN
# 5 0x79BFEA84D0CED05F 20661.0000 16.7% 1 20661.0000 0.00 INSERT UPDATE test?.tbl? # 5 0xED69B13F3D0161D0 20661.0000 16.7% 1 20661.0000 0.00 UPDATE test?.tbl?
# 6 0xED69B13F3D0161D0 20661.0000 16.7% 1 20661.0000 0.00 UPDATE test?.tbl? # 6 0x79BFEA84D0CED05F 20661.0000 16.7% 1 20661.0000 0.00 INSERT UPDATE test?.tbl?

View File

@@ -14,23 +14,18 @@
# @@session.un 1 1 1 1 1 0 1 # @@session.un 1 1 1 1 1 0 1
# error code 0 0 0 0 0 0 0 # error code 0 0 0 0 0 0 0
# Query 1: 0 QPS, 0x concurrency, ID 0xF25D6D5AC7C18FF3 at byte 381 ______ # Query 1: 0 QPS, 0x concurrency, ID 0xF579EC4A9633EEA0 at byte 973 ______
# This item is included in the report because it matches --limit. # This item is included in the report because it matches --limit.
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Time range: all events occurred at 2009-07-22 07:21:59 # Time range: all events occurred at 2009-07-22 07:22:24
# Attribute pct total min max avg 95% stddev median # Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= ======= # ============ === ======= ======= ======= ======= ======= ======= =======
# Count 33 1 # Count 33 1
# Exec time 0 0 0 0 0 0 0 0 # Exec time 0 0 0 0 0 0 0 0
# Query size 10 17 17 17 17 17 0 17 # Query size 15 25 25 25 25 25 0 25
# @@session.ch 100 8 8 8 8 8 0 8
# @@session.co 100 8 8 8 8 8 0 8
# @@session.co 100 8 8 8 8 8 0 8
# @@session.fo 100 1 1 1 1 1 0 1
# @@session.sq 100 1 1 1 1 1 0 1
# @@session.sq 0 0 0 0 0 0 0 0
# @@session.un 100 1 1 1 1 1 0 1
# error code 0 0 0 0 0 0 0 0 # error code 0 0 0 0 0 0 0 0
# String:
# Databases d
# Query_time distribution # Query_time distribution
# 1us # 1us
# 10us # 10us
@@ -40,7 +35,10 @@
# 100ms # 100ms
# 1s # 1s
# 10s+ # 10s+
create database d\G # Tables
# SHOW TABLE STATUS FROM `d` LIKE 'foo'\G
# SHOW CREATE TABLE `d`.`foo`\G
insert foo values (1) /*... omitted ...*/\G
# Query 2: 0 QPS, 0x concurrency, ID 0x03409022EB8A4AE7 at byte 795 ______ # Query 2: 0 QPS, 0x concurrency, ID 0x03409022EB8A4AE7 at byte 795 ______
# This item is included in the report because it matches --limit. # This item is included in the report because it matches --limit.
@@ -68,18 +66,23 @@ create database d\G
# SHOW CREATE TABLE `d`.`foo`\G # SHOW CREATE TABLE `d`.`foo`\G
create table foo (i int)\G create table foo (i int)\G
# Query 3: 0 QPS, 0x concurrency, ID 0xF579EC4A9633EEA0 at byte 973 ______ # Query 3: 0 QPS, 0x concurrency, ID 0xF25D6D5AC7C18FF3 at byte 381 ______
# This item is included in the report because it matches --limit. # This item is included in the report because it matches --limit.
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Time range: all events occurred at 2009-07-22 07:22:24 # Time range: all events occurred at 2009-07-22 07:21:59
# Attribute pct total min max avg 95% stddev median # Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= ======= # ============ === ======= ======= ======= ======= ======= ======= =======
# Count 33 1 # Count 33 1
# Exec time 0 0 0 0 0 0 0 0 # Exec time 0 0 0 0 0 0 0 0
# Query size 15 25 25 25 25 25 0 25 # Query size 10 17 17 17 17 17 0 17
# @@session.ch 100 8 8 8 8 8 0 8
# @@session.co 100 8 8 8 8 8 0 8
# @@session.co 100 8 8 8 8 8 0 8
# @@session.fo 100 1 1 1 1 1 0 1
# @@session.sq 100 1 1 1 1 1 0 1
# @@session.sq 0 0 0 0 0 0 0 0
# @@session.un 100 1 1 1 1 1 0 1
# error code 0 0 0 0 0 0 0 0 # error code 0 0 0 0 0 0 0 0
# String:
# Databases d
# Query_time distribution # Query_time distribution
# 1us # 1us
# 10us # 10us
@@ -89,14 +92,11 @@ create table foo (i int)\G
# 100ms # 100ms
# 1s # 1s
# 10s+ # 10s+
# Tables create database d\G
# SHOW TABLE STATUS FROM `d` LIKE 'foo'\G
# SHOW CREATE TABLE `d`.`foo`\G
insert foo values (1) /*... omitted ...*/\G
# Profile # Profile
# Rank Query ID Response time Calls R/Call V/M Item # Rank Query ID Response time Calls R/Call V/M Item
# ==== ================== ============= ===== ====== ===== =============== # ==== ================== ============= ===== ====== ===== ===============
# 1 0xF25D6D5AC7C18FF3 0.0000 0.0% 1 0.0000 0.00 CREATE DATABASE d # 1 0xF579EC4A9633EEA0 0.0000 0.0% 1 0.0000 0.00 INSERT foo
# 2 0x03409022EB8A4AE7 0.0000 0.0% 1 0.0000 0.00 CREATE TABLE foo # 2 0x03409022EB8A4AE7 0.0000 0.0% 1 0.0000 0.00 CREATE TABLE foo
# 3 0xF579EC4A9633EEA0 0.0000 0.0% 1 0.0000 0.00 INSERT foo # 3 0xF25D6D5AC7C18FF3 0.0000 0.0% 1 0.0000 0.00 CREATE DATABASE d

View File

@@ -160,157 +160,7 @@ CREATE TABLE `store` (
CONSTRAINT `fk_store_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE CONSTRAINT `fk_store_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8\G ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8\G
# Query 6: 0 QPS, 0x concurrency, ID 0xE5109B9F2BF996BE at byte 111637 ___ # Query 6: 0 QPS, 0x concurrency, ID 0xD8657A03D0724524 at byte 880760 ___
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: all events occurred at 2014-07-02 13:09:48
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 1
# Exec time 1 1s 1s 1s 1s 1s 0 1s
# Query size 1 64.61k 64.61k 64.61k 64.61k 64.61k 0 64.61k
# error code 0 0 0 0 0 0 0 0
# String:
# Databases sakila
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
# Tables
# SHOW TABLE STATUS FROM `sakila` LIKE 'customer'\G
# SHOW CREATE TABLE `sakila`.`customer`\G
INSERT INTO `customer` VALUES (1,1,'MARY','SMITH','MARY.SMITH@sakilacustomer.org',5,1,'2006-02-14 22:04:36','2006-02-15 11:57:20') /*... omitted ...*/\G
# Query 7: 0 QPS, 0x concurrency, ID 0xC1D332032F48BCE1 at byte 110219 ___
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: all events occurred at 2014-07-02 13:09:47
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 1
# Exec time 1 1s 1s 1s 1s 1s 0 1s
# Query size 0 883 883 883 883 883 0 883
# error code 0 0 0 0 0 0 0 0
# String:
# Databases sakila
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
# Tables
# SHOW TABLE STATUS FROM `sakila` LIKE 'customer'\G
# SHOW CREATE TABLE `sakila`.`customer`\G
CREATE TABLE `customer` (
`customer_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`store_id` tinyint(3) unsigned NOT NULL,
`first_name` varchar(45) NOT NULL,
`last_name` varchar(45) NOT NULL,
`email` varchar(50) DEFAULT NULL,
`address_id` smallint(5) unsigned NOT NULL,
`active` tinyint(1) NOT NULL DEFAULT '1',
`create_date` datetime NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`customer_id`),
KEY `idx_fk_store_id` (`store_id`),
KEY `idx_fk_address_id` (`address_id`),
KEY `idx_last_name` (`last_name`),
CONSTRAINT `fk_customer_address` FOREIGN KEY (`address_id`) REFERENCES `address` (`address_id`) ON UPDATE CASCADE,
CONSTRAINT `fk_customer_store` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=600 DEFAULT CHARSET=utf8\G
# Query 8: 0 QPS, 0x concurrency, ID 0xC5F99E5B57D2D6DB at byte 3391234 __
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: all events occurred at 2014-07-02 13:10:18
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 1
# Exec time 1 1s 1s 1s 1s 1s 0 1s
# Query size 0 159 159 159 159 159 0 159
# @@session.fo 50 1 1 1 1 1 0 1
# @@session.un 50 1 1 1 1 1 0 1
# error code 0 0 0 0 0 0 0 0
# String:
# Databases sakila
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
ANALYZE TABLE actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store\G
# Query 9: 0 QPS, 0x concurrency, ID 0x3E8F75B2422F47B7 at byte 104650 ___
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: all events occurred at 2014-07-02 13:09:46
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 1
# Exec time 1 1s 1s 1s 1s 1s 0 1s
# Query size 0 294 294 294 294 294 0 294
# error code 0 0 0 0 0 0 0 0
# String:
# Databases sakila
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
# Tables
# SHOW TABLE STATUS FROM `sakila` LIKE 'country'\G
# SHOW CREATE TABLE `sakila`.`country`\G
CREATE TABLE `country` (
`country_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`country` varchar(50) NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`country_id`)
) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8\G
# Query 10: 0 QPS, 0x concurrency, ID 0xD62F1A6D5A67AFA8 at byte 20196 ___
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: all events occurred at 2014-07-02 13:09:43
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 1
# Exec time 1 1s 1s 1s 1s 1s 0 1s
# Query size 1 53.96k 53.96k 53.96k 53.96k 53.96k 0 53.96k
# error code 0 0 0 0 0 0 0 0
# String:
# Databases sakila
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
# Tables
# SHOW TABLE STATUS FROM `sakila` LIKE 'address'\G
# SHOW CREATE TABLE `sakila`.`address`\G
INSERT INTO `address` VALUES (1,'47 MySakila Drive',NULL,'Alberta',300,'','','2006-02-15 11:45:30') /*... omitted ...*/\G
# Query 11: 0 QPS, 0x concurrency, ID 0xD8657A03D0724524 at byte 880760 __
# This item is included in the report because it matches --limit. # This item is included in the report because it matches --limit.
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Time range: all events occurred at 2014-07-02 13:10:00 # Time range: all events occurred at 2014-07-02 13:10:00
@@ -362,7 +212,73 @@ select NULL ON UPDATE CASCADE,
KEY `fk_payment_rental` (`rental_id`), KEY `fk_payment_rental` (`rental_id`),
CONSTRAINT `fk_payment_rental` FOREIGN KEY (`rental_id`) REFERENCES `rental` (`rental_id`) ON DELETE \G CONSTRAINT `fk_payment_rental` FOREIGN KEY (`rental_id`) REFERENCES `rental` (`rental_id`) ON DELETE \G
# Query 12: 0 QPS, 0x concurrency, ID 0x09482CA2620152A7 at byte 77796 ___ # Query 7: 0 QPS, 0x concurrency, ID 0x1405E69931A1FC8D at byte 879222 ___
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: all events occurred at 2014-07-02 13:09:59
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 1
# Exec time 1 1s 1s 1s 1s 1s 0 1s
# Query size 0 288 288 288 288 288 0 288
# error code 0 0 0 0 0 0 0 0
# String:
# Databases sakila
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
# Tables
# SHOW TABLE STATUS FROM `sakila` LIKE 'language'\G
# SHOW CREATE TABLE `sakila`.`language`\G
CREATE TABLE `language` (
`language_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`name` char(20) NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`language_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8\G
# Query 8: 0 QPS, 0x concurrency, ID 0x3B0263BE3363F7DF at byte 8543 _____
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: all events occurred at 2014-07-02 13:09:42
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 1
# Exec time 1 1s 1s 1s 1s 1s 0 1s
# Query size 0 370 370 370 370 370 0 370
# @@session.fo 0 0 0 0 0 0 0 0
# @@session.un 0 0 0 0 0 0 0 0
# error code 0 0 0 0 0 0 0 0
# String:
# Databases sakila
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
# Tables
# SHOW TABLE STATUS FROM `sakila` LIKE 'actor'\G
# SHOW CREATE TABLE `sakila`.`actor`\G
CREATE TABLE `actor` (
`actor_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`first_name` varchar(45) NOT NULL,
`last_name` varchar(45) NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`actor_id`),
KEY `idx_actor_last_name` (`last_name`)
) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8\G
# Query 9: 0 QPS, 0x concurrency, ID 0x09482CA2620152A7 at byte 77796 ____
# This item is included in the report because it matches --limit. # This item is included in the report because it matches --limit.
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Time range: all events occurred at 2014-07-02 13:09:45 # Time range: all events occurred at 2014-07-02 13:09:45
@@ -396,7 +312,64 @@ CREATE TABLE `city` (
CONSTRAINT `fk_city_country` FOREIGN KEY (`country_id`) REFERENCES `country` (`country_id`) ON UPDATE CASCADE CONSTRAINT `fk_city_country` FOREIGN KEY (`country_id`) REFERENCES `country` (`country_id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=601 DEFAULT CHARSET=utf8\G ) ENGINE=InnoDB AUTO_INCREMENT=601 DEFAULT CHARSET=utf8\G
# Query 13: 0 QPS, 0x concurrency, ID 0xE771A1D1EAD499BA at byte 718785 __ # Query 10: 0 QPS, 0x concurrency, ID 0x80F6ECA81D5F0D25 at byte 75909 ___
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: all events occurred at 2014-07-02 13:09:44
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 1
# Exec time 1 1s 1s 1s 1s 1s 0 1s
# Query size 0 292 292 292 292 292 0 292
# error code 0 0 0 0 0 0 0 0
# String:
# Databases sakila
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
# Tables
# SHOW TABLE STATUS FROM `sakila` LIKE 'category'\G
# SHOW CREATE TABLE `sakila`.`category`\G
CREATE TABLE `category` (
`category_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(25) NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`category_id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8\G
# Query 11: 0 QPS, 0x concurrency, ID 0xAE6D99E149CE09C6 at byte 719980 __
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: all events occurred at 2014-07-02 13:09:58
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 1
# Exec time 1 1s 1s 1s 1s 1s 0 1s
# Query size 4 155.05k 155.05k 155.05k 155.05k 155.05k 0 155.05k
# error code 0 0 0 0 0 0 0 0
# String:
# Databases sakila
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
# Tables
# SHOW TABLE STATUS FROM `sakila` LIKE 'inventory'\G
# SHOW CREATE TABLE `sakila`.`inventory`\G
INSERT INTO `inventory` VALUES (1,1,1,'2006-02-15 12:09:17') /*... omitted ...*/\G
# Query 12: 0 QPS, 0x concurrency, ID 0xE771A1D1EAD499BA at byte 718785 __
# This item is included in the report because it matches --limit. # This item is included in the report because it matches --limit.
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Time range: all events occurred at 2014-07-02 13:09:57 # Time range: all events occurred at 2014-07-02 13:09:57
@@ -432,15 +405,15 @@ CREATE TABLE `inventory` (
CONSTRAINT `fk_inventory_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE CONSTRAINT `fk_inventory_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4582 DEFAULT CHARSET=utf8\G ) ENGINE=InnoDB AUTO_INCREMENT=4582 DEFAULT CHARSET=utf8\G
# Query 14: 0 QPS, 0x concurrency, ID 0x80F6ECA81D5F0D25 at byte 75909 ___ # Query 13: 0 QPS, 0x concurrency, ID 0x8A38006583244505 at byte 597471 __
# This item is included in the report because it matches --limit. # This item is included in the report because it matches --limit.
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Time range: all events occurred at 2014-07-02 13:09:44 # Time range: all events occurred at 2014-07-02 13:09:56
# Attribute pct total min max avg 95% stddev median # Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= ======= # ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 1 # Count 0 1
# Exec time 1 1s 1s 1s 1s 1s 0 1s # Exec time 1 1s 1s 1s 1s 1s 0 1s
# Query size 0 292 292 292 292 292 0 292 # Query size 0 242 242 242 242 242 0 242
# error code 0 0 0 0 0 0 0 0 # error code 0 0 0 0 0 0 0 0
# String: # String:
# Databases sakila # Databases sakila
@@ -454,24 +427,59 @@ CREATE TABLE `inventory` (
# 1s ################################################################ # 1s ################################################################
# 10s+ # 10s+
# Tables # Tables
# SHOW TABLE STATUS FROM `sakila` LIKE 'category'\G # SHOW TABLE STATUS FROM `sakila` LIKE 'film_text'\G
# SHOW CREATE TABLE `sakila`.`category`\G # SHOW CREATE TABLE `sakila`.`film_text`\G
CREATE TABLE `category` ( CREATE TABLE `film_text` (
`category_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, `film_id` smallint(6) NOT NULL,
`name` varchar(25) NOT NULL, `title` varchar(255) NOT NULL,
`description` text,
PRIMARY KEY (`film_id`),
FULLTEXT KEY `idx_title_description` (`title`,`description`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8\G
# Query 14: 0 QPS, 0x concurrency, ID 0x0FD12A9C9BF3E41F at byte 565533 __
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: all events occurred at 2014-07-02 13:09:55
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 1
# Exec time 1 1s 1s 1s 1s 1s 0 1s
# Query size 0 573 573 573 573 573 0 573
# error code 0 0 0 0 0 0 0 0
# String:
# Databases sakila
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
# Tables
# SHOW TABLE STATUS FROM `sakila` LIKE 'film_category'\G
# SHOW CREATE TABLE `sakila`.`film_category`\G
CREATE TABLE `film_category` (
`film_id` smallint(5) unsigned NOT NULL,
`category_id` tinyint(3) unsigned NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`category_id`) PRIMARY KEY (`film_id`,`category_id`),
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8\G KEY `fk_film_category_category` (`category_id`),
CONSTRAINT `fk_film_category_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE,
CONSTRAINT `fk_film_category_category` FOREIGN KEY (`category_id`) REFERENCES `category` (`category_id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8\G
# Query 15: 0 QPS, 0x concurrency, ID 0xEE462EEBC76A46F2 at byte 3392804 _ # Query 15: 0 QPS, 0x concurrency, ID 0x93E5C17055D970BE at byte 393718 __
# This item is included in the report because it matches --limit. # This item is included in the report because it matches --limit.
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Time range: all events occurred at 2014-07-02 13:10:19 # Time range: all events occurred at 2014-07-02 13:09:54
# Attribute pct total min max avg 95% stddev median # Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= ======= # ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 1 # Count 0 1
# Exec time 1 1s 1s 1s 1s 1s 0 1s # Exec time 1 1s 1s 1s 1s 1s 0 1s
# Query size 0 130 130 130 130 130 0 130 # Query size 5 167.33k 167.33k 167.33k 167.33k 167.33k 0 167.33k
# error code 0 0 0 0 0 0 0 0 # error code 0 0 0 0 0 0 0 0
# String: # String:
# Databases sakila # Databases sakila
@@ -485,44 +493,11 @@ CREATE TABLE `category` (
# 1s ################################################################ # 1s ################################################################
# 10s+ # 10s+
# Tables # Tables
# SHOW TABLE STATUS FROM `percona_test` LIKE 'checksums'\G # SHOW TABLE STATUS FROM `sakila` LIKE 'film_actor'\G
# SHOW CREATE TABLE `percona_test`.`checksums`\G # SHOW CREATE TABLE `sakila`.`film_actor`\G
CREATE TABLE percona_test.checksums( INSERT INTO `film_actor` VALUES (1,1,'2006-02-15 12:05:03') /*... omitted ...*/\G
db_tbl varchar(128) not null primary key,
checksum int unsigned not null)\G
# Query 16: 0 QPS, 0x concurrency, ID 0x1405E69931A1FC8D at byte 879222 __ # Query 16: 0 QPS, 0x concurrency, ID 0x7677746C22CD9F16 at byte 392649 __
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: all events occurred at 2014-07-02 13:09:59
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 1
# Exec time 1 1s 1s 1s 1s 1s 0 1s
# Query size 0 288 288 288 288 288 0 288
# error code 0 0 0 0 0 0 0 0
# String:
# Databases sakila
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
# Tables
# SHOW TABLE STATUS FROM `sakila` LIKE 'language'\G
# SHOW CREATE TABLE `sakila`.`language`\G
CREATE TABLE `language` (
`language_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`name` char(20) NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`language_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8\G
# Query 17: 0 QPS, 0x concurrency, ID 0x7677746C22CD9F16 at byte 392649 __
# This item is included in the report because it matches --limit. # This item is included in the report because it matches --limit.
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Time range: all events occurred at 2014-07-02 13:09:53 # Time range: all events occurred at 2014-07-02 13:09:53
@@ -556,15 +531,15 @@ CREATE TABLE `film_actor` (
CONSTRAINT `fk_film_actor_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE CONSTRAINT `fk_film_actor_film` FOREIGN KEY (`film_id`) REFERENCES `film` (`film_id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8\G ) ENGINE=InnoDB DEFAULT CHARSET=utf8\G
# Query 18: 0 QPS, 0x concurrency, ID 0x93E5C17055D970BE at byte 393718 __ # Query 17: 0 QPS, 0x concurrency, ID 0xEE462EEBC76A46F2 at byte 3392804 _
# This item is included in the report because it matches --limit. # This item is included in the report because it matches --limit.
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Time range: all events occurred at 2014-07-02 13:09:54 # Time range: all events occurred at 2014-07-02 13:10:19
# Attribute pct total min max avg 95% stddev median # Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= ======= # ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 1 # Count 0 1
# Exec time 1 1s 1s 1s 1s 1s 0 1s # Exec time 1 1s 1s 1s 1s 1s 0 1s
# Query size 5 167.33k 167.33k 167.33k 167.33k 167.33k 0 167.33k # Query size 0 130 130 130 130 130 0 130
# error code 0 0 0 0 0 0 0 0 # error code 0 0 0 0 0 0 0 0
# String: # String:
# Databases sakila # Databases sakila
@@ -578,9 +553,36 @@ CREATE TABLE `film_actor` (
# 1s ################################################################ # 1s ################################################################
# 10s+ # 10s+
# Tables # Tables
# SHOW TABLE STATUS FROM `sakila` LIKE 'film_actor'\G # SHOW TABLE STATUS FROM `percona_test` LIKE 'checksums'\G
# SHOW CREATE TABLE `sakila`.`film_actor`\G # SHOW CREATE TABLE `percona_test`.`checksums`\G
INSERT INTO `film_actor` VALUES (1,1,'2006-02-15 12:05:03') /*... omitted ...*/\G CREATE TABLE percona_test.checksums(
db_tbl varchar(128) not null primary key,
checksum int unsigned not null)\G
# Query 18: 0 QPS, 0x concurrency, ID 0xC5F99E5B57D2D6DB at byte 3391234 _
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: all events occurred at 2014-07-02 13:10:18
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 1
# Exec time 1 1s 1s 1s 1s 1s 0 1s
# Query size 0 159 159 159 159 159 0 159
# @@session.fo 50 1 1 1 1 1 0 1
# @@session.un 50 1 1 1 1 1 0 1
# error code 0 0 0 0 0 0 0 0
# String:
# Databases sakila
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
ANALYZE TABLE actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store\G
# Query 19: 0 QPS, 0x concurrency, ID 0x5C6D8C73D42AE624 at byte 3388620 _ # Query 19: 0 QPS, 0x concurrency, ID 0x5C6D8C73D42AE624 at byte 3388620 _
# This item is included in the report because it matches --limit. # This item is included in the report because it matches --limit.
@@ -651,19 +653,15 @@ INNER JOIN staff AS m ON s.manager_staff_id = m.staff_id
GROUP BY s.store_id GROUP BY s.store_id
ORDER BY cy.country, c.city\G ORDER BY cy.country, c.city\G
# Query 20: 0 QPS, 0x concurrency, ID 0x4E763A2FA103490D at byte 178711 __ # Query 20: 0 QPS, 0x concurrency, ID 0xD62F1A6D5A67AFA8 at byte 20196 ___
# This item is included in the report because it matches --limit. # This item is included in the report because it matches --limit.
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Time range: all events occurred at 2014-07-02 13:09:49 # Time range: all events occurred at 2014-07-02 13:09:43
# Attribute pct total min max avg 95% stddev median # Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= ======= # ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 1 # Count 0 1
# Exec time 1 1s 1s 1s 1s 1s 0 1s # Exec time 1 1s 1s 1s 1s 1s 0 1s
# Query size 0 1.19k 1.19k 1.19k 1.19k 1.19k 0 1.19k # Query size 1 53.96k 53.96k 53.96k 53.96k 53.96k 0 53.96k
# @@session.ch 16 33 33 33 33 33 0 33
# @@session.co 16 33 33 33 33 33 0 33
# @@session.co 11 8 8 8 8 8 0 8
# @@session.sq 25 1.00G 1.00G 1.00G 1.00G 1.00G 0 1.00G
# error code 0 0 0 0 0 0 0 0 # error code 0 0 0 0 0 0 0 0
# String: # String:
# Databases sakila # Databases sakila
@@ -677,29 +675,9 @@ ORDER BY cy.country, c.city\G
# 1s ################################################################ # 1s ################################################################
# 10s+ # 10s+
# Tables # Tables
# SHOW TABLE STATUS FROM `sakila` LIKE 'film'\G # SHOW TABLE STATUS FROM `sakila` LIKE 'address'\G
# SHOW CREATE TABLE `sakila`.`film`\G # SHOW CREATE TABLE `sakila`.`address`\G
CREATE TABLE `film` ( INSERT INTO `address` VALUES (1,'47 MySakila Drive',NULL,'Alberta',300,'','','2006-02-15 11:45:30') /*... omitted ...*/\G
`film_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`description` text,
`release_year` year(4) DEFAULT NULL,
`language_id` tinyint(3) unsigned NOT NULL,
`original_language_id` tinyint(3) unsigned DEFAULT NULL,
`rental_duration` tinyint(3) unsigned NOT NULL DEFAULT '3',
`rental_rate` decimal(4,2) NOT NULL DEFAULT '4.99',
`length` smallint(5) unsigned DEFAULT NULL,
`replacement_cost` decimal(5,2) NOT NULL DEFAULT '19.99',
`rating` enum('G','PG','PG-13','R','NC-17') DEFAULT 'G',
`special_features` set('Trailers','Commentaries','Deleted Scenes','Behind the Scenes') DEFAULT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`film_id`),
KEY `idx_title` (`title`),
KEY `idx_fk_language_id` (`language_id`),
KEY `idx_fk_original_language_id` (`original_language_id`),
CONSTRAINT `fk_film_language` FOREIGN KEY (`language_id`) REFERENCES `language` (`language_id`) ON UPDATE CASCADE,
CONSTRAINT `fk_film_language_original` FOREIGN KEY (`original_language_id`) REFERENCES `language` (`language_id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8\G
# Profile # Profile
# Rank Query ID Response time Calls R/Call V/M Item # Rank Query ID Response time Calls R/Call V/M Item
@@ -709,19 +687,19 @@ CREATE TABLE `film` (
# 3 0x4677E4CEDF8EA4E2 5.0000 8.8% 2 2.5000 5.00 INSERT payment # 3 0x4677E4CEDF8EA4E2 5.0000 8.8% 2 2.5000 5.00 INSERT payment
# 4 0xAAECC8184D17D799 3.0000 5.3% 1 3.0000 0.00 INSERT film # 4 0xAAECC8184D17D799 3.0000 5.3% 1 3.0000 0.00 INSERT film
# 5 0x1A3BF395BD4C2AC5 2.0000 3.5% 1 2.0000 0.00 CREATE TABLE store `store` # 5 0x1A3BF395BD4C2AC5 2.0000 3.5% 1 2.0000 0.00 CREATE TABLE store `store`
# 6 0xE5109B9F2BF996BE 1.0000 1.8% 1 1.0000 0.00 INSERT customer # 6 0xD8657A03D0724524 1.0000 1.8% 1 1.0000 0.00 CREATE TABLE payment `payment`
# 7 0xC1D332032F48BCE1 1.0000 1.8% 1 1.0000 0.00 CREATE TABLE customer `customer` # 7 0x1405E69931A1FC8D 1.0000 1.8% 1 1.0000 0.00 CREATE TABLE language `language`
# 8 0xC5F99E5B57D2D6DB 1.0000 1.8% 1 1.0000 0.00 # 8 0x3B0263BE3363F7DF 1.0000 1.8% 1 1.0000 0.00 CREATE TABLE actor `actor`
# 9 0x3E8F75B2422F47B7 1.0000 1.8% 1 1.0000 0.00 CREATE TABLE country `country` # 9 0x09482CA2620152A7 1.0000 1.8% 1 1.0000 0.00 CREATE TABLE city `city`
# 10 0xD62F1A6D5A67AFA8 1.0000 1.8% 1 1.0000 0.00 INSERT address # 10 0x80F6ECA81D5F0D25 1.0000 1.8% 1 1.0000 0.00 CREATE TABLE category `category`
# 11 0xD8657A03D0724524 1.0000 1.8% 1 1.0000 0.00 CREATE TABLE payment `payment` # 11 0xAE6D99E149CE09C6 1.0000 1.8% 1 1.0000 0.00 INSERT inventory
# 12 0x09482CA2620152A7 1.0000 1.8% 1 1.0000 0.00 CREATE TABLE city `city` # 12 0xE771A1D1EAD499BA 1.0000 1.8% 1 1.0000 0.00 CREATE TABLE inventory `inventory`
# 13 0xE771A1D1EAD499BA 1.0000 1.8% 1 1.0000 0.00 CREATE TABLE inventory `inventory` # 13 0x8A38006583244505 1.0000 1.8% 1 1.0000 0.00 CREATE TABLE film_text `film_text`
# 14 0x80F6ECA81D5F0D25 1.0000 1.8% 1 1.0000 0.00 CREATE TABLE category `category` # 14 0x0FD12A9C9BF3E41F 1.0000 1.8% 1 1.0000 0.00 CREATE TABLE film_category `film_category`
# 15 0xEE462EEBC76A46F2 1.0000 1.8% 1 1.0000 0.00 CREATE TABLE percona_test.checksums # 15 0x93E5C17055D970BE 1.0000 1.8% 1 1.0000 0.00 INSERT film_actor
# 16 0x1405E69931A1FC8D 1.0000 1.8% 1 1.0000 0.00 CREATE TABLE language `language` # 16 0x7677746C22CD9F16 1.0000 1.8% 1 1.0000 0.00 CREATE TABLE film_actor `film_actor`
# 17 0x7677746C22CD9F16 1.0000 1.8% 1 1.0000 0.00 CREATE TABLE film_actor `film_actor` # 17 0xEE462EEBC76A46F2 1.0000 1.8% 1 1.0000 0.00 CREATE TABLE percona_test.checksums
# 18 0x93E5C17055D970BE 1.0000 1.8% 1 1.0000 0.00 INSERT film_actor # 18 0xC5F99E5B57D2D6DB 1.0000 1.8% 1 1.0000 0.00
# 19 0x5C6D8C73D42AE624 1.0000 1.8% 1 1.0000 0.00 CREATE payment rental inventory store address city country staff # 19 0x5C6D8C73D42AE624 1.0000 1.8% 1 1.0000 0.00 CREATE payment rental inventory store address city country staff
# 20 0x4E763A2FA103490D 1.0000 1.8% 1 1.0000 0.00 CREATE TABLE film `film` # 20 0xD62F1A6D5A67AFA8 1.0000 1.8% 1 1.0000 0.00 INSERT address
# MISC 0xMISC 6.0000 10.5% 95 0.0632 0.0 <72 ITEMS> # MISC 0xMISC 6.0000 10.5% 95 0.0632 0.0 <72 ITEMS>

View File

@@ -6,7 +6,28 @@
# Exec time 0 0 0 0 0 0 0 # Exec time 0 0 0 0 0 0 0
# Query size 315 27 124 45 118.34 31.33 28.75 # Query size 315 27 124 45 118.34 31.33 28.75
# Query 1: 0.00 QPS, 0x concurrency, ID 0x5D51E5F01B88B79E at byte 244 ___ # Query 1: 0.00 QPS, 0x concurrency, ID 0xAA353644DE4C4CB4 at byte 464 ___
# Scores: V/M = 0.00
# Time range: 2005-10-07 21:55:24 to 2006-12-26 16:44:48
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 28 2
# Exec time 0 0 0 0 0 0 0 0
# Query size 17 54 27 27 27 27 0 27
# String:
# Databases db1 (1/50%), my_webstat... (1/50%)
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s
# 10s+
administrator command: Quit\G
# Query 2: 0.00 QPS, 0x concurrency, ID 0x5D51E5F01B88B79E at byte 244 ___
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Time range: 2005-10-07 21:55:24 to 2006-12-26 15:42:36 # Time range: 2005-10-07 21:55:24 to 2006-12-26 15:42:36
# Attribute pct total min max avg 95% stddev median # Attribute pct total min max avg 95% stddev median
@@ -29,53 +50,7 @@
# 10s+ # 10s+
administrator command: Connect\G administrator command: Connect\G
# Query 2: 0.00 QPS, 0x concurrency, ID 0xAA353644DE4C4CB4 at byte 464 ___ # Query 3: 0 QPS, 0x concurrency, ID 0x44AAC79F41BCF692 at byte 58 _______
# Scores: V/M = 0.00
# Time range: 2005-10-07 21:55:24 to 2006-12-26 16:44:48
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 28 2
# Exec time 0 0 0 0 0 0 0 0
# Query size 17 54 27 27 27 27 0 27
# String:
# Databases db1 (1/50%), my_webstat... (1/50%)
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s
# 10s+
administrator command: Quit\G
# Query 3: 0 QPS, 0x concurrency, ID 0x4D096479916B0F45 at byte 346 ______
# Scores: V/M = 0.00
# Time range: all events occurred at 2006-12-26 15:42:36
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 14 1
# Exec time 0 0 0 0 0 0 0 0
# Query size 14 47 47 47 47 47 0 47
# String:
# Databases my_webstats
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS FROM `my_webstats` LIKE 'tbl'\G
# SHOW CREATE TABLE `my_webstats`.`tbl`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT DISTINCT col FROM tbl WHERE foo=20061219\G
# Query 4: 0 QPS, 0x concurrency, ID 0x44AAC79F41BCF692 at byte 58 _______
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Time range: all events occurred at 2005-10-07 21:55:24 # Time range: all events occurred at 2005-10-07 21:55:24
# Attribute pct total min max avg 95% stddev median # Attribute pct total min max avg 95% stddev median
@@ -103,6 +78,31 @@ SELECT foo
WHERE col=12345 WHERE col=12345
ORDER BY col\G ORDER BY col\G
# Query 4: 0 QPS, 0x concurrency, ID 0x4D096479916B0F45 at byte 346 ______
# Scores: V/M = 0.00
# Time range: all events occurred at 2006-12-26 15:42:36
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 14 1
# Exec time 0 0 0 0 0 0 0 0
# Query size 14 47 47 47 47 47 0 47
# String:
# Databases my_webstats
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS FROM `my_webstats` LIKE 'tbl'\G
# SHOW CREATE TABLE `my_webstats`.`tbl`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT DISTINCT col FROM tbl WHERE foo=20061219\G
# Query 5: 0 QPS, 0x concurrency, ID 0x44AE35A182869033 at byte 300 ______ # Query 5: 0 QPS, 0x concurrency, ID 0x44AE35A182869033 at byte 300 ______
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Time range: all events occurred at 2006-12-26 15:42:36 # Time range: all events occurred at 2006-12-26 15:42:36
@@ -127,8 +127,8 @@ administrator command: Init DB\G
# Profile # Profile
# Rank Query ID Response time Calls R/Call V/M Item # Rank Query ID Response time Calls R/Call V/M Item
# ==== ================== ============= ===== ====== ===== ============= # ==== ================== ============= ===== ====== ===== =============
# 1 0x5D51E5F01B88B79E 0.0000 0.0% 2 0.0000 0.00 ADMIN CONNECT # 1 0xAA353644DE4C4CB4 0.0000 0.0% 2 0.0000 0.00 ADMIN QUIT
# 2 0xAA353644DE4C4CB4 0.0000 0.0% 2 0.0000 0.00 ADMIN QUIT # 2 0x5D51E5F01B88B79E 0.0000 0.0% 2 0.0000 0.00 ADMIN CONNECT
# 3 0x4D096479916B0F45 0.0000 0.0% 1 0.0000 0.00 SELECT tbl # 3 0x44AAC79F41BCF692 0.0000 0.0% 1 0.0000 0.00 SELECT tbl
# 4 0x44AAC79F41BCF692 0.0000 0.0% 1 0.0000 0.00 SELECT tbl # 4 0x4D096479916B0F45 0.0000 0.0% 1 0.0000 0.00 SELECT tbl
# 5 0x44AE35A182869033 0.0000 0.0% 1 0.0000 0.00 ADMIN INIT DB # 5 0x44AE35A182869033 0.0000 0.0% 1 0.0000 0.00 ADMIN INIT DB

View File

@@ -6,33 +6,7 @@
# Exec time 0 0 0 0 0 0 0 # Exec time 0 0 0 0 0 0 0
# Query size 964 106 858 482 858 531.74 482 # Query size 964 106 858 482 858 531.74 482
# Query 1: 0 QPS, 0x concurrency, ID 0x2361B36A4AEB397B at byte 0 ________ # Query 1: 0 QPS, 0x concurrency, ID 0x0A3E6DCD23F3445A at byte 237 ______
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: all events occurred at 2010-02-11 00:55:24
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 50 1
# Exec time 0 0 0 0 0 0 0 0
# Query size 10 106 106 106 106 106 0 106
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS LIKE 'auction_category_map'\G
# SHOW CREATE TABLE `auction_category_map`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT category_id
FROM auction_category_map
WHERE auction_id = '3015563'\G
# Query 2: 0 QPS, 0x concurrency, ID 0x0A3E6DCD23F3445A at byte 237 ______
# This item is included in the report because it matches --limit. # This item is included in the report because it matches --limit.
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Time range: all events occurred at 2010-02-11 00:55:24 # Time range: all events occurred at 2010-02-11 00:55:24
@@ -68,8 +42,34 @@ SELECT auction_id, auction_title_en AS title, close_time,
ORDER BY close_time ASC ORDER BY close_time ASC
LIMIT 500\G LIMIT 500\G
# Query 2: 0 QPS, 0x concurrency, ID 0x2361B36A4AEB397B at byte 0 ________
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: all events occurred at 2010-02-11 00:55:24
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 50 1
# Exec time 0 0 0 0 0 0 0 0
# Query size 10 106 106 106 106 106 0 106
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS LIKE 'auction_category_map'\G
# SHOW CREATE TABLE `auction_category_map`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT category_id
FROM auction_category_map
WHERE auction_id = '3015563'\G
# Profile # Profile
# Rank Query ID Response time Calls R/Call V/M Item # Rank Query ID Response time Calls R/Call V/M Item
# ==== ================== ============= ===== ====== ===== =============== # ==== ================== ============= ===== ====== ===== ===============
# 1 0x2361B36A4AEB397B 0.0000 0.0% 1 0.0000 0.00 SELECT auction_category_map # 1 0x0A3E6DCD23F3445A 0.0000 0.0% 1 0.0000 0.00 SELECT auction_search
# 2 0x0A3E6DCD23F3445A 0.0000 0.0% 1 0.0000 0.00 SELECT auction_search # 2 0x2361B36A4AEB397B 0.0000 0.0% 1 0.0000 0.00 SELECT auction_category_map

View File

@@ -6,7 +6,28 @@
# Exec time 0 0 0 0 0 0 0 # Exec time 0 0 0 0 0 0 0
# Query size 315 27 124 45 118.34 31.33 28.75 # Query size 315 27 124 45 118.34 31.33 28.75
# Query 1: 0 QPS, 0x concurrency, ID 0x5D51E5F01B88B79E at byte 246 ______ # Query 1: 0 QPS, 0x concurrency, ID 0xAA353644DE4C4CB4 at byte 466 ______
# Scores: V/M = 0.00
# Time range: all events occurred at 2005-10-07 21:55:24
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 28 2
# Exec time 0 0 0 0 0 0 0 0
# Query size 17 54 27 27 27 27 0 27
# String:
# Databases db1 (1/50%), my_webstat... (1/50%)
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s
# 10s+
administrator command: Quit\G
# Query 2: 0 QPS, 0x concurrency, ID 0x5D51E5F01B88B79E at byte 246 ______
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Time range: all events occurred at 2005-10-07 21:55:24 # Time range: all events occurred at 2005-10-07 21:55:24
# Attribute pct total min max avg 95% stddev median # Attribute pct total min max avg 95% stddev median
@@ -29,53 +50,7 @@
# 10s+ # 10s+
administrator command: Connect\G administrator command: Connect\G
# Query 2: 0 QPS, 0x concurrency, ID 0xAA353644DE4C4CB4 at byte 466 ______ # Query 3: 0 QPS, 0x concurrency, ID 0x44AAC79F41BCF692 at byte 60 _______
# Scores: V/M = 0.00
# Time range: all events occurred at 2005-10-07 21:55:24
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 28 2
# Exec time 0 0 0 0 0 0 0 0
# Query size 17 54 27 27 27 27 0 27
# String:
# Databases db1 (1/50%), my_webstat... (1/50%)
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s
# 10s+
administrator command: Quit\G
# Query 3: 0 QPS, 0x concurrency, ID 0x4D096479916B0F45 at byte 348 ______
# Scores: V/M = 0.00
# Time range: all events occurred at 2005-10-07 21:55:24
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 14 1
# Exec time 0 0 0 0 0 0 0 0
# Query size 14 47 47 47 47 47 0 47
# String:
# Databases my_webstats
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS FROM `my_webstats` LIKE 'tbl'\G
# SHOW CREATE TABLE `my_webstats`.`tbl`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT DISTINCT col FROM tbl WHERE foo=20061219\G
# Query 4: 0 QPS, 0x concurrency, ID 0x44AAC79F41BCF692 at byte 60 _______
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Time range: all events occurred at 2005-10-07 21:55:24 # Time range: all events occurred at 2005-10-07 21:55:24
# Attribute pct total min max avg 95% stddev median # Attribute pct total min max avg 95% stddev median
@@ -103,6 +78,31 @@ SELECT foo
WHERE col=12345 WHERE col=12345
ORDER BY col\G ORDER BY col\G
# Query 4: 0 QPS, 0x concurrency, ID 0x4D096479916B0F45 at byte 348 ______
# Scores: V/M = 0.00
# Time range: all events occurred at 2005-10-07 21:55:24
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 14 1
# Exec time 0 0 0 0 0 0 0 0
# Query size 14 47 47 47 47 47 0 47
# String:
# Databases my_webstats
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS FROM `my_webstats` LIKE 'tbl'\G
# SHOW CREATE TABLE `my_webstats`.`tbl`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT DISTINCT col FROM tbl WHERE foo=20061219\G
# Query 5: 0 QPS, 0x concurrency, ID 0x44AE35A182869033 at byte 302 ______ # Query 5: 0 QPS, 0x concurrency, ID 0x44AE35A182869033 at byte 302 ______
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Time range: all events occurred at 2005-10-07 21:55:24 # Time range: all events occurred at 2005-10-07 21:55:24
@@ -127,8 +127,8 @@ administrator command: Init DB\G
# Profile # Profile
# Rank Query ID Response time Calls R/Call V/M Item # Rank Query ID Response time Calls R/Call V/M Item
# ==== ================== ============= ===== ====== ===== ============= # ==== ================== ============= ===== ====== ===== =============
# 1 0x5D51E5F01B88B79E 0.0000 0.0% 2 0.0000 0.00 ADMIN CONNECT # 1 0xAA353644DE4C4CB4 0.0000 0.0% 2 0.0000 0.00 ADMIN QUIT
# 2 0xAA353644DE4C4CB4 0.0000 0.0% 2 0.0000 0.00 ADMIN QUIT # 2 0x5D51E5F01B88B79E 0.0000 0.0% 2 0.0000 0.00 ADMIN CONNECT
# 3 0x4D096479916B0F45 0.0000 0.0% 1 0.0000 0.00 SELECT tbl # 3 0x44AAC79F41BCF692 0.0000 0.0% 1 0.0000 0.00 SELECT tbl
# 4 0x44AAC79F41BCF692 0.0000 0.0% 1 0.0000 0.00 SELECT tbl # 4 0x4D096479916B0F45 0.0000 0.0% 1 0.0000 0.00 SELECT tbl
# 5 0x44AE35A182869033 0.0000 0.0% 1 0.0000 0.00 ADMIN INIT DB # 5 0x44AE35A182869033 0.0000 0.0% 1 0.0000 0.00 ADMIN INIT DB

View File

@@ -5,30 +5,7 @@
# Exec time 0 0 0 0 0 0 0 # Exec time 0 0 0 0 0 0 0
# Query size 70 26 44 35 44 12.73 35 # Query size 70 26 44 35 44 12.73 35
# Query 1: 0 QPS, 0x concurrency, ID 0xCB5621E548E5497F at byte 0 ________ # Query 1: 0 QPS, 0x concurrency, ID 0x774B2B0B59EBAC2C at byte 27 _______
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 50 1
# Exec time 0 0 0 0 0 0 0 0
# Query size 37 26 26 26 26 26 0 26
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS LIKE 't'\G
# SHOW CREATE TABLE `t`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT c FROM t WHERE id=1\G
# Query 2: 0 QPS, 0x concurrency, ID 0x774B2B0B59EBAC2C at byte 27 _______
# This item is included in the report because it matches --limit. # This item is included in the report because it matches --limit.
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Attribute pct total min max avg 95% stddev median # Attribute pct total min max avg 95% stddev median
@@ -51,8 +28,31 @@ SELECT c FROM t WHERE id=1\G
# EXPLAIN /*!50100 PARTITIONS*/ # EXPLAIN /*!50100 PARTITIONS*/
/* Hello, world! */ SELECT * FROM t2 LIMIT 1\G /* Hello, world! */ SELECT * FROM t2 LIMIT 1\G
# Query 2: 0 QPS, 0x concurrency, ID 0xCB5621E548E5497F at byte 0 ________
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 50 1
# Exec time 0 0 0 0 0 0 0 0
# Query size 37 26 26 26 26 26 0 26
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS LIKE 't'\G
# SHOW CREATE TABLE `t`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT c FROM t WHERE id=1\G
# Profile # Profile
# Rank Query ID Response time Calls R/Call V/M Item # Rank Query ID Response time Calls R/Call V/M Item
# ==== ================== ============= ===== ====== ===== ========= # ==== ================== ============= ===== ====== ===== =========
# 1 0xCB5621E548E5497F 0.0000 0.0% 1 0.0000 0.00 SELECT t # 1 0x774B2B0B59EBAC2C 0.0000 0.0% 1 0.0000 0.00 SELECT t?
# 2 0x774B2B0B59EBAC2C 0.0000 0.0% 1 0.0000 0.00 SELECT t? # 2 0xCB5621E548E5497F 0.0000 0.0% 1 0.0000 0.00 SELECT t

View File

@@ -3,34 +3,7 @@
# Report grouped by distill # Report grouped by distill
# ######################################################################## # ########################################################################
# Item 1: 0 QPS, 0x concurrency, ID 0x82E67ABEEDCA3249 at byte 0 _________ # Item 1: 0 QPS, 0x concurrency, ID 0x7AD070CD3F4121D5 at byte 359 _______
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: all events occurred at 2007-10-15 21:43:52
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 50 1
# Exec time 50 2s 2s 2s 2s 2s 0 2s
# Lock time 0 0 0 0 0 0 0 0
# Rows sent 50 1 1 1 1 1 0 1
# Rows examine 0 0 0 0 0 0 0 0
# Query size 44 22 22 22 22 22 0 22
# String:
# Databases test
# Hosts localhost
# Users root
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
SELECT n
# Item 2: 0 QPS, 0x concurrency, ID 0x7AD070CD3F4121D5 at byte 359 _______
# This item is included in the report because it matches --limit. # This item is included in the report because it matches --limit.
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Time range: all events occurred at 2007-10-15 21:45:10 # Time range: all events occurred at 2007-10-15 21:45:10
@@ -56,3 +29,30 @@ SELECT n
# 1s ################################################################ # 1s ################################################################
# 10s+ # 10s+
SELECT test.n SELECT test.n
# Item 2: 0 QPS, 0x concurrency, ID 0x82E67ABEEDCA3249 at byte 0 _________
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: all events occurred at 2007-10-15 21:43:52
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 50 1
# Exec time 50 2s 2s 2s 2s 2s 0 2s
# Lock time 0 0 0 0 0 0 0 0
# Rows sent 50 1 1 1 1 1 0 1
# Rows examine 0 0 0 0 0 0 0 0
# Query size 44 22 22 22 22 22 0 22
# String:
# Databases test
# Hosts localhost
# Users root
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
SELECT n

View File

@@ -1,35 +1,5 @@
# Query 1: 0 QPS, 0x concurrency, ID 0x7F7D57ACDD8A346E at byte 0 ________ # Query 1: 0 QPS, 0x concurrency, ID 0x3A99CC42AEDCCFCD at byte 359 ______
# Scores: V/M = 0.00
# Time range: all events occurred at 2007-10-15 21:43:52
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 50 1
# Exec time 50 2s 2s 2s 2s 2s 0 2s
# Lock time 0 0 0 0 0 0 0 0
# Rows sent 50 1 1 1 1 1 0 1
# Rows examine 0 0 0 0 0 0 0 0
# Query size 44 22 22 22 22 22 0 22
# String:
# Databases test
# Hosts localhost
# Users root
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
# Tables
# SHOW TABLE STATUS FROM `test` LIKE 'n'\G
# SHOW CREATE TABLE `test`.`n`\G
# EXPLAIN /*!50100 PARTITIONS*/
select sleep(2) from n\G
# Query 2: 0 QPS, 0x concurrency, ID 0x3A99CC42AEDCCFCD at byte 359 ______
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Time range: all events occurred at 2007-10-15 21:45:10 # Time range: all events occurred at 2007-10-15 21:45:10
# Attribute pct total min max avg 95% stddev median # Attribute pct total min max avg 95% stddev median
@@ -58,3 +28,33 @@ select sleep(2) from n\G
# SHOW CREATE TABLE `test`.`n`\G # SHOW CREATE TABLE `test`.`n`\G
# EXPLAIN /*!50100 PARTITIONS*/ # EXPLAIN /*!50100 PARTITIONS*/
select sleep(2) from test.n\G select sleep(2) from test.n\G
# Query 2: 0 QPS, 0x concurrency, ID 0x7F7D57ACDD8A346E at byte 0 ________
# Scores: V/M = 0.00
# Time range: all events occurred at 2007-10-15 21:43:52
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 50 1
# Exec time 50 2s 2s 2s 2s 2s 0 2s
# Lock time 0 0 0 0 0 0 0 0
# Rows sent 50 1 1 1 1 1 0 1
# Rows examine 0 0 0 0 0 0 0 0
# Query size 44 22 22 22 22 22 0 22
# String:
# Databases test
# Hosts localhost
# Users root
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
# Tables
# SHOW TABLE STATUS FROM `test` LIKE 'n'\G
# SHOW CREATE TABLE `test`.`n`\G
# EXPLAIN /*!50100 PARTITIONS*/
select sleep(2) from n\G

View File

@@ -41,21 +41,26 @@ SET biz = '91848182522'\G
# EXPLAIN /*!50100 PARTITIONS*/ # EXPLAIN /*!50100 PARTITIONS*/
select biz = '91848182522' from foo.bar \G select biz = '91848182522' from foo.bar \G
# Query 2: 0 QPS, 0x concurrency, ID 0x66825DDC008FFA89 at byte 338 ______ # Query 2: 0 QPS, 0x concurrency, ID 0x7546F89214254F2F at byte 815 ______
# This item is included in the report because it matches --limit. # This item is included in the report because it matches --limit.
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Time range: all events occurred at 2007-12-18 11:48:27 # Time range: all events occurred at 2007-12-18 11:48:27
# Attribute pct total min max avg 95% stddev median # Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= ======= # ============ === ======= ======= ======= ======= ======= ======= =======
# Count 12 1 # Count 12 1
# Exec time 95 726ms 726ms 726ms 726ms 726ms 0 726ms # Exec time 0 512us 512us 512us 512us 512us 0 512us
# Lock time 29 91us 91us 91us 91us 91us 0 91us # Lock time 25 77us 77us 77us 77us 77us 0 77us
# Rows sent 0 0 0 0 0 0 0 0 # Rows sent 0 0 0 0 0 0 0 0
# Rows examine 100 61.48k 61.48k 61.48k 61.48k 61.48k 0 61.48k # Rows examine 0 0 0 0 0 0 0 0
# Merge passes 0 0 0 0 0 0 0 0 # Merge passes 0 0 0 0 0 0 0 0
# Query size 25 129 129 129 129 129 0 129 # Query size 13 66 66 66 66 66 0 66
# Boolean: # InnoDB:
# Full scan 100% yes, 0% no # IO r bytes 0 0 0 0 0 0 0 0
# IO r ops 0 0 0 0 0 0 0 0
# IO r wait 0 0 0 0 0 0 0 0
# pages distin 22 24 24 24 24 24 0 24
# queue wait 0 0 0 0 0 0 0 0
# rec lock wai 0 0 0 0 0 0 0 0
# String: # String:
# Databases db1 # Databases db1
# Hosts # Hosts
@@ -63,21 +68,14 @@ select biz = '91848182522' from foo.bar \G
# Query_time distribution # Query_time distribution
# 1us # 1us
# 10us # 10us
# 100us # 100us ################################################################
# 1ms # 1ms
# 10ms # 10ms
# 100ms ################################################################ # 100ms
# 1s # 1s
# 10s+ # 10s+
# Tables # Tables
# SHOW TABLE STATUS FROM `db2` LIKE 'tuningdetail_21_265507'\G # SHOW TABLE STATUS FROM `db3` LIKE 'vendor11gonzo'\G
# SHOW CREATE TABLE `db2`.`tuningdetail_21_265507`\G # SHOW CREATE TABLE `db3`.`vendor11gonzo`\G
# SHOW TABLE STATUS FROM `db1` LIKE 'gonzo'\G INSERT INTO db3.vendor11gonzo (makef, bizzle)
# SHOW CREATE TABLE `db1`.`gonzo`\G VALUES ('', 'Exact')\G
update db2.tuningdetail_21_265507 n
inner join db1.gonzo a using(gonzo)
set n.column1 = a.column1, n.word3 = a.word3\G
# Converted for EXPLAIN
# EXPLAIN /*!50100 PARTITIONS*/
select n.column1 = a.column1, n.word3 = a.word3 from db2.tuningdetail_21_265507 n
inner join db1.gonzo a using(gonzo) \G

View File

@@ -1,36 +1,5 @@
# Query 1: 2 QPS, 0.00x concurrency, ID 0x07AEF8EFAB3FA3CE at byte 509 ___ # Query 1: 0.00 QPS, 0.00x concurrency, ID 0xAC1BF726F2AB10C5 at byte 861
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2009-07-27 11:19:30 to 11:19:31
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 50 2
# Exec time 50 24us 12us 12us 12us 12us 0 12us
# Lock time 0 0 0 0 0 0 0 0
# Rows sent 0 0 0 0 0 0 0 0
# Rows examine 0 0 0 0 0 0 0 0
# Query size 50 34 17 17 17 17 0 17
# String:
# Databases db2
# Hosts
# Users [SQL_SLAVE]
# Query_time distribution
# 1us
# 10us ################################################################
# 100us
# 1ms
# 10ms
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS FROM `db2` LIKE 'bar'\G
# SHOW CREATE TABLE `db2`.`bar`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT * FROM bar\G
# Query 2: 0.00 QPS, 0.00x concurrency, ID 0xAC1BF726F2AB10C5 at byte 861
# This item is included in the report because it matches --limit. # This item is included in the report because it matches --limit.
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Time range: 2009-07-27 11:30:00 to 2009-07-28 18:00:00 # Time range: 2009-07-27 11:30:00 to 2009-07-28 18:00:00
@@ -60,3 +29,34 @@ SELECT * FROM bar\G
# SHOW CREATE TABLE `db1`.`foo`\G # SHOW CREATE TABLE `db1`.`foo`\G
# EXPLAIN /*!50100 PARTITIONS*/ # EXPLAIN /*!50100 PARTITIONS*/
SELECT * FROM foo\G SELECT * FROM foo\G
# Query 2: 2 QPS, 0.00x concurrency, ID 0x07AEF8EFAB3FA3CE at byte 509 ___
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: 2009-07-27 11:19:30 to 11:19:31
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 50 2
# Exec time 50 24us 12us 12us 12us 12us 0 12us
# Lock time 0 0 0 0 0 0 0 0
# Rows sent 0 0 0 0 0 0 0 0
# Rows examine 0 0 0 0 0 0 0 0
# Query size 50 34 17 17 17 17 0 17
# String:
# Databases db2
# Hosts
# Users [SQL_SLAVE]
# Query_time distribution
# 1us
# 10us ################################################################
# 100us
# 1ms
# 10ms
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS FROM `db2` LIKE 'bar'\G
# SHOW CREATE TABLE `db2`.`bar`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT * FROM bar\G

View File

@@ -17,7 +17,37 @@
# queue wait 0 0 0 0 0 0 0 # queue wait 0 0 0 0 0 0 0
# rec lock wai 0 0 0 0 0 0 0 # rec lock wai 0 0 0 0 0 0 0
# Query 1: 0 QPS, 0x concurrency, ID 0x727841EC88423713 at byte 0 ________ # Query 1: 0 QPS, 0x concurrency, ID 0x9E892D4B16D7BFC2 at byte 525 ______
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: all events occurred at 2007-12-18 11:48:27
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 50 1
# Exec time 0 0 0 0 0 0 0 0
# Lock time 0 0 0 0 0 0 0 0
# Rows sent 0 0 0 0 0 0 0 0
# Rows examine 0 0 0 0 0 0 0 0
# Query size 52 48 48 48 48 48 0 48
# String:
# Hosts
# Users [SQL_SLAVE]
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS LIKE 'blah'\G
# SHOW CREATE TABLE `blah`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT * FROM blah WHERE something = 'important'\G
# Query 2: 0 QPS, 0x concurrency, ID 0x727841EC88423713 at byte 0 ________
# This item is included in the report because it matches --limit. # This item is included in the report because it matches --limit.
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Time range: all events occurred at 2007-12-18 11:48:27 # Time range: all events occurred at 2007-12-18 11:48:27
@@ -54,38 +84,8 @@
# SHOW CREATE TABLE `db`.`v`\G # SHOW CREATE TABLE `db`.`v`\G
INSERT INTO db.v (m, b) VALUES ('', 'Exact')\G INSERT INTO db.v (m, b) VALUES ('', 'Exact')\G
# Query 2: 0 QPS, 0x concurrency, ID 0x9E892D4B16D7BFC2 at byte 525 ______
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Time range: all events occurred at 2007-12-18 11:48:27
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 50 1
# Exec time 0 0 0 0 0 0 0 0
# Lock time 0 0 0 0 0 0 0 0
# Rows sent 0 0 0 0 0 0 0 0
# Rows examine 0 0 0 0 0 0 0 0
# Query size 52 48 48 48 48 48 0 48
# String:
# Hosts
# Users [SQL_SLAVE]
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS LIKE 'blah'\G
# SHOW CREATE TABLE `blah`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT * FROM blah WHERE something = 'important'\G
# Profile # Profile
# Rank Query ID Response time Calls R/Call V/M Item # Rank Query ID Response time Calls R/Call V/M Item
# ==== ================== ============= ===== ====== ===== =========== # ==== ================== ============= ===== ====== ===== ===========
# 1 0x727841EC88423713 0.0000 0.0% 1 0.0000 0.00 INSERT db.v # 1 0x9E892D4B16D7BFC2 0.0000 0.0% 1 0.0000 0.00 SELECT blah
# 2 0x9E892D4B16D7BFC2 0.0000 0.0% 1 0.0000 0.00 SELECT blah # 2 0x727841EC88423713 0.0000 0.0% 1 0.0000 0.00 INSERT db.v

View File

@@ -1,34 +1,5 @@
# Query 1: 0 QPS, 0x concurrency, ID 0x471A0C4BD7A4EE34 at byte 730 ______ # Query 1: 0 QPS, 0x concurrency, ID 0xF33473286088142B at byte 898 ______
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 33 2
# Exec time 49 38ms 19ms 19ms 19ms 19ms 0 19ms
# Lock time 50 19ms 9ms 9ms 9ms 9ms 0 9ms
# Rows sent 0 0 0 0 0 0 0 0
# Rows examine 0 0 0 0 0 0 0 0
# Query size 24 52 26 26 26 26 0 26
# String:
# Databases db
# Hosts 1.2.3.8
# Users meow
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms ################################################################
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS FROM `db` LIKE 'foo'\G
# SHOW CREATE TABLE `db`.`foo`\G
insert `foo` values("bar")\G
# Query 2: 0 QPS, 0x concurrency, ID 0xF33473286088142B at byte 898 ______
# This item is included in the report because it matches --limit. # This item is included in the report because it matches --limit.
# Scores: V/M = 0.00 # Scores: V/M = 0.00
# Attribute pct total min max avg 95% stddev median # Attribute pct total min max avg 95% stddev median
@@ -57,6 +28,35 @@ insert `foo` values("bar")\G
# SHOW CREATE TABLE `db`.`foo`\G # SHOW CREATE TABLE `db`.`foo`\G
replace `foo` values("bar")\G replace `foo` values("bar")\G
# Query 2: 0 QPS, 0x concurrency, ID 0x471A0C4BD7A4EE34 at byte 730 ______
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.00
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 33 2
# Exec time 49 38ms 19ms 19ms 19ms 19ms 0 19ms
# Lock time 50 19ms 9ms 9ms 9ms 9ms 0 9ms
# Rows sent 0 0 0 0 0 0 0 0
# Rows examine 0 0 0 0 0 0 0 0
# Query size 24 52 26 26 26 26 0 26
# String:
# Databases db
# Hosts 1.2.3.8
# Users meow
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms ################################################################
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS FROM `db` LIKE 'foo'\G
# SHOW CREATE TABLE `db`.`foo`\G
insert `foo` values("bar")\G
# Query 3: 0 QPS, 0x concurrency, ID 0xEBAC9C76529E62CE at byte 534 ______ # Query 3: 0 QPS, 0x concurrency, ID 0xEBAC9C76529E62CE at byte 534 ______
# This item is included in the report because it matches --limit. # This item is included in the report because it matches --limit.
# Scores: V/M = 0.00 # Scores: V/M = 0.00
@@ -89,6 +89,6 @@ load data local infile '/tmp/foo.txt' into table `foo`\G
# Profile # Profile
# Rank Query ID Response time Calls R/Call V/M Item # Rank Query ID Response time Calls R/Call V/M Item
# ==== ================== ============= ===== ====== ===== ============= # ==== ================== ============= ===== ====== ===== =============
# 1 0x471A0C4BD7A4EE34 0.0376 50.0% 2 0.0188 0.00 INSERT foo # 1 0xF33473286088142B 0.0376 50.0% 2 0.0188 0.00 REPLACE foo
# 2 0xF33473286088142B 0.0376 50.0% 2 0.0188 0.00 REPLACE foo # 2 0x471A0C4BD7A4EE34 0.0376 50.0% 2 0.0188 0.00 INSERT foo
# 3 0xEBAC9C76529E62CE 0.0000 0.0% 2 0.0000 0.00 LOAD DATA foo # 3 0xEBAC9C76529E62CE 0.0000 0.0% 2 0.0000 0.00 LOAD DATA foo

View File

@@ -52,6 +52,7 @@ ok(
'--since 090727' '--since 090727'
); );
# This test will fail come July 2015. # This test will fail come July 2015.
ok( ok(
no_diff( no_diff(

View File

@@ -37,7 +37,6 @@ ok(
), ),
'Analysis for slow001 with --expected-range' 'Analysis for slow001 with --expected-range'
); );
ok( ok(
no_diff( no_diff(
sub { pt_query_digest::main(@args, $sample.'slow001.txt', qw(--group-by tables)) }, sub { pt_query_digest::main(@args, $sample.'slow001.txt', qw(--group-by tables)) },

View File

@@ -44,7 +44,7 @@ $exit_status = pt_table_checksum::main(@args,
my $t = time - $t0; my $t = time - $t0;
ok( ok(
$t >= 1.0 && $t <= 2.5, $t >= 1.0 && $t <= 2.5 + $ENV{'PERCONA_SLOW_BOX'} ,
"Ran in roughly --run-time 1 second" "Ran in roughly --run-time 1 second"
) or diag("Actual run time: $t"); ) or diag("Actual run time: $t");

View File

@@ -86,8 +86,8 @@ TAR=${TAR:-tar}
check_branch() { check_branch() {
echo -n "Checking branch... " echo -n "Checking branch... "
local clean_branch=$(bzr version-info --check-clean | grep -i 'clean: True') local clean_branch=$(git status --porcelain|wc -l)
if [ -z "$clean_branch" ]; then if [ "$clean_branch" -gt 0 ]; then
die "The branch has uncommitted changes or unknown files" die "The branch has uncommitted changes or unknown files"
fi fi
echo "OK" echo "OK"
@@ -491,9 +491,9 @@ if [ $BUILD -eq 1 ]; then
Branch verified and updated; ready to build $PKG, Branch verified and updated; ready to build $PKG,
but first you must: but first you must:
1. bzr diff and review the changes (Changelog, percon-toolkit.pod, etc.) 1. git diff and review the changes (Changelog, percon-toolkit.pod, etc.)
2. bzr commit -m "Build $PKG" 2. git commit -m "Build $PKG"
3. bzr push 3. git push
Press any key to continue... (or Ctrl-C to abort) Press any key to continue... (or Ctrl-C to abort)
MSG MSG