mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Cover dictionary loading after DETACH/ATTACH DATABASE
This is the case when the server is starting.
This commit is contained in:
parent
1892596c4e
commit
6f6b198fb2
@ -0,0 +1,4 @@
|
||||
0 NOT_LOADED
|
||||
0 LOADED
|
||||
10
|
||||
1 LOADED
|
@ -0,0 +1,24 @@
|
||||
DROP DATABASE IF EXISTS dict_db_01254;
|
||||
CREATE DATABASE dict_db_01254;
|
||||
|
||||
CREATE TABLE dict_db_01254.dict_data (key UInt64, val UInt64) Engine=Memory();
|
||||
CREATE DICTIONARY dict_db_01254.dict
|
||||
(
|
||||
key UInt64 DEFAULT 0,
|
||||
val UInt64 DEFAULT 10
|
||||
)
|
||||
PRIMARY KEY key
|
||||
SOURCE(CLICKHOUSE(HOST 'localhost' PORT 9000 USER 'default' TABLE 'dict_data' PASSWORD '' DB 'dict_db_01254'))
|
||||
LIFETIME(MIN 0 MAX 0)
|
||||
LAYOUT(FLAT());
|
||||
|
||||
DETACH DATABASE dict_db_01254;
|
||||
ATTACH DATABASE dict_db_01254;
|
||||
|
||||
SELECT query_count, status FROM system.dictionaries WHERE database = 'dict_db_01254' AND name = 'dict';
|
||||
SYSTEM RELOAD DICTIONARY dict_db_01254.dict;
|
||||
SELECT query_count, status FROM system.dictionaries WHERE database = 'dict_db_01254' AND name = 'dict';
|
||||
SELECT dictGetUInt64('dict_db_01254.dict', 'val', toUInt64(0));
|
||||
SELECT query_count, status FROM system.dictionaries WHERE database = 'dict_db_01254' AND name = 'dict';
|
||||
|
||||
DROP DATABASE dict_db_01254;
|
Loading…
Reference in New Issue
Block a user