From 75a56e11e5d48a55de02db902ec3dd8676d3deff Mon Sep 17 00:00:00 2001 From: Louis Pieterse Date: Thu, 9 May 2024 13:43:53 +0100 Subject: [PATCH] Prefer SSL connection to source (#181) --- .github/CODEOWNERS | 1 + setup.py | 2 +- tap_mysql/connection.py | 2 +- tap_mysql/sync_strategies/binlog.py | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..5e582ed --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @transferwise/analytics-platform \ No newline at end of file diff --git a/setup.py b/setup.py index 59f9965..58ec161 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.6.0', description='Singer.io tap for extracting data from MySQL & MariaDB - PipelineWise compatible', long_description=long_description, long_description_content_type='text/markdown', diff --git a/tap_mysql/connection.py b/tap_mysql/connection.py index 46ef001..a86fe5d 100644 --- a/tap_mysql/connection.py +++ b/tap_mysql/connection.py @@ -93,7 +93,7 @@ def __init__(self, config): "charset": "utf8", } - ssl_arg = None + ssl_arg = {"": True} if config.get("database"): args["database"] = config["database"] diff --git a/tap_mysql/sync_strategies/binlog.py b/tap_mysql/sync_strategies/binlog.py index f569ba3..bfe591e 100644 --- a/tap_mysql/sync_strategies/binlog.py +++ b/tap_mysql/sync_strategies/binlog.py @@ -809,7 +809,7 @@ def create_binlog_stream_reader( server_id = int(config.get('server_id')) LOGGER.info("Using provided server_id=%s", server_id) else: - server_id = random.randint(1, 2 ^ 32) # generate random server id for this slave + server_id = random.randint(1, 2 ** 32 - 1) # generate random server id for this slave LOGGER.info("Using randomly generated server_id=%s", server_id) engine = config['engine']