diff options
| author | Jeff Brown <jeffbrown@google.com> | 2012-02-29 17:06:23 -0800 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-02-29 17:06:23 -0800 |
| commit | 0e689abaec67ad5f0c485ca8387d843bf55ab10f (patch) | |
| tree | 9ff6346f5240d24232077aa9d30e02dbc43f3e8d | |
| parent | 96ba76fbdebd33dfd7bce19b4eb6243c2a982ce7 (diff) | |
| parent | 958cbbab6a35e1668419a2f7e2a2b75b9c8db807 (diff) | |
| download | frameworks_base-0e689abaec67ad5f0c485ca8387d843bf55ab10f.zip frameworks_base-0e689abaec67ad5f0c485ca8387d843bf55ab10f.tar.gz frameworks_base-0e689abaec67ad5f0c485ca8387d843bf55ab10f.tar.bz2 | |
Merge "Don't throw if sqlite3_finalize returns an error."
| -rw-r--r-- | core/jni/android_database_SQLiteConnection.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/jni/android_database_SQLiteConnection.cpp b/core/jni/android_database_SQLiteConnection.cpp index 80ecf2f..f47dc8a 100644 --- a/core/jni/android_database_SQLiteConnection.cpp +++ b/core/jni/android_database_SQLiteConnection.cpp @@ -426,11 +426,11 @@ static void nativeFinalizeStatement(JNIEnv* env, jclass clazz, jint connectionPt SQLiteConnection* connection = reinterpret_cast<SQLiteConnection*>(connectionPtr); sqlite3_stmt* statement = reinterpret_cast<sqlite3_stmt*>(statementPtr); + // We ignore the result of sqlite3_finalize because it is really telling us about + // whether any errors occurred while executing the statement. The statement itself + // is always finalized regardless. ALOGV("Finalized statement %p on connection %p", statement, connection->db); - int err = sqlite3_finalize(statement); - if (err != SQLITE_OK) { - throw_sqlite3_exception(env, connection->db, NULL); - } + sqlite3_finalize(statement); } static jint nativeGetParameterCount(JNIEnv* env, jclass clazz, jint connectionPtr, |
