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

User Manager not working on MySQL 4.x

Plasm posted 4 years ago in General
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
ansgar posted 4 years ago
Sure. Solution will be something like that:

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

ansgar posted 4 years ago
Fixed in r3688
Plasm posted 4 years ago
Thx a lot

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