mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
fix tests
This commit is contained in:
parent
c4108ab672
commit
23e8cc24b5
@ -213,7 +213,7 @@ public:
|
||||
DependenciesInfo getLoadingDependenciesInfo(const StorageID & table_id) const;
|
||||
|
||||
TableNamesSet tryRemoveLoadingDependencies(const StorageID & table_id, bool check_dependencies, bool is_drop_database = false);
|
||||
TableNamesSet tryRemoveLoadingDependenciesUnlocked(const QualifiedTableName & table_name, bool check_dependencies, bool is_drop_database = false);
|
||||
TableNamesSet tryRemoveLoadingDependenciesUnlocked(const QualifiedTableName & removing_table, bool check_dependencies, bool is_drop_database = false);
|
||||
void checkTableCanBeRemovedOrRenamed(const StorageID & table_id) const;
|
||||
|
||||
void updateLoadingDependencies(const StorageID & table_id, TableNamesSet && new_dependencies);
|
||||
|
@ -190,7 +190,7 @@ def test_restricted_database(started_cluster):
|
||||
LIFETIME(MIN 1 MAX 10)
|
||||
""")
|
||||
for node in [node1, node2]:
|
||||
node.query("DROP TABLE restricted_db.table_in_restricted_db", user="admin")
|
||||
node.query("DROP DICTIONARY IF EXISTS default.some_dict", user="admin")
|
||||
node.query("DROP DATABASE restricted_db", user="admin")
|
||||
|
||||
|
||||
|
@ -110,8 +110,11 @@ def test_dependent_tables(started_cluster):
|
||||
dependent_tables_assert()
|
||||
instance.restart_clickhouse()
|
||||
dependent_tables_assert()
|
||||
query("drop table a.t")
|
||||
query("drop table lazy.log")
|
||||
query("drop table join")
|
||||
query("drop dictionary test.d")
|
||||
query("drop table src")
|
||||
query("drop table system.join")
|
||||
query("drop database a")
|
||||
query("drop database lazy")
|
||||
query("drop table src")
|
||||
query("drop table join")
|
||||
query("drop table system.join")
|
||||
|
@ -82,8 +82,8 @@
|
||||
LIMIT 500000 FORMAT Null
|
||||
</query>
|
||||
|
||||
<drop_query>DROP TABLE IF EXISTS table_ip_from_dict</drop_query>
|
||||
<drop_query>DROP TABLE IF EXISTS dict_ip_trie_table</drop_query>
|
||||
<drop_query>DROP DICTIONARY IF EXISTS default.dict_ip_trie</drop_query>
|
||||
<drop_query>DROP TABLE IF EXISTS table_ip_trie</drop_query>
|
||||
<drop_query>DROP TABLE IF EXISTS dict_ip_trie_table</drop_query>
|
||||
<drop_query>DROP TABLE IF EXISTS table_ip_from_dict</drop_query>
|
||||
</test>
|
||||
|
@ -1,3 +1,5 @@
|
||||
-- Tags: no-parallel
|
||||
|
||||
drop dictionary if exists default.test_dict_01051_d;
|
||||
drop table if exists default.test_01051_d;
|
||||
drop table if exists default.test_view_01051_d;
|
||||
|
@ -34,10 +34,9 @@ dict1 [] ['dict_src'] ['join','t']
|
||||
dict2 [] ['join'] []
|
||||
dict_src [] [] ['dict1']
|
||||
join [] ['dict1'] ['dict2','s','t']
|
||||
mv [] [] []
|
||||
s [] ['join'] ['t']
|
||||
t [] ['dict1','join','s'] []
|
||||
=====
|
||||
dict1 [] ['dict_src'] ['join']
|
||||
dict_src [] [] ['dict1']
|
||||
join [] ['dict1'] []
|
||||
mv [] [] []
|
||||
|
@ -63,18 +63,20 @@ if [[ $engine == "Atomic" ]]; then
|
||||
else
|
||||
echo "OK"
|
||||
fi
|
||||
|
||||
$CLICKHOUSE_CLIENT -q "drop table mv"
|
||||
$CLICKHOUSE_CLIENT -q "create database ${CLICKHOUSE_DATABASE}_1"
|
||||
|
||||
t_database=${CLICKHOUSE_DATABASE}_1
|
||||
$CLICKHOUSE_CLIENT -q "rename table t to $t_database.t"
|
||||
t_database=${CLICKHOUSE_DATABASE}
|
||||
|
||||
if [[ $engine == "Atomic" ]]; then
|
||||
$CLICKHOUSE_CLIENT -q "rename database ${t_database} to ${t_database}_renamed"
|
||||
t_database="${t_database}_renamed"
|
||||
$CLICKHOUSE_CLIENT -q "rename table t to ${CLICKHOUSE_DATABASE}_1.t"
|
||||
$CLICKHOUSE_CLIENT -q "rename database ${CLICKHOUSE_DATABASE}_1 to ${CLICKHOUSE_DATABASE}_1_renamed"
|
||||
t_database="${CLICKHOUSE_DATABASE}_1_renamed"
|
||||
fi
|
||||
|
||||
$CLICKHOUSE_CLIENT -q "select table, arraySort(dependencies_table),
|
||||
arraySort(loading_dependencies_table), arraySort(loading_dependent_table) from system.tables where database=currentDatabase() order by table"
|
||||
arraySort(loading_dependencies_table), arraySort(loading_dependent_table) from system.tables where database in (currentDatabase(), '$t_database') order by table"
|
||||
|
||||
$CLICKHOUSE_CLIENT -q "drop table ${t_database}.t;"
|
||||
$CLICKHOUSE_CLIENT -q "drop table s;"
|
||||
@ -90,7 +92,9 @@ fi
|
||||
$CLICKHOUSE_CLIENT -q "drop table join;"
|
||||
$CLICKHOUSE_CLIENT -q "drop dictionary dict1;"
|
||||
$CLICKHOUSE_CLIENT -q "drop table dict_src;"
|
||||
$CLICKHOUSE_CLIENT -q "drop database if exists ${t_database}"
|
||||
if [[ $t_database != "$CLICKHOUSE_DATABASE" ]]; then
|
||||
$CLICKHOUSE_CLIENT -q "drop database if exists ${t_database}"
|
||||
fi
|
||||
|
||||
$CLICKHOUSE_CLIENT -q "drop database if exists ${CLICKHOUSE_DATABASE}_1"
|
||||
$CLICKHOUSE_CLIENT -q "create database ${CLICKHOUSE_DATABASE}_1"
|
||||
|
Loading…
Reference in New Issue
Block a user