[MDEV-6599] SIGNAL ... MESSAGE_TEXT accepts malformed strings Created: 2014-08-18  Updated: 2023-11-28

Status: Confirmed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.13
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Minor
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Unresolved Votes: 0
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.


Generated at Thu Feb 08 07:13:08 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.