completed the dialect for mysql.
completed the dialect for mysql, and do some re-factory for the original code.