mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-25 05:44:59 +00:00
Fix call to undefined get() by removing it and simplifying the warning message.
This commit is contained in:
@@ -10285,22 +10285,14 @@ sub exec_nibble {
|
||||
|| $message =~ m/$warn_code{$code}->{pattern}/) )
|
||||
{
|
||||
if ( !$stats->{"mysql_warning_$code"}++ ) { # warn once
|
||||
my $err
|
||||
= "Copying rows caused a MySQL error $code: "
|
||||
warn "Copying rows caused a MySQL error $code: "
|
||||
. ($warn_code{$code}->{message}
|
||||
? $warn_code{$code}->{message}
|
||||
: $message)
|
||||
. "\nThis MySQL error is being ignored ";
|
||||
if ( get('statistics') ) {
|
||||
$err .= "but further occurrences will be reported "
|
||||
. "by --statistics when the tool finishes.\n";
|
||||
}
|
||||
else {
|
||||
$err .= "and further occurrences will not be reported. "
|
||||
. "Specify --statistics to see a count of all "
|
||||
. "suppressed warnings and errors.\n";
|
||||
}
|
||||
warn $err;
|
||||
. "\nNo more warnings about this MySQL error will be "
|
||||
. "reported. If --statistics was specified, "
|
||||
. "mysql_warning_$code will list the total count of "
|
||||
. "this MySQL error.\n";
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@@ -363,6 +363,12 @@ unlike(
|
||||
"Bug 1188264: no undefined subroutine"
|
||||
);
|
||||
|
||||
like(
|
||||
$output,
|
||||
qr/error 1265/, # Data truncated for column 'c' at row 21
|
||||
"Bug 1188264: warning about expected MySQL error 1265"
|
||||
);
|
||||
|
||||
# #############################################################################
|
||||
# Done.
|
||||
# #############################################################################
|
||||
|
Reference in New Issue
Block a user