summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasu Nori <vnori@google.com>2010-10-25 11:48:24 -0700
committerVasu Nori <vnori@google.com>2010-10-25 11:50:56 -0700
commit74fb2685e229b3c68d16e6f2ad6635aad69ca3b8 (patch)
treeb01549fe6726e8022cfce2345201e2d152039594
parentf0a896b353e01c7093ba2ee0539f1a7cabef6ec6 (diff)
downloadframeworks_base-74fb2685e229b3c68d16e6f2ad6635aad69ca3b8.zip
frameworks_base-74fb2685e229b3c68d16e6f2ad6635aad69ca3b8.tar.gz
frameworks_base-74fb2685e229b3c68d16e6f2ad6635aad69ca3b8.tar.bz2
when printing cache-full warning, print the sql statements in cache
this should help debug developers in idetifying the sql statements taking up cache slots Change-Id: Ibc0140c273adc5c8d58ab359d2c4d4ce14b6b63b
-rw-r--r--core/java/android/database/sqlite/SQLiteDatabase.java5
1 files changed, 5 insertions, 0 deletions
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}