1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

cleanup: trg2bit() helper

This commit is contained in:
Sergei Golubchik
2019-01-05 11:49:35 +01:00
parent 0e1f7f5c4a
commit e99e6f29e9
4 changed files with 16 additions and 25 deletions

View File

@ -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++)
{