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

Suppress "This function has the same name" warnings in I_S queries

    XMLWordPrintable

Details

    Description

      I create a stored function with a name of an existing built-in function.

      CREATE OR REPLACE FUNCTION UPPER() RETURNS TEXT RETURN 'upper';
      SHOW WARNINGS;
      

      +-------+------+--------------------------------------------------------------+
      | Level | Code | Message                                                      |
      +-------+------+--------------------------------------------------------------+
      | Note  | 1585 | This function 'UPPER' has the same name as a native function |
      +-------+------+--------------------------------------------------------------+
      

      It correctly returns a warning.

      Now I query I_S.ROUTINES and I_S.PARAMETERS:

      SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA='test' AND ROUTINE_NAME='upper';
      SHOW WARNINGS;
      

      +-------+------+--------------------------------------------------------------+
      | Level | Code | Message                                                      |
      +-------+------+--------------------------------------------------------------+
      | Note  | 1585 | This function 'upper' has the same name as a native function |
      +-------+------+--------------------------------------------------------------+
      

      SELECT * FROM INFORMATION_SCHEMA.PARAMETERS WHERE SPECIFIC_SCHEMA='test' AND SPECIFIC_NAME='upper';
      SHOW WARNINGS;
      

      +-------+------+--------------------------------------------------------------+
      | Level | Code | Message                                                      |
      +-------+------+--------------------------------------------------------------+
      | Note  | 1585 | This function 'UPPER' has the same name as a native function |
      +-------+------+--------------------------------------------------------------+
      

      It also returns warnings. This is too verbose.

      Let's suppress warnings during I_S queries.

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.