提交 6e305b2e 编写于 作者: A Anton Popov

fix use-after-free at syntax error

上级 9e5d8264
......@@ -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;
}
}
......
#!/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"
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册