mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
use tryReadQuotedStringInto
This commit is contained in:
parent
921b1eecb5
commit
72e6b1d2d4
@ -251,12 +251,7 @@ bool ParserTableAsStringLiteralIdentifier::parseImpl(Pos & pos, ASTPtr & node, E
|
||||
ReadBufferFromMemory in(pos->begin, pos->size());
|
||||
String s;
|
||||
|
||||
try
|
||||
{
|
||||
readQuotedStringWithSQLStyle(s, in);
|
||||
}
|
||||
catch (const Exception &)
|
||||
{
|
||||
if (!tryReadQuotedStringInto(s, in)) {
|
||||
expected.add(pos, "string literal");
|
||||
return false;
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ $CLICKHOUSE_LOCAL -q "SELECT * FROM '${dir}/tmp.csv'"
|
||||
#################
|
||||
echo "Test 3a: check literal no parsing overflow"
|
||||
|
||||
$CLICKHOUSE_LOCAL -q "SELECT * FROM '${dir}/tmp.csv''bad'" 2>&1 | grep -c "UNKNOWN_TABLE"
|
||||
$CLICKHOUSE_LOCAL -q "SELECT * FROM '${dir}/tmp.csv''bad'" 2>&1 | grep -c "SYNTAX_ERROR"
|
||||
#################
|
||||
echo "Test 3b: check literal empty"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user