Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql_query: correctly reflect changed status in replace statements #193

Merged
merged 2 commits into from
Jul 28, 2021

Conversation

unnecessary-username
Copy link
Contributor

SUMMARY

There is a replace statement in MySQL and mariadb. Currently running replace statements works well except that the changed status is always false.
So I add REPLACE as a DML_QUERY_KEYWORDS and I supplement test cases for this.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

mysql_query

ADDITIONAL INFORMATION

@codecov
Copy link

codecov bot commented Jul 28, 2021

Codecov Report

Merging #193 (6d55c36) into main (0fabb2b) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #193   +/-   ##
=======================================
  Coverage   76.92%   76.92%           
=======================================
  Files          20       20           
  Lines        1794     1794           
  Branches      439      439           
=======================================
  Hits         1380     1380           
  Misses        268      268           
  Partials      146      146           
Impacted Files Coverage Δ
plugins/modules/mysql_query.py 89.02% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0fabb2b...6d55c36. Read the comment docs.

@Andersson007
Copy link
Collaborator

@unnecessary-username hi, thanks for the contribution!
Could you please fix sanity issues:

ERROR: tests/integration/targets/test_mysql_query/tasks/mysql_query_initial.yml:312:18: error: syntax error: mapping values are not allowed here (syntax)
ERROR: tests/integration/targets/test_mysql_query/tasks/mysql_query_initial.yml:312:18: unparsable-with-libyaml: None - mapping values are not allowed in this context

you can click on Details in the test box to see the details:)

Copy link
Collaborator

@Andersson007 Andersson007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Andersson007
Copy link
Collaborator

@unnecessary-username thanks for the contribution! We have a lot to do, so would be nice if you continue your contribution here:)

@Andersson007 Andersson007 merged commit 9055bb4 into ansible-collections:main Jul 28, 2021
@Andersson007
Copy link
Collaborator

See our issue tracker and PRs. We'd be grateful for any ideas / opinions / fixes / etc.

@unnecessary-username
Copy link
Contributor Author

Thanks @Andersson007 :) I am not an expert in MySQL but I will spend some time to see if anything else I could contribute to.

@Andersson007
Copy link
Collaborator

Thanks @Andersson007 :) I am not an expert in MySQL but I will spend some time to see if anything else I could contribute to.

@unnecessary-username frankly speaking, I'm not an expert too:) Ok, thank you!

Andersson007 pushed a commit to Andersson007/community.mysql that referenced this pull request Aug 10, 2021
…nsible-collections#193)

* mysql_query: correctly reflect changed status in replace statements.

* Fix the wrong indent.

(cherry picked from commit 9055bb4)
Andersson007 added a commit that referenced this pull request Aug 10, 2021
…193) (#195)

* mysql_query: correctly reflect changed status in replace statements.

* Fix the wrong indent.

(cherry picked from commit 9055bb4)

Co-authored-by: Tong He <[email protected]>
Andersson007 pushed a commit to Andersson007/community.mysql that referenced this pull request Aug 10, 2021
…nsible-collections#193)

* mysql_query: correctly reflect changed status in replace statements.

* Fix the wrong indent.

(cherry picked from commit 9055bb4)
Andersson007 added a commit that referenced this pull request Aug 10, 2021
…193) (#197)

* mysql_query: correctly reflect changed status in replace statements.

* Fix the wrong indent.

(cherry picked from commit 9055bb4)

Co-authored-by: Tong He <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants