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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 5.3.12, 5.5.35, 10.0.9, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9
    • 5.5, 10.3
    • None
    • 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.

      Attachments

        Activity

          People

            bar Alexander Barkov
            bar Alexander Barkov
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.