Merge "when printing cache-full warning, print the sql statements in cache"
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 @@
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}