I didn't notice that db_dump and db_import were different, thus I introduced a bug with the initialization of the variable cmd. This commit fixes that.
* Fix show master status for MySQL 8.2+
* Fix mysqldump option form --master-data to --source-data
* Fix incompatibility between mysqldump 8.0 and MySQL 8.4
Installing the same version between the client and the server makes
sense anyway. The incompatibility arise when you use mysqldump with
--source-data. The the tool tries to perform a SHOW MASTER STATUS which
is deprecated in MySQL 8.2+.
* Fix missing condition
* Fix unit tests
* Add a query resolver depending on implementation and version
* Sanity
* Fix SHOW REPLICA STATUS queries
* Fix mariadb's SHOW REPLICA HOSTS query
* Fix CHANGE MASTER for MySQL 8.0.23+
* Fix integration test for CHANGE MASTER
* Fix integration test for CHANGE MASTER
* Fix replication queries for MySQL 8.0.23+ and 8.4+
* Revert file edited by mistake
* Enhance tests format
* Add schema and tables for the tests
* Add tests for full dump with and without compression
* Add test for distinct dump with and without compression
* Fix sh not seeing errors for command before the pipe
sh is missing the pipefail flag. We must use bash for this.
* Add cleanup to prevent the following tests from failing
* Fix fqcn in module_defaults
* Add changelog fragment
* Add check to the error message to ensure we captured the right one
* Add option to activate the fix on systems with bash
* Fix errors when data schema is already absent
* Update changelogs/fragments/fix-256-mysql_dump-errors.yml
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Add markup for commands in the documentation string
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Add markup and next release version in the documentation string
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Fix missing dependency for MySQL 8
* Add pipefail to tests of uncompressed dumps to enure it still works
* Fix "bash command not found" if pipefail is used for uncompressed dump
* Fix sanity pep8
* Document example of dump with pipefail
* Add dedpulication to command construct
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
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
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>
* 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 changelog fragments from c.g.
* Adjust version_added to 0.1.0, which comes closer to the truth.
* Add changelogs/.plugin-cache.yaml to gitignore.
* 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