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

Garbage returned with SELECT CASE..DEFAULT(timestamp_field_with_now_as_default)

    XMLWordPrintable

Details

    Description

      CREATE OR REPLACE TABLE t1 (a TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP);
      INSERT INTO t1 VALUES ('2019-02-23 11:31:04'),('2023-02-09 00:00:00');
      SELECT CASE WHEN a THEN DEFAULT(a) END FROM t1;
      

      +---------------------------------+
      | CASE WHEN a THEN DEFAULT(a) END |
      +---------------------------------+
      | 2058-01-24 15:14:45.999         |
      | 2058-01-24 15:14:45.999         |
      +---------------------------------+
      

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.