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

Aggregate functions lose microseconds for timestamps below 1

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11
    • 10.4, 10.5, 10.6
    • Temporal Types
    • None

    Description

      CREATE TABLE t (t TIMESTAMP(1));
      INSERT INTO t VALUES (FROM_UNIXTIME(0.1));
       
      SELECT t FROM t;
      SELECT MIN(t), MAX(t) FROM t;
       
      # Cleanup
      DROP TABLE t;
      

      10.4 f97f6955

      SELECT t FROM t;
      t
      1970-01-01 02:00:00.1
      SELECT MIN(t), MAX(t) FROM t;
      MIN(t)	MAX(t)
      0000-00-00 00:00:00.0	0000-00-00 00:00:00.0
      

      Started happening after this commit in 10.4.1:

      commit 34eb98387f8f46a80fb053081dbe20d415f23b39
      Author: Alexander Barkov <bar@mariadb.com>
      Date:   Sat Dec 8 19:39:23 2018 +0400
       
          MDEV-13995 MAX(timestamp) returns a wrong result near DST change
      

      Attachments

        Activity

          People

            bar Alexander Barkov
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.