diff --git a/README.md b/README.md index b5f94e5..01efd4b 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,7 @@ List of config parameters: | ssl_ca | string | No | - | for self-signed SSL | | ssl_cert | string | No | - | for self-signed SSL | | ssl_key | string | No | - | for self-signed SSL | +| check_hostname | string | No | true | Whether or not to enforce strict host name checking on the SSL certificate | internal_hostname | string | No | - | Override match hostname for google cloud | | session_sqls | List of strings | No | ```['SET @@session.time_zone="+0:00"', 'SET @@session.wait_timeout=28800', 'SET @@session.net_read_timeout=3600', 'SET @@session.innodb_lock_wait_timeout=3600']``` | Set session variables dynamically. | diff --git a/setup.py b/setup.py index 59f9965..f128562 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ long_description = fh.read() setup(name='pipelinewise-tap-mysql', - version='1.5.6', + version='1.5.15', description='Singer.io tap for extracting data from MySQL & MariaDB - PipelineWise compatible', long_description=long_description, long_description_content_type='text/markdown', @@ -20,10 +20,14 @@ install_requires=[ 'pendulum==2.1.2', 'pipelinewise-singer-python==1.*', - 'mysql-replication==0.43', + 'mysql-replication==1.0.9', + 'singer-python==5.13.0', + 'tzlocal==5.1', 'PyMySQL==1.1.*', 'plpygis==0.2.1', - 'tzlocal==2.1', + 'python-dateutil==2.8.*', + 'six==1.15.*', + 'packaging==24.0' ], extras_require={ 'test': [ diff --git a/tap_mysql/connection.py b/tap_mysql/connection.py index 46ef001..5780723 100644 --- a/tap_mysql/connection.py +++ b/tap_mysql/connection.py @@ -91,6 +91,8 @@ def __init__(self, config): "cursorclass": config.get("cursorclass") or pymysql.cursors.SSCursor, "connect_timeout": CONNECT_TIMEOUT_SECONDS, "charset": "utf8", + "read_timeout": 60, + "write_timeout": 60 } ssl_arg = None @@ -122,6 +124,7 @@ def __init__(self, config): "ca": "./ca.pem", "cert": "./cert.pem", "key": "./key.pem", + "check_hostname": config.get("check_hostname", "true") } # override match hostname for google cloud diff --git a/tap_mysql/sync_strategies/full_table.py b/tap_mysql/sync_strategies/full_table.py index 9d46ddb..2f7bc07 100644 --- a/tap_mysql/sync_strategies/full_table.py +++ b/tap_mysql/sync_strategies/full_table.py @@ -46,6 +46,7 @@ def pks_are_auto_incrementing(mysql_conn, catalog_entry): with connect_with_backoff(mysql_conn) as open_conn: with open_conn.cursor() as cur: for primary_key in key_properties: + open_conn.ping(reconnect=True) cur.execute(sql.format(database_name, catalog_entry.table, primary_key))