mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 03:12:43 +00:00
14 lines
732 B
Bash
14 lines
732 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
unset CLICKHOUSE_LOG_COMMENT
|
||
|
|
||
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||
|
# shellcheck source=../shell_config.sh
|
||
|
. "$CURDIR"/../shell_config.sh
|
||
|
|
||
|
$CLICKHOUSE_CLIENT --query="SELECT * from numbers(1)"
|
||
|
$CLICKHOUSE_CLIENT --query="SELECT * from format('TSV', '123')"
|
||
|
|
||
|
$CLICKHOUSE_CLIENT --readonly=1 --query="SELECT * from numbers(1)"
|
||
|
$CLICKHOUSE_CLIENT --readonly=1 --query="SELECT * from format('TSV', '123')" 2>&1 | grep -Fq "Cannot execute query in readonly mode. (READONLY)" && echo 'ERROR' || echo 'OK'
|
||
|
$CLICKHOUSE_CLIENT --readonly=1 --query="INSERT INTO FUNCTION null('x String') (x) FORMAT TSV '123'" 2>&1 | grep -Fq "Cannot execute query in readonly mode. (READONLY)" && echo 'ERROR' || echo 'OK'
|