Test coverage enhancements. Additional documentation detail on the new

sqlite3_log() interface.

FossilOrigin-Name: d986e9289388fd72257b26cb2f9c972177255cd4
This commit is contained in:
drh 2010-02-25 21:27:58 +00:00
parent 887d4b2b43
commit bee8065e37
5 changed files with 27 additions and 15 deletions

View File

@ -1,5 +1,8 @@
C Add\sexperimental\sfix\sfor\scorruption\sdetection\sproblem.\sThis\smay\swell\sbe\srevised\syet.
D 2010-02-25T12:09:16
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
C Test\scoverage\senhancements.\s\sAdditional\sdocumentation\sdetail\son\sthe\snew\nsqlite3_log()\sinterface.
D 2010-02-25T21:27:59
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 4f2f967b7e58a35bb74fb7ec8ae90e0f4ca7868b
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -160,13 +163,13 @@ F src/pcache.h c683390d50f856d4cd8e24342ae62027d1bb6050
F src/pcache1.c 2bb2261190b42a348038f5b1c285c8cef415fcc8
F src/pragma.c d610d4f4fc55dca58919890fb5323d441b385362
F src/prepare.c c80630169d82945070a50ebf298611fd9f1485f1
F src/printf.c f5c160b471e4a4dd22b756cb4ffe0c6979fd6d24
F src/printf.c aa793722d793520fa31c54d81ddab26b0b410562
F src/random.c cd4a67b3953b88019f8cd4ccd81394a8ddfaba50
F src/resolve.c a1648d98e869937b29f4f697461fe4d60f220a7b
F src/rowset.c 69afa95a97c524ba6faf3805e717b5b7ae85a697
F src/select.c 4113ef360430ed4e7533690ef46d06c20204adce
F src/shell.c 31cd555125a1fda4a6d8dce019690f043a8e5d75
F src/sqlite.h.in a9f51302109f32e3048358122d1e38fd3ead593f
F src/sqlite.h.in 336ed7bab1080e7e63d5fc48e39bd3fa995da6f0
F src/sqlite3ext.h 69dfb8116af51b84a029cddb3b35062354270c89
F src/sqliteInt.h 32e6eb47d2f6fad587e16b0abbbfe3f7d55f2ec0
F src/sqliteLimit.h 3afab2291762b5d09ae20c18feb8e9fa935a60a6
@ -214,7 +217,7 @@ F src/vacuum.c deb50c41c39849770ab1bf27e8a35ba1036e3962
F src/vdbe.c 6de14d95ade1193f2a694ce673f69ac20032fa17
F src/vdbe.h 471f6a3dcec4817ca33596fe7f6654d56c0e75f3
F src/vdbeInt.h ae1e6ba0dd3fb4a886898d2829d748be701b01f8
F src/vdbeapi.c e0398d74af46911033b92088f740582f3c400515
F src/vdbeapi.c 74c25680046a116b24b95393914d3669c23305dc
F src/vdbeaux.c 9089e0cdcc7ed3bc4564f2684ce84f5911973ea9
F src/vdbeblob.c 5327132a42a91e8b7acfb60b9d2c3b1c5c863e0e
F src/vdbemem.c aeba77b59f3553d3cc5b72c18a8267c6fba546b9
@ -792,7 +795,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
P 9b18dfd19e825b09c1d246c826e179b9892308df
R eafa7db6f5fb13e5c1fd5ab7d385d1ec
U dan
Z 4907aa0adf782240299c0dcbeaf7f20b
P 1cc4be7ebc463921827e61da724f0de946c061f6
R 1c73afd7cbcdebdb258490d2c24799bd
U drh
Z 275be1edf4f26aa0d7cebaa1746de83b
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFLhutjoxKgR168RlERAlrFAJoC7p9doKclaKmbSgjogvOsoOZUUQCeLm7H
KHa6uF4qzTRfmkYuWOIa0Ao=
=0tVZ
-----END PGP SIGNATURE-----

View File

@ -1 +1 @@
1cc4be7ebc463921827e61da724f0de946c061f6
d986e9289388fd72257b26cb2f9c972177255cd4

View File

@ -949,7 +949,7 @@ void sqlite3_log(int iErrCode, const char *zFormat, ...){
char *zMsg; /* Complete log message */
xLog = sqlite3GlobalConfig.xLog;
if( xLog && zFormat ){
if( xLog ){
va_start(ap, zFormat);
sqlite3BeginBenignMalloc();
zMsg = sqlite3_vmprintf(zFormat, ap);

View File

@ -5696,11 +5696,15 @@ int sqlite3_strnicmp(const char *, const char *, int);
**
** ^The [sqlite3_log()] interface writes a message into the error log
** established by the [SQLITE_CONFIG_ERRORLOG] option to [sqlite3_config()].
** ^If logging is enabled, the zFormat string and subsequent arguments are
** passed through to [sqlite3_vmprintf()] to generate the final output string.
**
** The sqlite3_log() interface is intended for use by extensions such as
** virtual tables, collating functions, and SQL functions. While there is
** nothing to prevent an application from calling sqlite3_log(), doing so
** is considered bad form.
**
** The zFormat string must not be NULL.
*/
void sqlite3_log(int iErrCode, const char *zFormat, ...);

View File

@ -334,9 +334,7 @@ static int sqlite3Step(Vdbe *p){
}
if( p->pc<=0 && p->expired ){
if( p->rc==SQLITE_OK ){
p->rc = SQLITE_SCHEMA;
}
p->rc = SQLITE_SCHEMA;
rc = SQLITE_ERROR;
goto end_of_step;
}
@ -435,7 +433,7 @@ int sqlite3_step(sqlite3_stmt *pStmt){
sqlite3_reset(pStmt);
v->expired = 0;
}
if( rc2!=SQLITE_OK && v->isPrepareV2 && db->pErr ){
if( rc2!=SQLITE_OK && ALWAYS(v->isPrepareV2) && ALWAYS(db->pErr) ){
/* This case occurs after failing to recompile an sql statement.
** The error message from the SQL compiler has already been loaded
** into the database handle. This block copies the error message