Fix call to undefined get() by removing it and simplifying the warning message.

This commit is contained in:
Daniel Nichter
2013-06-26 13:28:27 -07:00
parent def86634f8
commit 8584f3b734
2 changed files with 11 additions and 13 deletions

View File

@@ -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 {

View File

@@ -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.
# #############################################################################