diff --git a/src/mnode/src/mgmtTable.c b/src/mnode/src/mgmtTable.c index d001114bf065d272357cbd0a1d2ef6c9008e98de..5f1069026f48e151e42fa1a3d1c4e48f47804f41 100644 --- a/src/mnode/src/mgmtTable.c +++ b/src/mnode/src/mgmtTable.c @@ -1242,14 +1242,11 @@ static void mgmtProcessSuperTableVgroupMsg(SQueuedMsg *pMsg) { int32_t numOfTable = htonl(pInfo->numOfTables); SCMSTableVgroupRspMsg *pRsp = NULL; - int32_t contLen = sizeof(SCMSTableVgroupRspMsg); + int32_t contLen = sizeof(SCMSTableVgroupRspMsg) + 32 * sizeof(SCMVgroupInfo) + sizeof(SVgroupsInfo); + //reserve space for (int32_t i = 0; i < numOfTable; ++i) { char *stableName = (char*)pInfo + sizeof(SCMSTableVgroupMsg) + (TSDB_TABLE_ID_LEN) * i; SSuperTableObj *pTable = mgmtGetSuperTable(stableName); - if (pTable != NULL) { - stableName = (char*)pTable; //hack way - } - if (pTable->vgHash != NULL) { contLen += (taosHashGetSize(pTable->vgHash) * sizeof(SCMVgroupInfo) + sizeof(SVgroupsInfo)); } @@ -1263,11 +1260,12 @@ static void mgmtProcessSuperTableVgroupMsg(SQueuedMsg *pMsg) { } pRsp->numOfTables = htonl(numOfTable); - char *msg = (char *)pRsp + sizeof(SCMSTableVgroupRspMsg); + char* msg = (char*) pRsp + sizeof(SCMSTableVgroupRspMsg); for (int32_t i = 0; i < numOfTable; ++i) { - SSuperTableObj *pTable = (SSuperTableObj *)((char *)pInfo + sizeof(SCMSTableVgroupMsg) + (TSDB_TABLE_ID_LEN)*i); - SVgroupsInfo * pVgroup = (SVgroupsInfo *)msg; + char *stableName = (char*)pInfo + sizeof(SCMSTableVgroupMsg) + (TSDB_TABLE_ID_LEN) * i; + SSuperTableObj *pTable = mgmtGetSuperTable(stableName); + SVgroupsInfo *pVgroup = (SVgroupsInfo *)msg; SHashMutableIterator *pIter = taosHashCreateIter(pTable->vgHash); int32_t vgSize = 0; diff --git a/tests/script/general/parser/auto_create_tb.sim b/tests/script/general/parser/auto_create_tb.sim index 8fb0ddae545855fd44df5ef1c602521a3e5c112a..54e028a2005c34964e10ffe4ee5f55d0fc24d85e 100644 --- a/tests/script/general/parser/auto_create_tb.sim +++ b/tests/script/general/parser/auto_create_tb.sim @@ -96,25 +96,25 @@ $ts1 = $ts0 + 1000 $ts2 = $ts0 + 2000 sql insert into tb_1 using $stb tags (-1) values ( $ts1 , 1,1,1,1,'bin',1,1,1,'涛思数据') ( $ts2 , 2,2,2,2,'binar', 1,1,1,'nchar') sql select * from $stb -if $rows != 3 then +if $rows != 5 then return -1 endi -if $data19 != 涛思数据 then +if $data09 != 涛思数据 then return -1 endi -if $data11 != 1 then +if $data01 != 1 then return -1 endi -if $data22 != 2 then +if $data42 != 2 then return -2 endi -if $data23 != 2.00000 then +if $data43 != 2.00000 then return -1 endi -if $data25 != binar then +if $data45 != binar then return -1 endi -if $data29 != nchar then +if $data49 != nchar then return -1 endi sql drop table tb_1 @@ -127,22 +127,22 @@ sql select * from $stb if $rows != 5 then return -1 endi -if $data19 != 涛思数据 then +if $data09 != 涛思数据 then return -1 endi -if $data11 != 1 then +if $data01 != 1 then return -1 endi -if $data22 != 2 then +if $data42 != 2 then return -2 endi -if $data23 != 2.00000 then +if $data43 != 2.00000 then return -1 endi -if $data25 != binar then +if $data45 != binar then return -1 endi -if $data29 != nchar then +if $data49 != nchar then return -1 endi @@ -154,13 +154,13 @@ sql show tables if $rows != 3 then return -1 endi -if $data00 != tb3 then +if $data00 != tb1 then return -1 endi if $data10 != tb2 then return -1 endi -if $data20 != tb1 then +if $data20 != tb3 then return -1 endi diff --git a/tests/script/general/table/fill.sim b/tests/script/general/table/fill.sim index 00048eb0250242a6975ec8e7b0e15e86a6368390..333573e577b636ef780e652d1dc61d4d6701f925 100644 --- a/tests/script/general/table/fill.sim +++ b/tests/script/general/table/fill.sim @@ -42,7 +42,7 @@ sql select count(*), last(ts), min(k), max(k), avg(k) from db.mt where a=0 and t print =================== step2 system sh/exec.sh -n dnode1 -s stop -x SIGINT -sleep 10000 +sleep 5000 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index f73a23f1845809cbb8a1711d948a7e71058a9189..005d2db0328f664a109e06fd2c52b156d82a01e4 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -1,9 +1,6 @@ cd ../../debug; cmake .. -#cd ../../debug; make clean cd ../../debug; make - cd ../../../debug; cmake .. -#cd ../../../debug; make clean cd ../../../debug; make #./test.sh -f general/alter/cached_schema_after_alter.sim @@ -161,8 +158,6 @@ cd ../../../debug; make #./test.sh -f general/stable/values.sim #./test.sh -f general/stable/vnode3.sim -#stream - ./test.sh -f general/table/autocreate.sim ./test.sh -f general/table/basic1.sim ./test.sh -f general/table/basic2.sim @@ -176,12 +171,12 @@ cd ../../../debug; make ./test.sh -f general/table/column2.sim ./test.sh -f general/table/date.sim ./test.sh -f general/table/db.table.sim -#./test.sh -f general/table/delete_reuse1.sim -#./test.sh -f general/table/delete_reuse2.sim -#./test.sh -f general/table/delete_writing.sim -#./test.sh -f general/table/describe.sim +./test.sh -f general/table/delete_reuse1.sim +./test.sh -f general/table/delete_reuse2.sim +#hongze ./test.sh -f general/table/delete_writing.sim +./test.sh -f general/table/describe.sim ./test.sh -f general/table/double.sim -#./test.sh -f general/table/fill.sim +./test.sh -f general/table/fill.sim ./test.sh -f general/table/float.sim ./test.sh -f general/table/int.sim ./test.sh -f general/table/limit.sim @@ -236,8 +231,6 @@ cd ../../../debug; make ./test.sh -f general/vector/table_query.sim ./test.sh -f general/vector/table_time.sim -################################# - ./test.sh -u -f unique/account/account_create.sim ./test.sh -u -f unique/account/account_delete.sim ./test.sh -u -f unique/account/account_len.sim @@ -307,8 +300,6 @@ cd ../../../debug; make #./test.sh -u -f unique/mnode/mgmtr2.sim #./test.sh -u -f unique/mnode/secondIp.sim -#stream - ##./test.sh -u -f unique/table/delete_part.sim #./test.sh -u -f unique/vnode/commit.sim