提交 9150fb18 编写于 作者: H Haojun Liao

[td-4970]<fix>: limit/offset is not active in the outer query.

上级 41ab4a5f
...@@ -5953,8 +5953,8 @@ int32_t validateLimitNode(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SSqlNode* pSqlN ...@@ -5953,8 +5953,8 @@ int32_t validateLimitNode(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SSqlNode* pSqlN
if (tscOrderedProjectionQueryOnSTable(pQueryInfo, 0)) { if (tscOrderedProjectionQueryOnSTable(pQueryInfo, 0)) {
/* /*
* the offset value should be removed during retrieve data from virtual node, since the * The offset value should be removed during retrieve data from virtual node, since the
* global order are done in client side, so the offset is applied at the client side * global order are done at the client side, so the offset is applied at the client side.
* However, note that the maximum allowed number of result for each table should be less * However, note that the maximum allowed number of result for each table should be less
* than or equal to the value of limit. * than or equal to the value of limit.
*/ */
......
...@@ -2938,6 +2938,7 @@ int32_t tscQueryInfoCopy(SQueryInfo* pQueryInfo, const SQueryInfo* pSrc) { ...@@ -2938,6 +2938,7 @@ int32_t tscQueryInfoCopy(SQueryInfo* pQueryInfo, const SQueryInfo* pSrc) {
pQueryInfo->pTableMetaInfo = NULL; pQueryInfo->pTableMetaInfo = NULL;
pQueryInfo->bufLen = pSrc->bufLen; pQueryInfo->bufLen = pSrc->bufLen;
pQueryInfo->orderProjectQuery = pSrc->orderProjectQuery;
pQueryInfo->buf = malloc(pSrc->bufLen); pQueryInfo->buf = malloc(pSrc->bufLen);
if (pQueryInfo->buf == NULL) { if (pQueryInfo->buf == NULL) {
code = TSDB_CODE_TSC_OUT_OF_MEMORY; code = TSDB_CODE_TSC_OUT_OF_MEMORY;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册