database atomic tests can not create table with same name as detached permanently can not detach twice can not drop detached can not replace with the other table can still show the create statement Row 1: ────── statement: CREATE TABLE test1601_detach_permanently_atomic.test_name_reuse ( `number` UInt64 ) ENGINE = MergeTree ORDER BY tuple() SETTINGS index_granularity = 8192 can not attach with bad uuid can attach with short syntax 100 can not detach permanently the table which is already detached (temporary) 100 After database reattachement the table is back (it was detached temporary) And we can detach it permanently After database reattachement the table is still absent (it was detached permamently) And we can not detach it permanently But we can attach it back And detach permanently again to check how database drop will behave DROP database ----------------------- database ordinary tests can not create table with same name as detached permanently can not detach twice can not drop detached can not replace with the other table can still show the create statement Row 1: ────── statement: CREATE TABLE test1601_detach_permanently_ordinary.test_name_reuse ( `number` UInt64 ) ENGINE = MergeTree ORDER BY tuple() SETTINGS index_granularity = 8192 can attach with full syntax can attach with short syntax can not detach permanently the table which is already detached (temporary) After database reattachement the table is back (it was detached temporary) And we can detach it permanently After database reattachement the table is still absent (it was detached permamently) And we can not detach it permanently But we can attach it back And detach permanently again to check how database drop will behave DROP database - Directory not empty error, but database detached DROP database - now success ----------------------- database lazy tests can not create table with same name as detached permanently can not detach twice can not drop detached can not replace with the other table can still show the create statement Row 1: ────── statement: CREATE TABLE test1601_detach_permanently_lazy.test_name_reuse ( `number` UInt64 ) ENGINE = Log can attach with full syntax can attach with short syntax can not detach permanently the table which is already detached (temporary) After database reattachement the table is back (it was detached temporary) And we can detach it permanently After database reattachement the table is still absent (it was detached permamently) And we can not detach it permanently But we can attach it back And detach permanently again to check how database drop will behave DROP database - Directory not empty error, but database deteched DROP database - now success