update tag index case
This commit is contained in:
parent
9ec64b9201
commit
271ecf6bef
|
@ -59,14 +59,18 @@ class TDTestCase:
|
|||
tdSql.checkData(1, 2, 2)
|
||||
|
||||
def check_indexes(self):
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkCols(7)
|
||||
tdSql.checkData(0, 0, 'idx1')
|
||||
tdSql.checkData(0, 1, 'db')
|
||||
tdSql.checkData(0, 2, 'stb')
|
||||
tdSql.checkData(0, 3, None)
|
||||
tdSql.checkData(0, 5, 't1')
|
||||
tdSql.checkData(0, 6, 'tag_index')
|
||||
tdSql.checkRows(2)
|
||||
for i in range(2):
|
||||
col_name = tdSql.getData(i, 5)
|
||||
if col_name == "t0":
|
||||
continue
|
||||
tdSql.checkCols(7)
|
||||
tdSql.checkData(i, 0, 'idx1')
|
||||
tdSql.checkData(i, 1, 'db')
|
||||
tdSql.checkData(i, 2, 'stb')
|
||||
tdSql.checkData(i, 3, None)
|
||||
tdSql.checkData(i, 5, 't1')
|
||||
tdSql.checkData(i, 6, 'tag_index')
|
||||
|
||||
def run(self):
|
||||
tdSql.execute(f'create database db')
|
||||
|
|
|
@ -118,12 +118,15 @@ class TDTestCase:
|
|||
def show_tagidx(self, stbname):
|
||||
sql = f'select index_name,column_name from information_schema.ins_indexes where db_name="db"'
|
||||
tdSql.query(sql)
|
||||
rows = len(self.tag_dict.keys())-1
|
||||
rows = len(self.tag_dict.keys())
|
||||
tdSql.checkRows(rows)
|
||||
|
||||
for i in range(rows):
|
||||
col_name = tdSql.getData(i, 1)
|
||||
idx_name = f'idx_{col_name}'
|
||||
# skip first tag
|
||||
if col_name == "t1":
|
||||
continue
|
||||
tdSql.checkData(i, 0, idx_name)
|
||||
|
||||
tdLog.info(f' show {rows} tag indexs ok.')
|
||||
|
@ -201,7 +204,7 @@ class TDTestCase:
|
|||
# check idx result is 0
|
||||
sql = f'select index_name,column_name from information_schema.ins_indexes where db_name="db"'
|
||||
tdSql.query(sql)
|
||||
tdSql.checkRows(0)
|
||||
tdSql.checkRows(1)
|
||||
tdLog.info(f' drop {cnt} tag indexs ok.')
|
||||
|
||||
# create long name idx
|
||||
|
|
Loading…
Reference in New Issue