fix some sql bug in dbutil