Fix OFFSET without LIMIT cause MySQL syntax error.