mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-27 16:12:04 +00:00
PT-2120 pt-stalk with --system-only displaying mysql_only message on the screen (#584)
* PT-2123 pt-archiver gives error "Wide character in print at /usr/bin/pt-archiver line 6815" when using --bulk-insert while using character set alias Added check if source DSN has character set UTF specified while option --charset is not provided In this case it is safe to open bulk insert data file in utf8 mode. * PT-2123 pt-archiver gives error "Wide character in print at /usr/bin/pt-archiver line 6815" when using --bulk-insert while using character set alias Removed unrelated row in t/pt-archiver/samples/pt-2123.sql * PT-2123 pt-archiver gives error "Wide character in print at /usr/bin/pt-archiver line 6815" when using --bulk-insert while using character set alias util/update-modules for pt-archiver * PT-2120 - pt-stalk with --system-only displaying MYSQL_ONLY: message on the screen Now we are printing MYSQL_ONLY or SYSTEM_ONLY if option is specified Also added a warning in case if both options provided together Added test cases * Update pt-stalk Identation as was requested by @denisok
This commit is contained in:
@@ -582,6 +582,20 @@ unlike(
|
||||
"Option --system-only does not collect MySQL data"
|
||||
);
|
||||
|
||||
$output = `cat $log_file`;
|
||||
|
||||
like(
|
||||
$output,
|
||||
qr/SYSTEM_ONLY: yes/,
|
||||
"We are printing information message about option SYSTEM_ONLY"
|
||||
);
|
||||
|
||||
unlike(
|
||||
$output,
|
||||
qr/MYSQL_ONLY:/,
|
||||
"We are not printing information message about option MYSQL_ONLY"
|
||||
);
|
||||
|
||||
# ###########################################################################
|
||||
# Test if option --mysql-only works correctly
|
||||
# ###########################################################################
|
||||
@@ -606,6 +620,20 @@ like(
|
||||
"Option --mysql-only collects MySQL data"
|
||||
);
|
||||
|
||||
$output = `cat $log_file`;
|
||||
|
||||
like(
|
||||
$output,
|
||||
qr/MYSQL_ONLY:/,
|
||||
"We are printing information message about option MYSQL_ONLY"
|
||||
);
|
||||
|
||||
unlike(
|
||||
$output,
|
||||
qr/SYSTEM_ONLY: yes/,
|
||||
"We are not printing information message about option SYSTEM_ONLY"
|
||||
);
|
||||
|
||||
# ###########################################################################
|
||||
# Test if options --mysql-only and --system-only specified together,
|
||||
# pt-stalk collects only disk-space, hostname, output, and trigger
|
||||
@@ -625,6 +653,13 @@ is(
|
||||
"If both options --mysql-only and --system-only are specified only essential collections are triggered"
|
||||
);
|
||||
|
||||
$output = `cat $log_file`;
|
||||
|
||||
like(
|
||||
$output,
|
||||
qr/Both options --system-only and --mysql-only specified, collecting only disk-space, hostname, output, and trigger metrics/,
|
||||
"We are printing warning about both options SYSTEM_ONLY and MYSQL_ONLY are specified"
|
||||
);
|
||||
|
||||
# ###########################################################################
|
||||
# Test if open tables are collected if number of open tables <= 1000
|
||||
|
Reference in New Issue
Block a user