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

Access defied when CREATE VIIEW v1 AS SELECT DEFAULT(column) FROM t1

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0(EOL), 10.1(EOL), 10.2(EOL)
    • 10.2.1, 10.0.29, 10.1.20
    • Views
    • None

    Description

      This script:

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a INT DEFAULT 10);
      DROP VIEW IF EXISTS v1,v2;
      CREATE VIEW v1 AS SELECT a AS a FROM t1;
      CREATE VIEW v2 AS SELECT DEFAULT(a) AS a FROM t1;
      

      normally creates VIEW v1, but returns an error for VIEW v2:

      ERROR 1143 (42000): create view command denied to user 'root'@'localhost' for column 'a' in table 'v2'
      

      The same error happes with VALUES(a) instead of DEFAULT(a):

      CREATE VIEW v2 AS SELECT VALUES(a) AS a FROM t1;
      

      The last query is rather useless though.

      Attachments

        Activity

          bar Alexander Barkov created issue -
          bar Alexander Barkov made changes -
          Field Original Value New Value
          Description This script:
          {code:sql}
          DROP TABLE IF EXISTS t1;
          CREATE TABLE t1 (a INT DEFAULT 10);
          DROP VIEW IF EXISTS v1,v2;
          CREATE VIEW v1 AS SELECT a AS a FROM t1;
          CREATE VIEW v2 AS SELECT DEFAULT(a) AS a FROM t1;
          {code}
          normally creates VIEW v1, but returns an error for VIEW v2:
          {noformat}
          ERROR 1143 (42000): create view command denied to user 'root'@'localhost' for column 'a' in table 'v2'
          {noformat}

          The same error happes with VALUES(a) instead of DEFAULT(a):
          {code:sql}
          CREATE VIEW v2 AS SELECT VALUES(a) AS a FROM t1;
          {code}
          The last query is rather useless though.

          bar Alexander Barkov made changes -
          Affects Version/s 10.0 [ 16000 ]
          bar Alexander Barkov made changes -
          issue.field.resolutiondate 2016-11-10 14:19:55.0 2016-11-10 14:19:55.611
          bar Alexander Barkov made changes -
          Fix Version/s 10.0.29 [ 22312 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          bar Alexander Barkov made changes -
          Assignee Alexander Barkov [ bar ]
          bar Alexander Barkov made changes -
          Fix Version/s 10.1.20 [ 22112 ]
          Fix Version/s 10.2.3 [ 22115 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.2.1 [ 22012 ]
          Fix Version/s 10.2.3 [ 22115 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 78263 ] MariaDB v4 [ 151208 ]

          People

            bar Alexander Barkov
            bar Alexander Barkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.