mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Add a test with recursive DROP TABLE (mv w/o explicit inner table)
This commit is contained in:
parent
ea12ca42c7
commit
91787e6a7e
@ -0,0 +1,2 @@
|
||||
source
|
||||
source
|
40
tests/queries/0_stateless/01517_drop_mv_with_inner_table.sql
Normal file
40
tests/queries/0_stateless/01517_drop_mv_with_inner_table.sql
Normal file
@ -0,0 +1,40 @@
|
||||
--
|
||||
-- Atomic no SYNC
|
||||
-- (should go first to check that thread for DROP TABLE does not hang)
|
||||
--
|
||||
drop database if exists db_01517_atomic;
|
||||
create database db_01517_atomic Engine=Atomic;
|
||||
|
||||
create table db_01517_atomic.source (key Int) engine=Null;
|
||||
create materialized view db_01517_atomic.mv engine=Null as select * from db_01517_atomic.source;
|
||||
|
||||
drop table db_01517_atomic.mv;
|
||||
-- ensure that the inner had been removed after sync drop
|
||||
drop table db_01517_atomic.source sync;
|
||||
show tables from db_01517_atomic;
|
||||
|
||||
--
|
||||
-- Atomic
|
||||
--
|
||||
drop database if exists db_01517_atomic_sync;
|
||||
create database db_01517_atomic_sync Engine=Atomic;
|
||||
|
||||
create table db_01517_atomic_sync.source (key Int) engine=Null;
|
||||
create materialized view db_01517_atomic_sync.mv engine=Null as select * from db_01517_atomic_sync.source;
|
||||
|
||||
-- drops it and hangs with Atomic engine, due to recursive DROP
|
||||
drop table db_01517_atomic_sync.mv sync;
|
||||
show tables from db_01517_atomic_sync;
|
||||
|
||||
--
|
||||
-- Ordinary
|
||||
---
|
||||
drop database if exists db_01517_ordinary;
|
||||
create database db_01517_ordinary Engine=Ordinary;
|
||||
|
||||
create table db_01517_ordinary.source (key Int) engine=Null;
|
||||
create materialized view db_01517_ordinary.mv engine=Null as select * from db_01517_ordinary.source;
|
||||
|
||||
-- drops it and hangs with Atomic engine, due to recursive DROP
|
||||
drop table db_01517_ordinary.mv sync;
|
||||
show tables from db_01517_ordinary;
|
Loading…
Reference in New Issue
Block a user