Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-4618

FLOOR(-9999.0) returns a bad result

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.6.1, 6.1.1
    • 6.1.1
    • PrimProc
    • None

    Description

      DROP TABLE IF EXISTS cs1;
      CREATE TABLE cs1 (d6 DECIMAL(18,1))ENGINE=ColumnStore;
      INSERT INTO cs1 VALUES (-9999.0);
      SELECT  d6, FLOOR(d6) FROM cs1;
      

      +---------+-----------+
      | d6      | FLOOR(d6) |
      +---------+-----------+
      | -9999.0 |    -10000 |
      +---------+-----------+
      

      Looks wrong. The expected result is:

      DROP TABLE IF EXISTS cs1;
      CREATE TABLE cs1 (d6 DECIMAL(18,1))ENGINE=InnoDB;
      INSERT INTO cs1 VALUES (-9999.0);
      SELECT  d6, FLOOR(d6) FROM cs1;
      

      +---------+-----------+
      | d6      | FLOOR(d6) |
      +---------+-----------+
      | -9999.0 |     -9999 |
      +---------+-----------+
      

      Attachments

        Issue Links

          Activity

            People

              tntnatbry Gagan Goel (Inactive)
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.