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

Inconsistent Timestamp Precision with DATE_ADD Function Between MySQL and MariaDB

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Not a Bug
    • 10.9(EOL)
    • N/A
    • Temporal Types
    • None

    Description

      There is a compatibility issue between MySQL 5.7 and MariaDB when using the DATE_ADD function.

      Create the table and insert the values:

      CREATE TABLE t0 (c_0 TEXT, c_1 INT);
      INSERT INTO t0 VALUES ('6389-08-27 07:05:39.000000', 10894);
      

      SELECT (DATE_ADD(t0.c_0, INTERVAL t0.c_1 DAY)) FROM t0;
      

      MySQL 5.7 returns:
      6419-06-25 07:05:39

      MariaDB returns:
      6419-06-25 07:05:39.000000

      Attachments

        Activity

          This doesn't look like a MariaDB bug. MySQL forgets the temporal precision information, feel free to report this to MySQL

          serg Sergei Golubchik added a comment - This doesn't look like a MariaDB bug. MySQL forgets the temporal precision information, feel free to report this to MySQL

          People

            serg Sergei Golubchik
            dwenking chaos
            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.