mysql_query: correctly reflect changed status in replace statements (#193) (#197)

* mysql_query: correctly reflect changed status in replace statements.

* Fix the wrong indent.

(cherry picked from commit 9055bb4c8c)

Co-authored-by: Tong He <68936428+unnecessary-username@users.noreply.github.com>
This commit is contained in:
Andrew Klychkov 2021-08-10 16:38:37 +03:00 committed by GitHub
parent 9c17158802
commit 64b06aa543
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 37 additions and 1 deletions

View file

@ -112,7 +112,7 @@ from ansible_collections.community.mysql.plugins.module_utils.mysql import (
)
from ansible.module_utils._text import to_native
DML_QUERY_KEYWORDS = ('INSERT', 'UPDATE', 'DELETE')
DML_QUERY_KEYWORDS = ('INSERT', 'UPDATE', 'DELETE', 'REPLACE')
# TRUNCATE is not DDL query but it also returns 0 rows affected:
DDL_QUERY_KEYWORDS = ('CREATE', 'DROP', 'ALTER', 'RENAME', 'TRUNCATE')