提交 e65be1be 编写于 作者: H Haojun Liao

[td-225] fix bugs in restore from core dump

上级 315fa740
...@@ -84,8 +84,11 @@ static int32_t mnodeDbActionDelete(SSdbOper *pOper) { ...@@ -84,8 +84,11 @@ static int32_t mnodeDbActionDelete(SSdbOper *pOper) {
mnodeDropAllChildTables(pDb); mnodeDropAllChildTables(pDb);
mnodeDropAllSuperTables(pDb); mnodeDropAllSuperTables(pDb);
mnodeDropAllDbVgroups(pDb); mnodeDropAllDbVgroups(pDb);
if (pAcct) {
mnodeDropDbFromAcct(pAcct, pDb); mnodeDropDbFromAcct(pAcct, pDb);
mnodeDecAcctRef(pAcct); mnodeDecAcctRef(pAcct);
}
return TSDB_CODE_SUCCESS; return TSDB_CODE_SUCCESS;
} }
......
...@@ -157,10 +157,12 @@ static int32_t mnodeChildTableActionDelete(SSdbOper *pOper) { ...@@ -157,10 +157,12 @@ static int32_t mnodeChildTableActionDelete(SSdbOper *pOper) {
if (pDb != NULL) pAcct = mnodeGetAcct(pDb->acct); if (pDb != NULL) pAcct = mnodeGetAcct(pDb->acct);
if (pTable->info.type == TSDB_CHILD_TABLE) { if (pTable->info.type == TSDB_CHILD_TABLE) {
if (pTable->superTable) {
grantRestore(TSDB_GRANT_TIMESERIES, pTable->superTable->numOfColumns - 1); grantRestore(TSDB_GRANT_TIMESERIES, pTable->superTable->numOfColumns - 1);
if (pAcct != NULL) pAcct->acctInfo.numOfTimeSeries -= (pTable->superTable->numOfColumns - 1); if (pAcct != NULL) pAcct->acctInfo.numOfTimeSeries -= (pTable->superTable->numOfColumns - 1);
mnodeRemoveTableFromStable(pTable->superTable, pTable); mnodeRemoveTableFromStable(pTable->superTable, pTable);
mnodeDecTableRef(pTable->superTable); mnodeDecTableRef(pTable->superTable);
}
} else { } else {
grantRestore(TSDB_GRANT_TIMESERIES, pTable->numOfColumns - 1); grantRestore(TSDB_GRANT_TIMESERIES, pTable->numOfColumns - 1);
if (pAcct != NULL) pAcct->acctInfo.numOfTimeSeries -= (pTable->numOfColumns - 1); if (pAcct != NULL) pAcct->acctInfo.numOfTimeSeries -= (pTable->numOfColumns - 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册