dbms: added test [#METR-15352].

This commit is contained in:
Alexey Milovidov 2015-03-08 00:03:54 +03:00
parent 82b3fb4921
commit b1c48ebc08
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,16 @@
#!/bin/bash
clickhouse-client -n --query="
DROP TABLE IF EXISTS test.numbers_100k;
CREATE VIEW test.numbers_100k AS SELECT * FROM system.numbers LIMIT 100000;
";
for i in $(seq 1000000 20000 10000000 && seq 10100000 100000 20000000); do
clickhouse-client --max_memory_usage=$i --query="
SELECT intDiv(number, 5) AS k, max(toString(number)) FROM remote('127.0.0.{1,2}', test.numbers_100k) GROUP BY k ORDER BY k LIMIT 1;
" 2> /dev/null;
CODE=$?;
[ "$CODE" -ne "241" ] && [ "$CODE" -ne "0" ] && echo "Fail" && break;
done | uniq
clickhouse-client --query="DROP TABLE test.numbers_100k;";