Using mysql 4.1.18 and jforums 2.1.17 from CVS.
In WEB-INF/config/database/mysql/, mysql_40.sql and mysql.sql both contain versions of PermissionControl.deleteAllRoleValues that are the same, which is where this bug comes from.
I didn't bother figuring out which was being pulled for the permission query, I just fixed them both. No idea if this will work for everyone, but it worked on my system.
Change the query from
DELETE jforum_role_values FROM jforum_role_values rv, jforum_roles r WHERE r.role_id = rv.role_id AND r.group_id = ?
to
DELETE jforum_role_values FROM jforum_role_values, jforum_roles WHERE jforum_roles.role_id = jforum_role_values.role_id AND jforum_roles.group_id = ?
Removing the table aliasing allowed mysql 4 to find the tables on my system.
Tommy
[originally posted on jforum.net by tommy]