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

Invalid use of group by in after insert trigger

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Incomplete
    • 10.1.31
    • N/A
    • Server
    • Linux Centos 6.8

    Description

      On a table that has an after insert trigger where you need to call a view that uses a group by the insert fails with Invalid use of group function

      however adding in a limit allows the query to run

      the trigger is defined as follows

      BEGIN

      drop temporary table if exists fsstoredcalcs;

      Create temporary table ttp1 as select * from myupdate_vw where fID = NEW.fID;

      //updates to tables based on ttp1

      END

      Changing this to the below works.

      BEGIN

      drop temporary table if exists fsstoredcalcs;

      Create temporary table ttp1 as select * from myupdate_vw where fID = NEW.fID limit 1000;

      //updates to tables based on ttp1

      END

      Attachments

        Activity

          People

            Unassigned Unassigned
            Vyspa Habib
            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.