| Index: third_party/sqlite/src/tool/mkkeywordhash.c
|
| diff --git a/third_party/sqlite/src/tool/mkkeywordhash.c b/third_party/sqlite/src/tool/mkkeywordhash.c
|
| index 509aeef9ea0a4e3b579e9bcf45004f8fbda9807f..721611f5a36ce8e00b1a106348a17b9dff532c92 100644
|
| --- a/third_party/sqlite/src/tool/mkkeywordhash.c
|
| +++ b/third_party/sqlite/src/tool/mkkeywordhash.c
|
| @@ -138,6 +138,11 @@ struct Keyword {
|
| #else
|
| # define AUTOVACUUM 0x00020000
|
| #endif
|
| +#ifdef SQLITE_OMIT_CTE
|
| +# define CTE 0
|
| +#else
|
| +# define CTE 0x00040000
|
| +#endif
|
|
|
| /*
|
| ** These are the keywords
|
| @@ -234,6 +239,7 @@ static Keyword aKeywordTable[] = {
|
| { "PRIMARY", "TK_PRIMARY", ALWAYS },
|
| { "QUERY", "TK_QUERY", EXPLAIN },
|
| { "RAISE", "TK_RAISE", TRIGGER },
|
| + { "RECURSIVE", "TK_RECURSIVE", CTE },
|
| { "REFERENCES", "TK_REFERENCES", FKEY },
|
| { "REGEXP", "TK_LIKE_KW", ALWAYS },
|
| { "REINDEX", "TK_REINDEX", REINDEX },
|
| @@ -262,6 +268,8 @@ static Keyword aKeywordTable[] = {
|
| { "VALUES", "TK_VALUES", ALWAYS },
|
| { "VIEW", "TK_VIEW", VIEW },
|
| { "VIRTUAL", "TK_VIRTUAL", VTAB },
|
| + { "WITH", "TK_WITH", CTE },
|
| + { "WITHOUT", "TK_WITHOUT", ALWAYS },
|
| { "WHEN", "TK_WHEN", ALWAYS },
|
| { "WHERE", "TK_WHERE", ALWAYS },
|
| };
|
| @@ -360,9 +368,9 @@ int main(int argc, char **argv){
|
| /* Fill in the lengths of strings and hashes for all entries. */
|
| for(i=0; i<nKeyword; i++){
|
| Keyword *p = &aKeywordTable[i];
|
| - p->len = strlen(p->zName);
|
| + p->len = (int)strlen(p->zName);
|
| assert( p->len<sizeof(p->zOrigName) );
|
| - strcpy(p->zOrigName, p->zName);
|
| + memcpy(p->zOrigName, p->zName, p->len+1);
|
| totalLen += p->len;
|
| p->hash = (UpperToLower[(int)p->zName[0]]*4) ^
|
| (UpperToLower[(int)p->zName[p->len-1]]*3) ^ p->len;
|
|
|