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 07b133d6fc3a04d87abc6dee622e9647ad2d558b..0c890684d97b623de7a5a38fa56d7b0268fb2d32 100644 |
--- a/third_party/sqlite/src/src/global.c |
+++ b/third_party/sqlite/src/src/global.c |
@@ -14,7 +14,6 @@ |
*/ |
#include "sqliteInt.h" |
- |
/* An array to map all upper-case characters into their corresponding |
** lower-case character. |
** |
@@ -70,6 +69,7 @@ const unsigned char sqlite3UpperToLower[] = { |
** isalnum() 0x06 |
** isxdigit() 0x08 |
** toupper() 0x20 |
+** SQLite identifier character 0x40 |
** |
** Bit 0x20 is set if the mapped character requires translation to upper |
** case. i.e. if the character is a lower-case ASCII character. |
@@ -81,6 +81,11 @@ const unsigned char sqlite3UpperToLower[] = { |
** Standard function 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 |
+** 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. |
*/ |
@@ -90,7 +95,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, 0x00, 0x00, 0x00, 0x00, /* 20..27 !"#$%&' */ |
+ 0x01, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, /* 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:;<=>? */ |
@@ -98,29 +103,29 @@ 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, 0x00, /* 58..5f XYZ[\]^_ */ |
+ 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x40, /* 58..5f XYZ[\]^_ */ |
0x00, 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{|}~. */ |
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 80..87 ........ */ |
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 88..8f ........ */ |
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 90..97 ........ */ |
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 98..9f ........ */ |
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* a0..a7 ........ */ |
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* a8..af ........ */ |
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* b0..b7 ........ */ |
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* b8..bf ........ */ |
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* 80..87 ........ */ |
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* 88..8f ........ */ |
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* 90..97 ........ */ |
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* 98..9f ........ */ |
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* a0..a7 ........ */ |
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* a8..af ........ */ |
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* b0..b7 ........ */ |
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* b8..bf ........ */ |
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* c0..c7 ........ */ |
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* c8..cf ........ */ |
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* d0..d7 ........ */ |
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* d8..df ........ */ |
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* e0..e7 ........ */ |
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* e8..ef ........ */ |
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* f0..f7 ........ */ |
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* f8..ff ........ */ |
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* c0..c7 ........ */ |
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* c8..cf ........ */ |
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* d0..d7 ........ */ |
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* d8..df ........ */ |
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* e0..e7 ........ */ |
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* e8..ef ........ */ |
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, /* f0..f7 ........ */ |
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40 /* f8..ff ........ */ |
}; |
#endif |
@@ -159,6 +164,8 @@ SQLITE_WSD struct Sqlite3Config sqlite3Config = { |
0, /* isPCacheInit */ |
0, /* pInitMutex */ |
0, /* nRefInitMutex */ |
+ 0, /* xLog */ |
+ 0, /* pLogArg */ |
}; |
@@ -170,6 +177,15 @@ SQLITE_WSD struct Sqlite3Config sqlite3Config = { |
SQLITE_WSD FuncDefHash sqlite3GlobalFunctions; |
/* |
+** Constant tokens for values 0 and 1. |
+*/ |
+const Token sqlite3IntTokens[] = { |
+ { "0", 1 }, |
+ { "1", 1 } |
+}; |
+ |
+ |
+/* |
** 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 |
@@ -187,4 +203,15 @@ SQLITE_WSD FuncDefHash sqlite3GlobalFunctions; |
** Changing the pending byte during operating results in undefined |
** and dileterious behavior. |
*/ |
+#ifndef SQLITE_OMIT_WSD |
int sqlite3PendingByte = 0x40000000; |
+#endif |
+ |
+#include "opcodes.h" |
+/* |
+** Properties of opcodes. The OPFLG_INITIALIZER macro is |
+** created by mkopcodeh.awk during compilation. Data is obtained |
+** from the comments following the "case OP_xxxx:" statements in |
+** the vdbe.c file. |
+*/ |
+const unsigned char sqlite3OpcodeProperty[] = OPFLG_INITIALIZER; |