[daap] Fix problem where playlists in Remote are not in correct order

Apparantly having "LIMIT -1 OFFSET 0" makes (certain versions?) of
sqlite3 unable to do the "ORDER BY". Might be a bug in sqlite. This
is only a partial fix, which will work for queries that don't actually
use an index. Those few that do may still be broken.
This commit is contained in:
ejurgensen 2016-04-10 00:11:33 +02:00
parent 06663e4ca2
commit 3be8afac7b

View File

@ -638,6 +638,9 @@ get_query_params(struct evkeyvalq *query, int *sort_headers, struct query_params
else
qp->limit = (high - low) + 1;
if (qp->limit == -1 && qp->offset == 0)
qp->idx_type = I_NONE;
else
qp->idx_type = I_SUB;
qp->sort = S_NONE;