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

Columns named old/new of other tables are resolved as the OLD/NEW row inside trigger bodies, giving ER_TRG_NO_SUCH_ROW_IN_TRG and ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION

    XMLWordPrintable

Details

    • Bug
    • Status: In Review (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 13.2
    • 13.2
    • Triggers
    • None
    • Not for Release Notes
    • Q4/2026 Server Development

    Description

      Test case 1

      1. SELECT of a column named old (fails at CREATE TRIGGER):

      CREATE TABLE t (old INT);
      CREATE TABLE t1 (a INT);
      CREATE TRIGGER tr BEFORE INSERT ON t1 FOR EACH ROW SELECT old FROM t INTO @x;
      -- ERROR 1363 (HY000): There is no OLD row in on INSERT trigger
      

      Test case 2

      2. Expression on a column named new (fails when the trigger fires):

      CREATE TABLE t (new INT);
      CREATE TABLE t1 (a INT);
      CREATE TRIGGER tr BEFORE INSERT ON t1 FOR EACH ROW UPDATE t SET new = new + 1;
      INSERT INTO t1 VALUES (1);
      -- ERROR 4078 (HY000): Illegal parameter data types row and int for operation '+'
      

      Attachments

        Issue Links

          Activity

            People

              shulga Dmitry Shulga
              ramesh Ramesh Sivaraman
              Rucha Deodhar Rucha Deodhar
              Dmitry Shulga Dmitry Shulga
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 0d
                  0d
                  Remaining:
                  Time Spent - 1d 0.5h Remaining Estimate - 1d
                  1d
                  Logged:
                  Time Spent - 1d 0.5h Remaining Estimate - 1d
                  1d 0.5h

                  Git Integration

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