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

sql_mode can be set in session, therefore we should look for ANSI_QUOTES in session variable instead of global variable #677

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SoledaD208
Copy link

…TES in session variable instead of global variable

SUMMARY
ISSUE TYPE
  • Bugfix Pull Request
  • Docs Pull Request
  • Feature Pull Request
  • New Module Pull Request
COMPONENT NAME
ADDITIONAL INFORMATION

…TES in session variable instead of global variable
@laurent-indermuehle
Copy link
Collaborator

Hi @SoledaD208 and thank you for taking the time to open a PR.

Before we can merge, it misses:

  • A description that explains why the change is made.
  • A change log fragment with the same explanation.
  • Integration tests.

About tests : I'm not sure what will happen when you change the scope of the sql_mode from global to session for the mysql_role and mysql_user modules. A rapid grep showed that the line you modified is the only time we use sql_mode in the entire collection.

Also, while writing tests, you could demonstrate how you intent to set a session with set sql_mode='ANSI_QUOTES'". As I don't think community.mysql allow for this. But tests are a great way to experiment that.

If I'm right, we could modify your PR to add such a feature. Feel free to ask me for help executing tests. I'm also available on matrix : #mysql:ansible.com

@SoledaD208
Copy link
Author

SoledaD208 commented Sep 15, 2024 via email

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