| 1 |
--source include/have_sequence.inc |
| 2 |
--source include/have_innodb.inc |
| 3 |
--source include/not_embedded.inc |
| 4 |
|
| 5 |
--echo # |
| 6 |
--echo # GRANT |
| 7 |
--echo # |
| 8 |
|
| 9 |
create database s_db; |
| 10 |
create sequence s_db.s1; |
| 11 |
grant select on s_db.s1 to normal_1@'%' identified by 'pass'; |
| 12 |
|
| 13 |
--disable_ps2_protocol |
| 14 |
connect(m_normal_1, localhost, normal_1, pass, s_db); |
| 15 |
select * from s1; |
| 16 |
--error ER_TABLEACCESS_DENIED_ERROR |
| 17 |
select nextval(s1); |
| 18 |
show create sequence s1; |
| 19 |
--error ER_TABLEACCESS_DENIED_ERROR |
| 20 |
alter sequence s1 restart 50; |
| 21 |
connection default; |
| 22 |
grant insert on s_db.s1 to normal_1@'%'; |
| 23 |
connection m_normal_1; |
| 24 |
select nextval(s1); |
| 25 |
--error ER_TABLEACCESS_DENIED_ERROR |
| 26 |
alter sequence s1 restart 50; |
| 27 |
connection default; |
| 28 |
grant alter on s_db.s1 to normal_1@'%'; |
| 29 |
connection m_normal_1; |
| 30 |
alter sequence s1 restart 50; |
| 31 |
select nextval(s1); |
| 32 |
--error ER_TABLEACCESS_DENIED_ERROR |
| 33 |
drop sequence s1; |
| 34 |
--enable_ps2_protocol |
| 35 |
|
| 36 |
connection default; |
| 37 |
disconnect m_normal_1; |
| 38 |
drop database s_db; |
| 39 |
drop user normal_1@'%'; |