mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-18 04:12:19 +00:00
fix use-after-free at syntax error
This commit is contained in:
parent
9e5d82641f
commit
6e305b2ec1
@ -1026,8 +1026,7 @@ bool ParserCollectionOfLiterals<Collection>::parseImpl(Pos & pos, ASTPtr & node,
|
||||
}
|
||||
else
|
||||
{
|
||||
String message = String("comma or ") + getTokenName(closing_bracket);
|
||||
expected.add(pos, message.c_str());
|
||||
expected.add(pos, "comma or closing bracket");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,2 @@
|
||||
Syntax error
|
||||
Syntax error
|
7
dbms/tests/queries/0_stateless/01107_tuples_arrays_parsing_exceptions.sh
Executable file
7
dbms/tests/queries/0_stateless/01107_tuples_arrays_parsing_exceptions.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
. $CURDIR/../shell_config.sh
|
||||
|
||||
$CLICKHOUSE_CLIENT -q "SELECT (1, 2 2)" 2>&1 | grep -o "Syntax error"
|
||||
$CLICKHOUSE_CLIENT -q "SELECT [1, 2 2]" 2>&1 | grep -o "Syntax error"
|
Loading…
Reference in New Issue
Block a user