From 082dbea0393774ef96c044db762133a8d895c814 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 15 Aug 2020 00:34:12 +0300 Subject: [PATCH] Cover Settings in query_log with non default log_queries_min_type --- .../01231_log_queries_min_type.reference | 1 + .../0_stateless/01231_log_queries_min_type.sql | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/queries/0_stateless/01231_log_queries_min_type.reference b/tests/queries/0_stateless/01231_log_queries_min_type.reference index dc820b2eb1e..61f4c09dd20 100644 --- a/tests/queries/0_stateless/01231_log_queries_min_type.reference +++ b/tests/queries/0_stateless/01231_log_queries_min_type.reference @@ -3,3 +3,4 @@ 01231_log_queries_min_type/EXCEPTION_BEFORE_START 0 1 +1 diff --git a/tests/queries/0_stateless/01231_log_queries_min_type.sql b/tests/queries/0_stateless/01231_log_queries_min_type.sql index 0582499d242..bfeeca96d4b 100644 --- a/tests/queries/0_stateless/01231_log_queries_min_type.sql +++ b/tests/queries/0_stateless/01231_log_queries_min_type.sql @@ -9,7 +9,18 @@ select '01231_log_queries_min_type/EXCEPTION_BEFORE_START'; system flush logs; select count() from system.query_log where query like '%01231_log_queries_min_type/EXCEPTION_BEFORE_START%' and query not like '%system.query_log%' and event_date = today() and event_time >= now() - interval 1 minute; +set max_rows_to_read='100K'; set log_queries_min_type='EXCEPTION_WHILE_PROCESSING'; -select '01231_log_queries_min_type/EXCEPTION_WHILE_PROCESSING', max(number) from system.numbers limit 1e6 settings max_rows_to_read='100K'; -- { serverError 158; } +select '01231_log_queries_min_type/EXCEPTION_WHILE_PROCESSING', max(number) from system.numbers limit 1e6; -- { serverError 158; } system flush logs; select count() from system.query_log where query like '%01231_log_queries_min_type/EXCEPTION_WHILE_PROCESSING%' and query not like '%system.query_log%' and event_date = today() and event_time >= now() - interval 1 minute and type = 'ExceptionWhileProcessing'; + +select '01231_log_queries_min_type w/ Settings/EXCEPTION_WHILE_PROCESSING', max(number) from system.numbers limit 1e6; -- { serverError 158; } +system flush logs; +select count() from system.query_log where + query like '%01231_log_queries_min_type w/ Settings/EXCEPTION_WHILE_PROCESSING%' and + query not like '%system.query_log%' and + event_date = today() and + event_time >= now() - interval 1 minute and + type = 'ExceptionWhileProcessing' and + has(Settings.Names, 'max_rows_to_read');