Index: third_party/sqlite/src/src/global.c |
diff --git a/third_party/sqlite/src/src/global.c b/third_party/sqlite/src/src/global.c |
index 64966b35d78329d809183cfce3598ab33ad56e2c..a105135561b61816a0f7c952108c45df211c58bd 100644 |
--- a/third_party/sqlite/src/src/global.c |
+++ b/third_party/sqlite/src/src/global.c |
@@ -70,6 +70,7 @@ const unsigned char sqlite3UpperToLower[] = { |
** isxdigit() 0x08 |
** toupper() 0x20 |
** SQLite identifier character 0x40 |
+** Quote character 0x80 |
** |
** Bit 0x20 is set if the mapped character requires translation to upper |
** case. i.e. if the character is a lower-case ASCII character. |
@@ -78,16 +79,13 @@ const unsigned char sqlite3UpperToLower[] = { |
** |
** (x & ~(map[x]&0x20)) |
** |
-** Standard function tolower() is implemented using the sqlite3UpperToLower[] |
+** The equivalent of tolower() is implemented using the sqlite3UpperToLower[] |
** array. tolower() is used more often than toupper() by SQLite. |
** |
-** Bit 0x40 is set if the character non-alphanumeric and can be used in an |
+** Bit 0x40 is set if the character is non-alphanumeric and can be used in an |
** SQLite identifier. Identifiers are alphanumerics, "_", "$", and any |
** non-ASCII UTF character. Hence the test for whether or not a character is |
** part of an identifier is 0x46. |
-** |
-** SQLite's versions are identical to the standard versions assuming a |
-** locale of "C". They are implemented as macros in sqliteInt.h. |
*/ |
#ifdef SQLITE_ASCII |
const unsigned char sqlite3CtypeMap[256] = { |
@@ -95,7 +93,7 @@ const unsigned char sqlite3CtypeMap[256] = { |
0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, /* 08..0f ........ */ |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 10..17 ........ */ |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 18..1f ........ */ |
- 0x01, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, /* 20..27 !"#$%&' */ |
+ 0x01, 0x00, 0x80, 0x00, 0x40, 0x00, 0x00, 0x80, /* 20..27 !"#$%&' */ |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 28..2f ()*+,-./ */ |
0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, /* 30..37 01234567 */ |
0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 38..3f 89:;<=>? */ |
@@ -103,8 +101,8 @@ const unsigned char sqlite3CtypeMap[256] = { |
0x00, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x02, /* 40..47 @ABCDEFG */ |
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* 48..4f HIJKLMNO */ |
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, /* 50..57 PQRSTUVW */ |
- 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x40, /* 58..5f XYZ[\]^_ */ |
- 0x00, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x22, /* 60..67 `abcdefg */ |
+ 0x02, 0x02, 0x02, 0x80, 0x00, 0x00, 0x00, 0x40, /* 58..5f XYZ[\]^_ */ |
+ 0x80, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x22, /* 60..67 `abcdefg */ |
0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, /* 68..6f hijklmno */ |
0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, /* 70..77 pqrstuvw */ |
0x22, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, /* 78..7f xyz{|}~. */ |
@@ -159,6 +157,31 @@ const unsigned char sqlite3CtypeMap[256] = { |
# define SQLITE_SORTER_PMASZ 250 |
#endif |
+/* Statement journals spill to disk when their size exceeds the following |
+** threshold (in bytes). 0 means that statement journals are created and |
+** written to disk immediately (the default behavior for SQLite versions |
+** before 3.12.0). -1 means always keep the entire statement journal in |
+** memory. (The statement journal is also always held entirely in memory |
+** if journal_mode=MEMORY or if temp_store=MEMORY, regardless of this |
+** setting.) |
+*/ |
+#ifndef SQLITE_STMTJRNL_SPILL |
+# define SQLITE_STMTJRNL_SPILL (64*1024) |
+#endif |
+ |
+/* |
+** The default lookaside-configuration, the format "SZ,N". SZ is the |
+** number of bytes in each lookaside slot (should be a multiple of 8) |
+** and N is the number of slots. The lookaside-configuration can be |
+** changed as start-time using sqlite3_config(SQLITE_CONFIG_LOOKASIDE) |
+** or at run-time for an individual database connection using |
+** sqlite3_db_config(db, SQLITE_DBCONFIG_LOOKASIDE); |
+*/ |
+#ifndef SQLITE_DEFAULT_LOOKASIDE |
+# define SQLITE_DEFAULT_LOOKASIDE 1200,100 |
+#endif |
+ |
+ |
/* |
** The following singleton contains the global configuration for |
** the SQLite library. |
@@ -171,8 +194,8 @@ SQLITE_WSD struct Sqlite3Config sqlite3Config = { |
SQLITE_ALLOW_COVERING_INDEX_SCAN, /* bUseCis */ |
0x7ffffffe, /* mxStrlen */ |
0, /* neverCorrupt */ |
- 128, /* szLookaside */ |
- 500, /* nLookaside */ |
+ SQLITE_DEFAULT_LOOKASIDE, /* szLookaside, nLookaside */ |
+ SQLITE_STMTJRNL_SPILL, /* nStmtSpill */ |
{0,0,0,0,0,0,0,0}, /* m */ |
{0,0,0,0,0,0,0,0,0}, /* mutex */ |
{0,0,0,0,0,0,0,0,0,0,0,0,0},/* pcache2 */ |
@@ -208,10 +231,11 @@ SQLITE_WSD struct Sqlite3Config sqlite3Config = { |
0, /* xVdbeBranch */ |
0, /* pVbeBranchArg */ |
#endif |
-#ifndef SQLITE_OMIT_BUILTIN_TEST |
+#ifndef SQLITE_UNTESTABLE |
0, /* xTestCallback */ |
#endif |
- 0 /* bLocaltimeFault */ |
+ 0, /* bLocaltimeFault */ |
+ 0x7ffffffe /* iOnceResetThreshold */ |
}; |
/* |
@@ -219,7 +243,7 @@ SQLITE_WSD struct Sqlite3Config sqlite3Config = { |
** database connections. After initialization, this table is |
** read-only. |
*/ |
-SQLITE_WSD FuncDefHash sqlite3GlobalFunctions; |
+FuncDefHash sqlite3BuiltinFunctions; |
/* |
** Constant tokens for values 0 and 1. |
@@ -234,7 +258,7 @@ const Token sqlite3IntTokens[] = { |
** The value of the "pending" byte must be 0x40000000 (1 byte past the |
** 1-gibabyte boundary) in a compatible database. SQLite never uses |
** the database page that contains the pending byte. It never attempts |
-** to read or write that page. The pending byte page is set assign |
+** to read or write that page. The pending byte page is set aside |
** for use by the VFS layers as space for managing file locks. |
** |
** During testing, it is often desirable to move the pending byte to |