Fix SHOW PROCESSLIST segfault. [#CLICKHOUSE-2120]

This commit is contained in:
Vitaliy Lyudvichenko 2017-01-30 16:24:42 +03:00
parent 4ae2bed9b6
commit 9f8a967e6c
3 changed files with 6 additions and 1 deletions

View File

@ -193,7 +193,7 @@ static std::tuple<ASTPtr, BlockIO> executeQueryImpl(
res = interpreter->execute();
/// Delayed initialization of query streams (required for KILL QUERY purposes)
if (!internal)
if (!internal && nullptr == typeid_cast<const ASTShowProcesslistQuery *>(&*ast))
(*process_list_entry)->setQueryStreams(res);
/// Hold element of process list till end of query execution.

View File

@ -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