Skip to content

fix - Bug/increase history list length #431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
5 changes: 4 additions & 1 deletion pymysqlreplication/binlogstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ def __connect_to_ctl(self):
self._ctl_connection_settings = dict(self.__connection_settings)
self._ctl_connection_settings["db"] = "information_schema"
self._ctl_connection_settings["cursorclass"] = DictCursor
self._ctl_connection_settings["autocommit"] = True
self._ctl_connection = self.pymysql_wrapper(**self._ctl_connection_settings)
self._ctl_connection._get_table_information = self.__get_table_information
self.__connected_ctl = True
Expand Down Expand Up @@ -653,8 +654,10 @@ def __get_table_information(self, schema, table):
table_schema = %s AND table_name = %s
ORDER BY ORDINAL_POSITION
""", (schema, table))
result = cur.fetchall()
cur.close()

return cur.fetchall()
return result
except pymysql.OperationalError as error:
code, message = error.args
if code in MYSQL_EXPECTED_ERROR_CODES:
Expand Down