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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Trivial
    • Resolution: Fixed
    • 10.0.0, 5.5.28a, 5.3.11
    • 10.0.2, 5.5.29, 5.3.12
    • None
    • 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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.