From 879bacd8e10153efa01636d5d5ff10c760faaa39 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 29 Apr 2021 11:42:44 +0800 Subject: [PATCH] Hotfix/sangshuduo/td 3985 taosdemo timestamp step overflow (#5960) * [TD-3985]: taosdemo timestamp step overflow. * fix specified subscribe test. * replace potential overflow of int32 to int64 * replace potential int32 overflow variables to int64. * replace potential int32 overflow variables to int64. * change max of int16 to int64 after type changed. Co-authored-by: Shuduo Sang --- src/kit/taosdemo/taosdemo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kit/taosdemo/taosdemo.c b/src/kit/taosdemo/taosdemo.c index e6d7fb6a09..42992b782f 100644 --- a/src/kit/taosdemo/taosdemo.c +++ b/src/kit/taosdemo/taosdemo.c @@ -2898,7 +2898,7 @@ static int startMultiThreadCreateChildTable( startFrom = t_info->end_table_to + 1; t_info->use_metric = true; t_info->cols = cols; - t_info->minDelay = INT16_MAX; + t_info->minDelay = INT64_MAX; pthread_create(pids + i, NULL, createTable, t_info); } @@ -5596,7 +5596,7 @@ static void startMultiThreadInsertData(int threads, char* db_name, t_info->superTblInfo = superTblInfo; t_info->start_time = start_time; - t_info->minDelay = INT16_MAX; + t_info->minDelay = INT64_MAX; if ((NULL == superTblInfo) || (0 == strncasecmp(superTblInfo->insertMode, "taosc", 5))) { @@ -5641,7 +5641,7 @@ static void startMultiThreadInsertData(int threads, char* db_name, int64_t totalDelay = 0; int64_t maxDelay = 0; - int64_t minDelay = INT16_MAX; + int64_t minDelay = INT64_MAX; int64_t cntDelay = 1; double avgDelay = 0; -- GitLab