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

CONCAT of DOUBLE with a string cuts off last character sometimes

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Not a Bug
    • 10.8.3
    • N/A
    • Data types
    • None

    Description

      I found a strange behaviour of DOUBLE-fields.

      I have a table with a field duration which is defined as double(4,2)

      Then there are the following entries:

      8.45
      13.55
      

      When I do the following select:

      SELECT CONCAT(duration,' hours') FROM table;
      

      I get the following result:

      8.45 hours
      13.55 hour
      

      as soon as the value exceeds 10, the "s" of hours gets cut off.

      changing the field to decimal(4,2) solved the problem for me.

      Attachments

        Activity

          People

            Unassigned Unassigned
            simusch Simon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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