summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/java/android/database/sqlite/SQLiteCompiledSql.java2
-rw-r--r--core/java/android/database/sqlite/SQLiteCursor.java2
-rw-r--r--core/java/android/database/sqlite/SQLiteDatabase.java5
3 files changed, 7 insertions, 2 deletions
diff --git a/core/java/android/database/sqlite/SQLiteCompiledSql.java b/core/java/android/database/sqlite/SQLiteCompiledSql.java
index a7ad757..feea47e 100644
--- a/core/java/android/database/sqlite/SQLiteCompiledSql.java
+++ b/core/java/android/database/sqlite/SQLiteCompiledSql.java
@@ -112,7 +112,7 @@ import android.util.Log;
StrictMode.onSqliteObjectLeaked(
"Releasing statement in a finalizer. Please ensure " +
"that you explicitly call close() on your cursor: " +
- mSqlStmt.substring(0, (len > 100) ? 100 : len),
+ mSqlStmt.substring(0, (len > 1000) ? 1000 : len),
mStackTrace);
}
releaseSqlStatement();
diff --git a/core/java/android/database/sqlite/SQLiteCursor.java b/core/java/android/database/sqlite/SQLiteCursor.java
index aba37a4..225eaab 100644
--- a/core/java/android/database/sqlite/SQLiteCursor.java
+++ b/core/java/android/database/sqlite/SQLiteCursor.java
@@ -513,7 +513,7 @@ public class SQLiteCursor extends AbstractWindowedCursor {
StrictMode.onSqliteObjectLeaked(
"Finalizing a Cursor that has not been deactivated or closed. " +
"database = " + mQuery.mDatabase.getPath() + ", table = " + mEditTable +
- ", query = " + mQuery.mSql.substring(0, (len > 100) ? 100 : len),
+ ", query = " + mQuery.mSql.substring(0, (len > 1000) ? 1000 : len),
mStackTrace);
}
close();
diff --git a/core/java/android/database/sqlite/SQLiteDatabase.java b/core/java/android/database/sqlite/SQLiteDatabase.java
index 0e921e9..54cdba2 100644
--- a/core/java/android/database/sqlite/SQLiteDatabase.java
+++ b/core/java/android/database/sqlite/SQLiteDatabase.java
@@ -2130,6 +2130,11 @@ public class SQLiteDatabase extends SQLiteClosable {
Log.w(TAG, "Reached MAX size for compiled-sql statement cache for database " +
getPath() + ". Use setMaxSqlCacheSize() to increase cachesize. ");
mCacheFullWarning = true;
+ // STOPSHIP enclose the following warnings with "if (SQLiteDebug.DEBUG_SQL_CACHE)"
+ Log.d(TAG, "Here are the SQL statements in Cache of database: " + mPath);
+ for (String s : mCompiledQueries.keySet()) {
+ Log.d(TAG, "Sql stament in Cache: " + s);
+ }
}
/* add the given SQLiteCompiledSql compiledStatement to cache.
* no need to worry about the cache size - because {@link #mCompiledQueries}