ClickHouse/tests/queries/0_stateless/02961_drop_tables.sql

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

33 lines
1.2 KiB
MySQL
Raw Normal View History

2024-01-28 05:53:38 +00:00
-- Tags: no-parallel
2024-01-09 10:11:03 +00:00
DROP DATABASE IF EXISTS 02961_db1;
CREATE DATABASE IF NOT EXISTS 02961_db1;
DROP DATABASE IF EXISTS 02961_db2;
CREATE DATABASE IF NOT EXISTS 02961_db2;
CREATE TABLE IF NOT EXISTS 02961_db1.02961_tb1 (id UInt32) Engine=Memory();
CREATE TABLE IF NOT EXISTS 02961_db1.02961_tb2 (id UInt32) Engine=Memory();
CREATE TABLE IF NOT EXISTS 02961_db2.02961_tb3 (id UInt32) Engine=Memory();
CREATE TABLE IF NOT EXISTS 02961_db2.02961_tb4 (id UInt32) Engine=Memory();
CREATE TABLE IF NOT EXISTS 02961_db2.02961_tb5 (id UInt32) Engine=Memory();
DROP TABLE 02961_db1.02961_tb1, 02961_db1.02961_tb2, 02961_db2.02961_tb3;
SELECT '-- check which tables exist in 02961_db1';
SHOW TABLES FROM 02961_db1;
SELECT '-- check which tables exist in 02961_db2';
SHOW TABLES FROM 02961_db2;
SELECT 'Test when deletion of existing table fails';
DROP TABLE 02961_db2.02961_tb4, 02961_db1.02961_tb1, 02961_db2.02961_tb5; -- { serverError UNKNOWN_TABLE }
SELECT '-- check which tables exist in 02961_db1';
SHOW TABLES FROM 02961_db1;
SELECT '-- check which tables exist in 02961_db2';
SHOW TABLES FROM 02961_db2;
DROP DATABASE IF EXISTS 02961_db1;
DROP DATABASE IF EXISTS 02961_db2;