﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
350	"""offset"" keyword does not work on MySQL 3.x"	ronan@…	Adrian Holovaty	"When you use the Django API to query your data using the {{{get_items(offset=X)}}} style call, the SQL that is generated seems to be in Postgres style that is only recently supported in MySQL (4.x and later, as far as I can tell.) The SQL generated is something like the following:

{{{
SELECT ... ORDER BY ... DESC LIMIT 5 OFFSET 4
}}}

On MySQL 3.x this gives the following error:

{{{
""You have an error in your SQL syntax near 'OFFSET 4 '""
}}}

It works fine on my 4.1. 

As far as I can tell from the MySQL manual, there is an alternate form of query that should work on all versions of MySQL. Here's the relevant snippet from the SELECT format:

{{{
 [LIMIT {[offset,] row_count | row_count OFFSET offset}]
}}}

Since 3.23 is the default MySQL version for Fedora Core etc, this could affect quite a few people."	defect	closed	Database layer (models, ORM)		major	fixed	mysql database offset		Unreviewed	0	0	0	0	0	0
