fix: restful must have database prefix
This commit is contained in:
parent
bce692d8d1
commit
51cd0b05fc
|
@ -26,8 +26,6 @@ class TDTestCase(TBase):
|
|||
[TD-13928] taosBenchmark improve user interface
|
||||
"""
|
||||
|
||||
|
||||
|
||||
def run(self):
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/custom_col_tag.json" % binPath
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
"insert_mode": "taosc",
|
||||
"line_protocol": "line",
|
||||
"childtable_limit": -10,
|
||||
"childtable_offset": 10,
|
||||
"childtable_offset": 0,
|
||||
"insert_rows": 20,
|
||||
"insert_interval": 0,
|
||||
"interlace_rows": 0,
|
||||
|
|
|
@ -27,39 +27,7 @@ from frame import *
|
|||
import subprocess
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
# pylint: disable=R0201
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
# pylint: disable=R0201
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
class TDTestCase(TBase):
|
||||
# 获取taosc接口查询的结果文件中的内容,返回每行数据,并断言数据的第一列内容。
|
||||
def assertfileDataTaosc(self, filename, expectResult):
|
||||
self.filename = filename
|
||||
|
@ -110,7 +78,7 @@ class TDTestCase:
|
|||
)
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
if binPath == "":
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
else:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# All rights reserved.
|
||||
#
|
||||
# This file is proprietary and confidential to TAOS Technologies.
|
||||
# No part of this file may be reproduced, stored, transmitted,
|
||||
# No part of this file may be reproduced, db.stored, transmitted,
|
||||
# disclosed or used in any form or by any means other than as
|
||||
# expressly provided by the written permission from Jianhui Tao
|
||||
#
|
||||
|
@ -27,10 +27,6 @@ class TDTestCase(TBase):
|
|||
case1<sdsang>: [TD-12526] taosdump supports big int
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
|
@ -38,18 +34,18 @@ class TDTestCase(TBase):
|
|||
tdSql.execute("create database db keep 3649 ")
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute("create table st(ts timestamp, c1 BIGINT) tags(bntag BIGINT)")
|
||||
tdSql.execute("create table t1 using st tags(1)")
|
||||
tdSql.execute("insert into t1 values(1640000000000, 1)")
|
||||
tdSql.execute("create table db.st(ts timestamp, c1 BIGINT) tags(bntag BIGINT)")
|
||||
tdSql.execute("create table db.t1 using db.st tags(1)")
|
||||
tdSql.execute("insert into db.t1 values(1640000000000, 1)")
|
||||
|
||||
tdSql.execute("create table t2 using st tags(9223372036854775807)")
|
||||
tdSql.execute("insert into t2 values(1640000000000, 9223372036854775807)")
|
||||
tdSql.execute("create table db.t2 using db.st tags(9223372036854775807)")
|
||||
tdSql.execute("insert into db.t2 values(1640000000000, 9223372036854775807)")
|
||||
|
||||
tdSql.execute("create table t3 using st tags(-9223372036854775807)")
|
||||
tdSql.execute("insert into t3 values(1640000000000, -9223372036854775807)")
|
||||
tdSql.execute("create table db.t3 using db.st tags(-9223372036854775807)")
|
||||
tdSql.execute("insert into db.t3 values(1640000000000, -9223372036854775807)")
|
||||
|
||||
tdSql.execute("create table t4 using st tags(NULL)")
|
||||
tdSql.execute("insert into t4 values(1640000000000, NULL)")
|
||||
tdSql.execute("create table db.t4 using db.st tags(NULL)")
|
||||
tdSql.execute("insert into db.t4 values(1640000000000, NULL)")
|
||||
|
||||
# sys.exit(1)
|
||||
|
||||
|
@ -86,32 +82,32 @@ class TDTestCase(TBase):
|
|||
assert found == True
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.query("show db.stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, "st")
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.query("show db.tables")
|
||||
tdSql.checkRows(4)
|
||||
|
||||
tdSql.query("select * from st where bntag = 1")
|
||||
tdSql.query("select * from db.st where bntag = 1")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 1)
|
||||
tdSql.checkData(0, 2, 1)
|
||||
|
||||
tdSql.query("select * from st where bntag = 9223372036854775807")
|
||||
tdSql.query("select * from db.st where bntag = 9223372036854775807")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 9223372036854775807)
|
||||
tdSql.checkData(0, 2, 9223372036854775807)
|
||||
|
||||
tdSql.query("select * from st where bntag = -9223372036854775807")
|
||||
tdSql.query("select * from db.st where bntag = -9223372036854775807")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, -9223372036854775807)
|
||||
tdSql.checkData(0, 2, -9223372036854775807)
|
||||
|
||||
tdSql.query("select * from st where bntag is null")
|
||||
tdSql.query("select * from db.st where bntag is null")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, None)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# All rights reserved.
|
||||
#
|
||||
# This file is proprietary and confidential to TAOS Technologies.
|
||||
# No part of this file may be reproduced, stored, transmitted,
|
||||
# No part of this file may be reproduced, db.stored, transmitted,
|
||||
# disclosed or used in any form or by any means other than as
|
||||
# expressly provided by the written permission from Jianhui Tao
|
||||
#
|
||||
|
@ -27,10 +27,6 @@ class TDTestCase(TBase):
|
|||
case1<sdsang>: [TD-12526] taosdump supports binary
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
|
@ -39,13 +35,13 @@ class TDTestCase(TBase):
|
|||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
"create table st(ts timestamp, c1 BINARY(5), c2 BINARY(5)) tags(btag BINARY(5))"
|
||||
"create table db.st(ts timestamp, c1 BINARY(5), c2 BINARY(5)) tags(btag BINARY(5))"
|
||||
)
|
||||
tdSql.execute("create table t1 using st tags('test')")
|
||||
tdSql.execute("insert into t1 values(1640000000000, '01234', '56789')")
|
||||
tdSql.execute("insert into t1 values(1640000000001, 'abcd', 'efgh')")
|
||||
tdSql.execute("create table t2 using st tags(NULL)")
|
||||
tdSql.execute("insert into t2 values(1640000000000, NULL, NULL)")
|
||||
tdSql.execute("create table db.t1 using db.sttags('test')")
|
||||
tdSql.execute("insert into db.t1 values(1640000000000, '01234', '56789')")
|
||||
tdSql.execute("insert into db.t1 values(1640000000001, 'abcd', 'efgh')")
|
||||
tdSql.execute("create table db.t2 using db.sttags(NULL)")
|
||||
tdSql.execute("insert into db.t2 values(1640000000000, NULL, NULL)")
|
||||
|
||||
binPath = etool.taosDumpFile()
|
||||
if binPath == "":
|
||||
|
@ -80,33 +76,33 @@ class TDTestCase(TBase):
|
|||
assert found == True
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.query("show db.stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, "st")
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.query("show db.tables")
|
||||
tdSql.checkRows(2)
|
||||
dbresult = tdSql.res
|
||||
print(dbresult)
|
||||
for i in range(len(dbresult)):
|
||||
assert dbresult[i][0] in ("t1", "t2")
|
||||
|
||||
tdSql.query("select distinct(btag) from st where tbname = 't1'")
|
||||
tdSql.query("select distinct(btag) from db.st where tbname = 't1'")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, "test")
|
||||
|
||||
tdSql.query("select distinct(btag) from st where tbname = 't2'")
|
||||
tdSql.query("select distinct(btag) from db.st where tbname = 't2'")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, None)
|
||||
|
||||
tdSql.query("select * from st where btag = 'test'")
|
||||
tdSql.query("select * from db.st where btag = 'test'")
|
||||
tdSql.checkRows(2)
|
||||
tdSql.checkData(0, 1, "01234")
|
||||
tdSql.checkData(0, 2, "56789")
|
||||
tdSql.checkData(1, 1, "abcd")
|
||||
tdSql.checkData(1, 2, "efgh")
|
||||
|
||||
tdSql.query("select * from st where btag is null")
|
||||
tdSql.query("select * from db.st where btag is null")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 1, None)
|
||||
tdSql.checkData(0, 2, None)
|
||||
|
|
|
@ -27,24 +27,20 @@ class TDTestCase(TBase):
|
|||
case1<sdsang>: [TD-12526] taosdump supports bool
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
tdSql.execute("drop database if exists db")
|
||||
tdSql.execute("create database db keep 3649 ")
|
||||
tdSql.execute("create database db keep 3649 ")
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute("create table st(ts timestamp, c1 BOOL) tags(btag BOOL)")
|
||||
tdSql.execute("create table t1 using st tags(true)")
|
||||
tdSql.execute("insert into t1 values(1640000000000, true)")
|
||||
tdSql.execute("create table t2 using st tags(false)")
|
||||
tdSql.execute("insert into t2 values(1640000000000, false)")
|
||||
tdSql.execute("create table t3 using st tags(NULL)")
|
||||
tdSql.execute("insert into t3 values(1640000000000, NULL)")
|
||||
tdSql.execute("create table db.t1 using db.st tags(true)")
|
||||
tdSql.execute("insert into db.t1 values(1640000000000, true)")
|
||||
tdSql.execute("create table db.t2 using db.st tags(false)")
|
||||
tdSql.execute("insert into db.t2 values(1640000000000, false)")
|
||||
tdSql.execute("create table db.t3 using db.st tags(NULL)")
|
||||
tdSql.execute("insert into db.t3 values(1640000000000, NULL)")
|
||||
|
||||
binPath = etool.taosDumpFile()
|
||||
if binPath == "":
|
||||
|
@ -79,11 +75,11 @@ class TDTestCase(TBase):
|
|||
assert found == True
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.query("show db.stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, "st")
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.query("show db.tables")
|
||||
tdSql.checkRows(3)
|
||||
dbresult = tdSql.res
|
||||
print(dbresult)
|
||||
|
@ -94,22 +90,22 @@ class TDTestCase(TBase):
|
|||
or (dbresult[i][0] == "t3")
|
||||
)
|
||||
|
||||
tdSql.query("select btag from st")
|
||||
tdSql.query("select btag from db.st")
|
||||
tdSql.checkRows(3)
|
||||
dbresult = tdSql.res
|
||||
print(dbresult)
|
||||
|
||||
tdSql.query("select * from st where btag = true")
|
||||
tdSql.query("select * from db.st where btag = true")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 1, "True")
|
||||
tdSql.checkData(0, 2, "True")
|
||||
|
||||
tdSql.query("select * from st where btag = false")
|
||||
tdSql.query("select * from db.st where btag = false")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 1, "False")
|
||||
tdSql.checkData(0, 2, "False")
|
||||
|
||||
tdSql.query("select * from st where btag is null")
|
||||
tdSql.query("select * from db.st where btag is null")
|
||||
dbresult = tdSql.res
|
||||
print(dbresult)
|
||||
tdSql.checkRows(1)
|
||||
|
|
|
@ -28,10 +28,6 @@ class TDTestCase(TBase):
|
|||
case1<sdsang>: [TD-12526] taosdump supports double
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
|
@ -39,18 +35,18 @@ class TDTestCase(TBase):
|
|||
tdSql.execute("create database db keep 3649 ")
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute("create table st(ts timestamp, c1 DOUBLE) tags(dbtag DOUBLE)")
|
||||
tdSql.execute("create table t1 using st tags(1.0)")
|
||||
tdSql.execute("insert into t1 values(1640000000000, 1.0)")
|
||||
tdSql.execute("create table db.st(ts timestamp, c1 DOUBLE) tags(dbtag DOUBLE)")
|
||||
tdSql.execute("create table db.t1 using db.st tags(1.0)")
|
||||
tdSql.execute("insert into db.t1 values(1640000000000, 1.0)")
|
||||
|
||||
tdSql.execute("create table t2 using st tags(1.7E308)")
|
||||
tdSql.execute("insert into t2 values(1640000000000, 1.7E308)")
|
||||
tdSql.execute("create table db.t2 using db.st tags(1.7E308)")
|
||||
tdSql.execute("insert into db.t2 values(1640000000000, 1.7E308)")
|
||||
|
||||
tdSql.execute("create table t3 using st tags(-1.7E308)")
|
||||
tdSql.execute("insert into t3 values(1640000000000, -1.7E308)")
|
||||
tdSql.execute("create table db.t3 using db.st tags(-1.7E308)")
|
||||
tdSql.execute("insert into db.t3 values(1640000000000, -1.7E308)")
|
||||
|
||||
tdSql.execute("create table t4 using st tags(NULL)")
|
||||
tdSql.execute("insert into t4 values(1640000000000, NULL)")
|
||||
tdSql.execute("create table db.t4 using db.st tags(NULL)")
|
||||
tdSql.execute("insert into db.t4 values(1640000000000, NULL)")
|
||||
|
||||
# sys.exit(1)
|
||||
|
||||
|
@ -87,14 +83,14 @@ class TDTestCase(TBase):
|
|||
assert found == True
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.query("show db.stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, "st")
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.query("show db.tables")
|
||||
tdSql.checkRows(4)
|
||||
|
||||
tdSql.query("select * from st where dbtag = 1.0")
|
||||
tdSql.query("select * from db.st where dbtag = 1.0")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
if not math.isclose(tdSql.getData(0, 1), 1.0):
|
||||
|
@ -104,7 +100,7 @@ class TDTestCase(TBase):
|
|||
tdLog.debug("getData(0, 1): %f, to compare %f" % (tdSql.getData(0, 2), 1.0))
|
||||
tdLog.exit("data is different")
|
||||
|
||||
tdSql.query("select * from st where dbtag = 1.7E308")
|
||||
tdSql.query("select * from db.st where dbtag = 1.7E308")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
if not math.isclose(tdSql.getData(0, 1), 1.7e308):
|
||||
|
@ -118,7 +114,7 @@ class TDTestCase(TBase):
|
|||
)
|
||||
tdLog.exit("data is different")
|
||||
|
||||
tdSql.query("select * from st where dbtag = -1.7E308")
|
||||
tdSql.query("select * from db.st where dbtag = -1.7E308")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
if not math.isclose(tdSql.getData(0, 1), -1.7e308):
|
||||
|
@ -132,7 +128,7 @@ class TDTestCase(TBase):
|
|||
)
|
||||
tdLog.exit("data is different")
|
||||
|
||||
tdSql.query("select * from st where dbtag is null")
|
||||
tdSql.query("select * from db.st where dbtag is null")
|
||||
dbresult = tdSql.res
|
||||
print(dbresult)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# All rights reserved.
|
||||
#
|
||||
# This file is proprietary and confidential to TAOS Technologies.
|
||||
# No part of this file may be reproduced, stored, transmitted,
|
||||
# No part of this file may be reproduced, db.stored, transmitted,
|
||||
# disclosed or used in any form or by any means other than as
|
||||
# expressly provided by the written permission from Jianhui Tao
|
||||
#
|
||||
|
@ -28,10 +28,6 @@ class TDTestCase(TBase):
|
|||
case1<sdsang>: [TD-12526] taosdump supports float
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
|
@ -39,18 +35,18 @@ class TDTestCase(TBase):
|
|||
tdSql.execute("create database db keep 3649 ")
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute("create table st(ts timestamp, c1 FLOAT) tags(ftag FLOAT)")
|
||||
tdSql.execute("create table t1 using st tags(1.0)")
|
||||
tdSql.execute("insert into t1 values(1640000000000, 1.0)")
|
||||
tdSql.execute("create table db.st(ts timestamp, c1 FLOAT) tags(ftag FLOAT)")
|
||||
tdSql.execute("create table db.db.t1 using db.st tags(1.0)")
|
||||
tdSql.execute("insert into db.db.t1 values(1640000000000, 1.0)")
|
||||
|
||||
tdSql.execute("create table t2 using st tags(3.40E+38)")
|
||||
tdSql.execute("insert into t2 values(1640000000000, 3.40E+38)")
|
||||
tdSql.execute("create table db.t2 using db.st tags(3.40E+38)")
|
||||
tdSql.execute("insert into db.t2 values(1640000000000, 3.40E+38)")
|
||||
|
||||
tdSql.execute("create table t3 using st tags(-3.40E+38)")
|
||||
tdSql.execute("insert into t3 values(1640000000000, -3.40E+38)")
|
||||
tdSql.execute("create table db.t3 using db.st tags(-3.40E+38)")
|
||||
tdSql.execute("insert into db.t3 values(1640000000000, -3.40E+38)")
|
||||
|
||||
tdSql.execute("create table t4 using st tags(NULL)")
|
||||
tdSql.execute("insert into t4 values(1640000000000, NULL)")
|
||||
tdSql.execute("create table db.t4 using db.st tags(NULL)")
|
||||
tdSql.execute("insert into db.t4 values(1640000000000, NULL)")
|
||||
|
||||
# sys.exit(1)
|
||||
|
||||
|
@ -87,14 +83,14 @@ class TDTestCase(TBase):
|
|||
assert found == True
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.query("show db.stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, "st")
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.query("show db.tables")
|
||||
tdSql.checkRows(4)
|
||||
|
||||
tdSql.query("select * from st where ftag = 1.0")
|
||||
tdSql.query("select * from db.st where ftag = 1.0")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
if not math.isclose(tdSql.getData(0, 1), 1.0):
|
||||
|
@ -103,7 +99,7 @@ class TDTestCase(TBase):
|
|||
if not math.isclose(tdSql.getData(0, 2), 1.0):
|
||||
tdLog.exit("data is different")
|
||||
|
||||
tdSql.query("select * from st where ftag > 3.399999E38 and ftag < 3.4000001E38")
|
||||
tdSql.query("select * from db.st where ftag > 3.399999E38 and ftag < 3.4000001E38")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
if not math.isclose(tdSql.getData(0, 1), 3.4e38, rel_tol=1e-07, abs_tol=0.0):
|
||||
|
@ -117,7 +113,7 @@ class TDTestCase(TBase):
|
|||
)
|
||||
tdLog.exit("data is different")
|
||||
|
||||
tdSql.query("select * from st where ftag < -3.399999E38 and ftag > -3.4000001E38")
|
||||
tdSql.query("select * from db.st where ftag < -3.399999E38 and ftag > -3.4000001E38")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
if not math.isclose(tdSql.getData(0, 1), (-3.4e38), rel_tol=1e-07, abs_tol=0.0):
|
||||
|
@ -131,7 +127,7 @@ class TDTestCase(TBase):
|
|||
)
|
||||
tdLog.exit("data is different")
|
||||
|
||||
tdSql.query("select * from st where ftag is null")
|
||||
tdSql.query("select * from db.st where ftag is null")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, None)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# All rights reserved.
|
||||
#
|
||||
# This file is proprietary and confidential to TAOS Technologies.
|
||||
# No part of this file may be reproduced, stored, transmitted,
|
||||
# No part of this file may be reproduced, db.stored, transmitted,
|
||||
# disclosed or used in any form or by any means other than as
|
||||
# expressly provided by the written permission from Jianhui Tao
|
||||
#
|
||||
|
@ -38,15 +38,15 @@ class TDTestCase(TBase):
|
|||
tdSql.execute("create database db keep 3649")
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute("create table st(ts timestamp, c1 INT) tags(ntag INT)")
|
||||
tdSql.execute("create table t1 using st tags(1)")
|
||||
tdSql.execute("insert into t1 values(1640000000000, 1)")
|
||||
tdSql.execute("create table t2 using st tags(2147483647)")
|
||||
tdSql.execute("insert into t2 values(1640000000000, 2147483647)")
|
||||
tdSql.execute("create table t3 using st tags(-2147483647)")
|
||||
tdSql.execute("insert into t3 values(1640000000000, -2147483647)")
|
||||
tdSql.execute("create table t4 using st tags(NULL)")
|
||||
tdSql.execute("insert into t4 values(1640000000000, NULL)")
|
||||
tdSql.execute("create table db.st(ts timestamp, c1 INT) tags(ntag INT)")
|
||||
tdSql.execute("create table db.t1 using db.st tags(1)")
|
||||
tdSql.execute("insert into db.t1 values(1640000000000, 1)")
|
||||
tdSql.execute("create table db.t2 using db.st tags(2147483647)")
|
||||
tdSql.execute("insert into db.t2 values(1640000000000, 2147483647)")
|
||||
tdSql.execute("create table db.t3 using db.st tags(-2147483647)")
|
||||
tdSql.execute("insert into db.t3 values(1640000000000, -2147483647)")
|
||||
tdSql.execute("create table db.t4 using db.st tags(NULL)")
|
||||
tdSql.execute("insert into db.t4 values(1640000000000, NULL)")
|
||||
|
||||
# sys.exit(1)
|
||||
|
||||
|
@ -83,32 +83,32 @@ class TDTestCase(TBase):
|
|||
assert found == True
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.query("show db.stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, "st")
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.query("show db.tables")
|
||||
tdSql.checkRows(4)
|
||||
|
||||
tdSql.query("select * from st where ntag = 1")
|
||||
tdSql.query("select * from db.st where ntag = 1")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 1)
|
||||
tdSql.checkData(0, 2, 1)
|
||||
|
||||
tdSql.query("select * from st where ntag = 2147483647")
|
||||
tdSql.query("select * from db.st where ntag = 2147483647")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 2147483647)
|
||||
tdSql.checkData(0, 2, 2147483647)
|
||||
|
||||
tdSql.query("select * from st where ntag = -2147483647")
|
||||
tdSql.query("select * from db.st where ntag = -2147483647")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, -2147483647)
|
||||
tdSql.checkData(0, 2, -2147483647)
|
||||
|
||||
tdSql.query("select * from st where ntag is null")
|
||||
tdSql.query("select * from db.st where ntag is null")
|
||||
dbresult = tdSql.res
|
||||
print(dbresult)
|
||||
tdSql.checkRows(1)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# All rights reserved.
|
||||
#
|
||||
# This file is proprietary and confidential to TAOS Technologies.
|
||||
# No part of this file may be reproduced, stored, transmitted,
|
||||
# No part of this file may be reproduced, db.stored, transmitted,
|
||||
# disclosed or used in any form or by any means other than as
|
||||
# expressly provided by the written permission from Jianhui Tao
|
||||
#
|
||||
|
@ -27,26 +27,22 @@ class TDTestCase(TBase):
|
|||
case1<sdsang>: [TD-12362] taosdump supports JSON
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
tdSql.execute("drop database if exists db")
|
||||
tdSql.execute("create database db keep 3649 ")
|
||||
tdSql.execute("create database db keep 3649 ")
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute("create table st(ts timestamp, c1 int) tags(jtag JSON)")
|
||||
tdSql.execute('create table t1 using st tags(\'{"location": "beijing"}\')')
|
||||
tdSql.execute("insert into t1 values(1500000000000, 1)")
|
||||
tdSql.execute("create table db.st(ts timestamp, c1 int) tags(jtag JSON)")
|
||||
tdSql.execute('create table db.t1 using db.st tags(\'{"location": "beijing"}\')')
|
||||
tdSql.execute("insert into db.t1 values(1500000000000, 1)")
|
||||
|
||||
tdSql.execute("create table t2 using st tags(NULL)")
|
||||
tdSql.execute("insert into t2 values(1500000000000, NULL)")
|
||||
tdSql.execute("create table db.t2 using db.st tags(NULL)")
|
||||
tdSql.execute("insert into db.t2 values(1500000000000, NULL)")
|
||||
|
||||
tdSql.execute("create table t3 using st tags('')")
|
||||
tdSql.execute("insert into t3 values(1500000000000, 0)")
|
||||
tdSql.execute("create table db.t3 using db.st tags('')")
|
||||
tdSql.execute("insert into db.t3 values(1500000000000, 0)")
|
||||
|
||||
# sys.exit(1)
|
||||
|
||||
|
@ -82,11 +78,11 @@ class TDTestCase(TBase):
|
|||
assert found == True
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.query("show db.stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, "st")
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.query("show db.tables")
|
||||
tdSql.checkRows(3)
|
||||
|
||||
dbresult = tdSql.res
|
||||
|
@ -98,7 +94,7 @@ class TDTestCase(TBase):
|
|||
or (dbresult[i][0] == "t3")
|
||||
)
|
||||
|
||||
tdSql.query("select jtag->'location' from st")
|
||||
tdSql.query("select jtag->'location' from db.st")
|
||||
tdSql.checkRows(3)
|
||||
|
||||
dbresult = tdSql.res
|
||||
|
@ -111,12 +107,12 @@ class TDTestCase(TBase):
|
|||
|
||||
assert found == True
|
||||
|
||||
tdSql.query("select * from st where jtag contains 'location'")
|
||||
tdSql.query("select * from db.st where jtag contains 'location'")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 1, 1)
|
||||
tdSql.checkData(0, 2, '{"location":"beijing"}')
|
||||
|
||||
tdSql.query("select jtag from st")
|
||||
tdSql.query("select jtag from db.st")
|
||||
tdSql.checkRows(3)
|
||||
|
||||
dbresult = tdSql.res
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# All rights reserved.
|
||||
#
|
||||
# This file is proprietary and confidential to TAOS Technologies.
|
||||
# No part of this file may be reproduced, stored, transmitted,
|
||||
# No part of this file may be reproduced, db.stored, transmitted,
|
||||
# disclosed or used in any form or by any means other than as
|
||||
# expressly provided by the written permission from Jianhui Tao
|
||||
#
|
||||
|
@ -27,10 +27,6 @@ class TDTestCase(TBase):
|
|||
case1<sdsang>: [TD-12526] taosdump supports small int
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
|
@ -38,18 +34,18 @@ class TDTestCase(TBase):
|
|||
tdSql.execute("create database db keep 3649 ")
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute("create table st(ts timestamp, c1 SMALLINT) tags(sntag SMALLINT)")
|
||||
tdSql.execute("create table t1 using st tags(1)")
|
||||
tdSql.execute("insert into t1 values(1640000000000, 1)")
|
||||
tdSql.execute("create table db.st(ts timestamp, c1 SMALLINT) tags(sntag SMALLINT)")
|
||||
tdSql.execute("create table db.t1 using db.st tags(1)")
|
||||
tdSql.execute("insert into db.t1 values(1640000000000, 1)")
|
||||
|
||||
tdSql.execute("create table t2 using st tags(32767)")
|
||||
tdSql.execute("insert into t2 values(1640000000000, 32767)")
|
||||
tdSql.execute("create table db.t2 using db.st tags(32767)")
|
||||
tdSql.execute("insert into db.t2 values(1640000000000, 32767)")
|
||||
|
||||
tdSql.execute("create table t3 using st tags(-32767)")
|
||||
tdSql.execute("insert into t3 values(1640000000000, -32767)")
|
||||
tdSql.execute("create table db.t3 using db.st tags(-32767)")
|
||||
tdSql.execute("insert into db.t3 values(1640000000000, -32767)")
|
||||
|
||||
tdSql.execute("create table t4 using st tags(NULL)")
|
||||
tdSql.execute("insert into t4 values(1640000000000, NULL)")
|
||||
tdSql.execute("create table db.t4 using db.st tags(NULL)")
|
||||
tdSql.execute("insert into db.t4 values(1640000000000, NULL)")
|
||||
|
||||
binPath = etool.taosDumpFile()
|
||||
if binPath == "":
|
||||
|
@ -84,32 +80,32 @@ class TDTestCase(TBase):
|
|||
assert found == True
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.query("show db.stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, "st")
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.query("show db.tables")
|
||||
tdSql.checkRows(4)
|
||||
|
||||
tdSql.query("select * from st where sntag = 1")
|
||||
tdSql.query("select * from db.st where sntag = 1")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 1)
|
||||
tdSql.checkData(0, 2, 1)
|
||||
|
||||
tdSql.query("select * from st where sntag = 32767")
|
||||
tdSql.query("select * from db.st where sntag = 32767")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 32767)
|
||||
tdSql.checkData(0, 2, 32767)
|
||||
|
||||
tdSql.query("select * from st where sntag = -32767")
|
||||
tdSql.query("select * from db.st where sntag = -32767")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, -32767)
|
||||
tdSql.checkData(0, 2, -32767)
|
||||
|
||||
tdSql.query("select * from st where sntag is null")
|
||||
tdSql.query("select * from db.st where sntag is null")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, None)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# All rights reserved.
|
||||
#
|
||||
# This file is proprietary and confidential to TAOS Technologies.
|
||||
# No part of this file may be reproduced, stored, transmitted,
|
||||
# No part of this file may be reproduced, db.stored, transmitted,
|
||||
# disclosed or used in any form or by any means other than as
|
||||
# expressly provided by the written permission from Jianhui Tao
|
||||
#
|
||||
|
@ -27,10 +27,6 @@ class TDTestCase(TBase):
|
|||
case1<sdsang>: [TD-12526] taosdump supports tiny int
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
|
@ -38,18 +34,18 @@ class TDTestCase(TBase):
|
|||
tdSql.execute("create database db keep 3649 ")
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute("create table st(ts timestamp, c1 TINYINT) tags(tntag TINYINT)")
|
||||
tdSql.execute("create table t1 using st tags(1)")
|
||||
tdSql.execute("insert into t1 values(1640000000000, 1)")
|
||||
tdSql.execute("create table db.st(ts timestamp, c1 TINYINT) tags(tntag TINYINT)")
|
||||
tdSql.execute("create table db.t1 using db.st tags(1)")
|
||||
tdSql.execute("insert into db.t1 values(1640000000000, 1)")
|
||||
|
||||
tdSql.execute("create table t2 using st tags(127)")
|
||||
tdSql.execute("insert into t2 values(1640000000000, 127)")
|
||||
tdSql.execute("create table db.t2 using db.st tags(127)")
|
||||
tdSql.execute("insert into db.t2 values(1640000000000, 127)")
|
||||
|
||||
tdSql.execute("create table t3 using st tags(-127)")
|
||||
tdSql.execute("insert into t3 values(1640000000000, -127)")
|
||||
tdSql.execute("create table db.t3 using db.st tags(-127)")
|
||||
tdSql.execute("insert into db.t3 values(1640000000000, -127)")
|
||||
|
||||
tdSql.execute("create table t4 using st tags(NULL)")
|
||||
tdSql.execute("insert into t4 values(1640000000000, NULL)")
|
||||
tdSql.execute("create table db.t4 using db.st tags(NULL)")
|
||||
tdSql.execute("insert into db.t4 values(1640000000000, NULL)")
|
||||
|
||||
# sys.exit(1)
|
||||
|
||||
|
@ -86,32 +82,32 @@ class TDTestCase(TBase):
|
|||
assert found == True
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.query("show db.stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, "st")
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.query("show db.tables")
|
||||
tdSql.checkRows(4)
|
||||
|
||||
tdSql.query("select * from st where tntag = 1")
|
||||
tdSql.query("select * from db.st where tntag = 1")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 1)
|
||||
tdSql.checkData(0, 2, 1)
|
||||
|
||||
tdSql.query("select * from st where tntag = 127")
|
||||
tdSql.query("select * from db.st where tntag = 127")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 127)
|
||||
tdSql.checkData(0, 2, 127)
|
||||
|
||||
tdSql.query("select * from st where tntag = -127")
|
||||
tdSql.query("select * from db.st where tntag = -127")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, -127)
|
||||
tdSql.checkData(0, 2, -127)
|
||||
|
||||
tdSql.query("select * from st where tntag is null")
|
||||
tdSql.query("select * from db.st where tntag is null")
|
||||
dbresult = tdSql.res
|
||||
print(dbresult)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# All rights reserved.
|
||||
#
|
||||
# This file is proprietary and confidential to TAOS Technologies.
|
||||
# No part of this file may be reproduced, stored, transmitted,
|
||||
# No part of this file may be reproduced, db.stored, transmitted,
|
||||
# disclosed or used in any form or by any means other than as
|
||||
# expressly provided by the written permission from Jianhui Tao
|
||||
#
|
||||
|
@ -27,10 +27,6 @@ class TDTestCase(TBase):
|
|||
case1<sdsang>: [TD-12655] taosdump supports unsigned big int
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
|
@ -39,15 +35,15 @@ class TDTestCase(TBase):
|
|||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
"create table st(ts timestamp, c1 BIGINT UNSIGNED) \
|
||||
"create table db.st(ts timestamp, c1 BIGINT UNSIGNED) \
|
||||
tags(ubntag BIGINT UNSIGNED)"
|
||||
)
|
||||
tdSql.execute("create table t1 using st tags(0)")
|
||||
tdSql.execute("insert into t1 values(1640000000000, 0)")
|
||||
tdSql.execute("create table t2 using st tags(18446744073709551614)")
|
||||
tdSql.execute("insert into t2 values(1640000000000, 18446744073709551614)")
|
||||
tdSql.execute("create table t3 using st tags(NULL)")
|
||||
tdSql.execute("insert into t3 values(1640000000000, NULL)")
|
||||
tdSql.execute("create table db.t1 using db.st tags(0)")
|
||||
tdSql.execute("insert into db.t1 values(1640000000000, 0)")
|
||||
tdSql.execute("create table db.t2 using db.st tags(18446744073709551614)")
|
||||
tdSql.execute("insert into db.t2 values(1640000000000, 18446744073709551614)")
|
||||
tdSql.execute("create table db.t3 using db.st tags(NULL)")
|
||||
tdSql.execute("insert into db.t3 values(1640000000000, NULL)")
|
||||
|
||||
# sys.exit(1)
|
||||
|
||||
|
@ -84,26 +80,26 @@ class TDTestCase(TBase):
|
|||
assert found == True
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.query("show db.stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, "st")
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.query("show db.tables")
|
||||
tdSql.checkRows(3)
|
||||
|
||||
tdSql.query("select * from st where ubntag = 0")
|
||||
tdSql.query("select * from db.st where ubntag = 0")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 0)
|
||||
tdSql.checkData(0, 2, 0)
|
||||
|
||||
tdSql.query("select * from st where ubntag = 18446744073709551614")
|
||||
tdSql.query("select * from db.st where ubntag = 18446744073709551614")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 18446744073709551614)
|
||||
tdSql.checkData(0, 2, 18446744073709551614)
|
||||
|
||||
tdSql.query("select * from st where ubntag is null")
|
||||
tdSql.query("select * from db.st where ubntag is null")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, None)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# All rights reserved.
|
||||
#
|
||||
# This file is proprietary and confidential to TAOS Technologies.
|
||||
# No part of this file may be reproduced, stored, transmitted,
|
||||
# No part of this file may be reproduced, db.stored, transmitted,
|
||||
# disclosed or used in any form or by any means other than as
|
||||
# expressly provided by the written permission from Jianhui Tao
|
||||
#
|
||||
|
@ -27,10 +27,6 @@ class TDTestCase(TBase):
|
|||
case1<sdsang>: [TD-12526] taosdump supports unsigned int
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
|
@ -39,14 +35,14 @@ class TDTestCase(TBase):
|
|||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
"create table st(ts timestamp, c1 INT UNSIGNED) tags(untag INT UNSIGNED)"
|
||||
"create table db.st(ts timestamp, c1 INT UNSIGNED) tags(untag INT UNSIGNED)"
|
||||
)
|
||||
tdSql.execute("create table t1 using st tags(0)")
|
||||
tdSql.execute("insert into t1 values(1640000000000, 0)")
|
||||
tdSql.execute("create table t2 using st tags(4294967294)")
|
||||
tdSql.execute("insert into t2 values(1640000000000, 4294967294)")
|
||||
tdSql.execute("create table t3 using st tags(NULL)")
|
||||
tdSql.execute("insert into t3 values(1640000000000, NULL)")
|
||||
tdSql.execute("create table db.t1 using db.st tags(0)")
|
||||
tdSql.execute("insert into db.t1 values(1640000000000, 0)")
|
||||
tdSql.execute("create table db.t2 using db.st tags(4294967294)")
|
||||
tdSql.execute("insert into db.t2 values(1640000000000, 4294967294)")
|
||||
tdSql.execute("create table db.t3 using db.st tags(NULL)")
|
||||
tdSql.execute("insert into db.t3 values(1640000000000, NULL)")
|
||||
|
||||
# sys.exit(1)
|
||||
|
||||
|
@ -83,26 +79,26 @@ class TDTestCase(TBase):
|
|||
assert found == True
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.query("show db.stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, "st")
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.query("show db.tables")
|
||||
tdSql.checkRows(3)
|
||||
|
||||
tdSql.query("select * from st where untag = 0")
|
||||
tdSql.query("select * from db.st where untag = 0")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 0)
|
||||
tdSql.checkData(0, 2, 0)
|
||||
|
||||
tdSql.query("select * from st where untag = 4294967294")
|
||||
tdSql.query("select * from db.st where untag = 4294967294")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 4294967294)
|
||||
tdSql.checkData(0, 2, 4294967294)
|
||||
|
||||
tdSql.query("select * from st where untag is null")
|
||||
tdSql.query("select * from db.st where untag is null")
|
||||
dbresult = tdSql.res
|
||||
print(dbresult)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# All rights reserved.
|
||||
#
|
||||
# This file is proprietary and confidential to TAOS Technologies.
|
||||
# No part of this file may be reproduced, stored, transmitted,
|
||||
# No part of this file may be reproduced, db.stored, transmitted,
|
||||
# disclosed or used in any form or by any means other than as
|
||||
# expressly provided by the written permission from Jianhui Tao
|
||||
#
|
||||
|
@ -27,10 +27,6 @@ class TDTestCase(TBase):
|
|||
case1<sdsang>: [TD-12526] taosdump supports unsigned small int
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
|
@ -39,14 +35,14 @@ class TDTestCase(TBase):
|
|||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
"create table st(ts timestamp, c1 SMALLINT UNSIGNED) \
|
||||
"create table db.st(ts timestamp, c1 SMALLINT UNSIGNED) \
|
||||
tags(usntag SMALLINT UNSIGNED)"
|
||||
)
|
||||
tdSql.execute("create table t1 using st tags(0)")
|
||||
tdSql.execute("insert into t1 values(1640000000000, 0)")
|
||||
tdSql.execute("create table t2 using st tags(65534)")
|
||||
tdSql.execute("insert into t2 values(1640000000000, 65534)")
|
||||
tdSql.execute("create table t3 using st tags(NULL)")
|
||||
tdSql.execute("create table db.t1 using db.st tags(0)")
|
||||
tdSql.execute("insert into db.t1 values(1640000000000, 0)")
|
||||
tdSql.execute("create table db.t2 using db.st tags(65534)")
|
||||
tdSql.execute("insert into db.t2 values(1640000000000, 65534)")
|
||||
tdSql.execute("create table t3 using db.st tags(NULL)")
|
||||
tdSql.execute("insert into t3 values(1640000000000, NULL)")
|
||||
|
||||
# sys.exit(1)
|
||||
|
@ -84,26 +80,26 @@ class TDTestCase(TBase):
|
|||
assert found == True
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.query("show db.stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, "st")
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.query("show db.tables")
|
||||
tdSql.checkRows(3)
|
||||
|
||||
tdSql.query("select * from st where usntag = 0")
|
||||
tdSql.query("select * from db.st where usntag = 0")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 0)
|
||||
tdSql.checkData(0, 2, 0)
|
||||
|
||||
tdSql.query("select * from st where usntag = 65534")
|
||||
tdSql.query("select * from db.st where usntag = 65534")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 65534)
|
||||
tdSql.checkData(0, 2, 65534)
|
||||
|
||||
tdSql.query("select * from st where usntag is null")
|
||||
tdSql.query("select * from db.st where usntag is null")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, None)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# All rights reserved.
|
||||
#
|
||||
# This file is proprietary and confidential to TAOS Technologies.
|
||||
# No part of this file may be reproduced, stored, transmitted,
|
||||
# No part of this file may be reproduced, db.stored, transmitted,
|
||||
# disclosed or used in any form or by any means other than as
|
||||
# expressly provided by the written permission from Jianhui Tao
|
||||
#
|
||||
|
@ -27,10 +27,6 @@ class TDTestCase(TBase):
|
|||
case1<sdsang>: [TD-12526] taosdump supports unsigned tiny int
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
|
@ -39,15 +35,15 @@ class TDTestCase(TBase):
|
|||
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
"create table st(ts timestamp, c1 TINYINT UNSIGNED) \
|
||||
"create table db.st(ts timestamp, c1 TINYINT UNSIGNED) \
|
||||
tags(utntag TINYINT UNSIGNED)"
|
||||
)
|
||||
tdSql.execute("create table t1 using st tags(0)")
|
||||
tdSql.execute("insert into t1 values(1640000000000, 0)")
|
||||
tdSql.execute("create table t2 using st tags(254)")
|
||||
tdSql.execute("insert into t2 values(1640000000000, 254)")
|
||||
tdSql.execute("create table t3 using st tags(NULL)")
|
||||
tdSql.execute("insert into t3 values(1640000000000, NULL)")
|
||||
tdSql.execute("create table db.t1 using db.st tags(0)")
|
||||
tdSql.execute("insert into db.t1 values(1640000000000, 0)")
|
||||
tdSql.execute("create table db.t2 using db.st tags(254)")
|
||||
tdSql.execute("insert into db.t2 values(1640000000000, 254)")
|
||||
tdSql.execute("create table db.t3 using db.st tags(NULL)")
|
||||
tdSql.execute("insert into db.t3 values(1640000000000, NULL)")
|
||||
|
||||
# sys.exit(1)
|
||||
|
||||
|
@ -84,26 +80,26 @@ class TDTestCase(TBase):
|
|||
assert found == True
|
||||
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
tdSql.query("show db.stables")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, "st")
|
||||
|
||||
tdSql.query("show tables")
|
||||
tdSql.query("show db.tables")
|
||||
tdSql.checkRows(3)
|
||||
|
||||
tdSql.query("select * from st where utntag = 0")
|
||||
tdSql.query("select * from db.st where utntag = 0")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 0)
|
||||
tdSql.checkData(0, 2, 0)
|
||||
|
||||
tdSql.query("select * from st where utntag = 254")
|
||||
tdSql.query("select * from db.st where utntag = 254")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, 254)
|
||||
tdSql.checkData(0, 2, 254)
|
||||
|
||||
tdSql.query("select * from st where utntag is null")
|
||||
tdSql.query("select * from db.st where utntag is null")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1640000000000)
|
||||
tdSql.checkData(0, 1, None)
|
||||
|
|
|
@ -79,14 +79,14 @@
|
|||
|
||||
# benchmark 66 cases
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/rest_insert_alltypes_json.py -R
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/taosdemoTestQueryWithJson-mixed-query.py
|
||||
,,n,army,python3 ./test.py -f tools/benchmark/basic/taosdemoTestQueryWithJson-mixed-query.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/stmt_sample_csv_json.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/taosdemoTestInsertWithJsonStmt-otherPara.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/sml_telnet_insert_alltypes-same-min-max.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/query_json-kill-slow-query.py
|
||||
,,n,army,python3 ./test.py -f tools/benchmark/basic/query_json-kill-slow-query.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/default_tmq_json.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/reuse-exist-stb.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/sml_interlace.py
|
||||
,,n,army,python3 ./test.py -f tools/benchmark/basic/sml_interlace.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/stmt2_insert.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/stmt_offset_json.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/json_tag.py
|
||||
|
@ -100,17 +100,17 @@
|
|||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/telnet_tcp.py -R
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/stmt_sample_csv_json-subtable.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/from-to-continue.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/sml_json_alltypes-interlace.py
|
||||
,,n,army,python3 ./test.py -f tools/benchmark/basic/sml_json_alltypes-interlace.py
|
||||
,,n,army,python3 ./test.py -f tools/benchmark/basic/commandline-retry.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/tmq_case.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/limit_offset_json.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/commandline-sml.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/sml_insert_alltypes_json.py
|
||||
,,n,army,python3 ./test.py -f tools/benchmark/basic/commandline-sml.py
|
||||
,,n,army,python3 ./test.py -f tools/benchmark/basic/sml_insert_alltypes_json.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/taosc_insert_alltypes_json.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/commandline.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/sml_taosjson_insert_alltypes-same-min-max.py
|
||||
,,n,army,python3 ./test.py -f tools/benchmark/basic/sml_taosjson_insert_alltypes-same-min-max.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/taosc_insert_alltypes-same-min-max.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/bugs.py
|
||||
,,n,army,python3 ./test.py -f tools/benchmark/basic/bugs.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/taosc_sample_csv_json-subtable.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/query_json-with-error-sqlfile.py
|
||||
,,n,army,python3 ./test.py -f tools/benchmark/basic/taosc_insert-retry-json-global.py
|
||||
|
@ -119,17 +119,17 @@
|
|||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/taosdemoTestQueryWithJson.py -R
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/commandline-partial-col-numpy.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/query_json-with-sqlfile.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/query_json.py -R
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/query_json.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/sml_json_alltypes.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/invalid_commandline.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/sml_json_insert_alltypes-same-min-max.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/default_json.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/taosc_sample_csv_json.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/stmt_sample_csv_json_doesnt_use_ts.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/taosadapter_json.py -R
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/taosadapter_json.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/demo.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/commandline-supplement-insert.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/custom_col_tag.py -R
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/custom_col_tag.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/stmt_auto_create_table_json.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/stmt_insert_alltypes_json.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/benchmark/basic/stmt_insert_alltypes-same-min-max.py
|
||||
|
@ -154,7 +154,7 @@
|
|||
,,y,army,./pytest.sh python3 ./test.py -f tools/taosdump/native/taosdumpStartEndTime.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/taosdump/native/taosdumpTypeVarbinary.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/taosdump/native/taosdumpTypeGeometry.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/taosdump/native/taosdumpDbWithNonRoot.py
|
||||
,,n,army,python3 ./test.py -f tools/taosdump/native/taosdumpDbWithNonRoot.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/taosdump/native/taosdumpEscapedDb.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/taosdump/native/taosdumpTestTypeJson.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/taosdump/native/taosdumpTestBasic.py
|
||||
|
@ -176,7 +176,7 @@
|
|||
,,y,army,./pytest.sh python3 ./test.py -f tools/taosdump/native/taosdumpTest2.py
|
||||
,,y,army,./pytest.sh python3 ./test.py -f tools/taosdump/native/taosdumpTestTypeTinyInt.py
|
||||
|
||||
,,n,army,python3 ./test.py -f tools/taosdump/ws/taosdumpTestTypeDouble.py -R
|
||||
,,n,army,python3 ./test.py -f tools/taosdump/ws/taosdumpTestTypeDouble.py
|
||||
,,n,army,python3 ./test.py -f tools/taosdump/ws/taosdumpTestTypeUnsignedBigInt.py -R
|
||||
,,n,army,python3 ./test.py -f tools/taosdump/ws/taosdumpEscapedDb.py -R
|
||||
,,n,army,python3 ./test.py -f tools/taosdump/ws/taosdumpPrimaryKey.py -R
|
||||
|
@ -190,7 +190,7 @@
|
|||
,,n,army,python3 ./test.py -f tools/taosdump/ws/taosdumpTestTypeBinary.py -R
|
||||
,,n,army,python3 ./test.py -f tools/taosdump/ws/taosdumpTestTypeFloat.py -R
|
||||
,,n,army,python3 ./test.py -f tools/taosdump/ws/taosdumpTestTypeBool.py -R
|
||||
,,n,army,python3 ./test.py -f tools/taosdump/ws/taosdumpRetry.py -R
|
||||
,,n,army,python3 ./test.py -f tools/taosdump/ws/taosdumpRetry.py
|
||||
,,n,army,python3 ./test.py -f tools/taosdump/ws/taosdumpTestTypeTinyInt.py -R
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue