mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 03:22:14 +00:00
26 lines
656 B
Bash
Executable File
26 lines
656 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -ue
|
|
|
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
. "$CURDIR"/../shell_config.sh
|
|
|
|
query_id=$(${CLICKHOUSE_CLIENT} -q "select lower(hex(reverse(reinterpretAsString(generateUUIDv4()))))")
|
|
|
|
${CLICKHOUSE_CLIENT} -q "select 1 format Null" "--query_id=$query_id"
|
|
|
|
${CLICKHOUSE_CURL} \
|
|
--header "X-ClickHouse-Query-Id: $query_id" \
|
|
$CLICKHOUSE_URL \
|
|
--get \
|
|
--data-urlencode "query=select 1 format Null"
|
|
|
|
${CLICKHOUSE_CLIENT} -n -q "
|
|
system flush logs;
|
|
select interface, initial_query_id = query_id
|
|
from system.query_log
|
|
where query_id = '$query_id' and type = 'QueryFinish'
|
|
order by interface
|
|
;
|
|
"
|
|
|