Add a test with recursive DROP TABLE (mv w/o explicit inner table)

This commit is contained in:
Azat Khuzhin 2020-10-07 00:46:58 +03:00
parent ea12ca42c7
commit 91787e6a7e
2 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,2 @@
source
source

View 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;