Fix the exception of updating the same column in ps mode

This commit is contained in:
obdev
2024-02-02 13:42:52 +00:00
committed by ob-robot
parent f3a42dc9c8
commit e67982d89c

View File

@ -713,7 +713,8 @@ int ObDelUpdResolver::add_assignment(common::ObIArray<ObTableAssignment> &assign
table_assign = &assigns.at(assigns.count() - 1); table_assign = &assigns.at(assigns.count() - 1);
} }
} }
if (OB_SUCC(ret) && (is_mysql_mode() || assign.column_expr_->is_generated_column())) { if (OB_SUCC(ret) && !params_.is_prepare_stage_
&& (is_mysql_mode() || assign.column_expr_->is_generated_column())) {
//in MySQL: //in MySQL:
//The second assignment in the following statement sets col2 to the current (updated) col1 value, //The second assignment in the following statement sets col2 to the current (updated) col1 value,
//not the original col1 value. //not the original col1 value.