mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-09 20:20:32 -07:00
Allow uppercase in variable names for Galera wsrep variables (#501)
* Allow uppercase in variable names for Galera wsrep variables * Changelog fragment for regex change * Corrected for excessive line lengths * Update changelogs/fragments/mysql_variables_allow_uppercase_identifiers.yml --------- Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
This commit is contained in:
parent
b8d6474540
commit
521443a671
2 changed files with 7 additions and 1 deletions
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
bugfixes:
|
||||
- mysql_variables - add uppercase character pattern to regex to allow GLOBAL
|
||||
variables containing uppercase characters.
|
||||
This recognizes variable names used in Galera, for example, ``wsrep_OSU_method``,
|
||||
which breaks the normal pattern of all lowercase characters (https://github.com/ansible-collections/community.mysql/pull/501).
|
|
@ -199,7 +199,7 @@ def main():
|
|||
|
||||
if mysqlvar is None:
|
||||
module.fail_json(msg="Cannot run without variable to operate with")
|
||||
if match('^[0-9a-z_.]+$', mysqlvar) is None:
|
||||
if match('^[0-9A-Za-z_.]+$', mysqlvar) is None:
|
||||
module.fail_json(msg="invalid variable name \"%s\"" % mysqlvar)
|
||||
if mysql_driver is None:
|
||||
module.fail_json(msg=mysql_driver_fail_msg)
|
||||
|
|
Loading…
Add table
Reference in a new issue