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

CAST(LEAST('11','2') AS DECIMAL) returns a wrong result

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.3.12, 5.5.35, 10.0.9
    • Fix Version/s: 5.3.13, 10.0, 5.5
    • Component/s: None
    • Labels:
      None

      Description

      mysql> SELECT LEAST('11','2'), CAST(LEAST('11','2') AS DECIMAL);
      +-----------------+----------------------------------+
      | LEAST('11','2') | CAST(LEAST('11','2') AS DECIMAL) |
      +-----------------+----------------------------------+
      | 11              |                                2 |
      +-----------------+----------------------------------+
      1 row in set (0.01 sec)
      

      The result for CAST(LEAST()) is wrong.
      The expected result is 11, similar to what LEAST('11,'2') returns.

        Gliffy Diagrams

          Attachments

            Activity

            There are no comments yet on this issue.

              People

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

                Dates

                • Created:
                  Updated: