OSDN Git Service
(root)
/
android-x86
/
frameworks-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ca1228
)
yet another race condition fix to address bug:2456970
author
Vasu Nori
<vnori@google.com>
Wed, 24 Feb 2010 20:42:46 +0000
(12:42 -0800)
committer
Vasu Nori
<vnori@google.com>
Wed, 24 Feb 2010 20:42:46 +0000
(12:42 -0800)
core/java/android/database/sqlite/SQLiteProgram.java
patch
|
blob
|
history
diff --git
a/core/java/android/database/sqlite/SQLiteProgram.java
b/core/java/android/database/sqlite/SQLiteProgram.java
index
a3a8486
..
7a29cb4
100644
(file)
--- a/
core/java/android/database/sqlite/SQLiteProgram.java
+++ b/
core/java/android/database/sqlite/SQLiteProgram.java
@@
-57,8
+57,10
@@
public abstract class SQLiteProgram extends SQLiteClosable {
mCompiledSql = new SQLiteCompiledSql(db, sql);
// add it to the cache of compiled-sqls
- db.addToCompiledQueries(sql, mCompiledSql);
+ // but before adding it and thus making it available for anyone else to use it,
+ // make sure it is acquired by me.
mCompiledSql.acquire();
+ db.addToCompiledQueries(sql, mCompiledSql);
} else {
// it is already in compiled-sql cache.
// try to acquire the object.