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

      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

            Assignee:
            bar Alexander Barkov
            Reporter:
            bar Alexander Barkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: