diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index 3b7b1f3c10ff0077d62514a71d5db22df2515940..575a0e6274691d3b24429a891979507a36eed543 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -128,7 +128,12 @@ target_include_directories( set(CMAKE_PROJECT_INCLUDE_BEFORE "${CMAKE_SUPPORT_DIR}/EnableCMP0048.txt.in") add_subdirectory(zlib) target_include_directories( - zlibstatic + zlibstatic + PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/zlib + PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/zlib +) +target_include_directories( + zlib PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/zlib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/zlib ) diff --git a/source/dnode/mnode/impl/src/mndDb.c b/source/dnode/mnode/impl/src/mndDb.c index a17a45d46a970f960a497448bca262b975aefdd2..6625c7f104bb108b9f8e032cad947f8bc47b5e99 100644 --- a/source/dnode/mnode/impl/src/mndDb.c +++ b/source/dnode/mnode/impl/src/mndDb.c @@ -1292,11 +1292,11 @@ static int32_t mndGetDbMeta(SMnodeMsg *pReq, SShowObj *pShow, STableMetaRsp *pMe pSchema[cols].bytes = pShow->bytes[cols]; cols++; - pShow->bytes[cols] = 1; - pSchema[cols].type = TSDB_DATA_TYPE_TINYINT; - strcpy(pSchema[cols].name, "update"); - pSchema[cols].bytes = pShow->bytes[cols]; - cols++; +// pShow->bytes[cols] = 1; +// pSchema[cols].type = TSDB_DATA_TYPE_TINYINT; +// strcpy(pSchema[cols].name, "update"); +// pSchema[cols].bytes = pShow->bytes[cols]; +// cols++; pMeta->numOfColumns = cols; pShow->numOfColumns = cols; @@ -1432,9 +1432,9 @@ static int32_t mndRetrieveDbs(SMnodeMsg *pReq, SShowObj *pShow, char *data, int3 STR_WITH_SIZE_TO_VARSTR(pWrite, prec, 2); cols++; - pWrite = data + pShow->offset[cols] * rows + pShow->bytes[cols] * numOfRows; - *(int8_t *)pWrite = pDb->cfg.update; - cols++; +// pWrite = data + pShow->offset[cols] * rows + pShow->bytes[cols] * numOfRows; +// *(int8_t *)pWrite = pDb->cfg.update; +// cols++; numOfRows++; sdbRelease(pSdb, pDb); diff --git a/source/dnode/mnode/impl/test/db/db.cpp b/source/dnode/mnode/impl/test/db/db.cpp index 9dbc1be4e947cd41eff4e3aad255eda6ae31a68e..0282663b17a2ef0a8882e42c76408f76b0a83ef9 100644 --- a/source/dnode/mnode/impl/test/db/db.cpp +++ b/source/dnode/mnode/impl/test/db/db.cpp @@ -27,7 +27,7 @@ Testbase MndTestDb::test; TEST_F(MndTestDb, 01_ShowDb) { test.SendShowMetaReq(TSDB_MGMT_TABLE_DB, ""); - CHECK_META("show databases", 18); + CHECK_META("show databases", 17); CHECK_SCHEMA(0, TSDB_DATA_TYPE_BINARY, TSDB_DB_NAME_LEN - 1 + VARSTR_HEADER_SIZE, "name"); CHECK_SCHEMA(1, TSDB_DATA_TYPE_TIMESTAMP, 8, "create_time"); CHECK_SCHEMA(2, TSDB_DATA_TYPE_SMALLINT, 2, "vgroups"); @@ -45,7 +45,7 @@ TEST_F(MndTestDb, 01_ShowDb) { CHECK_SCHEMA(14, TSDB_DATA_TYPE_TINYINT, 1, "comp"); CHECK_SCHEMA(15, TSDB_DATA_TYPE_TINYINT, 1, "cachelast"); CHECK_SCHEMA(16, TSDB_DATA_TYPE_BINARY, 3 + VARSTR_HEADER_SIZE, "precision"); - CHECK_SCHEMA(17, TSDB_DATA_TYPE_TINYINT, 1, "update"); +// CHECK_SCHEMA(17, TSDB_DATA_TYPE_TINYINT, 1, "update"); test.SendShowRetrieveReq(); EXPECT_EQ(test.GetShowRows(), 0); @@ -85,7 +85,7 @@ TEST_F(MndTestDb, 02_Create_Alter_Drop_Db) { } test.SendShowMetaReq(TSDB_MGMT_TABLE_DB, ""); - CHECK_META("show databases", 18); + CHECK_META("show databases", 17); test.SendShowRetrieveReq(); EXPECT_EQ(test.GetShowRows(), 1); @@ -173,7 +173,7 @@ TEST_F(MndTestDb, 02_Create_Alter_Drop_Db) { test.Restart(); test.SendShowMetaReq(TSDB_MGMT_TABLE_DB, ""); - CHECK_META("show databases", 18); + CHECK_META("show databases", 17); test.SendShowRetrieveReq(); EXPECT_EQ(test.GetShowRows(), 1); @@ -215,7 +215,7 @@ TEST_F(MndTestDb, 02_Create_Alter_Drop_Db) { } test.SendShowMetaReq(TSDB_MGMT_TABLE_DB, ""); - CHECK_META("show databases", 18); + CHECK_META("show databases", 17); test.SendShowRetrieveReq(); EXPECT_EQ(test.GetShowRows(), 0); @@ -255,7 +255,7 @@ TEST_F(MndTestDb, 03_Create_Use_Restart_Use_Db) { } test.SendShowMetaReq(TSDB_MGMT_TABLE_DB, ""); - CHECK_META("show databases", 18); + CHECK_META("show databases", 17); test.SendShowRetrieveReq(); EXPECT_EQ(test.GetShowRows(), 1); diff --git a/tests/script/tsim/table/basic1.sim b/tests/script/tsim/table/basic1.sim index 09e6ede77dcdc65f8eb6c13c1d26e4eea33006a6..257c26415994fa245fa42e285c667598d6615d1c 100644 --- a/tests/script/tsim/table/basic1.sim +++ b/tests/script/tsim/table/basic1.sim @@ -253,7 +253,8 @@ endi print =============== query data from normal table after restart dnode sql use ndb sql select * from nt1 -if $rows != 3 then +if $rows != 3 then + print expect 3, actual: $rows return -1 endi