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

PI() does not work well in UCS2/UTF16/UTF32 context

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.3.12, 5.5.39, 10.0.14
    • Fix Version/s: 10.0.14
    • Component/s: None
    • Labels:
      None

      Description

      MariaDB [test]> SELECT CONCAT(CONVERT('pi' USING ucs2),PI()) AS bad, CONCAT(CONVERT('pi' USING ucs2),CONCAT(PI())) AS good;
      +----------------+------------+
      | bad            | good       |
      +----------------+------------+
      | pi㌮ㄴㄵ㤳     | pi3.141593 |
      +----------------+------------+
      1 row in set (0.00 sec)

      The first column with PI() produces a wrong value.
      The second column with CONCAT(PI()) returns a good value.

      The first column should be fixed to return the same value with the second one.

        Attachments

          Activity

            People

            Assignee:
            bar Alexander Barkov
            Reporter:
            bar Alexander Barkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: