diff --git a/src/common/src/tglobal.c b/src/common/src/tglobal.c index 684fb71af925202dde1954e1ec7fdb6a8b3fdf3c..fd5c6d8c2573e7be1a361692fd5a26fb657f847c 100644 --- a/src/common/src/tglobal.c +++ b/src/common/src/tglobal.c @@ -560,7 +560,7 @@ static void doInitGlobalConfig() { cfg.ptr = &tsMinIntervalTime; cfg.valType = TAOS_CFG_VTYPE_INT32; cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW; - cfg.minValue = 10; + cfg.minValue = 1; cfg.maxValue = 1000000; cfg.ptrLength = 0; cfg.unitType = TAOS_CFG_UTYPE_MS; diff --git a/src/common/src/tname.c b/src/common/src/tname.c index 8b85ecfbc79e0cd3b180c53abcaed73dfa3b6e15..15ec68fc66e770adad09815219d593aaa83f492c 100644 --- a/src/common/src/tname.c +++ b/src/common/src/tname.c @@ -82,7 +82,7 @@ int64_t taosGetIntervalStartTimestamp(int64_t startTime, int64_t slidingTime, in } int64_t start = ((startTime - intervalTime) / slidingTime + 1) * slidingTime; - if (!(timeUnit == 'a' || timeUnit == 'm' || timeUnit == 's' || timeUnit == 'h')) { + if (!(timeUnit == 'u' || timeUnit == 'a' || timeUnit == 'm' || timeUnit == 's' || timeUnit == 'h')) { /* * here we revised the start time of day according to the local time zone, * but in case of DST, the start time of one day need to be dynamically decided. diff --git a/src/query/inc/qtsbuf.h b/src/query/inc/qtsbuf.h index e437e1c4e59a7c6fdd99b141de59977dc49e242b..59b224e0969fa1946ccaa7ba1cc30dd3364c9b69 100644 --- a/src/query/inc/qtsbuf.h +++ b/src/query/inc/qtsbuf.h @@ -107,7 +107,7 @@ STSBuf* tsBufCreate(bool autoDelete, int32_t order); STSBuf* tsBufCreateFromFile(const char* path, bool autoDelete); STSBuf* tsBufCreateFromCompBlocks(const char* pData, int32_t numOfBlocks, int32_t len, int32_t tsOrder); -void* tsBufDestory(STSBuf* pTSBuf); +void* tsBufDestroy(STSBuf* pTSBuf); void tsBufAppend(STSBuf* pTSBuf, int32_t vnodeId, int64_t tag, const char* pData, int32_t len); int32_t tsBufMerge(STSBuf* pDestBuf, const STSBuf* pSrcBuf, int32_t vnodeIdx); diff --git a/src/util/src/ttime.c b/src/util/src/ttime.c index 6f67c4a1365abeb175447fcb56237d3cfa44fbee..018c0d640b41133db523c03b519d339e96b184ec 100644 --- a/src/util/src/ttime.c +++ b/src/util/src/ttime.c @@ -317,29 +317,34 @@ int32_t parseLocaltimeWithDst(char* timestr, int64_t* time, int32_t timePrec) { static int32_t getTimestampInUsFromStrImpl(int64_t val, char unit, int64_t* result) { *result = val; + int64_t factor = 1000L; + switch (unit) { case 's': - (*result) *= MILLISECOND_PER_SECOND; + (*result) *= MILLISECOND_PER_SECOND*factor; break; case 'm': - (*result) *= MILLISECOND_PER_MINUTE; + (*result) *= MILLISECOND_PER_MINUTE*factor; break; case 'h': - (*result) *= MILLISECOND_PER_HOUR; + (*result) *= MILLISECOND_PER_HOUR*factor; break; case 'd': - (*result) *= MILLISECOND_PER_DAY; + (*result) *= MILLISECOND_PER_DAY*factor; break; case 'w': - (*result) *= MILLISECOND_PER_WEEK; + (*result) *= MILLISECOND_PER_WEEK*factor; break; case 'n': - (*result) *= MILLISECOND_PER_MONTH; + (*result) *= MILLISECOND_PER_MONTH*factor; break; case 'y': - (*result) *= MILLISECOND_PER_YEAR; + (*result) *= MILLISECOND_PER_YEAR*factor; break; case 'a': + (*result) *= factor; + break; + case 'u': break; default: { ; @@ -348,7 +353,6 @@ static int32_t getTimestampInUsFromStrImpl(int64_t val, char unit, int64_t* resu } /* get the value in microsecond */ - (*result) *= 1000L; return 0; }