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

Characterset missing in routine definition in information_schema.routines

    XMLWordPrintable

Details

    Description

      Characterset for a literal is missing in the routine's definition in information_schema.routines.

      1. create routine with explicit characterset _utf8mb4 for default varchar value

      CREATE PROCEDURE `testprocedure`()
      LANGUAGE SQL
      NOT DETERMINISTIC
      CONTAINS SQL
      SQL SECURITY DEFINER
      COMMENT ''
      BEGIN
      DECLARE cLastPushKey varchar(20) DEFAULT _utf8mb4 'ADJECTIVES' COLLATE utf8mb4_german2_ci;
      END
      

      2. select definition record in information_schema.ROUTINES

      SELECT * FROM information_schema.ROUTINES
      WHERE routine_name = 'testprocedure'
      

      Column ROUTINE_DEFINITION shows routine definition as

      BEGIN
      	DECLARE cLastPushKey varchar(20) DEFAULT  'ADJECTIVES' COLLATE utf8mb4_german2_ci;
      END
      

      Characterset _utf8mb4 is missing.

      This makes it impossible to write a custom export for specific routines.
      No workaround found so far.

      I'm working with 5.4.11
      10.5.4 shows same behavior.

      Attachments

        Issue Links

          Activity

            People

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