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

SET PATH does not affect events

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 12.3.2
    • 12.3
    • Events

    Description

      MariaDB 12.3's new PATH variable (from MDEV-34391) seems to affect all stored objects except events. I assume this may be an accidental omission, since PATH does affect procs, funcs, views, and triggers.

      That said, the documentation at https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/set-commands/set-path is a bit unclear about which object types are supposed to be impacted by PATH and "remembered" by the server at creation time: for example that page doesn't currently mention triggers at all, even though they are indeed affected by PATH in my testing.

      Repro that shows it doesn't affect events:

      CREATE DATABASE a;
      USE a;
      CREATE FUNCTION f() RETURNS int RETURN 42;
      CREATE DATABASE b;
      USE b;
      SET PATH 'a';
      SET GLOBAL event_scheduler=ON;
      CREATE EVENT e ON SCHEDULE EVERY 5 MINUTE DO SET @bar = @bar + f();
      

      Once the event attempts to run, server error log will show [ERROR] Event Scheduler: [root@localhost][b.e] FUNCTION b.f does not exist

      Relatedly, the mysql.event table does not have a `path` column, whereas mysql.proc now has one.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              evanelias Evan Elias
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.