[TD-15] fix error while create child table
This commit is contained in:
parent
1a048a1028
commit
e1fdc40fe2
|
@ -319,9 +319,8 @@ void* mgmtCreateChildTable(SCMCreateTableMsg *pCreate, SVgObj *pVgroup, int32_t
|
|||
desc.type = SDB_OPER_TYPE_GLOBAL;
|
||||
desc.pObj = pTable;
|
||||
desc.table = tsChildTableSdb;
|
||||
sdbInsertRow(&desc);
|
||||
|
||||
if (sdbInsertRow(&desc) < 0) {
|
||||
|
||||
if (sdbInsertRow(&desc) != TSDB_CODE_SUCCESS) {
|
||||
free(pTable);
|
||||
mError("ctable:%s, update sdb error", pCreate->tableId);
|
||||
terrno = TSDB_CODE_SDB_ERROR;
|
||||
|
|
|
@ -334,7 +334,7 @@ void *mgmtCreateNormalTable(SCMCreateTableMsg *pCreate, SVgObj *pVgroup, int32_t
|
|||
desc.type = SDB_OPER_TYPE_GLOBAL;
|
||||
desc.pObj = pTable;
|
||||
desc.table = tsNormalTableSdb;
|
||||
if (sdbInsertRow(&desc) < 0) {
|
||||
if (sdbInsertRow(&desc) != TSDB_CODE_SUCCESS) {
|
||||
mError("table:%s, update sdb error", pTable->tableId);
|
||||
free(pTable);
|
||||
terrno = TSDB_CODE_SDB_ERROR;
|
||||
|
|
|
@ -287,6 +287,7 @@ int32_t mgmtRetrieveShowTables(SShowObj *pShow, char *data, int32_t rows, void *
|
|||
createdTime = pNormalTable->createdTime;
|
||||
numOfColumns = pNormalTable->numOfColumns;
|
||||
} else {
|
||||
pShow->pNode = NULL;
|
||||
void *pChildTableNode = sdbFetchRow(tsChildTableSdb, pShow->pNode, (void **) &pTable);
|
||||
if (pTable != NULL) {
|
||||
SChildTableObj *pChildTable = (SChildTableObj *) pTable;
|
||||
|
|
Loading…
Reference in New Issue