mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-25 11:51:27 -07:00
Using show all slaves status
when using MariaDB to be consistent with MySQL (#602)
* Using `show all slaves status` whe using MariaDB to be consistent with the MySQL behaviour. * Fixing lint issues * Fix issue by using dict attribute * Fix unit tests * fix lint test * Add unit tests * Fix unit tests * Adding changlog fragment * Update changelogs/fragments/602-show-all-slaves-status.yaml Co-authored-by: Laurent Indermühle <laurent.indermuehle@pm.me> * Refactoring change by moving common logic to the module_utils * Fix sanity checks * Fix sanity checks * Adding lines to fix sanity checks * Fixing sanity checks * Update changelogs/fragments/602-show-all-slaves-status.yaml Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru> * Removing is_mariadb and is_mysql functions --------- Co-authored-by: Laurent Indermühle <laurent.indermuehle@pm.me> Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
This commit is contained in:
parent
051aa48d8d
commit
852c19a78a
5 changed files with 47 additions and 11 deletions
|
@ -207,6 +207,13 @@ def get_server_version(cursor):
|
|||
return version_str
|
||||
|
||||
|
||||
def get_server_implementation(cursor):
|
||||
if 'mariadb' in get_server_version(cursor).lower():
|
||||
return "mariadb"
|
||||
else:
|
||||
return "mysql"
|
||||
|
||||
|
||||
def set_session_vars(module, cursor, session_vars):
|
||||
"""Set session vars."""
|
||||
for var, value in session_vars.items():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue