Hi! On Mon, Apr 25, 2016 at 1:18 PM, Kristian Nielsen <knielsen@knielsen-hq.org> wrote:
Michael Widenius <michael.widenius@gmail.com> writes:
2. To protect access to master_info_index, eg. to prevent a Master_info from disappearing while it is accessed.
When reading about this, I think it would be better to have a counter in Master_info if someone is using it and only delete if if the counter is zero. Would be trivial to add an increment of the counter in get_master_info().
The counter could either be protected by the LOCK_active_mi or one of the mutexes in Master_info like data_lock.
Sounds reasonable. Will you do a patch? I guess this is code from the multisource feature, so you are the one familiar with it (before multi-source, the Master_info could not be created and deleted dynamically, could it?)
I can start by doing a patch for protecting get_master_info. Will do that tomorrow. Regards, Monty