From 596c86dd95da20ccc9f70d10962cfba590ea9010 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Tue, 2 Aug 2022 13:47:04 +0800 Subject: [PATCH] fix: fix case issue --- source/client/src/clientSml.c | 3 ++- source/dnode/mnode/impl/test/db/db.cpp | 14 +++++------ source/dnode/mnode/impl/test/func/func.cpp | 10 ++++---- .../dnode/mnode/impl/test/profile/profile.cpp | 4 ++-- source/dnode/mnode/impl/test/show/show.cpp | 4 ++-- source/dnode/mnode/impl/test/sma/sma.cpp | 4 ++-- source/dnode/mnode/impl/test/stb/stb.cpp | 22 ++++++++--------- source/dnode/mnode/impl/test/user/user.cpp | 24 +++++++++---------- source/libs/parser/test/parSelectTest.cpp | 2 +- source/libs/planner/test/planSysTbTest.cpp | 2 +- 10 files changed, 45 insertions(+), 44 deletions(-) diff --git a/source/client/src/clientSml.c b/source/client/src/clientSml.c index d860224827..9f905a8352 100644 --- a/source/client/src/clientSml.c +++ b/source/client/src/clientSml.c @@ -420,7 +420,8 @@ static int32_t smlSendMetaMsg(SSmlHandle *info, SName *pName, SSmlSTableMeta *s } tSerializeSMCreateStbReq(pCmdMsg.pMsg, pCmdMsg.msgLen, &pReq); - SQuery pQuery = {0}; + SQuery pQuery; + memset(&pQuery, 0, sizeof(pQuery)); pQuery.execMode = QUERY_EXEC_MODE_RPC; pQuery.pCmdMsg = &pCmdMsg; pQuery.msgType = pQuery.pCmdMsg->msgType; diff --git a/source/dnode/mnode/impl/test/db/db.cpp b/source/dnode/mnode/impl/test/db/db.cpp index 06916b375c..94ba7f2968 100644 --- a/source/dnode/mnode/impl/test/db/db.cpp +++ b/source/dnode/mnode/impl/test/db/db.cpp @@ -26,7 +26,7 @@ class MndTestDb : public ::testing::Test { Testbase MndTestDb::test; TEST_F(MndTestDb, 01_ShowDb) { - test.SendShowReq(TSDB_MGMT_TABLE_DB, "user_databases", ""); + test.SendShowReq(TSDB_MGMT_TABLE_DB, "ins_databases", ""); EXPECT_EQ(test.GetShowRows(), 2); } @@ -64,10 +64,10 @@ TEST_F(MndTestDb, 02_Create_Alter_Drop_Db) { ASSERT_EQ(pRsp->code, 0); } - test.SendShowReq(TSDB_MGMT_TABLE_DB, "user_databases", ""); + test.SendShowReq(TSDB_MGMT_TABLE_DB, "ins_databases", ""); EXPECT_EQ(test.GetShowRows(), 3); - test.SendShowReq(TSDB_MGMT_TABLE_VGROUP, "vgroups", "1.d1"); + test.SendShowReq(TSDB_MGMT_TABLE_VGROUP, "ins_vgroups", "1.d1"); EXPECT_EQ(test.GetShowRows(), 2); { @@ -96,13 +96,13 @@ TEST_F(MndTestDb, 02_Create_Alter_Drop_Db) { ASSERT_EQ(pRsp->code, TSDB_CODE_OPS_NOT_SUPPORT); } - test.SendShowReq(TSDB_MGMT_TABLE_DB, "user_databases", ""); + test.SendShowReq(TSDB_MGMT_TABLE_DB, "ins_databases", ""); EXPECT_EQ(test.GetShowRows(), 3); // restart test.Restart(); - test.SendShowReq(TSDB_MGMT_TABLE_DB, "user_databases", ""); + test.SendShowReq(TSDB_MGMT_TABLE_DB, "ins_databases", ""); EXPECT_EQ(test.GetShowRows(), 3); { @@ -122,7 +122,7 @@ TEST_F(MndTestDb, 02_Create_Alter_Drop_Db) { EXPECT_STREQ(dropdbRsp.db, "1.d1"); } - test.SendShowReq(TSDB_MGMT_TABLE_DB, "user_databases", ""); + test.SendShowReq(TSDB_MGMT_TABLE_DB, "ins_databases", ""); EXPECT_EQ(test.GetShowRows(), 2); } @@ -160,7 +160,7 @@ TEST_F(MndTestDb, 03_Create_Use_Restart_Use_Db) { ASSERT_EQ(pRsp->code, 0); } - test.SendShowReq(TSDB_MGMT_TABLE_DB, "user_databases", ""); + test.SendShowReq(TSDB_MGMT_TABLE_DB, "ins_databases", ""); EXPECT_EQ(test.GetShowRows(), 3); uint64_t d2_uid = 0; diff --git a/source/dnode/mnode/impl/test/func/func.cpp b/source/dnode/mnode/impl/test/func/func.cpp index 2bebe7ef19..53029f5963 100644 --- a/source/dnode/mnode/impl/test/func/func.cpp +++ b/source/dnode/mnode/impl/test/func/func.cpp @@ -46,7 +46,7 @@ void MndTestFunc::SetBufSize(SCreateFuncReq* pReq, int32_t size) { } TEST_F(MndTestFunc, 01_Show_Func) { - test.SendShowReq(TSDB_MGMT_TABLE_FUNC, "user_functions", ""); + test.SendShowReq(TSDB_MGMT_TABLE_FUNC, "ins_functions", ""); EXPECT_EQ(test.GetShowRows(), 0); } @@ -159,7 +159,7 @@ TEST_F(MndTestFunc, 02_Create_Func) { } } - test.SendShowReq(TSDB_MGMT_TABLE_FUNC, "user_functions", ""); + test.SendShowReq(TSDB_MGMT_TABLE_FUNC, "ins_functions", ""); EXPECT_EQ(test.GetShowRows(), 1); } @@ -270,7 +270,7 @@ TEST_F(MndTestFunc, 03_Retrieve_Func) { ASSERT_NE(pRsp, nullptr); ASSERT_EQ(pRsp->code, 0); - test.SendShowReq(TSDB_MGMT_TABLE_FUNC, "user_functions", ""); + test.SendShowReq(TSDB_MGMT_TABLE_FUNC, "ins_functions", ""); EXPECT_EQ(test.GetShowRows(), 2); } @@ -435,13 +435,13 @@ TEST_F(MndTestFunc, 04_Drop_Func) { ASSERT_EQ(pRsp->code, 0); } - test.SendShowReq(TSDB_MGMT_TABLE_FUNC, "user_functions", ""); + test.SendShowReq(TSDB_MGMT_TABLE_FUNC, "ins_functions", ""); EXPECT_EQ(test.GetShowRows(), 1); // restart test.Restart(); - test.SendShowReq(TSDB_MGMT_TABLE_FUNC, "user_functions", ""); + test.SendShowReq(TSDB_MGMT_TABLE_FUNC, "ins_functions", ""); EXPECT_EQ(test.GetShowRows(), 1); } diff --git a/source/dnode/mnode/impl/test/profile/profile.cpp b/source/dnode/mnode/impl/test/profile/profile.cpp index e784a41d6f..2ae113e051 100644 --- a/source/dnode/mnode/impl/test/profile/profile.cpp +++ b/source/dnode/mnode/impl/test/profile/profile.cpp @@ -87,7 +87,7 @@ TEST_F(MndTestProfile, 02_ConnectMsg_InvalidDB) { } TEST_F(MndTestProfile, 03_ConnectMsg_Show) { - test.SendShowReq(TSDB_MGMT_TABLE_CONNS, "connections", ""); + test.SendShowReq(TSDB_MGMT_TABLE_CONNS, "perf_connections", ""); EXPECT_EQ(test.GetShowRows(), 1); } @@ -307,6 +307,6 @@ TEST_F(MndTestProfile, 08_KillQueryMsg_InvalidConn) { } TEST_F(MndTestProfile, 09_KillQueryMsg) { - test.SendShowReq(TSDB_MGMT_TABLE_QUERIES, "queries", ""); + test.SendShowReq(TSDB_MGMT_TABLE_QUERIES, "perf_queries", ""); EXPECT_EQ(test.GetShowRows(), 0); } diff --git a/source/dnode/mnode/impl/test/show/show.cpp b/source/dnode/mnode/impl/test/show/show.cpp index 0de8c9dca8..0ccefa7ca2 100644 --- a/source/dnode/mnode/impl/test/show/show.cpp +++ b/source/dnode/mnode/impl/test/show/show.cpp @@ -73,11 +73,11 @@ TEST_F(MndTestShow, 03_ShowMsg_Conn) { ASSERT_NE(pRsp, nullptr); ASSERT_EQ(pRsp->code, 0); - test.SendShowReq(TSDB_MGMT_TABLE_CONNS, "connections", ""); + test.SendShowReq(TSDB_MGMT_TABLE_CONNS, "perf_connections", ""); // EXPECT_EQ(test.GetShowRows(), 1); } TEST_F(MndTestShow, 04_ShowMsg_Cluster) { - test.SendShowReq(TSDB_MGMT_TABLE_CLUSTER, "cluster", ""); + test.SendShowReq(TSDB_MGMT_TABLE_CLUSTER, "ins_cluster", ""); EXPECT_EQ(test.GetShowRows(), 1); } diff --git a/source/dnode/mnode/impl/test/sma/sma.cpp b/source/dnode/mnode/impl/test/sma/sma.cpp index 06bb735f54..9a2372d904 100644 --- a/source/dnode/mnode/impl/test/sma/sma.cpp +++ b/source/dnode/mnode/impl/test/sma/sma.cpp @@ -259,7 +259,7 @@ TEST_F(MndTestSma, 02_Create_Show_Meta_Drop_Restart_BSma) { pReq = BuildCreateBSmaStbReq(stbname, &contLen); pRsp = test.SendReq(TDMT_MND_CREATE_STB, pReq, contLen); ASSERT_EQ(pRsp->code, 0); - test.SendShowReq(TSDB_MGMT_TABLE_STB, "user_stables", dbname); + test.SendShowReq(TSDB_MGMT_TABLE_STB, "ins_stables", dbname); EXPECT_EQ(test.GetShowRows(), 1); } @@ -275,7 +275,7 @@ TEST_F(MndTestSma, 02_Create_Show_Meta_Drop_Restart_BSma) { pReq = BuildDropStbReq(stbname, &contLen); pRsp = test.SendReq(TDMT_MND_DROP_STB, pReq, contLen); ASSERT_EQ(pRsp->code, 0); - test.SendShowReq(TSDB_MGMT_TABLE_STB, "user_stables", dbname); + test.SendShowReq(TSDB_MGMT_TABLE_STB, "ins_stables", dbname); EXPECT_EQ(test.GetShowRows(), 0); } diff --git a/source/dnode/mnode/impl/test/stb/stb.cpp b/source/dnode/mnode/impl/test/stb/stb.cpp index d275231c70..64982951c9 100644 --- a/source/dnode/mnode/impl/test/stb/stb.cpp +++ b/source/dnode/mnode/impl/test/stb/stb.cpp @@ -313,7 +313,7 @@ TEST_F(MndTestStb, 01_Create_Show_Meta_Drop_Restart_Stb) { } { - test.SendShowReq(TSDB_MGMT_TABLE_STB, "user_stables", dbname); + test.SendShowReq(TSDB_MGMT_TABLE_STB, "ins_stables", dbname); EXPECT_EQ(test.GetShowRows(), 1); } @@ -394,7 +394,7 @@ TEST_F(MndTestStb, 01_Create_Show_Meta_Drop_Restart_Stb) { test.Restart(); { - test.SendShowReq(TSDB_MGMT_TABLE_STB, "user_stables", dbname); + test.SendShowReq(TSDB_MGMT_TABLE_STB, "ins_stables", dbname); EXPECT_EQ(test.GetShowRows(), 1); } @@ -412,7 +412,7 @@ TEST_F(MndTestStb, 01_Create_Show_Meta_Drop_Restart_Stb) { } { - test.SendShowReq(TSDB_MGMT_TABLE_STB, "user_stables", dbname); + test.SendShowReq(TSDB_MGMT_TABLE_STB, "ins_stables", dbname); EXPECT_EQ(test.GetShowRows(), 0); } @@ -474,7 +474,7 @@ TEST_F(MndTestStb, 02_Alter_Stb_AddTag) { ASSERT_NE(pRsp, nullptr); ASSERT_EQ(pRsp->code, 0); - test.SendShowReq(TSDB_MGMT_TABLE_STB, "user_stables", dbname); + test.SendShowReq(TSDB_MGMT_TABLE_STB, "ins_stables", dbname); } { @@ -514,7 +514,7 @@ TEST_F(MndTestStb, 03_Alter_Stb_DropTag) { ASSERT_NE(pRsp, nullptr); ASSERT_EQ(pRsp->code, 0); - test.SendShowReq(TSDB_MGMT_TABLE_STB, "user_stables", dbname); + test.SendShowReq(TSDB_MGMT_TABLE_STB, "ins_stables", dbname); EXPECT_EQ(test.GetShowRows(), 1); } @@ -578,7 +578,7 @@ TEST_F(MndTestStb, 04_Alter_Stb_AlterTagName) { ASSERT_NE(pRsp, nullptr); ASSERT_EQ(pRsp->code, 0); - test.SendShowReq(TSDB_MGMT_TABLE_STB, "user_stables", dbname); + test.SendShowReq(TSDB_MGMT_TABLE_STB, "ins_stables", dbname); EXPECT_EQ(test.GetShowRows(), 1); } @@ -630,7 +630,7 @@ TEST_F(MndTestStb, 05_Alter_Stb_AlterTagBytes) { SRpcMsg* pRsp = test.SendReq(TDMT_MND_ALTER_STB, pReq, contLen); ASSERT_EQ(pRsp->code, 0); - test.SendShowReq(TSDB_MGMT_TABLE_STB, "user_stables", dbname); + test.SendShowReq(TSDB_MGMT_TABLE_STB, "ins_stables", dbname); EXPECT_EQ(test.GetShowRows(), 1); } @@ -691,7 +691,7 @@ TEST_F(MndTestStb, 06_Alter_Stb_AddColumn) { ASSERT_NE(pRsp, nullptr); ASSERT_EQ(pRsp->code, 0); - test.SendShowReq(TSDB_MGMT_TABLE_STB, "user_stables", dbname); + test.SendShowReq(TSDB_MGMT_TABLE_STB, "ins_stables", dbname); EXPECT_EQ(test.GetShowRows(), 1); } @@ -751,7 +751,7 @@ TEST_F(MndTestStb, 07_Alter_Stb_DropColumn) { ASSERT_NE(pRsp, nullptr); ASSERT_EQ(pRsp->code, 0); - test.SendShowReq(TSDB_MGMT_TABLE_STB, "user_stables", dbname); + test.SendShowReq(TSDB_MGMT_TABLE_STB, "ins_stables", dbname); EXPECT_EQ(test.GetShowRows(), 1); } @@ -809,7 +809,7 @@ TEST_F(MndTestStb, 08_Alter_Stb_AlterTagBytes) { SRpcMsg* pRsp = test.SendReq(TDMT_MND_ALTER_STB, pReq, contLen); ASSERT_EQ(pRsp->code, 0); - test.SendShowReq(TSDB_MGMT_TABLE_STB, "user_stables", dbname); + test.SendShowReq(TSDB_MGMT_TABLE_STB, "ins_stables", dbname); EXPECT_EQ(test.GetShowRows(), 1); } @@ -818,7 +818,7 @@ TEST_F(MndTestStb, 08_Alter_Stb_AlterTagBytes) { SRpcMsg* pRsp = test.SendReq(TDMT_MND_ALTER_STB, pReq, contLen); ASSERT_EQ(pRsp->code, TSDB_CODE_MND_COLUMN_NOT_EXIST); - test.SendShowReq(TSDB_MGMT_TABLE_STB, "user_stables", dbname); + test.SendShowReq(TSDB_MGMT_TABLE_STB, "ins_stables", dbname); EXPECT_EQ(test.GetShowRows(), 1); } diff --git a/source/dnode/mnode/impl/test/user/user.cpp b/source/dnode/mnode/impl/test/user/user.cpp index dd2bda6b19..eb8b1d18e9 100644 --- a/source/dnode/mnode/impl/test/user/user.cpp +++ b/source/dnode/mnode/impl/test/user/user.cpp @@ -26,7 +26,7 @@ class MndTestUser : public ::testing::Test { Testbase MndTestUser::test; TEST_F(MndTestUser, 01_Show_User) { - test.SendShowReq(TSDB_MGMT_TABLE_USER, "user_users", ""); + test.SendShowReq(TSDB_MGMT_TABLE_USER, "ins_users", ""); EXPECT_EQ(test.GetShowRows(), 1); } @@ -94,7 +94,7 @@ TEST_F(MndTestUser, 02_Create_User) { ASSERT_NE(pRsp, nullptr); ASSERT_EQ(pRsp->code, 0); - test.SendShowReq(TSDB_MGMT_TABLE_USER, "user_users", ""); + test.SendShowReq(TSDB_MGMT_TABLE_USER, "ins_users", ""); EXPECT_EQ(test.GetShowRows(), 2); } @@ -110,7 +110,7 @@ TEST_F(MndTestUser, 02_Create_User) { ASSERT_NE(pRsp, nullptr); ASSERT_EQ(pRsp->code, 0); - test.SendShowReq(TSDB_MGMT_TABLE_USER, "user_users", ""); + test.SendShowReq(TSDB_MGMT_TABLE_USER, "ins_users", ""); EXPECT_EQ(test.GetShowRows(), 1); } @@ -130,7 +130,7 @@ TEST_F(MndTestUser, 02_Create_User) { ASSERT_NE(pRsp, nullptr); ASSERT_EQ(pRsp->code, 0); - test.SendShowReq(TSDB_MGMT_TABLE_USER, "user_users", ""); + test.SendShowReq(TSDB_MGMT_TABLE_USER, "ins_users", ""); EXPECT_EQ(test.GetShowRows(), 2); } @@ -146,7 +146,7 @@ TEST_F(MndTestUser, 02_Create_User) { ASSERT_NE(pRsp, nullptr); ASSERT_EQ(pRsp->code, 0); - test.SendShowReq(TSDB_MGMT_TABLE_USER, "user_users", ""); + test.SendShowReq(TSDB_MGMT_TABLE_USER, "ins_users", ""); EXPECT_EQ(test.GetShowRows(), 1); } } @@ -168,7 +168,7 @@ TEST_F(MndTestUser, 03_Alter_User) { ASSERT_NE(pRsp, nullptr); ASSERT_EQ(pRsp->code, 0); - test.SendShowReq(TSDB_MGMT_TABLE_USER, "user_users", ""); + test.SendShowReq(TSDB_MGMT_TABLE_USER, "ins_users", ""); EXPECT_EQ(test.GetShowRows(), 2); } @@ -414,7 +414,7 @@ TEST_F(MndTestUser, 03_Alter_User) { ASSERT_NE(pRsp, nullptr); ASSERT_EQ(pRsp->code, 0); - test.SendShowReq(TSDB_MGMT_TABLE_USER, "user_users", ""); + test.SendShowReq(TSDB_MGMT_TABLE_USER, "ins_users", ""); EXPECT_EQ(test.GetShowRows(), 1); } } @@ -475,7 +475,7 @@ TEST_F(MndTestUser, 05_Drop_User) { ASSERT_EQ(pRsp->code, 0); } - test.SendShowReq(TSDB_MGMT_TABLE_USER, "user_users", ""); + test.SendShowReq(TSDB_MGMT_TABLE_USER, "ins_users", ""); EXPECT_EQ(test.GetShowRows(), 1); } @@ -512,7 +512,7 @@ TEST_F(MndTestUser, 06_Create_Drop_Alter_User) { ASSERT_EQ(pRsp->code, 0); } - test.SendShowReq(TSDB_MGMT_TABLE_USER, "user_users", ""); + test.SendShowReq(TSDB_MGMT_TABLE_USER, "ins_users", ""); EXPECT_EQ(test.GetShowRows(), 3); { @@ -530,7 +530,7 @@ TEST_F(MndTestUser, 06_Create_Drop_Alter_User) { ASSERT_EQ(pRsp->code, 0); } - test.SendShowReq(TSDB_MGMT_TABLE_USER, "user_users", ""); + test.SendShowReq(TSDB_MGMT_TABLE_USER, "ins_users", ""); EXPECT_EQ(test.GetShowRows(), 3); { SDropUserReq dropReq = {0}; @@ -545,13 +545,13 @@ TEST_F(MndTestUser, 06_Create_Drop_Alter_User) { ASSERT_EQ(pRsp->code, 0); } - test.SendShowReq(TSDB_MGMT_TABLE_USER, "user_users", ""); + test.SendShowReq(TSDB_MGMT_TABLE_USER, "ins_users", ""); EXPECT_EQ(test.GetShowRows(), 2); // restart test.Restart(); taosMsleep(1000); - test.SendShowReq(TSDB_MGMT_TABLE_USER, "user_users", ""); + test.SendShowReq(TSDB_MGMT_TABLE_USER, "ins_users", ""); EXPECT_EQ(test.GetShowRows(), 2); } diff --git a/source/libs/parser/test/parSelectTest.cpp b/source/libs/parser/test/parSelectTest.cpp index ebf8012cf7..02a82f7602 100644 --- a/source/libs/parser/test/parSelectTest.cpp +++ b/source/libs/parser/test/parSelectTest.cpp @@ -426,7 +426,7 @@ TEST_F(ParserSelectTest, setOperatorSemanticCheck) { TEST_F(ParserSelectTest, informationSchema) { useDb("root", "test"); - run("SELECT * FROM information_schema.user_databases WHERE name = 'information_schema'"); + run("SELECT * FROM information_schema.ins_databases WHERE name = 'information_schema'"); } TEST_F(ParserSelectTest, withoutFrom) { diff --git a/source/libs/planner/test/planSysTbTest.cpp b/source/libs/planner/test/planSysTbTest.cpp index e5c30030b3..921f86f09a 100644 --- a/source/libs/planner/test/planSysTbTest.cpp +++ b/source/libs/planner/test/planSysTbTest.cpp @@ -30,5 +30,5 @@ TEST_F(PlanSysTableTest, show) { TEST_F(PlanSysTableTest, informationSchema) { useDb("root", "information_schema"); - run("SELECT * FROM information_schema.user_databases WHERE name = 'information_schema'"); + run("SELECT * FROM information_schema.ins_databases WHERE name = 'information_schema'"); }