From 7a1d40507a0ac8d837786cd2853ac45b51893d89 Mon Sep 17 00:00:00 2001 From: Alexander Kuzmenkov Date: Fri, 3 Apr 2020 12:55:22 +0300 Subject: [PATCH] fix more tests --- .../0_stateless/01048_exists_query.sql | 70 +++++++++---------- .../01073_attach_if_not_exists.sql | 14 ++-- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/tests/queries/0_stateless/01048_exists_query.sql b/tests/queries/0_stateless/01048_exists_query.sql index 6228b57fe3f..9a4c0558b60 100644 --- a/tests/queries/0_stateless/01048_exists_query.sql +++ b/tests/queries/0_stateless/01048_exists_query.sql @@ -1,44 +1,44 @@ -EXISTS database_for_dict.t; -EXISTS TABLE database_for_dict.t; -EXISTS DICTIONARY database_for_dict.t; +EXISTS db_01048.t_01048; +EXISTS TABLE db_01048.t_01048; +EXISTS DICTIONARY db_01048.t_01048; -DROP DATABASE IF EXISTS database_for_dict; -CREATE DATABASE database_for_dict Engine = Ordinary; +DROP DATABASE IF EXISTS db_01048; +CREATE DATABASE db_01048 Engine = Ordinary; -DROP TABLE IF EXISTS database_for_dict.t; -EXISTS database_for_dict.t; -EXISTS TABLE database_for_dict.t; -EXISTS DICTIONARY database_for_dict.t; +DROP TABLE IF EXISTS db_01048.t_01048; +EXISTS db_01048.t_01048; +EXISTS TABLE db_01048.t_01048; +EXISTS DICTIONARY db_01048.t_01048; -CREATE TABLE database_for_dict.t (x UInt8) ENGINE = Memory; -EXISTS database_for_dict.t; -EXISTS TABLE database_for_dict.t; -EXISTS DICTIONARY database_for_dict.t; +CREATE TABLE db_01048.t_01048 (x UInt8) ENGINE = Memory; +EXISTS db_01048.t_01048; +EXISTS TABLE db_01048.t_01048; +EXISTS DICTIONARY db_01048.t_01048; -DROP TABLE database_for_dict.t; -EXISTS database_for_dict.t; -EXISTS TABLE database_for_dict.t; -EXISTS DICTIONARY database_for_dict.t; +DROP TABLE db_01048.t_01048; +EXISTS db_01048.t_01048; +EXISTS TABLE db_01048.t_01048; +EXISTS DICTIONARY db_01048.t_01048; -DROP DICTIONARY IF EXISTS t; -CREATE TEMPORARY TABLE t (x UInt8); -EXISTS t; -- Does not work for temporary tables. Maybe have to fix. -EXISTS TABLE t; -EXISTS DICTIONARY t; +DROP DICTIONARY IF EXISTS t_01048; +CREATE TEMPORARY TABLE t_01048 (x UInt8); +EXISTS t_01048; -- Does not work for temporary tables. Maybe have to fix. +EXISTS TABLE t_01048; +EXISTS DICTIONARY t_01048; -CREATE DICTIONARY database_for_dict.t (k UInt64, v String) PRIMARY KEY k LAYOUT(FLAT()) SOURCE(HTTP(URL 'http://example.test/' FORMAT TSV)) LIFETIME(1000); -EXISTS database_for_dict.t; -EXISTS TABLE database_for_dict.t; -- Dictionaries are tables as well. But not all tables are dictionaries. -EXISTS DICTIONARY database_for_dict.t; +CREATE DICTIONARY db_01048.t_01048 (k UInt64, v String) PRIMARY KEY k LAYOUT(FLAT()) SOURCE(HTTP(URL 'http://example.test/' FORMAT TSV)) LIFETIME(1000); +EXISTS db_01048.t_01048; +EXISTS TABLE db_01048.t_01048; -- Dictionaries are tables as well. But not all tables are dictionaries. +EXISTS DICTIONARY db_01048.t_01048; -- But dictionary-tables cannot be dropped as usual tables. -DROP TABLE database_for_dict.t; -- { serverError 60 } -DROP DICTIONARY database_for_dict.t; -EXISTS database_for_dict.t; -EXISTS TABLE database_for_dict.t; -EXISTS DICTIONARY database_for_dict.t; +DROP TABLE db_01048.t_01048; -- { serverError 60 } +DROP DICTIONARY db_01048.t_01048; +EXISTS db_01048.t_01048; +EXISTS TABLE db_01048.t_01048; +EXISTS DICTIONARY db_01048.t_01048; -DROP DATABASE database_for_dict; -EXISTS database_for_dict.t; -EXISTS TABLE database_for_dict.t; -EXISTS DICTIONARY database_for_dict.t; +DROP DATABASE db_01048; +EXISTS db_01048.t_01048; +EXISTS TABLE db_01048.t_01048; +EXISTS DICTIONARY db_01048.t_01048; diff --git a/tests/queries/0_stateless/01073_attach_if_not_exists.sql b/tests/queries/0_stateless/01073_attach_if_not_exists.sql index 1c7877a7c73..ed32e023c24 100644 --- a/tests/queries/0_stateless/01073_attach_if_not_exists.sql +++ b/tests/queries/0_stateless/01073_attach_if_not_exists.sql @@ -1,7 +1,7 @@ -CREATE TABLE t (a Int) ENGINE = Log; -ATTACH TABLE t; -- { serverError 57 } -ATTACH TABLE IF NOT EXISTS t; -DETACH TABLE t; -ATTACH TABLE IF NOT EXISTS t; -EXISTS TABLE t; -DROP TABLE t; +CREATE TABLE aine (a Int) ENGINE = Log; +ATTACH TABLE aine; -- { serverError 57 } +ATTACH TABLE IF NOT EXISTS anie; +DETACH TABLE aine; +ATTACH TABLE IF NOT EXISTS aine; +EXISTS TABLE aine; +DROP TABLE aine;