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

Unexpected PROCEDURE does not exist error with a non-default PATH

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Not a Bug
    • 13.0, 12.3.1
    • N/A
    • Stored routines
    • None
    • Unexpected results

    Description

      Update 2026-05-19

      In the original bug report CURRENT_PATH was incorrectly used instead of CURRENT_SCHEMA.

      With CURRENT_SCHEMA it works fine as expected:

      SET PATH 'CURRENT_SCHEMA,test1';
      DELIMITER $$
      CREATE OR REPLACE PROCEDURE p1()
      BEGIN
        SELECT 1;
      END;
      $$
      DELIMITER ;
      CALL p1();
      

      +---+
      | 1 |
      +---+
      | 1 |
      +---+
      

      Closing as Not a Bug.

      The original report

      This script:

      SET PATH 'CURRENT_PATH,test1';
      DELIMITER $$
      CREATE OR REPLACE PROCEDURE p1()
      BEGIN
        SELECT 1;
      END;
      $$
      DELIMITER ;
      CALL p1();
      

      produces an unexpected error:

      ERROR 1305 (42000): PROCEDURE p1 does not exist
      

      It makes the use of the feature quite problematic.

      Note, if I do SET PATH DEFAULT, the CALL works fine.

      Reproduces on 12.3 on this commit:

      commit bf715bc46e2c6a6974eaa2c7e1eae637aad65b42
      Author: Alexey Botchkov <holyfoot@askmonty.org>
      Date:   Wed May 13 13:10:58 2026 +0400
       
          MDEV-39536 ASAN heap-buffer-overflow in process_str_arg upon ER_TRUNCATED_WRONG_VALUE "Incorrect XML value".
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 3h
                  3h

                  Git Integration

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