diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2017-08-07 13:42:35 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2017-08-10 10:17:08 +0200 |
commit | cb2a57c2036ba09ba28d413aa5f171cb25cb36f5 (patch) | |
tree | 54300e579ee967a55f6605a04450d500c16a72fd /mysql-test/t/view.test | |
parent | bdab49d389821724659847a944c6f403deddd430 (diff) | |
download | mariadb-git-cb2a57c2036ba09ba28d413aa5f171cb25cb36f5.tar.gz |
MDEV-13439: Database permissions are not enough to run a subquery with GROUP BY within a view
The bug is result adding ability to have derived tables inside views.
Fixed checks should be a switch between view/derived or select derived and information schema.
Diffstat (limited to 'mysql-test/t/view.test')
-rw-r--r-- | mysql-test/t/view.test | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 4430b65e5f4..47dc62c1b96 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -6269,5 +6269,30 @@ SHOW CREATE VIEW v; DROP VIEW v; --echo # +--echo # MDEV-13439: Database permissions are not enough to run a subquery +--echo # with GROUP BY within a view +--echo # + +create database test_db; +use test_db; +create table t (i int); + +create user foo@localhost; +grant all on test_db.* to foo@localhost; + +--connect (con1,localhost,foo,,) + +use test_db; +create view v as select * from (select i from t group by i) sq; +select * from v; + +# Cleanup +--disconnect con1 +--connection default +use test; +drop database test_db; +drop user foo@localhost; + +--echo # --echo # End of 10.2 tests --echo # |