fix(stream): avoid data overflow and fix test cases.
This commit is contained in:
parent
be39044b66
commit
77852fa702
|
@ -1700,7 +1700,7 @@ static int32_t setTaskAttrInResBlock(SStreamObj *pStream, SStreamTask *pTask, SS
|
||||||
// info
|
// info
|
||||||
if (pTask->info.taskLevel == TASK_LEVEL__SINK) {
|
if (pTask->info.taskLevel == TASK_LEVEL__SINK) {
|
||||||
const char *sinkStr = "%.2f MiB";
|
const char *sinkStr = "%.2f MiB";
|
||||||
sprintf(buf, sinkStr, pe->sinkDataSize);
|
snprintf(buf, tListLen(buf), sinkStr, pe->sinkDataSize);
|
||||||
} else if (pTask->info.taskLevel == TASK_LEVEL__SOURCE) {
|
} else if (pTask->info.taskLevel == TASK_LEVEL__SOURCE) {
|
||||||
// offset info
|
// offset info
|
||||||
const char *offsetStr = "%" PRId64 " [%" PRId64 ", %" PRId64 "]";
|
const char *offsetStr = "%" PRId64 " [%" PRId64 ", %" PRId64 "]";
|
||||||
|
|
|
@ -222,7 +222,7 @@ class TDTestCase:
|
||||||
|
|
||||||
tdSql.query("select * from information_schema.ins_columns where db_name ='information_schema'")
|
tdSql.query("select * from information_schema.ins_columns where db_name ='information_schema'")
|
||||||
tdLog.info(len(tdSql.queryResult))
|
tdLog.info(len(tdSql.queryResult))
|
||||||
tdSql.checkEqual(True, len(tdSql.queryResult) in range(254, 255))
|
tdSql.checkEqual(True, len(tdSql.queryResult) in range(258, 259))
|
||||||
|
|
||||||
tdSql.query("select * from information_schema.ins_columns where db_name ='performance_schema'")
|
tdSql.query("select * from information_schema.ins_columns where db_name ='performance_schema'")
|
||||||
tdSql.checkEqual(54, len(tdSql.queryResult))
|
tdSql.checkEqual(54, len(tdSql.queryResult))
|
||||||
|
|
Loading…
Reference in New Issue