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

SIGNAL ... MESSAGE_TEXT accepts malformed strings

    XMLWordPrintable

Details

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

    Description

      This script:

      SET NAMES utf8;
      SIGNAL SQLSTATE '01000' SET MESSAGE_TEXT='a��b';
      SHOW WARNINGS;

      returns:

      +---------+------+---------+
      | Level   | Code | Message |
      +---------+------+---------+
      | Warning | 1642 | a��b      |
      +---------+------+---------+

      Note, '��' is a 4-byte UTF-8 character, which is not supported
      in MariaDB's 3-byte "utf8" (it requires 4-byte "utf8mb4" to work).

      Thus, '��' is a bad sequence of bytes from the point of view "utf8".

      It should be fixed either to replace bad byte sequences to question marks,
      or just return an error on attempt to set a broken MESSAGE_TEXT.

      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.