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

Case sensitive problem with routines SHOW <P/F> STATUS;

    XMLWordPrintable

Details

    • Not for Release Notes

    Description

      When working with a case sensitive file-system, MariaDB (it also fails in MySQL) allows you to have
      a database with the same name in different cases (example TEST/test).
      This works correctly.
      However, procedures that are related to that database are stored inside
      information_schema.routines associated with ROUTINE_SCHEMA which is a
      case insensitive column.
      This brings a problem, for example, when using mysqldump since when
      listing routines to dump in the line "SHOW %s STATUS WHERE Db = '%s'"
      it would bring procedures from other databases that have the same name
      with different case.
      mysqldump could be modified to use mysql.proc instead which correctly
      has utf8_bin in the Db column, but I'm not sure that would be the best
      to go since this affects anyone using SHOW <P/F> STATUS.

      CREATE DATABASE A;
      USE A;
       
      delimiter //
       
      CREATE PROCEDURE simpleproc()
          BEGIN
             SELECT 1;
          END//
       
      delimiter ;
      CREATE DATABASE a;
      USE a;
       
      SHOW PROCEDURE STATUS WHERE Db = 'a';
      -- Incorrectly shows procedure from A
      SELECT count(*) FROM mysql.proc WHERE Db='a';
      -- Correctly show 0 results
       
      DROP DATABASE A;
      DROP DATABASE a;

      Attachments

        1. bug.72029.sql
          0.4 kB
          Guillermo Bonvehi
        2. bug.72029.callproc.sql
          0.5 kB
          Guillermo Bonvehi

        Issue Links

          Activity

            People

              Unassigned Unassigned
              gbonvehi Guillermo Bonvehi
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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