From: drh Date: Thu, 16 Apr 2009 17:45:47 +0000 (+0000) Subject: Add NEVER and ALWAYS tags to conditionals in analyze.c that always false or X-Git-Tag: version-3.6.15~235 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05800a1d176f8150323386455ec81352f209b902;p=thirdparty%2Fsqlite.git Add NEVER and ALWAYS tags to conditionals in analyze.c that always false or true. (CVS 6515) FossilOrigin-Name: fbbc80eaf3bb3726b053d1050104b4ec602eb0c1 --- diff --git a/manifest b/manifest index 148fd91a95..8576d4ae3b 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Remove\sobsolete\stest\sfrom\sbindxfer.tcl.\s\sTicket\s#3802.\s(CVS\s6514) -D 2009-04-16T16:32:21 +C Add\sNEVER\sand\sALWAYS\stags\sto\sconditionals\sin\sanalyze.c\sthat\salways\sfalse\sor\ntrue.\s(CVS\s6515) +D 2009-04-16T17:45:48 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in 583e87706abc3026960ed759aff6371faf84c211 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -97,7 +97,7 @@ F sqlite.pc.in 42b7bf0d02e08b9e77734a47798d1a55a9e0716b F sqlite3.1 6be1ad09113570e1fc8dcaff84c9b0b337db5ffc F sqlite3.pc.in ae6f59a76e862f5c561eb32a380228a02afc3cad F src/alter.c 8ab5824bde0a03dae5829f61557ab7c72757000a -F src/analyze.c 3585d1a4c480ee85b65cf0a676e05d2c29eb6bdb +F src/analyze.c e239496cfb5394ac8867f1c112905ddab8d01cd9 F src/attach.c af80fa85d391ad302c148c4e2524a2cebec64cb2 F src/auth.c c8b2ab5c8bad4bd90ed7c294694f48269162c627 F src/backup.c 0082d0e5a63f04e88faee0dff0a7d63d3e92a78d @@ -717,7 +717,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e -P 6a91ab08a55eacc77f69190e1126326f4da220af -R 369baf3204963818af80327892604069 +P b1b096171812f77082b0b63e7ab0908c82d1d8bb +R 0952d1f4e5927f390e5460b95c743282 U drh -Z e1c88429dc8f3ece8c7e4f8fd3d318cd +Z b510a4cc06b31598c0e3daf6f1c39efe diff --git a/manifest.uuid b/manifest.uuid index 684c8499bc..d38fa8eba0 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -b1b096171812f77082b0b63e7ab0908c82d1d8bb \ No newline at end of file +fbbc80eaf3bb3726b053d1050104b4ec602eb0c1 \ No newline at end of file diff --git a/src/analyze.c b/src/analyze.c index d002805b68..fd7803b783 100644 --- a/src/analyze.c +++ b/src/analyze.c @@ -11,7 +11,7 @@ ************************************************************************* ** This file contains code associated with the ANALYZE command. ** -** @(#) $Id: analyze.c,v 1.51 2009/02/28 10:47:42 danielk1977 Exp $ +** @(#) $Id: analyze.c,v 1.52 2009/04/16 17:45:48 drh Exp $ */ #ifndef SQLITE_OMIT_ANALYZE #include "sqliteInt.h" @@ -100,7 +100,7 @@ static void analyzeOneTable( int iDb; /* Index of database containing pTab */ v = sqlite3GetVdbe(pParse); - if( v==0 || pTab==0 || pTab->pIndex==0 ){ + if( v==0 || NEVER(pTab==0) || pTab->pIndex==0 ){ /* Do no analysis for tables that have no indices */ return; } @@ -300,13 +300,14 @@ void sqlite3Analyze(Parse *pParse, Token *pName1, Token *pName2){ return; } + assert( pName2!=0 || pName1==0 ); if( pName1==0 ){ /* Form 1: Analyze everything */ for(i=0; inDb; i++){ if( i==1 ) continue; /* Do not analyze the TEMP database */ analyzeDatabase(pParse, i); } - }else if( pName2==0 || pName2->n==0 ){ + }else if( pName2->n==0 ){ /* Form 2: Analyze the database or table named */ iDb = sqlite3FindDb(db, pName1); if( iDb>=0 ){