提交 3843e296 编写于 作者: S slzhou

fix: add timestamp range start/end check error

上级 a0420f6f
......@@ -4242,6 +4242,7 @@ int32_t setKillInfo(SSqlObj* pSql, struct SSqlInfo* pInfo, int32_t killType) {
static int32_t setCompactVnodeInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) {
const char* msg1 = "start timestamp error";
const char* msg2 = "end timestamp error";
const char* msg3 = "compact range start timestamp is less than or equal to end timestamp";
SSqlCmd* pCmd = &pSql->cmd;
pCmd->command = pInfo->type;
......@@ -4264,6 +4265,10 @@ static int32_t setCompactVnodeInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) {
} else {
pQueryInfo->range.ekey = INT64_MAX;
}
if (pQueryInfo->range.skey >= pQueryInfo->range.ekey) {
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg3);
}
return TSDB_CODE_SUCCESS;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册