diff --git a/dbms/src/Interpreters/executeQuery.cpp b/dbms/src/Interpreters/executeQuery.cpp index 206a122c3fb..05edf77c637 100644 --- a/dbms/src/Interpreters/executeQuery.cpp +++ b/dbms/src/Interpreters/executeQuery.cpp @@ -193,7 +193,7 @@ static std::tuple executeQueryImpl( res = interpreter->execute(); /// Delayed initialization of query streams (required for KILL QUERY purposes) - if (!internal) + if (!internal && nullptr == typeid_cast(&*ast)) (*process_list_entry)->setQueryStreams(res); /// Hold element of process list till end of query execution. diff --git a/dbms/tests/queries/0_stateless/00419_show_sql_queries.reference b/dbms/tests/queries/0_stateless/00419_show_sql_queries.reference new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dbms/tests/queries/0_stateless/00419_show_sql_queries.sh b/dbms/tests/queries/0_stateless/00419_show_sql_queries.sh new file mode 100755 index 00000000000..ba9feb54bc8 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00419_show_sql_queries.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +clickhouse-client -q "SHOW PROCESSLIST" &>/dev/null +clickhouse-client -q "SHOW DATABASES" &>/dev/null +clickhouse-client -q "SHOW TABLES" &>/dev/null