ClickHouse/tests/queries/0_stateless/01670_log_comment.sql
Anton Popov 1e7f3fd576
Update tests/queries/0_stateless/01670_log_comment.sql
Co-authored-by: Alexander Kuzmenkov <36882414+akuzm@users.noreply.github.com>
2021-04-05 20:17:26 +03:00

6 lines
560 B
SQL

SET log_comment = 'log_comment test', log_queries = 1;
SELECT 1;
SYSTEM FLUSH LOGS;
SELECT type, query FROM system.query_log WHERE current_database = currentDatabase() AND log_comment = 'log_comment test' AND query LIKE 'SELECT 1%' AND event_date >= yesterday() AND type = 1 ORDER BY event_time_microseconds DESC LIMIT 1;
SELECT type, query FROM system.query_log WHERE current_database = currentDatabase() AND log_comment = 'log_comment test' AND query LIKE 'SELECT 1%' AND event_date >= yesterday() AND type = 2 ORDER BY event_time_microseconds DESC LIMIT 1;