Overview
Artifact ID: | ac59934affe37dbeae2b4c9bea93c601d218aeb6 |
---|---|
Ticket: | f97c4637102a3ae72b7911167e1d4da12ce60722
Incorrect ordering with ORDER BY and LIMIT |
User & Date: | drh 2015-01-20 18:11:18 |
Changes
- icomment:
The problem was introduced by the sqlite3VdbeRecordCompare() optimizations on 2014-03-04 checkin [3325ad5bdc2f81f63b55] (version 3.8.4). The KeyInfo.nXField value was not always accurate for emphemeral tables and so the sqlite3VdbeFindCompare() function might return one of the short-circuit comparison routines when in fact the generalized comparison routine was required. The problem became more acute with the introduction of multi-threaded sorting on on 2014-09-01 checkin [b1c0f0bc1bd8a347] (version 3.8.7) because the new sorter creates tables with lots of extra fields after the key. The problem is fixed for version 3.8.8.1 by ensuring that the KeyInfo.nXField is set correctly. Two new assert() statements are added to verify correct KeyInfo.nXField values moving forward.
- login: "drh"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Fixed"