Fix MySQL compatibility bug