mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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.
This commit is contained in:
@ -6268,6 +6268,31 @@ DROP TABLE IF EXISTS t;
|
||||
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 #
|
||||
|
Reference in New Issue
Block a user