提交 06d62f76 编写于 作者: H hezuojiao 提交者: ob-robot

[CP] Fix identity column type mismatch

上级 e97de44b
......@@ -2306,7 +2306,14 @@ int ObTableSchema::get_default_row(
ret = OB_ERR_UNEXPECTED;
LOG_WARN("column must not null", K(ret), K(j), K(column_cnt_));
} else if (column->get_column_id() == column_ids.at(i).col_id_) {
default_row.cells_[i] = (column->*func)();
if (column->is_identity_column()) {
// Identity colunm's orig_default_value and cur_default_val are used to store sequence id
// and desc table, it does not have the same semantics as normal default. so here we set
// its default value as null to avoid type mismatch.
default_row.cells_[i].set_null();
} else {
default_row.cells_[i] = (column->*func)();
}
found = true;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册