]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Remove a redundant test case (probably a copy/paste error). Add an assert()
authordrh <drh@noemail.net>
Sat, 22 Nov 2014 12:22:13 +0000 (12:22 +0000)
committerdrh <drh@noemail.net>
Sat, 22 Nov 2014 12:22:13 +0000 (12:22 +0000)
to where.c to ensure that automatic indexes do not have there output row
counts adjusted downward by supplementary constraints.

FossilOrigin-Name: eea47933493c85a85247ad383bd148b06f627d04

manifest
manifest.uuid
src/where.c
test/autoindex2.test

index 3722a0fbacdb50af74dada485ebfb5753d1f1034..1536469c1185e973b394493d605594dde6473e36 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\stypo\sin\sa\srequirements\smark\son\sthe\sabs()\sSQL\sfunction.
-D 2014-11-20T23:21:23.554
+C Remove\sa\sredundant\stest\scase\s(probably\sa\scopy/paste\serror).\s\sAdd\san\sassert()\nto\swhere.c\sto\sensure\sthat\sautomatic\sindexes\sdo\snot\shave\sthere\soutput\srow\s\ncounts\sadjusted\sdownward\sby\ssupplementary\sconstraints.
+D 2014-11-22T12:22:13.640
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in a226317fdf3f4c895fb3cfedc355b4d0868ce1fb
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -304,7 +304,7 @@ F src/vtab.c 2a30791bbd7926b589401bd09c3abb33de563793
 F src/wal.c 486e644b3b8aa5ad066f625bc428aa8ff7001405
 F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
 F src/walker.c c253b95b4ee44b21c406e2a1052636c31ea27804
-F src/where.c e275cb74731a3351a9da6ba8280bd5054db6192d
+F src/where.c 13a9920431358fc4885b31fe13a893d98f813a74
 F src/whereInt.h d3633e9b592103241b74b0ec76185f3e5b8b62e0
 F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
@@ -346,7 +346,7 @@ F test/auth2.test 264c6af53cad9aba5218c68bbe18036e39007bfa
 F test/auth3.test 5cfa94ed90c6617c42b7ba4b133fd79678b251c7
 F test/autoinc.test c58912526998a39e11f66b533e23cfabea7f25b7
 F test/autoindex1.test 6ff78b94f43a59616c06c11c55b12935173506d7
-F test/autoindex2.test 60d2fc6f38364308ce73a9beb01b47ded38697de
+F test/autoindex2.test af7e595c6864cc6ef5fc38d5db579a3e34940cb8
 F test/autoindex3.test a3be0d1a53a7d2edff208a5e442312957047e972
 F test/autoindex4.test fc807f9efd158bec60f5dfdf34ebe46fb274612d
 F test/autovacuum.test 941892505d2c0f410a0cb5970dfa1c7c4e5f6e74
@@ -1221,7 +1221,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 332cc9591d05508ac9cb56fde2b82e20e0342d1f
-R 5693b17271f5aafc5aa0ee222d419f56
+P b1e6c02f8b9a2afaa12ac15a33e3f698c3be27d6
+R e5e0eb3b1af9c334c014cb61507da7b4
 U drh
-Z 26e3a9a90b782d10bf5cba52cec231a6
+Z 8955433275197ef8c0924c06e567755e
index 2d35c62379553671deca100a3b220fa948b14c03..070039fabe5f3a4ea3a4179e4c8cc5451910a230 100644 (file)
@@ -1 +1 @@
-b1e6c02f8b9a2afaa12ac15a33e3f698c3be27d6
\ No newline at end of file
+eea47933493c85a85247ad383bd148b06f627d04
\ No newline at end of file
index 8c9ce38889882b9a0d973d08d450287606063710..6dd47816c3e70d69528e3258eca8488e33d52c5a 100644 (file)
@@ -4306,6 +4306,7 @@ static void whereLoopOutputAdjust(
   int i, j;
   int nEq = 0;    /* Number of = constraints not within likely()/unlikely() */
 
+  assert( (pLoop->wsFlags & WHERE_AUTO_INDEX)==0 );
   for(i=pWC->nTerm, pTerm=pWC->a; i>0; i--, pTerm++){
     if( (pTerm->wtFlags & TERM_VIRTUAL)!=0 ) break;
     if( (pTerm->prereqAll & pLoop->maskSelf)==0 ) continue;
index f4da416745ce33b04dcebd47416bfb19ec3bd4c3..c8abdf410a2628c5fd571e8fea5a803a21cbf213 100644 (file)
@@ -224,48 +224,4 @@ do_execsql_test autoindex2-120 {
 # on t3 and reordering the tables so that t3 was in the outer loop and
 # implementing the ORDER BY clause using a B-Tree.
 
-do_execsql_test autoindex2-120 {
-  EXPLAIN QUERY PLAN
-  SELECT
-     t1_id,
-     t1.did,
-     param2,
-     param3,
-     t1.ptime,
-     t1.trange,
-     t1.exmass,
-     t1.mass,
-     t1.vstatus,
-     type,
-     subtype,
-     t1.deviation,
-     t1.formula,
-     dparam1,
-     reserve1,
-     reserve2,
-     param4,
-     t1.last_operation,
-     t1.admin_uuid,
-     t1.previous_value,
-     t1.job_id,
-     client_did, 
-     t1.last_t1,
-     t1.data_t1,
-     t1.previous_date,
-     param5,
-     param6,
-     mgr_uuid
-  FROM
-     t3,
-     t2,
-     t1
-  WHERE
-     t1.ptime > 1393520400
-     AND param3<>9001
-     AND t3.flg7 = 1
-     AND t1.did = t2.did
-     AND t2.uid = t3.uid
-  ORDER BY t1.ptime desc LIMIT 500;
-} {0 0 2 {SEARCH TABLE t1 USING INDEX t1x1 (ptime>?)} 0 1 1 {SEARCH TABLE t2 USING INDEX t2x0 (did=?)} 0 2 0 {SEARCH TABLE t3 USING INDEX t3x0 (uid=?)}}
-
 finish_test