提交 fa72e4d7 编写于 作者: S slguan

Fix the #issue 217

上级 184f1777
...@@ -56,7 +56,7 @@ ELSEIF (${CMAKE_SYSTEM_NAME} MATCHES "Windows") ...@@ -56,7 +56,7 @@ ELSEIF (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
SET(TD_WINDOWS TRUE) SET(TD_WINDOWS TRUE)
ADD_DEFINITIONS(-DWINDOWS) 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(DEBUG_FLAGS "/Zi /W3 /GL")
SET(RELEASE_FLAGS "/W0 /GL") SET(RELEASE_FLAGS "/W0 /GL")
......
...@@ -314,6 +314,11 @@ int taos_fetch_block_impl(TAOS_RES *res, TAOS_ROW *rows) { ...@@ -314,6 +314,11 @@ int taos_fetch_block_impl(TAOS_RES *res, TAOS_ROW *rows) {
return 0; 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) { for (int i = 0; i < pCmd->fieldsInfo.numOfOutputCols; ++i) {
pRes->tsrow[i] = TSC_GET_RESPTR_BASE(pRes, pCmd, i, pCmd->order) + pRes->tsrow[i] = TSC_GET_RESPTR_BASE(pRes, pCmd, i, pCmd->order) +
pRes->bytes[i] * (1 - pCmd->order.order) * (pRes->numOfRows - 1); pRes->bytes[i] * (1 - pCmd->order.order) * (pRes->numOfRows - 1);
...@@ -348,7 +353,7 @@ TAOS_ROW taos_fetch_row_impl(TAOS_RES *res) { ...@@ -348,7 +353,7 @@ TAOS_ROW taos_fetch_row_impl(TAOS_RES *res) {
return NULL; return NULL;
} }
/* localreducer has handle this situation */ // secondary merge has handle this situation
if (pCmd->command != TSDB_SQL_RETRIEVE_METRIC) { if (pCmd->command != TSDB_SQL_RETRIEVE_METRIC) {
pRes->numOfTotal += pRes->numOfRows; pRes->numOfTotal += pRes->numOfRows;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册