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

Deduce nullability of a generated column from its expression

    XMLWordPrintable

Details

    Description

      Generated columns are always created as nullable. This is not necessarily correct, the server could deduce the nullability of the generated column from its generating expression.

      Making them NOT NULL as appropriate would simplify optimization in some cases and would allow creating, for example, SPATIAL indexes over generated columns.

      Original description

      I don't have the details of error reported , but i remember server complaining about unique index

      The workaround was to materialized the GEOM column not using virtual column :

      alter table zip_all add column coord point not null
      update zip_all set coord = POINT(lat,lon);
      alter table zip_all_bis ADD SPATIAL INDEX(coord)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              stephane@skysql.com VAROQUI Stephane
              Votes:
              7 Vote for this issue
              Watchers:
              9 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.