提交 3aa44a8d 编写于 作者: P Ping Xiao

test: add test case for TS-1579

上级 f40165c6
......@@ -63,6 +63,8 @@ class TDTestCase:
# test delete with functions
self.test_case3()
tdLog.debug(" DELETE test_case3 ............ [OK]")
self.test_case4()
tdLog.debug(" DELETE test_case4 ............ [OK]")
# stop
......@@ -323,6 +325,38 @@ class TDTestCase:
tdSql.query("select avg(i1) from st")
tdSql.checkData(0, 0, (sum - sum1) / (count - count1))
# verify function results after delete
def test_case3(self):
tdSql.execute("create database test1")
tdSql.execute("use test1")
tdSql.execute("create table tb(ts timestamp, c1 int)")
tdSql.execute("delete table tb where ts = '2021-05-31 00:00:00 000'")
tdSql.checkAffectedRows(0)
tdSql.execute("delete table tb where ts = '2021-05-31 00:00:00 000'")
tdSql.checkAffectedRows(0)
tdSql.execute("insert into tb values(now, 1)")
tdSql.query("select * from tb")
tdSql.checkRows(1)
tdSql.execute("create table stb(ts timestamp, c1 int) tags(t1 int)")
tdSql.execute("delete from stb where ts = '2021-05-31 00:00:00 000'")
tdSql.checkAffectedRows(0)
tdSql.execute("delete from stb where ts = '2021-05-31 00:00:00 000'")
tdSql.checkAffectedRows(0)
tdSql.execute("insert into t1 using stb tags(1) values(now, 1)")
tdSql.query("select * from stb")
tdSql.checkRows(1)
tdSql.execute("create table t2 using stb tags(2)")
tdSql.query("select tbanme from stb")
tdSql.checkRows(2)
#
# add case with filename
#
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册