errr while config table
This commit is contained in:
parent
8a5fa81b71
commit
46138ef492
|
@ -1352,11 +1352,13 @@ static void *mnodeBuildCreateChildTableMsg(SCMCreateTableMsg *pMsg, SChildTableO
|
||||||
int32_t tagDataLen = 0;
|
int32_t tagDataLen = 0;
|
||||||
int32_t totalCols = 0;
|
int32_t totalCols = 0;
|
||||||
int32_t contLen = 0;
|
int32_t contLen = 0;
|
||||||
if (pTable->info.type == TSDB_CHILD_TABLE && pMsg != NULL) {
|
if (pTable->info.type == TSDB_CHILD_TABLE) {
|
||||||
pTagData = (STagData*)pMsg->schema;
|
|
||||||
tagDataLen = ntohl(pTagData->dataLen);
|
|
||||||
totalCols = pTable->superTable->numOfColumns + pTable->superTable->numOfTags;
|
totalCols = pTable->superTable->numOfColumns + pTable->superTable->numOfTags;
|
||||||
contLen = sizeof(SMDCreateTableMsg) + totalCols * sizeof(SSchema) + tagDataLen + pTable->sqlLen;
|
contLen = sizeof(SMDCreateTableMsg) + totalCols * sizeof(SSchema) + tagDataLen + pTable->sqlLen;
|
||||||
|
if (pMsg != NULL) {
|
||||||
|
pTagData = (STagData *)pMsg->schema;
|
||||||
|
tagDataLen = ntohl(pTagData->dataLen);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
totalCols = pTable->numOfColumns;
|
totalCols = pTable->numOfColumns;
|
||||||
contLen = sizeof(SMDCreateTableMsg) + totalCols * sizeof(SSchema) + pTable->sqlLen;
|
contLen = sizeof(SMDCreateTableMsg) + totalCols * sizeof(SSchema) + pTable->sqlLen;
|
||||||
|
@ -1406,11 +1408,11 @@ static void *mnodeBuildCreateChildTableMsg(SCMCreateTableMsg *pMsg, SChildTableO
|
||||||
pSchema++;
|
pSchema++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pTable->info.type == TSDB_CHILD_TABLE && pMsg != NULL) {
|
if (pTable->info.type == TSDB_CHILD_TABLE && pTagData != NULL) {
|
||||||
memcpy(pCreate->data + totalCols * sizeof(SSchema), pTagData->data, tagDataLen);
|
memcpy(pCreate->data + totalCols * sizeof(SSchema), pTagData->data, tagDataLen);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pTable->info.type == TSDB_STREAM_TABLE && pMsg != NULL) {
|
if (pTable->info.type == TSDB_STREAM_TABLE) {
|
||||||
memcpy(pCreate->data + totalCols * sizeof(SSchema), pTable->sql, pTable->sqlLen);
|
memcpy(pCreate->data + totalCols * sizeof(SSchema), pTable->sql, pTable->sqlLen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue