julien-duponchelle/python-mysql-replication

suggestion: little change about how log_file, log_pos works, improve readability of comment in BinLogStreamReader __init__()

jaehyeonpy opened this issue · 0 comments

In BinLogStreamReader init(), if log_file is specified by a user (which is not None), log_pos is not specified (which is None), __connect_to_stream() starts to send binlog events from the latest binlog file, not from the specified binlog file.

I want to modify __connect_to_stream() to send events from the specified binlog file, not events from the latest binlog file.


I also want to improve readability of comment about some init() parameters: log_file, log_pos, resume_stream, and skip_to_timestamp, auto_position, is_mariadb.

for skip_to_timestamp, auto_position, is_mariadb: if skip_to_timestamp as true, but is_mariadb as true or auto_position as true, then skip_to_timesatmp does not work. skip_to_timestamp only works if skip_to_timestamp as true, auto_position as false, is_mariadb as false. users may expect skip_to_timestamp to work after only giving skip_to_timestamp True, actually it does not though.

for log_file and log_pos, for instance, about the same as the #1 case, users may expect __connect_to_stream() to send events from the latest binlog file, because they specified the binlog file, actually it does not though.


the #2 would be fine, but the #1 may affect users. so I opened this issue before submitting pull request.