Merge pull request #28447 from taosdata/fix/TD-32548-main

fix: (last) iterator of nextRowIterGet
This commit is contained in:
Shengliang Guan 2024-10-23 11:28:34 +08:00 committed by GitHub
commit 5089e6793c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 38 additions and 7 deletions

View File

@ -3064,9 +3064,8 @@ static int32_t nextRowIterGet(CacheNextRowIter *pIter, TSDBROW **ppRow, bool *pI
iMax[nMax] = i; iMax[nMax] = i;
max[nMax++] = pIter->input[i].pRow; max[nMax++] = pIter->input[i].pRow;
} else {
pIter->input[i].next = false;
} }
pIter->input[i].next = false;
} }
} }

View File

@ -223,6 +223,7 @@
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -Q 2 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -Q 2
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -Q 3 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -Q 3
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -Q 4 ,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -Q 4
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/td-32548.py
,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreDnode.py -N 5 -M 3 -i False ,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreDnode.py -N 5 -M 3 -i False
,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreVnode.py -N 5 -M 3 -i False ,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreVnode.py -N 5 -M 3 -i False
@ -1566,4 +1567,3 @@
,,n,docs-examples-test,bash rust.sh ,,n,docs-examples-test,bash rust.sh
,,n,docs-examples-test,bash go.sh ,,n,docs-examples-test,bash go.sh
,,n,docs-examples-test,bash test_R.sh ,,n,docs-examples-test,bash test_R.sh

View File

@ -0,0 +1,32 @@
from util.cases import *
from util.sql import *
class TDTestCase:
def init(self, conn, logSql, replicaVar=1):
tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor(), True)
tdSql.execute("drop database if exists td_32548;")
tdSql.execute("create database td_32548 cachemodel 'last_row' keep 3650,3650,3650;")
def run(self):
tdSql.execute("use td_32548;")
tdSql.execute("create table ntb1 (ts timestamp, ival int);")
tdSql.execute("insert into ntb1 values ('2024-07-08 17:54:49.675', 54);")
tdSql.execute("flush database td_32548;")
tdSql.execute("insert into ntb1 values ('2024-07-08 17:53:49.675', 53);")
tdSql.execute("insert into ntb1 values ('2024-07-08 17:52:49.675', 52);")
tdSql.execute("delete from ntb1 where ts = '2024-07-08 17:54:49.675';")
tdSql.query('select last_row(ts) from ntb1;')
tdSql.checkData(0, 0, '2024-07-08 17:53:49.675')
def stop(self):
tdSql.close()
tdLog.success(f"{__file__} successfully executed")
tdCases.addLinux(__file__, TDTestCase())
tdCases.addWindows(__file__, TDTestCase())