MDEV-33046 race condition in InnoDB dict_stats_schedule()
it can be invoked with ms=0. In that case dict_stats_func is invoked immediately, it calls dict_stats_process_entry_from_recalc_pool() which at the end might try to call dict_stats_schedule() again to queue another recalc. And it can happen that the first dict_stats_schedule(0) call didn't release dict_stats_mutex yet, so the second dict_stats_schedule() won't queue a recalc. And as a result the table won't have its stats recalculated at all, not now, not later. This causes innodb.innodb_stats_auto_recalc to fail sporadically. This commit doesn't fix it but makes it less likely to occur which happens to be enough for the test to pass. Proper fix is coming soon.
Showing
Please register or sign in to comment