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

Merge pull request #5504 from taosdata/hotfix/TD-3351

[TD-3351]fix fid error when ts < 0
......@@ -842,6 +842,10 @@ static int32_t getFileIdFromKey(TSKEY key, int32_t daysPerFile, int32_t precisio
return INT32_MIN;
}
if (key < 0) {
key -= (daysPerFile * tsMsPerDay[precision]);
}
int64_t fid = (int64_t)(key / (daysPerFile * tsMsPerDay[precision])); // set the starting fileId
if (fid < 0L && llabs(fid) > INT32_MAX) { // data value overflow for INT32
fid = INT32_MIN;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册