#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.