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

trigger name is empty after upgrade to 10.4

Details

    Description

      Created trigger on 10.3 installation with oracle mode.

      MariaDB [information_schema]> SELECT * FROM TRIGGERS\G
      *************************** 1. row ***************************
                 TRIGGER_CATALOG: def
                  TRIGGER_SCHEMA: test
                    TRIGGER_NAME: tr_sez
              EVENT_MANIPULATION: DELETE
            EVENT_OBJECT_CATALOG: def
             EVENT_OBJECT_SCHEMA: test
              EVENT_OBJECT_TABLE: sez
                    ACTION_ORDER: 1
                ACTION_CONDITION: NULL
                ACTION_STATEMENT: declare akon char(1);
      begin
      akon := 'U';
      if deleting then akon := 'D';
      end if;
      delete from sachb_z
      where mand = :old.mand
      and id_role = :old.id_role
      and sach_nr in (select sach_nr from sach_b
      where mand = :old.mand
      and id_se = :old.id_se);
      end
              ACTION_ORIENTATION: ROW
                   ACTION_TIMING: AFTER
      ACTION_REFERENCE_OLD_TABLE: NULL
      ACTION_REFERENCE_NEW_TABLE: NULL
        ACTION_REFERENCE_OLD_ROW: OLD
        ACTION_REFERENCE_NEW_ROW: NEW
                         CREATED: 2021-05-12 02:18:25.52
                        SQL_MODE: PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER,SIMULTANEOUS_ASSIGNMENT
                         DEFINER: root@localhost
            CHARACTER_SET_CLIENT: latin1
            COLLATION_CONNECTION: latin1_swedish_ci
              DATABASE_COLLATION: latin1_swedish_ci
      1 row in set (0.004 sec)
      

      And after upgrade to 10.4, TRIGGER_NAME column is empty.

      MariaDB [test]> select * from information_schema.triggers\G
      *************************** 1. row ***************************
                 TRIGGER_CATALOG: def
                  TRIGGER_SCHEMA: test
                    TRIGGER_NAME: 
              EVENT_MANIPULATION: DELETE
            EVENT_OBJECT_CATALOG: def
             EVENT_OBJECT_SCHEMA: test
              EVENT_OBJECT_TABLE: sez
                    ACTION_ORDER: 1
                ACTION_CONDITION: NULL
                ACTION_STATEMENT: CREATE DEFINER="root"@"localhost" trigger tr_sez
      after delete on sez
      for each row 
      declare akon char(1);
      begin
      akon := 'U';
      if deleting then akon := 'D';
      end if;
      delete from sachb_z
      where mand = :old.mand
      and id_role = :old.id_role
      and sach_nr in (select sach_nr from sach_b
      where mand = :old.mand
      and id_se = :old.id_se);
      end
              ACTION_ORIENTATION: ROW
                   ACTION_TIMING: AFTER
      ACTION_REFERENCE_OLD_TABLE: NULL
      ACTION_REFERENCE_NEW_TABLE: NULL
        ACTION_REFERENCE_OLD_ROW: OLD
        ACTION_REFERENCE_NEW_ROW: NEW
                         CREATED: 2021-05-12 02:18:25.52
                        SQL_MODE: PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ORACLE,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,NO_AUTO_CREATE_USER,SIMULTANEOUS_ASSIGNMENT
                         DEFINER: 
            CHARACTER_SET_CLIENT: latin1
            COLLATION_CONNECTION: latin1_swedish_ci
              DATABASE_COLLATION: latin1_swedish_ci
      1 row in set (0.002 sec)
      

      And can't find way to drop trigger or write to table in question. Tried to set same sql_mode as for trigger and bounce server but no luck.

      MariaDB> INSERT INTO test.sez (mand,id_se,id_role) VALUES (1,2,5);
      ERROR 1064 (42000): Unknown trigger has an error in its body: 'Undeclared variable: deleting'
      

      Attachments

        Activity

          muhammad.irfan Muhammad Irfan created issue -
          julien.fritsch Julien Fritsch made changes -
          Field Original Value New Value
          Fix Version/s 10.4 [ 22408 ]
          Fix Version/s 10.5 [ 23123 ]
          julien.fritsch Julien Fritsch made changes -
          Assignee Oleksandr Byelkin [ sanja ]
          sanja Oleksandr Byelkin made changes -
          Labels need_feedback
          sanja Oleksandr Byelkin made changes -
          Labels need_feedback
          julien.fritsch Julien Fritsch made changes -
          Status Open [ 1 ] Confirmed [ 10101 ]
          bar Alexander Barkov made changes -
          Assignee Oleksandr Byelkin [ sanja ] Alexander Barkov [ bar ]
          julien.fritsch Julien Fritsch made changes -
          Labels need_feedback
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 121777 ] MariaDB v4 [ 144361 ]
          julien.fritsch Julien Fritsch made changes -
          Status Confirmed [ 10101 ] Open [ 1 ]
          julien.fritsch Julien Fritsch made changes -
          Status Open [ 1 ] Needs Feedback [ 10501 ]
          julien.fritsch Julien Fritsch made changes -
          Labels need_feedback
          elenst Elena Stepanova made changes -
          Status Needs Feedback [ 10501 ] Open [ 1 ]
          bar Alexander Barkov made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          bar Alexander Barkov made changes -
          Assignee Alexander Barkov [ bar ] Dmitry Shulga [ JIRAUSER47315 ]
          Status In Progress [ 3 ] In Review [ 10002 ]
          shulga Dmitry Shulga made changes -
          Assignee Dmitry Shulga [ JIRAUSER47315 ] Alexander Barkov [ bar ]
          Status In Review [ 10002 ] Stalled [ 10000 ]
          bar Alexander Barkov made changes -
          issue.field.resolutiondate 2022-01-14 03:23:42.0 2022-01-14 03:23:42.292
          bar Alexander Barkov made changes -
          Component/s Stored routines [ 13905 ]
          Component/s Triggers [ 10109 ]
          Fix Version/s 10.4.23 [ 26807 ]
          Fix Version/s 10.5.14 [ 26809 ]
          Fix Version/s 10.6.6 [ 26811 ]
          Fix Version/s 10.7.2 [ 26813 ]
          Fix Version/s 10.8.1 [ 26815 ]
          Fix Version/s 10.4 [ 22408 ]
          Fix Version/s 10.5 [ 23123 ]
          Resolution Fixed [ 1 ]
          Status Stalled [ 10000 ] Closed [ 6 ]
          mariadb-jira-automation Jira Automation (IT) made changes -
          Zendesk Related Tickets 156124

          People

            bar Alexander Barkov
            muhammad.irfan Muhammad Irfan
            Votes:
            1 Vote for this issue
            Watchers:
            6 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.