Skip to content

Replaying binlog with dropped columns causes unhandled exception. #118

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

Open
vartec opened this issue Jun 17, 2015 · 2 comments
Open

Replaying binlog with dropped columns causes unhandled exception. #118

vartec opened this issue Jun 17, 2015 · 2 comments

Comments

@vartec
Copy link

vartec commented Jun 17, 2015

Steps to reproduce:

  1. create a table with few columns
  2. generate some row events
  3. drop a column from that table
  4. generate some more row events
  5. start pymysqlreplication replaying the binlog from the position prior to dropping the column

ER:
Working fine.

AR:
Unhandled error:

  File "/usr/local/lib/python2.7/dist-packages/pymysqlreplication/binlogstream.py", line 262, in fetchone
    self.__freeze_schema)
  File "/usr/local/lib/python2.7/dist-packages/pymysqlreplication/packet.py", line 98, in __init__
    freeze_schema = freeze_schema)
  File "/usr/local/lib/python2.7/dist-packages/pymysqlreplication/row_event.py", line 550, in __init__
    column_schema = self.column_schemas[i]
IndexError: list index out of range

This is partially solved by 4c48538, but that doesn't solve the deeper issue at hand which is how the schema for tables is obtained. Schema is always obtained from the current version of information_schema no matter how far in the past the RowEvent processed is.

vartec pushed a commit to vartec/python-mysql-replication that referenced this issue Jun 19, 2015
vartec pushed a commit to vartec/python-mysql-replication that referenced this issue Jun 19, 2015
vartec pushed a commit to vartec/python-mysql-replication that referenced this issue Jun 19, 2015
vartec pushed a commit to vartec/python-mysql-replication that referenced this issue Jun 19, 2015
@vartec
Copy link
Author

vartec commented Jun 19, 2015

Created a unittest to show another scenario when it is still a problem. 9549d6e

vartec pushed a commit to vartec/python-mysql-replication that referenced this issue Jun 20, 2015
julien-duponchelle added a commit that referenced this issue Jun 21, 2015
@jagarcia29
Copy link

Are there any updates on this? This is a critical issue we are experiencing as well when using the stitchdata.com MySQL tap which uses this library for binlog replication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants