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

decimal.InvalidOperation

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

Description

Environment:
MySQL: 8.0.27
mysql-replication: 0.24

```
Traceback (most recent call last):
File "extract.py", line 57, in
routine()
File "extract.py", line 46, in routine
binlog2sql.process_binlog(gv.conf.Target)
File "/root/mysql2db/binlog2sql.py", line 155, in process_binlog
for row in binlog_event.rows:
File "/usr/local/lib/python3.6/site-packages/pymysqlreplication/row_event.py", line 432, in rows
self._fetch_rows()
File "/usr/local/lib/python3.6/site-packages/pymysqlreplication/row_event.py", line 427, in _fetch_rows
self.__rows.append(self._fetch_one_row())
File "/usr/local/lib/python3.6/site-packages/pymysqlreplication/row_event.py", line 480, in _fetch_one_row
row["values"] = self._read_column_data(self.columns_present_bitmap)
File "/usr/local/lib/python3.6/site-packages/pymysqlreplication/row_event.py", line 133, in _read_column_data
values[name] = self.__read_new_decimal(column)
File "/usr/local/lib/python3.6/site-packages/pymysqlreplication/row_event.py", line 400, in __read_new_decimal
return decimal.Decimal(res)
decimal.InvalidOperation: []
```

Anyone can help?

Contributor guide

Open the contributing guide

Research direction

Start in pymysqlreplication/row_event.py, especially __read_new_decimal, using the traceback and the reported MySQL 8.0.27 and mysql-replication 0.24 environment. Reproduce the decimal.InvalidOperation while reading binlog rows, then identify the input that triggers it and verify that the affected decimal value can be read without the exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, python
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.