[td-225] fix bugs in restore from core dump
This commit is contained in:
parent
315fa74042
commit
e65be1be0d
|
@ -84,8 +84,11 @@ static int32_t mnodeDbActionDelete(SSdbOper *pOper) {
|
|||
mnodeDropAllChildTables(pDb);
|
||||
mnodeDropAllSuperTables(pDb);
|
||||
mnodeDropAllDbVgroups(pDb);
|
||||
|
||||
if (pAcct) {
|
||||
mnodeDropDbFromAcct(pAcct, pDb);
|
||||
mnodeDecAcctRef(pAcct);
|
||||
}
|
||||
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -157,10 +157,12 @@ static int32_t mnodeChildTableActionDelete(SSdbOper *pOper) {
|
|||
if (pDb != NULL) pAcct = mnodeGetAcct(pDb->acct);
|
||||
|
||||
if (pTable->info.type == TSDB_CHILD_TABLE) {
|
||||
if (pTable->superTable) {
|
||||
grantRestore(TSDB_GRANT_TIMESERIES, pTable->superTable->numOfColumns - 1);
|
||||
if (pAcct != NULL) pAcct->acctInfo.numOfTimeSeries -= (pTable->superTable->numOfColumns - 1);
|
||||
mnodeRemoveTableFromStable(pTable->superTable, pTable);
|
||||
mnodeDecTableRef(pTable->superTable);
|
||||
}
|
||||
} else {
|
||||
grantRestore(TSDB_GRANT_TIMESERIES, pTable->numOfColumns - 1);
|
||||
if (pAcct != NULL) pAcct->acctInfo.numOfTimeSeries -= (pTable->numOfColumns - 1);
|
||||
|
|
Loading…
Reference in New Issue