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

Stored routines `a.b`.`c` and `a`.`b.c` are erroneously treated as same

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.0, 10.1, 10.2, 10.3
    • 10.4
    • Stored routines
    • None

    Description

      DROP DATABASE IF EXISTS `a`;
      DROP DATABASE IF EXISTS `a.b`;
      CREATE DATABASE `a.b`;
      CREATE FUNCTION `a.b`.`c`() RETURNS INT RETURN 10;
      SELECT `a.b`.`c`(), `a`.`b.c`();
      

      +-------------+-------------+
      | `a.b`.`c`() | `a`.`b.c`() |
      +-------------+-------------+
      |          10 |          10 |
      +-------------+-------------+
      

      Notice, the function is accessible with two names:

      • Database `a.b` function `c`
      • Database `a` function `b.c`

      The function created as `a.b`.`c`() should not be available as `a`.`b.c`().
      Looks like a potential security hole.

      Attachments

        Activity

          People

            bar Alexander Barkov
            bar Alexander Barkov
            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.