diff options
Diffstat (limited to 'storage/innobase')
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 4 | ||||
-rw-r--r-- | storage/innobase/lock/lock0lock.cc | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index ea4e4f6094f..71ee54b7094 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -8580,10 +8580,12 @@ ha_innobase::update_row( const bool vers_ins_row = vers_set_fields && thd_sql_command(m_user_thd) != SQLCOM_ALTER_TABLE; + TABLE_LIST *tl= table->pos_in_table_list; + uint8 op_map= tl->trg_event_map | tl->slave_fk_event_map; /* This is not a delete */ m_prebuilt->upd_node->is_delete = (vers_set_fields && !vers_ins_row) || - (thd_sql_command(m_user_thd) == SQLCOM_DELETE && + (op_map & trg2bit(TRG_EVENT_DELETE) && table->versioned(VERS_TIMESTAMP)) ? VERSIONED_DELETE : NO_DELETE; diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index db4035157b0..46cfb6e5c88 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2022, Oracle and/or its affiliates. -Copyright (c) 2014, 2022, MariaDB Corporation. +Copyright (c) 2014, 2023, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -593,8 +593,6 @@ UNIV_INLINE bool lock_rec_has_to_wait( /*=================*/ - bool for_locking, - /*!< in is called locking or releasing */ const trx_t* trx, /*!< in: trx of new lock */ unsigned type_mode,/*!< in: precise mode of the new lock to set: LOCK_S or LOCK_X, possibly @@ -748,7 +746,7 @@ lock_has_to_wait( } return lock_rec_has_to_wait( - false, lock1->trx, lock1->type_mode, lock2, + lock1->trx, lock1->type_mode, lock2, lock_rec_get_nth_bit(lock1, PAGE_HEAP_NO_SUPREMUM)); } @@ -1025,7 +1023,7 @@ static lock_t *lock_rec_other_has_conflicting(unsigned mode, for (lock_t* lock = lock_sys_t::get_first(cell, id, heap_no); lock; lock = lock_rec_get_next(heap_no, lock)) { - if (lock_rec_has_to_wait(true, trx, mode, lock, is_supremum)) { + if (lock_rec_has_to_wait(trx, mode, lock, is_supremum)) { return(lock); } } |