Index: mysql-5.7.4-m14/mysys/thr_mutex.c =================================================================== --- mysql-5.7.4-m14.orig/mysys/thr_mutex.c +++ mysql-5.7.4-m14/mysys/thr_mutex.c @@ -333,12 +333,15 @@ void safe_mutex_end(FILE *file __attribu ulong mutex_delay(ulong delayloops) { ulong i; - volatile ulong j; + ulong j; j = 0; for (i = 0; i < delayloops * 50; i++) + { j += i; + asm volatile("":::"memory"); + } return(j); }