Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions pymysqlreplication/binlogstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ def __checksum_enabled(self):

if result is None:
return False
var, value = result[:2]
if type(result) == type({}):
value = result["Value"]
else:
var, value = result[:2]
if value == 'NONE':
return False
return True
Expand All @@ -140,7 +143,11 @@ def __connect_to_stream(self):
if self.log_file is None or self.log_pos is None:
cur = self._stream_connection.cursor()
cur.execute("SHOW MASTER STATUS")
self.log_file, self.log_pos = cur.fetchone()[:2]
data = cur.fetchone()
if type(data) == type({}):
self.log_file, self.log_pos = data["File"], data["Position"]
else:
self.log_file, self.log_pos = cur.fetchone()[:2]
cur.close()

prelude = struct.pack('<i', len(self.log_file) + 11) \
Expand Down