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

FROM_DAYS(<timestamp column>) returns different result in MariaDB comparing to MySQL: NULL vs 0000-00-00

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 10.0.0, 5.5.28a, 5.3.11
    • Fix Version/s: 10.0.2, 5.5.29, 5.3.12
    • Component/s: None
    • Labels:
      None

      Description

      It's rather a cosmetic difference, but I want to fix our failures on MySQL engines suite (again), and this is one of them. So, if it's intended behavior, please reassign the bug back to me so I update the result file for engines/funcs/r/date_function.

      MariaDB 5.3, 5.5, 10.0:

      CREATE TABLE t1(c1 TIMESTAMP NOT NULL) ENGINE=MyISAM;
      INSERT INTO t1 VALUES('2008-02-29');
      SELECT FROM_DAYS(c1) FROM t1;
      # FROM_DAYS(c1)
      # NULL
      

      MySQL 5.1, 5.5, 5.6, MariaDB 5.2:

      CREATE TABLE t1(c1 TIMESTAMP NOT NULL) ENGINE=MyISAM;
      INSERT INTO t1 VALUES('2008-02-29');
      SELECT FROM_DAYS(c1) FROM t1;
      # FROM_DAYS(c1)
      # 0000-00-00
      

      No warnings on either version.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              There are no comments yet on this issue.

                People

                • Assignee:
                  serg Sergei Golubchik
                  Reporter:
                  elenst Elena Stepanova
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 30 minutes
                    30m