-- Tags: no-parallel
-- Does not allow if other tests do SYSTEM RELOAD DICTIONARIES at the same time.

CREATE TABLE dict_data (key UInt64, val UInt64) Engine=Memory();


SELECT query_count FROM system.dictionaries WHERE database = currentDatabase() AND name = 'dict';
SELECT dictGetUInt64('dict', 'val', toUInt64(0));
SELECT query_count FROM system.dictionaries WHERE database = currentDatabase() AND name = 'dict';

SELECT 'SYSTEM RELOAD DICTIONARY';
SYSTEM RELOAD DICTIONARY dict;
SELECT query_count FROM system.dictionaries WHERE database = currentDatabase() AND name = 'dict';
SELECT dictGetUInt64('dict', 'val', toUInt64(0));
SELECT query_count FROM system.dictionaries WHERE database = currentDatabase() AND name = 'dict';

SELECT 'CREATE DATABASE';
DROP DATABASE IF EXISTS empty_db_01036;
CREATE DATABASE IF NOT EXISTS empty_db_01036;
SELECT query_count FROM system.dictionaries WHERE database = currentDatabase() AND name = 'dict';
