From: drh Date: Wed, 13 Sep 2006 19:21:28 +0000 (+0000) Subject: Remove unused malloc failure test. (Ticket #1976) X-Git-Tag: version-3.6.10~2752 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=235a818e6178c248c6174019434f68ede7defce7;p=thirdparty%2Fsqlite.git Remove unused malloc failure test. (Ticket #1976) Also include fixes for other problems discovered while investigating ticket #1976. (CVS 3415) FossilOrigin-Name: f4ab546b2e8105422fb1baa2b86e688b5d19f20e --- diff --git a/manifest b/manifest index 036778b032..14b247280e 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C In\sFTS1:\sRetain\sthe\sQuery\sstructure\sas\spart\sof\sthe\scursor.\s\sIt\swill\sbe\sused\nlaster\sas\spart\sof\ssnippet\sgeneration.\s(CVS\s3414) -D 2006-09-13T19:18:29 +C Remove\sunused\smalloc\sfailure\stest.\s\s(Ticket\s#1976)\nAlso\sinclude\sfixes\sfor\sother\sproblems\ndiscovered\swhile\sinvestigating\sticket\s#1976.\s(CVS\s3415) +D 2006-09-13T19:21:28 F Makefile.in cabd42d34340f49260bc2a7668c38eba8d4cfd99 F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -91,7 +91,7 @@ F src/sqlite3ext.h 11a046b3519c4b9b7709e6d6a95c3a36366f684a F src/sqliteInt.h fc2439b695dd80a3c58c8f14759e621dbf630b03 F src/table.c d8817f43a6c6bf139487db161760b9e1e02da3f1 F src/tclsqlite.c e029f739bed90071789fe81a226d53e97a80a4d8 -F src/test1.c e8213bf8024a47b49ee8ad276ea07d8e3d4c3c26 +F src/test1.c 9c77e6ac13fc7eb3a2fa2c9fe6b2230ee51c524b F src/test2.c ca74a1d8aeb7d9606e8f6b762c5daf85c1a3f92b F src/test3.c 85135c09560c48bdb0a23c9b890ab405486b8ec9 F src/test4.c 8b784cd82de158a2317cb4ac4bc86f91ad315e25 @@ -111,7 +111,7 @@ F src/trigger.c 74ccec784683232f89f3b4db34a089d8cace2058 F src/update.c 951f95ef044cf6d28557c48dc35cb0711a0b9129 F src/utf.c 4459801e9b00cfd69993bfca58545d3775682d6e F src/util.c 5409031819ee4672c5f9c3ac7cf517e267a25845 -F src/vacuum.c e2cd47929d63c16d835b6052b82fd7422010b903 +F src/vacuum.c fb65647c362589ed4ebb342c85665cadbcbf980c F src/vdbe.c a77869949ddd0afe01443611edb949e24e67c91c F src/vdbe.h 258b5d1c0aaa72192f09ff0568ce42b383f156fa F src/vdbeInt.h e3eaab262b67b84474625cfc38aec1125c32834b @@ -119,7 +119,7 @@ F src/vdbeapi.c 81f531d7dc5c898131b02ef85f6c6144ab2892cf F src/vdbeaux.c 9fab61427a0741c9c123e8ff16e349b1f90397be F src/vdbefifo.c 9efb94c8c3f4c979ebd0028219483f88e57584f5 F src/vdbemem.c 26623176bf1c616aa478da958fac49502491a921 -F src/vtab.c 4d360f2222c6c9a4b779d733fbfb8ddf61be9eb4 +F src/vtab.c 82d915c0a41546d47779c03c53ff884cec6c032e F src/where.c 75a89957fcb8c068bec55caa4e9d2ed5fa0b0724 F tclinstaller.tcl 046e3624671962dc50f0481d7c25b38ef803eb42 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2 @@ -398,7 +398,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513 -P d4edb8035c8abbdb301893557934dd644ef3c950 -R 245c6fa59b482fdfec05d428f214288f +P 607d928ce91f3efa9c7019fc789a9cd3c41cfc92 +R bf91a185075c86310a287575e4ec7d3e U drh -Z 49abc23eb6dd7e1d7410a0ae316f4226 +Z 6514180e1691bbf6fc44840e72052023 diff --git a/manifest.uuid b/manifest.uuid index 6e4bfa3406..16def416b7 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -607d928ce91f3efa9c7019fc789a9cd3c41cfc92 \ No newline at end of file +f4ab546b2e8105422fb1baa2b86e688b5d19f20e \ No newline at end of file diff --git a/src/test1.c b/src/test1.c index bd77d51d1c..e4e1359d15 100644 --- a/src/test1.c +++ b/src/test1.c @@ -13,7 +13,7 @@ ** is not included in the SQLite library. It is used for automated ** testing of the SQLite library. ** -** $Id: test1.c,v 1.220 2006/09/10 03:34:06 drh Exp $ +** $Id: test1.c,v 1.221 2006/09/13 19:21:28 drh Exp $ */ #include "sqliteInt.h" #include "tcl.h" @@ -576,10 +576,14 @@ static int test_create_function( if( getDbPointer(interp, argv[1], &db) ) return TCL_ERROR; rc = sqlite3_create_function(db, "x_coalesce", -1, SQLITE_ANY, 0, ifnullFunc, 0, 0); - rc = sqlite3_create_function(db, "hex8", 1, SQLITE_ANY, 0, - hex8Func, 0, 0); - rc = sqlite3_create_function(db, "hex16", 1, SQLITE_ANY, 0, - hex16Func, 0, 0); + if( rc==SQLITE_OK ){ + rc = sqlite3_create_function(db, "hex8", 1, SQLITE_ANY, 0, + hex8Func, 0, 0); + } + if( rc==SQLITE_OK ){ + rc = sqlite3_create_function(db, "hex16", 1, SQLITE_ANY, 0, + hex16Func, 0, 0); + } #ifndef SQLITE_OMIT_UTF16 /* Use the sqlite3_create_function16() API here. Mainly for fun, but also diff --git a/src/vacuum.c b/src/vacuum.c index f7737f88ab..30fc7cb2c5 100644 --- a/src/vacuum.c +++ b/src/vacuum.c @@ -14,7 +14,7 @@ ** Most of the code in this file may be omitted by defining the ** SQLITE_OMIT_VACUUM macro. ** -** $Id: vacuum.c,v 1.61 2006/09/11 23:45:50 drh Exp $ +** $Id: vacuum.c,v 1.62 2006/09/13 19:21:28 drh Exp $ */ #include "sqliteInt.h" #include "vdbeInt.h" @@ -310,14 +310,6 @@ end_of_vacuum: pDb->pSchema = 0; } - /* If one of the execSql() calls above returned SQLITE_NOMEM, then the - ** mallocFailed flag will be clear (because execSql() calls sqlite3_exec()). - ** Fix this so the flag and return code match. - */ - if( rc==SQLITE_NOMEM ){ - sqlite3MallocFailed(); - } - if( zTemp ){ sqlite3OsDelete(zTemp); sqliteFree(zTemp); diff --git a/src/vtab.c b/src/vtab.c index 8fb5ef9531..2fa389b433 100644 --- a/src/vtab.c +++ b/src/vtab.c @@ -11,7 +11,7 @@ ************************************************************************* ** This file contains code used to help implement virtual tables. ** -** $Id: vtab.c,v 1.34 2006/09/11 00:34:22 drh Exp $ +** $Id: vtab.c,v 1.35 2006/09/13 19:21:28 drh Exp $ */ #ifndef SQLITE_OMIT_VIRTUALTABLE #include "sqliteInt.h" @@ -295,6 +295,7 @@ static int vtabCallConstructor( const char *const*azArg = (const char *const*)pTab->azModuleArg; int nArg = pTab->nModuleArg; char *zErr = 0; + char *zModuleName = sqlite3MPrintf("%s", pTab->zName); assert( !db->pVTab ); assert( xConstruct ); @@ -312,7 +313,7 @@ static int vtabCallConstructor( if( SQLITE_OK!=rc ){ if( zErr==0 ){ - *pzErr = sqlite3MPrintf("vtable constructor failed: %s", pTab->zName); + *pzErr = sqlite3MPrintf("vtable constructor failed: %s", zModuleName); }else { *pzErr = sqlite3MPrintf("%s", zErr); sqlite3_free(zErr); @@ -326,6 +327,7 @@ static int vtabCallConstructor( rc = rc2; } db->pVTab = 0; + sqliteFree(zModuleName); return rc; }