|
1 | | ---- orig/shell.c 2018-02-18 23:53:25.407627650 -0800 |
2 | | -+++ shell.c 2018-02-18 23:53:25.467627374 -0800 |
3 | | -@@ -87,6 +87,12 @@ |
| 1 | +diff --git a/dist/shell.c b/dist/shell.c |
| 2 | +index fb3ac9f..94bf2e9 100644 |
| 3 | +--- a/dist/shell.c |
| 4 | ++++ b/dist/shell.c |
| 5 | +@@ -87,6 +87,12 @@ typedef unsigned char u8; |
4 | 6 | #endif |
5 | 7 | #include <ctype.h> |
6 | 8 | #include <stdarg.h> |
|
13 | 15 |
|
14 | 16 | #if !defined(_WIN32) && !defined(WIN32) |
15 | 17 | # include <signal.h> |
16 | | -@@ -10389,6 +10395,23 @@ |
17 | | - editFunc, 0, 0); |
| 18 | +@@ -11170,6 +11176,22 @@ static void open_db(ShellState *p, int openFlags){ |
18 | 19 | sqlite3_create_function(p->db, "edit", 2, SQLITE_UTF8, 0, |
19 | 20 | editFunc, 0, 0); |
20 | | -+ |
| 21 | + #endif |
21 | 22 | + // Begin Android Add |
22 | | -+ #ifndef NO_ANDROID_FUNCS |
23 | | -+ InitializeIcuOrDie(); |
24 | | -+ int err = register_localized_collators(p->db, "en_US", 0); |
25 | | -+ if (err != SQLITE_OK) { |
26 | | -+ fprintf(stderr, "register_localized_collators() failed\n"); |
27 | | -+ exit(1); |
28 | | -+ } |
29 | | -+ err = register_android_functions(p->db, 0); |
30 | | -+ if (err != SQLITE_OK) { |
31 | | -+ fprintf(stderr, "register_android_functions() failed\n"); |
32 | | -+ exit(1); |
33 | | -+ } |
34 | | -+ #endif |
| 23 | ++#ifndef NO_ANDROID_FUNCS |
| 24 | ++ InitializeIcuOrDie(); |
| 25 | ++ int err = register_localized_collators(p->db, "en_US", 0); |
| 26 | ++ if (err != SQLITE_OK) { |
| 27 | ++ fprintf(stderr, "register_localized_collators() failed\n"); |
| 28 | ++ exit(1); |
| 29 | ++ } |
| 30 | ++ err = register_android_functions(p->db, 0); |
| 31 | ++ if (err != SQLITE_OK) { |
| 32 | ++ fprintf(stderr, "register_android_functions() failed\n"); |
| 33 | ++ exit(1); |
| 34 | ++ } |
| 35 | ++#endif |
35 | 36 | + // End Android Add |
36 | 37 | + |
37 | 38 | if( p->openMode==SHELL_OPEN_ZIPFILE ){ |
38 | 39 | char *zSql = sqlite3_mprintf( |
39 | 40 | "CREATE VIRTUAL TABLE zip USING zipfile(%Q);", p->zDbFilename); |
40 | | ---- orig/sqlite3.c 2018-02-18 23:53:25.459627411 -0800 |
41 | | -+++ sqlite3.c 2018-08-22 15:28:04.016188846 -0700 |
42 | | -@@ -30672,6 +30672,10 @@ |
| 41 | +diff --git a/dist/sqlite3.c b/dist/sqlite3.c |
| 42 | +index 7b525c3..b9591b3 100644 |
| 43 | +--- a/dist/sqlite3.c |
| 44 | ++++ b/dist/sqlite3.c |
| 45 | +@@ -32027,6 +32027,10 @@ SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){ |
43 | 46 | # include <sys/mount.h> |
44 | 47 | #endif |
45 | 48 |
|
46 | | -+#if defined(__BIONIC__) |
| 49 | ++#if defined(__BIONIC__) && __ANDROID_API__ >= __ANDROID_API_Q__ |
47 | 50 | +# include <android/fdsan.h> |
48 | 51 | +#endif |
49 | 52 | + |
50 | 53 | #ifdef HAVE_UTIME |
51 | 54 | # include <utime.h> |
52 | 55 | #endif |
53 | | -@@ -31422,6 +31426,12 @@ |
| 56 | +@@ -32788,6 +32792,12 @@ static int robust_open(const char *z, int f, mode_t m){ |
54 | 57 | #if defined(FD_CLOEXEC) && (!defined(O_CLOEXEC) || O_CLOEXEC==0) |
55 | 58 | osFcntl(fd, F_SETFD, osFcntl(fd, F_GETFD, 0) | FD_CLOEXEC); |
56 | 59 | #endif |
|
63 | 66 | } |
64 | 67 | return fd; |
65 | 68 | } |
66 | | -@@ -31954,7 +31964,13 @@ |
| 69 | +@@ -33366,7 +33376,13 @@ static int unixLogErrorAtLine( |
67 | 70 | ** and move on. |
68 | 71 | */ |
69 | 72 | static void robust_close(unixFile *pFile, int h, int lineno){ |
|
77 | 80 | unixLogErrorAtLine(SQLITE_IOERR_CLOSE, "close", |
78 | 81 | pFile ? pFile->zPath : 0, lineno); |
79 | 82 | } |
80 | | -@@ -34428,7 +34444,7 @@ |
| 83 | +@@ -35898,7 +35914,7 @@ static int unixFileSize(sqlite3_file *id, i64 *pSize){ |
81 | 84 | SimulateIOError( rc=1 ); |
82 | 85 | if( rc!=0 ){ |
83 | 86 | storeLastErrno((unixFile*)id, errno); |
|
86 | 89 | } |
87 | 90 | *pSize = buf.st_size; |
88 | 91 |
|
89 | | -@@ -34464,7 +34480,7 @@ |
| 92 | +@@ -35934,7 +35950,7 @@ static int fcntlSizeHint(unixFile *pFile, i64 nByte){ |
90 | 93 | struct stat buf; /* Used to hold return values of fstat() */ |
91 | 94 |
|
92 | 95 | if( osFstat(pFile->h, &buf) ){ |
|
95 | 98 | } |
96 | 99 |
|
97 | 100 | nSize = ((nByte+pFile->szChunk-1) / pFile->szChunk) * pFile->szChunk; |
98 | | -@@ -35139,7 +35155,7 @@ |
| 101 | +@@ -36614,7 +36630,7 @@ static int unixOpenSharedMemory(unixFile *pDbFd){ |
99 | 102 | ** with the same permissions. |
100 | 103 | */ |
101 | 104 | if( osFstat(pDbFd->h, &sStat) ){ |
|
104 | 107 | goto shm_open_err; |
105 | 108 | } |
106 | 109 |
|
107 | | -@@ -118054,7 +118070,7 @@ |
| 110 | +@@ -122488,7 +122504,7 @@ SQLITE_PRIVATE int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg, u32 mFl |
108 | 111 | } |
109 | 112 | if( pDb->pSchema->file_format>SQLITE_MAX_FILE_FORMAT ){ |
110 | 113 | sqlite3SetString(pzErrMsg, db, "unsupported file format"); |
|
113 | 116 | goto initone_error_out; |
114 | 117 | } |
115 | 118 |
|
116 | | -@@ -152769,13 +152785,25 @@ |
| 119 | +@@ -161312,13 +161328,25 @@ SQLITE_PRIVATE int sqlite3Fts3Init(sqlite3 *db){ |
117 | 120 | ** module with sqlite. |
118 | 121 | */ |
119 | 122 | if( SQLITE_OK==rc |
|
0 commit comments