2017-07-10 17:30:18 +00:00
#!/usr/bin/env bash
2023-07-04 23:12:38 +00:00
# Tags: no-parallel
2017-07-10 17:30:18 +00:00
2017-12-15 19:34:19 +00:00
CURDIR = $( cd " $( dirname " ${ BASH_SOURCE [0] } " ) " && pwd )
2020-12-28 11:46:53 +00:00
# shellcheck source=../shell_config.sh
2020-08-01 00:51:12 +00:00
. " $CURDIR " /../shell_config.sh
2017-07-10 17:30:18 +00:00
2017-12-15 19:34:19 +00:00
$CLICKHOUSE_CLIENT --query= "select toUInt64(pow(2, 62)) as value format JSON" --output_format_json_quote_64bit_integers= 0 | grep value
$CLICKHOUSE_CLIENT --query= "select toUInt64(pow(2, 62)) as value format JSON" --output_format_json_quote_64bit_integers= 1 | grep value
2017-07-10 17:30:18 +00:00
2022-02-11 14:15:56 +00:00
$CLICKHOUSE_CLIENT --readonly= 1 --multiquery --query= "set output_format_json_quote_64bit_integers=1 ; select toUInt64(pow(2, 63)) as value format JSON" --server_logs_file= /dev/null 2>& 1 | grep -o -q 'value\|Cannot modify .* setting in readonly mode' && echo "OK" || echo "FAIL"
$CLICKHOUSE_CLIENT --readonly= 1 --multiquery --query= "set output_format_json_quote_64bit_integers=0 ; select toUInt64(pow(2, 63)) as value format JSON" --server_logs_file= /dev/null 2>& 1 | grep -o -q 'value\|Cannot modify .* setting in readonly mode' && echo "OK" || echo "FAIL"
2019-10-11 15:59:27 +00:00
${ CLICKHOUSE_CURL } -sS " ${ CLICKHOUSE_URL } &query=SELECT+toUInt64(pow(2,+63))+as+value+format+JSON&output_format_json_quote_64bit_integers=1 " | grep value
${ CLICKHOUSE_CURL } -sS " ${ CLICKHOUSE_URL } &query=SELECT+toUInt64(pow(2,+63))+as+value+format+JSON&output_format_json_quote_64bit_integers=0 " | grep value
2017-07-11 19:58:05 +00:00
2023-07-04 23:12:38 +00:00
${ CLICKHOUSE_CURL } -sS " ${ CLICKHOUSE_URL } &session_id=readonly&query=SELECT+toUInt64(pow(2,+63))+as+value+format+JSON&output_format_json_quote_64bit_integers=1 " 2>& 1 | grep -o -q 'value\|Cannot modify .* setting in readonly mode' && echo "OK" || echo "FAIL"
2022-02-11 14:15:56 +00:00
${ CLICKHOUSE_CURL } -sS " ${ CLICKHOUSE_URL } &session_id=readonly&query=SELECT+toUInt64(pow(2,+63))+as+value+format+JSON&output_format_json_quote_64bit_integers=0 " 2>& 1 | grep -o -q 'value\|Cannot modify .* setting in readonly mode' && echo "OK" || echo "FAIL"