diff options
author | danielk1977 <danielk1977@noemail.net> | 2009-02-24 10:14:40 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2009-02-24 10:14:40 +0000 |
commit | 2d2e7bd32e7267bd9fe9c40a0b5c97cace2bd17e (patch) | |
tree | be7e86a13b3a10703fb1d45fe1cb7eaa32da7a9d | |
parent | a55331620e1162c2fef1fee80f0866cc0e379f46 (diff) | |
download | sqlite-2d2e7bd32e7267bd9fe9c40a0b5c97cace2bd17e.tar.gz sqlite-2d2e7bd32e7267bd9fe9c40a0b5c97cace2bd17e.zip |
Reverse commit (6315) for now. (CVS 6317)
FossilOrigin-Name: 0e7c369c23a8767b4d3e5cdd47c14716992fb71a
-rw-r--r-- | manifest | 22 | ||||
-rw-r--r-- | manifest.uuid | 2 | ||||
-rw-r--r-- | src/delete.c | 3 | ||||
-rw-r--r-- | src/expr.c | 3 | ||||
-rw-r--r-- | src/resolve.c | 20 | ||||
-rw-r--r-- | src/sqliteInt.h | 3 | ||||
-rw-r--r-- | src/update.c | 3 | ||||
-rw-r--r-- | src/where.c | 17 |
8 files changed, 25 insertions, 48 deletions
@@ -1,5 +1,5 @@ -C Optimize\squeries\sof\sthe\sform\s"SELECT\scount(*)\sFROM\s<tbl>"\sby\sadding\sa\ssqlite3BtreeCount()\sinterface\sto\sthe\sbtree\slayer.\s(CVS\s6316) -D 2009-02-24T10:01:52 +C Reverse\scommit\s(6315)\sfor\snow.\s(CVS\s6317) +D 2009-02-24T10:14:40 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in d64baddbf55cdf33ff030e14da837324711a4ef7 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -110,8 +110,8 @@ F src/build.c a1db48aec62c95049d783f231195812ff97ae268 F src/callback.c 5f10bca853e59a2c272bbfd5b720303f8b69e520 F src/complete.c cb14e06dbe79dee031031f0d9e686ff306afe07c F src/date.c 0d804df3bbda46329946a01ff5c75c3f4f135218 -F src/delete.c 06e78b6eb53f27acc809a0f69178ea719748bb42 -F src/expr.c 97545fa4058f86c67eb7cacadf60d2964300b00c +F src/delete.c 61179b19751ecc5deeecd3f758ed1ae6d8f3362e +F src/expr.c 46e24f9a71e7bdd2573a790ba2f98b7c3f617d04 F src/fault.c dc88c821842157460750d2d61a8a8b4197d047ff F src/func.c de2eed7d96365210faecda877c5a12cf440bdf42 F src/global.c 448419c44ce0701104c2121b0e06919b44514c0c @@ -152,13 +152,13 @@ F src/pragma.c 22ed04836aab8ce134c53be1ca896f3ad20fabdb F src/prepare.c d0bbb4b1a8b9c1db6d13788929839bb63764680e F src/printf.c 9866a9a9c4a90f6d4147407f373df3fd5d5f9b6f F src/random.c 676b9d7ac820fe81e6fb2394ac8c10cff7f38628 -F src/resolve.c 60a5f405540debee767d8c21ab78a5210b174fa2 +F src/resolve.c dea005135845acbbfae1f2968c0deb6b2e3d580c F src/rowset.c ba9375f37053d422dd76965a9c370a13b6e1aac4 F src/select.c 474557a5e4388c347f055c6759da1a7a4fc01e32 F src/shell.c f109ebbb50132926ebbc173a6c2d8838d5d78527 F src/sqlite.h.in 14f4d065bafed8500ea558a75a8e2be89c784d61 F src/sqlite3ext.h 1db7d63ab5de4b3e6b83dd03d1a4e64fef6d2a17 -F src/sqliteInt.h b294711ad509e356aa75da9ef12334c19d86f64a +F src/sqliteInt.h e717d30828600865b8f74456fd461e6a52ead6df F src/sqliteLimit.h ffe93f5a0c4e7bd13e70cd7bf84cfb5c3465f45d F src/status.c 237b193efae0cf6ac3f0817a208de6c6c6ef6d76 F src/table.c 332ab0ea691e63862e2a8bdfe2c0617ee61062a3 @@ -195,7 +195,7 @@ F src/test_thread.c adb9175c466e1f487295b5b957603fc0a88ea293 F src/test_wsd.c c297d7d6b8a990239e1bd25935e81d612d8ae31d F src/tokenize.c 6987fb7f0d6a87ac53499aee568cabb05eb4bea8 F src/trigger.c 9957e16e5445478f2cc60e26ac1bc836bb18d21a -F src/update.c 9c11bc0bba520bcfce47e229a7235a9bc5f9121a +F src/update.c 87158a2308173487f9f7e19ef877edc860def462 F src/utf.c 1da9c832dba0fa8f865b5b902d93f420a1ee4245 F src/util.c 1363f64351f3b544790f3c523439354c02f8c4e9 F src/vacuum.c 4929a585ef0fb1dfaf46302f8a9c4aa30c2d9cf5 @@ -208,7 +208,7 @@ F src/vdbeblob.c 08d6bac666c1f6a5d67452f5fbf808cf1311d2c9 F src/vdbemem.c 543a79d722734d2f8b7ad70f08218c30bcc5bbf5 F src/vtab.c e39e011d7443a8d574b1b9cde207a35522e6df43 F src/walker.c 42bd3f00ca2ef5ae842304ec0d59903ef051412d -F src/where.c 591db2b9bc4d65b60ab28554eb40dc357358c47a +F src/where.c ddc9074b1605fa7a8c1a0309872750e6c4b85e0c F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2 F test/alias.test 597662c5d777a122f9a3df0047ea5c5bd383a911 F test/all.test 14165b3e32715b700b5f0cbf8f6e3833dda0be45 @@ -701,7 +701,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e -P 294ba6f743c9132dce0e73da480bd3c2071e7239 -R 524bbf1793d6465eb6ab93cdb258f1df +P d4aa6593183224b6868a322511511c0bbf63b598 +R b3564712467a40fda442fb8ac57c5565 U danielk1977 -Z cbf078ee778e00d0fbc4a96fcd97b1a6 +Z 82d1200daf27b985fd03c599faf3c6c4 diff --git a/manifest.uuid b/manifest.uuid index 57bcdcee8..b68d63ebb 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -d4aa6593183224b6868a322511511c0bbf63b598
\ No newline at end of file +0e7c369c23a8767b4d3e5cdd47c14716992fb71a
\ No newline at end of file diff --git a/src/delete.c b/src/delete.c index b70352c87..62449a63d 100644 --- a/src/delete.c +++ b/src/delete.c @@ -12,7 +12,7 @@ ** This file contains C code routines that are called by the parser ** in order to generate code for DELETE FROM statements. ** -** $Id: delete.c,v 1.194 2009/02/23 17:33:50 danielk1977 Exp $ +** $Id: delete.c,v 1.195 2009/02/24 10:14:40 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -395,7 +395,6 @@ void sqlite3DeleteFrom( /* Collect rowids of every row to be deleted. */ sqlite3VdbeAddOp2(v, OP_Null, 0, iRowSet); - pTabList->a[0].usesRowid = 1; pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, 0, WHERE_FILL_ROWSET, iRowSet); if( pWInfo==0 ) goto delete_from_cleanup; diff --git a/src/expr.c b/src/expr.c index 4b92d6c0f..ee3a26219 100644 --- a/src/expr.c +++ b/src/expr.c @@ -12,7 +12,7 @@ ** This file contains routines used for analyzing expressions and ** for generating VDBE code that evaluates expressions in SQLite. ** -** $Id: expr.c,v 1.415 2009/02/23 17:33:50 danielk1977 Exp $ +** $Id: expr.c,v 1.416 2009/02/24 10:14:40 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -931,7 +931,6 @@ SrcList *sqlite3SrcListDup(sqlite3 *db, SrcList *p, int flags){ pNewItem->pOn = sqlite3ExprDup(db, pOldItem->pOn, flags); pNewItem->pUsing = sqlite3IdListDup(db, pOldItem->pUsing); pNewItem->colUsed = pOldItem->colUsed; - pNewItem->usesRowid = pOldItem->usesRowid; } return pNew; } diff --git a/src/resolve.c b/src/resolve.c index 29f1f2b92..749e473d4 100644 --- a/src/resolve.c +++ b/src/resolve.c @@ -14,7 +14,7 @@ ** resolve all identifiers by associating them with a particular ** table and column. ** -** $Id: resolve.c,v 1.17 2009/02/23 17:33:50 danielk1977 Exp $ +** $Id: resolve.c,v 1.18 2009/02/24 10:14:40 danielk1977 Exp $ */ #include "sqliteInt.h" #include <stdlib.h> @@ -347,18 +347,14 @@ static int lookupName( ** column number is greater than the number of bits in the bitmask ** then set the high-order bit of the bitmask. */ - if( pMatch ){ - if( pExpr->iColumn>=0 ){ - int n = pExpr->iColumn; - testcase( n==BMS-1 ); - if( n>=BMS ){ - n = BMS-1; - } - assert( pMatch->iCursor==pExpr->iTable ); - pMatch->colUsed |= ((Bitmask)1)<<n; - }else{ - pMatch->usesRowid = 1; + if( pExpr->iColumn>=0 && pMatch!=0 ){ + int n = pExpr->iColumn; + testcase( n==BMS-1 ); + if( n>=BMS ){ + n = BMS-1; } + assert( pMatch->iCursor==pExpr->iTable ); + pMatch->colUsed |= ((Bitmask)1)<<n; } lookupname_end: diff --git a/src/sqliteInt.h b/src/sqliteInt.h index f4ee45a50..429346d29 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -11,7 +11,7 @@ ************************************************************************* ** Internal interface definitions for SQLite. ** -** @(#) $Id: sqliteInt.h,v 1.837 2009/02/24 10:01:52 danielk1977 Exp $ +** @(#) $Id: sqliteInt.h,v 1.838 2009/02/24 10:14:40 danielk1977 Exp $ */ #ifndef _SQLITEINT_H_ #define _SQLITEINT_H_ @@ -1602,7 +1602,6 @@ struct SrcList { u8 isPopulated; /* Temporary table associated with SELECT is populated */ u8 jointype; /* Type of join between this able and the previous */ u8 notIndexed; /* True if there is a NOT INDEXED clause */ - u8 usesRowid; /* True if the rowid field is read */ int iCursor; /* The VDBE cursor number used to access this table */ Expr *pOn; /* The ON clause of a join */ IdList *pUsing; /* The USING clause of a join */ diff --git a/src/update.c b/src/update.c index 8cfbf3a98..b377ee98c 100644 --- a/src/update.c +++ b/src/update.c @@ -12,7 +12,7 @@ ** This file contains C code routines that are called by the parser ** to handle UPDATE statements. ** -** $Id: update.c,v 1.194 2009/02/23 17:33:50 danielk1977 Exp $ +** $Id: update.c,v 1.195 2009/02/24 10:14:40 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -343,7 +343,6 @@ void sqlite3Update( /* Begin the database scan */ sqlite3VdbeAddOp2(v, OP_Null, 0, regOldRowid); - pTabList->a[0].usesRowid = 1; pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, 0, WHERE_ONEPASS_DESIRED, 0); if( pWInfo==0 ) goto update_cleanup; diff --git a/src/where.c b/src/where.c index e76fc11cb..06eb5f99d 100644 --- a/src/where.c +++ b/src/where.c @@ -16,7 +16,7 @@ ** so is applicable. Because this module is responsible for selecting ** indices, you might also think of this module as the "query optimizer". ** -** $Id: where.c,v 1.372 2009/02/23 17:33:50 danielk1977 Exp $ +** $Id: where.c,v 1.373 2009/02/24 10:14:40 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -2035,21 +2035,6 @@ static void bestIndex( } } - if( pCost->plan.wsFlags==0 && pSrc->colUsed==0 && pSrc->usesRowid==0 ){ - Index *pSmallest = 0; - assert( pSrc->pIndex==0 ); - for(pProbe=pSrc->pTab->pIndex; pProbe; pProbe=pProbe->pNext){ - if( !pSmallest || pProbe->nColumn<pSmallest->nColumn ){ - pSmallest = pProbe; - } - } - if( pSmallest && pSmallest->nColumn<pSrc->pTab->nCol ){ - assert( pCost->plan.nEq==0 ); - pCost->plan.u.pIdx = pSmallest; - pCost->plan.wsFlags = WHERE_COLUMN_RANGE|WHERE_IDX_ONLY; - } - } - /* Report the best result */ pCost->plan.wsFlags |= eqTermMask; |