mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
fix query_id of http queries
This commit is contained in:
parent
a93ae46ac1
commit
08073903ed
@ -166,6 +166,8 @@ public:
|
||||
if (!session.unique())
|
||||
throw Exception("Session is locked by a concurrent client.", ErrorCodes::SESSION_IS_LOCKED);
|
||||
|
||||
session->context.client_info = context.client_info;
|
||||
|
||||
return session;
|
||||
}
|
||||
|
||||
|
1
tests/queries/0_stateless/01194_http_query_id.reference
Normal file
1
tests/queries/0_stateless/01194_http_query_id.reference
Normal file
@ -0,0 +1 @@
|
||||
4
|
16
tests/queries/0_stateless/01194_http_query_id.sh
Executable file
16
tests/queries/0_stateless/01194_http_query_id.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
. $CURDIR/../shell_config.sh
|
||||
|
||||
url="http://${CLICKHOUSE_HOST}:${CLICKHOUSE_PORT_HTTP}/?session_id=test_01194"
|
||||
rnd=$RANDOM
|
||||
|
||||
${CLICKHOUSE_CURL} -sS "$url&query=SELECT+$rnd,1" > /dev/null
|
||||
${CLICKHOUSE_CURL} -sS "$url&query=SELECT+$rnd,2" > /dev/null
|
||||
${CLICKHOUSE_CURL} -sS "$url" --data "SELECT $rnd,3" > /dev/null
|
||||
${CLICKHOUSE_CURL} -sS "$url" --data "SELECT $rnd,4" > /dev/null
|
||||
|
||||
${CLICKHOUSE_CURL} -sS "$url" --data "SYSTEM FLUSH LOGS"
|
||||
|
||||
${CLICKHOUSE_CURL} -sS "$url&query=SELECT+count(DISTINCT+query_id)+FROM+system.query_log+WHERE+query+LIKE+'SELECT+$rnd%25'"
|
Loading…
Reference in New Issue
Block a user