diff --git a/source/libs/executor/src/sysscanoperator.c b/source/libs/executor/src/sysscanoperator.c index 7862b36f27..56060b0061 100644 --- a/source/libs/executor/src/sysscanoperator.c +++ b/source/libs/executor/src/sysscanoperator.c @@ -2269,6 +2269,8 @@ static SSDataBlock* sysTableBuildUserFileSets(SOperatorInfo* pOperator) { if (ret) { if (ret == TSDB_CODE_NOT_FOUND) { // no more scan entry + setOperatorCompleted(pOperator); + pAPI->tsdReader.fileSetReaderClose(&pInfo->pFileSetReader); break; } else { code = ret; diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 38dd080ef5..8903ef27a4 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -484,6 +484,7 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/show.py ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/show_tag_index.py ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/information_schema.py +,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/ins_filesets.py ,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/grant.py ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/abs.py -R diff --git a/tests/system-test/0-others/ins_filesets.py b/tests/system-test/0-others/ins_filesets.py new file mode 100644 index 0000000000..e5bc4b61b7 --- /dev/null +++ b/tests/system-test/0-others/ins_filesets.py @@ -0,0 +1,54 @@ +################################################################### +# 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 re +from util.log import * +from util.cases import * +from util.sql import * +from util.common import * +from util.sqlset import * + +class TDTestCase: + def init(self, conn, logSql, replicaVar=1): + self.replicaVar = int(replicaVar) + tdLog.debug("start to execute %s" % __file__) + tdSql.init(conn.cursor()) + + def run(self): + tdSql.execute('create database db vgroups 1') + tdSql.execute('use db') + tdSql.execute('create table t1 (ts timestamp, a int, b int)') + tdSql.execute('insert into t1 values(\'2024-12-27 14:00:00\', 1, 2)') + tdSql.execute('flush database db') + + tdLog.sleep(5) + + rows = tdSql.query('select * from information_schema.ins_filesets') + tdSql.checkRows(1) + tdSql.checkEqual(tdSql.getData(0, 0), 'db') + tdSql.checkEqual(tdSql.getData(0, 1), 2) + tdSql.checkEqual(tdSql.getData(0, 2), 2008) + # tdSql.CheckEqual(str(tdSql.getData(0, 3)), '2024-12-23 08:00:00.000') + # tdSql.CheckEqual(str(tdSql.getData(0, 4)), '2025-01-02 07:59:59.999') + # tdSql.CheckEqual(tdSql.getData(0, 6), '1970-01-01 08:00:00.000') + # tdSql.CheckEqual(tdSql.getData(0, 7), False) + + tdDnodes.stopAll() + + + def stop(self): + tdSql.close() + tdLog.success("%s successfully executed" % __file__) + +tdCases.addWindows(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase())