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

Multiple triggers are not counted in Executed_triggers status variable

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • N/A
    • 10.2.3
    • Triggers
    • 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

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

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.