User Manager not working on MySQL 4.x

Plasm posted 7 years ago in General
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:
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 ?
ansgar posted 7 years ago
Sure. Solution will be something like that:
if ServerVersion > 40100 then ... + objectType + ...
ansgar posted 7 years ago
Fixed in r3688
Plasm posted 7 years ago
Thx a lot

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