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

LP:731124 - Loss of precision on DISTINCT in 5.1-micro

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      DISTINCT causes loss of precision - the values returned are missing the sub-second part and are grouped together by the second.

      This is alspo repeatable in mysql-5.1, but I think it should be fixed regardless so that increased precision is properly handled in all situations.

      Test case:

      CREATE TABLE t1 (f1 INTEGER);
      INSERT INTO t1 VALUES (1),(2),(3);
      SELECT DISTINCT TIME( TIMESTAMPADD( MICROSECOND , f1 , '10:10:10' ) ) FROM t1 ;

      SELECT TIME( TIMESTAMPADD( MICROSECOND , f1 , '10:10:10' ) ) FROM t1 ;

      Attachments

        Activity

          People

            serg Sergei Golubchik
            philipstoev Philip Stoev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 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.