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

Creation of view with UNION and SELECT ... FOR UPDATE in definition is failed with error

    XMLWordPrintable

Details

    Description

      Test:

      CREATE TABLE t1 (i INT);
      create view v1 as SELECT 1 FROM t1
      UNION
      SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1
        FOR UPDATE;
      select * from v1;
      drop view v1;
      

      Expected result:

      1
      1
      

      Actual result:

      query 'select * from v1' failed: ER_PARSE_ERROR (1064): 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 'order by 1' at line 1
      

      Attachments

        Issue Links

          Activity

            People

              nikitamalyavin Nikita Malyavin
              lstartseva Lena Startseva
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.