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

view is created, but can't be used

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.1, 10.2, 10.3
    • 10.4
    • None
    • None

    Description

      CREATE VIEW vv AS SELECT 1 AS i1 FROM dual GROUP BY i1;
      select * from vv;
      

      MariaDB [test]> SELECT 1 AS i1 FROM dual GROUP BY i1;
      +----+
      | i1 |
      +----+
      |  1 |
      +----+
      1 row in set (0.00 sec)
       
      MariaDB [test]> CREATE VIEW vv AS SELECT 1 AS i1 FROM dual GROUP BY i1;
      Query OK, 0 rows affected (0.06 sec)
       
      MariaDB [test]> show tables;
      +----------------+
      | Tables_in_test |
      +----------------+
      | vv             |
      +----------------+
      1 row in set (0.00 sec)
       
      MariaDB [test]> select * from vv;
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'group by ''' at line 1
      
      

      Also view is created incorrect, from vv.frm:

      view_body_utf8=select 1 AS `i1` group by \'\'
      mariadb-version=100131
      

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            alice Alice Sherepa
            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.