From: drh Date: Wed, 6 May 2009 18:42:21 +0000 (+0000) Subject: Fix three variable initialization problems found by valgrind. (CVS 6612) X-Git-Tag: version-3.6.15~138 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a863cdad8f1f43a9eef1289fed53f1e23495431;p=thirdparty%2Fsqlite.git Fix three variable initialization problems found by valgrind. (CVS 6612) FossilOrigin-Name: 37428435978027f6baffa552306dd5dc29ce5cd5 --- diff --git a/manifest b/manifest index 3ed9a475b5..ae6576ba97 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C updated\svxworks\smakefile\sfor\s3.6.14\srelease\s(CVS\s6611) -D 2009-05-06T15:24:04 +C Fix\sthree\svariable\sinitialization\sproblems\sfound\sby\svalgrind.\s(CVS\s6612) +D 2009-05-06T18:42:21 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in 583e87706abc3026960ed759aff6371faf84c211 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -109,7 +109,7 @@ F src/btmutex.c 9b899c0d8df3bd68f527b0afe03088321b696d3c F src/btree.c a601a89bcf1fc614babbde0afedbfc83e18e3c02 F src/btree.h 58d876d3ed944a8f4f1fd0e67024b385243fc9dd F src/btreeInt.h df64030d632f8c8ac217ed52e8b6b3eacacb33a5 -F src/build.c 8e83444d31975a732be9c393cdcbe51930a35638 +F src/build.c a8320b5fe742dcae98c8f7315b59d61e8e642a4d F src/callback.c c54a923b06a17a2f965e5c3a6f87a3a963209a4c F src/complete.c 5ad5c6cd4548211867c204c41a126d73a9fbcea0 F src/date.c ab5f7137656652a48434d64f96bdcdc823bb23b3 @@ -198,7 +198,7 @@ F src/test_tclvar.c 9e42fa59d3d2f064b7ab8628e7ab2dc8a9fe93d4 F src/test_thread.c b8a1ab7ca1a632f18e8a361880d5d65eeea08eac F src/test_wsd.c 3ae5101de6cbfda2720152ab659ea84079719241 F src/tokenize.c 286ce8a4bffe5ec81ad893e6243684d8f8846ed9 -F src/trigger.c 448615bec40efcd6b3a9362a060f2e7067f25be5 +F src/trigger.c 5dcdcf5c719bfd1a58f98265d7c024b8c12e2dc1 F src/update.c deb930324dd67b7ad98234e1258a0ebcdd1ca0f9 F src/utf.c 9541d28f40441812c0b40f00334372a0542c00ff F src/util.c 40fb962de1b00a310de4acc87c6800173e35c25f @@ -212,7 +212,7 @@ F src/vdbeblob.c e67757450ae8581a8b354d9d7e467e41502dfe38 F src/vdbemem.c d8b985eeb88214941380372466a30ca410043a93 F src/vtab.c 53355aa2381ec3ef2eaad25672cfd5877a02fe45 F src/walker.c 7cdf63223c953d4343c6833e940f110281a378ee -F src/where.c 6199249adebde89441e00da5fa256dd7ae005061 +F src/where.c 31b1c577c2a413e3e0f621069e2404f55de1ec8b F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2 F test/alias.test 4529fbc152f190268a15f9384a5651bbbabc9d87 F test/all.test 14165b3e32715b700b5f0cbf8f6e3833dda0be45 @@ -728,7 +728,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e -P 4357e76d53f692cb7495fbde61b4b7580560f816 -R 7f6d232abc0e2ee18f7e13e4cb8b2a02 -U chw -Z 380772f02108e949a1e4532819450406 +P 5d4bffaabbf6a809938f115de266b382183a0a96 +R cdcea386222148f35a5a3909380cf435 +U drh +Z f14917d9041dd6537364a4829aeb56f2 diff --git a/manifest.uuid b/manifest.uuid index 8ca66726ec..742707da3d 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -5d4bffaabbf6a809938f115de266b382183a0a96 \ No newline at end of file +37428435978027f6baffa552306dd5dc29ce5cd5 \ No newline at end of file diff --git a/src/build.c b/src/build.c index ddfd0cb49d..e7f8e62354 100644 --- a/src/build.c +++ b/src/build.c @@ -22,7 +22,7 @@ ** COMMIT ** ROLLBACK ** -** $Id: build.c,v 1.536 2009/05/04 11:42:30 danielk1977 Exp $ +** $Id: build.c,v 1.537 2009/05/06 18:42:21 drh Exp $ */ #include "sqliteInt.h" @@ -2556,6 +2556,7 @@ void sqlite3CreateIndex( if( pList==0 ){ nullId.z = (u8*)pTab->aCol[pTab->nCol-1].zName; nullId.n = sqlite3Strlen30((char*)nullId.z); + nullId.quoted = 0; pList = sqlite3ExprListAppend(pParse, 0, 0, &nullId); if( pList==0 ) goto exit_create_index; pList->a[0].sortOrder = (u8)sortOrder; diff --git a/src/trigger.c b/src/trigger.c index 2674a019e7..70d2facc42 100644 --- a/src/trigger.c +++ b/src/trigger.c @@ -10,7 +10,7 @@ ************************************************************************* ** ** -** $Id: trigger.c,v 1.137 2009/04/28 13:01:09 drh Exp $ +** $Id: trigger.c,v 1.138 2009/05/06 18:42:21 drh Exp $ */ #include "sqliteInt.h" @@ -663,6 +663,7 @@ static SrcList *targetSrcList( assert( iDbdb->nDb ); sDb.z = (u8*)pParse->db->aDb[iDb].zName; sDb.n = sqlite3Strlen30((char*)sDb.z); + sDb.quoted = 0; pSrc = sqlite3SrcListAppend(pParse->db, 0, &sDb, &pStep->target); } else { pSrc = sqlite3SrcListAppend(pParse->db, 0, &pStep->target, 0); diff --git a/src/where.c b/src/where.c index 0715095353..de95f7754c 100644 --- a/src/where.c +++ b/src/where.c @@ -16,7 +16,7 @@ ** so is applicable. Because this module is responsible for selecting ** indices, you might also think of this module as the "query optimizer". ** -** $Id: where.c,v 1.393 2009/05/05 15:46:43 drh Exp $ +** $Id: where.c,v 1.394 2009/05/06 18:42:21 drh Exp $ */ #include "sqliteInt.h" @@ -1754,6 +1754,7 @@ static void bestVirtualIndex( ** malloc in allocateIndexInfo() fails and this function returns leaving ** wsFlags in an uninitialized state, the caller may behave unpredictably. */ + memset(pCost, 0, sizeof(*pCost)); pCost->plan.wsFlags = WHERE_VIRTUALTABLE; /* If the sqlite3_index_info structure has not been previously