fix a problem

This commit is contained in:
Hongze Cheng 2022-03-29 07:57:38 +00:00
parent 4d3a523f41
commit 4552f9ba2f
1 changed files with 2 additions and 1 deletions

View File

@ -163,6 +163,7 @@ int metaOpenDB(SMeta *pMeta) {
return -1; return -1;
} }
pMeta->pDB = pMetaDb;
return 0; return 0;
} }
@ -236,7 +237,7 @@ int metaSaveTableToDB(SMeta *pMeta, STbCfg *pTbCfg) {
} }
// update name.idx // update name.idx
int nameLen; int nameLen = strlen(pTbCfg->name);
memcpy(buf, pTbCfg->name, nameLen + 1); memcpy(buf, pTbCfg->name, nameLen + 1);
((tb_uid_t *)(buf + nameLen + 1))[0] = uid; ((tb_uid_t *)(buf + nameLen + 1))[0] = uid;
pKey = buf; pKey = buf;