From: drh Date: Tue, 3 Feb 2009 15:39:01 +0000 (+0000) Subject: Remove the text of the sqlite3VdbeMemSanity() routine, which was already X-Git-Tag: version-3.6.15~512 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b9421af6f332355530302c29748a32fa874e185;p=thirdparty%2Fsqlite.git Remove the text of the sqlite3VdbeMemSanity() routine, which was already commented out. (CVS 6238) FossilOrigin-Name: a3c260772bda68007b73feee6612495a704c84f5 --- diff --git a/manifest b/manifest index 0438dfabb7..88a8bfb7b2 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Check\sat\sthe\swrite()\scall\sto\swork\saround\sthe\smsdos\sbug\sin\sOSX\sactually\nsucceeds\sand\sthrow\san\serror\sif\sit\sdoes\snot.\s\s#ifdef\sout\sthe\swork-around\nfor\sall\splatforms\sother\sthan\sOSX.\s\sTicket\s#3633.\s(CVS\s6237) -D 2009-02-03T15:27:02 +C Remove\sthe\stext\sof\sthe\ssqlite3VdbeMemSanity()\sroutine,\swhich\swas\salready\ncommented\sout.\s(CVS\s6238) +D 2009-02-03T15:39:01 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in 3871d308188cefcb7c5ab20da4c7b6aad023bc52 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -200,11 +200,11 @@ F src/util.c f1ac1bcd3ec5e3300982031504659b6f9435de33 F src/vacuum.c b78c2bfdefc1b1d9aa5d82d57c333c5fde7be5a6 F src/vdbe.c 81120d5a5ba2d93eb7d7f66e814bbc811305daa2 F src/vdbe.h 03516f28bf5aca00a53c4dccd6c313f96adb94f6 -F src/vdbeInt.h 5530e45fc64c1572f123aca384096e1b84cf834b +F src/vdbeInt.h 13cb4868ea579b5a8f6b6b5098caa99cd5a14078 F src/vdbeapi.c 85c33cfbfa56249cbe627831610afafba754477d F src/vdbeaux.c 30c1bbc1d2876c5bbe84d52dab9980ed032bca98 F src/vdbeblob.c b0dcebfafedcf9c0addc7901ad98f6f986c08935 -F src/vdbemem.c 06311d5c46fd703fe95ff81bd0a1b72ba0341311 +F src/vdbemem.c c6127c335f802ba159c6fec4e3284ba82a070602 F src/vtab.c e39e011d7443a8d574b1b9cde207a35522e6df43 F src/walker.c 488c2660e13224ff70c0c82761118efb547f8f0d F src/where.c ac21a2bcfda6f2051b1cbaad361924295ec52771 @@ -695,7 +695,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e -P 876f874c6e2e6e7763083e6761eedc10a4522ec9 -R 03f24e95410db9478f89a6a5008336d8 +P b054b569172c53f4e185e4a64f41d08784aa0f8b +R 457b1a0aeb8d87e7c5afc57610b99229 U drh -Z b153f89d67dc071f437e82912b395cd3 +Z 4acf5301e63e1e219eaefae473c300d6 diff --git a/manifest.uuid b/manifest.uuid index 7e5c46d304..06ea667d87 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -b054b569172c53f4e185e4a64f41d08784aa0f8b \ No newline at end of file +a3c260772bda68007b73feee6612495a704c84f5 \ No newline at end of file diff --git a/src/vdbeInt.h b/src/vdbeInt.h index c574978857..8ff7939fc7 100644 --- a/src/vdbeInt.h +++ b/src/vdbeInt.h @@ -15,7 +15,7 @@ ** 6000 lines long) it was split up into several smaller files and ** this header information was factored out. ** -** $Id: vdbeInt.h,v 1.161 2009/01/05 18:02:27 drh Exp $ +** $Id: vdbeInt.h,v 1.162 2009/02/03 15:39:01 drh Exp $ */ #ifndef _VDBEINT_H_ #define _VDBEINT_H_ @@ -382,9 +382,6 @@ int sqlite3VdbeMemGrow(Mem *pMem, int n, int preserve); int sqlite3VdbeReleaseBuffers(Vdbe *p); #endif -#ifndef NDEBUG - void sqlite3VdbeMemSanity(Mem*); -#endif int sqlite3VdbeMemTranslate(Mem*, u8); #ifdef SQLITE_DEBUG void sqlite3VdbePrintSql(Vdbe*); diff --git a/src/vdbemem.c b/src/vdbemem.c index 8c4af32fda..bd103245ed 100644 --- a/src/vdbemem.c +++ b/src/vdbemem.c @@ -15,7 +15,7 @@ ** only within the VDBE. Interface routines refer to a Mem using the ** name sqlite_value ** -** $Id: vdbemem.c,v 1.135 2009/01/20 16:53:41 danielk1977 Exp $ +** $Id: vdbemem.c,v 1.136 2009/02/03 15:39:01 drh Exp $ */ #include "sqliteInt.h" #include "vdbeInt.h" @@ -869,55 +869,6 @@ int sqlite3VdbeMemFromBtree( return rc; } -#if 0 -/* -** Perform various checks on the memory cell pMem. An assert() will -** fail if pMem is internally inconsistent. -*/ -void sqlite3VdbeMemSanity(Mem *pMem){ - int flags = pMem->flags; - assert( flags!=0 ); /* Must define some type */ - if( flags & (MEM_Str|MEM_Blob) ){ - int x = flags & (MEM_Static|MEM_Dyn|MEM_Ephem|MEM_Short); - assert( x!=0 ); /* Strings must define a string subtype */ - assert( (x & (x-1))==0 ); /* Only one string subtype can be defined */ - assert( pMem->z!=0 ); /* Strings must have a value */ - /* Mem.z points to Mem.zShort iff the subtype is MEM_Short */ - assert( (x & MEM_Short)==0 || pMem->z==pMem->zShort ); - assert( (x & MEM_Short)!=0 || pMem->z!=pMem->zShort ); - /* No destructor unless there is MEM_Dyn */ - assert( pMem->xDel==0 || (pMem->flags & MEM_Dyn)!=0 ); - - if( (flags & MEM_Str) ){ - assert( pMem->enc==SQLITE_UTF8 || - pMem->enc==SQLITE_UTF16BE || - pMem->enc==SQLITE_UTF16LE - ); - /* If the string is UTF-8 encoded and nul terminated, then pMem->n - ** must be the length of the string. (Later:) If the database file - ** has been corrupted, '\000' characters might have been inserted - ** into the middle of the string. In that case, the sqlite3Strlen30() - ** might be less. - */ - if( pMem->enc==SQLITE_UTF8 && (flags & MEM_Term) ){ - assert( sqlite3Strlen30(pMem->z)<=pMem->n ); - assert( pMem->z[pMem->n]==0 ); - } - } - }else{ - /* Cannot define a string subtype for non-string objects */ - assert( (pMem->flags & (MEM_Static|MEM_Dyn|MEM_Ephem|MEM_Short))==0 ); - assert( pMem->xDel==0 ); - } - /* MEM_Null excludes all other types */ - assert( (pMem->flags&(MEM_Str|MEM_Int|MEM_Real|MEM_Blob))==0 - || (pMem->flags&MEM_Null)==0 ); - /* If the MEM is both real and integer, the values are equal */ - assert( (pMem->flags & (MEM_Int|MEM_Real))!=(MEM_Int|MEM_Real) - || pMem->r==pMem->u.i ); -} -#endif - /* This function is only available internally, it is not part of the ** external API. It works in a similar way to sqlite3_value_text(), ** except the data returned is in the encoding specified by the second