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

UDF error, no function found error (where?) but function exists

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • None
    • 10.6
    • None
    • None

    Description

      Looking into an example:
      1. Install .so in plugin_dir, create UDF and hooray, visible result.
      2. Remove .so from plugin_dir and start server again

      MariaDB [(none)]> CREATE FUNCTION udf_intexample RETURNS INTEGER SONAME 'udf_staticexample.so';
      ERROR 1125 (HY000): Function 'udf_intexample' already exists
      MariaDB [(none)]> select udf_intexample();
      ERROR 1305 (42000): FUNCTION udf_intexample does not exist
      MariaDB [(none)]> select * from mysql.func;
      +-------------------+-----+----------------------+----------+
      | name              | ret | dl                   | type     |
      +-------------------+-----+----------------------+----------+
      | udf_staticexample |   2 | udf_staticexample.so | function |
      | udf_intexample    |   2 | udf_staticexample.so | function |
      +-------------------+-----+----------------------+----------+
      2 rows in set (0.000 sec)
      

      So here is some paradox (schrodinger cat) when invoking two statements (supposing we are the user that doesn't know what happened). Function is already installed and visible from mysql.func but no .so exist so nothing can be done. However IMHO it should be closer to the user where to inspect for the problem.
      Inspecting the error:

      $ ./extra/perror 1305
      MySQL error code 1305 (ER_SP_DOES_NOT_EXIST): %s %s does not exist
      

      I think condition should be checked for the file in plugin_dir and create the new message?!

      Attachments

        Activity

          People

            Unassigned Unassigned
            anel Anel Husakovic
            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.