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

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

21 lines
768 B
Bash
Raw Normal View History

2016-12-21 20:43:35 +00:00
#!/usr/bin/env bash
2021-09-12 12:35:27 +00:00
# Tags: shard
2016-12-21 20:43:35 +00:00
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
2016-12-21 20:43:35 +00:00
set -o errexit
set -o pipefail
2015-01-22 21:08:01 +00:00
2024-08-16 11:22:22 +00:00
$CLICKHOUSE_CLIENT --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
";
2020-08-01 00:40:56 +00:00
for _ 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;";