2022-01-26 09:40:00 +00:00
|
|
|
-- Tags: no-parallel
|
|
|
|
|
2022-01-30 05:46:11 +00:00
|
|
|
DROP DATABASE IF EXISTS dict_db_02179;
|
|
|
|
CREATE DATABASE dict_db_02179;
|
2022-01-26 09:40:00 +00:00
|
|
|
|
2022-01-30 05:46:11 +00:00
|
|
|
CREATE TABLE dict_db_02179.dict_data (key UInt64, val UInt64) Engine=Memory();
|
|
|
|
CREATE DICTIONARY dict_db_02179.dict
|
2022-01-26 09:40:00 +00:00
|
|
|
(
|
|
|
|
key UInt64 DEFAULT 0,
|
|
|
|
val UInt64 DEFAULT 10
|
|
|
|
)
|
|
|
|
PRIMARY KEY key
|
2022-01-30 05:46:11 +00:00
|
|
|
SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() USER 'default' TABLE 'dict_data' PASSWORD '' DB 'dict_db_02179'))
|
2022-01-26 09:40:00 +00:00
|
|
|
LIFETIME(MIN 0 MAX 0)
|
|
|
|
LAYOUT(FLAT());
|
|
|
|
|
2022-01-30 05:46:11 +00:00
|
|
|
INSERT INTO dict_db_02179.dict_data VALUES(1,11);
|
2022-01-26 09:40:00 +00:00
|
|
|
|
2022-01-30 05:46:11 +00:00
|
|
|
SELECT query_count FROM system.dictionaries WHERE database = 'dict_db_02179' AND name = 'dict';
|
|
|
|
SELECT dictGetUInt64('dict_db_02179.dict', 'val', toUInt64(0));
|
|
|
|
SELECT query_count FROM system.dictionaries WHERE database = 'dict_db_02179' AND name = 'dict';
|
2022-01-26 09:40:00 +00:00
|
|
|
|
|
|
|
|
2022-01-30 05:46:11 +00:00
|
|
|
SELECT 'SYSTEM RELOAD DICTIONARIES ON CLUSTER test_shard_localhost';
|
2022-01-31 08:54:57 +00:00
|
|
|
SET distributed_ddl_output_mode='throw';
|
2022-01-26 09:40:00 +00:00
|
|
|
SYSTEM RELOAD DICTIONARIES ON CLUSTER test_shard_localhost;
|
2022-01-31 08:54:57 +00:00
|
|
|
SET distributed_ddl_output_mode='none';
|
2022-01-30 05:46:11 +00:00
|
|
|
SELECT query_count FROM system.dictionaries WHERE database = 'dict_db_02179' AND name = 'dict';
|
|
|
|
SELECT dictGetUInt64('dict_db_02179.dict', 'val', toUInt64(1));
|
|
|
|
SELECT query_count FROM system.dictionaries WHERE database = 'dict_db_02179' AND name = 'dict';
|
2022-01-26 09:40:00 +00:00
|
|
|
|
|
|
|
SELECT 'CREATE DATABASE';
|
2022-01-30 05:46:11 +00:00
|
|
|
DROP DATABASE IF EXISTS empty_db_02179;
|
|
|
|
CREATE DATABASE empty_db_02179;
|
|
|
|
SELECT query_count FROM system.dictionaries WHERE database = 'dict_db_02179' AND name = 'dict';
|
|
|
|
|
|
|
|
DROP DICTIONARY dict_db_02179.dict;
|
|
|
|
DROP TABLE dict_db_02179.dict_data;
|
|
|
|
DROP DATABASE dict_db_02179;
|
|
|
|
DROP DATABASE empty_db_02179;
|