mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-08 11:40:33 -07:00
fix malformed SQL query
This commit is contained in:
parent
eb840f6ae4
commit
6123d77b99
1 changed files with 1 additions and 2 deletions
|
@ -792,12 +792,11 @@ def get_resource_limits(module, cursor, user, host):
|
||||||
query = ('SELECT max_questions AS MAX_QUERIES_PER_HOUR, '
|
query = ('SELECT max_questions AS MAX_QUERIES_PER_HOUR, '
|
||||||
'max_updates AS MAX_UPDATES_PER_HOUR, '
|
'max_updates AS MAX_UPDATES_PER_HOUR, '
|
||||||
'max_connections AS MAX_CONNECTIONS_PER_HOUR, '
|
'max_connections AS MAX_CONNECTIONS_PER_HOUR, '
|
||||||
'max_user_connections AS MAX_USER_CONNECTIONS '
|
'max_user_connections AS MAX_USER_CONNECTIONS, '
|
||||||
'max_statement_time AS MAX_STATEMENT_TIME '
|
'max_statement_time AS MAX_STATEMENT_TIME '
|
||||||
'FROM mysql.user WHERE User = %s AND Host = %s')
|
'FROM mysql.user WHERE User = %s AND Host = %s')
|
||||||
else:
|
else:
|
||||||
msg = "Error detecting if the server is MariaDB or MySQL is %s" % srv_type
|
msg = "Error detecting if the server is MariaDB or MySQL is %s" % srv_type
|
||||||
|
|
||||||
module.fail_json(msg=msg)
|
module.fail_json(msg=msg)
|
||||||
|
|
||||||
cursor.execute(query, (user, host))
|
cursor.execute(query, (user, host))
|
||||||
|
|
Loading…
Add table
Reference in a new issue