mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
automerge
This commit is contained in:
@@ -221,3 +221,24 @@ drop view testdb_1.v1, v2, testdb_1.v3, v4;
|
||||
drop database testdb_1;
|
||||
drop user testdb_1@localhost;
|
||||
drop user testdb_2@localhost;
|
||||
create database testdb_1;
|
||||
create table testdb_1.t1 (a int);
|
||||
create view testdb_1.v1 as select * from testdb_1.t1;
|
||||
grant show view on testdb_1.* to mysqltest_1@localhost;
|
||||
grant select on testdb_1.v1 to mysqltest_1@localhost;
|
||||
select table_schema, table_name, view_definition from information_schema.views
|
||||
where table_name='v1';
|
||||
table_schema table_name view_definition
|
||||
testdb_1 v1 select `testdb_1`.`t1`.`a` AS `a` from `testdb_1`.`t1`
|
||||
show create view testdb_1.v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `testdb_1`.`v1` AS select `testdb_1`.`t1`.`a` AS `a` from `testdb_1`.`t1` latin1 latin1_swedish_ci
|
||||
revoke select on testdb_1.v1 from mysqltest_1@localhost;
|
||||
select table_schema, table_name, view_definition from information_schema.views
|
||||
where table_name='v1';
|
||||
table_schema table_name view_definition
|
||||
testdb_1 v1
|
||||
show create view testdb_1.v1;
|
||||
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'v1'
|
||||
drop user mysqltest_1@localhost;
|
||||
drop database testdb_1;
|
||||
|
||||
@@ -82,6 +82,7 @@ drop function func2;
|
||||
drop database `inf%`;
|
||||
drop procedure mbase.p1;
|
||||
drop database mbase;
|
||||
disconnect user1;
|
||||
|
||||
#
|
||||
# Bug#18282 INFORMATION_SCHEMA.TABLES provides inconsistent info about invalid views
|
||||
@@ -210,3 +211,32 @@ drop view testdb_1.v1, v2, testdb_1.v3, v4;
|
||||
drop database testdb_1;
|
||||
drop user testdb_1@localhost;
|
||||
drop user testdb_2@localhost;
|
||||
|
||||
#
|
||||
# Bug#22763 Disrepancy between SHOW CREATE VIEW and I_S.VIEWS
|
||||
#
|
||||
create database testdb_1;
|
||||
create table testdb_1.t1 (a int);
|
||||
create view testdb_1.v1 as select * from testdb_1.t1;
|
||||
|
||||
grant show view on testdb_1.* to mysqltest_1@localhost;
|
||||
grant select on testdb_1.v1 to mysqltest_1@localhost;
|
||||
|
||||
connect (user1,localhost,mysqltest_1,,test);
|
||||
connection user1;
|
||||
select table_schema, table_name, view_definition from information_schema.views
|
||||
where table_name='v1';
|
||||
show create view testdb_1.v1;
|
||||
|
||||
connection default;
|
||||
revoke select on testdb_1.v1 from mysqltest_1@localhost;
|
||||
connection user1;
|
||||
select table_schema, table_name, view_definition from information_schema.views
|
||||
where table_name='v1';
|
||||
--error ER_TABLEACCESS_DENIED_ERROR
|
||||
show create view testdb_1.v1;
|
||||
|
||||
connection default;
|
||||
drop user mysqltest_1@localhost;
|
||||
drop database testdb_1;
|
||||
disconnect user1;
|
||||
|
||||
Reference in New Issue
Block a user