Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-10915

Multiple triggers are not counted in Executed_triggers status variable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: N/A
    • Fix Version/s: 10.2.3
    • Component/s: Triggers
    • Labels:
      None

      Description

      All multiple triggers count as one in Executed_triggers.

      create table t1 (i int);
       
      create trigger tr1 after insert on t1 for each row set @a=@a+1;
      create trigger tr2 after insert on t1 for each row set @a=@a+1;
      create trigger tr3 after insert on t1 for each row set @a=@a+1;
       
      flush status;
      show status like 'Executed_triggers';
      set @a=0;
      insert into t1 values (1);
      show status like 'Executed_triggers';
      select @a;
       
      drop table t1;
      

      MariaDB [test]> show status like 'Executed_triggers';
      +-------------------+-------+
      | Variable_name     | Value |
      +-------------------+-------+
      | Executed_triggers | 1     |
      +-------------------+-------+
      1 row in set (0.00 sec)
       
      MariaDB [test]> select @a;
      +------+
      | @a   |
      +------+
      |    3 |
      +------+
      1 row in set (0.00 sec)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                monty Michael Widenius
                Reporter:
                elenst Elena Stepanova
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: