[TD-362] fix crash while auto create table
This commit is contained in:
parent
998ad42399
commit
6a3043753d
|
@ -1415,7 +1415,7 @@ static SChildTableObj* mgmtDoCreateChildTable(SCMCreateTableMsg *pCreate, SVgObj
|
|||
char *pTagData = (char *) pCreate->schema; // it is a tag key
|
||||
SSuperTableObj *pSuperTable = mgmtGetSuperTable(pTagData);
|
||||
if (pSuperTable == NULL) {
|
||||
mError("table:%s, corresponding super table does not exist", pCreate->tableId);
|
||||
mError("table:%s, corresponding super table:%s does not exist", pCreate->tableId, pTagData);
|
||||
free(pTable);
|
||||
terrno = TSDB_CODE_INVALID_TABLE;
|
||||
return NULL;
|
||||
|
@ -1505,6 +1505,11 @@ static void mgmtProcessCreateChildTableMsg(SQueuedMsg *pMsg) {
|
|||
}
|
||||
|
||||
pMsg->pTable = (STableObj *)mgmtDoCreateChildTable(pCreate, pVgroup, sid);
|
||||
if (pMsg->pTable == NULL) {
|
||||
mgmtSendSimpleResp(pMsg->thandle, terrno);
|
||||
return;
|
||||
}
|
||||
|
||||
mgmtIncTableRef(pMsg->pTable);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -43,9 +43,6 @@ endi
|
|||
if $data01 != 4 then
|
||||
return -1
|
||||
endi
|
||||
if $data02 != ready then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print =============== drop database
|
||||
sql drop database d1
|
||||
|
|
Loading…
Reference in New Issue