Commit graph

141 commits

Author SHA1 Message Date
R. Sicart
b7b4e2dc71 Fix: mysql auth plugin is set on mariadb >10.2 2021-12-10 15:29:56 +01:00
R. Sicart
661ae6f8be 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
2021-12-10 15:29:56 +01:00
R. Sicart
7284131eed Setup mysql_version_parts depending on install type (mysql or mariadb) 2021-12-10 15:29:55 +01:00
R. Sicart
dcfedaf6e1 Do not test target 'test_mysql_role' with mariadb, too much errors to fix 2021-12-10 15:29:55 +01:00
R. Sicart
b4f25cf43f Do not test mysql_replication_channel.yml on mariadb 2021-12-10 15:29:55 +01:00
R. Sicart
06d104e0bd Fix: test_mysql_replication: replica_status 'dict object' has no attribute 'Source_Host' 2021-12-10 15:29:55 +01:00
R. Sicart
a222fc3bea 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.html
https://dev.mysql.com/doc/mysql-replication-excerpt/8.0/en/replication-howto-repuser.html
https://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.html
https://mariadb.com/kb/en/create-user/
2021-12-10 15:29:55 +01:00
R. Sicart
b79a355bcf 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
2021-12-10 15:29:55 +01:00
R. Sicart
94f5aebc1d Fix: assertion mysql_version in result.version.full 2021-12-10 15:29:55 +01:00
R. Sicart
f22bc3fea4 Fix: test_mysql_db : assert that databases does not exist
"assertion": "database1 not in mysql_result.stdout"
2021-12-10 15:29:55 +01:00
R.Sicart
67a18e56e5 Configure mariadb supported versions in matrix
As discussed in https://github.com/ansible-collections/community.mysql/discussions/141#discussioncomment-643657
2021-12-10 15:29:55 +01:00
R. Sicart
490d045e4f TLS on mariadb is disabled by default 2021-12-10 15:29:55 +01:00
R. Sicart
eb70737529 Exclude integration tests for mariadb_10.5.4 with pymysql==0.7.10 2021-11-23 18:06:46 +01:00
R. Sicart
a4a6108f12 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/
2021-11-23 18:06:46 +01:00
R.Sicart
74d15e8163 Fix: mysql version file for mariadb engine 2021-11-23 18:06:46 +01:00
R.Sicart
65828dbf1a Fix: github workflow syntax 2021-11-23 18:06:46 +01:00
R. Sicart
f4853ef6dc Upgrade dbdeployer to 1.56.0
See https://github.com/datacharmer/dbdeployer/issues/120
2021-11-23 18:06:46 +01:00
R. Sicart
36a1496296 Specify db flavor 2021-11-23 18:06:46 +01:00
R. Sicart
d1b1224a1c Replace matrix.mysql by matrix.db_engine_version 2021-11-23 18:06:46 +01:00
R.Sicart
727b638d13
Get rid of privs comparison (#243)
* 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
2021-11-20 09:28:40 +01:00
Nicolas PAYART
e4de13aabe
mysql_db: Improve tests (#240)
- 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>
2021-11-08 09:52:54 +01:00
Nicolas PAYART
5522e45284
mysql_db: Fix assert in tests suite (#239)
Signed-off-by: Nicolas Payart <npayart@gmail.com>
2021-10-25 09:35:44 +02:00
Nicolas PAYART
6b12435b2b
Allow the "%" character in database name (#227)
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>
2021-10-21 08:38:46 +02:00
Andrew Klychkov
3c3f6513c5
Remove fragments after release 2.3.1 (#237) 2021-10-19 13:44:15 +02:00
Andrew Klychkov
bb3e9fd3fa
mysql_user: fix broken compatibility for priviledge aliases (#233)
* mysql_user: fix broken compatibility for priviledge aliases

* add changelog fragment

* fix changelog fragment

* Improve formatting
2021-10-18 15:25:00 +02:00
Andrew Klychkov
f47d4635f1
integration tests: remove superfluous debug task (#228)
* integration tests: remove superfluous debug task

* Turn off integration tests against devel
2021-10-12 13:05:07 +02:00
Andrew Klychkov
fc984b28aa
CI matrix update (#226)
* CI matrix update

* Fix test_mysql_user

* Fix CI

* Fix CI

* Fix CI

* Fix CI

* Fix CI
2021-10-12 11:24:28 +02:00
Andrew Klychkov
4f205ef540
Copy ignore-2.12.txt to ignore-2.13.txt (#225) 2021-09-28 14:12:34 +02:00
Andrew Klychkov
02060b31ad
Remove fragments after release (#223) 2021-09-23 15:23:38 +02:00
R.Sicart
0ce1fa1634
mysql_user: replace VALID_PRIVS by get_valid_privs() function (#217)
* mysql_user: replace VALID_PRIVS by get_valid_privs() function

* Add EXTRA_PRIVS in case we need to add more privs in the future

* Add changelog fragment
2021-09-23 11:53:37 +02:00
Andrew Klychkov
4de0e25ea0
Update README.md (#216) 2021-09-23 11:53:14 +02:00
int32bit
663590689f
Fix wrong impl for mysql (#210)
If 'mariadb' in version info, the db instance should be mariadb(reverse in code) rather than mysql.
2021-08-25 09:21:24 +02:00
Andrew Klychkov
a1f419d541
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
2021-08-20 08:17:34 +02:00
Andrew Klychkov
8a17e43eae
Fix sanity errors (#206) 2021-08-19 16:20:28 +02:00
Andrew Klychkov
968dabef7f
Remove a changelog fragment after release (#203) 2021-08-11 11:12:42 +02:00
Andrew Klychkov
ce2b269f84
mysql_role: new module (#189)
* mysql_role: new module

* fixes

* fixes

* Add the role class

* Check if role exists

* role.add()

* role.__get_members

* tmp

* tmp

* Change tests

* Fix

* Fix

* add_members()

* get_privs()

* tmp

* __extract_grants() filler version

* Before big work

* tmp

* drop()

* tmp

* tmp

* Big changes

* Fix

* append_members, detach_members, append_privs

* tmp

* admin option

* Add tests

* Add tests

* Fix tests

* Remove debug warning

* Fix tests

* Add documentation

* Fix MariaDB case

* Fix MariaDB

* Fix MariaDB

* Fix MariaDB

* Fix MariaDB

* Fix MariaDB

* Fix

* Fix

* Remove debug warning

* Add try-except block

* tmp

* tmp

* tmp

* Fix

* Add err handling

* Add user check

* Check admin in db

* Fix CI

* Fix CI

* Fix CI

* Fix CI

* Fix

* Add mutually exclusive options

* Small refactoring, documenting

* Documenting, refactoring

* Change docs

* Refactoring

* Refactoring

* Refactoring

* Add unit tests

* Update README.md
2021-08-10 13:30:34 +02:00
Tong He
9055bb4c8c
mysql_query: correctly reflect changed status in replace statements (#193)
* mysql_query: correctly reflect changed status in replace statements.

* Fix the wrong indent.
2021-07-28 09:18:00 +02:00
Andrew Klychkov
0fabb2b77a
Add MAINTAINING.md, update README.md (#192) 2021-07-21 10:51:38 +02:00
Andrew Klychkov
6f02cb266a
Update README.md (#191)
* Update README.md

* Update README.md
2021-07-21 10:31:50 +02:00
Baptiste Mille-Mathias
596ba0cedb
fix typo (#190)
"optoin" -> "option"
2021-07-09 09:17:44 +02:00
Andrew Klychkov
adb201a795
Update README (#186)
* Update README

* Fix

* Fix

* Fix

* Fix

* Add Libera.Chat link
2021-06-17 15:55:24 +02:00
Andrew Klychkov
56a214885a
CONTRIBUTING.md: replace the content with a link to Ansible contributing guidelines (#187) 2021-06-16 15:53:32 +02:00
Andrew Klychkov
cd759924fd
README: fix the channel name (#185) 2021-06-15 06:57:36 +02:00
Andrew Klychkov
8ab6ea7714
README: fix link (#184) 2021-06-14 15:41:47 +02:00
Andrew Klychkov
69012a2eb9
Update README.md (#183)
* Update README.md

* Change IRC ref
2021-06-14 11:30:35 +02:00
Andrew Klychkov
6d9288d19b
Update README (#181) 2021-06-04 10:44:27 +02:00
Andrew Klychkov
8fad3f85b8
README.md, CONTRIBUTING.md: add links to the Maintainer guidelines (#179) 2021-06-03 10:06:25 +02:00
Andrew Klychkov
3335a95ba5
README.md: Add link to IRC (#175) 2021-06-02 07:05:57 +02:00
Andrew Klychkov
71b274213e
Fix a typo in README (#173) 2021-05-25 06:54:50 +02:00
Andrew Klychkov
2a80c301a6
README: fix typos (#174) 2021-05-25 06:54:16 +02:00