Fixes for MySQL driver