you can also copy the reconnect code from history_schema.cxx.
if I remember right, the test case for correct reconnect is to start the mlogger,
have it write something to mysql, then restart mysqld (mlogger connection is now
broken), then have mlogger write some more to mysql. it should get an error
"connection broken", reconnect and retry the write.
(to avoid it getting stuck, there should be a limit of 10 attempts to reconnect
plus retry, in case each retry crashes mysqld or throws an unrelated error).
the code in question I think is mlogger mysql supoprt for begin and end of run,
so you start a run, restart mysqld, stop the run, start a new run and should see
a successful reconnect.
K.O. |