Work around MySQL bug in LIMIT placeholder parameters