mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-07-29 08:01:25 -07:00
Add filter for issues resolved in newer version of mysqlclient
This commit is contained in:
parent
06ed7374d7
commit
73ee8f07c9
1 changed files with 10 additions and 5 deletions
|
@ -339,22 +339,27 @@
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
# Issue https://github.com/ansible-collections/community.mysql/issues/268
|
# Issue https://github.com/ansible-collections/community.mysql/issues/268
|
||||||
- assert:
|
- name: "Assert that create table IF NOT EXISTS is not changed with pymysql \
|
||||||
|
and mysqlclient > 2.0.1"
|
||||||
|
assert:
|
||||||
that:
|
that:
|
||||||
# PyMySQL driver throws a warning, so the following is correct
|
# PyMySQL driver throws a warning, so the following is correct
|
||||||
- result is not changed
|
- result is not changed
|
||||||
when:
|
when:
|
||||||
- connector_name == 'pymysql'
|
- connector_name == 'pymysql'
|
||||||
|
or (connector_name == 'mysqlclient' and connector_ver is version('2.0.1', '>'))
|
||||||
|
|
||||||
# Issue https://github.com/ansible-collections/community.mysql/issues/268
|
# Issue https://github.com/ansible-collections/community.mysql/issues/268
|
||||||
- assert:
|
- name: Assert that create table IF NOT EXISTS is changed with mysqlclient <=2.0.1
|
||||||
|
assert:
|
||||||
that:
|
that:
|
||||||
# mysqlclient driver throws nothing, so it's impossible to figure out
|
# Before mysqlclient 2.0.3, driver throws nothing, so it's impossible to
|
||||||
# if the state was changed or not.
|
# figure out if the state was changed or not.
|
||||||
# We assume that it was for DDL queryes by default in the code
|
# We assume that it was for DDL queries by default in the code
|
||||||
- result is changed
|
- result is changed
|
||||||
when:
|
when:
|
||||||
- connector_name == 'mysqlclient'
|
- connector_name == 'mysqlclient'
|
||||||
|
- connector_ver is version('2.0.1', '<=')
|
||||||
|
|
||||||
- name: Drop db {{ test_db }}
|
- name: Drop db {{ test_db }}
|
||||||
mysql_query:
|
mysql_query:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue