ClickHouse/tests/queries/0_stateless/02096_rename_atomic_hang.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
870 B
MySQL
Raw Normal View History

-- Tags: no-parallel
2024-02-21 22:26:30 +00:00
SET send_logs_level = 'fatal';
drop database if exists db_hang;
drop database if exists db_hang_temp;
2022-06-23 07:59:13 +00:00
set allow_deprecated_database_ordinary=1;
2024-02-21 17:55:30 +00:00
-- Creation of a database with Ordinary engine emits a warning.
create database db_hang engine=Ordinary;
use db_hang;
create table db_hang.test(A Int64) Engine=MergeTree order by A;
create materialized view db_hang.test_mv(A Int64) Engine=MergeTree order by A as select * from db_hang.test;
insert into db_hang.test select * from numbers(1000);
create database db_hang_temp engine=Atomic;
rename table db_hang.test to db_hang_temp.test;
rename table db_hang.test_mv to db_hang_temp.test_mv;
drop database db_hang;
rename database db_hang_temp to db_hang;
insert into db_hang.test select * from numbers(1000);
select count() from db_hang.test;
select count() from db_hang.test_mv;
drop database db_hang;