summaryrefslogtreecommitdiffstats
path: root/core/jni/android_database_SQLiteDatabase.cpp
Commit message (Collapse)AuthorAgeFilesLines
* android change to handle Change-Id: Idbeed81b5b7349059e467b33a8641abf0b4aaeffVasu Nori2010-09-071-0/+3
| | | | Change-Id: Icf221a8e8d4c281f7719875816835ad7dfe7f3d1
* Clean up error handling in custom sqlite function dispatchingMike Lockwood2010-08-051-11/+21
| | | | | Change-Id: I54036bb5defd8c887a9b878e012f0b1d4afe9966 Signed-off-by: Mike Lockwood <lockwood@android.com>
* expose more sqlite errors as exceptionsVasu Nori2010-07-291-0/+27
| | | | | | | this should help developers figure out what various sqlite errors mean and possibly programmatically handle them. Change-Id: I5c313be1b17b6c5171929bf04e19a16ea92bb357
* add new API in SQLiteStatement to deprecate another.Vasu Nori2010-07-261-75/+1
| | | | | | | | | | | | | 1. SQLIteStatement.executeUpdateDelete() replaces execute() - and returns the number of rows changed. 2. let SQLiteDatabase.execSQL() call the above new API - which means all CRUD statements by execSQL() are stored in prepared statement cache. 3. remove the following from SQLiteDatabase lastrowId lastchangecount() native_execSQL() Change-Id: I4e93a09dc381f425c3ae6ccc331a7bf227491e22
* SQLiteDatabase: Add mechanism for registering custom sqlite3 functionsMike Lockwood2010-07-141-0/+72
| | | | | | | | This allows you to define a callback in Java that can be called from sqlite3 database triggers. Change-Id: I09fdbd38c9807b6b0dd19c2761b01e8db76f1adc Signed-off-by: Mike Lockwood <lockwood@android.com>
* read old version of data and use multiple connections to dbVasu Nori2010-06-141-17/+26
| | | | | | | | | | | | | | | cts tests are in Change-Id: Ifcc89b4ff484c7c810fd2d450ded212a43360dda dependency on: Change-Id: I938c42afc3fb50f5296d01c55ffcf4a102d8b0cb 1. Use sqlite's work-in-progress writeahead logging feature to read old versions of data and thus increase concurrency of readers even when there is a writer on the database 2. New API executeQueriesInParallel() sets up a database connecion pool automatically created and managed by sqlite java layer 3. To increase reader concurrency, add an option to do BEGIN IMMEDIATE xaction instead of BEGIN EXCLUSIVE Change-Id: I3ce55a8a7cba538f01f731736e7de8ae1e2a8a1f
* sqlite error "unsupported file format" = corruptionVasu Nori2010-06-101-0/+1
| | | | | | | | | | | | sometimes sqlite corruption is so egregious that the sqlite doesn't even think the file is of supported formatl; ie., the file header is bad. treat this as corruption. this check used to be done in sqlite3.c - move it to android code so that we have less android-changes in sqlite3.c depends on Change-Id: I334286a1a377b962b1a97dd2af00e194f035090e Change-Id: Ide8cd1053b1ec00372fbc87caaaaefb408ce9104
* sqlite crashes when closing the databaseVasu Nori2010-05-211-5/+0
| | | | | | | | | | | | | A change was made in the last CL to ask sqlite for all unfinalized statements and then finalizing them before closing the database. But this crashes sqlite! because sqlite's FTS3 module keeps some prepared statements around and they should not be finalized before closing the database. (when sqlite is asked for all unfianlized statements, it also returns the FTS3's reserved prepared statements which should not be finalized!!) Change-Id: I141ab4563985b8cd1305a1228c4cb01bc7281bcb
* close() on anything other than database shouldn't acquire db lock.Vasu Nori2010-05-201-0/+13
| | | | | | | | | | | | | | | bug:2683001 implmentation details: 1.close() on any sql statement is should simply queued up for finalization to be performed later. caller doesn't acquire database lock. 2. the only effect of NOT close immediately is non-release of some memory. 3. all such queued-up-finalizations are performed whenever there is another execute() of some sql statement on that database from ANY thread in the process. 4. database close() automatically releases all unfinalized statements before closing the database. Change-Id: If4c9c7fde6b8945a41abc6c8b992aa8c69854512
* ignore not-so-useful warning messages from sqlite logging funcVasu Nori2010-03-181-2/+3
| | | | | bug:2524260 Change-Id: Ie397c0df9b63414205bbf8ea7ae9d1498f198524
* Make JNI function for setLocale() call register_localized_collators()Daisuke Miyakawa2010-03-161-3/+4
| | | | | | | | | with the current locale, not previous one, every time it is possible. Add a unit test verifying this fix. BUG: 2514026 Change-Id: I4dd1b047e1ab4bf399e2c3ebc0304c0cfa3a0928
* add more debug info to SQL section in bugreportVasu Nori2010-03-111-0/+11
| | | | | | | | | | | | | | | | | | | after this CL, adb bugreport will the following info (under SQL section of each app's meminfo dump) SQL heap: 344 memoryUsed: 344 pageCacheOverflo: 67 largestMemAlloc: 50 DATABASES Pagesize Dbsize Lookaside Dbname 1024 7 24 googlesettings.db 1024 26 110 talk.db 1024 11 0 (attached) transient_talk_db 1024 11 32 subscribedfeeds.db 1024 20 27 gservices.db Change-Id: Iabd13be9793d9794137c60a045b84fa632f13498
* rollback AFTER commit causes warning message from sqlite bug:2486731Vasu Nori2010-03-051-2/+4
|
* provide databasename to the logging func registration funcVasu Nori2010-03-041-8/+14
| | | | | | this will allow sqlite to return this name, along with the message. otherwise, sqlite logging messages are confusing without database name to associate them with.
* resubmit reverted CL https://android-git.corp.google.com/g/#change,42682Vasu Nori2010-03-021-5/+5
| | | | | | register a logging func with sqlite, to get extra info on errors sqlite3 (latest patch) from DRH included this functionality. use it to get more useful debugging info from sqlite
* revert due to the sqlite build problem on Mac..Vasu Nori2010-03-011-5/+5
|
* register a logging func with sqlite, to get extra info on errorsVasu Nori2010-03-011-27/+42
| | | | | sqlite3 (latest patch) from DRH included this functionality. us it to get more useful debugging info from sqlite
* Adjust SQLiteDatabase/Program buffer sizesKenny Root2010-02-181-1/+1
| | | | | | | Some error messages would have clobbered some memory adjacent to them, so increase the buffer sizes to fit them. Change-Id: I9c4a3f3444bf57b5d2bd1b7a2546e16137747ad0
* use sqlite 3.6.22 to print and profile the sql statetementsVasu Nori2010-02-081-0/+58
| | | | | | instead of rolling our own trace/profile code in java, lets use sqlite 3.6.22 features. turns out sqlite does a good job of printing the sql statements - including the ones from the triggers.
* get rid of utils.hMathias Agopian2009-05-311-1/+4
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+470
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-464/+0
|
* auto import from //depot/cupcake/@132589The Android Open Source Project2009-03-031-7/+1
|
* auto import from //depot/cupcake/@137055The Android Open Source Project2009-03-021-1/+7
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+464