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

FLOOR(-9999.0) returns a bad result

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.6.1, 6.1.1
    • Fix Version/s: 6.1.1
    • Component/s: PrimProc
    • Labels:
      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

              Assignee:
              tntnatbry Gagan Goel
              Reporter:
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration