提交 270e7fc9 编写于 作者: S Shengliang Guan

[TD-271]

上级 88b08a67
...@@ -1242,14 +1242,11 @@ static void mgmtProcessSuperTableVgroupMsg(SQueuedMsg *pMsg) { ...@@ -1242,14 +1242,11 @@ static void mgmtProcessSuperTableVgroupMsg(SQueuedMsg *pMsg) {
int32_t numOfTable = htonl(pInfo->numOfTables); int32_t numOfTable = htonl(pInfo->numOfTables);
SCMSTableVgroupRspMsg *pRsp = NULL; 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) { for (int32_t i = 0; i < numOfTable; ++i) {
char *stableName = (char*)pInfo + sizeof(SCMSTableVgroupMsg) + (TSDB_TABLE_ID_LEN) * i; char *stableName = (char*)pInfo + sizeof(SCMSTableVgroupMsg) + (TSDB_TABLE_ID_LEN) * i;
SSuperTableObj *pTable = mgmtGetSuperTable(stableName); SSuperTableObj *pTable = mgmtGetSuperTable(stableName);
if (pTable != NULL) {
stableName = (char*)pTable; //hack way
}
if (pTable->vgHash != NULL) { if (pTable->vgHash != NULL) {
contLen += (taosHashGetSize(pTable->vgHash) * sizeof(SCMVgroupInfo) + sizeof(SVgroupsInfo)); contLen += (taosHashGetSize(pTable->vgHash) * sizeof(SCMVgroupInfo) + sizeof(SVgroupsInfo));
} }
...@@ -1263,11 +1260,12 @@ static void mgmtProcessSuperTableVgroupMsg(SQueuedMsg *pMsg) { ...@@ -1263,11 +1260,12 @@ static void mgmtProcessSuperTableVgroupMsg(SQueuedMsg *pMsg) {
} }
pRsp->numOfTables = htonl(numOfTable); pRsp->numOfTables = htonl(numOfTable);
char *msg = (char *)pRsp + sizeof(SCMSTableVgroupRspMsg); char* msg = (char*) pRsp + sizeof(SCMSTableVgroupRspMsg);
for (int32_t i = 0; i < numOfTable; ++i) { for (int32_t i = 0; i < numOfTable; ++i) {
SSuperTableObj *pTable = (SSuperTableObj *)((char *)pInfo + sizeof(SCMSTableVgroupMsg) + (TSDB_TABLE_ID_LEN)*i); char *stableName = (char*)pInfo + sizeof(SCMSTableVgroupMsg) + (TSDB_TABLE_ID_LEN) * i;
SVgroupsInfo * pVgroup = (SVgroupsInfo *)msg; SSuperTableObj *pTable = mgmtGetSuperTable(stableName);
SVgroupsInfo *pVgroup = (SVgroupsInfo *)msg;
SHashMutableIterator *pIter = taosHashCreateIter(pTable->vgHash); SHashMutableIterator *pIter = taosHashCreateIter(pTable->vgHash);
int32_t vgSize = 0; int32_t vgSize = 0;
......
...@@ -96,25 +96,25 @@ $ts1 = $ts0 + 1000 ...@@ -96,25 +96,25 @@ $ts1 = $ts0 + 1000
$ts2 = $ts0 + 2000 $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 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 sql select * from $stb
if $rows != 3 then if $rows != 5 then
return -1 return -1
endi endi
if $data19 != 涛思数据 then if $data09 != 涛思数据 then
return -1 return -1
endi endi
if $data11 != 1 then if $data01 != 1 then
return -1 return -1
endi endi
if $data22 != 2 then if $data42 != 2 then
return -2 return -2
endi endi
if $data23 != 2.00000 then if $data43 != 2.00000 then
return -1 return -1
endi endi
if $data25 != binar then if $data45 != binar then
return -1 return -1
endi endi
if $data29 != nchar then if $data49 != nchar then
return -1 return -1
endi endi
sql drop table tb_1 sql drop table tb_1
...@@ -127,22 +127,22 @@ sql select * from $stb ...@@ -127,22 +127,22 @@ sql select * from $stb
if $rows != 5 then if $rows != 5 then
return -1 return -1
endi endi
if $data19 != 涛思数据 then if $data09 != 涛思数据 then
return -1 return -1
endi endi
if $data11 != 1 then if $data01 != 1 then
return -1 return -1
endi endi
if $data22 != 2 then if $data42 != 2 then
return -2 return -2
endi endi
if $data23 != 2.00000 then if $data43 != 2.00000 then
return -1 return -1
endi endi
if $data25 != binar then if $data45 != binar then
return -1 return -1
endi endi
if $data29 != nchar then if $data49 != nchar then
return -1 return -1
endi endi
...@@ -154,13 +154,13 @@ sql show tables ...@@ -154,13 +154,13 @@ sql show tables
if $rows != 3 then if $rows != 3 then
return -1 return -1
endi endi
if $data00 != tb3 then if $data00 != tb1 then
return -1 return -1
endi endi
if $data10 != tb2 then if $data10 != tb2 then
return -1 return -1
endi endi
if $data20 != tb1 then if $data20 != tb3 then
return -1 return -1
endi endi
......
...@@ -42,7 +42,7 @@ sql select count(*), last(ts), min(k), max(k), avg(k) from db.mt where a=0 and t ...@@ -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 print =================== step2
system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 10000 sleep 5000
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 3000 sleep 3000
......
cd ../../debug; cmake .. cd ../../debug; cmake ..
#cd ../../debug; make clean
cd ../../debug; make cd ../../debug; make
cd ../../../debug; cmake .. cd ../../../debug; cmake ..
#cd ../../../debug; make clean
cd ../../../debug; make cd ../../../debug; make
#./test.sh -f general/alter/cached_schema_after_alter.sim #./test.sh -f general/alter/cached_schema_after_alter.sim
...@@ -161,8 +158,6 @@ cd ../../../debug; make ...@@ -161,8 +158,6 @@ cd ../../../debug; make
#./test.sh -f general/stable/values.sim #./test.sh -f general/stable/values.sim
#./test.sh -f general/stable/vnode3.sim #./test.sh -f general/stable/vnode3.sim
#stream
./test.sh -f general/table/autocreate.sim ./test.sh -f general/table/autocreate.sim
./test.sh -f general/table/basic1.sim ./test.sh -f general/table/basic1.sim
./test.sh -f general/table/basic2.sim ./test.sh -f general/table/basic2.sim
...@@ -176,12 +171,12 @@ cd ../../../debug; make ...@@ -176,12 +171,12 @@ cd ../../../debug; make
./test.sh -f general/table/column2.sim ./test.sh -f general/table/column2.sim
./test.sh -f general/table/date.sim ./test.sh -f general/table/date.sim
./test.sh -f general/table/db.table.sim ./test.sh -f general/table/db.table.sim
#./test.sh -f general/table/delete_reuse1.sim ./test.sh -f general/table/delete_reuse1.sim
#./test.sh -f general/table/delete_reuse2.sim ./test.sh -f general/table/delete_reuse2.sim
#./test.sh -f general/table/delete_writing.sim #hongze ./test.sh -f general/table/delete_writing.sim
#./test.sh -f general/table/describe.sim ./test.sh -f general/table/describe.sim
./test.sh -f general/table/double.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/float.sim
./test.sh -f general/table/int.sim ./test.sh -f general/table/int.sim
./test.sh -f general/table/limit.sim ./test.sh -f general/table/limit.sim
...@@ -236,8 +231,6 @@ cd ../../../debug; make ...@@ -236,8 +231,6 @@ cd ../../../debug; make
./test.sh -f general/vector/table_query.sim ./test.sh -f general/vector/table_query.sim
./test.sh -f general/vector/table_time.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_create.sim
./test.sh -u -f unique/account/account_delete.sim ./test.sh -u -f unique/account/account_delete.sim
./test.sh -u -f unique/account/account_len.sim ./test.sh -u -f unique/account/account_len.sim
...@@ -307,8 +300,6 @@ cd ../../../debug; make ...@@ -307,8 +300,6 @@ cd ../../../debug; make
#./test.sh -u -f unique/mnode/mgmtr2.sim #./test.sh -u -f unique/mnode/mgmtr2.sim
#./test.sh -u -f unique/mnode/secondIp.sim #./test.sh -u -f unique/mnode/secondIp.sim
#stream
##./test.sh -u -f unique/table/delete_part.sim ##./test.sh -u -f unique/table/delete_part.sim
#./test.sh -u -f unique/vnode/commit.sim #./test.sh -u -f unique/vnode/commit.sim
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册