ClickHouse/dbms/tests/queries/0_stateless/00310_tskv.sh
proller e7f82b6a8c
Allow run test without package install and on custom ports. (#1643)
* ExtractFromConfig --try

* Add symlinks to package

* clickhouse-test --order option
2017-12-15 22:34:19 +03:00

18 lines
728 B
Bash
Executable File

#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. $CURDIR/../shell_config.sh
$CLICKHOUSE_CLIENT --query="DROP TABLE IF EXISTS test.tskv";
$CLICKHOUSE_CLIENT --query="CREATE TABLE test.tskv (tskv_format String, timestamp DateTime, timezone String, text String, binary_data String) ENGINE = Memory";
echo -n 'tskv tskv_format=custom-service-log timestamp=2013-01-01 00:00:00 timezone=+0400 text=multiline\ntext binary_data=can contain \0 symbol
binary_data=abc text=Hello, world
binary_data=def text=
tskv
' | $CLICKHOUSE_CLIENT --query="INSERT INTO test.tskv FORMAT TSKV";
$CLICKHOUSE_CLIENT --query="SELECT * FROM test.tskv ORDER BY binary_data";
$CLICKHOUSE_CLIENT --query="DROP TABLE test.tskv";