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

Alias in a view on a table with virtual column avoid index creation

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.5.10
    • N/A
    • N/A
    • None

    Description

      This sequence has a failure on CREATE INDEX (Unknown column '.`r`.`DELETED`' in 'GENERATED ALWAYS')

      CREATE TABLE `RULE` (
         `DELETED` BIT(1),
         `UNIQ_CODE` VARCHAR(255) GENERATED ALWAYS AS (CASE DELETED WHEN 0 THEN 1 end) PERSISTENT
      );
       
      CREATE OR REPLACE VIEW `V_RULE` AS SELECT DELETED FROM RULE r;
       
      CREATE INDEX `RULE_IDX01` ON `RULE` (DELETED);
      

      If I remove the alias ('r') in the view, everything works well.
      Both scenarios works well in 10.5.9

      I can't find in MariaDB 10.5.10 release notes what could cause this issue.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              antoine.lange Antoine Lange
              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.