diff options
author | unknown <pem@mysql.com> | 2005-10-28 12:11:32 +0200 |
---|---|---|
committer | unknown <pem@mysql.com> | 2005-10-28 12:11:32 +0200 |
commit | 25d1e01409dd90cc05de43e1c29557f3a9835de1 (patch) | |
tree | f54cbb37f10cdbca7a35db8cfb570ff565740d62 /mysql-test/r/view_grant.result | |
parent | c58a2bf7c9262e02c54d80e9bf8f1efc67bedd15 (diff) | |
download | mariadb-git-25d1e01409dd90cc05de43e1c29557f3a9835de1.tar.gz |
Fixed BUG#14256: definer in view definition is not fully qualified
Changed the parser test for wildcards in hostname to checking for empty
strings instead (analogous with the test in default_view_definer()),
since wildcards do appear in the definer's host-part sometimes.
mysql-test/r/view.result:
Updated result.
mysql-test/r/view_grant.result:
Added test for BUG#14256.
mysql-test/t/view.test:
Changed test for explicit definer; wildcards in host are ok, empty host-part is not.
mysql-test/t/view_grant.test:
Added test for BUG#14256.
sql/sql_yacc.yy:
Changed test for wildcards in hostpart of explicit view definer to test for empty
host part instead. (Analogous with sql_parse.cc:default_view_definer().)
Diffstat (limited to 'mysql-test/r/view_grant.result')
-rw-r--r-- | mysql-test/r/view_grant.result | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result index bac6e691069..63e3bc34e71 100644 --- a/mysql-test/r/view_grant.result +++ b/mysql-test/r/view_grant.result @@ -307,3 +307,30 @@ use mysqltest; create view v1 as select * from t1; revoke all privileges on mysqltest.* from mysqltest_1@localhost; drop database mysqltest; +drop view if exists v1; +create table t1 as select * from mysql.user where user=''; +delete from mysql.user where user=''; +flush privileges; +grant all on test.* to 'test14256'@'%'; +use test; +create view v1 as select 42; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`test14256`@`%` SQL SECURITY DEFINER VIEW `v1` AS select 42 AS `42` +select definer into @v1def1 from information_schema.views +where table_schema = 'test' and table_name='v1'; +drop view v1; +create definer=`test14256`@`%` view v1 as select 42; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`test14256`@`%` SQL SECURITY DEFINER VIEW `v1` AS select 42 AS `42` +select definer into @v1def2 from information_schema.views +where table_schema = 'test' and table_name='v1'; +drop view v1; +select @v1def1, @v1def2, @v1def1=@v1def2; +@v1def1 @v1def2 @v1def1=@v1def2 +test14256@% test14256@% 1 +drop user test14256; +insert into mysql.user select * from t1; +flush privileges; +drop table t1; |