﻿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
16290	slicing in subquery on MySQL DB	anonymous	nobody	"When I do slicing on a query, and the use that result as a subquery I get the following error, when using MySQL:

""This version of MySQL doesn't yet support'LIMIT & IN/ALL/ANY/SOME subquery'""

{{{
objects = Model.objects.filter(key=value).values_list('id', flat=True)[:4]
Model.objects.filter(id!__in=objects)
}}}

Of course this example makes no sense.
But the workaround I did, was to force django to evaluate the first query, and then use the result as input for the next. Maybe this should be the default, since MySQL doesn't support the action. Or atleast Django should explain the solution of forcing evaluating, and the slowdowns, that might have.(Have no idea if that's the case.)

"	Bug	closed	Database layer (models, ORM)	1.3	Normal	invalid			Unreviewed	0	0	0	0	0	0
