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

Incorrect date conversion for varchar column

    XMLWordPrintable

Details

    Description

      The query result should be NULL.

      CREATE TABLE t1 (c1 VARCHAR(20), PRIMARY KEY (c1(20))) ENGINE = InnoDB;
      INSERT INTO t1 VALUES ('RB');
      SELECT (MAX((CAST(-1 AS DATE)))) FROM t1 GROUP BY c1; -- actual: {0000-00-00}, expected: {NULL}
      

      Attachments

        Issue Links

          Activity

            People

              psergei Sergei Petrunia
              John Jove John Jove
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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