• unknown's avatar
    Bug#6298 (LIMIT #, -1 no longer works to set start with no end limit) · 5001bd06
    unknown authored
    With MySQL 3.23 and 4.0, the syntax 'LIMIT N, -1' is accepted, and returns
    all the rows located after row N. This behavior, however, is not the
    intended result, and defeats the purpose of LIMIT, which is to constrain
    the size of a result set.
    
    With MySQL 4.1 and later, this construct is correctly detected as a syntax
    error.
    
    This fix does not change the production code, and only adds a new test case
    to improve test coverage in this area, to enforce in the test suite the
    intended behavior.
    
    
    mysql-test/r/select.result:
      Enforce that LIMIT N, -1 is illegal.
    mysql-test/t/select.test:
      Enforce that LIMIT N, -1 is illegal.
    5001bd06
select.test 155 KB