From: drh Date: Wed, 30 Dec 2009 01:13:11 +0000 (+0000) Subject: Remove some code in the column cache that is no longer used. Replace it with X-Git-Tag: version-3.7.2~680 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=27ee406e2ca7ad7059cf58f9d4c20c04f96774ba;p=thirdparty%2Fsqlite.git Remove some code in the column cache that is no longer used. Replace it with an assert(). FossilOrigin-Name: 1f890efb7863bd743b9f6ef841e0c0c4e67d76e1 --- diff --git a/manifest b/manifest index 231c8cc716..123a46991b 100644 --- a/manifest +++ b/manifest @@ -1,8 +1,8 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -C Remove\sobsolete\scomment\stext\sfrom\sexpr.c.\s\sNo\sfunctional\scode\schanges. -D 2009-12-30T00:12:40 +C Remove\ssome\scode\sin\sthe\scolumn\scache\sthat\sis\sno\slonger\sused.\s\sReplace\sit\swith\nan\sassert(). +D 2009-12-30T01:13:12 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in c5827ead754ab32b9585487177c93bb00b9497b3 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -119,7 +119,7 @@ F src/callback.c 908f3e0172c3d4058f4ca0acd42c637c52e9669f F src/complete.c 4c8a742c4a4a6d9c835912648f5c8f032ea36c7b F src/date.c a79c0a8f219370b972e320741f995a3bef9df33f F src/delete.c 1425b44a1a8127ada4c909e8b71439354e523c24 -F src/expr.c 0fdd547d2820aa700acc39697b9a9894153a627e +F src/expr.c bdbf8714374e1bba4587e3b098b793f2de967f6f F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb F src/fkey.c e2116672a6bd610dc888e27df292ebc7999c9bb0 F src/func.c 69906340991919b4933dd8630774ad069e4d582e @@ -786,14 +786,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P 1a0e5fa9f0ff792c678c99d49960601a0cef925b -R c944cb92f9c7adb761dff8e00f68f2ab +P 84058be0beb799bc989d73a8d4cd8791ab709395 +R 17c216161af4761c513c00696c4bffa1 U drh -Z 0a9d06310e3026b788d21ad4199080c9 +Z 14cceaab32fe4018f07c09ae0e5ddbe8 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) -iD4DBQFLOpr7oxKgR168RlERAqODAJ95/X/Mz9zcgmO9ICWmC875amZZ6wCY2pxa -fInkJOmTbDkCjMKTRtPxLg== -=mePS +iD8DBQFLOqkroxKgR168RlERAvW8AJ9iX9De4j6U8UxioIbM3TFZMWN3aACcDJ37 +8lIlAKD+ufFWpQY2itcCNuc= +=T4JX -----END PGP SIGNATURE----- diff --git a/manifest.uuid b/manifest.uuid index 070746b106..8d327065f1 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -84058be0beb799bc989d73a8d4cd8791ab709395 \ No newline at end of file +1f890efb7863bd743b9f6ef841e0c0c4e67d76e1 \ No newline at end of file diff --git a/src/expr.c b/src/expr.c index f7f648f9bb..e0d13693c6 100644 --- a/src/expr.c +++ b/src/expr.c @@ -1964,8 +1964,14 @@ void sqlite3ExprCacheStore(Parse *pParse, int iTab, int iCol, int iReg){ */ if( pParse->db->flags & SQLITE_ColumnCache ) return; - /* First replace any existing entry */ + /* First replace any existing entry. + ** + ** Actually, the way the column cache is currently used, we are guaranteed + ** that the object will never already be in cache. Verify this guarantee. + */ +#ifndef NDEBUG for(i=0, p=pParse->aColCache; iiReg && p->iTable==iTab && p->iColumn==iCol ){ cacheEntryClear(pParse, p); p->iLevel = pParse->iCacheLevel; @@ -1973,7 +1979,10 @@ void sqlite3ExprCacheStore(Parse *pParse, int iTab, int iCol, int iReg){ p->lru = pParse->iCacheCnt++; return; } +#endif + assert( p->iReg==0 || p->iTable!=iTab || p->iColumn!=iCol ); } +#endif /* Find an empty slot and replace it */ for(i=0, p=pParse->aColCache; i