mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-15 20:24:07 +00:00
Don't check dependencies during CREATE OR REPLACE VIEW during DROP of old table
This commit is contained in:
parent
a6a707dae9
commit
a8d39bd973
@ -1661,6 +1661,7 @@ bool InterpreterCreateQuery::doCreateTable(ASTCreateQuery & create,
|
||||
drop_ast->no_ddl_lock = true;
|
||||
|
||||
auto drop_context = Context::createCopy(context);
|
||||
drop_context->setSetting("check_table_dependencies", false);
|
||||
InterpreterDropQuery interpreter(drop_ast, drop_context);
|
||||
interpreter.execute();
|
||||
}
|
||||
|
@ -0,0 +1,21 @@
|
||||
drop table if exists test;
|
||||
drop view if exists v;
|
||||
drop dictionary if exists dict;
|
||||
create table test (x UInt32, v String) engine=Memory;
|
||||
create view v (x UInt32, v String) as select x, v from test;
|
||||
CREATE DICTIONARY dict
|
||||
(
|
||||
x UInt64,
|
||||
v String
|
||||
)
|
||||
PRIMARY KEY x
|
||||
SOURCE(CLICKHOUSE(TABLE 'v'))
|
||||
LAYOUT(FLAT())
|
||||
LIFETIME(MIN 0 MAX 1000);
|
||||
|
||||
drop view v; -- {serverError HAVE_DEPENDENT_OBJECTS}
|
||||
create or replace view v (x UInt32, v String, y UInt32) as select x, v, 42 as y from test;
|
||||
drop dictionary dict;
|
||||
drop view v;
|
||||
drop table test;
|
||||
|
Loading…
Reference in New Issue
Block a user