Commit 49b4a6e2 authored by Sergei Petrunia's avatar Sergei Petrunia

Fix the testcase for MDEV-31558: log_slow_verbosity_innodb

log_slow_innodb.test sets "log_slow_verbosity_innodb_expected_matches"

in include/log_slow_grep.inc:
- Fix a typo: take value from log_slow_*VERBOSITY*_innodb_expected_matches
- Add a missing "--source include/log_grep.inc"
- two-line search patterns do not work, search for each line individually.
parent 0a199cb8
......@@ -21,5 +21,10 @@
--source include/log_grep.inc
# InnoDB/Engines
--let log_expected_matches = $log_slow_innodb_expected_matches
--let grep_pattern = ^# Pages_accessed: \d+ Pages_read: \d+ Pages_updated: \d+ Old_rows_read: \d+\n# Pages_read_time: \d+\.\d+ Engine_time: \d+\.\d+\$
--let log_expected_matches = $log_slow_verbosity_innodb_expected_matches
--let grep_pattern = ^# Pages_accessed: \d+ Pages_read: \d+ Pages_updated: \d+ Old_rows_read: \d+\$
--source include/log_grep.inc
--let grep_pattern = ^# Pages_read_time: \d+\.\d+ Engine_time: \d+\.\d+\$
--source include/log_grep.inc
......@@ -23,6 +23,10 @@ UPDATE t1 set b=b+1 where a=1 or a=999;
[log_grep.inc] lines: 0
[log_grep.inc] file: log_slow_innodb-verbosity_1 pattern: ^# Tmp_tables: \d+ Tmp_disk_tables: \d+$
[log_grep.inc] lines: 0
[log_grep.inc] file: log_slow_innodb-verbosity_1 pattern: ^# Pages_accessed: \d+ Pages_read: \d+ Pages_updated: \d+ Old_rows_read: \d+$ expected_matches: 2
[log_grep.inc] found expected match count: 2
[log_grep.inc] file: log_slow_innodb-verbosity_1 pattern: ^# Pages_read_time: \d+\.\d+ Engine_time: \d+\.\d+$ expected_matches: 2
[log_grep.inc] found expected match count: 2
SET SESSION log_slow_verbosity='innodb,query_plan';
[slow_log_start.inc] log_slow_innodb-verbosity_2
SELECT 1;
......@@ -43,6 +47,10 @@ SELECT 1;
[log_grep.inc] lines: 0
[log_grep.inc] file: log_slow_innodb-verbosity_2 pattern: ^# Tmp_tables: \d+ Tmp_disk_tables: \d+$
[log_grep.inc] lines: 0
[log_grep.inc] file: log_slow_innodb-verbosity_2 pattern: ^# Pages_accessed: \d+ Pages_read: \d+ Pages_updated: \d+ Old_rows_read: \d+$
[log_grep.inc] lines: 0
[log_grep.inc] file: log_slow_innodb-verbosity_2 pattern: ^# Pages_read_time: \d+\.\d+ Engine_time: \d+\.\d+$
[log_grep.inc] lines: 0
SET SESSION log_slow_verbosity='query_plan';
[log_slow_stop.inc] log_slow_innodb-verbosity_3
--source include/log_slow_start.inc
......@@ -75,4 +83,12 @@ INSERT INTO t1 VALUE(1000) pattern: ^# Filesort: (Yes|No) Filesort_on_disk: (Ye
--source include/log_slow_start.inc
INSERT INTO t1 VALUE(1000) pattern: ^# Tmp_tables: \d+ Tmp_disk_tables: \d+$
[log_grep.inc] lines: 0
[log_grep.inc] file: log_slow_innodb-verbosity_3
--source include/log_slow_start.inc
INSERT INTO t1 VALUE(1000) pattern: ^# Pages_accessed: \d+ Pages_read: \d+ Pages_updated: \d+ Old_rows_read: \d+$
[log_grep.inc] lines: 0
[log_grep.inc] file: log_slow_innodb-verbosity_3
--source include/log_slow_start.inc
INSERT INTO t1 VALUE(1000) pattern: ^# Pages_read_time: \d+\.\d+ Engine_time: \d+\.\d+$
[log_grep.inc] lines: 0
DROP TABLE t1;
......@@ -72,7 +72,7 @@ let log_file=$log_slow_prefix-verbosity_3
INSERT INTO t1 VALUE(1000);
--source include/log_slow_stop.inc
--let log_slow_verbosity_innodb_expected_matches= 1
--let log_slow_verbosity_innodb_expected_matches= 0
--source include/log_slow_grep.inc
DROP TABLE t1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment