Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --disable_warnings
- create database mysqltest;
- --enable_warnings
- create table mysqltest.t1 (a int, b int);
- create view mysqltest.v1 (c,d) as with t as
- select (a from mysqltest.t1 where a>=3) select a,b from t,t1 where mysqltest.t1.a = t.a;
- grant select (c) on mysqltest.v1 to mysqltest_1@localhost;
- connection user1;
- select c from mysqltest.v1;
- # there are no privileges on column 'd'
- --error ER_COLUMNACCESS_DENIED_ERROR
- select d from mysqltest.v1;
- connection root;
- revoke all privileges on mysqltest.v1 from mysqltest_1@localhost;
- drop user mysqltest_1@localhost;
- drop database mysqltest;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement