diff options
author | drh <drh@noemail.net> | 2010-09-03 18:50:48 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2010-09-03 18:50:48 +0000 |
commit | ee9ff672dac62dbd523f23cdf5a15d2eed142673 (patch) | |
tree | bebe5237c1512be718adc9e27129202d60d7fc36 /src | |
parent | 877cef4b8474fb62b6b9417e8ae9ec87246901d8 (diff) | |
download | sqlite-ee9ff672dac62dbd523f23cdf5a15d2eed142673.tar.gz sqlite-ee9ff672dac62dbd523f23cdf5a15d2eed142673.zip |
Documentation enhancements for sqlite3_db_status(). Evidence marks on
the SQL function call intrface.
FossilOrigin-Name: f06c7b1973d64a6a1a1db2b44df2a4eb0ece0077
Diffstat (limited to 'src')
-rw-r--r-- | src/sqlite.h.in | 15 | ||||
-rw-r--r-- | src/vdbe.c | 4 | ||||
-rw-r--r-- | src/vdbemem.c | 2 |
3 files changed, 15 insertions, 6 deletions
diff --git a/src/sqlite.h.in b/src/sqlite.h.in index be50df55c..6edb8348c 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -1415,8 +1415,14 @@ struct sqlite3_mem_methods { ** or equal to the product of the second and third arguments. The buffer ** must be aligned to an 8-byte boundary. ^If the second argument to ** SQLITE_DBCONFIG_LOOKASIDE is not a multiple of 8, it is internally -** rounded down to the next smaller -** multiple of 8. See also: [SQLITE_CONFIG_LOOKASIDE]</dd> +** rounded down to the next smaller multiple of 8. ^(The lookaside memory +** configuration for a database connection can only be changed when that +** connection is not currently using lookaside memory, or in other words +** when the "current value" returned by +** [sqlite3_db_status](D,[SQLITE_CONFIG_LOOKASIDE],...) is zero. +** Any attempt to change the lookaside memory configuration when lookaside +** memory is in use leaves the configuration unchanged and returns +** [SQLITE_BUSY].)^</dd> ** ** </dl> */ @@ -5141,7 +5147,7 @@ int sqlite3_test_control(int op, ...); ** ^(Other parameters record only the highwater mark and not the current ** value. For these latter parameters nothing is written into *pCurrent.)^ ** -** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a +** ^The sqlite3_status() routine returns SQLITE_OK on success and a ** non-zero [error code] on failure. ** ** This routine is threadsafe but is not atomic. This routine can be @@ -5263,6 +5269,9 @@ int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag); ** the resetFlg is true, then the highest instantaneous value is ** reset back down to the current value. ** +** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a +** non-zero [error code] on failure. +** ** See also: [sqlite3_status()] and [sqlite3_stmt_status()]. */ int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg); diff --git a/src/vdbe.c b/src/vdbe.c index 6c7c10550..a41602098 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -1383,7 +1383,7 @@ case OP_Function: { assert( pOp[-1].opcode==OP_CollSeq ); ctx.pColl = pOp[-1].p4.pColl; } - (*ctx.pFunc->xFunc)(&ctx, n, apVal); + (*ctx.pFunc->xFunc)(&ctx, n, apVal); /* IMP: R-24505-23230 */ if( db->mallocFailed ){ /* Even though a malloc() has failed, the implementation of the ** user function may have called an sqlite3_result_XXX() function @@ -5121,7 +5121,7 @@ case OP_AggStep: { assert( pOp[-1].opcode==OP_CollSeq ); ctx.pColl = pOp[-1].p4.pColl; } - (ctx.pFunc->xStep)(&ctx, n, apVal); + (ctx.pFunc->xStep)(&ctx, n, apVal); /* IMP: R-24505-23230 */ if( ctx.isError ){ sqlite3SetString(&p->zErrMsg, db, "%s", sqlite3_value_text(&ctx.s)); rc = ctx.isError; diff --git a/src/vdbemem.c b/src/vdbemem.c index e376a6562..7171d7a0f 100644 --- a/src/vdbemem.c +++ b/src/vdbemem.c @@ -252,7 +252,7 @@ int sqlite3VdbeMemFinalize(Mem *pMem, FuncDef *pFunc){ ctx.s.db = pMem->db; ctx.pMem = pMem; ctx.pFunc = pFunc; - pFunc->xFinalize(&ctx); + pFunc->xFinalize(&ctx); /* IMP: R-24505-23230 */ assert( 0==(pMem->flags&MEM_Dyn) && !pMem->xDel ); sqlite3DbFree(pMem->db, pMem->zMalloc); memcpy(pMem, &ctx.s, sizeof(ctx.s)); |