diff --git a/CMakeLists.txt b/CMakeLists.txt index f2e3116d9130571c6b2e2b51926fd0ce4d8cd45e..308917f26895476ebcfd855e3db7f15580c30903 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,7 +56,7 @@ ELSEIF (${CMAKE_SYSTEM_NAME} MATCHES "Windows") SET(TD_WINDOWS TRUE) ADD_DEFINITIONS(-DWINDOWS) - SET(COMMON_FLAGS "/nologo /WX- /sdl /Oi /Oy- /Gm- /EHsc /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Gd /errorReport:prompt /analyze-") + SET(COMMON_FLAGS "/nologo /WX- /Oi /Oy- /Gm- /EHsc /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Gd /errorReport:prompt /analyze-") SET(DEBUG_FLAGS "/Zi /W3 /GL") SET(RELEASE_FLAGS "/W0 /GL") diff --git a/src/client/src/tscSql.c b/src/client/src/tscSql.c index 60eae0b974dadc3b99119c9bf1b5c25d55c91094..a58238624fffc53a8157ef9535c9b6e4ab16b00c 100644 --- a/src/client/src/tscSql.c +++ b/src/client/src/tscSql.c @@ -314,6 +314,11 @@ int taos_fetch_block_impl(TAOS_RES *res, TAOS_ROW *rows) { return 0; } + // secondary merge has handle this situation + if (pCmd->command != TSDB_SQL_RETRIEVE_METRIC) { + pRes->numOfTotal += pRes->numOfRows; + } + for (int i = 0; i < pCmd->fieldsInfo.numOfOutputCols; ++i) { pRes->tsrow[i] = TSC_GET_RESPTR_BASE(pRes, pCmd, i, pCmd->order) + pRes->bytes[i] * (1 - pCmd->order.order) * (pRes->numOfRows - 1); @@ -348,7 +353,7 @@ TAOS_ROW taos_fetch_row_impl(TAOS_RES *res) { return NULL; } - /* localreducer has handle this situation */ + // secondary merge has handle this situation if (pCmd->command != TSDB_SQL_RETRIEVE_METRIC) { pRes->numOfTotal += pRes->numOfRows; }