USER and HOST should be quoted (#443)

USER and HOST should be quoted to avoid errors in drop user statement

Signed-off-by: Martin Neubert <[email protected]>
This commit is contained in:
Martin Neubert authored and GitHub committed 2021-04-27 21:16:50 +02:00
1 parent b12ee4d23b
commit 284943b699
1 file changed
+2 -2
@@ -49,7 +49,7 @@
- name: get all users that have no password or authentication_string on MySQL version >= 5.7.6
community.mysql.mysql_query:
query:
- SELECT GROUP_CONCAT(USER, '@', HOST SEPARATOR ', ') AS users
- SELECT GROUP_CONCAT(QUOTE(USER), '@', QUOTE(HOST) SEPARATOR ', ') AS users
FROM mysql.user
WHERE (length(authentication_string)=0
OR authentication_string="")
@@ -64,7 +64,7 @@
- name: get all users that have no password on MySQL version < 5.7.6
community.mysql.mysql_query:
query:
- SELECT GROUP_CONCAT(USER, '@', HOST SEPARATOR ', ') AS users
- SELECT GROUP_CONCAT(QUOTE(USER), '@', QUOTE(HOST) SEPARATOR ', ') AS users
FROM mysql.user
WHERE (length(password)=0
OR password="")