提交 fc732c29 编写于 作者: J jiajingbin

save

上级 f07b4f55
...@@ -488,78 +488,78 @@ class TDTestCase: ...@@ -488,78 +488,78 @@ class TDTestCase:
check full type tag value limit check full type tag value limit
""" """
self.cleanStb() self.cleanStb()
# i8 # # i8
for t1 in ["-127i8", "127i8"]: # for t1 in ["-127i8", "127i8"]:
input_sql, stb_name, tb_name = self.genFullTypeSql(t1=t1) # input_sql, stb_name, tb_name = self.genFullTypeSql(t1=t1)
self.resCmp(input_sql, stb_name) # self.resCmp(input_sql, stb_name)
for t1 in ["-128i8", "128i8"]: # for t1 in ["-128i8", "128i8"]:
input_sql = self.genFullTypeSql(t1=t1)[0] # input_sql = self.genFullTypeSql(t1=t1)[0]
code = self._conn.insertLines([input_sql]) # code = self._conn.insertLines([input_sql])
tdSql.checkNotEqual(code, 0) # tdSql.checkNotEqual(code, 0)
#i16 # #i16
for t2 in ["-32767i16", "32767i16"]: # for t2 in ["-32767i16", "32767i16"]:
input_sql, stb_name, tb_name = self.genFullTypeSql(t2=t2) # input_sql, stb_name, tb_name = self.genFullTypeSql(t2=t2)
self.resCmp(input_sql, stb_name) # self.resCmp(input_sql, stb_name)
for t2 in ["-32768i16", "32768i16"]: # for t2 in ["-32768i16", "32768i16"]:
input_sql = self.genFullTypeSql(t2=t2)[0] # input_sql = self.genFullTypeSql(t2=t2)[0]
code = self._conn.insertLines([input_sql]) # code = self._conn.insertLines([input_sql])
tdSql.checkNotEqual(code, 0) # tdSql.checkNotEqual(code, 0)
#i32 # #i32
for t3 in ["-2147483647i32", "2147483647i32"]: # for t3 in ["-2147483647i32", "2147483647i32"]:
input_sql, stb_name, tb_name = self.genFullTypeSql(t3=t3) # input_sql, stb_name, tb_name = self.genFullTypeSql(t3=t3)
self.resCmp(input_sql, stb_name) # self.resCmp(input_sql, stb_name)
for t3 in ["-2147483648i32", "2147483648i32"]: # for t3 in ["-2147483648i32", "2147483648i32"]:
input_sql = self.genFullTypeSql(t3=t3)[0] # input_sql = self.genFullTypeSql(t3=t3)[0]
code = self._conn.insertLines([input_sql]) # code = self._conn.insertLines([input_sql])
tdSql.checkNotEqual(code, 0) # tdSql.checkNotEqual(code, 0)
#i64 # #i64
for t4 in ["-9223372036854775807i64", "9223372036854775807i64"]: # for t4 in ["-9223372036854775807i64", "9223372036854775807i64"]:
input_sql, stb_name, tb_name = self.genFullTypeSql(t4=t4) # input_sql, stb_name, tb_name = self.genFullTypeSql(t4=t4)
self.resCmp(input_sql, stb_name) # self.resCmp(input_sql, stb_name)
for t4 in ["-9223372036854775808i64", "9223372036854775808i64"]: # for t4 in ["-9223372036854775808i64", "9223372036854775808i64"]:
input_sql = self.genFullTypeSql(t4=t4)[0] # input_sql = self.genFullTypeSql(t4=t4)[0]
code = self._conn.insertLines([input_sql]) # code = self._conn.insertLines([input_sql])
tdSql.checkNotEqual(code, 0) # tdSql.checkNotEqual(code, 0)
# f32 # # f32
for t5 in [f"{-3.4028234663852885981170418348451692544*(10**38)}f32", f"{3.4028234663852885981170418348451692544*(10**38)}f32"]: # for t5 in [f"{-3.4028234663852885981170418348451692544*(10**38)}f32", f"{3.4028234663852885981170418348451692544*(10**38)}f32"]:
input_sql, stb_name, tb_name = self.genFullTypeSql(t5=t5) # input_sql, stb_name, tb_name = self.genFullTypeSql(t5=t5)
self.resCmp(input_sql, stb_name) # self.resCmp(input_sql, stb_name)
# * limit set to 4028234664*(10**38) # # * limit set to 4028234664*(10**38)
for t5 in [f"{-3.4028234664*(10**38)}f32", f"{3.4028234664*(10**38)}f32"]: # for t5 in [f"{-3.4028234664*(10**38)}f32", f"{3.4028234664*(10**38)}f32"]:
input_sql = self.genFullTypeSql(t5=t5)[0] # input_sql = self.genFullTypeSql(t5=t5)[0]
code = self._conn.insertLines([input_sql]) # code = self._conn.insertLines([input_sql])
tdSql.checkNotEqual(code, 0) # tdSql.checkNotEqual(code, 0)
# f64 #!bug stack smashing detected ***: <unknown> terminated Aborted # f64 #!bug stack smashing detected ***: <unknown> terminated Aborted
#for t6 in [f'{-1.79769313486231570814527423731704356798070567525844996598917476803157260780*(10**308)}f64', f'{-1.79769313486231570814527423731704356798070567525844996598917476803157260780*(10**308)}f64']: # for t6 in [f'{-1.79769313486231570814527423731704356798070567525844996598917476803157260780*(10**308)}f64', f'{-1.79769313486231570814527423731704356798070567525844996598917476803157260780*(10**308)}f64']:
# for t6 in [f'{-1.79769*(10**308)}f64', f'{-1.79769*(10**308)}f64']: for t6 in [f'{-1.79769*(10**308)}f64', f'{-1.79769*(10**308)}f64']:
# print("f64?") print("f64?")
# input_sql, stb_name, tb_name = self.genFullTypeSql(t6=t6) input_sql, stb_name, tb_name = self.genFullTypeSql(t6=t6)
# self.resCmp(input_sql, stb_name) self.resCmp(input_sql, stb_name)
# TODO to confirm length # TODO to confirm length
# binary # # binary
stb_name = self.getLongName(7, "letters") # stb_name = self.getLongName(7, "letters")
input_sql = f'{stb_name},t0=t,t1="{self.getLongName(16374, "letters")}" c0=f 1626006833639000000ns' # input_sql = f'{stb_name},t0=t,t1="{self.getLongName(16374, "letters")}" c0=f 1626006833639000000ns'
code = self._conn.insertLines([input_sql]) # code = self._conn.insertLines([input_sql])
tdSql.checkEqual(code, 0) # tdSql.checkEqual(code, 0)
input_sql = f'{stb_name},t0=t,t1="{self.getLongName(16375, "letters")}" c0=f 1626006833639000000ns' # input_sql = f'{stb_name},t0=t,t1="{self.getLongName(16375, "letters")}" c0=f 1626006833639000000ns'
code = self._conn.insertLines([input_sql]) # code = self._conn.insertLines([input_sql])
tdSql.checkNotEqual(code, 0) # tdSql.checkNotEqual(code, 0)
# nchar # # nchar
# * legal nchar could not be larger than 16374/4 # # * legal nchar could not be larger than 16374/4
stb_name = self.getLongName(7, "letters") # stb_name = self.getLongName(7, "letters")
input_sql = f'{stb_name},t0=t,t1=L"{self.getLongName(4093, "letters")}" c0=f 1626006833639000000ns' # input_sql = f'{stb_name},t0=t,t1=L"{self.getLongName(4093, "letters")}" c0=f 1626006833639000000ns'
code = self._conn.insertLines([input_sql]) # code = self._conn.insertLines([input_sql])
tdSql.checkEqual(code, 0) # tdSql.checkEqual(code, 0)
input_sql = f'{stb_name},t0=t,t1=L"{self.getLongName(4094, "letters")}" c0=f 1626006833639000000ns' # input_sql = f'{stb_name},t0=t,t1=L"{self.getLongName(4094, "letters")}" c0=f 1626006833639000000ns'
code = self._conn.insertLines([input_sql]) # code = self._conn.insertLines([input_sql])
tdSql.checkNotEqual(code, 0) # tdSql.checkNotEqual(code, 0)
def colValueLengthCheckCase(self): def colValueLengthCheckCase(self):
...@@ -567,83 +567,83 @@ class TDTestCase: ...@@ -567,83 +567,83 @@ class TDTestCase:
check full type col value limit check full type col value limit
""" """
self.cleanStb() self.cleanStb()
# i8 # # i8
for c1 in ["-127i8", "127i8"]: # for c1 in ["-127i8", "127i8"]:
input_sql, stb_name, tb_name = self.genFullTypeSql(c1=c1) # input_sql, stb_name, tb_name = self.genFullTypeSql(c1=c1)
self.resCmp(input_sql, stb_name) # self.resCmp(input_sql, stb_name)
for c1 in ["-128i8", "128i8"]:
input_sql = self.genFullTypeSql(c1=c1)[0]
print(input_sql)
code = self._conn.insertLines([input_sql])
tdSql.checkNotEqual(code, 0)
# i16
for c2 in ["-32767i16"]:
input_sql, stb_name, tb_name = self.genFullTypeSql(c2=c2)
self.resCmp(input_sql, stb_name)
for c2 in ["-32768i16", "32768i16"]:
input_sql = self.genFullTypeSql(c2=c2)[0]
code = self._conn.insertLines([input_sql])
tdSql.checkNotEqual(code, 0)
# i32 # for c1 in ["-128i8", "128i8"]:
for c3 in ["-2147483647i32"]: # input_sql = self.genFullTypeSql(c1=c1)[0]
input_sql, stb_name, tb_name = self.genFullTypeSql(c3=c3) # print(input_sql)
self.resCmp(input_sql, stb_name) # code = self._conn.insertLines([input_sql])
for c3 in ["-2147483648i32", "2147483648i32"]: # tdSql.checkNotEqual(code, 0)
input_sql = self.genFullTypeSql(c3=c3)[0] # # i16
code = self._conn.insertLines([input_sql]) # for c2 in ["-32767i16"]:
tdSql.checkNotEqual(code, 0) # input_sql, stb_name, tb_name = self.genFullTypeSql(c2=c2)
# self.resCmp(input_sql, stb_name)
# for c2 in ["-32768i16", "32768i16"]:
# input_sql = self.genFullTypeSql(c2=c2)[0]
# code = self._conn.insertLines([input_sql])
# tdSql.checkNotEqual(code, 0)
# i64 # # i32
for c4 in ["-9223372036854775807i64"]: # for c3 in ["-2147483647i32"]:
input_sql, stb_name, tb_name = self.genFullTypeSql(c4=c4) # input_sql, stb_name, tb_name = self.genFullTypeSql(c3=c3)
self.resCmp(input_sql, stb_name) # self.resCmp(input_sql, stb_name)
for c4 in ["-9223372036854775808i64", "9223372036854775808i64"]: # for c3 in ["-2147483648i32", "2147483648i32"]:
input_sql = self.genFullTypeSql(c4=c4)[0] # input_sql = self.genFullTypeSql(c3=c3)[0]
code = self._conn.insertLines([input_sql]) # code = self._conn.insertLines([input_sql])
tdSql.checkNotEqual(code, 0) # tdSql.checkNotEqual(code, 0)
# f32 # # i64
for c5 in [f"{-3.4028234663852885981170418348451692544*(10**38)}f32", f"{3.4028234663852885981170418348451692544*(10**38)}f32"]: # for c4 in ["-9223372036854775807i64"]:
input_sql, stb_name, tb_name = self.genFullTypeSql(c5=c5) # input_sql, stb_name, tb_name = self.genFullTypeSql(c4=c4)
self.resCmp(input_sql, stb_name) # self.resCmp(input_sql, stb_name)
# * limit set to 4028234664*(10**38) # for c4 in ["-9223372036854775808i64", "9223372036854775808i64"]:
for c5 in [f"{-3.4028234664*(10**38)}f32", f"{3.4028234664*(10**38)}f32"]: # input_sql = self.genFullTypeSql(c4=c4)[0]
input_sql = self.genFullTypeSql(c5=c5)[0] # code = self._conn.insertLines([input_sql])
code = self._conn.insertLines([input_sql]) # tdSql.checkNotEqual(code, 0)
tdSql.checkNotEqual(code, 0)
# f64 # # f32
for c6 in [f'{-1.79769313486231570814527423731704356798070567525844996598917476803157260780*(10**308)}f64', f'{-1.79769313486231570814527423731704356798070567525844996598917476803157260780*(10**308)}f64']: # for c5 in [f"{-3.4028234663852885981170418348451692544*(10**38)}f32", f"{3.4028234663852885981170418348451692544*(10**38)}f32"]:
input_sql, stb_name, tb_name = self.genFullTypeSql(c6=c6) # input_sql, stb_name, tb_name = self.genFullTypeSql(c5=c5)
self.resCmp(input_sql, stb_name) # self.resCmp(input_sql, stb_name)
# * limit set to 1.797693134862316*(10**308) # # * limit set to 4028234664*(10**38)
for c6 in [f'{-1.797693134862316*(10**308)}f64', f'{-1.797693134862316*(10**308)}f64']: # for c5 in [f"{-3.4028234664*(10**38)}f32", f"{3.4028234664*(10**38)}f32"]:
input_sql = self.genFullTypeSql(c6=c6)[0] # input_sql = self.genFullTypeSql(c5=c5)[0]
code = self._conn.insertLines([input_sql]) # code = self._conn.insertLines([input_sql])
tdSql.checkNotEqual(code, 0) # tdSql.checkNotEqual(code, 0)
# binary # # f64
stb_name = self.getLongName(7, "letters") # for c6 in [f'{-1.79769313486231570814527423731704356798070567525844996598917476803157260780*(10**308)}f64', f'{-1.79769313486231570814527423731704356798070567525844996598917476803157260780*(10**308)}f64']:
input_sql = f'{stb_name},t0=t c0=f,c1="{self.getLongName(16374, "letters")}" 1626006833639000000ns' # input_sql, stb_name, tb_name = self.genFullTypeSql(c6=c6)
code = self._conn.insertLines([input_sql]) # self.resCmp(input_sql, stb_name)
tdSql.checkEqual(code, 0) # # * limit set to 1.797693134862316*(10**308)
# ! bug code is 0 # for c6 in [f'{-1.797693134862316*(10**308)}f64', f'{-1.797693134862316*(10**308)}f64']:
# input_sql = f'{stb_name},t0=t c0=f,c1="{self.getLongName(16375, "letters")}" 1626006833639000000ns' # input_sql = self.genFullTypeSql(c6=c6)[0]
# code = self._conn.insertLines([input_sql]) # code = self._conn.insertLines([input_sql])
# tdSql.checkNotEqual(code, 0) # tdSql.checkNotEqual(code, 0)
# nchar # # binary
# * legal nchar could not be larger than 16374/4
stb_name = self.getLongName(7, "letters") stb_name = self.getLongName(7, "letters")
input_sql = f'{stb_name},t0=t c0=f,c1=L"{self.getLongName(4093, "letters")}" 1626006833639000000ns' # input_sql = f'{stb_name},t0=t c0=f,c1="{self.getLongName(16374, "letters")}" 1626006833639000000ns'
code = self._conn.insertLines([input_sql]) # code = self._conn.insertLines([input_sql])
tdSql.checkEqual(code, 0) # tdSql.checkEqual(code, 0)
input_sql = f'{stb_name},t0=t c0=f,c1=L"{self.getLongName(4094, "letters")}" 1626006833639000000ns' # ! bug code is 0
input_sql = f'{stb_name},t0=t c0=f,c1="{self.getLongName(16375, "letters")}" 1626006833639000000ns'
code = self._conn.insertLines([input_sql]) code = self._conn.insertLines([input_sql])
tdSql.checkNotEqual(code, 0) tdSql.checkNotEqual(code, 0)
# nchar
# * legal nchar could not be larger than 16374/4
# stb_name = self.getLongName(7, "letters")
# input_sql = f'{stb_name},t0=t c0=f,c1=L"{self.getLongName(4093, "letters")}" 1626006833639000000ns'
# code = self._conn.insertLines([input_sql])
# tdSql.checkEqual(code, 0)
# input_sql = f'{stb_name},t0=t c0=f,c1=L"{self.getLongName(4094, "letters")}" 1626006833639000000ns'
# code = self._conn.insertLines([input_sql])
# tdSql.checkNotEqual(code, 0)
def tagColIllegalValueCheckCase(self): def tagColIllegalValueCheckCase(self):
""" """
...@@ -1089,7 +1089,7 @@ class TDTestCase: ...@@ -1089,7 +1089,7 @@ class TDTestCase:
# self.idSeqCheckCase() # self.idSeqCheckCase()
# self.idUpperCheckCase() # self.idUpperCheckCase()
# self.noIdCheckCase() # self.noIdCheckCase()
self.maxColTagCheckCase() # self.maxColTagCheckCase()
# self.idIllegalNameCheckCase() # self.idIllegalNameCheckCase()
# self.idStartWithNumCheckCase() # self.idStartWithNumCheckCase()
# self.nowTsCheckCase() # self.nowTsCheckCase()
...@@ -1100,7 +1100,7 @@ class TDTestCase: ...@@ -1100,7 +1100,7 @@ class TDTestCase:
# self.tagValueLengthCheckCase() # self.tagValueLengthCheckCase()
# ! bug # ! bug
# self.colValueLengthCheckCase() self.colValueLengthCheckCase()
# self.tagColIllegalValueCheckCase() # self.tagColIllegalValueCheckCase()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册