From: drh Date: Mon, 1 Sep 2014 23:06:44 +0000 (+0000) Subject: Update comments in the ANALYZE command that describe how the Stat4Accum X-Git-Tag: version-3.8.7~128 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f8ede57a6165889316f8a9df8ac1166c7a568100;p=thirdparty%2Fsqlite.git Update comments in the ANALYZE command that describe how the Stat4Accum objecct is passed around within the VDBE. No changes to functional code. FossilOrigin-Name: 9779c7a9eb1e2bd36e9286331a9314f064014d80 --- diff --git a/manifest b/manifest index 59d93adfce..58fd42dc62 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Avoid\sa\sconfusing\s(though\scorrect)\sargument\sto\sthe\ssqlite3_result_blob()\nfunction\sin\sthe\simplementation\sof\sANALYZE. -D 2014-09-01T22:34:54.079 +C Update\scomments\sin\sthe\sANALYZE\scommand\sthat\sdescribe\show\sthe\sStat4Accum\nobjecct\sis\spassed\saround\swithin\sthe\sVDBE.\s\sNo\schanges\sto\sfunctional\scode. +D 2014-09-01T23:06:44.401 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in cf57f673d77606ab0f2d9627ca52a9ba1464146a F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -162,7 +162,7 @@ F sqlite.pc.in 42b7bf0d02e08b9e77734a47798d1a55a9e0716b F sqlite3.1 3d8b83c91651f53472ca17599dae3457b8b89494 F sqlite3.pc.in 48fed132e7cb71ab676105d2a4dc77127d8c1f3a F src/alter.c b00900877f766f116f9e16116f1ccacdc21d82f1 -F src/analyze.c 75345fa58d5d044614bedff9d758e3483a4f4522 +F src/analyze.c f00f06e6ef66c61b41f154889fe7caf5ed55a0ce F src/attach.c 3801129015ef59d76bf23c95ef9b0069d18a0c52 F src/auth.c 523da7fb4979469955d822ff9298352d6b31de34 F src/backup.c a31809c65623cc41849b94d368917f8bb66e6a7e @@ -1193,7 +1193,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 be0a037244762cc0f5ff4a6d7822902f862767bd -R 5498da01c32f540309f235f11a91d5bf +P 4cae93f8ae8fb3fe38fd5dc7d3a5ea0d11552841 +R fe37d23fb1f96547febf2ff7c0ba49b9 U drh -Z 21cb2c2a001f5844bb20a699e6bc27e5 +Z 29e2a2847ff584a00093c5b89ffca704 diff --git a/manifest.uuid b/manifest.uuid index 1f41bd67e6..af2604f469 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -4cae93f8ae8fb3fe38fd5dc7d3a5ea0d11552841 \ No newline at end of file +9779c7a9eb1e2bd36e9286331a9314f064014d80 \ No newline at end of file diff --git a/src/analyze.c b/src/analyze.c index 693e2f5472..9920c32a80 100644 --- a/src/analyze.c +++ b/src/analyze.c @@ -387,8 +387,9 @@ static void stat4Destructor(void *pOld){ ** original WITHOUT ROWID table as N==K as a special case. ** ** This routine allocates the Stat4Accum object in heap memory. The return -** value is a pointer to the the Stat4Accum object encoded as a blob (i.e. -** the size of the blob is sizeof(void*) bytes). +** value is a pointer to the the Stat4Accum object. The datatype of the +** return value is BLOB, but it is really just a pointer to the Stat4Accum +** object. */ static void statInit( sqlite3_context *context, @@ -466,7 +467,10 @@ static void statInit( } #endif - /* Return a pointer to the allocated object to the caller */ + /* Return a pointer to the allocated object to the caller. Note that + ** only the pointer (the 2nd parameter) matters. The size of the object + ** (given by the 3rd parameter) is never used and can be any positive + ** value. */ sqlite3_result_blob(context, p, sizeof(*p), stat4Destructor); } static const FuncDef statInitFuncdef = { @@ -793,7 +797,7 @@ static const FuncDef statPushFuncdef = { ** Implementation of the stat_get(P,J) SQL function. This routine is ** used to query statistical information that has been gathered into ** the Stat4Accum object by prior calls to stat_push(). The P parameter -** is a BLOB which is decoded into a pointer to the Stat4Accum objects. +** has type BLOB but it is really just a pointer to the Stat4Accum object. ** The content to returned is determined by the parameter J ** which is one of the STAT_GET_xxxx values defined above. **