2016-12-21 20:04:27 +00:00
|
|
|
#!/usr/bin/env bash
|
2016-08-17 06:03:46 +00:00
|
|
|
|
2017-12-15 19:34:19 +00:00
|
|
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
2020-08-01 00:51:12 +00:00
|
|
|
. "$CURDIR"/../shell_config.sh
|
2017-12-15 19:34:19 +00:00
|
|
|
|
|
|
|
$CLICKHOUSE_CLIENT --query="SELECT 1"
|
|
|
|
$CLICKHOUSE_CLIENT --query="SELECT 1;"
|
|
|
|
$CLICKHOUSE_CLIENT --query="SELECT 1; "
|
|
|
|
$CLICKHOUSE_CLIENT --query="SELECT 1 ; "
|
|
|
|
|
|
|
|
$CLICKHOUSE_CLIENT --query="SELECT 1; S" 2>&1 | grep -o 'Syntax error'
|
|
|
|
$CLICKHOUSE_CLIENT --query="SELECT 1; SELECT 2" 2>&1 | grep -o 'Syntax error'
|
|
|
|
$CLICKHOUSE_CLIENT --query="SELECT 1; SELECT 2;" 2>&1 | grep -o 'Syntax error'
|
|
|
|
$CLICKHOUSE_CLIENT --query="SELECT 1; SELECT 2; SELECT" 2>&1 | grep -o 'Syntax error'
|
|
|
|
|
|
|
|
$CLICKHOUSE_CLIENT -n --query="SELECT 1; S" 2>&1 | grep -o 'Syntax error'
|
|
|
|
$CLICKHOUSE_CLIENT -n --query="SELECT 1; SELECT 2"
|
|
|
|
$CLICKHOUSE_CLIENT -n --query="SELECT 1; SELECT 2;"
|
|
|
|
$CLICKHOUSE_CLIENT -n --query="SELECT 1; SELECT 2; SELECT" 2>&1 | grep -o 'Syntax error'
|
|
|
|
|
2019-04-18 18:48:04 +00:00
|
|
|
$CLICKHOUSE_CLIENT -n --query="DROP TABLE IF EXISTS t_00366; CREATE TABLE t_00366 (x UInt64) ENGINE = TinyLog;"
|
2019-04-16 14:13:13 +00:00
|
|
|
|
2019-04-18 18:48:04 +00:00
|
|
|
$CLICKHOUSE_CLIENT --query="INSERT INTO t_00366 VALUES (1),(2),(3);"
|
|
|
|
$CLICKHOUSE_CLIENT --query="SELECT * FROM t_00366"
|
|
|
|
$CLICKHOUSE_CLIENT --query="INSERT INTO t_00366 VALUES" <<< "(4),(5),(6)"
|
|
|
|
$CLICKHOUSE_CLIENT --query="SELECT * FROM t_00366"
|
2019-04-16 14:13:13 +00:00
|
|
|
|
2019-04-18 18:48:04 +00:00
|
|
|
$CLICKHOUSE_CLIENT -n --query="INSERT INTO t_00366 VALUES (1),(2),(3);"
|
|
|
|
$CLICKHOUSE_CLIENT -n --query="SELECT * FROM t_00366"
|
|
|
|
$CLICKHOUSE_CLIENT -n --query="INSERT INTO t_00366 VALUES" <<< "(4),(5),(6)"
|
|
|
|
$CLICKHOUSE_CLIENT -n --query="SELECT * FROM t_00366"
|
2019-04-16 14:13:13 +00:00
|
|
|
|
2019-10-11 13:34:26 +00:00
|
|
|
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}" -d "SELECT 1"
|
|
|
|
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}" -d "SELECT 1;"
|
|
|
|
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}" -d "SELECT 1; "
|
|
|
|
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}" -d "SELECT 1 ; "
|
2019-04-16 14:13:13 +00:00
|
|
|
|
2019-10-11 13:34:26 +00:00
|
|
|
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}" -d "SELECT 1; S" 2>&1 | grep -o 'Syntax error'
|
|
|
|
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}" -d "SELECT 1; SELECT 2" 2>&1 | grep -o 'Syntax error'
|
|
|
|
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}" -d "SELECT 1; SELECT 2;" 2>&1 | grep -o 'Syntax error'
|
|
|
|
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}" -d "SELECT 1; SELECT 2; SELECT" 2>&1 | grep -o 'Syntax error'
|
2019-04-16 14:13:13 +00:00
|
|
|
|
2019-10-11 13:34:26 +00:00
|
|
|
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}" -d "INSERT INTO t_00366 VALUES (1),(2),(3);"
|
2019-04-18 18:48:04 +00:00
|
|
|
$CLICKHOUSE_CLIENT --query="SELECT * FROM t_00366"
|
2019-10-11 13:34:26 +00:00
|
|
|
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&query=INSERT" -d "INTO t_00366 VALUES (4),(5),(6);"
|
2019-04-18 18:48:04 +00:00
|
|
|
$CLICKHOUSE_CLIENT --query="SELECT * FROM t_00366"
|
2019-10-11 13:34:26 +00:00
|
|
|
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&query=INSERT+INTO+t_00366+VALUES" -d "(7),(8),(9)"
|
2019-04-18 18:48:04 +00:00
|
|
|
$CLICKHOUSE_CLIENT --query="SELECT * FROM t_00366"
|
2019-04-16 14:13:13 +00:00
|
|
|
|
2019-04-18 18:48:04 +00:00
|
|
|
$CLICKHOUSE_CLIENT -n --query="DROP TABLE t_00366;"
|