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

Allow to create EVENT using compound statements out of stored programs

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • Events
    • None

    Description

      I fear this is going to get reclassified as a documentation bug rather than the behaviour being changed, but worth a shot:-

      At present if one tries to create an EVENT within a compound statement but outside of a stored routine, the attempt fails with:

      ERROR 1576 (HY000): Recursion of EVENT DDL statements is forbidden when body is present

      For example:

      DELIMITER //
      IF @production IS NOT NULL THEN
      CREATE EVENT IF NOT EXISTS report_stats ON SCHEDULE EVERY 5 MINUTE DO CALL report_stats();
      ELSE
      CREATE EVENT IF NOT EXISTS report_stats ON SCHEDULE EVERY 1 MINUTE DO CALL report_stats("Test");
      END IF //
      DELIMITER ;

      Attachments

        Activity

          People

            Unassigned Unassigned
            jakdaw Chris Wilson
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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