- fix user_exists statement with host_all to use only username parameter
This commit is contained in:
parent
acdde856c5
commit
2aeb188d81
1 changed files with 1 additions and 1 deletions
|
@ -226,7 +226,7 @@ def connect(module, login_user=None, login_password=None, config_file=''):
|
|||
|
||||
def user_exists(cursor, user, host, host_all):
|
||||
if host_all:
|
||||
cursor.execute("SELECT count(*) FROM user WHERE user = %s AND host = %s", (user,host))
|
||||
cursor.execute("SELECT count(*) FROM user WHERE user = %s", user)
|
||||
else:
|
||||
cursor.execute("SELECT count(*) FROM user WHERE user = %s AND host = %s", (user,host))
|
||||
|
||||
|
|
Loading…
Reference in a new issue