mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 05:32:52 +00:00
341a6c51d6
* Add StorageSystemISTables.cpp/.h * Another attempt * Columns and Views * Add information schema db and fix information schema 'tables' table * fix build * remove copy-paste, add views to system tables * add test * fix * fix_tests Co-authored-by: Damir Petrov <petrovdamir2235@gmail.com> Co-authored-by: Damir Petrov <0442a403@verstehen.sas.yp-c.yandex.net> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
28 lines
752 B
Bash
Executable File
28 lines
752 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
# shellcheck source=../shell_config.sh
|
|
. "$CURDIR"/../shell_config.sh
|
|
|
|
THREADS=8
|
|
RAND=$(($RANDOM))
|
|
LIMIT=10000
|
|
|
|
function run_selects()
|
|
{
|
|
thread_num=$1
|
|
readarray -t tables_arr < <(${CLICKHOUSE_CLIENT} -q "SELECT database || '.' || name FROM system.tables
|
|
WHERE database in ('system', 'information_schema', 'INFORMATION_SCHEMA') and name!='zookeeper'
|
|
AND sipHash64(name || toString($RAND)) % $THREADS = $thread_num")
|
|
|
|
for t in "${tables_arr[@]}"
|
|
do
|
|
${CLICKHOUSE_CLIENT} -q "SELECT * FROM $t LIMIT $LIMIT FORMAT Null" # Suppress style check: database=$CLICKHOUSE_DATABASEs
|
|
done
|
|
}
|
|
|
|
for ((i=0; i<THREADS; i++)) do
|
|
run_selects "$i" &
|
|
done
|
|
wait
|