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

CREATE TABLE: field references qualified by a wrong table name succeed

    XMLWordPrintable

Details

    Description

      Reproduce

      --error ER_BAD_FIELD_ERROR
      create table t1 (x int, y int generated always as (t2.x));
      --error ER_BAD_FIELD_ERROR
      create table t1 (x int, check (t2.x > 0));
      --error ER_BAD_FIELD_ERROR
      create table t1 (x int, z int default t2.x);
      

      Result

      The above commands don't fail. The resulting table misses "t2" qualifier in expressions.

      Expected

      The above CREATE TABLE commands fail.

      Attachments

        Issue Links

          Activity

            People

              midenok Aleksey Midenkov
              midenok Aleksey Midenkov
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.