Skip to content

Commit

Permalink
[CBRD-24422] When an error occurs in update_class(), it is not initia…
Browse files Browse the repository at this point in the history
…lized to NULL after classobj_free_template() is executed, so core occurs later. (#3711) (#3862)

http://jira.cubrid.org/browse/CBRD-24422

backport #3711
  • Loading branch information
youngjinj authored Oct 13, 2022
1 parent 64220e1 commit 526157f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/object/schema_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -12762,6 +12762,13 @@ update_class (SM_TEMPLATE * template_, MOP * classmop, int auto_res)
assert (error != ER_HEAP_NODATA_NEWADDRESS); /* TODO - */

classobj_free_template (flat);

/* don't touch this class if we aborted ! */
if (class_ != NULL && error != ER_LK_UNILATERALLY_ABORTED)
{
class_->new_ = NULL;
}

abort_subclasses (newsubs);
if (error == ER_BTREE_UNIQUE_FAILED || error == ER_FK_INVALID || error == ER_SM_PRIMARY_KEY_EXISTS
|| error == ER_NOT_NULL_DOES_NOT_ALLOW_NULL_VALUE || error == ER_SM_INVALID_UNIQUE_IDX_PARTITION)
Expand Down

0 comments on commit 526157f

Please sign in to comment.