Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.2.27, 10.3.18, 10.4.8
Description
When a duplicate key is encountered, the error message is constructed in print_keydup_error:
https://github.com/MariaDB/server/blob/mariadb-10.2.27/sql/handler.cc#L3450
The duplicate value is silently truncated to 64 characters. This is because the format string for the error message sets the field width to 64:
https://github.com/MariaDB/server/blob/mariadb-10.2.27/sql/share/errmsg-utf8.txt#L6166
Truncation is probably fine, but since this specific error involves a "duplicate key", it can be a bit confusing if the user searches the table for that string, and then doesn't find another row with that specific value.
If we can't print the whole value, then the error message may want to mention that the string may be truncated to 64 characters.
Attachments
Issue Links
- causes
-
MDEV-22147 main.mysqldump fails with wrong result (truncated output)
- Closed
-
MDEV-22545 my_vsnprintf behaves not as in C standard
- Closed
- relates to
-
MDEV-20605 Awaken transaction can miss inserted by other transaction records due to wrong persistent cursor restoration
- Closed
-
MDEV-20628 If temporary error occurs with optimistic mode of parallel replication, error message has false information
- Closed