Skip to content
This repository has been archived by the owner on Dec 21, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
* upstream/master:
  sqlite: Upgrade to SQLite 3.28.0
  Turn off the new pass manager due to miscompile
  Enable native_bridge_support for libsqlite
  Revert "[fuchsia] Add Fuchsia support to SQLite."
  [fuchsia] Add Fuchsia support to SQLite.
  Switch to use aicu/AIcu.h
  RESTRICT AUTOMERGE: Apply security patch to sqlite 3.22.
  RESTRICT AUTOMERGE: Apply security patch to sqlite 3.22.
  RESTRICT AUTOMERGE: Apply security patch to sqlite 3.19.
  Apply security patch to sqlite 3.18.
  RESTRICT AUTOMERGE: Apply security patch to sqlite 3.9.
  • Loading branch information
grendello committed Jun 19, 2019
2 parents 8e3b77b + f26d1a1 commit 46204c4
Show file tree
Hide file tree
Showing 12 changed files with 87,904 additions and 51,719 deletions.
4 changes: 2 additions & 2 deletions README.version
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
URL: https://www.sqlite.org/2018/sqlite-autoconf-3220000.tar.gz
Version: 3.22.0 0c55d179733b46d8
URL: https://sqlite.org/2019/sqlite-autoconf-3280000.tar.gz
Version: 3.28.0 884b4b7e
BugComponent: 24950
1 change: 1 addition & 0 deletions android/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ cc_library_static {
name: "libsqlite3_android",
vendor_available: true,
host_supported: true,
native_bridge_supported: true,
cflags: [
"-DSQLITE_ENABLE_ICU",
"-Wall",
Expand Down
8 changes: 5 additions & 3 deletions dist/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ cc_defaults {
"-DBIONIC_IOCTL_NO_SIGNEDNESS_OVERLOAD",
"-Wno-unused-parameter",
"-Werror",

// Turn off the new pass manager due to miscompile.
// http://b/131854833
"-fno-experimental-new-pass-manager",
],

target: {
Expand Down Expand Up @@ -68,6 +72,7 @@ cc_library {
name: "libsqlite",
defaults: ["sqlite-defaults"],
vendor_available: true,
native_bridge_supported: true,
vndk: {
enabled: true,
},
Expand Down Expand Up @@ -133,9 +138,6 @@ cc_binary {
"liblog",
"libutils",
],
static_libs: [
"libicuandroid_utils",
],
},
host: {
cflags: ["-DNO_ANDROID_FUNCS=1"],
Expand Down
60 changes: 30 additions & 30 deletions dist/Android.patch
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
--- orig/shell.c 2018-02-18 23:53:25.407627650 -0800
+++ shell.c 2018-02-18 23:53:25.467627374 -0800
--- 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>
#include <stdarg.h>
+// Begin Android Add
+#ifndef NO_ANDROID_FUNCS
+#include "IcuUtils.h"
+#include <aicu/AIcu.h>
+#include <sqlite3_android.h>
+#endif
+// End Android Add

#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
+ 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 2018-02-18 23:53:25.459627411 -0800
+++ sqlite3.c 2018-08-22 15:28:04.016188846 -0700
@@ -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

Expand All @@ -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
Expand All @@ -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){
Expand All @@ -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);
Expand All @@ -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) ){
Expand All @@ -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) ){
Expand All @@ -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");
Expand All @@ -113,7 +113,7 @@
goto initone_error_out;
}

@@ -152769,13 +152785,25 @@
@@ -164271,13 +164287,25 @@
** module with sqlite.
*/
if( SQLITE_OK==rc
Expand Down
Loading

0 comments on commit 46204c4

Please sign in to comment.