community.mysql/plugins/module_utils/implementations/mariadb/replication.py
Jorge Rodriguez (A.K.A. Tiriel) 11958ec46a
Handle divergences between MySQL and MariaDB (#103)
* Initial attempt

* First functional approach

* Remove unused imports

* Add dychotomy handling for mysql_replication

* Fix cursor lookup

* Fix sanity tests

* Cleanup implementation conditional import

* Fix unit tests

* Fix conditional import to satisfy both sanity and integration tests

* Add changelog fragment
2021-03-16 09:15:19 +01:00

10 lines
402 B
Python

from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible_collections.community.mysql.plugins.module_utils.mysql import get_server_version
from distutils.version import LooseVersion
def uses_replica_terminology(cursor):
"""Checks if REPLICA must be used instead of SLAVE"""
return LooseVersion(get_server_version(cursor)) >= LooseVersion('10.5.1')