未验证 提交 80932329 编写于 作者: H haojun Liao 提交者: GitHub

Update tscSQLParser.c

上级 61127a95
...@@ -6101,7 +6101,7 @@ void tscPrintSelectClause(SSqlObj* pSql, int32_t subClauseIndex) { ...@@ -6101,7 +6101,7 @@ void tscPrintSelectClause(SSqlObj* pSql, int32_t subClauseIndex) {
int32_t tmpLen = 0; int32_t tmpLen = 0;
tmpLen = tmpLen =
sprintf(tmpBuf, "%s(uid:%" PRId64 ", %d)", aAggs[pExpr->functionId].aName, pExpr->uid, pExpr->colInfo.colId); sprintf(tmpBuf, "%s(uid:%" PRId64 ", %d)", aAggs[pExpr->functionId].aName, pExpr->uid, pExpr->colInfo.colId);
if (tmpLen + offset > totalBufSize) break; if (tmpLen + offset >= totalBufSize - 1) break;
offset += sprintf(str + offset, "%s", tmpBuf); offset += sprintf(str + offset, "%s", tmpBuf);
...@@ -6110,6 +6110,7 @@ void tscPrintSelectClause(SSqlObj* pSql, int32_t subClauseIndex) { ...@@ -6110,6 +6110,7 @@ void tscPrintSelectClause(SSqlObj* pSql, int32_t subClauseIndex) {
} }
} }
assert(offset < totalBufSize);
str[offset] = ']'; str[offset] = ']';
tscDebug("%p select clause:%s", pSql, str); tscDebug("%p select clause:%s", pSql, str);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册