1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

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:
drh
2011-12-13 04:08:36 +00:00
parent 43795e3b0b
commit e5077c1211
4 changed files with 17 additions and 13 deletions

View File

@@ -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