From cb5e4dbf4e617f3e039fb9f8c45c35d27f35f39a Mon Sep 17 00:00:00 2001 From: drh Date: Wed, 12 Oct 2011 23:49:49 +0000 Subject: [PATCH] The sqlite3_overload_function() interface returns an error if it is unable to create the overload function. Ticket [20f9d4fbbff3a3] FossilOrigin-Name: d5b6b374c5225d21c386fb3d6507d3938296e759 --- manifest | 12 ++++++------ manifest.uuid | 2 +- src/main.c | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/manifest b/manifest index d2b56aa51e..f186ae5990 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C The\sdate/time\sfunctions\sreturn\sNULL\sif\sthe\sxCurrentTime\sor\nxCurrentTimeInt64\sVFS\smethods\sfail.\nTicket\s[0b803bff856c644c] -D 2011-10-12T23:13:43.648 +C The\ssqlite3_overload_function()\sinterface\sreturns\san\serror\sif\sit\sis\sunable\nto\screate\sthe\soverload\sfunction.\s\sTicket\s[20f9d4fbbff3a3] +D 2011-10-12T23:49:49.486 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in a162fe39e249b8ed4a65ee947c30152786cfe897 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -146,7 +146,7 @@ F src/journal.c 552839e54d1bf76fb8f7abe51868b66acacf6a0e F src/legacy.c a199d7683d60cef73089e892409113e69c23a99f F src/lempar.c 7f026423f4d71d989e719a743f98a1cbd4e6d99e F src/loadext.c 99a161b27a499fc8ad40745b7b1900a26f0a5f51 -F src/main.c 43664b68a0b0f8fe9edc7d987b42cb8e26298468 +F src/main.c ae03daa1adf657aac69f18bb13f6a0763494b502 F src/malloc.c 591aedb20ae40813f1045f2ef253438a334775d9 F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645 F src/mem1.c 00bd8265c81abb665c48fea1e0c234eb3b922206 @@ -966,7 +966,7 @@ F tool/symbols.sh caaf6ccc7300fd43353318b44524853e222557d5 F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 -P 6bedb49d68f2960a6fc4701d02e177789abf9099 -R f6f2282ee33c9438c6a443681fa52486 +P c96651dd6ceadd51c9e1f4d942177d3c128c47b4 +R ea04b607dc034a923513c6e21f4d7206 U drh -Z e1a02e86d35f387f95f1d1ceb1084f34 +Z 3ca712cf2f818c92184b1f1b656548d2 diff --git a/manifest.uuid b/manifest.uuid index 34b3f1b149..fb4983fb5f 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -c96651dd6ceadd51c9e1f4d942177d3c128c47b4 \ No newline at end of file +d5b6b374c5225d21c386fb3d6507d3938296e759 \ No newline at end of file diff --git a/src/main.c b/src/main.c index efdb2076bf..51596c1de1 100644 --- a/src/main.c +++ b/src/main.c @@ -1214,13 +1214,13 @@ int sqlite3_overload_function( int nArg ){ int nName = sqlite3Strlen30(zName); - int rc; + int rc = SQLITE_OK; sqlite3_mutex_enter(db->mutex); if( sqlite3FindFunction(db, zName, nName, nArg, SQLITE_UTF8, 0)==0 ){ - sqlite3CreateFunc(db, zName, nArg, SQLITE_UTF8, - 0, sqlite3InvalidFunction, 0, 0, 0); + rc = sqlite3CreateFunc(db, zName, nArg, SQLITE_UTF8, + 0, sqlite3InvalidFunction, 0, 0, 0); } - rc = sqlite3ApiExit(db, SQLITE_OK); + rc = sqlite3ApiExit(db, rc); sqlite3_mutex_leave(db->mutex); return rc; }