fix tests

This commit is contained in:
FArthur-cmd 2022-12-03 22:02:37 +00:00
parent 7ee4934558
commit 8ff7a1c609
3 changed files with 19 additions and 8 deletions

View File

@ -1,2 +1,2 @@
test_02480_table Memory
test_02480_table MergeTree
test_02480_view View

View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
database=$($CLICKHOUSE_CLIENT -q 'SELECT currentDatabase()')
$CLICKHOUSE_CLIENT -nm -q "
DROP TABLE IF EXISTS test_02480_table;
DROP VIEW IF EXISTS test_02480_view;
CREATE TABLE test_02480_table (id Int64) ENGINE=MergeTree ORDER BY id;
CREATE VIEW test_02480_view AS SELECT * FROM test_02480_table;
SHOW FULL TABLES FROM $database LIKE '%';
DROP TABLE IF EXISTS test_02480_table;
DROP VIEW IF EXISTS test_02480_view;
"

View File

@ -1,7 +0,0 @@
DROP TABLE IF EXISTS test_02480_table;
DROP VIEW IF EXISTS test_02480_view;
CREATE TABLE test_02480_table (id Int64) ENGINE=Memory();
CREATE VIEW test_02480_view AS SELECT * FROM test_02480_table;
SHOW FULL TABLES FROM `default` LIKE '%';
DROP TABLE IF EXISTS test_02480_table;
DROP VIEW IF EXISTS test_02480_view;