]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Clear the sort-order flags on the KeyInfo object associated with the
authordrh <drh@noemail.net>
Sat, 22 Mar 2014 02:19:53 +0000 (02:19 +0000)
committerdrh <drh@noemail.net>
Sat, 22 Mar 2014 02:19:53 +0000 (02:19 +0000)
OP_Compare/OP_Jump of the block-sort logic, in order to make the OP_Jump
fully testable.

FossilOrigin-Name: 9b2838f23e5f52369eeb078f60bd231cc54362f8

manifest
manifest.uuid
src/select.c

index 4300f5a3d4d35d12a26d23dd5613262051cb08a7..8802b6c3e7b9e39200ee03a7aab1714494b2e56e 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Increase\sthe\sversion\snumber\sto\s3.8.5.
-D 2014-03-22T01:52:17.580
+C Clear\sthe\ssort-order\sflags\son\sthe\sKeyInfo\sobject\sassociated\swith\sthe\nOP_Compare/OP_Jump\sof\sthe\sblock-sort\slogic,\sin\sorder\sto\smake\sthe\sOP_Jump\nfully\stestable.
+D 2014-03-22T02:19:53.523
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 2ef13430cd359f7b361bb863504e227b25cc7f81
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -217,7 +217,7 @@ F src/printf.c e5a0005f8b3de21f85da6a709d2fbee76775bf4b
 F src/random.c d10c1f85b6709ca97278428fd5db5bbb9c74eece
 F src/resolve.c 273d5f47c4e2c05b2d3d2bffeda939551ab59e66
 F src/rowset.c 64655f1a627c9c212d9ab497899e7424a34222e0
-F src/select.c 89bfc2228c6dda5200040d3c61a67a7fc815a24e
+F src/select.c 269c3e31a450fce642a10569221a49180348c88e
 F src/shell.c cee9f46f2688a261601b1fd3d7f4b3cddf9b5cdf
 F src/sqlite.h.in a2ef671f92747a5a1c8a47bad5c585a8dd9eca80
 F src/sqlite3.rc 11094cc6a157a028b301a9f06b3d03089ea37c3e
@@ -1157,7 +1157,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
 F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
-P c36f74611cf17ad2ff198a2ac2054d7ab451a72c
-R c87966e812e5349386ca47468f11243f
+P 9760879d086b61476890927f01806a93798d4eee
+R 9c4612b02334319090d26af6339ff92f
 U drh
-Z 4135b8e90212e093f926ac90192216e8
+Z c09bf15737bf88995e1679f9f666a1a6
index 4af93967f6df41dcec03324f653779a09c15347f..f209cb2ae6517d25d4bd2ffe9f75f145163f123b 100644 (file)
@@ -1 +1 @@
-9760879d086b61476890927f01806a93798d4eee
\ No newline at end of file
+9b2838f23e5f52369eeb078f60bd231cc54362f8
\ No newline at end of file
index 77ca0de8cc3de51b8f5ec34a77739157910ebf64..c7f0b24a4a5299280659ae4753677808e8937292 100644 (file)
@@ -481,6 +481,7 @@ static void pushOntoSorter(
     int addrJmp;      /* Address of the OP_Jump opcode */
     VdbeOp *pOp;      /* Opcode that opens the sorter */
     int nKey;         /* Number of sorting key columns, including OP_Sequence */
+    KeyInfo *pKI;     /* Original KeyInfo on the sorter table */
 
     regPrevKey = pParse->nMem+1;
     pParse->nMem += pSort->nOBSat;
@@ -490,7 +491,9 @@ static void pushOntoSorter(
     pOp = sqlite3VdbeGetOp(v, pSort->addrSortIndex);
     if( pParse->db->mallocFailed ) return;
     pOp->p2 = nKey + 1;
-    sqlite3VdbeChangeP4(v, -1, (char*)pOp->p4.pKeyInfo, P4_KEYINFO);
+    pKI = pOp->p4.pKeyInfo;
+    memset(pKI->aSortOrder, 0, pKI->nField); /* Makes OP_Jump below testable */
+    sqlite3VdbeChangeP4(v, -1, (char*)pKI, P4_KEYINFO);
     pOp->p4.pKeyInfo = keyInfoFromExprList(pParse, pSort->pOrderBy, nOBSat, 1);
     addrJmp = sqlite3VdbeCurrentAddr(v);
     sqlite3VdbeAddOp3(v, OP_Jump, addrJmp+1, 0, addrJmp+1); VdbeCoverage(v);