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

Update the Foreign key limitations section with indexed vcols

    XMLWordPrintable

Details

    Description

      Page: https://mariadb.com/kb/en/foreign-keys/

      Indexed generated columns are not supported as innodb foreign key index, both VIRTUAL, or STORED:

      create table parent(id int) engine = innodb;
      create table child(id int, val int as (id), key(val), foreign key (val) references parent(id)) engine = innodb;
      

      This should work so for both child and parent-side vcols.

      Attachments

        Activity

          People

            greenman Ian Gilfillan
            nikitamalyavin Nikita Malyavin
            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.