2017-07-10 17:30:18 +00:00
#!/usr/bin/env bash
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
2019-04-18 23:29:32 +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 'value\|Cannot modify .* setting in readonly mode'
$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 'value\|Cannot modify .* setting in readonly mode'
2017-07-10 17:30:18 +00:00
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
2019-10-11 15:59:27 +00:00
${ CLICKHOUSE_CURL } -sS " ${ CLICKHOUSE_URL } &session_id=readonly&session_timeout=3600 " -d 'SET readonly = 1'
2017-12-15 19:34:19 +00:00
2019-10-11 15:59:27 +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 'value\|Cannot modify .* setting in readonly mode.'
${ 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 'value\|Cannot modify .* setting in readonly mode'