Merge branch '3.0' into feature/compressData
This commit is contained in:
parent
d1887c80de
commit
cad8fec42e
|
@ -1490,6 +1490,7 @@ static int metaAlterTableColumn(SMeta *pMeta, int64_t version, SVAlterTbReq *pAl
|
||||||
entry.version = version;
|
entry.version = version;
|
||||||
int tlen;
|
int tlen;
|
||||||
SSchema *pNewSchema = NULL;
|
SSchema *pNewSchema = NULL;
|
||||||
|
SSchema tScheam;
|
||||||
switch (pAlterTbReq->action) {
|
switch (pAlterTbReq->action) {
|
||||||
case TSDB_ALTER_TABLE_ADD_COLUMN:
|
case TSDB_ALTER_TABLE_ADD_COLUMN:
|
||||||
if (pColumn) {
|
if (pColumn) {
|
||||||
|
@ -1525,6 +1526,7 @@ static int metaAlterTableColumn(SMeta *pMeta, int64_t version, SVAlterTbReq *pAl
|
||||||
SSchema *pCol = &pSchema->pSchema[entry.ntbEntry.schemaRow.nCols - 1];
|
SSchema *pCol = &pSchema->pSchema[entry.ntbEntry.schemaRow.nCols - 1];
|
||||||
updataTableColCmpr(&entry.colCmpr, pCol, 1);
|
updataTableColCmpr(&entry.colCmpr, pCol, 1);
|
||||||
freeColCmpr = true;
|
freeColCmpr = true;
|
||||||
|
ASSERT(entry.colCmpr.nCols == pSchema->nCols);
|
||||||
break;
|
break;
|
||||||
case TSDB_ALTER_TABLE_DROP_COLUMN:
|
case TSDB_ALTER_TABLE_DROP_COLUMN:
|
||||||
if (pColumn == NULL) {
|
if (pColumn == NULL) {
|
||||||
|
@ -1539,6 +1541,7 @@ static int metaAlterTableColumn(SMeta *pMeta, int64_t version, SVAlterTbReq *pAl
|
||||||
terrno = TSDB_CODE_VND_COL_SUBSCRIBED;
|
terrno = TSDB_CODE_VND_COL_SUBSCRIBED;
|
||||||
goto _err;
|
goto _err;
|
||||||
}
|
}
|
||||||
|
memcpy(&tScheam, pColumn, sizeof(SSchema));
|
||||||
pSchema->version++;
|
pSchema->version++;
|
||||||
tlen = (pSchema->nCols - iCol - 1) * sizeof(SSchema);
|
tlen = (pSchema->nCols - iCol - 1) * sizeof(SSchema);
|
||||||
if (tlen) {
|
if (tlen) {
|
||||||
|
@ -1555,7 +1558,8 @@ static int metaAlterTableColumn(SMeta *pMeta, int64_t version, SVAlterTbReq *pAl
|
||||||
(void)tsdbCacheDropNTableColumn(pMeta->pVnode->pTsdb, entry.uid, cid, col_type);
|
(void)tsdbCacheDropNTableColumn(pMeta->pVnode->pTsdb, entry.uid, cid, col_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
updataTableColCmpr(&entry.colCmpr, pColumn, 0);
|
updataTableColCmpr(&entry.colCmpr, &tScheam, 0);
|
||||||
|
ASSERT(entry.colCmpr.nCols == pSchema->nCols);
|
||||||
break;
|
break;
|
||||||
case TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES:
|
case TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES:
|
||||||
if (pColumn == NULL) {
|
if (pColumn == NULL) {
|
||||||
|
|
Loading…
Reference in New Issue