[tarantool-patches] Re: [PATCH v4 2/8] sql: set SQL parser errors via diag_set()

n.pettik korablev at tarantool.org
Tue Mar 19 12:41:42 MSK 2019


>>> diff --git a/src/box/sql/tokenize.c b/src/box/sql/tokenize.c
>>> index 58685c4..834c165 100644
>>> --- a/src/box/sql/tokenize.c
>>> +++ b/src/box/sql/tokenize.c
>>> @@ -483,7 +483,9 @@ sqlRunParser(Parse * pParse, const char *zSql, char **pzErrMsg)
>>>             &pParse->sLastToken.isReserved);
>>>     i += pParse->sLastToken.n;
>>>     if (i > mxSqlLen) {
>>> -       pParse->rc = SQL_TOOBIG;
>>> +       diag_set(ClientError, ER_SQL_PARSER_GENERIC,
>>> +          "string or blob too big”);
>> 
>> I would add to error message max possible length.
>> 
> I will add this change in review fix of patch
> "sql: rework semantic errors". Btw I wasn't able to reproduce this
> error due to limit being too big. So I got an error:
> "error: not enough memory". Due to this I didn't create test for
> this error.

This error is an indication that ssmth went really wrong.
Please, investigate this bug or open an issue.

This patch itself LGTM.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20190319/c1704025/attachment.html>


More information about the Tarantool-patches mailing list