Fix test from fuzzer.

This commit is contained in:
Nikolai Kochetov 2021-08-09 15:19:28 +03:00
parent 7320411a7f
commit 57e5407fd8
2 changed files with 11 additions and 0 deletions

View File

@ -342,6 +342,13 @@ static void executeAction(const ExpressionActions::Action & action, ExecutionCon
res_column.type = action.node->result_type;
res_column.name = action.node->result_name;
if (action.node->column)
{
/// Do not execut function if it's result is already known.
res_column.column = action.node->column->cloneResized(num_rows);
break;
}
ColumnsWithTypeAndName arguments(action.arguments.size());
for (size_t i = 0; i < arguments.size(); ++i)
{

View File

@ -3,4 +3,8 @@ create table tab (a LowCardinality(String), b LowCardinality(String)) engine = M
insert into tab values ('1', 'a'), ('2', 'b');
SELECT a = '1' FROM tab WHERE a = '1' and b='a';
-- Fuzzed
SELECT * FROM tab WHERE (a = '1') AND 0 AND (b = 'a');
drop table if exists tab;