PCT-637: Query Analytics does not handle MySQL Restart

WIP