Fix the collection to work with mysqlclient connector (#301)

This commit is contained in:
Andrew Klychkov 2022-03-14 16:41:38 +03:00 committed by GitHub
parent a516c1a6ad
commit 95c649cce2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 9 deletions

View file

@ -482,7 +482,7 @@ class MariaDBQueryBuilder():
Returns:
tuple: (query_string, tuple_containing_parameters).
"""
return "SELECT count(*) FROM mysql.user WHERE user = %s AND is_role = 'Y'", (self.name)
return "SELECT count(*) FROM mysql.user WHERE user = %s AND is_role = 'Y'", (self.name,)
def role_grant(self, user):
"""Return a query to grant a role to a user or role.