summaryrefslogtreecommitdiff
path: root/tool/mkkeywordhash.c
diff options
context:
space:
mode:
authorHans-Christoph Steiner <hans@eds.org>2014-10-16 22:51:43 -0400
committerHans-Christoph Steiner <hans@eds.org>2014-10-16 22:51:43 -0400
commit9f67c0520ea0d5f11a190197cdf746c512db4ce4 (patch)
treec88a33f01f20a3d13a09594f114fffacebd0d1a4 /tool/mkkeywordhash.c
parentee20336e9c78d2e3782c8d096b9ab4f6ca8ce95f (diff)
parent569c6676a6ddb0ff73821d7693b5e18ddef809b9 (diff)
Merge tag 'upstream/3.2.0'
Upstream version 3.2.0 # gpg: Signature made Thu 16 Oct 2014 10:51:39 PM EDT using RSA key ID 374BBE81 # gpg: Good signature from "Hans-Christoph Steiner <hans@guardianproject.info>" # gpg: aka "Hans-Christoph Steiner <hans@eds.org>" # gpg: aka "Hans-Christoph Steiner <hans@at.or.at>" # gpg: aka "[jpeg image of size 5408]"
Diffstat (limited to 'tool/mkkeywordhash.c')
-rw-r--r--tool/mkkeywordhash.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/tool/mkkeywordhash.c b/tool/mkkeywordhash.c
index 4e5ba8f..721611f 100644
--- a/tool/mkkeywordhash.c
+++ b/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 },
};
@@ -362,7 +370,7 @@ int main(int argc, char **argv){
Keyword *p = &aKeywordTable[i];
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;