Our storage engine writes binlog ourself to get better performance, using a
background thread. Recently I got a bug. When shut down MySQL server, after MySQL had
cleaned up the binlog resources, our binlog thread was still working and
got into trouble.
Now I want to wait for this thread to exit before MySQL cleans up binlog resources.In
function 'cleanup()' (mysqld.cc:1295, MySQL5.1.49), I found 'ha_binlog_end()' interface
can do this work.But it is defined as empty macro except the 'HAVE_NDB_BINLOG' macro is
If I implement the ''ha_binlog_end()' interface like NDB, 'binlog_func' interface
of handlerton can be calledcorrectly and my problem is solved. But I don't want to
modify codes in handler.cc and handler.h.
I feel this interface hasn't completely open to storage engine. I mean storage
engine needn't modify the codes of MySQL internal to fit requirements
Can future version or patch solve this problem? Provide a way to let 'binlog_func'
interface of handlertonbe called before MySQL cleans up binlog resources.
Sorry for my poor English. I don't know if I have explained the problem clearly.
Really looking forward to your reply. Thanks!