mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 09:02:00 +00:00
Added test [#METR-22252].
This commit is contained in:
parent
7a04c805c4
commit
635fed9055
51
dbms/tests/queries/0_stateless/00366_multi_statements.sh
Executable file
51
dbms/tests/queries/0_stateless/00366_multi_statements.sh
Executable file
@ -0,0 +1,51 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
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'
|
||||||
|
|
||||||
|
clickhouse-client -n --query="DROP TABLE IF EXISTS test.t; CREATE TABLE test.t (x UInt64) ENGINE = TinyLog;"
|
||||||
|
|
||||||
|
clickhouse-client --query="INSERT INTO test.t VALUES (1),(2),(3);"
|
||||||
|
clickhouse-client --query="SELECT * FROM test.t"
|
||||||
|
clickhouse-client --query="INSERT INTO test.t VALUES" <<< "(4),(5),(6)"
|
||||||
|
clickhouse-client --query="SELECT * FROM test.t"
|
||||||
|
clickhouse-client --query="INSERT INTO test.t VALUES (7)" <<< ",(8),(9)"
|
||||||
|
clickhouse-client --query="SELECT * FROM test.t"
|
||||||
|
|
||||||
|
clickhouse-client -n --query="INSERT INTO test.t VALUES (1),(2),(3);"
|
||||||
|
clickhouse-client -n --query="SELECT * FROM test.t"
|
||||||
|
clickhouse-client -n --query="INSERT INTO test.t VALUES" <<< "(4),(5),(6)"
|
||||||
|
clickhouse-client -n --query="SELECT * FROM test.t"
|
||||||
|
clickhouse-client -n --query="INSERT INTO test.t VALUES (7)" <<< ",(8),(9)"
|
||||||
|
clickhouse-client -n --query="SELECT * FROM test.t"
|
||||||
|
|
||||||
|
curl -sS 'http://localhost:8123/' -d "SELECT 1"
|
||||||
|
curl -sS 'http://localhost:8123/' -d "SELECT 1;"
|
||||||
|
curl -sS 'http://localhost:8123/' -d "SELECT 1; "
|
||||||
|
curl -sS 'http://localhost:8123/' -d "SELECT 1 ; "
|
||||||
|
|
||||||
|
curl -sS 'http://localhost:8123/' -d "SELECT 1; S" 2>&1 | grep -o 'Syntax error'
|
||||||
|
curl -sS 'http://localhost:8123/' -d "SELECT 1; SELECT 2" 2>&1 | grep -o 'Syntax error'
|
||||||
|
curl -sS 'http://localhost:8123/' -d "SELECT 1; SELECT 2;" 2>&1 | grep -o 'Syntax error'
|
||||||
|
curl -sS 'http://localhost:8123/' -d "SELECT 1; SELECT 2; SELECT" 2>&1 | grep -o 'Syntax error'
|
||||||
|
|
||||||
|
curl -sS 'http://localhost:8123/' -d "INSERT INTO test.t VALUES (1),(2),(3);"
|
||||||
|
clickhouse-client --query="SELECT * FROM test.t"
|
||||||
|
curl -sS 'http://localhost:8123/?query=INSERT' -d "INTO test.t VALUES (4),(5),(6);"
|
||||||
|
clickhouse-client --query="SELECT * FROM test.t"
|
||||||
|
curl -sS 'http://localhost:8123/?query=INSERT+INTO+test.t+VALUES' -d "(7),(8),(9)"
|
||||||
|
clickhouse-client --query="SELECT * FROM test.t"
|
||||||
|
|
||||||
|
clickhouse-client -n --query="DROP TABLE test.t;"
|
Loading…
Reference in New Issue
Block a user