Added a test

This commit is contained in:
Alexey Milovidov 2020-06-25 22:48:12 +03:00
parent 734be4f376
commit 5d08789602
2 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,2 @@
Hello, world
2

View File

@ -0,0 +1,11 @@
DROP TABLE IF EXISTS test_01344;
CREATE TABLE test_01344 (x String, INDEX idx (x) TYPE set(10) GRANULARITY 1) ENGINE = MergeTree ORDER BY tuple();
INSERT INTO test_01344 VALUES ('Hello, world');
SET min_bytes_to_use_mmap_io = 1;
SELECT * FROM test_01344 WHERE x = 'Hello, world';
SYSTEM FLUSH LOGS;
SELECT PE.Values FROM system.query_log ARRAY JOIN ProfileEvents AS PE WHERE event_date >= yesterday() AND event_time >= now() - 300 AND query LIKE 'SELECT * FROM test_01344 WHERE x = ''Hello, world''%' AND PE.Names = 'CreatedReadBufferMMap' AND type = 2 ORDER BY event_time DESC LIMIT 1;
DROP TABLE test_01344;