mirror of https://github.com/ByConity/ByConity
Merge pull request #9975 from CurtizJ/tuple-literal
Fix use-after-free at syntax error
This commit is contained in:
commit
6eb3928567
|
@ -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
|
|
@ -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