diff options
author | Haibo Huang <hhb@google.com> | 2019-06-11 14:59:02 -0700 |
---|---|---|
committer | Haibo Huang <hhb@google.com> | 2019-06-11 23:49:27 +0000 |
commit | 880009beeff9e3c1723d8806caa063dc1cee9a0c (patch) | |
tree | bb61070a84573cd064524e9c09f02f748c070852 /dist/Android.patch | |
parent | 6d1591ee346f7582e92fe4ba3509433da636fe58 (diff) |
sqlite: Upgrade to SQLite 3.28.0
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
Diffstat (limited to 'dist/Android.patch')
-rw-r--r-- | dist/Android.patch | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/dist/Android.patch b/dist/Android.patch index 307a832..7ecbecb 100644 --- a/dist/Android.patch +++ b/dist/Android.patch @@ -1,5 +1,5 @@ ---- orig/shell.c 2018-04-17 11:53:05.520972146 +0100 -+++ shell.c 2019-03-14 19:26:19.523122555 +0000 +--- orig/shell.c 2019-06-11 15:05:36.341739007 -0700 ++++ shell.c 2019-06-11 15:05:36.401739332 -0700 @@ -87,6 +87,12 @@ #endif #include <ctype.h> @@ -13,33 +13,33 @@ #if !defined(_WIN32) && !defined(WIN32) # include <signal.h> -@@ -10389,6 +10395,23 @@ - editFunc, 0, 0); +@@ -11698,6 +11704,23 @@ sqlite3_create_function(p->db, "edit", 2, SQLITE_UTF8, 0, editFunc, 0, 0); + #endif + -+ // Begin Android Add -+ #ifndef NO_ANDROID_FUNCS -+ AIcu_initializeIcuOrDie(); -+ int err = register_localized_collators(p->db, "en_US", 0); -+ if (err != SQLITE_OK) { -+ fprintf(stderr, "register_localized_collators() failed\n"); -+ exit(1); -+ } -+ err = register_android_functions(p->db, 0); -+ if (err != SQLITE_OK) { -+ fprintf(stderr, "register_android_functions() failed\n"); -+ exit(1); -+ } -+ #endif -+ // End Android Add ++// Begin Android Add ++#ifndef NO_ANDROID_FUNCS ++ AIcu_initializeIcuOrDie(); ++ int err = register_localized_collators(p->db, "en_US", 0); ++ if (err != SQLITE_OK) { ++ fprintf(stderr, "register_localized_collators() failed\n"); ++ exit(1); ++ } ++ err = register_android_functions(p->db, 0); ++ if (err != SQLITE_OK) { ++ fprintf(stderr, "register_android_functions() failed\n"); ++ exit(1); ++ } ++#endif ++// End Android Add + if( p->openMode==SHELL_OPEN_ZIPFILE ){ char *zSql = sqlite3_mprintf( "CREATE VIRTUAL TABLE zip USING zipfile(%Q);", p->zDbFilename); ---- orig/sqlite3.c 2019-03-11 19:52:44.237549639 +0000 -+++ sqlite3.c 2019-03-11 19:52:44.293549396 +0000 -@@ -30672,6 +30672,10 @@ +--- orig/sqlite3.c 2019-06-11 15:05:36.393739289 -0700 ++++ sqlite3.c 2019-06-11 15:05:36.449739593 -0700 +@@ -32438,6 +32438,10 @@ # include <sys/mount.h> #endif @@ -50,7 +50,7 @@ #ifdef HAVE_UTIME # include <utime.h> #endif -@@ -31422,6 +31426,12 @@ +@@ -33197,6 +33201,12 @@ #if defined(FD_CLOEXEC) && (!defined(O_CLOEXEC) || O_CLOEXEC==0) osFcntl(fd, F_SETFD, osFcntl(fd, F_GETFD, 0) | FD_CLOEXEC); #endif @@ -63,7 +63,7 @@ } return fd; } -@@ -31954,7 +31964,13 @@ +@@ -33777,7 +33787,13 @@ ** and move on. */ static void robust_close(unixFile *pFile, int h, int lineno){ @@ -77,7 +77,7 @@ unixLogErrorAtLine(SQLITE_IOERR_CLOSE, "close", pFile ? pFile->zPath : 0, lineno); } -@@ -34428,7 +34444,7 @@ +@@ -36310,7 +36326,7 @@ SimulateIOError( rc=1 ); if( rc!=0 ){ storeLastErrno((unixFile*)id, errno); @@ -86,7 +86,7 @@ } *pSize = buf.st_size; -@@ -34464,7 +34480,7 @@ +@@ -36346,7 +36362,7 @@ struct stat buf; /* Used to hold return values of fstat() */ if( osFstat(pFile->h, &buf) ){ @@ -95,7 +95,7 @@ } nSize = ((nByte+pFile->szChunk-1) / pFile->szChunk) * pFile->szChunk; -@@ -35139,7 +35155,7 @@ +@@ -37032,7 +37048,7 @@ ** with the same permissions. */ if( osFstat(pDbFd->h, &sStat) ){ @@ -104,7 +104,7 @@ goto shm_open_err; } -@@ -118054,7 +118070,7 @@ +@@ -123984,7 +124000,7 @@ } if( pDb->pSchema->file_format>SQLITE_MAX_FILE_FORMAT ){ sqlite3SetString(pzErrMsg, db, "unsupported file format"); @@ -113,7 +113,7 @@ goto initone_error_out; } -@@ -152769,13 +152785,25 @@ +@@ -164271,13 +164287,25 @@ ** module with sqlite. */ if( SQLITE_OK==rc |