Merge pull request #16795 from taosdata/feature/TD-18765
feat:<TD-18765> support ttl in create table automatic
This commit is contained in:
commit
9543e28e60
|
@ -1134,6 +1134,9 @@ static int32_t parseTableOptions(SInsertParseContext* pCxt) {
|
||||||
return buildSyntaxErrMsg(&pCxt->msg, "Invalid option ttl", sToken.z);
|
return buildSyntaxErrMsg(&pCxt->msg, "Invalid option ttl", sToken.z);
|
||||||
}
|
}
|
||||||
pCxt->createTblReq.ttl = taosStr2Int32(sToken.z, NULL, 10);
|
pCxt->createTblReq.ttl = taosStr2Int32(sToken.z, NULL, 10);
|
||||||
|
if (pCxt->createTblReq.ttl < 0) {
|
||||||
|
return buildSyntaxErrMsg(&pCxt->msg, "Invalid option ttl", sToken.z);
|
||||||
|
}
|
||||||
} else if (TK_COMMENT == sToken.type) {
|
} else if (TK_COMMENT == sToken.type) {
|
||||||
pCxt->pSql += index;
|
pCxt->pSql += index;
|
||||||
NEXT_TOKEN(pCxt->pSql, sToken);
|
NEXT_TOKEN(pCxt->pSql, sToken);
|
||||||
|
|
Loading…
Reference in New Issue