diff options
author | Igor Babaev <igor@askmonty.org> | 2020-12-04 08:50:20 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2020-12-04 08:53:40 -0800 |
commit | 50d7eddc3d21b9bad66db6961900e3222a6fa356 (patch) | |
tree | 07448e51ee70c4987d42db7f7fc840c609ba94c5 /mysql-test/t/view.test | |
parent | 1eb59c307de163b507efade1fc372d8ff2bb94b7 (diff) | |
download | mariadb-git-50d7eddc3d21b9bad66db6961900e3222a6fa356.tar.gz |
MDEV-24314 Unexpected error message when selecting from view that uses
mergeable derived table
Do not check privileges for derived tables/CTEs and their fields.
Approved by Oleksandr Byelkin <sanja@mariadb.com>
Diffstat (limited to 'mysql-test/t/view.test')
-rw-r--r-- | mysql-test/t/view.test | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index cd5cc6efade..2486887600b 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -6492,5 +6492,35 @@ DROP VIEW v1; DROP TABLE t1; --echo # +--echo # MDEV-24314: create view with derived table without default database +--echo # + +drop database test; + +create database db1; +create table db1.t1 (a int); +insert into db1.t1 values (3),(7),(1); + +create view db1.v1 as select * from (select * from db1.t1) t; +show create view db1.v1; +select * from db1.v1; +drop view db1.v1; + +prepare stmt from " +create view db1.v1 as select * from (select * from db1.t1) t; +"; +execute stmt; +deallocate prepare stmt; +show create view db1.v1; +select * from db1.v1; +drop view db1.v1; + +drop table db1.t1; +drop database db1; + +create database test; +use test; + +--echo # --echo # End of 10.2 tests --echo # |