mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Merge pull request #40058 from azat/tests/02380_insert_mv_race
tests: fix 02380_insert_mv_race for Ordinary database
This commit is contained in:
commit
7682f739da
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Tags: long, race, no-ordinary-database
|
||||
# Tags: long, race
|
||||
|
||||
# Regression test for INSERT into table with MV attached,
|
||||
# to avoid possible errors if some table will disappears,
|
||||
@ -9,6 +9,12 @@ CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
# shellcheck source=../shell_config.sh
|
||||
. "$CUR_DIR"/../shell_config.sh
|
||||
|
||||
$CLICKHOUSE_CLIENT -nm -q "ATTACH TABLE mv" |& {
|
||||
# CANNOT_GET_CREATE_TABLE_QUERY -- ATTACH TABLE IF EXISTS
|
||||
# TABLE_ALREADY_EXISTS -- ATTACH TABLE IF NOT EXISTS
|
||||
grep -F -m1 Exception | grep -v -e CANNOT_GET_CREATE_TABLE_QUERY -e TABLE_ALREADY_EXISTS
|
||||
}
|
||||
|
||||
$CLICKHOUSE_CLIENT -nm -q "
|
||||
DROP TABLE IF EXISTS null;
|
||||
CREATE TABLE null (key Int) ENGINE = Null;
|
||||
@ -23,4 +29,8 @@ $CLICKHOUSE_CLIENT -q "INSERT INTO null SELECT * FROM numbers_mt(1000) settings
|
||||
} &
|
||||
sleep 0.05
|
||||
$CLICKHOUSE_CLIENT -q "DETACH TABLE mv"
|
||||
|
||||
# avoid leftovers on DROP DATABASE (force_remove_data_recursively_on_drop) for Ordinary database
|
||||
$CLICKHOUSE_CLIENT -q "ATTACH TABLE mv"
|
||||
|
||||
wait
|
||||
|
Loading…
Reference in New Issue
Block a user