fix: fix show create table issue

This commit is contained in:
dapan1121 2022-07-21 15:23:18 +08:00
parent df87bf6338
commit 6c683902ff
2 changed files with 6 additions and 4 deletions

View File

@ -866,13 +866,15 @@ STableCfg* tableCfgDup(STableCfg* pCfg) {
memcpy(pNew, pCfg, sizeof(*pNew));
if (NULL != pNew->pComment) {
pNew->pComment = strdup(pNew->pComment);
pNew->pComment = taosMemoryCalloc(pNew->commentLen + 1, 1);
memcpy(pNew->pComment, pCfg->pComment, pNew->commentLen);
}
if (NULL != pNew->pFuncs) {
pNew->pFuncs = taosArrayDup(pNew->pFuncs);
}
if (NULL != pNew->pTags) {
pNew->pTags = strdup(pNew->pTags);
pNew->pTags = taosMemoryCalloc(pNew->tagsLen + 1, 1);
memcpy(pNew->pTags, pCfg->pTags, pNew->tagsLen);
}
int32_t schemaSize = (pCfg->numOfColumns + pCfg->numOfTags) * sizeof(SSchema);

View File

@ -250,7 +250,7 @@ CaseCtrl gCaseCtrl = {
#endif
#if 0
#if 1
CaseCtrl gCaseCtrl = { // default
.precision = TIME_PRECISION_MILLI,
.bindNullNum = 0,
@ -282,7 +282,7 @@ CaseCtrl gCaseCtrl = { // default
};
#endif
#if 1
#if 0
CaseCtrl gCaseCtrl = { // query case with specified col&oper
.bindNullNum = 1,
.printCreateTblSql = false,