2017-09-01 21:46:12 +00:00
|
|
|
#!/usr/bin/env bash
|
2017-08-22 19:51:03 +00:00
|
|
|
|
2017-12-15 19:34:19 +00:00
|
|
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
|
|
. $CURDIR/../shell_config.sh
|
2017-08-22 19:51:03 +00:00
|
|
|
|
2017-12-15 19:34:19 +00:00
|
|
|
$CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS test.ws";
|
|
|
|
$CLICKHOUSE_CLIENT -q "CREATE TABLE test.ws (i UInt8) ENGINE = Memory";
|
|
|
|
|
|
|
|
$CLICKHOUSE_CLIENT -q "INSERT INTO test.ws FORMAT RowBinary ;";
|
|
|
|
$CLICKHOUSE_CLIENT -q "INSERT INTO test.ws FORMAT RowBinary ; ";
|
|
|
|
$CLICKHOUSE_CLIENT -q "INSERT INTO test.ws FORMAT RowBinary
|
2017-08-22 19:51:03 +00:00
|
|
|
; ";
|
2017-12-15 19:34:19 +00:00
|
|
|
echo -n ";" | $CLICKHOUSE_CLIENT -q "INSERT INTO test.ws FORMAT RowBinary";
|
2017-08-22 19:51:03 +00:00
|
|
|
|
2017-12-15 19:34:19 +00:00
|
|
|
$CLICKHOUSE_CLIENT --max_threads=1 -q "SELECT * FROM test.ws";
|
|
|
|
$CLICKHOUSE_CLIENT -q "DROP TABLE test.ws";
|
2017-08-22 19:51:03 +00:00
|
|
|
|
|
|
|
|
2017-12-15 19:34:19 +00:00
|
|
|
$CLICKHOUSE_CLIENT -q "SELECT ''";
|
2017-08-22 19:51:03 +00:00
|
|
|
|
|
|
|
|
2017-12-15 19:34:19 +00:00
|
|
|
$CLICKHOUSE_CLIENT -q "CREATE TABLE test.ws (s String) ENGINE = Memory";
|
|
|
|
$CLICKHOUSE_CLIENT -q "INSERT INTO test.ws FORMAT TSV ;
|
2017-08-22 19:51:03 +00:00
|
|
|
";
|
2017-12-15 19:34:19 +00:00
|
|
|
echo ";" | $CLICKHOUSE_CLIENT -q "INSERT INTO test.ws FORMAT TSV"
|
|
|
|
if $CLICKHOUSE_CLIENT -q "INSERT INTO test.ws FORMAT TSV;" 1>/dev/null 2>/dev/null; then
|
2017-08-22 19:51:03 +00:00
|
|
|
echo ERROR;
|
|
|
|
fi
|
2017-12-15 19:34:19 +00:00
|
|
|
$CLICKHOUSE_CLIENT --max_threads=1 -q "SELECT * FROM test.ws";
|
2017-08-22 19:51:03 +00:00
|
|
|
|
2017-12-15 19:34:19 +00:00
|
|
|
$CLICKHOUSE_CLIENT -q "DROP TABLE test.ws";
|