Skip to content

Commit

Permalink
add a warning when column_case_sensitive in set to false
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent-indermuehle committed Oct 5, 2023
1 parent a7ac019 commit baf947d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/modules/mysql_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -1087,6 +1087,10 @@ def main():
try:
if state == 'present':
if not role.exists:
# TODO Release 4.0.0 : Remove this warning or change the message.
if not column_case_sensitive and "(" in str(priv):
module.warn("column_case_sensitive set to False, column's name will be uppercased")

if subtract_privs:
priv = None # avoid granting unwanted privileges
if detach_members:
Expand Down
4 changes: 4 additions & 0 deletions plugins/modules/mysql_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,10 @@ def main():
mode = get_mode(cursor)
except Exception as e:
module.fail_json(msg=to_native(e))

# TODO Release 4.0.0 : Remove this warning or change the message.
if not column_case_sensitive and "(" in str(priv):
module.warn("column_case_sensitive set to False, column's name will be uppercased")
priv = privileges_unpack(priv, mode, column_case_sensitive, ensure_usage=not subtract_privs)
password_changed = False
if state == "present":
Expand Down

0 comments on commit baf947d

Please sign in to comment.