You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mysql_replication: fix crashes caused by deprecated terminology (ansible-collections#71)
* 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_replication - fix crashes of mariadb >= 10.5.1 and mysql >= 8.0.22 caused by using deprecated terminology (https://github.com/ansible-collections/community.mysql/issues/70).
Copy file name to clipboardExpand all lines: tests/integration/targets/test_mysql_replication/tasks/mysql_replication_initial.yml
+36-2Lines changed: 36 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,22 @@
8
8
login_host: 127.0.0.1
9
9
10
10
block:
11
+
- name: find out the database version
12
+
mysql_info:
13
+
<<: *mysql_params
14
+
login_port: '{{ mysql_primary_port }}'
15
+
filter: version
16
+
register: db
17
+
18
+
- name: Set mysql8022_and_higher
19
+
set_fact:
20
+
mysql8022_and_higher: false
21
+
22
+
- name: Set mysql8022_and_higher
23
+
set_fact:
24
+
mysql8022_and_higher: true
25
+
when:
26
+
- db.version.major > 8 or (db.version.major == 8 and db.version.minor > 0) or (db.version.major == 8 and db.version.minor == 0 and db.version.release >= 22)
11
27
12
28
- name: alias mysql command to include default options
13
29
set_fact:
@@ -120,7 +136,7 @@
120
136
- assert:
121
137
that:
122
138
- result is changed
123
-
- result.queries == ["START SLAVE"]
139
+
- result.queries == ["START SLAVE"] or result.queries == ["START REPLICA"]
0 commit comments