Skip to content

Commit

Permalink
[CBRD-24426] The cub_admin is dead abnomally when executing compactdb…
Browse files Browse the repository at this point in the history
… utility in the SA-mode (#3719) (#3728)

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

backport #3719
  • Loading branch information
hornetmj authored Jul 18, 2022
1 parent a92bb18 commit 0c076cb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/executables/compactdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static void process_object (THREAD_ENTRY * thread_p, DESC_OBJ * desc_obj, OID *
static int process_set (THREAD_ENTRY * thread_p, DB_SET * set);
static int process_value (THREAD_ENTRY * thread_p, DB_VALUE * value);
static DB_OBJECT *is_class (OID * obj_oid, OID * class_oid);
static int disk_update_instance (MOP classop, DESC_OBJ * obj, OID * oid);
static int disk_update_instance (THREAD_ENTRY * thread_p, MOP classop, DESC_OBJ * obj, OID * oid);
static RECDES *alloc_recdes (int length);
static void free_recdes (RECDES * rec);
static void disk_init (void);
Expand Down Expand Up @@ -436,7 +436,7 @@ process_object (THREAD_ENTRY * thread_p, DESC_OBJ * desc_obj, OID * obj_oid, boo
{
printf (msgcat_message (MSGCAT_CATALOG_UTILS, MSGCAT_UTIL_SET_COMPACTDB, COMPACTDB_MSG_UPDATING));
}
disk_update_instance (desc_obj->classop, desc_obj, obj_oid);
disk_update_instance (thread_p, desc_obj->classop, desc_obj, obj_oid);
}
}

Expand Down Expand Up @@ -559,12 +559,13 @@ is_class (OID * obj_oid, OID * class_oid)
/*
* disk_update_instance - update object instance
* return: number of processed instance. 0 is error.
* thread_p(in): thread entry
* classop(in): class object
* obj(in): object instance
* oid(in): oid
*/
static int
disk_update_instance (MOP classop, DESC_OBJ * obj, OID * oid)
disk_update_instance (THREAD_ENTRY * thread_p, MOP classop, DESC_OBJ * obj, OID * oid)
{
HEAP_OPERATION_CONTEXT update_context;
HFID *hfid;
Expand Down Expand Up @@ -613,7 +614,7 @@ disk_update_instance (MOP classop, DESC_OBJ * obj, OID * oid)

heap_create_update_context (&update_context, hfid, oid, WS_OID (classop), Diskrec, NULL,
UPDATE_INPLACE_CURRENT_MVCCID);
if (heap_update_logical (NULL, &update_context) != NO_ERROR)
if (heap_update_logical (thread_p, &update_context) != NO_ERROR)
{
printf (msgcat_message (MSGCAT_CATALOG_UTILS, MSGCAT_UTIL_SET_COMPACTDB, COMPACTDB_MSG_CANT_UPDATE));
return (0);
Expand Down

0 comments on commit 0c076cb

Please sign in to comment.