mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Bug #57916: Fix the naming of the proxy_priv table
1. Fixed the name of the table to proxies_priv 2. Fixed the column names to be of the form Capitalized_lowecarse instead of Capitalized_Capitalized 3. Added Timestamp and Grantor columns 4. Added tests to plugin_auth to check the table structure 5. Updated the existing tests
This commit is contained in:
@ -11,6 +11,26 @@ test_plugin_server plug_dest
|
||||
## test plugin auth
|
||||
ERROR 28000: Access denied for user 'plug'@'localhost' (using password: YES)
|
||||
GRANT PROXY ON plug_dest TO plug;
|
||||
test proxies_priv columns
|
||||
SELECT * FROM mysql.proxies_priv;
|
||||
Host User Proxied_host Proxied_user With_grant Grantor Timestamp
|
||||
localhost root 1 xx
|
||||
unknown root 1 xx
|
||||
% plug % plug_dest 0 root@localhost xx
|
||||
test mysql.proxies_priv;
|
||||
SHOW CREATE TABLE mysql.proxies_priv;
|
||||
Table Create Table
|
||||
proxies_priv CREATE TABLE `proxies_priv` (
|
||||
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`Proxied_host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`Proxied_user` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`With_grant` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`),
|
||||
KEY `Grantor` (`Grantor`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User proxy privileges'
|
||||
select USER(),CURRENT_USER();
|
||||
USER() CURRENT_USER()
|
||||
plug@localhost plug_dest@%
|
||||
@ -146,8 +166,8 @@ Grants for test_drop@localhost
|
||||
GRANT USAGE ON *.* TO 'test_drop'@'localhost'
|
||||
GRANT PROXY ON 'future_user'@'%' TO 'test_drop'@'localhost'
|
||||
DROP USER test_drop@localhost;
|
||||
SELECT * FROM mysql.proxy_priv WHERE Host = 'test_drop' AND User = 'localhost';
|
||||
Host User Proxied_Host Proxied_User With_Grant
|
||||
SELECT * FROM mysql.proxies_priv WHERE Host = 'test_drop' AND User = 'localhost';
|
||||
Host User Proxied_host Proxied_user With_grant Grantor Timestamp
|
||||
DROP USER proxy_admin;
|
||||
DROP USER grant_plug,grant_plug_dest,grant_plug_dest2;
|
||||
## END GRANT PROXY tests
|
||||
|
Reference in New Issue
Block a user