Page 1 of 1

SortedType vs LIMIT in MySQL

Posted: 18.06.2010, 09:09
by SergYar
tab:
Val
1
2
3
4
5
6
7
8
9
10
Query:
SELECT Val
FROM tab
ORDER BY Val DESC
LIMIT 5,5

Result in 6.5.1(good!):
Val
5
4
3
2
1
Result in 6.6.6( wrong! ):
Val
10
9
8
7
6
New property SortedType =>
1.Transofrm query:
SELECT Val
FROM tab
ORDER BY Val
LIMIT 5,5
( DESC is absent)

2. SortedType = stDescending => local sorting.

But I need all query sort and 2nd page.
How can I get it?

Posted: 29.08.2010, 20:51
by mdaems
As far as I know the same rows should be returned from the server using 6.5.1 and 6.6.6. The SortedType shouldn't be used at all.
The only exception would be when zeoslib strips parts from the query.
Can you please use the TZSQLMonitor to see if the correct query is sent to the server?

Mark