When an sqlite3_auto_extension() function fails, report back its actual
error code, not the generic SQLITE_ERROR. FossilOrigin-Name: ce55f250f56fa3a1ca864f81e9e86f911b981490
This commit is contained in:
parent
43795e3b0b
commit
e5077c1211
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C When\sthe\smultiplexor\sFileSize\sprocedure\sfails\sto\sopen\sthe\sfile,\sassume\sthat\nthe\sfile\sis\szero\sbytes\sin\ssize.
|
||||
D 2011-12-13T02:41:13.433
|
||||
C When\san\ssqlite3_auto_extension()\sfunction\sfails,\sreport\sback\sits\sactual\nerror\scode,\snot\sthe\sgeneric\sSQLITE_ERROR.
|
||||
D 2011-12-13T04:08:36.892
|
||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||
F Makefile.in 5b4a3e12a850b021547e43daf886b25133b44c07
|
||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||
@ -146,8 +146,8 @@ F src/insert.c 8f283d6734dd837ed7531b26d7622fda70874390
|
||||
F src/journal.c 552839e54d1bf76fb8f7abe51868b66acacf6a0e
|
||||
F src/legacy.c a199d7683d60cef73089e892409113e69c23a99f
|
||||
F src/lempar.c 0ee69fca0be54cd93939df98d2aca4ca46f44416
|
||||
F src/loadext.c d0d2022a5a07274d408820b978b9e549189d314f
|
||||
F src/main.c f6abb5b6e34cefce99e598a59da7f9282cb95476
|
||||
F src/loadext.c f20382fbaeec832438a1ba7797bee3d3c8a6d51d
|
||||
F src/main.c 8fc06b5ab42330f26d13fbd8f969eead1d214556
|
||||
F src/malloc.c 591aedb20ae40813f1045f2ef253438a334775d9
|
||||
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
|
||||
F src/mem1.c 7456e2ca0524609ebc06a9befeda5289d4575ad4
|
||||
@ -976,7 +976,7 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06
|
||||
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
||||
F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a
|
||||
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
|
||||
P c2ed86f5945662a4ddcdc7b303df3f64fb3bf17d
|
||||
R 54dcfa200fabf4bee31d0ce1ef27bb67
|
||||
P dc8118cd89da71f2035c6ee07c0edb772bba2186
|
||||
R fcee0dd6fa555d5216e315a8c5784053
|
||||
U drh
|
||||
Z 12069cbcb91e3fccb976a5eab6a4fcac
|
||||
Z 9d7ca46858b8a86804ab1862673e090c
|
||||
|
@ -1 +1 @@
|
||||
dc8118cd89da71f2035c6ee07c0edb772bba2186
|
||||
ce55f250f56fa3a1ca864f81e9e86f911b981490
|
@ -625,6 +625,7 @@ void sqlite3_reset_auto_extension(void){
|
||||
void sqlite3AutoLoadExtensions(sqlite3 *db){
|
||||
int i;
|
||||
int go = 1;
|
||||
int rc;
|
||||
int (*xInit)(sqlite3*,char**,const sqlite3_api_routines*);
|
||||
|
||||
wsdAutoextInit;
|
||||
@ -647,8 +648,8 @@ void sqlite3AutoLoadExtensions(sqlite3 *db){
|
||||
}
|
||||
sqlite3_mutex_leave(mutex);
|
||||
zErrmsg = 0;
|
||||
if( xInit && xInit(db, &zErrmsg, &sqlite3Apis) ){
|
||||
sqlite3Error(db, SQLITE_ERROR,
|
||||
if( xInit && (rc = xInit(db, &zErrmsg, &sqlite3Apis))!=0 ){
|
||||
sqlite3Error(db, rc,
|
||||
"automatic extension loading failed: %s", zErrmsg);
|
||||
go = 0;
|
||||
}
|
||||
|
@ -2250,10 +2250,13 @@ static int openDatabase(
|
||||
/* Load automatic extensions - extensions that have been registered
|
||||
** using the sqlite3_automatic_extension() API.
|
||||
*/
|
||||
sqlite3AutoLoadExtensions(db);
|
||||
rc = sqlite3_errcode(db);
|
||||
if( rc!=SQLITE_OK ){
|
||||
goto opendb_out;
|
||||
if( rc==SQLITE_OK ){
|
||||
sqlite3AutoLoadExtensions(db);
|
||||
rc = sqlite3_errcode(db);
|
||||
if( rc!=SQLITE_OK ){
|
||||
goto opendb_out;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SQLITE_ENABLE_FTS1
|
||||
|
Loading…
Reference in New Issue
Block a user