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

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

    XMLWordPrintable

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

          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.