diff --git a/src/client/src/tscLocalMerge.c b/src/client/src/tscLocalMerge.c index 8436777ddfd1563c4a9d7db131a256de65896022..0733593284d4ec609c037fd79bebb228aea9804c 100644 --- a/src/client/src/tscLocalMerge.c +++ b/src/client/src/tscLocalMerge.c @@ -1349,7 +1349,6 @@ static bool doHandleLastRemainData(SSqlObj *pSql) { ((pRes->numOfRowsGroup < pQueryInfo->limit.limit && pQueryInfo->limit.limit > 0) || (pQueryInfo->limit.limit < 0))) { int64_t etime = (pQueryInfo->window.skey < pQueryInfo->window.ekey) ? pQueryInfo->window.ekey : pQueryInfo->window.skey; - assert(pFillInfo->numOfRows == 0); int32_t rows = (int32_t)getFilledNumOfRes(pFillInfo, etime, pLocalReducer->resColModel->capacity); if (rows > 0) { // do interpo doFillResult(pSql, pLocalReducer, true); diff --git a/tests/pytest/client/client.py b/tests/pytest/client/client.py index 6fd2a2b6bdd9a83c4f54b90cc37d16f05209b069..b40511094b3bf76825c2572c8ad747807a3f2d65 100644 --- a/tests/pytest/client/client.py +++ b/tests/pytest/client/client.py @@ -27,13 +27,7 @@ class TDTestCase: ret = tdSql.query('select database()') tdSql.checkData(0, 0, "db") - - ret = tdSql.query('select server_version()') - tdSql.checkData(0, 0, "2.0.0.0") - - ret = tdSql.query('select client_version()') - tdSql.checkData(0, 0, "2.0.0.0") - + ret = tdSql.query('select server_status()') tdSql.checkData(0, 0, 1) diff --git a/tests/pytest/client/version.py b/tests/pytest/client/version.py new file mode 100644 index 0000000000000000000000000000000000000000..bc2e58f106916b5e5f97d5864be070f05d3c87e1 --- /dev/null +++ b/tests/pytest/client/version.py @@ -0,0 +1,41 @@ +################################################################### +# Copyright (c) 2016 by TAOS Technologies, Inc. +# All rights reserved. +# +# This file is proprietary and confidential to TAOS Technologies. +# No part of this file may be reproduced, stored, transmitted, +# disclosed or used in any form or by any means other than as +# expressly provided by the written permission from Jianhui Tao +# +################################################################### + +# -*- coding: utf-8 -*- + +import sys +from util.log import * +from util.cases import * +from util.sql import * + + +class TDTestCase: + def init(self, conn, logSql): + tdLog.debug("start to execute %s" % __file__) + tdSql.init(conn.cursor(), logSql) + + def run(self): + tdSql.prepare() + + ret = tdSql.query('select server_version()') + tdSql.checkData(0, 0, "2.0.0.6") + + ret = tdSql.query('select client_version()') + tdSql.checkData(0, 0, "2.0.0.6") + + + def stop(self): + tdSql.close() + tdLog.success("%s successfully executed" % __file__) + + +tdCases.addWindows(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase()) diff --git a/tests/pytest/fulltest.sh b/tests/pytest/fulltest.sh index cbe82b2c8c0b7dd4ef236fe1d4d27ad86a15d84c..8e0f6314e07843db1ea16d68aed1da4d931730bd 100755 --- a/tests/pytest/fulltest.sh +++ b/tests/pytest/fulltest.sh @@ -158,6 +158,7 @@ python3 ./test.py -f alter/alter_table_crash.py # client python3 ./test.py -f client/client.py +python3 ./test.py -f client/version.py # Misc python3 testCompress.py diff --git a/tests/pytest/regressiontest.sh b/tests/pytest/regressiontest.sh index 61ec491f5de6ed946aafe3e0f549c233f6a250b7..20f4b4dc3b4ccea7d1e6f59555d337a0b21491ae 100755 --- a/tests/pytest/regressiontest.sh +++ b/tests/pytest/regressiontest.sh @@ -152,6 +152,7 @@ python3 ./test.py -f alter/alter_table_crash.py # client python3 ./test.py -f client/client.py +python3 ./test.py -f client/version.py # Misc python3 testCompress.py diff --git a/tests/script/general/parser/lastrow_query.sim b/tests/script/general/parser/lastrow_query.sim index e43cc1517398dd067bad7531d0960b3a459cde27..72e8b4de95cd0e9401c299d78a902e9d314f885b 100644 --- a/tests/script/general/parser/lastrow_query.sim +++ b/tests/script/general/parser/lastrow_query.sim @@ -51,3 +51,7 @@ if $data09 != NCHAR then return -1 endi +sql select count(*) from lr_tb1 where ts>'2018-09-18 08:45:00.1' and ts<'2018-09-18 08:45:00.2' +if $row != 0 then + return -1 +endi diff --git a/tests/script/general/parser/testSuite.sim b/tests/script/general/parser/testSuite.sim index dd4faee95966a209709cade09368e1241e5548f7..ccd1aa9940462568d8bac59463d594ff674e82ea 100644 --- a/tests/script/general/parser/testSuite.sim +++ b/tests/script/general/parser/testSuite.sim @@ -97,6 +97,8 @@ run general/parser/topbot.sim sleep 2000 run general/parser/union.sim sleep 2000 +run general/parser/bug.sim +sleep 2000 run general/parser/sliding.sim #sleep 2000