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

Wrong result for MAX(COALESCE(time_column))

    XMLWordPrintable

    Details

    • Sprint:
      10.1.8-3

      Description

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a TIME);
      INSERT INTO t1 VALUES ('10:20:30'),('10:20:30');
      SELECT MAX(a), MAX(COALESCE(a)) FROM t1;

      returns

      +----------+------------------+
      | MAX(a)   | MAX(COALESCE(a)) |
      +----------+------------------+
      | 10:20:30 | 7594:20:30       |
      +----------+------------------+

      The expected result is to return 10:20:30 for both columns.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bar Alexander Barkov
              Reporter:
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: