ClickHouse/tests/queries/0_stateless/00497_whitespaces_in_insert.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
1.0 KiB
Bash
Raw Normal View History

#!/usr/bin/env bash
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
$CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS ws";
$CLICKHOUSE_CLIENT -q "CREATE TABLE ws (i UInt8) ENGINE = Memory";
$CLICKHOUSE_CLIENT -q "INSERT INTO ws FORMAT RowBinary ;";
$CLICKHOUSE_CLIENT -q "INSERT INTO ws FORMAT RowBinary ; ";
$CLICKHOUSE_CLIENT -q "INSERT INTO ws FORMAT RowBinary
; ";
echo -n ";" | $CLICKHOUSE_CLIENT -q "INSERT INTO ws FORMAT RowBinary";
$CLICKHOUSE_CLIENT --max_threads=1 -q "SELECT * FROM ws";
$CLICKHOUSE_CLIENT -q "DROP TABLE ws";
$CLICKHOUSE_CLIENT -q "SELECT ''";
$CLICKHOUSE_CLIENT -q "CREATE TABLE ws (s String) ENGINE = Memory";
$CLICKHOUSE_CLIENT -q "INSERT INTO ws FORMAT TSV ;
";
echo ";" | $CLICKHOUSE_CLIENT -q "INSERT INTO ws FORMAT TSV"
if $CLICKHOUSE_CLIENT -q "INSERT INTO ws FORMAT TSV;" 1>/dev/null 2>/dev/null; then
echo ERROR;
fi
$CLICKHOUSE_CLIENT --max_threads=1 -q "SELECT * FROM ws";
$CLICKHOUSE_CLIENT -q "DROP TABLE ws";