提交 766b752c 编写于 作者: D dmchen

if statement for overflow

上级 af0ca38a
...@@ -797,7 +797,7 @@ int32_t mndBuildStbFromReq(SMnode *pMnode, SStbObj *pDst, SMCreateStbReq *pCreat ...@@ -797,7 +797,7 @@ int32_t mndBuildStbFromReq(SMnode *pMnode, SStbObj *pDst, SMCreateStbReq *pCreat
return -1; return -1;
} }
if(pDst->nextColId > 0 && pDst->nextColId < 0x7fff - pDst->numOfColumns - pDst->numOfTags){ if(pDst->nextColId < 0 || pDst->nextColId >= 0x7fff - pDst->numOfColumns - pDst->numOfTags){
terrno = TSDB_CODE_MND_BIG_FIELD_VALUE; terrno = TSDB_CODE_MND_BIG_FIELD_VALUE;
return -1; return -1;
} }
...@@ -932,7 +932,7 @@ static int32_t mndBuildStbFromAlter(SStbObj *pStb, SStbObj *pDst, SMCreateStbReq ...@@ -932,7 +932,7 @@ static int32_t mndBuildStbFromAlter(SStbObj *pStb, SStbObj *pDst, SMCreateStbReq
return -1; return -1;
} }
if(pDst->nextColId > 0 && pDst->nextColId < 0x7fff - pDst->numOfColumns - pDst->numOfTags){ if(pDst->nextColId < 0 && pDst->nextColId >= 0x7fff - pDst->numOfColumns - pDst->numOfTags){
terrno = TSDB_CODE_MND_BIG_FIELD_VALUE; terrno = TSDB_CODE_MND_BIG_FIELD_VALUE;
return -1; return -1;
} }
...@@ -1164,7 +1164,7 @@ static int32_t mndAddSuperTableTag(const SStbObj *pOld, SStbObj *pNew, SArray *p ...@@ -1164,7 +1164,7 @@ static int32_t mndAddSuperTableTag(const SStbObj *pOld, SStbObj *pNew, SArray *p
return -1; return -1;
} }
if(pNew->nextColId > 0 && pNew->nextColId < 0x7fff - ntags){ if(pNew->nextColId < 0 && pNew->nextColId >= 0x7fff - ntags){
terrno = TSDB_CODE_MND_BIG_FIELD_VALUE; terrno = TSDB_CODE_MND_BIG_FIELD_VALUE;
return -1; return -1;
} }
...@@ -1476,7 +1476,7 @@ static int32_t mndAddSuperTableColumn(const SStbObj *pOld, SStbObj *pNew, SArray ...@@ -1476,7 +1476,7 @@ static int32_t mndAddSuperTableColumn(const SStbObj *pOld, SStbObj *pNew, SArray
return -1; return -1;
} }
if(pNew->nextColId > 0 && pNew->nextColId < 0x7fff - ncols){ if(pNew->nextColId < 0 && pNew->nextColId >= 0x7fff - ncols){
terrno = TSDB_CODE_MND_BIG_FIELD_VALUE; terrno = TSDB_CODE_MND_BIG_FIELD_VALUE;
return -1; return -1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册