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

View defined with table value constructor does not preserve given column names

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.3
    • 10.4
    • Optimizer
    • None

    Description

      The following demonstrates the problem:

      MariaDB [test]> create view v1(a) as  values (3), (7), (1);                                                                                                                                                
                                                                                                                              
      MariaDB [test]> show create view v1;                                                                                    
      +------+--------------------------------------------------------------------------------------------+----------------------+----------------------+
      | View | Create View                                                                                | character_set_client | collation_connection |
      +------+--------------------------------------------------------------------------------------------+----------------------+----------------------+
      | v1   | CREATE ALGORITHM=UNDEFINED DEFINER=`` SQL SECURITY DEFINER VIEW `v1` AS values (3),(7),(1) | utf8                 | utf8_general_ci      |
      +------+--------------------------------------------------------------------------------------------+----------------------+----------------------+
       
      MariaDB [test]> select * from v1;
      +---+
      | 3 |
      +---+
      | 3 |
      | 7 |
      | 1 |
      +---+
      

      Attachments

        Activity

          People

            igor Igor Babaev
            igor Igor Babaev
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.