mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
More tests
This commit is contained in:
parent
67ea66604f
commit
ecde224692
@ -159,6 +159,7 @@ void DatabaseWithOwnTablesBase::shutdown()
|
||||
|
||||
std::lock_guard lock(mutex);
|
||||
tables.clear();
|
||||
dictionaries.clear();
|
||||
}
|
||||
|
||||
DatabaseWithOwnTablesBase::~DatabaseWithOwnTablesBase()
|
||||
|
@ -108,7 +108,6 @@ BlockIO InterpreterDropQuery::executeToTable(
|
||||
database_and_table.first->getMetadataPath()
|
||||
+ escapeForFileName(database_and_table.second->getTableName());
|
||||
|
||||
/// NOTE seems like duplication of the code inside removeTable method of database
|
||||
const auto prev_metadata_name = metadata_file_without_extension + ".sql";
|
||||
const auto drop_metadata_name = metadata_file_without_extension + ".sql.tmp_drop";
|
||||
|
||||
|
@ -25,3 +25,6 @@ memory_db dict2
|
||||
0
|
||||
=DICTIONARY in Dictionary DB
|
||||
=DICTIONARY in Lazy DB
|
||||
=DROP DATABASE WITH DICTIONARY
|
||||
dict4
|
||||
dict4
|
||||
|
@ -151,3 +151,43 @@ LAYOUT(FLAT()); -- {serverError 1}
|
||||
|
||||
DROP DATABASE IF EXISTS lazy_db;
|
||||
|
||||
|
||||
SELECT '=DROP DATABASE WITH DICTIONARY';
|
||||
|
||||
DROP DATABASE IF EXISTS ordinary_db;
|
||||
|
||||
CREATE DATABASE ordinary_db ENGINE = Ordinary;
|
||||
|
||||
CREATE DICTIONARY ordinary_db.dict4
|
||||
(
|
||||
key_column UInt64 DEFAULT 0,
|
||||
second_column UInt8 DEFAULT 1,
|
||||
third_column String DEFAULT 'qqq'
|
||||
)
|
||||
PRIMARY KEY key_column
|
||||
SOURCE(CLICKHOUSE(HOST 'localhost' PORT 9000 USER 'default' TABLE 'table_for_dict' PASSWORD ''))
|
||||
LIFETIME(MIN 1 MAX 10)
|
||||
LAYOUT(FLAT());
|
||||
|
||||
SHOW DICTIONARIES FROM ordinary_db;
|
||||
|
||||
DROP DATABASE IF EXISTS ordinary_db;
|
||||
|
||||
CREATE DATABASE ordinary_db ENGINE = Ordinary;
|
||||
|
||||
SHOW DICTIONARIES FROM ordinary_db;
|
||||
|
||||
CREATE DICTIONARY ordinary_db.dict4
|
||||
(
|
||||
key_column UInt64 DEFAULT 0,
|
||||
second_column UInt8 DEFAULT 1,
|
||||
third_column String DEFAULT 'qqq'
|
||||
)
|
||||
PRIMARY KEY key_column
|
||||
SOURCE(CLICKHOUSE(HOST 'localhost' PORT 9000 USER 'default' TABLE 'table_for_dict' PASSWORD ''))
|
||||
LIFETIME(MIN 1 MAX 10)
|
||||
LAYOUT(FLAT());
|
||||
|
||||
SHOW DICTIONARIES FROM ordinary_db;
|
||||
|
||||
DROP DATABASE IF EXISTS ordinary_db;
|
||||
|
Loading…
Reference in New Issue
Block a user