Improve condition in case the default column consumes slightly more memory

It never happened in the few hundreds of tests I ran successfully,
but we'd rather be safe than sorry.
This commit is contained in:
Pablo Marcos 2024-08-12 16:16:50 +00:00
parent da5b9582a9
commit 858b7e55d0

View File

@ -28,7 +28,8 @@ function test()
SYSTEM FLUSH LOGS;
WITH memory_1 AS (SELECT memory_usage FROM system.query_log WHERE current_database = currentDatabase() AND query_id='$uuid_1' AND type = 'QueryFinish' as memory_1),
memory_2 AS (SELECT memory_usage FROM system.query_log WHERE current_database = currentDatabase() AND query_id='$uuid_2' AND type = 'QueryFinish' as memory_2)
SELECT memory_1.memory_usage <= 1.2 * memory_2.memory_usage FROM memory_1, memory_2;"
SELECT memory_1.memory_usage <= 1.2 * memory_2.memory_usage OR
memory_2.memory_usage <= 1.2 * memory_1.memory_usage FROM memory_1, memory_2;"
}
test ""