* Replace matrix.mysql by matrix.db_engine_version
* Specify db flavor
* Upgrade dbdeployer to 1.56.0
See https://github.com/datacharmer/dbdeployer/issues/120
* Fix: github workflow syntax
* Fix: mysql version file for mariadb engine
* Do not test mysql_variables modes persist and persist_only on mariadb
Those modes do not exist on mariadb. See https://mariadb.com/kb/en/set/
* Exclude integration tests for mariadb_10.5.4 with pymysql==0.7.10
* TLS on mariadb is disabled by default
* Configure mariadb supported versions in matrix
As discussed in https://github.com/ansible-collections/community.mysql/discussions/141#discussioncomment-643657
* Fix: test_mysql_db : assert that databases does not exist
"assertion": "database1 not in mysql_result.stdout"
* Fix: assertion mysql_version in result.version.full
* Fix: test_mysql_user : Check that the module made a change and that the expected plugin type is set
'mysql_native_password' in show_create_user.stdout
* Fix: test_mysql_replication : Create user for replication
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax;
check the manual that corresponds to your MariaDB server version for the
right syntax to use near 'BY 'replication_pass'' at line 1
https://dev.mysql.com/doc/mysql-replication-excerpt/5.7/en/replication-howto-repuser.htmlhttps://dev.mysql.com/doc/mysql-replication-excerpt/8.0/en/replication-howto-repuser.htmlhttps://mariadb.com/kb/en/setting-up-replication/#example-enabling-replication-for-mariadb
Create user syntax compatible with auth plugin and password on both
mysql and mariadb.
https://dev.mysql.com/doc/refman/8.0/en/create-user.htmlhttps://mariadb.com/kb/en/create-user/
* Fix: test_mysql_replication: replica_status 'dict object' has no attribute 'Source_Host'
* Do not test mysql_replication_channel.yml on mariadb
* Do not test target 'test_mysql_role' with mariadb, too much errors to fix
* Setup mysql_version_parts depending on install type (mysql or mariadb)
* Install mariadb-client when install_type is mariadb
To use the same client tools as the database engine.
And to use a more updated mysqldump version, in order to fix this error:
ERROR 1556 (HY000) at line 776: You can't use locks with log tables
* Fix: mysql auth plugin is set on mariadb >10.2
* Fix: skip assertion on mariadb 10.2
* Do not execute test_user_plugin_auth.yml tests on mariadb, create/update useer sql syntax not compatible
* Fix: test_mysql_user : assert user1 TLS requirements
Remove test for oldd versions
* Fix: typo
* Fix: test_mysql_user : Test idempotency (expect ok) ignore mariadb 10.5
* [ci skip] Add changelog fragment
* Delete changelog fragment
* Remove all code related to VALID_PRIVS and get_valid_privs()
* Add tests to update user with invalid privs
* Re-raise InvalidPrivsError when granting privileges
* Fix: compatibility with python2
* More explicit assertions as commented by Andersson007
* Add changelog fragment
- Define variables "db_names" and "db_formats" in defaults
- Use of the "vars" option in includes instead of default parameters
that might be overridden by a previous task
- Use of the "loop" option in includes instead of duplicating include
tasks
- Use a nested loop on db_names and db_formats in state_dump_import test
Signed-off-by: Nicolas Payart <npayart@gmail.com>
The naming rules for MySQL/MariaDB identifiers, when quoted, allow the
`%` character.
However, currently, the use of the `%` character in database names
results in mismatch or missing databases.
- Rewrite query to identify the databases in the catalog using
`information_schema` instead of `SHOW DATABASES LIKE`
- Escape the `%` character in `CREATE DATABASE` query.
Signed-off-by: Nicolas Payart <npayart@gmail.com>
* mysql_replication: add deprecation warning about future replacement of Is_Slave and Is_Master return values, add alternatives
* Add changelog fragment
* 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
* 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
* Add changelog fragment
* Add check_hostname option
* Propagate check_hostname option across the collection
* Update documentation fragment
* Propagate test to all other plugins
* Remove stray line
* Give test user privileges to run test operations
* Extend integration tests job matrix
* Add caution note to documentation fragment.
* Update matrix job name
* Rearrange job matrix
* Fix sanity issues
* Fix issue with mysqldb silently failing to update out of range variables
* Fix variable overwrite
* Ignore `check_hostname` when using MySQLdb
* Update plugins/doc_fragments/mysql.py
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Update plugins/doc_fragments/mysql.py
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Update changelogs/fragments/35-disable-hostname-check.yml
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Add test to verify TLS requirements are removed
* Fix cursor parsing
* small fixes
* Refactor TLS tests into their own file
* Fix TLS requirements parsing
* Add TLS connection parameters
* Add check mode tests
* Fix check mode indentation
* Run MySQL commands with the mysql_command variable
* Fix typo
* Restore code lost during cherry pick
* Fix conditionals to accomodate for MySQL v8
* Fix equal operators
* Remove Black formatting in an attempt to make codecov happy
* Remove deprecation notice
* Fix closing bracket
* Remove code duplication
* initial commit
* removed remaining references to community.general
* enabled integration pipeline
* switched from preconfigured replication topology to simple multinode install
* updated version from 1.0.0 to 0.1.0