ClickHouse/tests/queries/0_stateless/01531_query_log_query_comment.sql
Azat Khuzhin e76066718d Fix query comments in query_log and server log (w/ enable_global_with_statement)
Plus, I guess that enable_global_with_statement will be enabled by
default someday, so it may become significant.

The enable_global_with_statement had been introduced in #15451

Cc: @amosbird
2020-10-20 21:10:36 +03:00

13 lines
606 B
SQL

set log_queries=1;
set log_queries_min_type='QUERY_FINISH';
set enable_global_with_statement=1;
select /* test=01531, enable_global_with_statement=0 */ 2;
system flush logs;
select count() from system.query_log where event_time >= now() - interval 5 minute and query = 'select /* test=01531, enable_global_with_statement=0 */ 2;\n';
set enable_global_with_statement=1;
select /* test=01531 enable_global_with_statement=1 */ 2;
system flush logs;
select count() from system.query_log where event_time >= now() - interval 5 minute and query = 'select /* test=01531 enable_global_with_statement=1 */ 2;\n';