未验证 提交 036bcc63 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

<enh>[tools]: taosdump dump result (#11329)

* [TD-14593]<fix>: taosdump dump-result

update taos-tools

* add debug in tools/taosdumpTest2.py
上级 938a257d
...@@ -66,6 +66,7 @@ class TDTestCase: ...@@ -66,6 +66,7 @@ class TDTestCase:
tdSql.prepare() tdSql.prepare()
print("DEBUG LN69: %s" % tdSql.getResult("show databases"))
tdSql.execute("create table st(ts timestamp, c1 timestamp, c2 int, c3 bigint, c4 float, c5 double, c6 binary(8), c7 smallint, c8 tinyint, c9 bool, c10 nchar(8)) tags(t1 int)") tdSql.execute("create table st(ts timestamp, c1 timestamp, c2 int, c3 bigint, c4 float, c5 double, c6 binary(8), c7 smallint, c8 tinyint, c9 bool, c10 nchar(8)) tags(t1 int)")
tdSql.execute("create table t1 using st tags(0)") tdSql.execute("create table t1 using st tags(0)")
currts = self.ts currts = self.ts
...@@ -79,6 +80,7 @@ class TDTestCase: ...@@ -79,6 +80,7 @@ class TDTestCase:
break break
tdSql.execute(sql) tdSql.execute(sql)
print("DEBUG LN83: %s" % tdSql.getResult("show databases"))
binPath = self.getPath() binPath = self.getPath()
if (binPath == ""): if (binPath == ""):
tdLog.exit("taosdump not found!") tdLog.exit("taosdump not found!")
...@@ -91,12 +93,15 @@ class TDTestCase: ...@@ -91,12 +93,15 @@ class TDTestCase:
"%s --databases db -o ./taosdumptest/tmp " % "%s --databases db -o ./taosdumptest/tmp " %
binPath) binPath)
print("DEBUG LN96: %s" % tdSql.getResult("show databases"))
tdSql.execute("drop database db") tdSql.execute("drop database db")
# tdSql.query("show databases") print("DEBUG LN98: %s" % tdSql.getResult("show databases"))
# tdSql.checkRows(0) tdSql.query("show databases")
tdSql.checkRows(0)
os.system("%s -i ./taosdumptest/tmp -y" % binPath) os.system("%s -i ./taosdumptest/tmp -y" % binPath)
print("DEBUG LN104: %s" % tdSql.getResult("show databases"))
tdSql.query("show databases") tdSql.query("show databases")
tdSql.checkRows(1) tdSql.checkRows(1)
tdSql.checkData(0, 0, 'db') tdSql.checkData(0, 0, 'db')
...@@ -111,6 +116,7 @@ class TDTestCase: ...@@ -111,6 +116,7 @@ class TDTestCase:
# test case for TS-1225 # test case for TS-1225
tdSql.execute("create database test") tdSql.execute("create database test")
print("DEBUG LN119: %s" % tdSql.getResult("show databases"))
tdSql.execute("use test") tdSql.execute("use test")
tdSql.execute( tdSql.execute(
"create table stb(ts timestamp, c1 binary(16374), c2 binary(16374), c3 binary(16374)) tags(t1 nchar(256))") "create table stb(ts timestamp, c1 binary(16374), c2 binary(16374), c3 binary(16374)) tags(t1 nchar(256))")
...@@ -125,11 +131,13 @@ class TDTestCase: ...@@ -125,11 +131,13 @@ class TDTestCase:
os.system("%s -D test -o ./taosdumptest/tmp -y" % binPath) os.system("%s -D test -o ./taosdumptest/tmp -y" % binPath)
tdSql.execute("drop database test") tdSql.execute("drop database test")
print("DEBUG LN134: %s" % tdSql.getResult("show databases"))
tdSql.query("show databases") tdSql.query("show databases")
tdSql.checkRows(1) tdSql.checkRows(1)
os.system("%s -i ./taosdumptest/tmp -y" % binPath) os.system("%s -i ./taosdumptest/tmp -y" % binPath)
print("DEBUG LN140: %s" % tdSql.getResult("show databases"))
tdSql.execute("use test") tdSql.execute("use test")
tdSql.error("show vnodes '' ") tdSql.error("show vnodes '' ")
tdSql.query("show stables") tdSql.query("show stables")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册