From edd05ea486d618af8bbb7b8baaae115253ec7b09 Mon Sep 17 00:00:00 2001 From: tickduan <417921451@qq.com> Date: Mon, 31 May 2021 19:49:47 +0800 Subject: [PATCH] INT64_MIN default to ltime --- src/client/src/tscStream.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/src/tscStream.c b/src/client/src/tscStream.c index 3998f99afe..0401d1f3b2 100644 --- a/src/client/src/tscStream.c +++ b/src/client/src/tscStream.c @@ -576,7 +576,7 @@ static void tscCreateStream(void *param, TAOS_RES *res, int code) { // set stime with ltime if ltime > stime const char* dstTable = pStream->dstTable? pStream->dstTable: ""; tscDebug(" CQ table=%s ltime is %"PRId64, dstTable, pStream->ltime); - if(pStream->ltime > 0 && pStream->ltime > pStream->stime) { + if(pStream->ltime != INT64_MIN && pStream->ltime > pStream->stime) { tscWarn(" CQ set stream %s stime=%"PRId64" replace with ltime=%"PRId64" if ltime>0 ", dstTable, pStream->stime, pStream->ltime); pStream->stime = pStream->ltime; } @@ -678,6 +678,7 @@ TAOS_STREAM *taos_open_stream_withname(TAOS *taos, const char* dstTable, const c return NULL; } + pStream->ltime = INT64_MIN; pStream->stime = stime; pStream->fp = fp; pStream->callback = callback; -- GitLab