diff options
author | Sergei Golubchik <serg@mariadb.org> | 2019-01-05 11:49:35 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-01-25 19:59:04 +0100 |
commit | e99e6f29e98df8762305c0f7c1caebc728cfc6dc (patch) | |
tree | 288f259fd1169147f14f6aa8718dad9ab68ad2c9 /sql/sql_trigger.cc | |
parent | 0e1f7f5c4a7eb90f345f2c2da6b4d7ce0b4056c4 (diff) | |
download | mariadb-git-e99e6f29e98df8762305c0f7c1caebc728cfc6dc.tar.gz |
cleanup: trg2bit() helper
Diffstat (limited to 'sql/sql_trigger.cc')
-rw-r--r-- | sql/sql_trigger.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index dde93dc6ed6..d03807c63d5 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -2192,8 +2192,7 @@ bool Table_triggers_list::process_triggers(THD *thd, This trigger must have been processed by the pre-locking algorithm. */ - DBUG_ASSERT(trigger_table->pos_in_table_list->trg_event_map & - static_cast<uint>(1 << static_cast<int>(event))); + DBUG_ASSERT(trigger_table->pos_in_table_list->trg_event_map & trg2bit(event)); thd->reset_sub_statement_state(&statement_state, SUB_STMT_TRIGGER); @@ -2245,8 +2244,7 @@ add_tables_and_routines_for_triggers(THD *thd, for (int i= 0; i < (int)TRG_EVENT_MAX; i++) { - if (table_list->trg_event_map & - static_cast<uint8>(1 << static_cast<int>(i))) + if (table_list->trg_event_map & trg2bit(static_cast<trg_event_type>(i))) { for (int j= 0; j < (int)TRG_ACTION_MAX; j++) { |