Fixes a MySQL syntax error if you specified an offset without a limit.
Merge pull request #3125 from takobell/master

Fixes a MySQL syntax error if you specified an offset without a limit.