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

DATE_FORMAT() is not UCS2 compatible

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 5.5, 10.1, 10.2, 10.3, 10.4, 10.5, 10.6
    • 10.6
    • None
    • 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.

      Attachments

        Activity

          People

            bar Alexander Barkov
            bar Alexander Barkov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.