julien-duponchelle / julien-duponchelle/python-mysql-replication

Json type 150 is not handled

Open
#311 8 comments 0 reactions 0 assignees View on GitHub
Help wanted
Dominant language
Python
Stars
2.4k
Forks
690
PR merge metrics
No merged PRs in 30d

Description

Received this error whilst listening to binlogs in AWS RDS:

```
Traceback (most recent call last):
File "/usr/local/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "./main.py", line 25, in startDBListener
"secret": gfire
File "/usr/src/app/database_listener.py", line 47, in listen
for row in binlogevent.rows:
File "/usr/local/lib/python3.7/site-packages/pymysqlreplication/row_event.py", line 427, in rows
self._fetch_rows()
File "/usr/local/lib/python3.7/site-packages/pymysqlreplication/row_event.py", line 422, in _fetch_rows
self.__rows.append(self._fetch_one_row())
File "/usr/local/lib/python3.7/site-packages/pymysqlreplication/row_event.py", line 511, in _fetch_one_row
row["before_values"] = self._read_column_data(self.columns_present_bitmap)
File "/usr/local/lib/python3.7/site-packages/pymysqlreplication/row_event.py", line 181, in _read_column_data
values[name] = self.packet.read_binary_json(column.length_size)
File "/usr/local/lib/python3.7/site-packages/pymysqlreplication/packet.py", line 352, in read_binary_json
return self.read_binary_json_type(t, length)
File "/usr/local/lib/python3.7/site-packages/pymysqlreplication/packet.py", line 385, in read_binary_json_type
raise ValueError('Json type %d is not handled' % t)
ValueError: Json type 150 is not handled
```

Contributor guide

Open the contributing guide

Research direction

Start in pymysqlreplication/packet.py at read_binary_json_type and trace how read_binary_json handles the type value reported as 150. Check the row-event caller in pymysqlreplication/row_event.py and reproduce the AWS RDS binlog case if possible. Done means the affected JSON value is decoded without the unhandled-type error.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, mysql, python
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.