[TD-5324]<fix>:check max row bytes when alter tag/column width
This commit is contained in:
parent
02eca3c0e4
commit
1b90edcc55
|
@ -1545,18 +1545,6 @@ static int32_t mnodeChangeSuperTableTag(SMnodeMsg *pMsg) {
|
|||
return TSDB_CODE_MND_FIELD_NOT_EXIST;
|
||||
}
|
||||
|
||||
// check exceed max row bytes
|
||||
int32_t i;
|
||||
uint32_t nLen = 0;
|
||||
for (i = 0; i < pStable->numOfColumns; ++i) {
|
||||
nLen += (pStable->schema[i].colId == col) ? pAlter->schema[0].bytes : pStable->schema[i].bytes;
|
||||
}
|
||||
if (nLen > TSDB_MAX_BYTES_PER_ROW) {
|
||||
mError("msg:%p, app:%p stable:%s, change column, name:%s exceed max row bytes", pMsg, pMsg->rpcMsg.ahandle,
|
||||
pStable->info.tableId, name);
|
||||
return TSDB_CODE_MND_EXCEED_MAX_ROW_BYTES;
|
||||
}
|
||||
|
||||
// update
|
||||
SSchema *schema = (SSchema *) (pStable->schema + col + pStable->numOfColumns);
|
||||
ASSERT(schema->type == TSDB_DATA_TYPE_BINARY || schema->type == TSDB_DATA_TYPE_NCHAR);
|
||||
|
|
Loading…
Reference in New Issue