diff options
Diffstat (limited to 'storage/innobase/handler')
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 4 |
1 files changed, 3 insertions, 1 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; |