[tarantool-patches] Re: [PATCH v4 7/8] sql: rework semantic errors
n.pettik
korablev at tarantool.org
Tue Mar 26 21:16:08 MSK 2019
> #if SQL_MAX_COLUMN
> if (pOrderBy->nExpr > db->aLimit[SQL_LIMIT_COLUMN]) {
> - const char *err_msg =
> - is_order_by ? "The number of terms in ORDER BY clause" :
> - "The number of terms in GROUP BY clause";
> + const char *err_msg;
> + if (zType[0] != 'G')
> + err_msg = "The number of terms in ORDER BY clause";
> + else
> + err_msg = "The number of terms in GROUP BY clause”;
Just use format string and sprintf - it allows to remove branching
(like it was in original SQLite code).
>
> New patch:
>
Please, don’t attach whole huge patch when it comes for several light-fixes.
I won’t look at it anyway.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20190326/2a6ad1bc/attachment.html>
More information about the Tarantool-patches
mailing list