]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix a bug in the whereRangeSkipScanEst() procedure (added by
authordrh <drh@noemail.net>
Thu, 24 Jul 2014 22:41:20 +0000 (22:41 +0000)
committerdrh <drh@noemail.net>
Thu, 24 Jul 2014 22:41:20 +0000 (22:41 +0000)
check-in [d09ca6d5efad3e4cfa]) where it fails to consider the possibility
of a ROWID column when computing the affinity of a table column.

FossilOrigin-Name: 6aea2258dd7d3967900cefe4cd0af48a7ee7e169

manifest
manifest.uuid
src/where.c

index c9c66de972c22693a9b618eedcf7b6383473fb60..87c15adf11b1eadff21645498a715fb1e6d398d5 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\sthe\sreadfile(FILENAME)\sand\swritefile(FILENAME,CONTENT)\sSQL\sfunctions\sto\nthe\scommand-line\sshell.
-D 2014-07-24T12:39:59.049
+C Fix\sa\sbug\sin\sthe\swhereRangeSkipScanEst()\sprocedure\s(added\sby\ncheck-in\s[d09ca6d5efad3e4cfa])\swhere\sit\sfails\sto\sconsider\sthe\spossibility\nof\sa\sROWID\scolumn\swhen\scomputing\sthe\saffinity\sof\sa\stable\scolumn.
+D 2014-07-24T22:41:20.186
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 5eb79e334a5de69c87740edd56af6527dd219308
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -296,7 +296,7 @@ F src/vtab.c 21b932841e51ebd7d075e2d0ad1415dce8d2d5fd
 F src/wal.c 264df50a1b33124130b23180ded2e2c5663c652a
 F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
 F src/walker.c 11edb74d587bc87b33ca96a5173e3ec1b8389e45
-F src/where.c 9454af8e5e18d6e91e5169eadfb61878e2cb42b1
+F src/where.c 4dfcd80380d154be434c4b51e890e17ce9754b3e
 F src/whereInt.h 929c1349b5355fd44f22cee5c14d72b3329c58a6
 F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
@@ -1184,7 +1184,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P f8f79f28785db716b10c3bc9d6652b98253fd125
-R 3cb7c1591be4171f813333f040f9142c
+P fb1048cb2b613a0dbfe625a5df05e9dcd736a433
+R 7154486a7ce11d45d2aed19cdac8eb64
 U drh
-Z d6bf09c8f21a2381ecdf6b5a91f85057
+Z 3de5689fcbb67ba500bf3c297659c386
index c704a64b44925d6691f5df80ab4d249f103166c9..8f811c9bc6c8c853abd82fd719d610ab78d3e963 100644 (file)
@@ -1 +1 @@
-fb1048cb2b613a0dbfe625a5df05e9dcd736a433
\ No newline at end of file
+6aea2258dd7d3967900cefe4cd0af48a7ee7e169
\ No newline at end of file
index 3901dd468f48f961441df9ca2b726f3031b8f915..38d1014ac01207d41433d3b5a7361c2ab1351432 100644 (file)
@@ -2047,7 +2047,8 @@ static int whereRangeSkipScanEst(
   int nLower = -1;
   int nUpper = p->nSample+1;
   int rc = SQLITE_OK;
-  u8 aff = p->pTable->aCol[ p->aiColumn[nEq] ].affinity;
+  int iCol = p->aiColumn[nEq];
+  u8 aff = iCol>=0 ? p->pTable->aCol[iCol].affinity : SQLITE_AFF_INTEGER;
   CollSeq *pColl;
   
   sqlite3_value *p1 = 0;          /* Value extracted from pLower */