提交 6a304375 编写于 作者: S Shengliang Guan

[TD-362] fix crash while auto create table

上级 998ad423
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册