mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-07-22 04:40:23 -07:00
feat: Add support for the connector pymysql 1.0.2 (#533)
* Document connector-version relationship * Fix missing option in the command usage documentation * Rephrase commands descriptions * Document that pymysql 0.10.0 disabled its warnings * Disable tests for pymysql newer than 0.10.0 because the behavior changed * Enable integration tests for pymysql 1.0.2 * Add exclusion to avoid requesting nonexistent test containers * Cut comments about PyMySQL 1.0.2 need to be fixed * docs: explain PyMySQL 0.10.0+ returns changed when using IF EXISTS
This commit is contained in:
parent
426084a131
commit
30a2015f6c
6 changed files with 28 additions and 21 deletions
|
@ -363,21 +363,27 @@
|
|||
- name: Assert that create table IF NOT EXISTS is not changed with pymysql
|
||||
assert:
|
||||
that:
|
||||
# PyMySQL driver throws a warning, so the following is correct
|
||||
# PyMySQL driver throws a warning for version before 0.10.0
|
||||
- result is not changed
|
||||
when:
|
||||
- connector_name == 'pymysql'
|
||||
- connector_version is version('0.10.0', '<')
|
||||
|
||||
# Issue https://github.com/ansible-collections/community.mysql/issues/268
|
||||
- name: Assert that create table IF NOT EXISTS is changed with mysqlclient
|
||||
assert:
|
||||
that:
|
||||
# Mysqlclient 2.0.1, driver throws nothing with mysql, so it's
|
||||
# impossible to figure out if the state was changed or not.
|
||||
# Mysqlclient 2.0.1 and pymysql 0.10.0+ drivers throws no warning,
|
||||
# so it's impossible to figure out if the state was changed or not.
|
||||
# We assume that it was for DDL queries by default in the code
|
||||
- result is changed
|
||||
when:
|
||||
- connector_name == 'mysqlclient'
|
||||
- >
|
||||
connector_name == 'mysqlclient'
|
||||
or (
|
||||
connector_name == 'pymysql'
|
||||
and connector_version is version('0.10.0', '>')
|
||||
)
|
||||
|
||||
- name: Drop db {{ test_db }}
|
||||
mysql_query:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue