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_variables always changes on boolean values #652

Closed
rafi0101 opened this issue Jun 26, 2024 · 2 comments · Fixed by #653
Closed

mysql_variables always changes on boolean values #652

rafi0101 opened this issue Jun 26, 2024 · 2 comments · Fixed by #653
Labels
bug Something isn't working

Comments

@rafi0101
Copy link

SUMMARY

in MariaDB mysql_variables always mark boolean variables as changed if I use 0 oder 1 as value.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

community.mysql.mysql_variables

ANSIBLE VERSION
ansible [core 2.16.8]
COLLECTION VERSION
community.mysql 3.9.0
CONFIGURATION

/

OS / ENVIRONMENT

/

STEPS TO REPRODUCE

try to change any boolean variable with this module in MariaDB and set the value to 0 or 1 in ansible.
"ON" or "OFF" is working. (btw without quotation marks it is also not working, because ansible then translate it to True or Falso which is not a valid MariaDB value)

I know what the Problem is:
MariaDB accept at leaset 0,1,ON and OFF for booleans but always converts the value to ON or OFF. Now the module always wants to change the value from OFF to 0 which is the same. So especially for boolean values the "when is a variable changed" should be adjusted.

and no, changing all values from 0 to OFF in ansible would be too easy for me :D

EXPECTED RESULTS

should not show changed if the value is 0/OFF or 1/ON

ACTUAL RESULTS
    "msg": "Variable change succeeded prev_value=OFF",
    "queries": [
        "SET GLOBAL `log_slow_slave_statements` = 0"
    ]
@Andersson007
Copy link
Collaborator

@rafi0101 hello, thanks for the issue report! Looking

@Andersson007
Copy link
Collaborator

@rafi0101 #653 has been merged, thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants