Vasu Nori 2827d6d974 for WAL to work, can't keep prepared SQL stmt_id in SQLiteStatement
Some (including the Contacts app) do the following:
  1. Open database
  2. As part of database_connection.onCreate(),
       Create some SQLiteStatement objects to cache them in the process
  3. attach databases
WAL doesn't work with attached databases. so, apps doing the above
should enable WAL only if there are no attached databases.

But we would like to enable WAL automatically for all apps after step #1 above
and disable WAL if the app subsequently does 'attach database' SQL.

this works only if there are no SQLiteStatement objects created in step # 2,
because SQLiteStatements cwmaintain a hard-reference to the database connection
for life and also to the prepared SQL statement id.
It is quite difficult to disable WAL in step # 3
    if it is enabled in step # 1
    and then a connection pool gets used by step # 2

would make WAL disabling easier if SQLiteStatement refers to prepared SQL
statement id only when it is needed (during binding and execute calls)
and thus NOT tied to a spacific database conenction.

also, from the standpoint of not blocking readers, it helps NOT to have
SQLiteStatement be married to a database connection and prepared SQL statement
id for life.

Change-Id: I464d57042965a28d2bde88e0f44b66ec119b40dc
2010-07-07 15:33:42 -07:00
2010-07-07 13:06:26 -07:00
2010-06-29 15:03:58 -07:00
Description
No description provided
5.1 GiB
Languages
Java 77.3%
Kotlin 9.2%
PowerBuilder 6.6%
C++ 5.5%
AIDL 1%