提交 e9a6f1b8 编写于 作者: J jiacy-jcy

update alter_stable

上级 e3fd7bc1
...@@ -22,7 +22,7 @@ from util.common import * ...@@ -22,7 +22,7 @@ from util.common import *
class TDTestCase: class TDTestCase:
def init(self, conn, logSql): def init(self, conn, logSql):
tdLog.debug("start to execute %s" % __file__) tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor()) tdSql.init(conn.cursor(),logSql)
self.setsql = TDSetSql() self.setsql = TDSetSql()
self.ntbname = 'ntb' self.ntbname = 'ntb'
self.stbname = 'stb' self.stbname = 'stb'
...@@ -108,8 +108,8 @@ class TDTestCase: ...@@ -108,8 +108,8 @@ class TDTestCase:
tdSql.error(f'alter stable {self.stbname}_{i} add column {key} {values}') tdSql.error(f'alter stable {self.stbname}_{i} add column {key} {values}')
tdSql.error(f'alter stable {self.stbname}_{i} drop column {key}') tdSql.error(f'alter stable {self.stbname}_{i} drop column {key}')
#! bug TD-16921 #! bug TD-16921
#tdSql.error(f'alter stable {self.ntbname} add column {key} {values}') tdSql.error(f'alter stable {self.ntbname} add column {key} {values}')
#tdSql.error(f'alter stable {self.ntbname} drop column {key}') tdSql.error(f'alter stable {self.ntbname} drop column {key}')
tdSql.execute(f'alter stable {self.stbname} drop column {key}') tdSql.execute(f'alter stable {self.stbname} drop column {key}')
tdSql.query(f'describe {self.stbname}') tdSql.query(f'describe {self.stbname}')
tdSql.checkRows(len(self.column_dict)+len(self.tag_dict)) tdSql.checkRows(len(self.column_dict)+len(self.tag_dict))
...@@ -132,7 +132,7 @@ class TDTestCase: ...@@ -132,7 +132,7 @@ class TDTestCase:
tdSql.checkEqual(result[0][2],self.binary_length+1) tdSql.checkEqual(result[0][2],self.binary_length+1)
tdSql.error(f'alter stable {self.stbname}_{i} modify column {key} {v}') tdSql.error(f'alter stable {self.stbname}_{i} modify column {key} {v}')
#! bug TD-16921 #! bug TD-16921
# tdSql.error(f'alter stable {self.ntbname} modify column {key} {v}') tdSql.error(f'alter stable {self.ntbname} modify column {key} {v}')
elif 'nchar' in values.lower(): elif 'nchar' in values.lower():
v = f'nchar({self.binary_length+1})' v = f'nchar({self.binary_length+1})'
v_error = f'nchar({self.binary_length-1})' v_error = f'nchar({self.binary_length-1})'
...@@ -147,11 +147,11 @@ class TDTestCase: ...@@ -147,11 +147,11 @@ class TDTestCase:
tdSql.checkEqual(result[0][2],self.binary_length+1) tdSql.checkEqual(result[0][2],self.binary_length+1)
tdSql.error(f'alter stable {self.stbname}_{i} modify column {key} {v}') tdSql.error(f'alter stable {self.stbname}_{i} modify column {key} {v}')
#! bug TD-16921 #! bug TD-16921
#tdSql.error(f'alter stable {self.ntbname} modify column {key} {v}') tdSql.error(f'alter stable {self.ntbname} modify column {key} {v}')
else: else:
for v in self.column_dict.values(): for v in self.column_dict.values():
tdSql.error(f'alter stable {self.stbname} modify column {key} {v}') tdSql.error(f'alter stable {self.stbname} modify column {key} {v}')
# tdSql.error(f'alter stable {self.ntbname} modify column {key} {v}') tdSql.error(f'alter stable {self.ntbname} modify column {key} {v}')
for i in range(self.tbnum): for i in range(self.tbnum):
tdSql.error(f'alter stable {self.stbname}_{i} modify column {key} {v}') tdSql.error(f'alter stable {self.stbname}_{i} modify column {key} {v}')
def run(self): def run(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册