[MDEV-5770] Inconsistency between string and hex warning representation when converting from string to the other types Created: 2014-03-01  Updated: 2023-04-27

Status: Open
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.3.12, 5.5.36, 10.0.8, 10.1, 10.2, 10.3, 10.4, 10.5
Fix Version/s: 10.4, 10.5

Type: Bug Priority: Minor
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-6092 Weird hex warnings Closed

 Description   

select cast('я' as int), cast('я' as time);
show warnings;

returns hex warning representation when converting to time/datetime,
and string representation when converting to the other data types:

+-------------------+--------------------+
| cast('я' as int)  | cast('я' as time)  |
+-------------------+--------------------+
|                 0 | 00:00:00           |
+-------------------+--------------------+
1 row in set, 2 warnings (0.00 sec)
 
+---------+------+--------------------------------------------+
| Level   | Code | Message                                    |
+---------+------+--------------------------------------------+
| Warning | 1292 | Truncated incorrect INTEGER value: 'я'     |
| Warning | 1292 | Truncated incorrect time value: '\xD1\x8F' |
+---------+------+--------------------------------------------+
2 rows in set (0.00 sec)

It should be fixed to print string representation in both cases.


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