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

Commit 7b1e016

Browse files
committed
Update Android.patch
1 parent 33f79fb commit 7b1e016

1 file changed

Lines changed: 23 additions & 19 deletions

File tree

‎dist/Android.patch‎

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
--- orig/shell.c 2020-07-09 13:55:18.598783417 +0100
2-
+++ shell.c 2020-10-06 00:01:10.631859326 +0100
3-
@@ -95,6 +95,11 @@
1+
diff --git a/dist/shell.c b/dist/shell.c
2+
index 3df2bf2..3aed6e3 100644
3+
--- a/dist/shell.c
4+
+++ b/dist/shell.c
5+
@@ -107,6 +107,11 @@ typedef unsigned char u8;
46
#endif
57
#include <ctype.h>
68
#include <stdarg.h>
@@ -12,7 +14,7 @@
1214

1315
#if !defined(_WIN32) && !defined(WIN32)
1416
# include <signal.h>
15-
@@ -12957,6 +12962,22 @@
17+
@@ -16104,6 +16109,22 @@ static void open_db(ShellState *p, int openFlags){
1618
sqlite3_create_function(p->db, "edit", 2, SQLITE_UTF8, 0,
1719
editFunc, 0, 0);
1820
#endif
@@ -34,10 +36,12 @@
3436
+
3537
if( p->openMode==SHELL_OPEN_ZIPFILE ){
3638
char *zSql = sqlite3_mprintf(
37-
"CREATE VIRTUAL TABLE zip USING zipfile(%Q);", p->zDbFilename);
38-
--- orig/sqlite3.c 2020-07-09 13:55:18.706784068 +0100
39-
+++ sqlite3.c 2020-07-09 13:55:18.814784719 +0100
40-
@@ -33395,6 +33395,10 @@
39+
"CREATE VIRTUAL TABLE zip USING zipfile(%Q);", zDbFilename);
40+
diff --git a/dist/sqlite3.c b/dist/sqlite3.c
41+
index 0b227f0..68da513 100644
42+
--- a/dist/sqlite3.c
43+
+++ b/dist/sqlite3.c
44+
@@ -34924,6 +34924,10 @@ SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
4145
# include <sys/mount.h>
4246
#endif
4347

@@ -48,7 +52,7 @@
4852
#ifdef HAVE_UTIME
4953
# include <utime.h>
5054
#endif
51-
@@ -34155,6 +34159,12 @@
55+
@@ -35486,6 +35490,12 @@ static int robust_open(const char *z, int f, mode_t m){
5256
#if defined(FD_CLOEXEC) && (!defined(O_CLOEXEC) || O_CLOEXEC==0)
5357
osFcntl(fd, F_SETFD, osFcntl(fd, F_GETFD, 0) | FD_CLOEXEC);
5458
#endif
@@ -61,7 +65,7 @@
6165
}
6266
return fd;
6367
}
64-
@@ -34735,7 +34745,13 @@
68+
@@ -36066,7 +36076,13 @@ static int unixLogErrorAtLine(
6569
** and move on.
6670
*/
6771
static void robust_close(unixFile *pFile, int h, int lineno){
@@ -75,7 +79,7 @@
7579
unixLogErrorAtLine(SQLITE_IOERR_CLOSE, "close",
7680
pFile ? pFile->zPath : 0, lineno);
7781
}
78-
@@ -37269,7 +37285,7 @@
82+
@@ -38621,7 +38637,7 @@ static int unixFileSize(sqlite3_file *id, i64 *pSize){
7983
SimulateIOError( rc=1 );
8084
if( rc!=0 ){
8185
storeLastErrno((unixFile*)id, errno);
@@ -84,16 +88,16 @@
8488
}
8589
*pSize = buf.st_size;
8690

87-
@@ -37305,7 +37321,7 @@
91+
@@ -38657,7 +38673,7 @@ static int fcntlSizeHint(unixFile *pFile, i64 nByte){
8892
struct stat buf; /* Used to hold return values of fstat() */
89-
93+
9094
if( osFstat(pFile->h, &buf) ){
9195
- return SQLITE_IOERR_FSTAT;
9296
+ return unixLogError(SQLITE_IOERR_FSTAT, "fstat", pFile->zPath);
9397
}
9498

9599
nSize = ((nByte+pFile->szChunk-1) / pFile->szChunk) * pFile->szChunk;
96-
@@ -38000,7 +38016,7 @@
100+
@@ -39399,7 +39415,7 @@ static int unixOpenSharedMemory(unixFile *pDbFd){
97101
** with the same permissions.
98102
*/
99103
if( osFstat(pDbFd->h, &sStat) ){
@@ -102,7 +106,7 @@
102106
goto shm_open_err;
103107
}
104108

105-
@@ -128218,7 +128234,7 @@
109+
@@ -133505,7 +133521,7 @@ SQLITE_PRIVATE int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg, u32 mFl
106110
}
107111
if( pDb->pSchema->file_format>SQLITE_MAX_FILE_FORMAT ){
108112
sqlite3SetString(pzErrMsg, db, "unsupported file format");
@@ -111,12 +115,12 @@
111115
goto initone_error_out;
112116
}
113117

114-
@@ -170128,13 +170144,25 @@
118+
@@ -178684,13 +178700,25 @@ SQLITE_PRIVATE int sqlite3Fts3Init(sqlite3 *db){
115119
** module with sqlite.
116120
*/
117-
if( SQLITE_OK==rc
121+
if( SQLITE_OK==rc
118122
+#ifndef ANDROID /* fts3_tokenizer disabled for security reasons */
119-
&& SQLITE_OK==(rc = sqlite3Fts3InitHashTable(db, pHash, "fts3_tokenizer"))
123+
&& SQLITE_OK==(rc=sqlite3Fts3InitHashTable(db,&pHash->hash,"fts3_tokenizer"))
120124
+#endif
121125
&& SQLITE_OK==(rc = sqlite3_overload_function(db, "snippet", -1))
122126
&& SQLITE_OK==(rc = sqlite3_overload_function(db, "offsets", 1))
@@ -134,6 +138,6 @@
134138
+ );
135139
+ if(rc) return rc;
136140
+#endif
141+
pHash->nRef++;
137142
rc = sqlite3_create_module_v2(
138143
db, "fts3", &fts3Module, (void *)pHash, hashDestroy
139-
);

0 commit comments

Comments
 (0)