diff options
author | Jeff Brown <jeffbrown@google.com> | 2012-01-19 16:48:03 -0800 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2012-01-19 19:29:59 -0800 |
commit | e667f09e2450fbe896a8faadf8ba534094dce7e5 (patch) | |
tree | 7dfce2ccb0fec26286f4b296ad6289fd0301d6b4 | |
parent | af4ab8b27c84e71dcdd6edf9e05967a3f9c3e5f2 (diff) |
Remove custom SQLITE_UNCLOSED error code.
This error code was introduced at some point to help track when
a database could not be closed because a statement was not finalized.
Now that the DB wrappers have been rewritten, it is technically no longer
possible for this to happen, so we can remove this.
Change-Id: Ia3c8167a0af522c852adbbd15c83c3c8f5732b26
-rw-r--r-- | dist/sqlite3.c | 15 | ||||
-rw-r--r-- | dist/sqlite3.h | 3 |
2 files changed, 3 insertions, 15 deletions
diff --git a/dist/sqlite3.c b/dist/sqlite3.c index e92537d..fe17797 100644 --- a/dist/sqlite3.c +++ b/dist/sqlite3.c @@ -960,9 +960,6 @@ SQLITE_API int sqlite3_exec( #define SQLITE_FORMAT 24 /* Auxiliary database format error */ #define SQLITE_RANGE 25 /* 2nd parameter to sqlite3_bind out of range */ #define SQLITE_NOTADB 26 /* File opened that is not a database file */ -// Begin Android Add -#define SQLITE_UNCLOSED 27 /* db can't be closed due unfinalized stmts */ -// End Android Add #define SQLITE_ROW 100 /* sqlite3_step() has another row ready */ #define SQLITE_DONE 101 /* sqlite3_step() has finished executing */ /* end-of-error-codes */ @@ -112960,16 +112957,10 @@ SQLITE_API int sqlite3_close(sqlite3 *db){ /* If there are any outstanding VMs, return SQLITE_BUSY. */ if( db->pVdbe ){ - // Begin Android Change - // print the first unfinalized statement in the error message, to help the developer - // figure out what the unfinalized statement is. - char buff[120]; - snprintf(buff, sizeof(buff), "%d,%s", (int)db->pVdbe, db->pVdbe->zSql); - sqlite3Error(db, SQLITE_UNCLOSED, buff); - // End Android Change - + sqlite3Error(db, SQLITE_BUSY, + "unable to close due to unfinalised statements"); sqlite3_mutex_leave(db->mutex); - return SQLITE_UNCLOSED; + return SQLITE_BUSY; } assert( sqlite3SafetyCheckSickOrOk(db) ); diff --git a/dist/sqlite3.h b/dist/sqlite3.h index 55c1d67..fc9cd07 100644 --- a/dist/sqlite3.h +++ b/dist/sqlite3.h @@ -406,9 +406,6 @@ SQLITE_API int sqlite3_exec( #define SQLITE_FORMAT 24 /* Auxiliary database format error */ #define SQLITE_RANGE 25 /* 2nd parameter to sqlite3_bind out of range */ #define SQLITE_NOTADB 26 /* File opened that is not a database file */ -// Begin Android Add -#define SQLITE_UNCLOSED 27 /* db can't be closed due unfinalized stmts */ -// End Android Add #define SQLITE_ROW 100 /* sqlite3_step() has another row ready */ #define SQLITE_DONE 101 /* sqlite3_step() has finished executing */ /* end-of-error-codes */ |