chore: relationship between interval/keep
This commit is contained in:
parent
ac72466429
commit
eae1b4eb03
|
@ -4630,6 +4630,12 @@ static int32_t checkDbRetentionsOption(STranslateContext* pCxt, SNodeList* pRete
|
|||
}
|
||||
|
||||
// check relationships
|
||||
if (pFreq->datum.i >= pKeep->datum.i) {
|
||||
return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION,
|
||||
"Invalid option retentions(freq/keep): %s should larger than %s", pKeep->literal,
|
||||
pFreq->literal);
|
||||
}
|
||||
|
||||
if (NULL != pPrevFreq && pPrevFreq->datum.i >= pFreq->datum.i) {
|
||||
return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION,
|
||||
"Invalid option retentions(freq): %s should larger than %s", pFreq->literal,
|
||||
|
|
|
@ -81,6 +81,7 @@ class TDTestCase:
|
|||
"create database db3 retentions 1s:2557921h precision 'ns'",
|
||||
"create database db3 retentions 1s:153475201m precision 'ns'",
|
||||
# check relationships
|
||||
"create database db5 retentions 1441m:1440m,2d:3d",
|
||||
"create database db5 retentions 2m:1d,1s:2d",
|
||||
"create database db5 retentions 1s:2880m,2s:2879m",
|
||||
"create database db5 retentions 1s:1d,2s:2d,2s:3d",
|
||||
|
|
Loading…
Reference in New Issue