enh: show command optimize
This commit is contained in:
parent
d9d892bf29
commit
4155a3bef4
|
@ -68,49 +68,49 @@ static const SSysTableShowAdapter sysTableShowAdapter[] = {
|
||||||
.pDbName = TSDB_INFORMATION_SCHEMA_DB,
|
.pDbName = TSDB_INFORMATION_SCHEMA_DB,
|
||||||
.pTableName = TSDB_INS_TABLE_DNODES,
|
.pTableName = TSDB_INS_TABLE_DNODES,
|
||||||
.numOfShowCols = 1,
|
.numOfShowCols = 1,
|
||||||
.pShowCols = {"endpoint"}
|
.pShowCols = {"*"}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.showType = QUERY_NODE_SHOW_MNODES_STMT,
|
.showType = QUERY_NODE_SHOW_MNODES_STMT,
|
||||||
.pDbName = TSDB_INFORMATION_SCHEMA_DB,
|
.pDbName = TSDB_INFORMATION_SCHEMA_DB,
|
||||||
.pTableName = TSDB_INS_TABLE_MNODES,
|
.pTableName = TSDB_INS_TABLE_MNODES,
|
||||||
.numOfShowCols = 1,
|
.numOfShowCols = 1,
|
||||||
.pShowCols = {"endpoint"}
|
.pShowCols = {"*"}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.showType = QUERY_NODE_SHOW_MODULES_STMT,
|
.showType = QUERY_NODE_SHOW_MODULES_STMT,
|
||||||
.pDbName = TSDB_INFORMATION_SCHEMA_DB,
|
.pDbName = TSDB_INFORMATION_SCHEMA_DB,
|
||||||
.pTableName = TSDB_INS_TABLE_MODULES,
|
.pTableName = TSDB_INS_TABLE_MODULES,
|
||||||
.numOfShowCols = 1,
|
.numOfShowCols = 1,
|
||||||
.pShowCols = {"endpoint"}
|
.pShowCols = {"*"}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.showType = QUERY_NODE_SHOW_QNODES_STMT,
|
.showType = QUERY_NODE_SHOW_QNODES_STMT,
|
||||||
.pDbName = TSDB_INFORMATION_SCHEMA_DB,
|
.pDbName = TSDB_INFORMATION_SCHEMA_DB,
|
||||||
.pTableName = TSDB_INS_TABLE_QNODES,
|
.pTableName = TSDB_INS_TABLE_QNODES,
|
||||||
.numOfShowCols = 1,
|
.numOfShowCols = 1,
|
||||||
.pShowCols = {"endpoint"}
|
.pShowCols = {"*"}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.showType = QUERY_NODE_SHOW_SNODES_STMT,
|
.showType = QUERY_NODE_SHOW_SNODES_STMT,
|
||||||
.pDbName = TSDB_INFORMATION_SCHEMA_DB,
|
.pDbName = TSDB_INFORMATION_SCHEMA_DB,
|
||||||
.pTableName = TSDB_INS_TABLE_SNODES,
|
.pTableName = TSDB_INS_TABLE_SNODES,
|
||||||
.numOfShowCols = 1,
|
.numOfShowCols = 1,
|
||||||
.pShowCols = {"endpoint"}
|
.pShowCols = {"*"}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.showType = QUERY_NODE_SHOW_BNODES_STMT,
|
.showType = QUERY_NODE_SHOW_BNODES_STMT,
|
||||||
.pDbName = TSDB_INFORMATION_SCHEMA_DB,
|
.pDbName = TSDB_INFORMATION_SCHEMA_DB,
|
||||||
.pTableName = TSDB_INS_TABLE_BNODES,
|
.pTableName = TSDB_INS_TABLE_BNODES,
|
||||||
.numOfShowCols = 1,
|
.numOfShowCols = 1,
|
||||||
.pShowCols = {"endpoint"}
|
.pShowCols = {"*"}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.showType = QUERY_NODE_SHOW_CLUSTER_STMT,
|
.showType = QUERY_NODE_SHOW_CLUSTER_STMT,
|
||||||
.pDbName = TSDB_INFORMATION_SCHEMA_DB,
|
.pDbName = TSDB_INFORMATION_SCHEMA_DB,
|
||||||
.pTableName = TSDB_INS_TABLE_CLUSTER,
|
.pTableName = TSDB_INS_TABLE_CLUSTER,
|
||||||
.numOfShowCols = 1,
|
.numOfShowCols = 1,
|
||||||
.pShowCols = {"name"}
|
.pShowCols = {"*"}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.showType = QUERY_NODE_SHOW_DATABASES_STMT,
|
.showType = QUERY_NODE_SHOW_DATABASES_STMT,
|
||||||
|
@ -131,7 +131,7 @@ static const SSysTableShowAdapter sysTableShowAdapter[] = {
|
||||||
.pDbName = TSDB_INFORMATION_SCHEMA_DB,
|
.pDbName = TSDB_INFORMATION_SCHEMA_DB,
|
||||||
.pTableName = TSDB_INS_TABLE_INDEXES,
|
.pTableName = TSDB_INS_TABLE_INDEXES,
|
||||||
.numOfShowCols = 1,
|
.numOfShowCols = 1,
|
||||||
.pShowCols = {"index_name"}
|
.pShowCols = {"*"}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.showType = QUERY_NODE_SHOW_STABLES_STMT,
|
.showType = QUERY_NODE_SHOW_STABLES_STMT,
|
||||||
|
|
|
@ -111,7 +111,7 @@ class TDTestCase:
|
||||||
tdSql.checkData(0, 0, 8)
|
tdSql.checkData(0, 0, 8)
|
||||||
tdSql.query("select count(*) from db.stb2")
|
tdSql.query("select count(*) from db.stb2")
|
||||||
tdSql.checkData(0, 0, 160)
|
tdSql.checkData(0, 0, 160)
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkData(2, 14, "us")
|
tdSql.checkData(2, 14, "us")
|
||||||
|
|
||||||
tdSql.execute("reset query cache")
|
tdSql.execute("reset query cache")
|
||||||
|
@ -128,7 +128,7 @@ class TDTestCase:
|
||||||
tdSql.checkData(0, 0, 8)
|
tdSql.checkData(0, 0, 8)
|
||||||
tdSql.query("select count(*) from db.stb3")
|
tdSql.query("select count(*) from db.stb3")
|
||||||
tdSql.checkData(0, 0, 160)
|
tdSql.checkData(0, 0, 160)
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkData(2, 14, "ns")
|
tdSql.checkData(2, 14, "ns")
|
||||||
|
|
||||||
tdSql.execute("reset query cache")
|
tdSql.execute("reset query cache")
|
||||||
|
|
|
@ -97,7 +97,7 @@ class TDTestCase:
|
||||||
|
|
||||||
os.system("%staosdump -i %s -T 1" % (binPath, self.tmpdir))
|
os.system("%staosdump -i %s -T 1" % (binPath, self.tmpdir))
|
||||||
|
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
|
|
||||||
tdSql.execute("use db")
|
tdSql.execute("use db")
|
||||||
|
|
|
@ -85,7 +85,7 @@ class TDTestCase:
|
||||||
|
|
||||||
os.system("%staosdump -i %s" % (binPath, self.tmpdir))
|
os.system("%staosdump -i %s" % (binPath, self.tmpdir))
|
||||||
|
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
|
|
||||||
tdSql.execute("use db")
|
tdSql.execute("use db")
|
||||||
|
|
|
@ -86,7 +86,7 @@ class TDTestCase:
|
||||||
|
|
||||||
os.system("%staosdump -i %s" % (binPath, self.tmpdir))
|
os.system("%staosdump -i %s" % (binPath, self.tmpdir))
|
||||||
|
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
|
|
||||||
tdSql.execute("use db")
|
tdSql.execute("use db")
|
||||||
|
|
|
@ -96,7 +96,7 @@ class TDTestCase:
|
||||||
|
|
||||||
os.system("%staosdump -i %s -T 1" % (binPath, self.tmpdir))
|
os.system("%staosdump -i %s -T 1" % (binPath, self.tmpdir))
|
||||||
|
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
|
|
||||||
tdSql.execute("use db")
|
tdSql.execute("use db")
|
||||||
|
|
|
@ -96,7 +96,7 @@ class TDTestCase:
|
||||||
|
|
||||||
os.system("%staosdump -i %s -T 1" % (binPath, self.tmpdir))
|
os.system("%staosdump -i %s -T 1" % (binPath, self.tmpdir))
|
||||||
|
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
|
|
||||||
tdSql.execute("use db")
|
tdSql.execute("use db")
|
||||||
|
|
|
@ -92,7 +92,7 @@ class TDTestCase:
|
||||||
|
|
||||||
os.system("%staosdump -i %s -T 1" % (binPath, self.tmpdir))
|
os.system("%staosdump -i %s -T 1" % (binPath, self.tmpdir))
|
||||||
|
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
|
|
||||||
tdSql.execute("use db")
|
tdSql.execute("use db")
|
||||||
|
|
|
@ -92,7 +92,7 @@ class TDTestCase:
|
||||||
|
|
||||||
os.system("%staosdump -i %s -g" % (binPath, self.tmpdir))
|
os.system("%staosdump -i %s -g" % (binPath, self.tmpdir))
|
||||||
|
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
|
|
||||||
tdSql.execute("use db")
|
tdSql.execute("use db")
|
||||||
|
|
|
@ -94,7 +94,7 @@ class TDTestCase:
|
||||||
|
|
||||||
os.system("%staosdump -i %s -T 1" % (binPath, self.tmpdir))
|
os.system("%staosdump -i %s -T 1" % (binPath, self.tmpdir))
|
||||||
|
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
|
|
||||||
tdSql.execute("use db")
|
tdSql.execute("use db")
|
||||||
|
|
|
@ -94,7 +94,7 @@ class TDTestCase:
|
||||||
|
|
||||||
os.system("%staosdump -i %s -T 1" % (binPath, self.tmpdir))
|
os.system("%staosdump -i %s -T 1" % (binPath, self.tmpdir))
|
||||||
|
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
|
|
||||||
tdSql.execute("use db")
|
tdSql.execute("use db")
|
||||||
|
|
|
@ -90,7 +90,7 @@ class TDTestCase:
|
||||||
|
|
||||||
os.system("%staosdump -i %s -T 1 -g" % (binPath, self.tmpdir))
|
os.system("%staosdump -i %s -T 1 -g" % (binPath, self.tmpdir))
|
||||||
|
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
|
|
||||||
tdSql.execute("use db")
|
tdSql.execute("use db")
|
||||||
|
|
|
@ -90,7 +90,7 @@ class TDTestCase:
|
||||||
|
|
||||||
os.system("%staosdump -i %s -T 1 -g" % (binPath, self.tmpdir))
|
os.system("%staosdump -i %s -T 1 -g" % (binPath, self.tmpdir))
|
||||||
|
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
|
|
||||||
tdSql.execute("use db")
|
tdSql.execute("use db")
|
||||||
|
|
|
@ -90,7 +90,7 @@ class TDTestCase:
|
||||||
|
|
||||||
os.system("%staosdump -i %s -T 1 -g" % (binPath, self.tmpdir))
|
os.system("%staosdump -i %s -T 1 -g" % (binPath, self.tmpdir))
|
||||||
|
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
|
|
||||||
tdSql.execute("use db")
|
tdSql.execute("use db")
|
||||||
|
|
|
@ -90,7 +90,7 @@ class TDTestCase:
|
||||||
|
|
||||||
os.system("%staosdump -i %s -T 1 -g" % (binPath, self.tmpdir))
|
os.system("%staosdump -i %s -T 1 -g" % (binPath, self.tmpdir))
|
||||||
|
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
|
|
||||||
tdSql.execute("use db")
|
tdSql.execute("use db")
|
||||||
|
|
|
@ -41,7 +41,7 @@ class TDTestCase:
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
tdSql.prepare()
|
tdSql.prepare()
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,15,0)
|
tdSql.checkData(0,15,0)
|
||||||
buildPath = self.getBuildPath()
|
buildPath = self.getBuildPath()
|
||||||
if (buildPath == ""):
|
if (buildPath == ""):
|
||||||
|
@ -68,7 +68,7 @@ class TDTestCase:
|
||||||
for i in range(5):
|
for i in range(5):
|
||||||
#switch lastRow to off and check
|
#switch lastRow to off and check
|
||||||
tdSql.execute('alter database db cachemodel 'none'')
|
tdSql.execute('alter database db cachemodel 'none'')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,15,0)
|
tdSql.checkData(0,15,0)
|
||||||
|
|
||||||
#run last_row(*) query 500 times
|
#run last_row(*) query 500 times
|
||||||
|
@ -80,7 +80,7 @@ class TDTestCase:
|
||||||
|
|
||||||
#switch lastRow to on and check
|
#switch lastRow to on and check
|
||||||
tdSql.execute('alter database db cachemodel 'last_row'')
|
tdSql.execute('alter database db cachemodel 'last_row'')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,15,1)
|
tdSql.checkData(0,15,1)
|
||||||
|
|
||||||
#run last_row(*) query 500 times
|
#run last_row(*) query 500 times
|
||||||
|
|
|
@ -49,7 +49,7 @@ class TDTestCase:
|
||||||
tdSql.error('create database db keep "3650"')
|
tdSql.error('create database db keep "3650"')
|
||||||
tdSql.error('create database db wal_fsync_period "3650"')
|
tdSql.error('create database db wal_fsync_period "3650"')
|
||||||
tdSql.execute('create database db precision "us"')
|
tdSql.execute('create database db precision "us"')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,16,'us')
|
tdSql.checkData(0,16,'us')
|
||||||
tdSql.execute('drop database if exists db')
|
tdSql.execute('drop database if exists db')
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ class TDTestCase:
|
||||||
tdSql.error('alter database db keep ,,60,')
|
tdSql.error('alter database db keep ,,60,')
|
||||||
tdSql.error('alter database db keep \t')
|
tdSql.error('alter database db keep \t')
|
||||||
tdSql.execute('alter database db keep \t50')
|
tdSql.execute('alter database db keep \t50')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,7,'50,50,50')
|
tdSql.checkData(0,7,'50,50,50')
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
|
|
|
@ -37,7 +37,7 @@ class TDTestCase:
|
||||||
if randomFlag != 131 and randomFlag != 135 and randomFlag != 143:
|
if randomFlag != 131 and randomFlag != 135 and randomFlag != 143:
|
||||||
tdSql.error("alter local %s %d" % (flag, randomFlag))
|
tdSql.error("alter local %s %d" % (flag, randomFlag))
|
||||||
|
|
||||||
tdSql.query("show dnodes")
|
tdSql.query("select * from information_schema.ins_dnodes")
|
||||||
dnodeId = tdSql.getData(0, 0)
|
dnodeId = tdSql.getData(0, 0)
|
||||||
|
|
||||||
for flag in flagList:
|
for flag in flagList:
|
||||||
|
|
|
@ -27,12 +27,12 @@ class TDTestCase:
|
||||||
tdLog.notice('running Keep Test, Community Version')
|
tdLog.notice('running Keep Test, Community Version')
|
||||||
tdLog.notice('running parameter test for keep during create')
|
tdLog.notice('running parameter test for keep during create')
|
||||||
#testing keep parameter during create
|
#testing keep parameter during create
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,7,'3650')
|
tdSql.checkData(0,7,'3650')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
|
|
||||||
tdSql.execute('create database db keep 100')
|
tdSql.execute('create database db keep 100')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,7,'100')
|
tdSql.checkData(0,7,'100')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ class TDTestCase:
|
||||||
tdLog.notice('running parameter test for keep during alter')
|
tdLog.notice('running parameter test for keep during alter')
|
||||||
|
|
||||||
tdSql.execute('alter database db keep 100')
|
tdSql.execute('alter database db keep 100')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,7,'100')
|
tdSql.checkData(0,7,'100')
|
||||||
|
|
||||||
tdSql.error('alter database db keep ')
|
tdSql.error('alter database db keep ')
|
||||||
|
@ -55,7 +55,7 @@ class TDTestCase:
|
||||||
tdSql.error('alter database db keep 10,20')
|
tdSql.error('alter database db keep 10,20')
|
||||||
tdSql.error('alter database db keep 10,20,30')
|
tdSql.error('alter database db keep 10,20,30')
|
||||||
tdSql.error('alter database db keep 20,30,40,50')
|
tdSql.error('alter database db keep 20,30,40,50')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,7,'100')
|
tdSql.checkData(0,7,'100')
|
||||||
|
|
||||||
def alterKeepEnterprise(self):
|
def alterKeepEnterprise(self):
|
||||||
|
@ -63,22 +63,22 @@ class TDTestCase:
|
||||||
#testing keep parameter during create
|
#testing keep parameter during create
|
||||||
tdLog.notice('running parameter test for keep during create')
|
tdLog.notice('running parameter test for keep during create')
|
||||||
|
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,7,'3650,3650,3650')
|
tdSql.checkData(0,7,'3650,3650,3650')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
|
|
||||||
tdSql.execute('create database db keep 100')
|
tdSql.execute('create database db keep 100')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,7,'100,100,100')
|
tdSql.checkData(0,7,'100,100,100')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
|
|
||||||
tdSql.execute('create database db keep 20, 30')
|
tdSql.execute('create database db keep 20, 30')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,7,'20,30,30')
|
tdSql.checkData(0,7,'20,30,30')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
|
|
||||||
tdSql.execute('create database db keep 30,40,50')
|
tdSql.execute('create database db keep 30,40,50')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,7,'30,40,50')
|
tdSql.checkData(0,7,'30,40,50')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
|
|
||||||
|
@ -95,15 +95,15 @@ class TDTestCase:
|
||||||
tdLog.notice('running parameter test for keep during alter')
|
tdLog.notice('running parameter test for keep during alter')
|
||||||
|
|
||||||
tdSql.execute('alter database db keep 10')
|
tdSql.execute('alter database db keep 10')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,7,'10,10,10')
|
tdSql.checkData(0,7,'10,10,10')
|
||||||
|
|
||||||
tdSql.execute('alter database db keep 20,30')
|
tdSql.execute('alter database db keep 20,30')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,7,'20,30,30')
|
tdSql.checkData(0,7,'20,30,30')
|
||||||
|
|
||||||
tdSql.execute('alter database db keep 100,200,300')
|
tdSql.execute('alter database db keep 100,200,300')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,7,'100,200,300')
|
tdSql.checkData(0,7,'100,200,300')
|
||||||
|
|
||||||
tdSql.error('alter database db keep ')
|
tdSql.error('alter database db keep ')
|
||||||
|
@ -113,7 +113,7 @@ class TDTestCase:
|
||||||
tdSql.error('alter database db keep 100,40,50')
|
tdSql.error('alter database db keep 100,40,50')
|
||||||
tdSql.error('alter database db keep 20,100,50')
|
tdSql.error('alter database db keep 20,100,50')
|
||||||
tdSql.error('alter database db keep 50,60,20')
|
tdSql.error('alter database db keep 50,60,20')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,7,'100,200,300')
|
tdSql.checkData(0,7,'100,200,300')
|
||||||
|
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ class TDTestCase:
|
||||||
#test case for TD-4459 and TD-4445
|
#test case for TD-4459 and TD-4445
|
||||||
tdLog.notice('testing keep will be altered changing from small to big')
|
tdLog.notice('testing keep will be altered changing from small to big')
|
||||||
tdSql.execute('alter database db keep 40,40,40')
|
tdSql.execute('alter database db keep 40,40,40')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,7,'40,40,40')
|
tdSql.checkData(0,7,'40,40,40')
|
||||||
tdSql.error('insert into tb values (now-60d, 10)')
|
tdSql.error('insert into tb values (now-60d, 10)')
|
||||||
tdSql.execute('insert into tb values (now-30d, 10)')
|
tdSql.execute('insert into tb values (now-30d, 10)')
|
||||||
|
@ -160,7 +160,7 @@ class TDTestCase:
|
||||||
rowNum += 1
|
rowNum += 1
|
||||||
tdSql.execute('alter database db keep 20,20,20')
|
tdSql.execute('alter database db keep 20,20,20')
|
||||||
tdSql.execute('alter database db keep 40,40,40')
|
tdSql.execute('alter database db keep 40,40,40')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,7,'40,40,40')
|
tdSql.checkData(0,7,'40,40,40')
|
||||||
tdSql.error('insert into tb values (now-60d, 10)')
|
tdSql.error('insert into tb values (now-60d, 10)')
|
||||||
tdSql.execute('insert into tb values (now-30d, 10)')
|
tdSql.execute('insert into tb values (now-30d, 10)')
|
||||||
|
@ -169,7 +169,7 @@ class TDTestCase:
|
||||||
|
|
||||||
tdLog.notice('testing keep will be altered changing from big to small')
|
tdLog.notice('testing keep will be altered changing from big to small')
|
||||||
tdSql.execute('alter database db keep 10,10,10')
|
tdSql.execute('alter database db keep 10,10,10')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,7,'10,10,10')
|
tdSql.checkData(0,7,'10,10,10')
|
||||||
tdSql.error('insert into tb values (now-15d, 10)')
|
tdSql.error('insert into tb values (now-15d, 10)')
|
||||||
tdSql.query('select * from tb')
|
tdSql.query('select * from tb')
|
||||||
|
|
|
@ -21,7 +21,7 @@ class TDTestCase:
|
||||||
# check default update value
|
# check default update value
|
||||||
sql = "create database if not exists db"
|
sql = "create database if not exists db"
|
||||||
tdSql.execute(sql)
|
tdSql.execute(sql)
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
tdSql.checkData(0,16,0)
|
tdSql.checkData(0,16,0)
|
||||||
|
|
||||||
|
@ -29,14 +29,14 @@ class TDTestCase:
|
||||||
|
|
||||||
# check update value
|
# check update value
|
||||||
tdSql.execute(sql)
|
tdSql.execute(sql)
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
tdSql.checkData(0,16,1)
|
tdSql.checkData(0,16,1)
|
||||||
|
|
||||||
|
|
||||||
sql = "alter database db update 0"
|
sql = "alter database db update 0"
|
||||||
tdSql.execute(sql)
|
tdSql.execute(sql)
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
tdSql.checkData(0,16,0)
|
tdSql.checkData(0,16,0)
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ class TDTestCase:
|
||||||
sql = "alter database db update 100"
|
sql = "alter database db update 100"
|
||||||
tdSql.error(sql)
|
tdSql.error(sql)
|
||||||
|
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
tdSql.checkData(0,16,0)
|
tdSql.checkData(0,16,0)
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ class TDTestCase:
|
||||||
|
|
||||||
tdSql.execute('create database db update 1')
|
tdSql.execute('create database db update 1')
|
||||||
|
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
tdSql.checkData(0,16,1)
|
tdSql.checkData(0,16,1)
|
||||||
|
|
||||||
|
|
|
@ -29,18 +29,18 @@ class TDTestCase:
|
||||||
tdSql.checkData(0, 0, "db")
|
tdSql.checkData(0, 0, "db")
|
||||||
|
|
||||||
tdSql.execute("alter database db comp 2")
|
tdSql.execute("alter database db comp 2")
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkData(0, 14, 2)
|
tdSql.checkData(0, 14, 2)
|
||||||
|
|
||||||
tdSql.execute("alter database db keep 365,365,365")
|
tdSql.execute("alter database db keep 365,365,365")
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkData(0, 7, "365,365,365")
|
tdSql.checkData(0, 7, "365,365,365")
|
||||||
|
|
||||||
tdSql.error("alter database db quorum 2")
|
tdSql.error("alter database db quorum 2")
|
||||||
|
|
||||||
|
|
||||||
tdSql.execute("alter database db blocks 100")
|
tdSql.execute("alter database db blocks 100")
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkData(0, 9, 100)
|
tdSql.checkData(0, 9, 100)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ class TDTestCase:
|
||||||
|
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
ret = tdSql.query('show dnodes')
|
ret = tdSql.query('select * from information_schema.ins_dnodes')
|
||||||
|
|
||||||
dnodeId = tdSql.getData(0, 0);
|
dnodeId = tdSql.getData(0, 0);
|
||||||
dnodeEndpoint = tdSql.getData(0, 1);
|
dnodeEndpoint = tdSql.getData(0, 1);
|
||||||
|
|
|
@ -30,7 +30,7 @@ class ClusterTestcase:
|
||||||
tdSql.init(ctest.conn.cursor(), False)
|
tdSql.init(ctest.conn.cursor(), False)
|
||||||
|
|
||||||
nodes.node1.stopTaosd()
|
nodes.node1.stopTaosd()
|
||||||
tdSql.query("show dnodes")
|
tdSql.query("select * from information_schema.ins_dnodes")
|
||||||
tdSql.checkRows(3)
|
tdSql.checkRows(3)
|
||||||
tdSql.checkData(0, 4, "offline")
|
tdSql.checkData(0, 4, "offline")
|
||||||
tdSql.checkData(1, 4, "ready")
|
tdSql.checkData(1, 4, "ready")
|
||||||
|
@ -43,7 +43,7 @@ class ClusterTestcase:
|
||||||
tdSql.checkData(2, 4, "ready")
|
tdSql.checkData(2, 4, "ready")
|
||||||
|
|
||||||
nodes.node2.stopTaosd()
|
nodes.node2.stopTaosd()
|
||||||
tdSql.query("show dnodes")
|
tdSql.query("select * from information_schema.ins_dnodes")
|
||||||
tdSql.checkRows(3)
|
tdSql.checkRows(3)
|
||||||
tdSql.checkData(0, 4, "ready")
|
tdSql.checkData(0, 4, "ready")
|
||||||
tdSql.checkData(1, 4, "offline")
|
tdSql.checkData(1, 4, "offline")
|
||||||
|
@ -56,7 +56,7 @@ class ClusterTestcase:
|
||||||
tdSql.checkData(2, 4, "ready")
|
tdSql.checkData(2, 4, "ready")
|
||||||
|
|
||||||
nodes.node3.stopTaosd()
|
nodes.node3.stopTaosd()
|
||||||
tdSql.query("show dnodes")
|
tdSql.query("select * from information_schema.ins_dnodes")
|
||||||
tdSql.checkRows(3)
|
tdSql.checkRows(3)
|
||||||
tdSql.checkData(0, 4, "ready")
|
tdSql.checkData(0, 4, "ready")
|
||||||
tdSql.checkData(1, 4, "ready")
|
tdSql.checkData(1, 4, "ready")
|
||||||
|
|
|
@ -33,7 +33,7 @@ class ClusterTestcase:
|
||||||
nodes.node3.stopTaosd()
|
nodes.node3.stopTaosd()
|
||||||
|
|
||||||
tdLog.sleep(10)
|
tdLog.sleep(10)
|
||||||
tdSql.query("show dnodes")
|
tdSql.query("select * from information_schema.ins_dnodes")
|
||||||
tdSql.checkRows(3)
|
tdSql.checkRows(3)
|
||||||
tdSql.checkData(2, 4, "offline")
|
tdSql.checkData(2, 4, "offline")
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ class ClusterTestcase:
|
||||||
tdSql.execute("drop database %s" % ctest.dbName)
|
tdSql.execute("drop database %s" % ctest.dbName)
|
||||||
|
|
||||||
nodes.node2.startTaosd()
|
nodes.node2.startTaosd()
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
||||||
tdSql.close()
|
tdSql.close()
|
||||||
|
|
|
@ -26,19 +26,19 @@ class ClusterTestcase:
|
||||||
ctest = ClusterTest(nodes.node1.hostName)
|
ctest = ClusterTest(nodes.node1.hostName)
|
||||||
tdSql.init(ctest.conn.cursor(), False)
|
tdSql.init(ctest.conn.cursor(), False)
|
||||||
|
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
count = tdSql.queryRows;
|
count = tdSql.queryRows;
|
||||||
|
|
||||||
nodes.stopAllTaosd()
|
nodes.stopAllTaosd()
|
||||||
nodes.node1.startTaosd()
|
nodes.node1.startTaosd()
|
||||||
tdSql.error("show databases")
|
tdSql.error("select * from information_schema.ins_databases")
|
||||||
|
|
||||||
nodes.node2.startTaosd()
|
nodes.node2.startTaosd()
|
||||||
tdSql.error("show databases")
|
tdSql.error("select * from information_schema.ins_databases")
|
||||||
|
|
||||||
nodes.node3.startTaosd()
|
nodes.node3.startTaosd()
|
||||||
tdLog.sleep(10)
|
tdLog.sleep(10)
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkRows(count)
|
tdSql.checkRows(count)
|
||||||
|
|
||||||
ct = ClusterTestcase()
|
ct = ClusterTestcase()
|
||||||
|
|
|
@ -29,19 +29,19 @@ class ClusterTestcase:
|
||||||
ctest.run()
|
ctest.run()
|
||||||
tdSql.init(ctest.conn.cursor(), False)
|
tdSql.init(ctest.conn.cursor(), False)
|
||||||
|
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
count = tdSql.queryRows;
|
count = tdSql.queryRows;
|
||||||
tdSql.execute("use %s" % ctest.dbName)
|
tdSql.execute("use %s" % ctest.dbName)
|
||||||
tdSql.execute("alter database %s replica 3" % ctest.dbName)
|
tdSql.execute("alter database %s replica 3" % ctest.dbName)
|
||||||
nodes.node2.stopTaosd()
|
nodes.node2.stopTaosd()
|
||||||
nodes.node3.stopTaosd()
|
nodes.node3.stopTaosd()
|
||||||
tdSql.error("show databases")
|
tdSql.error("select * from information_schema.ins_databases")
|
||||||
|
|
||||||
nodes.node2.startTaosd()
|
nodes.node2.startTaosd()
|
||||||
tdSql.error("show databases")
|
tdSql.error("select * from information_schema.ins_databases")
|
||||||
|
|
||||||
nodes.node3.startTaosd()
|
nodes.node3.startTaosd()
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkRows(count)
|
tdSql.checkRows(count)
|
||||||
|
|
||||||
ct = ClusterTestcase()
|
ct = ClusterTestcase()
|
||||||
|
|
|
@ -996,7 +996,7 @@ class StateMechine:
|
||||||
return # do nothing
|
return # do nothing
|
||||||
|
|
||||||
# this should show up in the server log, separating steps
|
# this should show up in the server log, separating steps
|
||||||
dbc.execute("show dnodes")
|
dbc.execute("select * from information_schema.ins_dnodes")
|
||||||
|
|
||||||
# Generic Checks, first based on the start state
|
# Generic Checks, first based on the start state
|
||||||
if not Config.getConfig().ignore_errors: # verify state, only if we are asked not to ignore certain errors.
|
if not Config.getConfig().ignore_errors: # verify state, only if we are asked not to ignore certain errors.
|
||||||
|
@ -2042,7 +2042,7 @@ class TaskRestartService(StateTransitionTask):
|
||||||
|
|
||||||
if Dice.throw(self.CHANCE_TO_RESTART_SERVICE) == 0: # 1 in N chance
|
if Dice.throw(self.CHANCE_TO_RESTART_SERVICE) == 0: # 1 in N chance
|
||||||
dbc = wt.getDbConn()
|
dbc = wt.getDbConn()
|
||||||
dbc.execute("show databases") # simple delay, align timing with other workers
|
dbc.execute("select * from information_schema.ins_databases") # simple delay, align timing with other workers
|
||||||
gSvcMgr.restart()
|
gSvcMgr.restart()
|
||||||
|
|
||||||
self._isRunning = False
|
self._isRunning = False
|
||||||
|
@ -2335,7 +2335,7 @@ class ClientManager:
|
||||||
# def _printLastNumbers(self): # to verify data durability
|
# def _printLastNumbers(self): # to verify data durability
|
||||||
# dbManager = DbManager()
|
# dbManager = DbManager()
|
||||||
# dbc = dbManager.getDbConn()
|
# dbc = dbManager.getDbConn()
|
||||||
# if dbc.query("show databases") <= 1: # no database (we have a default called "log")
|
# if dbc.query("select * from information_schema.ins_databases") <= 1: # no database (we have a default called "log")
|
||||||
# return
|
# return
|
||||||
# dbc.execute("use db")
|
# dbc.execute("use db")
|
||||||
# if dbc.query("show tables") == 0: # no tables
|
# if dbc.query("show tables") == 0: # no tables
|
||||||
|
|
|
@ -185,7 +185,7 @@ quorum 2
|
||||||
return ["exec " + self.getExecFile(), '-c', self.getCfgDir()] # used in subproce.Popen()
|
return ["exec " + self.getExecFile(), '-c', self.getCfgDir()] # used in subproce.Popen()
|
||||||
|
|
||||||
def _getDnodes(self, dbc):
|
def _getDnodes(self, dbc):
|
||||||
dbc.query("show dnodes")
|
dbc.query("select * from information_schema.ins_dnodes")
|
||||||
cols = dbc.getQueryResult() # id,end_point,vnodes,cores,status,role,create_time,offline reason
|
cols = dbc.getQueryResult() # id,end_point,vnodes,cores,status,role,create_time,offline reason
|
||||||
return {c[1]:c[4] for c in cols} # {'xxx:6030':'ready', 'xxx:6130':'ready'}
|
return {c[1]:c[4] for c in cols} # {'xxx:6030':'ready', 'xxx:6130':'ready'}
|
||||||
|
|
||||||
|
@ -768,7 +768,7 @@ class ServiceManagerThread:
|
||||||
def _verifyDnode(self, tInst: TdeInstance):
|
def _verifyDnode(self, tInst: TdeInstance):
|
||||||
dbc = DbConn.createNative(tInst.getDbTarget())
|
dbc = DbConn.createNative(tInst.getDbTarget())
|
||||||
dbc.open()
|
dbc.open()
|
||||||
dbc.query("show dnodes")
|
dbc.query("select * from information_schema.ins_dnodes")
|
||||||
# dbc.query("DESCRIBE {}.{}".format(dbName, self._stName))
|
# dbc.query("DESCRIBE {}.{}".format(dbName, self._stName))
|
||||||
cols = dbc.getQueryResult() # id,end_point,vnodes,cores,status,role,create_time,offline reason
|
cols = dbc.getQueryResult() # id,end_point,vnodes,cores,status,role,create_time,offline reason
|
||||||
# ret = {row[0]:row[1] for row in stCols if row[3]=='TAG'} # name:type
|
# ret = {row[0]:row[1] for row in stCols if row[3]=='TAG'} # name:type
|
||||||
|
|
|
@ -114,7 +114,7 @@ class DbConn:
|
||||||
|
|
||||||
def existsDatabase(self, dbName: str):
|
def existsDatabase(self, dbName: str):
|
||||||
''' Check if a certain database exists '''
|
''' Check if a certain database exists '''
|
||||||
self.query("show databases")
|
self.query("select * from information_schema.ins_databases")
|
||||||
dbs = [v[0] for v in self.getQueryResult()] # ref: https://stackoverflow.com/questions/643823/python-list-transformation
|
dbs = [v[0] for v in self.getQueryResult()] # ref: https://stackoverflow.com/questions/643823/python-list-transformation
|
||||||
# ret2 = dbName in dbs
|
# ret2 = dbName in dbs
|
||||||
# print("dbs = {}, str = {}, ret2={}, type2={}".format(dbs, dbName,ret2, type(dbName)))
|
# print("dbs = {}, str = {}, ret2={}, type2={}".format(dbs, dbName,ret2, type(dbName)))
|
||||||
|
@ -157,7 +157,7 @@ class DbConn:
|
||||||
def getResultCols(self):
|
def getResultCols(self):
|
||||||
raise RuntimeError("Unexpected execution, should be overriden")
|
raise RuntimeError("Unexpected execution, should be overriden")
|
||||||
|
|
||||||
# Sample: curl -u root:taosdata -d "show databases" localhost:6020/rest/sql
|
# Sample: curl -u root:taosdata -d "select * from information_schema.ins_databases" localhost:6020/rest/sql
|
||||||
|
|
||||||
|
|
||||||
class DbConnRest(DbConn):
|
class DbConnRest(DbConn):
|
||||||
|
|
|
@ -47,7 +47,7 @@ class TDTestCase:
|
||||||
tdLog.info('create database %s' % db_name)
|
tdLog.info('create database %s' % db_name)
|
||||||
tdSql.execute('create database %s' % db_name)
|
tdSql.execute('create database %s' % db_name)
|
||||||
|
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
tdSql.checkData(0, 0, db_name.lower())
|
tdSql.checkData(0, 0, db_name.lower())
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ class TDTestCase:
|
||||||
tdLog.info('create database %s' % db_name)
|
tdLog.info('create database %s' % db_name)
|
||||||
tdSql.execute('create database %s' % db_name)
|
tdSql.execute('create database %s' % db_name)
|
||||||
|
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkRows(2)
|
tdSql.checkRows(2)
|
||||||
tdSql.checkData(0, 0, db_name.lower())
|
tdSql.checkData(0, 0, db_name.lower())
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ class TDTestCase:
|
||||||
tdSql.execute('reset query cache')
|
tdSql.execute('reset query cache')
|
||||||
tdSql.execute('drop database if exists db')
|
tdSql.execute('drop database if exists db')
|
||||||
tdSql.execute('create database db precision "ns";')
|
tdSql.execute('create database db precision "ns";')
|
||||||
tdSql.query('show databases;')
|
tdSql.query('select * from information_schema.ins_databases;')
|
||||||
tdSql.checkData(0,16,'ns')
|
tdSql.checkData(0,16,'ns')
|
||||||
tdSql.execute('use db')
|
tdSql.execute('use db')
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ class TDTestCase:
|
||||||
tdSql.query("show variables")
|
tdSql.query("show variables")
|
||||||
tdSql.checkData(26, 1, -1)
|
tdSql.checkData(26, 1, -1)
|
||||||
|
|
||||||
tdSql.query("show dnodes")
|
tdSql.query("select * from information_schema.ins_dnodes")
|
||||||
index = tdSql.getData(0, 0)
|
index = tdSql.getData(0, 0)
|
||||||
|
|
||||||
tdDnodes.stop(index)
|
tdDnodes.stop(index)
|
||||||
|
@ -269,7 +269,7 @@ class TDTestCase:
|
||||||
tdSql.execute("create database if not exists db")
|
tdSql.execute("create database if not exists db")
|
||||||
tdSql.query("show variables")
|
tdSql.query("show variables")
|
||||||
tdSql.checkData(38, 1, 3650)
|
tdSql.checkData(38, 1, 3650)
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkData(0,7,"3650,3650,3650")
|
tdSql.checkData(0,7,"3650,3650,3650")
|
||||||
|
|
||||||
days = tdSql.getData(0, 6)
|
days = tdSql.getData(0, 6)
|
||||||
|
@ -288,12 +288,12 @@ class TDTestCase:
|
||||||
tdSql.error("alter database db keep0 36500")
|
tdSql.error("alter database db keep0 36500")
|
||||||
|
|
||||||
tdSql.execute("alter database db keep 36500")
|
tdSql.execute("alter database db keep 36500")
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkData(0, 7, "3650,3650,36500")
|
tdSql.checkData(0, 7, "3650,3650,36500")
|
||||||
tdSql.execute("drop database if exists db")
|
tdSql.execute("drop database if exists db")
|
||||||
|
|
||||||
tdSql.execute("create database if not exists db1")
|
tdSql.execute("create database if not exists db1")
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkData(0, 7, "3650,3650,3650")
|
tdSql.checkData(0, 7, "3650,3650,3650")
|
||||||
tdSql.query("show variables")
|
tdSql.query("show variables")
|
||||||
tdSql.checkData(38, 1, 3650)
|
tdSql.checkData(38, 1, 3650)
|
||||||
|
@ -311,7 +311,7 @@ class TDTestCase:
|
||||||
maxTablesPerVnode = 10
|
maxTablesPerVnode = 10
|
||||||
maxVgroupsPerDb = 100
|
maxVgroupsPerDb = 100
|
||||||
|
|
||||||
tdSql.query("show dnodes")
|
tdSql.query("select * from information_schema.ins_dnodes")
|
||||||
index = tdSql.getData(0, 0)
|
index = tdSql.getData(0, 0)
|
||||||
|
|
||||||
tdDnodes.stop(index)
|
tdDnodes.stop(index)
|
||||||
|
@ -334,7 +334,7 @@ class TDTestCase:
|
||||||
for i in range(100):
|
for i in range(100):
|
||||||
tdSql.execute(f"create table db.t1{i} using db.stb1 tags({i})")
|
tdSql.execute(f"create table db.t1{i} using db.stb1 tags({i})")
|
||||||
insert_sql += f" t1{i} values({1604298064000 + i*1000}, {i})"
|
insert_sql += f" t1{i} values({1604298064000 + i*1000}, {i})"
|
||||||
tdSql.query("show dnodes")
|
tdSql.query("select * from information_schema.ins_dnodes")
|
||||||
vnode_count = tdSql.getData(0, 2)
|
vnode_count = tdSql.getData(0, 2)
|
||||||
if vnode_count <= 1:
|
if vnode_count <= 1:
|
||||||
tdLog.exit("vnode is less than 2")
|
tdLog.exit("vnode is less than 2")
|
||||||
|
@ -443,7 +443,7 @@ class TDTestCase:
|
||||||
# f50, f51, f52, f53 = tdSql.getData(0,1), tdSql.getData(0,2), tdSql.getData(0,3), tdSql.getData(0,4)
|
# f50, f51, f52, f53 = tdSql.getData(0,1), tdSql.getData(0,2), tdSql.getData(0,3), tdSql.getData(0,4)
|
||||||
|
|
||||||
# 关闭服务并获取未开启压缩情况下的数据容量
|
# 关闭服务并获取未开启压缩情况下的数据容量
|
||||||
tdSql.query("show dnodes")
|
tdSql.query("select * from information_schema.ins_dnodes")
|
||||||
index = tdSql.getData(0, 0)
|
index = tdSql.getData(0, 0)
|
||||||
tdDnodes.stop(index)
|
tdDnodes.stop(index)
|
||||||
|
|
||||||
|
|
|
@ -174,9 +174,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -33,7 +33,7 @@ class TDTestCase:
|
||||||
tdLog.info("\n\n----------step1 : drop db and create db----------\n")
|
tdLog.info("\n\n----------step1 : drop db and create db----------\n")
|
||||||
tdSql.execute('''drop database if exists db ;''')
|
tdSql.execute('''drop database if exists db ;''')
|
||||||
tdSql.execute('''create database db ;''')
|
tdSql.execute('''create database db ;''')
|
||||||
sql = '''show databases;'''
|
sql = '''select * from information_schema.ins_databases;'''
|
||||||
tdSql.query(sql)
|
tdSql.query(sql)
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ class TwoClients:
|
||||||
for i in range(10):
|
for i in range(10):
|
||||||
os.system("taosdemo -f manualTest/TD-5114/insertDataDb3Replica2.json -y ")
|
os.system("taosdemo -f manualTest/TD-5114/insertDataDb3Replica2.json -y ")
|
||||||
# # check data correct
|
# # check data correct
|
||||||
tdSql.execute("show databases")
|
tdSql.execute("select * from information_schema.ins_databases")
|
||||||
tdSql.execute("use db3")
|
tdSql.execute("use db3")
|
||||||
tdSql.query("select count (tbname) from stb0")
|
tdSql.query("select count (tbname) from stb0")
|
||||||
tdSql.checkData(0, 0, 20000)
|
tdSql.checkData(0, 0, 20000)
|
||||||
|
@ -78,7 +78,7 @@ class TwoClients:
|
||||||
# % (j, self.ts + i*1000, i + 1, i + 1, i + 1, i + 1, i + 1, i + 0.1, i + 0.1, i % 2, i + 1, i + 1, i + 1, i + 1, i + 1, i + 1))
|
# % (j, self.ts + i*1000, i + 1, i + 1, i + 1, i + 1, i + 1, i + 0.1, i + 0.1, i % 2, i + 1, i + 1, i + 1, i + 1, i + 1, i + 1))
|
||||||
|
|
||||||
# # check data correct
|
# # check data correct
|
||||||
# tdSql.execute("show databases")
|
# tdSql.execute("select * from information_schema.ins_databases")
|
||||||
# tdSql.execute("use db3")
|
# tdSql.execute("use db3")
|
||||||
# tdSql.query("select count (tbname) from test")
|
# tdSql.query("select count (tbname) from test")
|
||||||
# tdSql.checkData(0, 0, 200)
|
# tdSql.checkData(0, 0, 200)
|
||||||
|
|
|
@ -51,7 +51,7 @@ class TDTestCase:
|
||||||
|
|
||||||
#alter cache block to 3, then check alter
|
#alter cache block to 3, then check alter
|
||||||
tdSql.execute('alter database db blocks 3')
|
tdSql.execute('alter database db blocks 3')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,9,3)
|
tdSql.checkData(0,9,3)
|
||||||
|
|
||||||
#run taosdemo to occupy all cache, need to manually check memory consumption
|
#run taosdemo to occupy all cache, need to manually check memory consumption
|
||||||
|
@ -60,7 +60,7 @@ class TDTestCase:
|
||||||
|
|
||||||
#alter cache block to 8, then check alter
|
#alter cache block to 8, then check alter
|
||||||
tdSql.execute('alter database db blocks 8')
|
tdSql.execute('alter database db blocks 8')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,9,8)
|
tdSql.checkData(0,9,8)
|
||||||
|
|
||||||
#run taosdemo to occupy all cache, need to manually check memory consumption
|
#run taosdemo to occupy all cache, need to manually check memory consumption
|
||||||
|
|
|
@ -71,7 +71,7 @@ class TDTestCase:
|
||||||
|
|
||||||
#comp is at 14
|
#comp is at 14
|
||||||
#check disk usage when comp=2
|
#check disk usage when comp=2
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.execute('alter database db blocks 3') # minimize the data in cache
|
tdSql.execute('alter database db blocks 3') # minimize the data in cache
|
||||||
tdSql.checkData(0,14,2)
|
tdSql.checkData(0,14,2)
|
||||||
os.system("%staosdemo -f tools/taosdemoAllTest/manual_block1_comp.json" % binPath)
|
os.system("%staosdemo -f tools/taosdemoAllTest/manual_block1_comp.json" % binPath)
|
||||||
|
@ -86,10 +86,10 @@ class TDTestCase:
|
||||||
|
|
||||||
#check disk usage when comp=0
|
#check disk usage when comp=0
|
||||||
tdSql.prepare()
|
tdSql.prepare()
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,14,2)
|
tdSql.checkData(0,14,2)
|
||||||
tdSql.execute('alter database db comp 0')
|
tdSql.execute('alter database db comp 0')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,14,0)
|
tdSql.checkData(0,14,0)
|
||||||
os.system("%staosdemo -f tools/taosdemoAllTest/manual_block1_comp.json" % binPath)
|
os.system("%staosdemo -f tools/taosdemoAllTest/manual_block1_comp.json" % binPath)
|
||||||
print("default location is at /home/bryan/Documents/Github/TDengine/sim/dnode1/data")
|
print("default location is at /home/bryan/Documents/Github/TDengine/sim/dnode1/data")
|
||||||
|
@ -103,10 +103,10 @@ class TDTestCase:
|
||||||
|
|
||||||
#check disk usage when comp=1
|
#check disk usage when comp=1
|
||||||
tdSql.prepare()
|
tdSql.prepare()
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,14,2)
|
tdSql.checkData(0,14,2)
|
||||||
tdSql.execute('alter database db comp 1')
|
tdSql.execute('alter database db comp 1')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdSql.checkData(0,14,1)
|
tdSql.checkData(0,14,1)
|
||||||
os.system("%staosdemo -f tools/taosdemoAllTest/manual_block1_comp.json" % binPath)
|
os.system("%staosdemo -f tools/taosdemoAllTest/manual_block1_comp.json" % binPath)
|
||||||
print("default location is at /home/bryan/Documents/Github/TDengine/sim/dnode1/data")
|
print("default location is at /home/bryan/Documents/Github/TDengine/sim/dnode1/data")
|
||||||
|
|
|
@ -224,7 +224,7 @@ class TDTestCase:
|
||||||
self.inserttable(file_create_table)
|
self.inserttable(file_create_table)
|
||||||
|
|
||||||
tdLog.printNoPrefix("==========step2:check database and stable records")
|
tdLog.printNoPrefix("==========step2:check database and stable records")
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkData(0, 2, 2000)
|
tdSql.checkData(0, 2, 2000)
|
||||||
tdSql.execute("use db")
|
tdSql.execute("use db")
|
||||||
tdSql.query("show stables")
|
tdSql.query("show stables")
|
||||||
|
|
|
@ -235,7 +235,7 @@ class TDTestCase:
|
||||||
self.sqlsquery()
|
self.sqlsquery()
|
||||||
|
|
||||||
# after wal and sync, check again
|
# after wal and sync, check again
|
||||||
tdSql.query("show dnodes")
|
tdSql.query("select * from information_schema.ins_dnodes")
|
||||||
index = tdSql.getData(0, 0)
|
index = tdSql.getData(0, 0)
|
||||||
tdDnodes.stop(index)
|
tdDnodes.stop(index)
|
||||||
tdDnodes.start(index)
|
tdDnodes.start(index)
|
||||||
|
|
|
@ -184,7 +184,7 @@ class TDTestCase:
|
||||||
self.queryjointable()
|
self.queryjointable()
|
||||||
|
|
||||||
# after wal and sync, check again
|
# after wal and sync, check again
|
||||||
tdSql.query("show dnodes")
|
tdSql.query("select * from information_schema.ins_dnodes")
|
||||||
index = tdSql.getData(0, 0)
|
index = tdSql.getData(0, 0)
|
||||||
tdDnodes.stop(index)
|
tdDnodes.stop(index)
|
||||||
tdDnodes.start(index)
|
tdDnodes.start(index)
|
||||||
|
|
|
@ -54,7 +54,7 @@ class TDTestCase:
|
||||||
self.querysqls()
|
self.querysqls()
|
||||||
|
|
||||||
tdLog.printNoPrefix("==========step3:after wal,check again")
|
tdLog.printNoPrefix("==========step3:after wal,check again")
|
||||||
tdSql.query("show dnodes")
|
tdSql.query("select * from information_schema.ins_dnodes")
|
||||||
index = tdSql.getData(0, 0)
|
index = tdSql.getData(0, 0)
|
||||||
tdDnodes.stop(index)
|
tdDnodes.stop(index)
|
||||||
tdDnodes.start(index)
|
tdDnodes.start(index)
|
||||||
|
|
|
@ -155,7 +155,7 @@ class TDTestCase:
|
||||||
self.inertnow()
|
self.inertnow()
|
||||||
self.querynow()
|
self.querynow()
|
||||||
|
|
||||||
tdSql.query("show dnodes")
|
tdSql.query("select * from information_schema.ins_dnodes")
|
||||||
index = tdSql.getData(0, 0)
|
index = tdSql.getData(0, 0)
|
||||||
tdDnodes.stop(index)
|
tdDnodes.stop(index)
|
||||||
tdDnodes.start(index)
|
tdDnodes.start(index)
|
||||||
|
|
|
@ -50,14 +50,14 @@ class TDTestCase:
|
||||||
tdSql.checkData(0, 0, "st_vplu")
|
tdSql.checkData(0, 0, "st_vplu")
|
||||||
|
|
||||||
tdSql.execute("drop database db")
|
tdSql.execute("drop database db")
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
tdSql.checkData(0, 0, "db_vplu")
|
tdSql.checkData(0, 0, "db_vplu")
|
||||||
|
|
||||||
tdDnodes.stopAll()
|
tdDnodes.stopAll()
|
||||||
tdDnodes.start(1)
|
tdDnodes.start(1)
|
||||||
|
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkRows(1)
|
tdSql.checkRows(1)
|
||||||
tdSql.checkData(0, 0, "db_vplu")
|
tdSql.checkData(0, 0, "db_vplu")
|
||||||
|
|
||||||
|
|
|
@ -75,10 +75,10 @@ class TDTestCase():
|
||||||
|
|
||||||
# test with no bind databases
|
# test with no bind databases
|
||||||
|
|
||||||
sqls = ["show databases;",
|
sqls = ["select * from information_schema.ins_databases;",
|
||||||
"use test",
|
"use test",
|
||||||
"show tables;",
|
"show tables;",
|
||||||
"show dnodes;",
|
"select * from information_schema.ins_dnodes;",
|
||||||
"show vgroups;",
|
"show vgroups;",
|
||||||
"create database db;",
|
"create database db;",
|
||||||
"drop database db;",
|
"drop database db;",
|
||||||
|
|
|
@ -60,10 +60,10 @@ class TDTestCase():
|
||||||
|
|
||||||
# test with no bind databases
|
# test with no bind databases
|
||||||
|
|
||||||
sqls = ["show databases;",
|
sqls = ["select * from information_schema.ins_databases;",
|
||||||
"use test",
|
"use test",
|
||||||
"show tables;",
|
"show tables;",
|
||||||
"show dnodes;",
|
"select * from information_schema.ins_dnodes;",
|
||||||
"show vgroups;",
|
"show vgroups;",
|
||||||
"create database db;",
|
"create database db;",
|
||||||
"drop database db;",
|
"drop database db;",
|
||||||
|
|
|
@ -14,7 +14,7 @@ class TDTestCase:
|
||||||
#for i in range(100):
|
#for i in range(100):
|
||||||
tdSql.prepare()
|
tdSql.prepare()
|
||||||
dbname = tdCom.getLongName(10, "letters")
|
dbname = tdCom.getLongName(10, "letters")
|
||||||
tdSql.execute('show databases')
|
tdSql.execute('select * from information_schema.ins_databases')
|
||||||
tdSql.execute('drop database if exists ttxkbrzmpo')
|
tdSql.execute('drop database if exists ttxkbrzmpo')
|
||||||
tdSql.execute('create database if not exists ttxkbrzmpo vgroups 1')
|
tdSql.execute('create database if not exists ttxkbrzmpo vgroups 1')
|
||||||
tdSql.execute('use ttxkbrzmpo')
|
tdSql.execute('use ttxkbrzmpo')
|
||||||
|
|
|
@ -104,9 +104,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -34,8 +34,8 @@ class TDTestCase:
|
||||||
tdLog.info('=============== step6')
|
tdLog.info('=============== step6')
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
# convert end
|
# convert end
|
||||||
|
|
|
@ -1311,9 +1311,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -1855,9 +1855,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -2283,9 +2283,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -2731,9 +2731,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -2055,9 +2055,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('sql drop database db')
|
tdLog.info('sql drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -561,9 +561,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -565,9 +565,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -776,9 +776,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -560,9 +560,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -770,9 +770,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -802,9 +802,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -924,9 +924,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -176,9 +176,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -2300,9 +2300,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -1697,9 +1697,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -561,9 +561,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -351,9 +351,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -561,9 +561,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -560,9 +560,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -768,9 +768,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -804,9 +804,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -875,9 +875,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -561,9 +561,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -561,9 +561,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -561,9 +561,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -562,9 +562,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -561,9 +561,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -561,9 +561,9 @@ class TDTestCase:
|
||||||
# TSIM: sql drop database $db
|
# TSIM: sql drop database $db
|
||||||
tdLog.info('drop database db')
|
tdLog.info('drop database db')
|
||||||
tdSql.execute('drop database db')
|
tdSql.execute('drop database db')
|
||||||
# TSIM: sql show databases
|
# TSIM: sql select * from information_schema.ins_databases
|
||||||
tdLog.info('show databases')
|
tdLog.info('select * from information_schema.ins_databases')
|
||||||
tdSql.query('show databases')
|
tdSql.query('select * from information_schema.ins_databases')
|
||||||
# TSIM: if $rows != 0 then
|
# TSIM: if $rows != 0 then
|
||||||
tdLog.info('tdSql.checkRow(0)')
|
tdLog.info('tdSql.checkRow(0)')
|
||||||
tdSql.checkRows(0)
|
tdSql.checkRows(0)
|
||||||
|
|
|
@ -53,7 +53,7 @@ class TDTestCase:
|
||||||
os.system("%staosdemo -N -y -t %d -n %d" %
|
os.system("%staosdemo -N -y -t %d -n %d" %
|
||||||
(binPath, self.numberOfTables, self.numberOfRecords))
|
(binPath, self.numberOfTables, self.numberOfRecords))
|
||||||
|
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
for i in range(18):
|
for i in range(18):
|
||||||
print(tdSql.getData(0, i) )
|
print(tdSql.getData(0, i) )
|
||||||
tdSql.checkData(0, 2, self.numberOfTables)
|
tdSql.checkData(0, 2, self.numberOfTables)
|
||||||
|
|
|
@ -99,14 +99,14 @@ class TDTestCase:
|
||||||
|
|
||||||
tdSql.execute("drop database db")
|
tdSql.execute("drop database db")
|
||||||
tdSql.execute("drop database db1")
|
tdSql.execute("drop database db1")
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkRows(2)
|
tdSql.checkRows(2)
|
||||||
|
|
||||||
os.system("%s -i ./taosdumptest/tmp1" % binPath)
|
os.system("%s -i ./taosdumptest/tmp1" % binPath)
|
||||||
os.system("%s -i ./taosdumptest/tmp2" % binPath)
|
os.system("%s -i ./taosdumptest/tmp2" % binPath)
|
||||||
|
|
||||||
tdSql.execute("use db")
|
tdSql.execute("use db")
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkRows(4)
|
tdSql.checkRows(4)
|
||||||
dbresult = tdSql.queryResult
|
dbresult = tdSql.queryResult
|
||||||
# 6--duration,7--keep0,keep1,keep
|
# 6--duration,7--keep0,keep1,keep
|
||||||
|
|
|
@ -81,12 +81,12 @@ class TDTestCase:
|
||||||
binPath)
|
binPath)
|
||||||
|
|
||||||
tdSql.execute("drop database db")
|
tdSql.execute("drop database db")
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkRows(2)
|
tdSql.checkRows(2)
|
||||||
|
|
||||||
os.system("%s -i ./taosdumptest/tmp" % binPath)
|
os.system("%s -i ./taosdumptest/tmp" % binPath)
|
||||||
|
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkRows(3)
|
tdSql.checkRows(3)
|
||||||
tdSql.checkData(2, 0, 'db')
|
tdSql.checkData(2, 0, 'db')
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ 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")
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.checkRows(3)
|
tdSql.checkRows(3)
|
||||||
|
|
||||||
os.system("%s -i ./taosdumptest/tmp -y" % binPath)
|
os.system("%s -i ./taosdumptest/tmp -y" % binPath)
|
||||||
|
|
|
@ -131,7 +131,7 @@ class TwoClients:
|
||||||
|
|
||||||
|
|
||||||
# check data correct
|
# check data correct
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.execute("use db2")
|
tdSql.execute("use db2")
|
||||||
tdSql.query("select count (tbname) from stb0")
|
tdSql.query("select count (tbname) from stb0")
|
||||||
tdSql.checkData(0, 0, 1)
|
tdSql.checkData(0, 0, 1)
|
||||||
|
|
|
@ -142,7 +142,7 @@ class TwoClients:
|
||||||
tdSql.init(cur2, True)
|
tdSql.init(cur2, True)
|
||||||
|
|
||||||
# check data correct
|
# check data correct
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
tdSql.execute("use db2")
|
tdSql.execute("use db2")
|
||||||
tdSql.query("select count (tbname) from stb0")
|
tdSql.query("select count (tbname) from stb0")
|
||||||
tdSql.checkData(0, 0, 1)
|
tdSql.checkData(0, 0, 1)
|
||||||
|
|
|
@ -72,7 +72,7 @@ class ConfigureyCluster:
|
||||||
tdSql.init(conn.cursor())
|
tdSql.init(conn.cursor())
|
||||||
count=0
|
count=0
|
||||||
while count < 5:
|
while count < 5:
|
||||||
tdSql.query("show dnodes")
|
tdSql.query("select * from information_schema.ins_dnodes")
|
||||||
# tdLog.debug(tdSql.queryResult)
|
# tdLog.debug(tdSql.queryResult)
|
||||||
status=0
|
status=0
|
||||||
for i in range(self.dnodeNums):
|
for i in range(self.dnodeNums):
|
||||||
|
|
|
@ -106,7 +106,7 @@ class TwoClients:
|
||||||
tdSql.init(cur2, True)
|
tdSql.init(cur2, True)
|
||||||
|
|
||||||
# use new wal file to start up tasod
|
# use new wal file to start up tasod
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
for i in range(tdSql.queryRows):
|
for i in range(tdSql.queryRows):
|
||||||
if tdSql.queryResult[i][0]=="db2":
|
if tdSql.queryResult[i][0]=="db2":
|
||||||
assert tdSql.queryResult[i][4]==1 , "replica is wrong"
|
assert tdSql.queryResult[i][4]==1 , "replica is wrong"
|
||||||
|
|
|
@ -116,7 +116,7 @@ class TwoClients:
|
||||||
tdSql.init(cur2, True)
|
tdSql.init(cur2, True)
|
||||||
|
|
||||||
# use new wal file to start up tasod
|
# use new wal file to start up tasod
|
||||||
tdSql.query("show databases")
|
tdSql.query("select * from information_schema.ins_databases")
|
||||||
for i in range(tdSql.queryRows):
|
for i in range(tdSql.queryRows):
|
||||||
if tdSql.queryResult[i][0]=="db2":
|
if tdSql.queryResult[i][0]=="db2":
|
||||||
assert tdSql.queryResult[i][4]==2 , "replica is wrong"
|
assert tdSql.queryResult[i][4]==2 , "replica is wrong"
|
||||||
|
|
|
@ -33,7 +33,7 @@ print =============== step2: create qnode snode on dnode 2
|
||||||
sql create qnode on dnode 2
|
sql create qnode on dnode 2
|
||||||
sql create snode on dnode 2
|
sql create snode on dnode 2
|
||||||
|
|
||||||
sql show qnodes
|
sql select * from information_schema.ins_qnodes
|
||||||
if $rows != 1 then
|
if $rows != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
@ -57,7 +57,7 @@ if $data00 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql show qnodes
|
sql select * from information_schema.ins_qnodes
|
||||||
if $rows != 0 then
|
if $rows != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -289,7 +289,7 @@ if $rows != 1 then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
#sql drop database $db
|
#sql drop database $db
|
||||||
#sql show databases
|
#sql select * from information_schema.ins_databases
|
||||||
#if $rows != 0 then
|
#if $rows != 0 then
|
||||||
# return -1
|
# return -1
|
||||||
#endi
|
#endi
|
||||||
|
|
|
@ -262,7 +262,7 @@ sql_error create database $db comp -1
|
||||||
sql_error create database $db comp 3
|
sql_error create database $db comp 3
|
||||||
|
|
||||||
sql_error drop database $db
|
sql_error drop database $db
|
||||||
sql show databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -240,7 +240,7 @@ $mt2 = mt2
|
||||||
print chinese_char_in_metrics test passed
|
print chinese_char_in_metrics test passed
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -180,7 +180,7 @@ sql_error create table $tbname65 (ts timestamp, col int)
|
||||||
print table_already_exists test passed
|
print table_already_exists test passed
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -75,7 +75,7 @@ endi
|
||||||
|
|
||||||
### select distinct
|
### select distinct
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -431,7 +431,7 @@ endi
|
||||||
|
|
||||||
print =============== clear
|
print =============== clear
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 0 then
|
if $rows != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -844,7 +844,7 @@ endi
|
||||||
|
|
||||||
#print =============== clear
|
#print =============== clear
|
||||||
#sql drop database $db
|
#sql drop database $db
|
||||||
#sql show databases
|
#sql select * from information_schema.ins_databases
|
||||||
#if $rows != 0 then
|
#if $rows != 0 then
|
||||||
# return -1
|
# return -1
|
||||||
#endi
|
#endi
|
||||||
|
|
|
@ -221,7 +221,7 @@ if $rows != 1 then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
#sql drop database $db
|
#sql drop database $db
|
||||||
#sql show databases
|
#sql select * from information_schema.ins_databases
|
||||||
#if $rows != 0 then
|
#if $rows != 0 then
|
||||||
# return -1
|
# return -1
|
||||||
#endi
|
#endi
|
||||||
|
|
|
@ -305,7 +305,7 @@ endi
|
||||||
# case: query_with_wildcard
|
# case: query_with_wildcard
|
||||||
# print =============== clear
|
# print =============== clear
|
||||||
# sql drop database $db
|
# sql drop database $db
|
||||||
# sql show databases
|
# sql select * from information_schema.ins_databases
|
||||||
# if $rows != 0 then
|
# if $rows != 0 then
|
||||||
# return -1
|
# return -1
|
||||||
# endi
|
# endi
|
||||||
|
|
|
@ -100,7 +100,7 @@ sql select count(*) from $mt interval(100000000b) sliding(100000000b)
|
||||||
|
|
||||||
print =============== clear
|
print =============== clear
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -71,7 +71,7 @@ if $rows != $tbNum then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -50,7 +50,7 @@ endi
|
||||||
sql_error select distinct t1, t2 from &stb
|
sql_error select distinct t1, t2 from &stb
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -84,7 +84,7 @@ endi
|
||||||
print create/alter/drop stable test passed
|
print create/alter/drop stable test passed
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -99,7 +99,7 @@ if $data01 != 4 then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql select * from information_schema.ins_databases
|
||||||
if $rows != 2 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue