Update for compatability with newer MySQL versions