mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 21:12:26 +01:00
8c06c8c010
'SHOW GRANTS' syntax is added 'SHOW GRANTS FOR CURRENT_USER' syntax is added 'SHOW GRANTS FOR CURRENT_USER()' syntax is added CURRENT_USER without parens in expressions(SELECT CURRENT_USER;) mysql-test/r/grant2.result: WL1368: SHOW GRANTS FOR CURRENT USER mysql-test/r/grant_cache.result: WL1368: SHOW GRANTS FOR CURRENT USER mysql-test/t/grant2.test: WL1368: SHOW GRANTS FOR CURRENT USER mysql-test/t/grant_cache.test: WL1368: SHOW GRANTS FOR CURRENT USER sql/lex.h: WL1368: SHOW GRANTS FOR CURRENT USER sql/sql_yacc.yy: WL1368: SHOW GRANTS FOR CURRENT USER
31 lines
912 B
Text
31 lines
912 B
Text
#
|
|
# GRANT tests that require several connections
|
|
# (usually it's GRANT, reconnect as another user, try something)
|
|
#
|
|
|
|
|
|
#
|
|
# wild_compare fun
|
|
#
|
|
|
|
delete from mysql.user where user like 'mysqltest\_%';
|
|
delete from mysql.db where user like 'mysqltest\_%';
|
|
flush privileges;
|
|
grant all privileges on `my\_%`.* to mysqltest_1@localhost with grant option;
|
|
connect (user1,localhost,mysqltest_1,,);
|
|
connection user1;
|
|
select current_user();
|
|
select current_user;
|
|
grant all privileges on `my\_1`.* to mysqltest_2@localhost with grant option;
|
|
--error 1044
|
|
grant all privileges on `my_%`.* to mysqltest_3@localhost with grant option;
|
|
disconnect user1;
|
|
connection default;
|
|
show grants for mysqltest_1@localhost;
|
|
show grants for mysqltest_2@localhost;
|
|
--error 1141
|
|
show grants for mysqltest_3@localhost;
|
|
delete from mysql.user where user like 'mysqltest\_%';
|
|
delete from mysql.db where user like 'mysqltest\_%';
|
|
flush privileges;
|
|
|