Fix permission checking for `mysql.permission`.
@@ -242,6 +242,9 @@ def permission(
mysql_host, mysql_port,
)
+ has_permissions = False
+
+ if database_table in user_grants:
existing_permissions = [
'ALL' if permission == 'ALL PRIVILEGES' else permission
for permission in user_grants[database_table]['permissions']
