adjusting for mysql 5.1, and fixed an option