ClickHouse/tests/queries/0_stateless/00115_shard_in_incomplete_result.sh

19 lines
716 B
Bash
Raw Normal View History

2016-12-21 20:43:35 +00:00
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. $CURDIR/../shell_config.sh
2016-12-21 20:43:35 +00:00
set -o errexit
set -o pipefail
2015-01-22 21:08:01 +00:00
$CLICKHOUSE_CLIENT -n --query="
DROP TABLE IF EXISTS users;
CREATE TABLE users (UserID UInt64) ENGINE = Log;
INSERT INTO users VALUES (1468013291393583084);
INSERT INTO users VALUES (1321770221388956068);
2015-01-22 21:08:01 +00:00
";
for i in {1..10}; do seq 1 10 | sed "s/.*/SELECT count() FROM (SELECT * FROM remote('127.0.0.{2,3}', ${CLICKHOUSE_DATABASE}, users) WHERE UserID IN (SELECT arrayJoin([1468013291393583084, 1321770221388956068])));/" | $CLICKHOUSE_CLIENT -n | grep -vE '^4$' && echo 'Fail!' && break; echo -n '.'; done; echo
2015-01-22 21:08:01 +00:00
$CLICKHOUSE_CLIENT --query="DROP TABLE users;";