distal-attribute
distal-attribute
distal-attribute
distal-attribute

User Manager not working on MySQL 4.x

User, date Message
Written by Plasm
4 years ago
Category: General
73 posts since Fri, 10 Sep 10
Hi,
the SQL-queries
GRANT SELECT ON TABLE `database`.`table` TO 'user'@'host';
REVOKE SELECT ON TABLE `database`.`table` FROM 'user'@'host';
which are used by the user manager, results in a syntax errors on MySQL 4.x databases. The correct syntax for 4.x is:
GRANT SELECT ON `database`.`table` TO 'user'@'host';
REVOKE SELECT ON `databse`.`table` FROM 'user'@'host';

MySQL 5.x Server understand both, with and without "TABLE".
The MySQL 5.x doc says:
GRANT
priv_type [(column_list)]
[, priv_type [(column_list)]] ...
ON [object_type] priv_level ...
where [object_type] is optional and can be one of TABLE|FUNCTION|PROCEDURE

I think, the object_type is only needed, if there is a table and a function/procedure of same name (?)

Could you please support MySQL 4.x in the user manager ?
Thanks
Plasm
Written by ansgar
4 years ago
5051 posts since Fri, 07 Apr 06
Sure. Solution will be something like that:

if ServerVersion > 40100 then ... + objectType + ...

Written by ansgar
4 years ago
5051 posts since Fri, 07 Apr 06
Fixed in r3688
Written by Plasm
4 years ago
73 posts since Fri, 10 Sep 10
Thx a lot
 

Please login to leave a reply, or register at first.