提交 1b90edcc 编写于 作者: L lichuang

[TD-5324]<fix>:check max row bytes when alter tag/column width

上级 02eca3c0
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册