[MDEV-11265] Access defied when CREATE VIIEW v1 AS SELECT DEFAULT(column) FROM t1 Created: 2016-11-10  Updated: 2022-04-15  Resolved: 2016-11-10

Status: Closed
Project: MariaDB Server
Component/s: Views
Affects Version/s: 10.0, 10.1, 10.2
Fix Version/s: 10.2.1, 10.0.29, 10.1.20

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: 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.


Generated at Thu Feb 08 07:48:36 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.