提交 75b0d86b 编写于 作者: P Ping Xiao

[TS-424]<test> add test case for update option 2

上级 9f94c43a
......@@ -63,6 +63,7 @@ class TDTestCase:
tdLog.sleep(3)
# test case for https://jira.taosdata.com:18080/browse/TS-402
tdLog.info("test case for update option 1")
tdSql.execute("create database test update 1")
tdSql.execute("use test")
......@@ -75,7 +76,39 @@ class TDTestCase:
tdSql.checkData(0, 2, None)
tdSql.checkData(0, 3, 9)
tdSql.execute("drop table if exists tb")
tdSql.execute("create table tb (ts timestamp, c1 int, c2 int, c3 int)")
tdSql.execute("insert into tb values(%d, 1, 2, 3)(%d, null, 4, 5)(%d, 6, null, 7)" % (self.ts, self.ts, self.ts))
tdSql.query("select * from tb")
tdSql.checkRows(1)
tdSql.checkData(0, 1, 6)
tdSql.checkData(0, 2, None)
tdSql.checkData(0, 3, 7)
# https://jira.taosdata.com:18080/browse/TS-424
tdLog.info("test case for update option 2")
tdSql.execute("create database db2 update 2")
tdSql.execute("use db2")
tdSql.execute("create table tb (ts timestamp, c1 int, c2 int, c3 int)")
tdSql.execute("insert into tb values(%d, 1, 2, 3)(%d, null, null, 9)" % (self.ts, self.ts))
tdSql.query("select * from tb")
tdSql.checkRows(1)
tdSql.checkData(0, 1, 1)
tdSql.checkData(0, 2, 2)
tdSql.checkData(0, 3, 9)
tdSql.execute("drop table if exists tb")
tdSql.execute("create table tb (ts timestamp, c1 int, c2 int, c3 int)")
tdSql.execute("insert into tb values(%d, 1, 2, 3)(%d, null, 4, 5)(%d, 6, null, 7)" % (self.ts, self.ts, self.ts))
tdSql.query("select * from tb")
tdSql.checkRows(1)
tdSql.checkData(0, 1, 6)
tdSql.checkData(0, 2, 4)
tdSql.checkData(0, 3, 7)
def stop(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册