- fix user_exists statement with host_all to use only username parameter

reviewable/pr18780/r1
Lee Hardy 9 years ago
parent acdde856c5
commit 2aeb188d81

@ -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…
Cancel
Save