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

LP:736358 - Unexpected increased timestamp resolution with UNION

    Details

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

      Description

      When executed in a UNION context, datetime operations return a millisecond precision, even though no fractional seconds were used anywhere in the expression.

      Test case:

      CREATE TABLE t1 (f1 timestamp(6));
      INSERT INTO t1 VALUES ('2002-07-15 21:00:00');

      SELECT TIME(f1) FROM t1;

      returns:

      21:00:00

      ( SELECT TIME(f1) FROM t1) UNION ALL ( SELECT TIME(f1) FROM t1);

      returns
      21:00:00.000000
      21:00:00.000000

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            philipstoev Philip Stoev added a comment -

            Re: Unexpected increased timestamp resolution with UNION
            Same applies for DISTINCT

            Show
            philipstoev Philip Stoev added a comment - Re: Unexpected increased timestamp resolution with UNION Same applies for DISTINCT
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 736358

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

              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: