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

DATE(zerofill_column) and DATE(COALESCE(zerofill_column)) return different results

    XMLWordPrintable

    Details

    • Sprint:
      10.1.8-3

      Description

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a INT(6) ZEROFILL);
      INSERT INTO t1 VALUES (1);
      SELECT DATE(a), DATE(COALESCE(a)) FROM t1;

      returns

      +------------+-------------------+
      | DATE(a)    | DATE(COALESCE(a)) |
      +------------+-------------------+
      | 2000-00-01 | NULL              |
      +------------+-------------------+
      1 row in set, 1 warning (0.00 sec)

        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:

                  Git Integration