[MDEV-24679] DATE_FORMAT() is not UCS2 compatible Created: 2021-01-25  Updated: 2021-01-25

Status: Open
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5, 10.1, 10.2, 10.3, 10.4, 10.5, 10.6
Fix Version/s: 10.6

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


 Description   

SELECT DATE_FORMAT(NOW(), '%Y');

+--------------------------+
| DATE_FORMAT(NOW(), '%Y') |
+--------------------------+
| 2021                     |
+--------------------------+
1 row in set (0.001 sec)

SET collation_connection=ucs2_general_ci;
SELECT DATE_FORMAT(NOW(), '%Y');

+--------------------------+
| DATE_FORMAT(NOW(), '%Y') |
+--------------------------+
|  ?                       |
+--------------------------+

Looks wrong. The second SELECT should return `2020` like the first one does.


Generated at Thu Feb 08 09:31:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.