提交 75c217e6 编写于 作者: S shenglian zhou

[TD-5517]<fix>: return error when apply schema action failed

上级 e393a561
......@@ -518,7 +518,11 @@ static int32_t modifyDBSchemas(TAOS* taos, SArray* stableSchemas) {
bool actionNeeded = false;
generateSchemaAction(pointTag, dbTagHash, dbSchema.tags, true, pointSchema->sTableName, &schemaAction, &actionNeeded);
if (actionNeeded) {
applySchemaAction(taos, &schemaAction);
code = applySchemaAction(taos, &schemaAction);
if (code != 0) {
destroySmlSTableSchema(&dbSchema);
return code;
}
}
}
......@@ -532,7 +536,11 @@ static int32_t modifyDBSchemas(TAOS* taos, SArray* stableSchemas) {
bool actionNeeded = false;
generateSchemaAction(pointCol, dbFieldHash, dbSchema.fields,false, pointSchema->sTableName, &schemaAction, &actionNeeded);
if (actionNeeded) {
applySchemaAction(taos, &schemaAction);
code = applySchemaAction(taos, &schemaAction);
if (code != 0) {
destroySmlSTableSchema(&dbSchema);
return code;
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册