* fix a bug for sql.