Fix segmentation problems for MySQL replay module