提交 00b69c19 编写于 作者: S shenglian zhou

safe bound for max row length

上级 08a1abf2
...@@ -846,7 +846,7 @@ static int32_t addChildTableDataPointsToInsertSql(char* cTableName, char* sTable ...@@ -846,7 +846,7 @@ static int32_t addChildTableDataPointsToInsertSql(char* cTableName, char* sTable
} }
for (int i = 0; i < numTags; ++i) { for (int i = 0; i < numTags; ++i) {
if (capacity - totalLen < 1024 * 16) { if (capacity - totalLen < TSDB_MAX_BYTES_PER_ROW) {
goto _cleanup; goto _cleanup;
} }
if (tagKVs[i] == NULL) { if (tagKVs[i] == NULL) {
...@@ -887,7 +887,7 @@ static int32_t addChildTableDataPointsToInsertSql(char* cTableName, char* sTable ...@@ -887,7 +887,7 @@ static int32_t addChildTableDataPointsToInsertSql(char* cTableName, char* sTable
} }
for (; r < rows; ++r) { for (; r < rows; ++r) {
if (capacity - totalLen < 1024 * 16) { if (capacity - totalLen < TSDB_MAX_BYTES_PER_ROW) {
break; break;
} }
ret = smlSnprintf(sql, &totalLen, capacity, "("); ret = smlSnprintf(sql, &totalLen, capacity, "(");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册