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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      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 ;

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 731124

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 731124

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                philipstoev Philip Stoev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: