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

MOD returns a wrong result for DECIMAL arguments

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 5.4.3, 5.5.1, 5.6.1, 6.1.1
    • Icebox
    • PrimProc

    Description

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a DECIMAL(10,2)) ENGINE=ColumnStore;
      INSERT INTO t1 VALUES (1.3);
      SELECT a MOD 1.3 FROM t1;
      

      +-----------+
      | a MOD 1.3 |
      +-----------+
      |      0.30 |
      +-----------+
      

      If I run the same script with MyISAM (or any other engine), the result is as follows:

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a DECIMAL(10,2)) ENGINE=MyISAM;
      INSERT INTO t1 VALUES (1.3);
      SELECT a MOD 1.3 FROM t1;
      

      +-----------+
      | a MOD 1.3 |
      +-----------+
      |      0.00 |
      +-----------+
      

      Attachments

        Activity

          People

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