feat:<TD-18765> support ttl in create table automatic

This commit is contained in:
wangmm0220 2022-09-13 14:36:56 +08:00
parent 2f905064e5
commit ff93a4c3a4
1 changed files with 3 additions and 0 deletions

View File

@ -1134,6 +1134,9 @@ static int32_t parseTableOptions(SInsertParseContext* pCxt) {
return buildSyntaxErrMsg(&pCxt->msg, "Invalid option ttl", sToken.z);
}
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) {
pCxt->pSql += index;
NEXT_TOKEN(pCxt->pSql, sToken);