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

Column-level CHECK constraint on timestamp column causes ER_EXPRESSION_REFERS_TO_UNINIT_FIELD

    XMLWordPrintable

Details

    Description

      10.2 469a4b02ce

      MariaDB [test]> CREATE TABLE t1 (t TIMESTAMP CHECK(t>'2018-01-01 00:00:00'));
      ERROR 4029 (01000): Expression for field `t` is refering to uninitialized field `t`
      

      Datetime works all right.

      MariaDB [test]> CREATE TABLE t1 (t DATETIME CHECK(t>'2018-01-01 00:00:00'));
      Query OK, 0 rows affected (0.39 sec)
      

      Table-level CHECK also works all right:

      MariaDB [test]> CREATE TABLE t2 (t TIMESTAMP, CHECK(t>'2018-01-01 00:00:00'));
      Query OK, 0 rows affected (0.19 sec)
      

      Attachments

        Issue Links

          Activity

            People

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