summaryrefslogtreecommitdiff
path: root/dist/sqlite3.c
AgeCommit message (Collapse)Author
2021-03-24sqlite: Upgrade to SQLite 3.32.2Lalit Maganti
This change is a cherry-pick of aosp/1337179 which is being merged here because of merge conflicts due to changes [1] and [2] which were made in internal master and rvc-dev but not in AOSP. Downloaded from https://www.sqlite.org/2020/sqlite-autoconf-3320200.tar.gz $ sha1sum sqlite-autoconf-3320200.tar.gz 429e3f2d0b16a95ad1025a97b2a328d0b4037575 sqlite-autoconf-3320200.tar.gz dist/orig contains the stock sqlite3 code, as packaged in the tar.gz file above. dist contains a copy of dist/orig, but with the Android.patch file applied. More details about the release are available here: https://www.sqlite.org/releaselog/3_32_2.html [1] ag/0f62c1a0e8b463b5b27035e11478e66d7daec69a [2] ag/88147c430cc041a27d07e593ffea12b7aa586f7a Test: code compiles and device boots with no problems. Test: select sqlite_version() - returns 3.32.2 Test: atest cts/SQLiteDatabaseTest all passed. Test: atest cts/SQLiteSecurityTest Bug: 159105124 Change-Id: I5c5fa2fd90292483bf20d8ae58adad41c48aa4e6
2020-05-11Fix 'ALTER RENAME TABLE' compat issueZim
This CL disables SQLite's new behavior in "ALTER RENAME TABLE" introduced in version 3.25.0 (https://www.sqlite.org/changes.html). In this new behavior, when renaming a table, SQLite would automatically update all the views and triggers referencing to it, which is nice if an app is always using 3.25 or later. However, in practice, almost all android apps have to support older android versions where this behavior is not supported, apps just can't rely on this feature. Other downsides of the new behavior (in the context of android ecosystem) includes: - Because the new behavior would crash an app when a rename would cause a dangling view or trigger *even when the app does have a fix-up step after ALTER RENAME TABLE* in which case it'd just work fine at the end, it is very risky to enable the new behavior on all apps. - This new behavior also means existing upgrade steps (which may have been introduced years ago) could suddenly fail, if the step is executed in R. This means, if an app used an "ALTER TABLE RENAME" in the upgrade step from ver 1 to ver 2 five years ago and never after, and almost all users are already running ver 2 or newer, *if* there's still a user who are on ver 1, upgrading the app to the latest version could suddenly fail on R. Applications wishing to enable the new behavior can enable it at runtime with the following call: SQLiteDatabase db = ....; // open a DB db.execPerConnectionSQL("PRAGMA legacy_alter_table = 0;", null); Test: atest SQLiteSecurityTest Bug: 147928666 Change-Id: I64546deebd3782ed685fcb46498bc487e0f8d5b6
2020-04-29Fix CVE-2019-13734,CVE-2019-13751,CVE-2019-13752, CVE-2019-13753Zim
Test: atest SQLiteSecurityTest Bug: b/147323008 Bug: b/147322738 Bug: b/147320136 Bug: b/147320314 Change-Id: If441c59e4b6d0965def51e3717c06a4e5739ebd3
2019-06-11sqlite: Upgrade to SQLite 3.28.0Haibo Huang
Downloaded from https://sqlite.org/2019/sqlite-autoconf-3280000.tar.gz $ sha1sum sqlite-autoconf-3280000.tar.gz 01b9d8fc77085e144dddc87456c9783e53d09a53 sqlite-autoconf-3280000.tar.gz dist/orig contains the stock sqlite3 code, as packaged in the tar.gz file above. dist contains a copy of dist/orig, but with the Android.patch file applied. The Android specific patch didn't apply cleanly due to merge conflict in shell.c. The conflict was resolved and the patch was regenerated. More details about the release are available here: https://www.sqlite.org/releaselog/3_28_0.html Test: code compiles and device boots with no problems. Test: select sqlite_version() - returns 3.28.0 Test: atest cts/SQLiteDatabaseTest all passed. Test: atest cts/SQLiteSecurityTest Bug: 135048770 Change-Id: Idf38a3adace9f4bd4feab4012c9cc4de3a1c501c
2019-03-25Revert "[fuchsia] Add Fuchsia support to SQLite."Victor Chang
This reverts commit 5148bb2b921ee84709d3924aecbad69d77300aff. Reason for revert: Using deprecated libraries. Merged-In: I6b84f88c9b726e28dc0188ceb0585ec8a732d091 Change-Id: I1b42d09203da163d5abebc7b45bea7b71ac1fd18
2019-03-20[fuchsia] Add Fuchsia support to SQLite.Victor Chang
This enables basic database locking, but there are known weaknesses to this approach. ie. If the process is killed before the *.lock file can be deleted, then the database is perpetually locked. Bug: 120103808 Test: Database locking works. Merged-In: Iac54c5f76e167fef15b490522840d33808d4bc6c Change-Id: Iac54c5f76e167fef15b490522840d33808d4bc6c
2019-03-11DO NOT MERGE - Merge PPRL.190305.001 into masterXin Li
Bug: 127812889 Change-Id: I33d269cfcbc281555c3ebbbb6c30574e41cc673c
2019-01-16RESTRICT AUTOMERGE: Apply security patch to sqlite 3.22.Hui Yu
This patch fixes Magellan SQLite Security Vulnerability as in b/121156452 Download from https://www.sqlite.org/src/info/c255889bd95bd543 Get the Tarball or ZIP Archive, unzip it on linux machine then run: mkdir bld; cd bld; ../configure; make sqlite3.c Copy sqlite3.c, sqlite3.h, sqlite3ext.h, shell.c from bld directory to dist/orig. dist contains a copy of dist/orig, but with the Android.patch file applied. Bug: 121156452 Test: select sqlite_version() - returns 3.22.0 Test: atest cts/SQLiteDatabaseTest all passed. Test: atest cts/SQLSecurityTest Change-Id: Iea1cefe2577ac52da84b24b6d51e1769042e449a Merged-In: Iad8c3d1d74d8591a75a4c033c8bf9d3956d2fe4f (cherry picked from commit 7fbf27c91af1621264154cc09f0fdafb3ba69ed3)
2018-08-22Perfunctory fdsan support for sqlite fds.Josh Gao
Add some basic fdsan support to sqlite, where ownership enforcement is only at a sqlite level (i.e. other code is prevented from accidentally closing sqlite's file descriptors, but sqlite can accidentally close its own file descriptors). Test: debuggerd `pidof system_server` | grep " fd " Change-Id: I8ba23fa174dabb408f92be76b5476e0fe9e6c5dc
2018-02-14sqlite: Upgrade to SQLite 3.22.0Fyodor Kupolov
Downloaded from https://www.sqlite.org/2018/sqlite-autoconf-3220000.tar.gz $ sha1sum sqlite-autoconf-3220000.tar.gz 2fb24ec12001926d5209d2da90d252b9825366ac sqlite-autoconf-3220000.tar.gz dist/orig contains the stock sqlite3 code, as packaged in the tar.gz file above. dist contains a copy of dist/orig, but with the Android.patch file applied. The Android specific patch didn't apply cleanly due to merge conflict in shell.c. The conflict was resolved and the patch was regenerated. More details about the release are available here: https://www.sqlite.org/releaselog/3_22_0.html Test: code compiles and device boots with no problems. Test: select sqlite_version() - returns 3.22.0 Test: cts/SQLiteDatabaseTest Bug: 73005878 Change-Id: Iba62f75ae9b16fe55f6bb6a1c37a718a27d16a73
2017-08-18sqlite: Upgrade to SQLite 3.19.4 releaseFyodor Kupolov
Downloaded from https://sqlite.org/src/tarball/SQLite-605907e7.tar.gz $ shasum SQLite-605907e7.tar.gz 4ac33e2ce69553fdb929e394823267a604b19211 SQLite-605907e7.tar.gz Unpack and run "./configure; make sqlite3.c" to generate the "sqlite3.c", "sqlite3.h", "shell.c", and "sqlite3ext.h" source files dist/orig contains the stock sqlite3 code, as generated from the tar.gz file above. This update simply switches from batch-atomic-write-3.19 branch to an official release. No code changes. Test: manual Bug: 64849849 Change-Id: Ibbf0bca7ec498a670487adf8f0ffbfa19a44bbbf
2017-08-11ICU is disabled by Android.bpJiyong Park
By using vendor.cflags, SQLITE_ENABLE_ICU is on/off from Android.bp. No need to def/undef it inside the source code. Bug: 64514237 Test: BOARD_VNDK_VERSION=current m -j libsqlite libsqlite.vendor Change-Id: If9771fa020e528445275281017e424a5bbc2ae99
2017-08-10Don't use ICU when built for vendorsJiyong Park
libicuuc.so isn't available for vendors, thus ICU is turned off when libsqlite is built for vendors. Bug: 64104535 Test: BOARD_VNDK_VERSION=current m -j libsqlite.vendor Change-Id: I682502ba5bdc5f76a0363a95d01b1081c1bc01a4
2017-08-02sqlite: Upgrade to SQLite 3.19.4Fyodor Kupolov
Downloaded from https://sqlite.org/src/tarball/SQLite-2dd0c77d.tar.gz $ shasum SQLite-2dd0c77d.tar.gz 354575e725f1301ed52984bd06d7b803b2134f5a SQLite-2dd0c77d.tar.gz Unpack and run "./configure; make sqlite3.c" to generate the "sqlite3.c", "sqlite3.h", "shell.c", and "sqlite3ext.h" source files dist/orig contains the stock sqlite3 code, as generated from the tar.gz file above. This release provides a fix for https://sqlite.org/src/info/de3403bf5ae5f72ed The proposed solution makes column names more consistent and easier to understand. It also makes the implementation smaller and simpler and helps it to run a little faster. However, there may be legacy programs that depended on the old behavior (shifting the column naming rule from (2) to (3) when using the query flattener) and those legacy programs could potentially break due to this change. Test: manual + SQLiteDatabaseTest CTS test Bug: 62431773 Change-Id: I44f9bafe888b22b040fa1827962c421b4eab0c3a
2017-08-01sqlite: Upgrade to SQLite 3.19.3 [batch-atomic-write] [NO PARTIAL RERUN]Fyodor Kupolov
Downloaded from https://sqlite.org/src/tarball/SQLite-def55027.tar.gz $ shasum SQLite-def55027.tar.gz 5872660422a1ef8211f57f96f7c8507279a376f7 SQLite-def55027.tar.gz Unpack and run "./configure; make sqlite3.c" to generate the "sqlite3.c", "sqlite3.h", "shell.c", and "sqlite3ext.h" source files dist/orig contains the stock sqlite3 code, as generated from the tar.gz file above. dist contains a copy of dist/orig, but with the Android.patch file applied. Please see Android.patch for a list of differences between stock and Android. Experimental changes from batch-atomic-write-3.19 branch https://sqlite.org/src/info/def55027b1f1db9c With this enhancement, SQLite automatically omits the rollback journal and uses the atomic write capabilities of F2FS when it can. When F2FS atomic write is used, we find that transactions are about 3x faster compared with an ext4 filesystem on the same SSD device. Test: manual + SQLiteDatabaseTest CTS test Bug: 64149514 Change-Id: I920f435748fa1d773be161f3264626d33b11edfd
2017-06-21Revert "sqlite: Upgrade to SQLite 3.19.3"Chad Brubaker
This causes Yahoo Finance to fail on opening with: java.lang.IllegalArgumentException: column '_id' does not exist at android.database.AbstractCursor.getColumnIndexOrThrow(AbstractCursor.java:333) at android.database.CursorWrapper.getColumnIndexOrThrow(CursorWrapper.java:87) Bug: 62431773 Test: App stops crashing This reverts commit 1ea291d14f0cf30fd85f00307dbcb9991912ed2c.
2017-06-08sqlite: Upgrade to SQLite 3.19.3Alex Naidis
Downloaded from https://sqlite.org/2017/sqlite-amalgamation-3190300.zip $ sha256sum sqlite-amalgamation-3190300.zip 130185efe772a7392c5cecb4613156aba12f37b335ef91e171c345e197eabdc1 sqlite-amalgamation-3190300.zip dist/orig contains the stock sqlite3 code, as packaged in the ZIP file above. dist contains a copy of dist/orig, but with the Android.patch file applied. Please see Android.patch for a list of differences between stock and Android. The Android specific patch applied cleanly and was regenerated. This bugfix release contains a fix for a bug which can lead to data corruption. More details about the release are available here: https://sqlite.org/releaselog/3_19_3.html Change-Id: I13cede802129bef64a183915827d422e1d609464 Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-05-28sqlite: Upgrade to SQLite 3.19.2Alex Naidis
Downloaded from https://sqlite.org/2017/sqlite-amalgamation-3190200.zip $ sha256sum sqlite-amalgamation-3190200.zip c85282af6ef30538dfc74d1814c87547df8588d970b9360cadd66d096bcfd20a sqlite-amalgamation-3190200.zip dist/orig contains the stock sqlite3 code, as packaged in the ZIP file above. dist contains a copy of dist/orig, but with the Android.patch file applied. Please see Android.patch for a list of differences between stock and Android. The Android specific patch applied cleanly and was regenerated. 3.19.0 is a regular maintenance release which contains performance improvements to the query planner and some non-critical bug fixes. 3.19.1 is a high-priority bugfix release which fixes a critical regression. 3.19.2 is another high-priority bugfix release which fixes the regression described in bug 62025391. More details about the release are available here: https://sqlite.org/releaselog/3_19_2.html Change-Id: Ifb8b0fd23e6306b576c2c947dcab45d811e4becb Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-05-23Revert "sqlite: Upgrade to SQLite 3.19.0"Nick Kralevich
Drive app crashes on launch. Root cause unknown. Searching for native crashes in /usr/local/google/tmp/tmpwroWkU Revision: 'rev_a' pid: 3813, tid: 3858, name: AppsPredictFetc >>> com.google.android.apps.docs <<< signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x2 x0 000000725a046588 x1 000000725a112fc8 x2 ffffffffffffffff x3 0000000000000020 x4 0000000000000020 x5 0000000000000000 x6 0000000000000000 x7 ffffffffffffffff x8 0000000000000000 x9 0000000000000006 x10 0000000000000080 x11 0000000000000080 x12 0000000000000038 x13 000000725a111000 x14 0000000000000000 x15 003b9aca00000000 x16 0000007272bdabc0 x17 0000007272527500 x18 0000000000000020 x19 0000000000000017 x20 000000725a112908 x21 0000000000000006 x22 000000725a111000 x23 000000725a111000 x24 0000007272bc0ad0 x25 00000072593fd2f0 x26 000000725a09db10 x27 000000725a046400 x28 0000000000000000 x29 00000072593fd3c0 x30 0000007272b07668 sp 00000072593fd160 pc 0000007272b07824 pstate 0000000080000000 Using arm64 toolchain from: /usr/local/stackserver/master/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/ Stack Trace: RELADDR FUNCTION FILE:LINE 0000000000042824 sqlite3VdbeExec+6628 external/sqlite/dist/sqlite3.c:80728 v--------------> sqlite3Step external/sqlite/dist/sqlite3.c:76693 0000000000016ec4 sqlite3_step+2572 external/sqlite/dist/sqlite3.c:76754 00000000000e9ea8 android::nativeExecuteForCursorWindow(_JNIEnv*, _jclass*, long, long, long, int, int, unsigned char)+440 frameworks/base/core/jni/android_database_SQLiteConnection.cpp:696 This reverts commit df94a5ddeff8b445868ed01f841d7c279b93395f. Bug: 62025391 Change-Id: I4c3577529346880094d27bcffd39550b60c2e572
2017-05-22sqlite: Upgrade to SQLite 3.19.0Alex Naidis
Downloaded from https://sqlite.org/2017/sqlite-amalgamation-3190000.zip $ sha256sum sqlite-amalgamation-3190000.zip 9c452a117cf72e41fec97f6cd6c3832bd09750ded1a88d89d49ccb2d6cf910ac sqlite-amalgamation-3190000.zip dist/orig contains the stock sqlite3 code, as packaged in the ZIP file above. dist contains a copy of dist/orig, but with the Android.patch file applied. Please see Android.patch for a list of differences between stock and Android. The Android specific patch applied cleanly and was regenerated. This is a regular maintenance release which contains performance improvements to the query planner and some non-critical bug fixes. More details about the release are available here: https://sqlite.org/releaselog/3_19_0.html Change-Id: I4617148f0e20498e0bbca76207bd5a43918475b9 Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-03-31sqlite: Upgrade to SQLite 3.18.0Alex Naidis
Downloaded from https://sqlite.org/2017/sqlite-amalgamation-3180000.zip $ sha256sum sqlite-amalgamation-3180000.zip 1cfb91106650a12840e107db29f2ec4afe3d7f9dc5936770ef53bc3eb6387b6e sqlite-amalgamation-3180000.zip dist/orig contains the stock sqlite3 code, as packaged in the ZIP file above. dist contains a copy of dist/orig, but with the Android.patch file applied. Please see Android.patch for a list of differences between stock and Android. The Android specific patch had a conflict in shell.c. The conflict was resolved without issues. This major release contains the protection feature "LIMIT_VDBE_OP", performance improvements, bug fixes and various other enhancements. More details about the release are available here: https://sqlite.org/releaselog/3_18_0.html Change-Id: If9c32f48f2769b389892ab0256614d8b5eb87324 Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-02-13sqlite: Upgrade to SQLite 3.17.0Alex Naidis
Downloaded from https://sqlite.org/2017/sqlite-amalgamation-3170000.zip $ sha256sum sqlite-amalgamation-3170000.zip ad3d5152f7dd09117654736b416e656c46de83b251e71a14b9a2de3aab29cfb2 sqlite-amalgamation-3170000.zip dist/orig contains the stock sqlite3 code, as packaged in the ZIP file above. dist contains a copy of dist/orig, but with the Android.patch file applied. Please see Android.patch for a list of differences between stock and Android. The Android specific patch applied cleanly and was regenerated. This major release contains many performance improvements, some of which will increase the memory consumption. It also uses about 6.5% fewer CPU cycles. More details about the release are available here: https://sqlite.org/releaselog/3_17_0.html Change-Id: I236e27a22880f783358941e00059a1ee50a06e75 Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-01-08sqlite: upgrade to SQLite 3.16.2Alex Naidis
Downloaded from https://sqlite.org/2017/sqlite-amalgamation-3160200.zip $ sha256sum sqlite-amalgamation-3160200.zip 3ea98729366ec1d38d13a860aa10cfe29a355bfe089c32080987e2771514c42b sqlite-amalgamation-3160200.zip dist/orig contains the stock sqlite3 code, as packaged in the ZIP file above. dist contains a copy of dist/orig, but with the Android.patch file applied. Please see Android.patch for a list of differences between stock and Android. The Android specific patch applied cleanly and was regenerated. This minor release contains critical bug fixes. More details about the release are available here: https://sqlite.org/releaselog/3_16_2.html Change-Id: I6ce37ee6b95f8b47bf9935cd19430d102361a7d4 Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-01-03sqlite: upgrade to SQLite 3.16.1Alex Naidis
Downloaded from https://www.sqlite.org/2017/sqlite-amalgamation-3160100.zip $ sha256sum sqlite-amalgamation-3160100.zip 7c75d544d6a1627b176a17999a22ca871acab33c686ae0e3a2553bde475aa1f9 sqlite-amalgamation-3160100.zip dist/orig contains the stock sqlite3 code, as packaged in the ZIP file above. dist contains a copy of dist/orig, but with the Android.patch file applied. Please see Android.patch for a list of differences between stock and Android. The Android specific patch applied cleanly and was regenerated. This minor release contains a critical bug fix for row values within triggers. More details about the release is avaliable here: https://sqlite.org/releaselog/3_16_1.html Change-Id: Id00c0f6d11b2e9fe418b71fc4b373dae12e9ef0a Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-01-02sqlite: upgrade to SQLite 3.16.0Luca Stefani
Downloaded from https://www.sqlite.org/2017/sqlite-amalgamation-3160000.zip $ sha256sum sqlite-amalgamation-3160000.zip 3b5dfb65807e2b17e6463357df848e322badba01dc9a4a1de8fdbb72d448e3b0 sqlite-amalgamation-3160000.zip dist/orig contains the stock sqlite3 code, as packaged in the ZIP file above. dist contains a copy of dist/orig, but with the Android.patch file applied. Please see Android.patch for a list of differences between stock and Android. The Android specific patch applied cleanly and was regenerated. This major release contains new features, a few bug fixes and also optimizations which reduce CPU cycles by 9% on common workload. More details about the release is avaliable here: https://sqlite.org/releaselog/3_16_0.html Change-Id: I14ccbd3dc05dba580c7401321df1b58b02068bf7
2016-12-09sqlite: upgrade to SQLite 3.15.2Park Ju Hyung
Downloaded from https://www.sqlite.org/2016/sqlite-amalgamation-3150200.zip $ sha256sum sqlite-amalgamation-3150200.zip 37e4bffc5568434267617a83671e0b9b39bbcb3732fd75cbcbce250cbd5fd091 sqlite-amalgamation-3150200.zip dist/orig contains the stock sqlite3 code, as packaged in the ZIP file above. dist contains a copy of dist/orig, but with the Android.patch file applied. Please see Android.patch for a list of differences between stock and Android. The Android specific patch applied cleanly and was regenerated. This minor release contains bug fixes. More details about the release is avaliable here: https://sqlite.org/releaselog/3_15_2.html Change-Id: I684208e2b2ab41cf6edd97ed719e9c9db3f7edeb Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com> Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2016-11-05sqlite: upgrade to SQLite 3.15.1Alex Naidis
Downloaded from https://www.sqlite.org/2016/sqlite-amalgamation-3150100.zip $ sha256sum sqlite-amalgamation-3150000.zip 7143be3e0b48aa687858ab4767b7d4a79a47de26ca159c6fab6e87b6c7f10fe4 sqlite-amalgamation-3150100.zip dist/orig contains the stock sqlite3 code, as packaged in the ZIP file above. dist contains a copy of dist/orig, but with the Android.patch file applied. Please see Android.patch for a list of differences between stock and Android. The Android specific patch applied cleanly and was regenerated. This minor release contains critical bug fixes, some of them were classified as "immediate". More details about the release is avaliable here: https://sqlite.org/releaselog/3_15_1.html Change-Id: Ib9f7f419ec64c75865c41e0c04db19835f9ed571 Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2016-10-14sqlite: upgrade to SQLite 3.15.0Alex Naidis
Downloaded from https://www.sqlite.org/2016/sqlite-amalgamation-3150000.zip $ sha256sum sqlite-amalgamation-3150000.zip 356109b55f76a9851f9bb90e8e3d722da222e26f657f76a471fdf4d7983964b9 sqlite-amalgamation-3150000.zip dist/orig contains the stock sqlite3 code, as packaged in the ZIP file above. dist contains a copy of dist/orig, but with the Android.patch file applied. Please see Android.patch for a list of differences between stock and Android. The Android specific patch applied mostly clean. One of the "SQLITE_IOERR_FSTAT" failed to apply since the location moved in code. We are dropping the Android specific change for this case. The Android specific patch was regenerated. This major release contains new features, a lot of bug fixes and also optimizations which reduce CPU usage by more than 7% on common workload. More details about the release is avaliable here: https://sqlite.org/releaselog/3_15_0.html Change-Id: Ib21644ee7a64f482403646be190dcb4b5a0fcdab Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2016-08-16sqlite: upgrade to SQLite 3.14.1Alex Naidis
Downloaded from https://www.sqlite.org/2016/sqlite-amalgamation-3140100.zip $ sha256sum sqlite-amalgamation-3140100.zip b7a8bccbe55df471f3f4ba84e789372606025eaccd09b05f80a41591282a2a41 sqlite-amalgamation-3140100.zip dist/orig contains the stock sqlite3 code, as packaged in the ZIP file above. dist contains a copy of dist/orig, but with the Android.patch file applied. Please see Android.patch for a list of differences between stock and Android. The Android specific patch applied cleanly and was regenerated. This very minor release contains a performance enhancement to the page-cache "truncate" operation. More details about the release is avaliable here: http://sqlite.com/releaselog/3_14_1.html Change-Id: I0a2581dc64a2bb327fdd4bded7539882848c4321 Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2016-08-09sqlite: upgrade to SQLite 3.14.0Alex Naidis
Downloaded from http://sqlite.com/2016/sqlite-amalgamation-3140000.zip $ sha256sum sqlite-amalgamation-3140000.zip 32843740eaaa4d9ac567d6babe18099ef6f38c6731718c2d37b26d381c629ec8 sqlite-amalgamation-3140000.zip dist/orig contains the stock sqlite3 code, as packaged in the ZIP file above. dist contains a copy of dist/orig, but with the Android.patch file applied. Please see Android.patch for a list of differences between stock and Android. The Android specific patch applied cleanly and was regenerated. This is a routine maintenance release of SQLite that includes a number of new features and performance enhancements as well as fixes for some obscure bugs. See the changelog (http://www.sqlite.org/releaselog/3_14.html) for details. Change-Id: I85ee07a6f8e693dfd88ff343fae932ee6be5771d Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2016-08-07sqlite: upgrade to SQLite 3.13.0Alex Naidis
Downloaded from http://sqlite.com/2016/sqlite-amalgamation-3130000.zip $ sha256sum sqlite-amalgamation-3130000.zip f9ef8811f5f221d81a3ba811a8dfdcc54b19acc6d8032c74719ff95ed0026611 sqlite-amalgamation-3130000.zip dist/orig contains the stock sqlite3 code, as packaged in the ZIP file above. dist contains a copy of dist/orig, but with the Android.patch file applied. Please see Android.patch for a list of differences between stock and Android. The Android specific patch for sqlite3.c failed to apply cleanly. The conflicts were resolved and the Android.patch file was regenerated. It is to note that the Android specific changes from "off_t" to "off64_t" for "osPread64" and "osPwrite64" are no longer necessary. Upstream applied these changes in the newest 3.13.0 release. Also this patch deletes the dist/version file as it is obsoleted and replaced by README.version for Android. The changes in the new releases can be found here: https://www.sqlite.org/changes.html Change-Id: I20001055339015b3c05836f7cef7b724700b08a9 Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2016-04-16reduce differences between Android and upstreamNick Kralevich
Move HAVE_POSIX_FALLOCATE into Android.mk, rather than assigning this in sqlite3.c. This customization was added in 1eb051da2d460037a748d574b128cdd33b6d8b28. Remove an unnecessary whitespace difference. Change-Id: Id4d6c48b59983ebb4c7160ca364d247febb4e543
2015-12-23sqlite: upgrade to SQLite 3.9.2Nick Kralevich
Downloaded from https://www.sqlite.org/2015/sqlite-amalgamation-3090200.zip $ sha256sum sqlite-amalgamation-3090200.zip 567139c94375e3808a11f34d81f534d0c257e2c498cddbf4cac283d74b51fe9c sqlite-amalgamation-3090200.zip dist/orig contains the stock sqlite3 code, as packaged in the ZIP file above. dist contains a copy of dist/orig, but with the Android.patch file applied. Please see Android.patch for a list of differences between stock and Android. One Android specific patch failed to apply cleanly. However, this patch was a whitespace only patch, so it has been dropped from Android.patch. All other android specific patches applied cleanly. Changes since 3.8.10.2 (from https://www.sqlite.org/changes.html): 2015-11-03 (3.9.2) * Fix the schema parser so that it interprets certain (obscure and ill-formed) CREATE TABLE statements the same as legacy. Fix for ticket ac661962a2aeab3c331 * Fix a query planner problem that could result in an incorrect answer due to the use of automatic indexing in subqueries in the FROM clause of a correlated 2015-10-16 (3.9.1) * Fix the json1 extension so that it does not recognize ASCII form-feed as a whitespace character, in order to comply with RFC-7159. Fix for ticket 57eec374ae1d0a1d * Add a few #ifdef and build script changes to address compilation issues that appeared after the 3.9.0 release. 2015-10-14 (3.9.0) Policy Changes: The version numbering conventions for SQLite are revised to use the emerging standard of semantic versioning. New Features And Enhancements: * Added the json1 extension module in the source tree, and in the amalgamation. Enable support using the SQLITE_ENABLE_JSON1 compile-time option. * Added Full Text Search version 5 (FTS5) to the amalgamation, enabled using SQLITE_ENABLE_FTS5. FTS5 will be considered "experimental" (subject to incompatible changes) for at least one more release cycle. * The CREATE VIEW statement now accepts an optional list of column names following the view name. * Added support for indexes on expressions. * Added support for table-valued functions in the FROM clause of a SELECT statement. * Added support for eponymous virtual tables. * A VIEW may now reference undefined tables and functions when initially created. Missing tables and functions are reported when the VIEW is used in a query. * Added the sqlite3_value_subtype() and sqlite3_result_subtype() interfaced (used by the json1 extension). * The query planner is now able to use partial indexes that contain AND-connected terms in the WHERE clause. * The sqlite3_analyzer.exe utility is updated to report the depth of each btree and to show the average fanout for indexes and WITHOUT ROWID tables. * Enhanced the dbstat virtual table so that it can be used as a table-valued function where the argument is the schema to be analyzed. Other changes: * The sqlite3_memory_alarm() interface, which has been deprecated and undocumented for 8 years, is changed into a no-op. Important fixes: * Fixed a critical bug in the SQLite Encryption Extension that could cause the database to become unreadable and unrecoverable if a VACUUM command changed the size of the encryption nonce. * Added a memory barrier in the implementation of sqlite3_initialize() to help ensure that it is thread-safe. * Fix the OR optimization so that it always ignores subplans that do not use an index. * Do not apply the WHERE-clause pushdown optimization on terms that originate in the ON or USING clause of a LEFT JOIN. Fix for ticket c2a19d81652f40568c. 2015-07-29 (3.8.11.1) * Restore an undocumented side-effect of PRAGMA cache_size: force the database schema to be parsed if the database has not been previously accessed. * Fix a long-standing problem in sqlite3_changes() for WITHOUT ROWID tables that was reported a few hours after the 3.8.11 release. 2015-07-27 (3.8.11) * Added the experimental RBU extension. Note that this extension is experimental and subject to change in incompatible ways. * Added the experimental FTS5 extension. Note that this extension is experimental and subject to change in incompatible ways. * Added the sqlite3_value_dup() and sqlite3_value_free() interfaces. * Enhance the spellfix1 extension to support ON CONFLICT clauses. * The IS operator is now able to drive indexes. * Enhance the query planner to permit automatic indexing on FROM-clause subqueries that are implemented by co-routine. * Disallow the use of "rowid" in common table expressions. * Added the PRAGMA cell_size_check command for better and earlier detection of database file corruption. * Added the matchinfo 'b' flag to the matchinfo() function in FTS3. * Improved fuzz-testing of database files, with fixes for problems found. * Add the fuzzcheck test program and automatically run this program using both SQL and database test cases on "make test". * Added the SQLITE_MUTEX_STATIC_VFS1 static mutex and use it in the Windows VFS. * The sqlite3_profile() callback is invoked (by sqlite3_reset() or sqlite3_finalize()) for statements that did not run to completion. * Enhance the page cache so that it can preallocate a block of memory to use for the initial set page cache lines. Set the default preallocation to 100 pages. Yields about a 5% performance increase on common workloads. * Miscellaneous micro-optimizations result in 22.3% more work for the same number of CPU cycles relative to the previous release. SQLite now runs twice as fast as version 3.8.0 and three times as fast as version 3.3.9. (Measured using cachegrind on the speedtest1.c workload on Ubuntu 14.04 x64 with gcc 4.8.2 and -Os. Your performance may vary.) * Added the sqlite3_result_zeroblob64() and sqlite3_bind_zeroblob64() interfaces. Important bug fixes: * Fix CREATE TABLE AS so that columns of type TEXT never end up holding an INT value. Ticket f2ad7de056ab1dc9200 * Fix CREATE TABLE AS so that it does not leave NULL entries in the sqlite_master table if the SELECT statement on the right-hand side aborts with an error. Ticket 873cae2b6e25b * Fix the skip-scan optimization so that it works correctly when the OR optimization is used on WITHOUT ROWID tables. Ticket 8fd39115d8f46 * Fix the sqlite3_memory_used() and sqlite3_memory_highwater() interfaces so that they actually do provide a 64-bit answer. Change-Id: Ic59c75950fe54b2ae3a2dabe5fe22f3fb4225e83
2015-06-12sqlite: upgrade to SQLite 3.8.10.2Nick Kralevich
Downloaded from https://www.sqlite.org/2015/sqlite-amalgamation-3081002.zip $ sha256sum sqlite-amalgamation-3081002.zip 8272ba79711bf7f64a029d5976ce565ef3fb9bdbbb8b18affdae83d0dd60d61b sqlite-amalgamation-3081002.zip dist/orig contains the stock sqlite3 code, as packaged in the ZIP file above. dist contains a copy of dist/orig, but with the Android.patch file applied. Please see Android.patch for a list of differences between stock and Android. All Android specific patches applied cleanly. Description of changes compared to SQLite 3.8.10: 2015-05-20 (3.8.10.2) * Fix an index corruption issue introduced by version 3.8.7. An index with a TEXT key can be corrupted by an INSERT into the corresponding table if the table has two nested triggers that convert the key value to INTEGER and back to TEXT again. Ticket 34cd55d68e0 * SQLITE_SOURCE_ID: "2015-05-20 18:17:19 2ef4f3a5b1d1d0c4338f8243d40a2452cc1f7fe4" * SHA1 for sqlite3.c: 638abb77965332c956dbbd2c8e4248e84da4eb63 2015-05-09 (3.8.10.1) * Make sqlite3_compileoption_used() responsive to the SQLITE_ENABLE_DBSTAT_VTAB compile-time option. * Fix a harmless warning in the command-line shell on some versions of MSVC. * Fix minor issues with the dbstat virtual table. * SQLITE_SOURCE_ID: "2015-05-09 12:14:55 05b4b1f2a937c06c90db70c09890038f6c98ec40" * SHA1 for sqlite3.c: 85e4e1c08c7df28ef61bb9759a0d466e0eefbaa2 Change-Id: I60ba181489dc010683f8aabfff37cc7fee17b455
2015-05-08sqlite: upgrade to SQLite 3.8.10Nick Kralevich
Downloaded from https://www.sqlite.org/2015/sqlite-amalgamation-3081000.zip $ sha256sum sqlite-amalgamation-3081000.zip b864bf802584e54a881db4ab9c8fb54b51339b2dc2c66f97fbf88ae4ee052ff8 sqlite-amalgamation-3081000.zip dist/orig contains the stock sqlite3 code, as packaged in the ZIP file above. dist contains a copy of dist/orig, but with the Android.patch file applied. Please see Android.patch for a list of differences between stock and Android. One Android patch failed to apply cleanly, due to a change in how one variable is handled. The patch was fixed. Other than that, no changes to the Android specific patches. Description of changes compared to SQLite 3.8.9: SQLite Release 3.8.10 On 2015-05-07 Added the sqldiff.exe utility program for computing the differences between two SQLite database files. Added the y format string to the matchinfo() function of FTS3. Performance improvements for ORDER BY, VACUUM, CREATE INDEX, PRAGMA integrity_check, and PRAGMA quick_check. Fix many obscure problems discovered while SQL fuzzing. Identify all methods for important objects in the interface documentation. (example) Made the American Fuzzy Lop fuzzer a standard part of SQLite's testing strategy. Add the ".binary" and ".limits" commands to the command-line shell. Make the "dbstat" virtual table part of standard builds when compiled with the SQLITE_ENABLE_DBSTAT_VTAB option. SQLITE_SOURCE_ID: "2015-05-07 11:53:08 cf975957b9ae671f34bb65f049acf351e650d437" SHA1 for sqlite3.c: 0b34f0de356a3f21b9dfc761f3b7821b6353c570 (cherrypicked from commit 3d169392f9f40c9a3a1571aa4be8da49ad3c0f8e) Change-Id: I9d298922ddf405a597781749c8b39caee4ea638b
2015-04-08sqlite: upgrade to SQLite 3.8.9Nick Kralevich
Downloaded from http://www.sqlite.org/2015/sqlite-amalgamation-3080900.zip $ sha256sum sqlite-amalgamation-3080900.zip 40a9f51a250fc41f6b5053a778681c622d82dec592c85de21edd3640eeb5f093 sqlite-amalgamation-3080900.zip dist/orig contains the stock sqlite3 code, as packaged in the ZIP file above. dist contains a copy of dist/orig, but with the Android.patch file applied. Please see Android.patch for a list of differences between stock and Android. No new patches are introduced. Bug: 20099586 Change-Id: Ic7be6d920698984dee67458678086e88db9a06d3
2015-01-14Revert "Store inodes in unsigned long long"Narayan Kamath
This reverts commit 006c79750f8494ea445316f608905216693c6814. We've committed a better fix, and we shouldn't encourage folks to copy paste this workaround. bug: 19012244
2014-11-19Store inodes in unsigned long longMartin Storsjo
In 32 bit ABIs, ino_t is a 32 bit type, while the st_ino field in struct stat is 64 bits wide in both 32 and 64 bit processes. This means that struct stat can expose inode numbers that are truncated when stored in an ino_t. The SDCard fuse daemon (/system/bin/sdcard) uses raw pointer values as inode numbers, so on 64 bit devices, we're very likely to observe inodes that need > 32 bits to represent. The fileHasMoved function in sqlite compares the stored inode value with a new one from stat, and when the stored value is truncated, this check will falsely indicate that the file has been moved. When the fileHasMoved function triggers, other functions start returning errors indicating that the database is in read-only mode. NOTE: Bionic differs from glibc in that struct stat's st_ino is *always* 64 bits wide, and not the same width as ino_t. bug: https://code.google.com/p/android/issues/detail?id=79994 bug: 18434265 (cherry picked from commit eef2c43133524ac629db4b083681c2bcc7542122) Change-Id: I832e0084e86c9a31519764d87df499ece05b488d
2014-08-20Upgrade SQLite to v3.8.6.Jeff Brown
Bug: 15526305 Change-Id: Ib2c187345f845a0f86e25851b7d657c73e9b4ee4
2014-06-06sqlite: upgrade to SQLite 3.8.5Nick Kralevich
Downloaded from http://www.sqlite.org/2014/sqlite-amalgamation-3080500.zip $ sha256sum sqlite-amalgamation-3080500.zip d9d5a78a5449baa54b2bc62f74f756af81ce74f953f7f0f39aa8b47b2d862029 sqlite-amalgamation-3080500.zip dist/orig contains the stock sqlite3 code, as packaged in the ZIP file above. dist contains a copy of dist/orig, but with the Android.patch file applied. Please see Android.patch for a list of differences between stock and Android. Change-Id: I675bc26116b8f02aa3ce841e48fa2ef940ffbe61
2014-05-29sqlite: upgrade to SQLite 3.8.4.3Nick Kralevich
Downloaded from http://www.sqlite.org/snapshot/sqlite-amalgamation-201405271818.zip $ sha256sum sqlite-amalgamation-3080403.zip 8bac4a9cf70270ca514db9b740e0950e7fca0c656119b42454376b7d5769b3d8 sqlite-amalgamation-3080403.zip dist/orig contains the stock sqlite3 code, as packaged in the ZIP file above. dist contains a copy of dist/orig, but with the Android.patch file applied. Please see Android.patch for a list of differences between stock and Android. Bug: 15288755 Change-Id: I05f0c302ecb0e6c251cbe8c888f07cf2e0498855
2014-02-28disable fts3_tokenizerNick Kralevich
Bug: 13177500 Change-Id: I1581c7ca8ac6d931375fc2cbcbe13f43513ce3c7
2013-05-23Fix for fts backward compatibility of previous commityi.jang
Add hashDestroy function pointer as a destroy handler in fts initialize code that had been removed by previous commit Change-Id: I0195e64da1cb470b5146f05bfe880ca62fb6d114
2013-02-07Merge changes Ieecda65d,Idf3cbdabJeffrey Brown
* changes: Fix bugs of database corruption following IO error on systems supporting atomic-write Fix bugs of sqlite that returns SIGBUS on disk full in WAL mode
2012-12-27Fix bugs of database corruption following IO error on systems supporting ↵Yongil Jang
atomic-write SQLite on Android uses AUTO_VACUUM option. When the disk space is critically low and atomic-write option is enabled, SQLite writes transactions that modify a single database page on disk without creating a journal file. Due to a bug, if an IO or disk full error occurs while transferring the contents to disk, the single page that was modified in the cache is not being rolled back - cache corruption. As a result, applications get a database corruption exception for next database transactions. This patch changes createFile() to close pReal in case of IO error. Therefore, cache is being rolled back. This patch is originated from www.sqlite.org. (URL: http://www.sqlite.org/src/tktview?name=df678d738a) Change-Id: Ieecda65d8458cb591bd4d89d8b423a4479f50ea8
2012-12-10Fix bugs of sqlite that returns SIGBUS on disk full in WAL modegit-lg-database.lge.com
Attempts to prepare a query on a WAL database when the disk space is critically low result in the process killed with SIGBUS. The crash happens in walIndexWriteHdr invoked from walIndexRecover. Some Providers that using WAL mode like as SettingsProvider and MediaProvider get failed in case of disk full with SIGBUS. This patch changes unixShmMap() to call fallocate() instead of ftruncate. In case of disk full, fallocate() will return SQLITE_FULL. This patch is originated from www.sqlite.org. (URL: http://www.sqlite.org/src/info/5eaa61ea18) To simplify error status, returned error code is changed from SQLITE_IOERR_SHMSIZE to SQLITE_FULL. [written by Yongil Jang <yi.jang@lge.com>] Change-Id: Idf3cbdab1ed4a4f2bc1b2b93ab6d8900edc7ee05
2012-12-06Change android fix for fts backward compatibility patch of sqlite3.c for ↵git-lg-database.lge.com
newer sqlite version From earlier version of Android, patch of FTS3 backwards compatibility is kept until now. But, this patch doesn't work well on newer version of sqlite3 (3.7.13~) when it was used. Currently, sqlite3Fts3Init function is called three times to register "fts1", "fts2" and "fts3" with the same module. It worked very well on earlier version of sqlite but not for newer version. hashDestroy() function makes an error when it is called after the first destroy of fts3Module. sqlite3Fts3Init() function initializes "fts4" module and it is called three times to initialize "fts1" and "fts2". This patch contains changed source code of sqlite3Fts3Init() function to be called once. [written by Yongil Jang <yi.jang@lge.com>] Change-Id: I55f522b55f421f73e83508cfc5e08514bd7da925
2012-06-14Add more logging to track down disk I/O errors.Jeff Brown
Bug: 6538393 Change-Id: Iaa20c8bc01c53da08ff18cb1efae80c2be0b0584
2012-04-19Upgrade to SQLite 3.7.11.Jeff Brown
Bug: 6176510 Change-Id: I482e980b3377a9606fc23e72fd25d0c648f718d4
2012-02-29Use fdatasync() to improve performance.Jeff Brown
Linux has a working fdatasync() so we should use it! This change alone improves performance by around 20% by reducing the number of synchronous I/O writes of irrelevant metadata changes. Change-Id: Iebe0c32a7e018ec0ced2347b7d62b2b7dc5aa376