logfile reset

51 views
Skip to first unread message

Lior Sion

unread,
May 29, 2013, 1:11:39 AM5/29/13
to python-mysql...@googlegroups.com
Hi,

So, an interesting case just happened to me on test: my laptop rebooted.

I was using the latest code with the new persistent layer and it worked - accidentally before the boot I looked at the data nad it was correct - log file and number.

After the reset (mysql is local on my machine) - it seems the data reseted on the server:

show master status;

'mysql-bin.000001', '147', 'test_db,evme,mysql_replication_test,pymysqlreplication_test', '', ''

obviously there's an exception trying to use the old log file and log number.

So, to the point:

1. Do you know if this is normal mysql master behavior?
2. Should we not better prepare for it on the library? For now it throws an InternalError with code 1236, which is the general, the only way to differentiate is on the error message itself - that doesn't sound right.

Also obviously, since the only way to recover is just go "full sync" (no file not location) - should we allow to automatically do it?

Julien Duponchelle

unread,
May 29, 2013, 3:29:41 PM5/29/13
to Lior Sion, python-mysql...@googlegroups.com
Hmm  for me it should append in rare cases. But by default it's possible:

But you are right the library should be more error proof if logfile is missing. I'm not a big fan of the automatic way but i didn't see a correct way to handle the disparition of a log file.


Reply all
Reply to author
Forward
0 new messages