mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-11 17:02:25 +00:00
DatabaseAtomic EXCHANGE DICTIONARIES fix test
This commit is contained in:
parent
ebc2fbfd63
commit
2b46006774
@ -44,6 +44,7 @@ LIFETIME(0);
|
||||
SELECT * FROM 01913_db.test_dictionary;
|
||||
|
||||
DROP DICTIONARY 01913_db.test_dictionary;
|
||||
|
||||
DROP TABLE 01913_db.test_source_table_1;
|
||||
DROP TABLE 01913_db.test_source_table_2;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
1 Table1
|
||||
2 Table2
|
||||
2 Table2
|
||||
1 Table1
|
||||
2 Table2
|
||||
|
@ -1,34 +1,39 @@
|
||||
DROP TABLE IF EXISTS table_1;
|
||||
CREATE TABLE table_1 (id UInt64, value String) ENGINE=TinyLog;
|
||||
DROP DATABASE IF EXISTS 01915_db;
|
||||
CREATE DATABASE 01915_db ENGINE=Atomic;
|
||||
|
||||
DROP TABLE IF EXISTS table_2;
|
||||
CREATE TABLE table_2 (id UInt64, value String) ENGINE=TinyLog;
|
||||
DROP TABLE IF EXISTS 01915_db.table_1;
|
||||
CREATE TABLE 01915_db.table_1 (id UInt64, value String) ENGINE=TinyLog;
|
||||
|
||||
INSERT INTO table_1 VALUES (1, 'Table1');
|
||||
INSERT INTO table_2 VALUES (2, 'Table2');
|
||||
DROP TABLE IF EXISTS 01915_db.table_2;
|
||||
CREATE TABLE 01915_db.table_2 (id UInt64, value String) ENGINE=TinyLog;
|
||||
|
||||
DROP DICTIONARY IF EXISTS dictionary_1;
|
||||
CREATE DICTIONARY dictionary_1 (id UInt64, value String)
|
||||
INSERT INTO 01915_db.table_1 VALUES (1, 'Table1');
|
||||
INSERT INTO 01915_db.table_2 VALUES (2, 'Table2');
|
||||
|
||||
DROP DICTIONARY IF EXISTS 01915_db.dictionary_1;
|
||||
CREATE DICTIONARY 01915_db.dictionary_1 (id UInt64, value String)
|
||||
PRIMARY KEY id
|
||||
LAYOUT(DIRECT())
|
||||
SOURCE(CLICKHOUSE(TABLE 'table_1'));
|
||||
SOURCE(CLICKHOUSE(DB '01915_db' TABLE 'table_1'));
|
||||
|
||||
DROP DICTIONARY IF EXISTS dictionary_2;
|
||||
CREATE DICTIONARY dictionary_2 (id UInt64, value String)
|
||||
DROP DICTIONARY IF EXISTS 01915_db.dictionary_2;
|
||||
CREATE DICTIONARY 01915_db.dictionary_2 (id UInt64, value String)
|
||||
PRIMARY KEY id
|
||||
LAYOUT(DIRECT())
|
||||
SOURCE(CLICKHOUSE(TABLE 'table_2'));
|
||||
SOURCE(CLICKHOUSE(DB '01915_db' TABLE 'table_2'));
|
||||
|
||||
SELECT * FROM dictionary_1;
|
||||
SELECT * FROM dictionary_2;
|
||||
SELECT * FROM 01915_db.dictionary_1;
|
||||
SELECT * FROM 01915_db.dictionary_2;
|
||||
|
||||
EXCHANGE DICTIONARIES dictionary_1 AND dictionary_2;
|
||||
EXCHANGE DICTIONARIES 01915_db.dictionary_1 AND 01915_db.dictionary_2;
|
||||
|
||||
SELECT * FROM dictionary_1;
|
||||
SELECT * FROM dictionary_2;
|
||||
SELECT * FROM 01915_db.dictionary_1;
|
||||
SELECT * FROM 01915_db.dictionary_2;
|
||||
|
||||
DROP DICTIONARY dictionary_1;
|
||||
DROP DICTIONARY dictionary_2;
|
||||
DROP DICTIONARY 01915_db.dictionary_1;
|
||||
DROP DICTIONARY 01915_db.dictionary_2;
|
||||
|
||||
DROP TABLE table_1;
|
||||
DROP TABLE table_2;
|
||||
DROP TABLE 01915_db.table_1;
|
||||
DROP TABLE 01915_db.table_2;
|
||||
|
||||
DROP DATABASE 01915_db;
|
||||
|
@ -44,6 +44,7 @@ LIFETIME(0);
|
||||
SELECT * FROM 01915_db.test_dictionary;
|
||||
|
||||
DROP DICTIONARY 01915_db.test_dictionary;
|
||||
|
||||
DROP TABLE 01915_db.test_source_table_1;
|
||||
DROP TABLE 01915_db.test_source_table_2;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user