diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index cebb8d9b92..e7eff7588e 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -68,49 +68,49 @@ static const SSysTableShowAdapter sysTableShowAdapter[] = { .pDbName = TSDB_INFORMATION_SCHEMA_DB, .pTableName = TSDB_INS_TABLE_DNODES, .numOfShowCols = 1, - .pShowCols = {"endpoint"} + .pShowCols = {"*"} }, { .showType = QUERY_NODE_SHOW_MNODES_STMT, .pDbName = TSDB_INFORMATION_SCHEMA_DB, .pTableName = TSDB_INS_TABLE_MNODES, .numOfShowCols = 1, - .pShowCols = {"endpoint"} + .pShowCols = {"*"} }, { .showType = QUERY_NODE_SHOW_MODULES_STMT, .pDbName = TSDB_INFORMATION_SCHEMA_DB, .pTableName = TSDB_INS_TABLE_MODULES, .numOfShowCols = 1, - .pShowCols = {"endpoint"} + .pShowCols = {"*"} }, { .showType = QUERY_NODE_SHOW_QNODES_STMT, .pDbName = TSDB_INFORMATION_SCHEMA_DB, .pTableName = TSDB_INS_TABLE_QNODES, .numOfShowCols = 1, - .pShowCols = {"endpoint"} + .pShowCols = {"*"} }, { .showType = QUERY_NODE_SHOW_SNODES_STMT, .pDbName = TSDB_INFORMATION_SCHEMA_DB, .pTableName = TSDB_INS_TABLE_SNODES, .numOfShowCols = 1, - .pShowCols = {"endpoint"} + .pShowCols = {"*"} }, { .showType = QUERY_NODE_SHOW_BNODES_STMT, .pDbName = TSDB_INFORMATION_SCHEMA_DB, .pTableName = TSDB_INS_TABLE_BNODES, .numOfShowCols = 1, - .pShowCols = {"endpoint"} + .pShowCols = {"*"} }, { .showType = QUERY_NODE_SHOW_CLUSTER_STMT, .pDbName = TSDB_INFORMATION_SCHEMA_DB, .pTableName = TSDB_INS_TABLE_CLUSTER, .numOfShowCols = 1, - .pShowCols = {"name"} + .pShowCols = {"*"} }, { .showType = QUERY_NODE_SHOW_DATABASES_STMT, @@ -131,7 +131,7 @@ static const SSysTableShowAdapter sysTableShowAdapter[] = { .pDbName = TSDB_INFORMATION_SCHEMA_DB, .pTableName = TSDB_INS_TABLE_INDEXES, .numOfShowCols = 1, - .pShowCols = {"index_name"} + .pShowCols = {"*"} }, { .showType = QUERY_NODE_SHOW_STABLES_STMT, diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py b/tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py index 734f7da974..8509136a34 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py @@ -111,7 +111,7 @@ class TDTestCase: tdSql.checkData(0, 0, 8) tdSql.query("select count(*) from db.stb2") tdSql.checkData(0, 0, 160) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkData(2, 14, "us") tdSql.execute("reset query cache") @@ -128,7 +128,7 @@ class TDTestCase: tdSql.checkData(0, 0, 8) tdSql.query("select count(*) from db.stb3") tdSql.checkData(0, 0, 160) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkData(2, 14, "ns") tdSql.execute("reset query cache") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBigInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBigInt.py index 82c17a459b..75885edf9f 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBigInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBigInt.py @@ -97,7 +97,7 @@ class TDTestCase: 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.execute("use db") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBinary.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBinary.py index 4909eb3762..41d4ba128d 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBinary.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBinary.py @@ -85,7 +85,7 @@ class TDTestCase: os.system("%staosdump -i %s" % (binPath, self.tmpdir)) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(1) tdSql.execute("use db") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBool.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBool.py index 138f7ba81c..043fb49af3 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBool.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBool.py @@ -86,7 +86,7 @@ class TDTestCase: os.system("%staosdump -i %s" % (binPath, self.tmpdir)) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(1) tdSql.execute("use db") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeDouble.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeDouble.py index 24ebb0fa77..1eaa2bbfff 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeDouble.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeDouble.py @@ -96,7 +96,7 @@ class TDTestCase: 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.execute("use db") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeFloat.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeFloat.py index 2ce42bb771..4373aa5669 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeFloat.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeFloat.py @@ -96,7 +96,7 @@ class TDTestCase: 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.execute("use db") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeInt.py index b6a24a6eee..45009a716a 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeInt.py @@ -92,7 +92,7 @@ class TDTestCase: 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.execute("use db") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeJson.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeJson.py index cf0c7f4ac5..d1c4313c40 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeJson.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeJson.py @@ -92,7 +92,7 @@ class TDTestCase: 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.execute("use db") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeSmallInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeSmallInt.py index 2fc1ffb75e..941de25683 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeSmallInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeSmallInt.py @@ -94,7 +94,7 @@ class TDTestCase: 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.execute("use db") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeTinyInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeTinyInt.py index dfc18fcd01..e5392d38fe 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeTinyInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeTinyInt.py @@ -94,7 +94,7 @@ class TDTestCase: 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.execute("use db") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedBigInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedBigInt.py index 1a6e9a69d9..dd8dd5d76d 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedBigInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedBigInt.py @@ -90,7 +90,7 @@ class TDTestCase: 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.execute("use db") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedInt.py index e71650bc8a..eacd1bb7dd 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedInt.py @@ -90,7 +90,7 @@ class TDTestCase: 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.execute("use db") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedSmallInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedSmallInt.py index d05a397c36..ea362ad2b4 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedSmallInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedSmallInt.py @@ -90,7 +90,7 @@ class TDTestCase: 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.execute("use db") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedTinyInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedTinyInt.py index 9995d3812b..a3ffc13d62 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedTinyInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedTinyInt.py @@ -90,7 +90,7 @@ class TDTestCase: 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.execute("use db") diff --git a/tests/pytest/alter/alter_cacheLastRow.py b/tests/pytest/alter/alter_cacheLastRow.py index 3152e46af1..30fd9c8884 100644 --- a/tests/pytest/alter/alter_cacheLastRow.py +++ b/tests/pytest/alter/alter_cacheLastRow.py @@ -41,7 +41,7 @@ class TDTestCase: def run(self): tdSql.prepare() - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,15,0) buildPath = self.getBuildPath() if (buildPath == ""): @@ -68,7 +68,7 @@ class TDTestCase: for i in range(5): #switch lastRow to off and check tdSql.execute('alter database db cachemodel 'none'') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,15,0) #run last_row(*) query 500 times @@ -80,7 +80,7 @@ class TDTestCase: #switch lastRow to on and check 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) #run last_row(*) query 500 times diff --git a/tests/pytest/alter/alter_create_exception.py b/tests/pytest/alter/alter_create_exception.py index d8400c1fa9..91c83470b8 100644 --- a/tests/pytest/alter/alter_create_exception.py +++ b/tests/pytest/alter/alter_create_exception.py @@ -49,7 +49,7 @@ class TDTestCase: tdSql.error('create database db keep "3650"') tdSql.error('create database db wal_fsync_period "3650"') 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.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 \t') 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') def stop(self): diff --git a/tests/pytest/alter/alter_debugFlag.py b/tests/pytest/alter/alter_debugFlag.py index 38d972b582..c17a109c9f 100644 --- a/tests/pytest/alter/alter_debugFlag.py +++ b/tests/pytest/alter/alter_debugFlag.py @@ -37,7 +37,7 @@ class TDTestCase: if randomFlag != 131 and randomFlag != 135 and randomFlag != 143: 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) for flag in flagList: diff --git a/tests/pytest/alter/alter_keep.py b/tests/pytest/alter/alter_keep.py index b23f364fc6..5f7843ec98 100644 --- a/tests/pytest/alter/alter_keep.py +++ b/tests/pytest/alter/alter_keep.py @@ -27,12 +27,12 @@ class TDTestCase: tdLog.notice('running Keep Test, Community Version') tdLog.notice('running parameter test for keep 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.execute('drop database db') 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.execute('drop database db') @@ -47,7 +47,7 @@ class TDTestCase: tdLog.notice('running parameter test for keep during alter') 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.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,30') 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') def alterKeepEnterprise(self): @@ -63,22 +63,22 @@ class TDTestCase: #testing keep parameter 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.execute('drop database db') 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.execute('drop database db') 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.execute('drop database db') 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.execute('drop database db') @@ -95,15 +95,15 @@ class TDTestCase: tdLog.notice('running parameter test for keep during alter') 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.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.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.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 20,100,50') 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') @@ -148,7 +148,7 @@ class TDTestCase: #test case for TD-4459 and TD-4445 tdLog.notice('testing keep will be altered changing from small to big') 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.error('insert into tb values (now-60d, 10)') tdSql.execute('insert into tb values (now-30d, 10)') @@ -160,7 +160,7 @@ class TDTestCase: rowNum += 1 tdSql.execute('alter database db keep 20,20,20') 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.error('insert into tb values (now-60d, 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') 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.error('insert into tb values (now-15d, 10)') tdSql.query('select * from tb') diff --git a/tests/pytest/alter/db_update_options.py b/tests/pytest/alter/db_update_options.py index 224e0f25b0..f8116722b4 100644 --- a/tests/pytest/alter/db_update_options.py +++ b/tests/pytest/alter/db_update_options.py @@ -21,7 +21,7 @@ class TDTestCase: # check default update value sql = "create database if not exists db" tdSql.execute(sql) - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkRows(1) tdSql.checkData(0,16,0) @@ -29,14 +29,14 @@ class TDTestCase: # check update value tdSql.execute(sql) - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkRows(1) tdSql.checkData(0,16,1) sql = "alter database db update 0" tdSql.execute(sql) - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkRows(1) tdSql.checkData(0,16,0) @@ -46,7 +46,7 @@ class TDTestCase: sql = "alter database db update 100" tdSql.error(sql) - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkRows(1) tdSql.checkData(0,16,0) @@ -56,7 +56,7 @@ class TDTestCase: tdSql.execute('create database db update 1') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkRows(1) tdSql.checkData(0,16,1) diff --git a/tests/pytest/client/alterDatabase.py b/tests/pytest/client/alterDatabase.py index bc8c4fc17e..1ac1bcbdcd 100644 --- a/tests/pytest/client/alterDatabase.py +++ b/tests/pytest/client/alterDatabase.py @@ -29,18 +29,18 @@ class TDTestCase: tdSql.checkData(0, 0, "db") 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.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.error("alter database db quorum 2") tdSql.execute("alter database db blocks 100") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkData(0, 9, 100) diff --git a/tests/pytest/client/client.py b/tests/pytest/client/client.py index 6cfb1252bd..0d7ace10b2 100644 --- a/tests/pytest/client/client.py +++ b/tests/pytest/client/client.py @@ -37,7 +37,7 @@ class TDTestCase: time.sleep(1) - ret = tdSql.query('show dnodes') + ret = tdSql.query('select * from information_schema.ins_dnodes') dnodeId = tdSql.getData(0, 0); dnodeEndpoint = tdSql.getData(0, 1); diff --git a/tests/pytest/cluster/killAndRestartDnodesTest.py b/tests/pytest/cluster/killAndRestartDnodesTest.py index be927e862f..d0236c0f71 100644 --- a/tests/pytest/cluster/killAndRestartDnodesTest.py +++ b/tests/pytest/cluster/killAndRestartDnodesTest.py @@ -30,7 +30,7 @@ class ClusterTestcase: tdSql.init(ctest.conn.cursor(), False) nodes.node1.stopTaosd() - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") tdSql.checkRows(3) tdSql.checkData(0, 4, "offline") tdSql.checkData(1, 4, "ready") @@ -43,7 +43,7 @@ class ClusterTestcase: tdSql.checkData(2, 4, "ready") nodes.node2.stopTaosd() - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") tdSql.checkRows(3) tdSql.checkData(0, 4, "ready") tdSql.checkData(1, 4, "offline") @@ -56,7 +56,7 @@ class ClusterTestcase: tdSql.checkData(2, 4, "ready") nodes.node3.stopTaosd() - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") tdSql.checkRows(3) tdSql.checkData(0, 4, "ready") tdSql.checkData(1, 4, "ready") diff --git a/tests/pytest/cluster/offlineThresholdTest.py b/tests/pytest/cluster/offlineThresholdTest.py index 8373424f93..50cf18fcfe 100644 --- a/tests/pytest/cluster/offlineThresholdTest.py +++ b/tests/pytest/cluster/offlineThresholdTest.py @@ -33,7 +33,7 @@ class ClusterTestcase: nodes.node3.stopTaosd() tdLog.sleep(10) - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") tdSql.checkRows(3) tdSql.checkData(2, 4, "offline") diff --git a/tests/pytest/cluster/oneReplicaOfflineTest.py b/tests/pytest/cluster/oneReplicaOfflineTest.py index 0223dfe01a..135abcc294 100644 --- a/tests/pytest/cluster/oneReplicaOfflineTest.py +++ b/tests/pytest/cluster/oneReplicaOfflineTest.py @@ -55,7 +55,7 @@ class ClusterTestcase: tdSql.execute("drop database %s" % ctest.dbName) nodes.node2.startTaosd() - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(0) tdSql.close() diff --git a/tests/pytest/cluster/stopAllDnodesTest.py b/tests/pytest/cluster/stopAllDnodesTest.py index a71ae52e3d..3c9807a24e 100644 --- a/tests/pytest/cluster/stopAllDnodesTest.py +++ b/tests/pytest/cluster/stopAllDnodesTest.py @@ -26,19 +26,19 @@ class ClusterTestcase: ctest = ClusterTest(nodes.node1.hostName) tdSql.init(ctest.conn.cursor(), False) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") count = tdSql.queryRows; nodes.stopAllTaosd() nodes.node1.startTaosd() - tdSql.error("show databases") + tdSql.error("select * from information_schema.ins_databases") nodes.node2.startTaosd() - tdSql.error("show databases") + tdSql.error("select * from information_schema.ins_databases") nodes.node3.startTaosd() tdLog.sleep(10) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(count) ct = ClusterTestcase() diff --git a/tests/pytest/cluster/stopTwoDnodesTest.py b/tests/pytest/cluster/stopTwoDnodesTest.py index 9e9958e2d3..2b14fcbc40 100644 --- a/tests/pytest/cluster/stopTwoDnodesTest.py +++ b/tests/pytest/cluster/stopTwoDnodesTest.py @@ -29,19 +29,19 @@ class ClusterTestcase: ctest.run() tdSql.init(ctest.conn.cursor(), False) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") count = tdSql.queryRows; tdSql.execute("use %s" % ctest.dbName) tdSql.execute("alter database %s replica 3" % ctest.dbName) nodes.node2.stopTaosd() nodes.node3.stopTaosd() - tdSql.error("show databases") + tdSql.error("select * from information_schema.ins_databases") nodes.node2.startTaosd() - tdSql.error("show databases") + tdSql.error("select * from information_schema.ins_databases") nodes.node3.startTaosd() - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(count) ct = ClusterTestcase() diff --git a/tests/pytest/crash_gen/crash_gen_main.py b/tests/pytest/crash_gen/crash_gen_main.py index 2fa99230bc..203541f14a 100755 --- a/tests/pytest/crash_gen/crash_gen_main.py +++ b/tests/pytest/crash_gen/crash_gen_main.py @@ -996,7 +996,7 @@ class StateMechine: return # do nothing # 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 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 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() self._isRunning = False @@ -2335,7 +2335,7 @@ class ClientManager: # def _printLastNumbers(self): # to verify data durability # dbManager = DbManager() # 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 # dbc.execute("use db") # if dbc.query("show tables") == 0: # no tables diff --git a/tests/pytest/crash_gen/service_manager.py b/tests/pytest/crash_gen/service_manager.py index c0cfd33123..b19c079544 100644 --- a/tests/pytest/crash_gen/service_manager.py +++ b/tests/pytest/crash_gen/service_manager.py @@ -185,7 +185,7 @@ quorum 2 return ["exec " + self.getExecFile(), '-c', self.getCfgDir()] # used in subproce.Popen() 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 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): dbc = DbConn.createNative(tInst.getDbTarget()) dbc.open() - dbc.query("show dnodes") + dbc.query("select * from information_schema.ins_dnodes") # dbc.query("DESCRIBE {}.{}".format(dbName, self._stName)) 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 diff --git a/tests/pytest/crash_gen/shared/db.py b/tests/pytest/crash_gen/shared/db.py index 6da0216d95..60c830f4f7 100644 --- a/tests/pytest/crash_gen/shared/db.py +++ b/tests/pytest/crash_gen/shared/db.py @@ -114,7 +114,7 @@ class DbConn: def existsDatabase(self, dbName: str): ''' 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 # ret2 = dbName in dbs # print("dbs = {}, str = {}, ret2={}, type2={}".format(dbs, dbName,ret2, type(dbName))) @@ -157,7 +157,7 @@ class DbConn: def getResultCols(self): 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): diff --git a/tests/pytest/dbmgmt/database-name-boundary.py b/tests/pytest/dbmgmt/database-name-boundary.py index df3b027ba7..6802cb00b7 100644 --- a/tests/pytest/dbmgmt/database-name-boundary.py +++ b/tests/pytest/dbmgmt/database-name-boundary.py @@ -47,7 +47,7 @@ class TDTestCase: tdLog.info('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.checkData(0, 0, db_name.lower()) @@ -57,7 +57,7 @@ class TDTestCase: tdLog.info('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.checkData(0, 0, db_name.lower()) diff --git a/tests/pytest/dbmgmt/nanoSecondCheck.py b/tests/pytest/dbmgmt/nanoSecondCheck.py index a5e9adacee..ef49be1103 100644 --- a/tests/pytest/dbmgmt/nanoSecondCheck.py +++ b/tests/pytest/dbmgmt/nanoSecondCheck.py @@ -32,7 +32,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') 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.execute('use db') diff --git a/tests/pytest/functions/queryTestCases.py b/tests/pytest/functions/queryTestCases.py index 96de8f064c..b1e8d838c9 100644 --- a/tests/pytest/functions/queryTestCases.py +++ b/tests/pytest/functions/queryTestCases.py @@ -68,7 +68,7 @@ class TDTestCase: tdSql.query("show variables") tdSql.checkData(26, 1, -1) - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") index = tdSql.getData(0, 0) tdDnodes.stop(index) @@ -269,7 +269,7 @@ class TDTestCase: tdSql.execute("create database if not exists db") tdSql.query("show variables") tdSql.checkData(38, 1, 3650) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkData(0,7,"3650,3650,3650") days = tdSql.getData(0, 6) @@ -288,12 +288,12 @@ class TDTestCase: tdSql.error("alter database db keep0 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.execute("drop database if exists db") 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.query("show variables") tdSql.checkData(38, 1, 3650) @@ -311,7 +311,7 @@ class TDTestCase: maxTablesPerVnode = 10 maxVgroupsPerDb = 100 - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") index = tdSql.getData(0, 0) tdDnodes.stop(index) @@ -334,7 +334,7 @@ class TDTestCase: for i in range(100): tdSql.execute(f"create table db.t1{i} using db.stb1 tags({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) if vnode_count <= 1: 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) # 关闭服务并获取未开启压缩情况下的数据容量 - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") index = tdSql.getData(0, 0) tdDnodes.stop(index) diff --git a/tests/pytest/insert/date.py b/tests/pytest/insert/date.py index 6e22e5b72e..d4f1176f61 100644 --- a/tests/pytest/insert/date.py +++ b/tests/pytest/insert/date.py @@ -174,9 +174,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/insert/insert_locking.py b/tests/pytest/insert/insert_locking.py index 0d780a7132..dc320edd1f 100644 --- a/tests/pytest/insert/insert_locking.py +++ b/tests/pytest/insert/insert_locking.py @@ -33,7 +33,7 @@ class TDTestCase: tdLog.info("\n\n----------step1 : drop db and create db----------\n") tdSql.execute('''drop database if exists db ;''') tdSql.execute('''create database db ;''') - sql = '''show databases;''' + sql = '''select * from information_schema.ins_databases;''' tdSql.query(sql) tdSql.checkRows(1) diff --git a/tests/pytest/manualTest/TD-5114/continueCreateDn.py b/tests/pytest/manualTest/TD-5114/continueCreateDn.py index 9494ee5f36..af232cdb3f 100644 --- a/tests/pytest/manualTest/TD-5114/continueCreateDn.py +++ b/tests/pytest/manualTest/TD-5114/continueCreateDn.py @@ -46,7 +46,7 @@ class TwoClients: for i in range(10): os.system("taosdemo -f manualTest/TD-5114/insertDataDb3Replica2.json -y ") # # check data correct - tdSql.execute("show databases") + tdSql.execute("select * from information_schema.ins_databases") tdSql.execute("use db3") tdSql.query("select count (tbname) from stb0") 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)) # # check data correct - # tdSql.execute("show databases") + # tdSql.execute("select * from information_schema.ins_databases") # tdSql.execute("use db3") # tdSql.query("select count (tbname) from test") # tdSql.checkData(0, 0, 200) diff --git a/tests/pytest/manualTest/manual_alter_block.py b/tests/pytest/manualTest/manual_alter_block.py index ccd98b1421..540dfa978a 100644 --- a/tests/pytest/manualTest/manual_alter_block.py +++ b/tests/pytest/manualTest/manual_alter_block.py @@ -51,7 +51,7 @@ class TDTestCase: #alter cache block to 3, then check alter tdSql.execute('alter database db blocks 3') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,9,3) #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 tdSql.execute('alter database db blocks 8') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,9,8) #run taosdemo to occupy all cache, need to manually check memory consumption diff --git a/tests/pytest/manualTest/manual_alter_comp.py b/tests/pytest/manualTest/manual_alter_comp.py index 6c3e0fc296..cc8b2a277b 100644 --- a/tests/pytest/manualTest/manual_alter_comp.py +++ b/tests/pytest/manualTest/manual_alter_comp.py @@ -71,7 +71,7 @@ class TDTestCase: #comp is at 14 #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.checkData(0,14,2) os.system("%staosdemo -f tools/taosdemoAllTest/manual_block1_comp.json" % binPath) @@ -86,10 +86,10 @@ class TDTestCase: #check disk usage when comp=0 tdSql.prepare() - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,14,2) tdSql.execute('alter database db comp 0') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,14,0) os.system("%staosdemo -f tools/taosdemoAllTest/manual_block1_comp.json" % binPath) 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 tdSql.prepare() - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,14,2) tdSql.execute('alter database db comp 1') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,14,1) os.system("%staosdemo -f tools/taosdemoAllTest/manual_block1_comp.json" % binPath) print("default location is at /home/bryan/Documents/Github/TDengine/sim/dnode1/data") diff --git a/tests/pytest/perfbenchmark/bug3433.py b/tests/pytest/perfbenchmark/bug3433.py index 3e7de39bed..a60e077453 100644 --- a/tests/pytest/perfbenchmark/bug3433.py +++ b/tests/pytest/perfbenchmark/bug3433.py @@ -224,7 +224,7 @@ class TDTestCase: self.inserttable(file_create_table) 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.execute("use db") tdSql.query("show stables") diff --git a/tests/pytest/query/query1970YearsAf.py b/tests/pytest/query/query1970YearsAf.py index e7e9fa5329..7ecb02bfc8 100644 --- a/tests/pytest/query/query1970YearsAf.py +++ b/tests/pytest/query/query1970YearsAf.py @@ -235,7 +235,7 @@ class TDTestCase: self.sqlsquery() # after wal and sync, check again - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") index = tdSql.getData(0, 0) tdDnodes.stop(index) tdDnodes.start(index) diff --git a/tests/pytest/query/queryJoin10tables.py b/tests/pytest/query/queryJoin10tables.py index 01a7397d44..796edcb9d9 100644 --- a/tests/pytest/query/queryJoin10tables.py +++ b/tests/pytest/query/queryJoin10tables.py @@ -184,7 +184,7 @@ class TDTestCase: self.queryjointable() # after wal and sync, check again - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") index = tdSql.getData(0, 0) tdDnodes.stop(index) tdDnodes.start(index) diff --git a/tests/pytest/query/queryStddevWithGroupby.py b/tests/pytest/query/queryStddevWithGroupby.py index aee88ca9c5..e446d4b187 100644 --- a/tests/pytest/query/queryStddevWithGroupby.py +++ b/tests/pytest/query/queryStddevWithGroupby.py @@ -54,7 +54,7 @@ class TDTestCase: self.querysqls() tdLog.printNoPrefix("==========step3:after wal,check again") - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") index = tdSql.getData(0, 0) tdDnodes.stop(index) tdDnodes.start(index) diff --git a/tests/pytest/query/queryTscomputWithNow.py b/tests/pytest/query/queryTscomputWithNow.py index 3b808d551c..c7974268ae 100644 --- a/tests/pytest/query/queryTscomputWithNow.py +++ b/tests/pytest/query/queryTscomputWithNow.py @@ -155,7 +155,7 @@ class TDTestCase: self.inertnow() self.querynow() - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") index = tdSql.getData(0, 0) tdDnodes.stop(index) tdDnodes.start(index) diff --git a/tests/pytest/query/removeDBAndSTable.py b/tests/pytest/query/removeDBAndSTable.py index 4616c7e378..f27e2b8231 100644 --- a/tests/pytest/query/removeDBAndSTable.py +++ b/tests/pytest/query/removeDBAndSTable.py @@ -50,14 +50,14 @@ class TDTestCase: tdSql.checkData(0, 0, "st_vplu") tdSql.execute("drop database db") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(1) tdSql.checkData(0, 0, "db_vplu") tdDnodes.stopAll() tdDnodes.start(1) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(1) tdSql.checkData(0, 0, "db_vplu") diff --git a/tests/pytest/restful/restful_bind_db1.py b/tests/pytest/restful/restful_bind_db1.py index 9620535fd7..e44df14d0e 100644 --- a/tests/pytest/restful/restful_bind_db1.py +++ b/tests/pytest/restful/restful_bind_db1.py @@ -75,10 +75,10 @@ class TDTestCase(): # test with no bind databases - sqls = ["show databases;", + sqls = ["select * from information_schema.ins_databases;", "use test", "show tables;", - "show dnodes;", + "select * from information_schema.ins_dnodes;", "show vgroups;", "create database db;", "drop database db;", diff --git a/tests/pytest/restful/restful_bind_db2.py b/tests/pytest/restful/restful_bind_db2.py index 35aa1408a7..cfe7bb2f42 100644 --- a/tests/pytest/restful/restful_bind_db2.py +++ b/tests/pytest/restful/restful_bind_db2.py @@ -60,10 +60,10 @@ class TDTestCase(): # test with no bind databases - sqls = ["show databases;", + sqls = ["select * from information_schema.ins_databases;", "use test", "show tables;", - "show dnodes;", + "select * from information_schema.ins_dnodes;", "show vgroups;", "create database db;", "drop database db;", diff --git a/tests/pytest/stream/test2.py b/tests/pytest/stream/test2.py index e6044662e9..4cd33bf569 100644 --- a/tests/pytest/stream/test2.py +++ b/tests/pytest/stream/test2.py @@ -14,7 +14,7 @@ class TDTestCase: #for i in range(100): tdSql.prepare() 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('create database if not exists ttxkbrzmpo vgroups 1') tdSql.execute('use ttxkbrzmpo') diff --git a/tests/pytest/table/column_num.py b/tests/pytest/table/column_num.py index 3abedb083c..47c866f50e 100644 --- a/tests/pytest/table/column_num.py +++ b/tests/pytest/table/column_num.py @@ -104,9 +104,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/table/db_table.py b/tests/pytest/table/db_table.py index 5ead829e26..0c9460837b 100644 --- a/tests/pytest/table/db_table.py +++ b/tests/pytest/table/db_table.py @@ -34,8 +34,8 @@ class TDTestCase: tdLog.info('=============== step6') tdLog.info('drop database db') tdSql.execute('drop database db') - tdLog.info('show databases') - tdSql.query('show databases') + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) # convert end diff --git a/tests/pytest/tag_lite/3.py b/tests/pytest/tag_lite/3.py index bbdf0868fa..c3acf336f2 100644 --- a/tests/pytest/tag_lite/3.py +++ b/tests/pytest/tag_lite/3.py @@ -1311,9 +1311,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/4.py b/tests/pytest/tag_lite/4.py index df81dd8100..ef1a401f46 100644 --- a/tests/pytest/tag_lite/4.py +++ b/tests/pytest/tag_lite/4.py @@ -1855,9 +1855,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/5.py b/tests/pytest/tag_lite/5.py index 28c8fc125a..d9b3eb9487 100644 --- a/tests/pytest/tag_lite/5.py +++ b/tests/pytest/tag_lite/5.py @@ -2283,9 +2283,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/6.py b/tests/pytest/tag_lite/6.py index 5cf43f1047..63bf233c22 100644 --- a/tests/pytest/tag_lite/6.py +++ b/tests/pytest/tag_lite/6.py @@ -2731,9 +2731,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/add.py b/tests/pytest/tag_lite/add.py index eb52e9cb9b..29ad187ca6 100644 --- a/tests/pytest/tag_lite/add.py +++ b/tests/pytest/tag_lite/add.py @@ -2055,9 +2055,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('sql drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/bigint.py b/tests/pytest/tag_lite/bigint.py index 733d30983d..7226cb50bc 100644 --- a/tests/pytest/tag_lite/bigint.py +++ b/tests/pytest/tag_lite/bigint.py @@ -561,9 +561,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/binary.py b/tests/pytest/tag_lite/binary.py index 3825c6637f..f1c3445a96 100644 --- a/tests/pytest/tag_lite/binary.py +++ b/tests/pytest/tag_lite/binary.py @@ -565,9 +565,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/binary_binary.py b/tests/pytest/tag_lite/binary_binary.py index 2a76238f59..af1b36be54 100644 --- a/tests/pytest/tag_lite/binary_binary.py +++ b/tests/pytest/tag_lite/binary_binary.py @@ -776,9 +776,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/bool.py b/tests/pytest/tag_lite/bool.py index 11ce9eb7f8..894f5ad2c5 100644 --- a/tests/pytest/tag_lite/bool.py +++ b/tests/pytest/tag_lite/bool.py @@ -560,9 +560,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/bool_binary.py b/tests/pytest/tag_lite/bool_binary.py index 934d91c908..437f4c0b6d 100644 --- a/tests/pytest/tag_lite/bool_binary.py +++ b/tests/pytest/tag_lite/bool_binary.py @@ -770,9 +770,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/bool_int.py b/tests/pytest/tag_lite/bool_int.py index 1e857192ed..ea83b8b34c 100644 --- a/tests/pytest/tag_lite/bool_int.py +++ b/tests/pytest/tag_lite/bool_int.py @@ -802,9 +802,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/change.py b/tests/pytest/tag_lite/change.py index b8ddc3ff87..10482b21e1 100644 --- a/tests/pytest/tag_lite/change.py +++ b/tests/pytest/tag_lite/change.py @@ -924,9 +924,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/column.py b/tests/pytest/tag_lite/column.py index f82f83c356..c08f478ae8 100644 --- a/tests/pytest/tag_lite/column.py +++ b/tests/pytest/tag_lite/column.py @@ -176,9 +176,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/commit.py b/tests/pytest/tag_lite/commit.py index 8b69d4aa5f..8807dd83c6 100644 --- a/tests/pytest/tag_lite/commit.py +++ b/tests/pytest/tag_lite/commit.py @@ -2300,9 +2300,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/delete.py b/tests/pytest/tag_lite/delete.py index 5e82a96bf4..fe21719777 100644 --- a/tests/pytest/tag_lite/delete.py +++ b/tests/pytest/tag_lite/delete.py @@ -1697,9 +1697,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/double.py b/tests/pytest/tag_lite/double.py index c9d3a5af9e..9f9fea3a65 100644 --- a/tests/pytest/tag_lite/double.py +++ b/tests/pytest/tag_lite/double.py @@ -561,9 +561,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/filter.py b/tests/pytest/tag_lite/filter.py index aeb13a1715..5713074612 100644 --- a/tests/pytest/tag_lite/filter.py +++ b/tests/pytest/tag_lite/filter.py @@ -351,9 +351,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/float.py b/tests/pytest/tag_lite/float.py index 589df89ab9..7e841a52b0 100644 --- a/tests/pytest/tag_lite/float.py +++ b/tests/pytest/tag_lite/float.py @@ -561,9 +561,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/int.py b/tests/pytest/tag_lite/int.py index 1297d083a0..72e06c3d8c 100644 --- a/tests/pytest/tag_lite/int.py +++ b/tests/pytest/tag_lite/int.py @@ -560,9 +560,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/int_binary.py b/tests/pytest/tag_lite/int_binary.py index 6ce9a9a431..d702a3fca1 100644 --- a/tests/pytest/tag_lite/int_binary.py +++ b/tests/pytest/tag_lite/int_binary.py @@ -768,9 +768,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/int_float.py b/tests/pytest/tag_lite/int_float.py index 341acfd5ae..e1ea9b10b6 100644 --- a/tests/pytest/tag_lite/int_float.py +++ b/tests/pytest/tag_lite/int_float.py @@ -804,9 +804,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/set.py b/tests/pytest/tag_lite/set.py index 1e3cdfaa93..f1029f5a77 100644 --- a/tests/pytest/tag_lite/set.py +++ b/tests/pytest/tag_lite/set.py @@ -875,9 +875,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/smallint.py b/tests/pytest/tag_lite/smallint.py index 93fde22ca9..1bd08429a9 100644 --- a/tests/pytest/tag_lite/smallint.py +++ b/tests/pytest/tag_lite/smallint.py @@ -561,9 +561,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/tinyint.py b/tests/pytest/tag_lite/tinyint.py index fc4af4ee96..9d4f4f08bb 100644 --- a/tests/pytest/tag_lite/tinyint.py +++ b/tests/pytest/tag_lite/tinyint.py @@ -561,9 +561,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/unsignedBigint.py b/tests/pytest/tag_lite/unsignedBigint.py index 6a33812f88..eed5f00614 100644 --- a/tests/pytest/tag_lite/unsignedBigint.py +++ b/tests/pytest/tag_lite/unsignedBigint.py @@ -561,9 +561,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/unsignedInt.py b/tests/pytest/tag_lite/unsignedInt.py index 6e741d351a..8c6ae156ee 100644 --- a/tests/pytest/tag_lite/unsignedInt.py +++ b/tests/pytest/tag_lite/unsignedInt.py @@ -562,9 +562,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/unsignedSmallint.py b/tests/pytest/tag_lite/unsignedSmallint.py index 21c390d9dc..0ac921823e 100644 --- a/tests/pytest/tag_lite/unsignedSmallint.py +++ b/tests/pytest/tag_lite/unsignedSmallint.py @@ -561,9 +561,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/unsignedTinyint.py b/tests/pytest/tag_lite/unsignedTinyint.py index 7ce3a83984..a4a6ccf527 100644 --- a/tests/pytest/tag_lite/unsignedTinyint.py +++ b/tests/pytest/tag_lite/unsignedTinyint.py @@ -561,9 +561,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tools/taosdemoTestWithoutMetric.py b/tests/pytest/tools/taosdemoTestWithoutMetric.py index 01e19355d9..0f10197180 100644 --- a/tests/pytest/tools/taosdemoTestWithoutMetric.py +++ b/tests/pytest/tools/taosdemoTestWithoutMetric.py @@ -53,7 +53,7 @@ class TDTestCase: os.system("%staosdemo -N -y -t %d -n %d" % (binPath, self.numberOfTables, self.numberOfRecords)) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(18): print(tdSql.getData(0, i) ) tdSql.checkData(0, 2, self.numberOfTables) diff --git a/tests/pytest/tools/taosdumpTest.py b/tests/pytest/tools/taosdumpTest.py index d23e2f79af..4bfb7d5ba3 100644 --- a/tests/pytest/tools/taosdumpTest.py +++ b/tests/pytest/tools/taosdumpTest.py @@ -99,14 +99,14 @@ class TDTestCase: tdSql.execute("drop database db") tdSql.execute("drop database db1") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(2) os.system("%s -i ./taosdumptest/tmp1" % binPath) os.system("%s -i ./taosdumptest/tmp2" % binPath) tdSql.execute("use db") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(4) dbresult = tdSql.queryResult # 6--duration,7--keep0,keep1,keep diff --git a/tests/pytest/tools/taosdumpTest2.py b/tests/pytest/tools/taosdumpTest2.py index f611623241..a8117ec04c 100644 --- a/tests/pytest/tools/taosdumpTest2.py +++ b/tests/pytest/tools/taosdumpTest2.py @@ -81,12 +81,12 @@ class TDTestCase: binPath) tdSql.execute("drop database db") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(2) os.system("%s -i ./taosdumptest/tmp" % binPath) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(3) tdSql.checkData(2, 0, 'db') @@ -115,7 +115,7 @@ class TDTestCase: os.system("%s -D test -o ./taosdumptest/tmp -y" % binPath) tdSql.execute("drop database test") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(3) os.system("%s -i ./taosdumptest/tmp -y" % binPath) diff --git a/tests/pytest/tsdb/tsdbCompCluster.py b/tests/pytest/tsdb/tsdbCompCluster.py index 3df4c9a9d4..aca4d0e9ce 100644 --- a/tests/pytest/tsdb/tsdbCompCluster.py +++ b/tests/pytest/tsdb/tsdbCompCluster.py @@ -131,7 +131,7 @@ class TwoClients: # check data correct - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.execute("use db2") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 1) diff --git a/tests/pytest/tsdb/tsdbCompClusterReplica2.py b/tests/pytest/tsdb/tsdbCompClusterReplica2.py index cfda271497..32fbfd4f37 100644 --- a/tests/pytest/tsdb/tsdbCompClusterReplica2.py +++ b/tests/pytest/tsdb/tsdbCompClusterReplica2.py @@ -142,7 +142,7 @@ class TwoClients: tdSql.init(cur2, True) # check data correct - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.execute("use db2") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 1) diff --git a/tests/pytest/util/cluster.py b/tests/pytest/util/cluster.py index e892e1cc02..2b9af8de25 100644 --- a/tests/pytest/util/cluster.py +++ b/tests/pytest/util/cluster.py @@ -72,7 +72,7 @@ class ConfigureyCluster: tdSql.init(conn.cursor()) count=0 while count < 5: - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") # tdLog.debug(tdSql.queryResult) status=0 for i in range(self.dnodeNums): diff --git a/tests/pytest/wal/sdbCompCluster.py b/tests/pytest/wal/sdbCompCluster.py index 4fa84817ec..15cb000fd3 100644 --- a/tests/pytest/wal/sdbCompCluster.py +++ b/tests/pytest/wal/sdbCompCluster.py @@ -106,7 +106,7 @@ class TwoClients: tdSql.init(cur2, True) # 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): if tdSql.queryResult[i][0]=="db2": assert tdSql.queryResult[i][4]==1 , "replica is wrong" diff --git a/tests/pytest/wal/sdbCompClusterReplica2.py b/tests/pytest/wal/sdbCompClusterReplica2.py index ba80e3864a..87a14e0541 100644 --- a/tests/pytest/wal/sdbCompClusterReplica2.py +++ b/tests/pytest/wal/sdbCompClusterReplica2.py @@ -116,7 +116,7 @@ class TwoClients: tdSql.init(cur2, True) # 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): if tdSql.queryResult[i][0]=="db2": assert tdSql.queryResult[i][4]==2 , "replica is wrong" diff --git a/tests/script/tsim/dnode/drop_dnode_has_qnode_snode.sim b/tests/script/tsim/dnode/drop_dnode_has_qnode_snode.sim index c50cf0f56e..7013742884 100644 --- a/tests/script/tsim/dnode/drop_dnode_has_qnode_snode.sim +++ b/tests/script/tsim/dnode/drop_dnode_has_qnode_snode.sim @@ -33,7 +33,7 @@ print =============== step2: create qnode snode on dnode 2 sql create qnode on dnode 2 sql create snode on dnode 2 -sql show qnodes +sql select * from information_schema.ins_qnodes if $rows != 1 then return -1 endi @@ -57,7 +57,7 @@ if $data00 != 1 then return -1 endi -sql show qnodes +sql select * from information_schema.ins_qnodes if $rows != 0 then return -1 endi diff --git a/tests/script/tsim/parser/auto_create_tb.sim b/tests/script/tsim/parser/auto_create_tb.sim index faf573f949..312964a1ab 100644 --- a/tests/script/tsim/parser/auto_create_tb.sim +++ b/tests/script/tsim/parser/auto_create_tb.sim @@ -289,7 +289,7 @@ if $rows != 1 then endi #sql drop database $db -#sql show databases +#sql select * from information_schema.ins_databases #if $rows != 0 then # return -1 #endi diff --git a/tests/script/tsim/parser/create_db.sim b/tests/script/tsim/parser/create_db.sim index 6fa635cd42..db25240262 100644 --- a/tests/script/tsim/parser/create_db.sim +++ b/tests/script/tsim/parser/create_db.sim @@ -262,7 +262,7 @@ sql_error create database $db comp -1 sql_error create database $db comp 3 sql_error drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/create_mt.sim b/tests/script/tsim/parser/create_mt.sim index e2f02f9740..dd2a7834c4 100644 --- a/tests/script/tsim/parser/create_mt.sim +++ b/tests/script/tsim/parser/create_mt.sim @@ -240,7 +240,7 @@ $mt2 = mt2 print chinese_char_in_metrics test passed sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/create_tb.sim b/tests/script/tsim/parser/create_tb.sim index ea6709807f..cd823cc685 100644 --- a/tests/script/tsim/parser/create_tb.sim +++ b/tests/script/tsim/parser/create_tb.sim @@ -180,7 +180,7 @@ sql_error create table $tbname65 (ts timestamp, col int) print table_already_exists test passed sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/distinct.sim b/tests/script/tsim/parser/distinct.sim index 78eaa68dab..2a4da10bf4 100644 --- a/tests/script/tsim/parser/distinct.sim +++ b/tests/script/tsim/parser/distinct.sim @@ -75,7 +75,7 @@ endi ### select distinct sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/fill_stb.sim b/tests/script/tsim/parser/fill_stb.sim index 88032cc2bd..195bd2e1c3 100644 --- a/tests/script/tsim/parser/fill_stb.sim +++ b/tests/script/tsim/parser/fill_stb.sim @@ -431,7 +431,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 0 then return -1 endi diff --git a/tests/script/tsim/parser/fill_us.sim b/tests/script/tsim/parser/fill_us.sim index 94f6918c65..03231d2241 100644 --- a/tests/script/tsim/parser/fill_us.sim +++ b/tests/script/tsim/parser/fill_us.sim @@ -844,7 +844,7 @@ endi #print =============== clear #sql drop database $db -#sql show databases +#sql select * from information_schema.ins_databases #if $rows != 0 then # return -1 #endi diff --git a/tests/script/tsim/parser/insert_tb.sim b/tests/script/tsim/parser/insert_tb.sim index a10e3f553e..9283ac7fee 100644 --- a/tests/script/tsim/parser/insert_tb.sim +++ b/tests/script/tsim/parser/insert_tb.sim @@ -221,7 +221,7 @@ if $rows != 1 then endi #sql drop database $db -#sql show databases +#sql select * from information_schema.ins_databases #if $rows != 0 then # return -1 #endi diff --git a/tests/script/tsim/parser/nchar.sim b/tests/script/tsim/parser/nchar.sim index 1f37b057dc..9358a31cc1 100644 --- a/tests/script/tsim/parser/nchar.sim +++ b/tests/script/tsim/parser/nchar.sim @@ -305,7 +305,7 @@ endi # case: query_with_wildcard # print =============== clear # sql drop database $db -# sql show databases +# sql select * from information_schema.ins_databases # if $rows != 0 then # return -1 # endi diff --git a/tests/script/tsim/parser/precision_ns.sim b/tests/script/tsim/parser/precision_ns.sim index 522e5174a2..c2268cae30 100644 --- a/tests/script/tsim/parser/precision_ns.sim +++ b/tests/script/tsim/parser/precision_ns.sim @@ -100,7 +100,7 @@ sql select count(*) from $mt interval(100000000b) sliding(100000000b) print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/select_across_vnodes.sim b/tests/script/tsim/parser/select_across_vnodes.sim index f58f7a2943..e58ffa7473 100644 --- a/tests/script/tsim/parser/select_across_vnodes.sim +++ b/tests/script/tsim/parser/select_across_vnodes.sim @@ -71,7 +71,7 @@ if $rows != $tbNum then endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/select_distinct_tag.sim b/tests/script/tsim/parser/select_distinct_tag.sim index 5f31a0a901..2d29384730 100644 --- a/tests/script/tsim/parser/select_distinct_tag.sim +++ b/tests/script/tsim/parser/select_distinct_tag.sim @@ -50,7 +50,7 @@ endi sql_error select distinct t1, t2 from &stb sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/stableOp.sim b/tests/script/tsim/parser/stableOp.sim index 213cd10546..a1d0219fef 100644 --- a/tests/script/tsim/parser/stableOp.sim +++ b/tests/script/tsim/parser/stableOp.sim @@ -84,7 +84,7 @@ endi print create/alter/drop stable test passed sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/tags_filter.sim b/tests/script/tsim/parser/tags_filter.sim index cbdd9646ff..ea1c93ebd5 100644 --- a/tests/script/tsim/parser/tags_filter.sim +++ b/tests/script/tsim/parser/tags_filter.sim @@ -99,7 +99,7 @@ if $data01 != 4 then endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/qnode/basic1.sim b/tests/script/tsim/qnode/basic1.sim index deaa457e1e..66f02d9c7d 100644 --- a/tests/script/tsim/qnode/basic1.sim +++ b/tests/script/tsim/qnode/basic1.sim @@ -77,7 +77,7 @@ endi print =============== create drop qnode 1 sql create qnode on dnode 1 -sql show qnodes +sql select * from information_schema.ins_qnodes if $rows != 1 then return -1 endi @@ -87,7 +87,7 @@ endi sql_error create qnode on dnode 1 sql drop qnode on dnode 1 -sql show qnodes +sql select * from information_schema.ins_qnodes if $rows != 0 then return -1 endi @@ -95,7 +95,7 @@ sql_error drop qnode on dnode 1 print =============== create drop qnode 2 sql create qnode on dnode 2 -sql show qnodes +sql select * from information_schema.ins_qnodes if $rows != 1 then return -1 endi @@ -105,7 +105,7 @@ endi sql_error create qnode on dnode 2 sql drop qnode on dnode 2 -sql show qnodes +sql select * from information_schema.ins_qnodes if $rows != 0 then return -1 endi @@ -114,7 +114,7 @@ sql_error drop qnode on dnode 2 print =============== create drop qnodes sql create qnode on dnode 1 sql create qnode on dnode 2 -sql show qnodes +sql select * from information_schema.ins_qnodes if $rows != 2 then return -1 endi @@ -125,7 +125,7 @@ system sh/exec.sh -n dnode2 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode2 -s start -sql show qnodes +sql select * from information_schema.ins_qnodes if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/show/basic.sim b/tests/script/tsim/show/basic.sim index eb2c808dad..162e74ea14 100644 --- a/tests/script/tsim/show/basic.sim +++ b/tests/script/tsim/show/basic.sim @@ -49,7 +49,7 @@ if $rows != 1 then return -1 endi #sql show modules -#sql show qnodes +#sql select * from information_schema.ins_qnodes sql select * from information_schema.ins_databases if $rows != 3 then return -1 @@ -147,7 +147,7 @@ if $rows != 1 then return -1 endi #sql show modules -#sql show qnodes +#sql select * from information_schema.ins_qnodes sql select * from information_schema.ins_databases if $rows != 3 then return -1 diff --git a/tests/script/tsim/stream/session0.sim b/tests/script/tsim/stream/session0.sim index 7cd9b75a4b..fee8c98cce 100644 --- a/tests/script/tsim/stream/session0.sim +++ b/tests/script/tsim/stream/session0.sim @@ -6,7 +6,7 @@ sql connect print =============== create database sql create database test vgroups 1; -sql show databases; +sql select * from information_schema.ins_databases; if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/user/privilege_sysinfo.sim b/tests/script/tsim/user/privilege_sysinfo.sim index cbf714ed73..3f81037af4 100644 --- a/tests/script/tsim/user/privilege_sysinfo.sim +++ b/tests/script/tsim/user/privilege_sysinfo.sim @@ -54,7 +54,7 @@ sql_error show cluster sql_error select * from information_schema.ins_dnodes sql_error select * from information_schema.ins_mnodes sql_error show snodes -sql_error show qnodes +sql_error select * from information_schema.ins_qnodes sql_error show bnodes sql_error show grants sql_error show dnode 1 variables; diff --git a/tests/system-test/0-others/cachemodel.py b/tests/system-test/0-others/cachemodel.py index 7fc2003983..42c52a2f3c 100644 --- a/tests/system-test/0-others/cachemodel.py +++ b/tests/system-test/0-others/cachemodel.py @@ -84,7 +84,7 @@ class TDTestCase: # check cache_last value for database - tdSql.query(" show databases ") + tdSql.query(" select * from information_schema.ins_databases ") databases_infos = tdSql.queryResult cache_lasts = {} for db_info in databases_infos: @@ -117,7 +117,7 @@ class TDTestCase: abs_vnodePath = os.path.abspath(dataPath)+"/vnode/" tdLog.info("abs_vnodePath: %s" % abs_vnodePath) - tdSql.query(" show dnodes ") + tdSql.query(" select * from information_schema.ins_dnodes ") dnode_id = tdSql.queryResult[0][0] for dbname in cache_lasts.keys(): @@ -144,7 +144,7 @@ class TDTestCase: def restart_check_cachemodel_sets(self): for i in range(3): - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") index = tdSql.getData(0, 0) tdDnodes.stop(index) tdDnodes.start(index) diff --git a/tests/system-test/0-others/fsync.py b/tests/system-test/0-others/fsync.py index fcc790040c..6eefc3db24 100644 --- a/tests/system-test/0-others/fsync.py +++ b/tests/system-test/0-others/fsync.py @@ -41,7 +41,7 @@ class TDTestCase: def test_fsync_current(self): wal_index = 0 fsync_index = 0 - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryCols): if tdSql.cursor.description[i][0] == "wal_level": wal_index = i @@ -50,35 +50,35 @@ class TDTestCase: tdSql.execute("drop database if exists db1") tdSql.execute("create database db1 wal_level 1") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, wal_index, 1) tdSql.execute("drop database if exists db1") tdSql.execute("create database db1 wal_level 2") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, wal_index, 2) tdSql.execute("drop database if exists db1") tdSql.execute("create database db1 wal_fsync_period 0") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 0) tdSql.execute("drop database if exists db1") tdSql.execute("create database db1 wal_fsync_period 3000") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 3000) tdSql.execute("drop database if exists db1") tdSql.execute("create database db1 wal_fsync_period 180000") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 180000) @@ -86,7 +86,7 @@ class TDTestCase: tdSql.execute("drop database if exists db1") tdSql.execute("create database db1 wal_level 1 wal_fsync_period 6000") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 6000) @@ -94,49 +94,49 @@ class TDTestCase: tdSql.execute("drop database if exists db1") tdSql.execute("create database db1 wal_level 2 wal_fsync_period 3000") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 3000) tdSql.checkData(i, wal_index, 2) tdSql.execute("alter database db1 wal_level 1") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 3000) tdSql.checkData(i, wal_index, 1) tdSql.execute("alter database db1 wal_level 2") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 3000) tdSql.checkData(i, wal_index, 2) tdSql.execute("alter database db1 wal_fsync_period 0") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 0) tdSql.checkData(i, wal_index, 2) tdSql.execute("alter database db1 wal_fsync_period 3000") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 3000) tdSql.checkData(i, wal_index, 2) tdSql.execute("alter database db1 wal_fsync_period 18000") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 18000) tdSql.checkData(i, wal_index, 2) tdSql.execute("alter database db1 wal_level 1 wal_fsync_period 3000") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 3000) diff --git a/tests/system-test/0-others/taosShell.py b/tests/system-test/0-others/taosShell.py index 4f24a3bf4a..ed53f74d66 100644 --- a/tests/system-test/0-others/taosShell.py +++ b/tests/system-test/0-others/taosShell.py @@ -162,8 +162,8 @@ class TDTestCase: tdLog.exit("taos -h %s fail"%keyDict['h']) else: #dataDbName = ["information_schema", "performance_schema", "db", newDbName] - tdSql.query("show databases") - #tdSql.getResult("show databases") + tdSql.query("select * from information_schema.ins_databases") + #tdSql.getResult("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.getData(i, 0) == newDbName: break @@ -184,7 +184,7 @@ class TDTestCase: if retCode != "TAOS_OK": tdLog.exit("taos -P %s fail"%keyDict['P']) else: - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.getData(i, 0) == newDbName: break @@ -200,7 +200,7 @@ class TDTestCase: if retCode != "TAOS_OK": tdLog.exit("taos -u %s -p%s fail"%(keyDict['u'], keyDict['p'])) else: - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.getData(i, 0) == newDbName: break @@ -220,7 +220,7 @@ class TDTestCase: if retCode != "TAOS_OK": tdLog.exit("taos -u %s -a %s"%(keyDict['u'], retVal)) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.getData(i, 0) == newDbName: break @@ -237,7 +237,7 @@ class TDTestCase: tdLog.exit("taos -s fail") print ("========== check new db ==========") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.getData(i, 0) == newDbName: break @@ -302,7 +302,7 @@ class TDTestCase: else: sql3 = "echo 'create table ntbf (ts timestamp, c binary(40))' >> " + sqlFile sql4 = "echo 'insert into ntbf values (\"2021-04-01 08:00:00.000\", \"test taos -f1\")(\"2021-04-01 08:00:01.000\", \"test taos -f2\")' >> " + sqlFile - sql5 = "echo show databases >> " + sqlFile + sql5 = "echo select * from information_schema.ins_databases >> " + sqlFile os.system(sql1) os.system(sql2) os.system(sql3) @@ -316,7 +316,7 @@ class TDTestCase: tdLog.exit("taos -f fail") print ("========== check new db ==========") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): #print ("dbseq: %d, dbname: %s"%(i, tdSql.getData(i, 0))) if tdSql.getData(i, 0) == newDbName: @@ -384,7 +384,7 @@ class TDTestCase: if retCode != "TAOS_OK": tdLog.exit("taos -d %s fail"%(keyDict['d'])) else: - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.getData(i, 0) == newDbName: break diff --git a/tests/system-test/0-others/taosShellError.py b/tests/system-test/0-others/taosShellError.py index 8666c2e54d..0b9baaa512 100644 --- a/tests/system-test/0-others/taosShellError.py +++ b/tests/system-test/0-others/taosShellError.py @@ -244,7 +244,7 @@ class TDTestCase: else: sql3 = "echo 'create table ntbf (ts timestamp, c binary(40)) no this item' >> " + sqlFile sql4 = "echo 'insert into ntbf values (\"2021-04-01 08:00:00.000\", \"test taos -f1\")(\"2021-04-01 08:00:01.000\", \"test taos -f2\")' >> " + sqlFile - sql5 = "echo show databases >> " + sqlFile + sql5 = "echo select * from information_schema.ins_databases >> " + sqlFile os.system(sql1) os.system(sql2) os.system(sql3) @@ -258,7 +258,7 @@ class TDTestCase: tdLog.exit("taos -f fail") print ("========== check new db ==========") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): #print ("dbseq: %d, dbname: %s"%(i, tdSql.getData(i, 0))) if tdSql.getData(i, 0) == newDbName: diff --git a/tests/system-test/0-others/taosdlog.py b/tests/system-test/0-others/taosdlog.py index f8898daf41..bd3d6b9b4c 100644 --- a/tests/system-test/0-others/taosdlog.py +++ b/tests/system-test/0-others/taosdlog.py @@ -45,7 +45,7 @@ class TDTestCase: tdDnodes.stop(1) time.sleep(2) - tdSql.error("show databases") + tdSql.error("select * from information_schema.ins_databases") os.system("rm -rf %s" % logPath) if os.path.exists(logPath) == True: tdLog.exit("log pat still exist!") @@ -55,7 +55,7 @@ class TDTestCase: if os.path.exists(logPath) != True: tdLog.exit("log pat is not generated!") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") def stop(self): tdSql.close() diff --git a/tests/system-test/0-others/user_control.py b/tests/system-test/0-others/user_control.py index 5e0a2b4102..35752f5ba9 100644 --- a/tests/system-test/0-others/user_control.py +++ b/tests/system-test/0-others/user_control.py @@ -649,12 +649,12 @@ class TDTestCase: tdLog.printNoPrefix("==========step5: enable info") taos1_conn = taos.connect(user=self.__user_list[1], password=f"new{self.__passwd_list[1]}") - taos1_conn.query(f"show databases") + taos1_conn.query(f"select * from information_schema.ins_databases") tdSql.execute(f"alter user {self.__user_list[1]} enable 0") tdSql.execute(f"alter user {self.__user_list[2]} enable 0") taos1_except = True try: - taos1_conn.query("show databases") + taos1_conn.query("select * from information_schema.ins_databases") except BaseException: taos1_except = False if taos1_except: @@ -674,13 +674,13 @@ class TDTestCase: tdLog.printNoPrefix("==========step6: sysinfo info") taos3_conn = taos.connect(user=self.__user_list[3], password=f"new{self.__passwd_list[3]}") - taos3_conn.query(f"show dnodes") + taos3_conn.query(f"select * from information_schema.ins_dnodes") taos3_conn.query(f"show {DBNAME}.vgroups") tdSql.execute(f"alter user {self.__user_list[3]} sysinfo 0") tdSql.execute(f"alter user {self.__user_list[4]} sysinfo 0") taos3_except = True try: - taos3_conn.query(f"show dnodes") + taos3_conn.query(f"select * from information_schema.ins_dnodes") taos3_conn.query(f"show {DBNAME}.vgroups") except BaseException: taos3_except = False diff --git a/tests/system-test/1-insert/create_retentions.py b/tests/system-test/1-insert/create_retentions.py index 24c0dfc046..54abcec391 100644 --- a/tests/system-test/1-insert/create_retentions.py +++ b/tests/system-test/1-insert/create_retentions.py @@ -135,7 +135,7 @@ class TDTestCase: tdSql.error(err_sql) for cur_sql in self.create_databases_sql_current: tdSql.execute(cur_sql) - # tdSql.query("show databases") + # tdSql.query("select * from information_schema.ins_databases") for alter_sql in self.alter_database_sql: tdSql.error(alter_sql) diff --git a/tests/system-test/1-insert/db_tb_name_check.py b/tests/system-test/1-insert/db_tb_name_check.py index e4b164e01f..5017fde68a 100644 --- a/tests/system-test/1-insert/db_tb_name_check.py +++ b/tests/system-test/1-insert/db_tb_name_check.py @@ -44,7 +44,7 @@ class TDTestCase: new_dbname.insert(i,j) dbname_1 = ''.join(new_dbname) tdSql.execute(f'create database if not exists `{dbname_1}`') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkEqual(tdSql.queryResult[2][0],str(dbname_1)) tdSql.execute(f'drop database `{dbname_1}`') for i in range(len(list(dbname))+1): diff --git a/tests/system-test/1-insert/insertWithMoreVgroup.py b/tests/system-test/1-insert/insertWithMoreVgroup.py index aea0feda02..b80a5f9a4a 100644 --- a/tests/system-test/1-insert/insertWithMoreVgroup.py +++ b/tests/system-test/1-insert/insertWithMoreVgroup.py @@ -238,7 +238,7 @@ class TDTestCase: tsql.execute("create database %s vgroups %d"%(dbname,vgroups)) print("db has been created") - # tsql.getResult("show databases") + # tsql.getResult("select * from information_schema.ins_databases") # print(tdSql.queryResult) tsql.execute("use %s" %dbname) diff --git a/tests/system-test/1-insert/insert_drop.py b/tests/system-test/1-insert/insert_drop.py index bfba4c9e4a..3e30e94a6b 100644 --- a/tests/system-test/1-insert/insert_drop.py +++ b/tests/system-test/1-insert/insert_drop.py @@ -37,7 +37,7 @@ class TDTestCase: sql_list.append(f'drop database test;') tlist = self.genMultiThreadSeq(sql_list) self.multiThreadRun(tlist) - tdSql.query(f'show databases') + tdSql.query(f'select * from information_schema.ins_databases') def stop(self): diff --git a/tests/system-test/1-insert/mutil_stage.py b/tests/system-test/1-insert/mutil_stage.py index fcad114edd..764da1f166 100644 --- a/tests/system-test/1-insert/mutil_stage.py +++ b/tests/system-test/1-insert/mutil_stage.py @@ -176,7 +176,7 @@ class TDTestCase: self.cfg_str_list(filename=self.taos_cfg_path, update_list=cfg_case) tdDnodes.starttaosd(1) time.sleep(2) - tdSql.error(f"show databases") + tdSql.error(f"select * from information_schema.ins_databases") for cfg_case in self.__current_cfg: self.del_old_datadir(filename=self.taos_cfg_path) @@ -184,7 +184,7 @@ class TDTestCase: tdDnodes.deploy(1) self.cfg_str_list(filename=self.taos_cfg_path, update_list=cfg_case) tdDnodes.start(1) - tdSql.query(f"show databases") + tdSql.query(f"select * from information_schema.ins_databases") def __create_tb(self, stb=STBNAME, ctb_pre = CTB_PRE, ctb_num=20, ntb_pre=NTB_PRE, ntbnum=1, dbname=DBNAME): tdLog.printNoPrefix("==========step: create table") diff --git a/tests/system-test/1-insert/time_range_wise.py b/tests/system-test/1-insert/time_range_wise.py index e66f5560df..8f61da221d 100644 --- a/tests/system-test/1-insert/time_range_wise.py +++ b/tests/system-test/1-insert/time_range_wise.py @@ -291,7 +291,7 @@ class TDTestCase: return False tdSql.query("select database()") dbname = tdSql.getData(0,0) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for index , value in enumerate(tdSql.cursor.description): if value[0] == "retention": r_index = index diff --git a/tests/system-test/2-query/check_tsdb.py b/tests/system-test/2-query/check_tsdb.py index 8d5bcc370d..f504a55dcd 100644 --- a/tests/system-test/2-query/check_tsdb.py +++ b/tests/system-test/2-query/check_tsdb.py @@ -67,11 +67,11 @@ class TDTestCase: tdDnodes.stop(1) tdDnodes.start(1) time.sleep(2) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") status = False while status==False: - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for db_info in tdSql.queryResult: if db_info[0]==dbname : if db_info[15]=="ready": diff --git a/tests/system-test/2-query/csum.py b/tests/system-test/2-query/csum.py index 953dd1e491..83aaca8f12 100644 --- a/tests/system-test/2-query/csum.py +++ b/tests/system-test/2-query/csum.py @@ -406,7 +406,7 @@ class TDTestCase: tdLog.printNoPrefix("######## check after WAL test:") - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") index = tdSql.getData(0, 0) tdDnodes.stop(index) tdDnodes.start(index) diff --git a/tests/system-test/2-query/explain.py b/tests/system-test/2-query/explain.py index 7ecf12b917..b1d4b39312 100644 --- a/tests/system-test/2-query/explain.py +++ b/tests/system-test/2-query/explain.py @@ -185,11 +185,11 @@ class TDTestCase: tdLog.printNoPrefix("===step 0: err case, must return err") tdSql.error( f"explain select hyperloglog({INT_COL}) from {dbname}.ct8" ) - tdSql.error( f"explain show databases " ) + tdSql.error( f"explain select * from information_schema.ins_databases " ) tdSql.error( f"explain show {dbname}.stables " ) tdSql.error( f"explain show {dbname}.tables " ) tdSql.error( f"explain show {dbname}.vgroups " ) - tdSql.error( f"explain show dnodes " ) + tdSql.error( f"explain select * from information_schema.ins_dnodes " ) tdSql.error( f'''explain select hyperloglog(['{INT_COL} + {INT_COL}', '{INT_COL} + {BINT_COL}', '{INT_COL} + {SINT_COL}', '{INT_COL} + {TINT_COL}', '{INT_COL} + {FLOAT_COL}', '{INT_COL} + {DOUBLE_COL}', '{INT_COL} + {BOOL_COL}', '{INT_COL} + {BINARY_COL}', '{INT_COL} + {NCHAR_COL}', '{INT_COL} + {TS_COL}']) from {dbname}.ct1 where ['{INT_COL} + {INT_COL}', '{INT_COL} + {BINT_COL}', '{INT_COL} + {SINT_COL}', '{INT_COL} + {TINT_COL}', '{INT_COL} + {FLOAT_COL}', '{INT_COL} + {DOUBLE_COL}', '{INT_COL} + {BOOL_COL}', '{INT_COL} + {BINARY_COL}', '{INT_COL} + {NCHAR_COL}', '{INT_COL} + {TS_COL}'] is not null diff --git a/tests/system-test/2-query/function_diff.py b/tests/system-test/2-query/function_diff.py index bd615cc3c1..fd5d6ea1cf 100644 --- a/tests/system-test/2-query/function_diff.py +++ b/tests/system-test/2-query/function_diff.py @@ -439,7 +439,7 @@ class TDTestCase: tdLog.printNoPrefix("######## check after WAL test:") - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") index = tdSql.getData(0, 0) tdDnodes.stop(index) tdDnodes.start(index) diff --git a/tests/system-test/2-query/mavg.py b/tests/system-test/2-query/mavg.py index 91e5e013b4..d7dc5e6143 100644 --- a/tests/system-test/2-query/mavg.py +++ b/tests/system-test/2-query/mavg.py @@ -658,7 +658,7 @@ class TDTestCase: tdLog.printNoPrefix("######## check after WAL test:") - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") index = tdSql.getData(0, 0) tdDnodes.stop(index) tdDnodes.start(index) diff --git a/tests/system-test/2-query/qnodeCluster.py b/tests/system-test/2-query/qnodeCluster.py index 23adfb768d..f68eb58a7a 100644 --- a/tests/system-test/2-query/qnodeCluster.py +++ b/tests/system-test/2-query/qnodeCluster.py @@ -218,7 +218,7 @@ class TDTestCase: mnodeNums=int(mnodeNums) vnodeNumbers = int(dnodeNumbers-mnodeNums) - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdLog.debug(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) diff --git a/tests/system-test/2-query/queryQnode.py b/tests/system-test/2-query/queryQnode.py index 176c7ccf3e..7bd573d7fc 100644 --- a/tests/system-test/2-query/queryQnode.py +++ b/tests/system-test/2-query/queryQnode.py @@ -240,7 +240,7 @@ class TDTestCase: tsql.execute("create database %s vgroups %d"%(dbname,vgroups)) print("db has been created") - # tsql.getResult("show databases") + # tsql.getResult("select * from information_schema.ins_databases") # print(tdSql.queryResult) tsql.execute("use %s" %dbname) @@ -282,7 +282,7 @@ class TDTestCase: def test_case1(self): self.taosBenchCreate("127.0.0.1","no","db1", "stb1", 1, 2, 1*10) tdSql.execute("use db1;") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") dnodeId=tdSql.getData(0,0) print(dnodeId) tdLog.debug("create qnode on dnode %s"%dnodeId) @@ -296,7 +296,7 @@ class TDTestCase: tdSql.query("select c0,c1 from stb11_1 where (c0>1000) union all select c0,c1 from stb11_1 where c0>2000;") unionallQnode=tdSql.queryResult - # tdSql.query("show qnodes;") + # tdSql.query("select * from information_schema.ins_qnodes;") # qnodeId=tdSql.getData(0,0) tdLog.debug("drop qnode on dnode %s"%dnodeId) tdSql.execute("drop qnode on dnode %s"%dnodeId) @@ -330,7 +330,7 @@ class TDTestCase: tdSql.execute("reset query cache") tdSql.execute("use db1;") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") dnodeId=tdSql.getData(0,0) tdLog.debug("create qnode on dnode %s"%dnodeId) @@ -344,7 +344,7 @@ class TDTestCase: tdSql.query("select c0,c1 from stb11_1 where (c0>1000) union all select c0,c1 from stb11_1 where c0>2000;") assert unionallQnode==tdSql.queryResult - # tdSql.query("show qnodes;") + # tdSql.query("select * from information_schema.ins_qnodes;") # qnodeId=tdSql.getData(0,0) tdLog.debug("drop qnode on dnode %s"%dnodeId) tdSql.execute("drop qnode on dnode %s"%dnodeId) @@ -377,7 +377,7 @@ class TDTestCase: tdSql.execute("reset query cache") tdSql.execute("use db1;") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") dnodeId=tdSql.getData(0,0) tdLog.debug("create qnode on dnode %s"%dnodeId) @@ -405,7 +405,7 @@ class TDTestCase: tdSql.execute("reset query cache") tdSql.execute("use db1;") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") dnodeId=tdSql.getData(0,0) tdSql.query("select max(c1) from stb10;") assert maxQnode==tdSql.getData(0,0) @@ -419,7 +419,7 @@ class TDTestCase: # test case : queryPolicy = 2 def test_case2(self): self.taosBenchCreate("127.0.0.1","no","db1", "stb1", 10, 2, 1*10) - tdSql.query("show qnodes") + tdSql.query("select * from information_schema.ins_qnodes") if tdSql.queryRows == 1 : tdLog.debug("drop qnode on dnode 1") tdSql.execute("drop qnode on dnode 1") @@ -455,7 +455,7 @@ class TDTestCase: tdLog.debug("create qnode on dnode 1") tdSql.execute("create qnode on dnode 1") tdSql.execute("use db1;") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") dnodeId=tdSql.getData(0,0) print(dnodeId) @@ -468,7 +468,7 @@ class TDTestCase: tdSql.query("select c0,c1 from stb11_1 where (c0>1000) union all select c0,c1 from stb11_1 where c0>2000;") unionallQnode=tdSql.queryResult - # tdSql.query("show qnodes;") + # tdSql.query("select * from information_schema.ins_qnodes;") # qnodeId=tdSql.getData(0,0) tdLog.debug("drop qnode on dnode %s"%dnodeId) diff --git a/tests/system-test/2-query/sample.py b/tests/system-test/2-query/sample.py index cb74c33d92..34615c0515 100644 --- a/tests/system-test/2-query/sample.py +++ b/tests/system-test/2-query/sample.py @@ -846,7 +846,7 @@ class TDTestCase: tdLog.printNoPrefix("######## check after WAL test:") - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") index = tdSql.getData(0, 0) tdDnodes.stop(index) tdDnodes.start(index) diff --git a/tests/system-test/6-cluster/5dnode1mnode.py b/tests/system-test/6-cluster/5dnode1mnode.py index 60b70433ed..367d0bfbd7 100644 --- a/tests/system-test/6-cluster/5dnode1mnode.py +++ b/tests/system-test/6-cluster/5dnode1mnode.py @@ -89,7 +89,7 @@ class TDTestCase: tdLog.info(" create cluster done! ") def five_dnode_one_mnode(self): - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(0,4,'ready') @@ -121,11 +121,11 @@ class TDTestCase: for i in range(4): tdSql.execute(f'create table ct{i+1} using stb1 tags ( {i+1} )') - tdSql.query('show databases;') + tdSql.query('select * from information_schema.ins_databases;') tdSql.checkData(2,5,'off') tdSql.error("alter database db strict 'off'") # tdSql.execute('alter database db strict 'on'') - # tdSql.query('show databases;') + # tdSql.query('select * from information_schema.ins_databases;') # tdSql.checkData(2,5,'on') def getConnection(self, dnode): diff --git a/tests/system-test/6-cluster/5dnode2mnode.py b/tests/system-test/6-cluster/5dnode2mnode.py index f62483cfe2..7cbadde8bf 100644 --- a/tests/system-test/6-cluster/5dnode2mnode.py +++ b/tests/system-test/6-cluster/5dnode2mnode.py @@ -43,7 +43,7 @@ class TDTestCase: return buildPath def five_dnode_two_mnode(self): - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(0,4,'ready') @@ -101,7 +101,7 @@ class TDTestCase: for i in range(4): tdSql.execute(f'create table ct{i+1} using stb1 tags ( {i+1} )') tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(5) # restart all taosd diff --git a/tests/system-test/6-cluster/5dnode3mnodeAdd1Ddnoe.py b/tests/system-test/6-cluster/5dnode3mnodeAdd1Ddnoe.py index af78dfae9d..909decc195 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeAdd1Ddnoe.py +++ b/tests/system-test/6-cluster/5dnode3mnodeAdd1Ddnoe.py @@ -120,7 +120,7 @@ class TDTestCase: dbNumbers = 1 tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodeNumbers) @@ -136,7 +136,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) diff --git a/tests/system-test/6-cluster/5dnode3mnodeDrop.py b/tests/system-test/6-cluster/5dnode3mnodeDrop.py index d95124c445..33dc3ebaac 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeDrop.py +++ b/tests/system-test/6-cluster/5dnode3mnodeDrop.py @@ -244,7 +244,7 @@ class TDTestCase: def five_dnode_three_mnode(self): - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(0,4,'ready') @@ -267,7 +267,7 @@ class TDTestCase: tdSql.error("drop mnode on dnode 1") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdLog.debug(tdSql.queryResult) # drop follower of mnode diff --git a/tests/system-test/6-cluster/5dnode3mnodeDropInsert.py b/tests/system-test/6-cluster/5dnode3mnodeDropInsert.py index 6443a4a7f0..74a7c32206 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeDropInsert.py +++ b/tests/system-test/6-cluster/5dnode3mnodeDropInsert.py @@ -184,7 +184,7 @@ class TDTestCase: while count < 10: time.sleep(1) statusReadyBumber=0 - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") if tdSql.checkRows(dnodenumber) : print("dnode is %d nodes"%dnodenumber) for i in range(dnodenumber): @@ -343,7 +343,7 @@ class TDTestCase: rowsPerTable=100 startTs=1640966400000 # 2022-01-01 00:00:00.000 - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(0,4,'ready') @@ -362,7 +362,7 @@ class TDTestCase: self.check3mnode() tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) tdLog.debug("stop all of mnode ") diff --git a/tests/system-test/6-cluster/5dnode3mnodeRecreateMnode.py b/tests/system-test/6-cluster/5dnode3mnodeRecreateMnode.py index 8e8a4d957c..2e107561b5 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeRecreateMnode.py +++ b/tests/system-test/6-cluster/5dnode3mnodeRecreateMnode.py @@ -122,7 +122,7 @@ class TDTestCase: dbNumbers = 1 tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodeNumbers) @@ -138,7 +138,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) diff --git a/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py b/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py index 8a0c90966b..3fe6a689cb 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py +++ b/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py @@ -120,7 +120,7 @@ class TDTestCase: dbNumbers = 1 tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodeNumbers) @@ -136,7 +136,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) diff --git a/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py b/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py index 5f02efc7ce..0d56729280 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py +++ b/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py @@ -120,7 +120,7 @@ class TDTestCase: dbNumbers = 1 tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodeNumbers) @@ -136,7 +136,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py index 6debffdeb8..a215a74559 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py @@ -115,7 +115,7 @@ class TDTestCase: allStbNumbers=(paraDict['stbNumbers']*restartNumbers) tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodeNumbers) @@ -131,7 +131,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) @@ -185,7 +185,7 @@ class TDTestCase: tr.join() tdLog.info("check dnode number:") clusterComCheck.checkDnodes(dnodeNumbers) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdLog.debug("we find %d databases but exepect to create %d databases "%(tdSql.queryRows-2,allDbNumbers)) # tdLog.info("check DB Rows:") diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py index 919c560330..9df1ffb3df 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py @@ -89,7 +89,7 @@ class TDTestCase: dbNumbers = 1 tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodeNumbers) @@ -105,7 +105,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeInsertData.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeInsertData.py index 562721581d..caaf1dd898 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeInsertData.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeInsertData.py @@ -120,7 +120,7 @@ class TDTestCase: dbNumbers = 1 tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodeNumbers) @@ -136,7 +136,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py index 3736166a83..58ed8cde63 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py @@ -90,7 +90,7 @@ class TDTestCase: allStbNumbers=(paraDict['stbNumbers']*restartNumbers) tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodeNumbers) @@ -108,7 +108,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) @@ -160,7 +160,7 @@ class TDTestCase: tr.join() tdLog.info("check dnode number:") clusterComCheck.checkDnodes(dnodeNumbers) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdLog.debug("we find %d databases but exepect to create %d databases "%(tdSql.queryRows-2,allDbNumbers)) # tdLog.info("check DB Rows:") diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDbRep3.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDbRep3.py index ea8e9612a2..3dc3e7ec65 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDbRep3.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDbRep3.py @@ -90,7 +90,7 @@ class TDTestCase: allStbNumbers=(paraDict['stbNumbers']*restartNumbers) tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodeNumbers) @@ -106,7 +106,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) @@ -158,7 +158,7 @@ class TDTestCase: tr.join() tdLog.info("check dnode number:") clusterComCheck.checkDnodes(dnodeNumbers) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdLog.debug("we find %d databases but exepect to create %d databases "%(tdSql.queryRows-2,allDbNumbers)) # tdLog.info("check DB Rows:") diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateStb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateStb.py index d8c9b9e54d..371d147efc 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateStb.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateStb.py @@ -114,7 +114,7 @@ class TDTestCase: dbNumbers = 1 tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodeNumbers) @@ -130,7 +130,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py index 706c8ad9d5..6fbe262b8e 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py @@ -90,7 +90,7 @@ class TDTestCase: allStbNumbers=(paraDict['stbNumbers']*restartNumbers) tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodeNumbers) @@ -106,7 +106,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) @@ -159,7 +159,7 @@ class TDTestCase: for tr in threads: tr.join() clusterComCheck.checkDnodes(dnodeNumbers) - # tdSql.query("show databases") + # tdSql.query("select * from information_schema.ins_databases") # tdLog.debug("we find %d databases but exepect to create %d databases "%(tdSql.queryRows-2,allDbNumbers)) # tdLog.info("check DB Rows:") diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateStb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateStb.py index c9f7cdacaf..56bafe8abc 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateStb.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateStb.py @@ -115,7 +115,7 @@ class TDTestCase: print(tdSql) tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodeNumbers) @@ -131,7 +131,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) diff --git a/tests/system-test/6-cluster/5dnode3mnodeSeperate1VnodeStopInsert.py b/tests/system-test/6-cluster/5dnode3mnodeSeperate1VnodeStopInsert.py index 870596175e..539e5e38a7 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSeperate1VnodeStopInsert.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSeperate1VnodeStopInsert.py @@ -103,7 +103,7 @@ class TDTestCase: while count < 100: time.sleep(1) statusReadyBumber=0 - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") if tdSql.checkRows(dnodenumber) : print("dnode is %d nodes"%dnodenumber) for i in range(dnodenumber): @@ -253,14 +253,14 @@ class TDTestCase: def check5dnode(self): - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(0,4,'ready') tdSql.checkData(4,4,'ready') def five_dnode_three_mnode(self,dnodenumber): - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(0,4,'ready') @@ -279,7 +279,7 @@ class TDTestCase: self.check3mnode() tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) tdLog.debug("stop all of mnode ") diff --git a/tests/system-test/6-cluster/5dnode3mnodeStop.py b/tests/system-test/6-cluster/5dnode3mnodeStop.py index 09974db884..c43d41199b 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeStop.py +++ b/tests/system-test/6-cluster/5dnode3mnodeStop.py @@ -71,7 +71,7 @@ class TDTestCase: dbNumbers = int(dnodenumbers * restartNumber) tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodenumbers) @@ -87,7 +87,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") # print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodenumbers) # restart all taosd diff --git a/tests/system-test/6-cluster/5dnode3mnodeStop2Follower.py b/tests/system-test/6-cluster/5dnode3mnodeStop2Follower.py index 9211ed3af8..584dd645f6 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeStop2Follower.py +++ b/tests/system-test/6-cluster/5dnode3mnodeStop2Follower.py @@ -71,7 +71,7 @@ class TDTestCase: dbNumbers = 1 tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodenumbers) @@ -87,7 +87,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") # print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodenumbers) # restart all taosd diff --git a/tests/system-test/6-cluster/5dnode3mnodeStopConnect.py b/tests/system-test/6-cluster/5dnode3mnodeStopConnect.py index 0a8c94b080..5638b01070 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeStopConnect.py +++ b/tests/system-test/6-cluster/5dnode3mnodeStopConnect.py @@ -71,7 +71,7 @@ class TDTestCase: dbNumbers = int(dnodenumbers * restartNumber) tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodenumbers) @@ -87,7 +87,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodenumbers) diff --git a/tests/system-test/6-cluster/5dnode3mnodeStopFollowerLeader.py b/tests/system-test/6-cluster/5dnode3mnodeStopFollowerLeader.py index e5cf7c5254..6daa4c260a 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeStopFollowerLeader.py +++ b/tests/system-test/6-cluster/5dnode3mnodeStopFollowerLeader.py @@ -71,7 +71,7 @@ class TDTestCase: dbNumbers = 1 tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodenumbers) @@ -87,7 +87,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") # print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodenumbers) # restart all taosd diff --git a/tests/system-test/6-cluster/5dnode3mnodeStopInsert.py b/tests/system-test/6-cluster/5dnode3mnodeStopInsert.py index 94796a8280..dcd9e56a64 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeStopInsert.py +++ b/tests/system-test/6-cluster/5dnode3mnodeStopInsert.py @@ -142,7 +142,7 @@ class TDTestCase: while count < 10: time.sleep(1) statusReadyBumber=0 - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") if tdSql.checkRows(dnodenumber) : tdLog.debug("dnode is %d nodes"%dnodenumber) for i in range(dnodenumber): @@ -291,7 +291,7 @@ class TDTestCase: tdSql.checkData(2,3,'ready') def five_dnode_three_mnode(self,dnodenumber): - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(0,4,'ready') @@ -310,7 +310,7 @@ class TDTestCase: self.check3mnode() tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdLog.debug(tdSql.queryResult) tdLog.debug("stop all of mnode ") diff --git a/tests/system-test/6-cluster/5dnode3mnodeStopLoop.py b/tests/system-test/6-cluster/5dnode3mnodeStopLoop.py index c7c45a19c6..1644686568 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeStopLoop.py +++ b/tests/system-test/6-cluster/5dnode3mnodeStopLoop.py @@ -71,7 +71,7 @@ class TDTestCase: dbNumbers = int(dnodenumbers * restartNumber) tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodenumbers) @@ -87,7 +87,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") # print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodenumbers) # restart all taosd diff --git a/tests/system-test/6-cluster/clusterCommonCheck.py b/tests/system-test/6-cluster/clusterCommonCheck.py index b16956c497..c37e3541d4 100644 --- a/tests/system-test/6-cluster/clusterCommonCheck.py +++ b/tests/system-test/6-cluster/clusterCommonCheck.py @@ -41,7 +41,7 @@ class ClusterComCheck: count=0 # print(tdSql) while count < 30: - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") # tdLog.debug(tdSql.queryResult) status=0 for i in range(dnodeNumbers): @@ -55,7 +55,7 @@ class ClusterComCheck: count+=1 time.sleep(1) else: - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") tdLog.debug(tdSql.queryResult) tdLog.exit("it find cluster with %d dnodes but check that there dnodes are not ready within 30s ! "%dnodeNumbers) @@ -63,7 +63,7 @@ class ClusterComCheck: dbNumbers=int(dbNumbers) count=0 while count < 5: - tdSql.query("show databases;") + tdSql.query("select * from information_schema.ins_databases;") count+=1 if tdSql.checkRows(dbNumbers+2): tdLog.success("we find %d databases and expect %d in clusters! " %(tdSql.queryRows,dbNumbers+2)) @@ -81,7 +81,7 @@ class ClusterComCheck: query_status=0 for j in range(dbNumbers): for i in range(alldbNumbers): - tdSql.query("show databases;") + tdSql.query("select * from information_schema.ins_databases;") if "%s_%d"%(dbNameIndex,j) == tdSql.queryResult[i][0] : if tdSql.queryResult[i][15] == "ready": query_status+=1 diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py index ed846f8f05..050c10d093 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py @@ -47,7 +47,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py index 7f7543971c..1e1f45d65e 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py @@ -53,7 +53,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py index 0a3c4544a0..ca12dd6c9d 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py @@ -54,7 +54,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py index 588b815dce..2d3e5e3178 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py @@ -53,7 +53,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py index 481ce93358..0557836ab2 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py @@ -63,7 +63,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -217,7 +217,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -239,7 +239,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py index 302914d775..c8fa8ee435 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py @@ -54,7 +54,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py index aea6d798fb..447da77db3 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py @@ -56,7 +56,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -184,7 +184,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -207,7 +207,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py index 5d50ff0353..6175f4e7cc 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py @@ -56,7 +56,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -200,7 +200,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -223,7 +223,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py index fd54b28a82..27405774cc 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py @@ -56,7 +56,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -199,7 +199,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -222,7 +222,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py index 210e5efcbf..01c52577f0 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py @@ -63,7 +63,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -217,7 +217,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -239,7 +239,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py index 802cd752ee..1dc364c2fd 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py @@ -62,7 +62,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -259,7 +259,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -282,7 +282,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py index 545feaf5f1..3873040d20 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py @@ -62,7 +62,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -258,7 +258,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -280,7 +280,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py index dbdc590eae..188b0030f2 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py @@ -62,7 +62,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -258,7 +258,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -281,7 +281,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -452,7 +452,7 @@ class TDTestCase: # force stop taosd by kill -9 self.force_stop_dnode(self.stop_dnode_id) self.wait_stop_dnode_OK(newTdSql) - os.system(" taos -s 'show dnodes;' ") + os.system(" taos -s 'select * from information_schema.ins_dnodes;' ") tdDnodes[self.stop_dnode_id-1].starttaosd() self.wait_start_dnode_OK(newTdSql) end = time.time() @@ -508,7 +508,7 @@ class TDTestCase: def force_stop_dnode(self, dnode_id ): - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") port = None for dnode_info in tdSql.queryResult: if dnode_id == dnode_info[0]: diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py index 00448cbae6..2451b0cd90 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py @@ -145,7 +145,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -213,7 +213,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -235,7 +235,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -304,12 +304,12 @@ class TDTestCase: self.current_thread = threading.Thread(target=self.start_benchmark_inserts, args=(dbname,json_file)) self.current_thread.start() - tdSql.query(" show databases ") + tdSql.query(" select * from information_schema.ins_databases ") # make sure create database ok while (tdSql.queryRows!=3): time.sleep(0.5) - tdSql.query(" show databases ") + tdSql.query(" select * from information_schema.ins_databases ") # # make sure create stable ok tdSql.query(" show {}.stables ".format(dbname)) @@ -318,7 +318,7 @@ class TDTestCase: tdSql.query(" show {}.stables ".format(dbname)) # stop leader of database when insert 10% rows - # os.system("taos -s 'show databases';") + # os.system("taos -s 'select * from information_schema.ins_databases';") tdSql.query(" select count(*) from {}.{} ".format(dbname,"stb1")) while not tdSql.queryResult: diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py index 9bbb84281e..5ba6c6ab8d 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py @@ -145,7 +145,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -340,7 +340,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -363,7 +363,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -416,7 +416,7 @@ class TDTestCase: def force_stop_dnode(self, dnode_id ): - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") port = None for dnode_info in tdSql.queryResult: if dnode_id == dnode_info[0]: diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py index 5ec17ec0e0..0a4162bd99 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py @@ -54,7 +54,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py index 33e0ae3058..8e261c8d8f 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py @@ -64,7 +64,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -218,7 +218,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -240,7 +240,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -346,7 +346,7 @@ class TDTestCase: def force_stop_dnode(self, dnode_id ): - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") port = None for dnode_info in tdSql.queryResult: if dnode_id == dnode_info[0]: diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower_force_stop.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower_force_stop.py index 7c67bde776..8f11d3f63c 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower_force_stop.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower_force_stop.py @@ -64,7 +64,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -218,7 +218,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -240,7 +240,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -346,7 +346,7 @@ class TDTestCase: def force_stop_dnode(self, dnode_id ): - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") port = None for dnode_info in tdSql.queryResult: if dnode_id == dnode_info[0]: diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py index ed1fcc026c..b4f5046a37 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py @@ -64,7 +64,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -218,7 +218,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -263,7 +263,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -381,7 +381,7 @@ class TDTestCase: def force_stop_dnode(self, dnode_id ): - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") port = None for dnode_info in tdSql.queryResult: if dnode_id == dnode_info[0]: diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader_force_stop.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader_force_stop.py index 97ebf4292e..3b3a27c834 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader_force_stop.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader_force_stop.py @@ -64,7 +64,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -218,7 +218,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -262,7 +262,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -380,7 +380,7 @@ class TDTestCase: def force_stop_dnode(self, dnode_id ): - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") port = None for dnode_info in tdSql.queryResult: if dnode_id == dnode_info[0]: diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py index dc12c74a98..31f380f29f 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py @@ -53,7 +53,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py index 5f6ac9fcc7..5475d1cc37 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py @@ -56,7 +56,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -166,7 +166,7 @@ class TDTestCase: def _get_status(): status = "" - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") dnode_infos = tdSql.queryResult for dnode_info in dnode_infos: endpoint = dnode_info[1] @@ -188,7 +188,7 @@ class TDTestCase: def _get_status(): status = "" - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") dnode_infos = tdSql.queryResult for dnode_info in dnode_infos: endpoint = dnode_info[1] @@ -214,7 +214,7 @@ class TDTestCase: tdDnodes=cluster.dnodes tdDnodes[stop_dnode_id-1].stoptaosd() self.wait_stop_dnode_OK() - # os.system("taos -s 'show dnodes;'") + # os.system("taos -s 'select * from information_schema.ins_dnodes;'") def Restart_stop_dnode(self): @@ -222,7 +222,7 @@ class TDTestCase: stop_dnode_id = self.dnode_list[self.stop_dnode][0] tdDnodes[stop_dnode_id-1].starttaosd() self.wait_start_dnode_OK() - # os.system("taos -s 'show dnodes;'") + # os.system("taos -s 'select * from information_schema.ins_dnodes;'") def check_vgroups_init_done(self,dbname): diff --git a/tests/system-test/7-tmq/basic5.py b/tests/system-test/7-tmq/basic5.py index 94201a335d..9531541f13 100644 --- a/tests/system-test/7-tmq/basic5.py +++ b/tests/system-test/7-tmq/basic5.py @@ -249,7 +249,7 @@ class TDTestCase: # wait db ready while 1: - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") if tdSql.getRows() == 4: print ('==================================================') print (tdSql.getData(0,0), tdSql.getData(1,0),tdSql.getData(2,0)) @@ -393,7 +393,7 @@ class TDTestCase: # wait db ready while 1: - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") if tdSql.getRows() == 5: print ('==================================================dbname: %s'%parameterDict['dbName']) print (tdSql.getData(0,0), tdSql.getData(1,0),tdSql.getData(2,0),tdSql.getData(3,0),tdSql.getData(4,0)) diff --git a/tests/system-test/7-tmq/tmq3mnodeSwitch.py b/tests/system-test/7-tmq/tmq3mnodeSwitch.py index 9a98c69aff..7ba914c05c 100644 --- a/tests/system-test/7-tmq/tmq3mnodeSwitch.py +++ b/tests/system-test/7-tmq/tmq3mnodeSwitch.py @@ -40,7 +40,7 @@ class TDTestCase: def checkDnodesStatusAndCreateMnode(self,dnodeNumbers): count=0 while count < dnodeNumbers: - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") # tdLog.debug(tdSql.queryResult) dCnt = 0 for i in range(dnodeNumbers): diff --git a/tests/system-test/99-TDcase/TD-15517.py b/tests/system-test/99-TDcase/TD-15517.py index 99ca02aab7..fe2d9b9041 100644 --- a/tests/system-test/99-TDcase/TD-15517.py +++ b/tests/system-test/99-TDcase/TD-15517.py @@ -250,7 +250,7 @@ class TDTestCase: # wait db ready while 1: - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") if tdSql.getRows() == 4: print (tdSql.getData(0,0), tdSql.getData(1,0),tdSql.getData(2,0),) break diff --git a/tests/system-test/99-TDcase/TD-15554.py b/tests/system-test/99-TDcase/TD-15554.py index 4012696dc7..16a34086b7 100644 --- a/tests/system-test/99-TDcase/TD-15554.py +++ b/tests/system-test/99-TDcase/TD-15554.py @@ -236,7 +236,7 @@ class TDTestCase: # wait db ready while 1: - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") if tdSql.getRows() == 4: print (tdSql.getData(0,0), tdSql.getData(1,0),tdSql.getData(2,0),) break @@ -358,7 +358,7 @@ class TDTestCase: # wait db ready while 1: - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") if tdSql.getRows() == 4: print (tdSql.getData(0,0), tdSql.getData(1,0),tdSql.getData(2,0),) break