* mysql_info - Add connector_name and connector_version to returned value (#497)
* Add methods to retrieve connector name and version
* Document that mysqlclient is also named MySQLdb
* Document version_added
* Add connector name and version in the returned block
* Cut condition to display any name that is return
In case of MySQLdb is renamed in mysqlclient. In that case, the
integration tests will catch this the day we update the connector
version.
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
(cherry picked from commit a5f3296d73)
* Cut fragment not relevant to the collection usage
* Updated version_added for stable-1
---------
Co-authored-by: Laurent Indermühle <laurent.indermuehle@pm.me>
* * add `socket` option suggestion in documentation
* white space fix
* * move first two at the end
(cherry picked from commit b9a6ec4f7d)
Co-authored-by: Gabriel PREDA <eRadical@users.noreply.github.com>
Using += on a list cause some problems druing creation of mysql command:
/usr/bin/mysql - - u s e r = r o o t - - p a s s w o r d = ' ' --socket=/run/mysqld/mysqld.sock
(cherry picked from commit 2e9d50f274)
Co-authored-by: Maciej <moledzki@users.noreply.github.com>
* mysql_query: fix false change reports when IF NOT EXISTS clause is used (#322)
* mysql_query: fix false change reports when IF NOT EXISTS clause is used
* Fix
* Fix doc, add fragment
* Improve doc
(cherry picked from commit 647461010d)
* Fix tests
* Clarified error message about missing python modules (#279)
* Clarified error message about missing python modules, and tweak documentation to suggest overriding interpreter.
* Mention mysqlclient as another option
* Correct mysqlclient suggestions from python2 to python3
Co-authored-by: Matthew Exon <git.mexon@spamgourmet.com>
(cherry picked from commit 82baf7508c)
* Copy ignore-2.13.txt to ignore-2.14.txt (#323)
* Copy ignore-2.13.txt to ignore-2.14.txt
* Fix sanity
(cherry picked from commit c16b2428e8)
Co-authored-by: Matthew Exon <github2.mexon@neverbox.com>
* Prepare for distutils.version being removed in Python 3.12 (#267)
* Prepare for distutils.version being removed in Python 3.12
* Update plugins/module_utils/version.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit d9e12b85ad)
* Use vendored version of distutils.version (#269)
* Use vendored version of distutils.version
* Correct fragment
* Update plugins/module_utils/version.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 9c575b4762)
* Add ignore-2.13.txt
* mysql_info: fix TypeError failure when there are databases that do not contain tables (#205)
* mysql_info: fix TypeError failure when there are databases that do not contain tables
* Add changelog fragment
(cherry picked from commit a1f419d541)
* Fix sanity errors
* mysql_query: correctly reflect changed status in replace statements.
* Fix the wrong indent.
(cherry picked from commit 9055bb4c8c)
Co-authored-by: Tong He <68936428+unnecessary-username@users.noreply.github.com>
* add mysql_full_version and suffix return variable
add changelog fragment
* rephrase changelog fragment
* Update plugins/modules/mysql_info.py
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Add changes as per PR review
* Add tests for new suffix output parameter
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Jorge-Rodriguez <jorge.rodriguez@futurice.com>
* mysql_user: add proper handling of INSERT, UPDATE, REFERENCES on columns
* Add changelog fragment
* fix sanity
* fix CI
* fix sanity
* fix CI
* make the assertion fairer
* Improve
* mysql_user: fix the module is not idempotent when there is SELECT on columns granted
* add changelog fragment
* fix
* Add unit tests for has_select_on_col function
* Add unit tests for sort_column_order function
* Add unit tests for handle_select_on_col function
* Update a comment
* mysql_replication: deprecation of slave related options, adding alternatives
* Add changelog fragment
* Integration tests getslave -> getreplica
* Change the rest of offending choices/comments
* Add announcement about replacing SLAVE to REPLICA in messages
* Deprecate offending values
This module does not currently log the SQL statements that it executes.
A change was proposed to add this functionality, but it would require
modifications in many sections of the code due to how many cursor.execute()
statements there currently are. This change simply consolidates the
number of execute() calls where it is trivial to do so.
* mysql_user: fixed encrypted option for MySQL 8.0 and test coverage
The purpose of this change was originally to expand test coverage to
unblock #76, but an issue was detected with the encrypted parameter on
MySQL 8.0 in the process of writing the tests. Additionally,
user_password_update_test.yml had been disabled at some point, so I
opted to replace it with two new files that will focus on the password
and plugin auth paths.
* Updated tests to cover a couple of missing branches
* Skip tests that rely on sha256_password if pymysql < 0.9
* Cover the case where pymysql isn't installed for plugin tests
* Added better plugin auth checking to tests and other minor changes
* Fixed version detection to explicitly handle MariaDB
* Removed unneeded import from previous change
* Remove whitespace that was introduced by change that was removed
* Added unit tests for missing coverage
* mysql_replication: fix crashes caused by deprecated terminology
* Fix unrelated sanity errors
* Tests: mysql 8.0.21 -> 8.022
* Adjust integration tests
* Add version check to the tests
* Add debug statement
* Adjust mysql version
* Fix tests
* Add unit tests
* Add changelog fragment
* Improve code and coverage
* Get rid of extra blank line
* Improve coverage
* Change suggested
* mysql_user: Fixed change detection with append_privs (#69)
Prior to this change, mysql_user with append_privs would attempt to make
a change even if the current privileges were a superset of the new
privileges (shouldn't require any action).
* Fixed unrelated mysql_replication doc causing failures in CI
* Added fragments and check_mode tests
* Expanded priv append tests to cover additional case