SortedType vs LIMIT in MySQL

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
SergYar
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 18.06.2010, 08:27

SortedType vs LIMIT in MySQL

Post 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?
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
Image
Post Reply