TD-355
This commit is contained in:
parent
5cbcbda144
commit
538538205a
|
@ -77,6 +77,7 @@ typedef struct SSuperTableObj {
|
|||
uint64_t uid;
|
||||
int64_t createdTime;
|
||||
int32_t sversion;
|
||||
int32_t tversion;
|
||||
int32_t numOfColumns;
|
||||
int32_t numOfTags;
|
||||
int8_t reserved[15];
|
||||
|
|
|
@ -763,6 +763,7 @@ static void mgmtProcessCreateSuperTableMsg(SQueuedMsg *pMsg) {
|
|||
pStable->createdTime = taosGetTimestampMs();
|
||||
pStable->uid = (((uint64_t) pStable->createdTime) << 16) + (sdbGetVersion() & ((1ul << 16) - 1ul));
|
||||
pStable->sversion = 0;
|
||||
pStable->tversion = 0;
|
||||
pStable->numOfColumns = htons(pCreate->numOfColumns);
|
||||
pStable->numOfTags = htons(pCreate->numOfTags);
|
||||
|
||||
|
@ -882,7 +883,7 @@ static int32_t mgmtAddSuperTableTag(SSuperTableObj *pStable, SSchema schema[], i
|
|||
}
|
||||
|
||||
pStable->numOfTags += ntags;
|
||||
pStable->sversion++;
|
||||
pStable->tversion++;
|
||||
|
||||
SSdbOper oper = {
|
||||
.type = SDB_OPER_GLOBAL,
|
||||
|
@ -909,7 +910,7 @@ static int32_t mgmtDropSuperTableTag(SSuperTableObj *pStable, char *tagName) {
|
|||
memmove(pStable->schema + pStable->numOfColumns + col, pStable->schema + pStable->numOfColumns + col + 1,
|
||||
sizeof(SSchema) * (pStable->numOfTags - col - 1));
|
||||
pStable->numOfTags--;
|
||||
pStable->sversion++;
|
||||
pStable->tversion++;
|
||||
|
||||
SSdbOper oper = {
|
||||
.type = SDB_OPER_GLOBAL,
|
||||
|
|
Loading…
Reference in New Issue