Ticket #7698: 7698-no-offset-zero.patch

File 7698-no-offset-zero.patch, 635 bytes (added by Adam Vandenberg, 16 years ago)

Patched not to emit "OFFSET 0".

  • django/db/models/sql/query.py

     
    291291                    val = self.connection.ops.no_limit_value()
    292292                    if val:
    293293                        result.append('LIMIT %d' % val)
    294                 result.append('OFFSET %d' % self.low_mark)
     294                if self.low_mark != 0:
     295                    result.append('OFFSET %d' % self.low_mark)
    295296
    296297        params.extend(self.extra_params)
    297298        return ' '.join(result), tuple(params)
Back to Top