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

SIGNAL ... MESSAGE_TEXT accepts malformed strings

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.0.13
    • Fix Version/s: 10.0
    • Component/s: None
    • Labels:
      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.

        Gliffy Diagrams

          Attachments

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                bar Alexander Barkov
                Reporter:
                bar Alexander Barkov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: