diff options
author | drh <> | 2023-06-19 20:54:49 +0000 |
---|---|---|
committer | drh <> | 2023-06-19 20:54:49 +0000 |
commit | 1e24dc987a6d5710258ca75488ae54339f7e3bb6 (patch) | |
tree | 5ffbf32f7258eeb11e542ee754ddb0c3bb31fad7 /src | |
parent | 1be61ad2781211269c3e6315e49ee0529d981aac (diff) | |
download | sqlite-1e24dc987a6d5710258ca75488ae54339f7e3bb6.tar.gz sqlite-1e24dc987a6d5710258ca75488ae54339f7e3bb6.zip |
Small performance improvement and size reduction by recognizing that no
SQL keywords have less than 2 characters.
FossilOrigin-Name: 6b3d25b7982623ab4b25161aff9ab44778e136069043ab425543597c42c98ae5
Diffstat (limited to 'src')
-rw-r--r-- | src/tokenize.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tokenize.c b/src/tokenize.c index 8dac9ece5..e3ca9a82a 100644 --- a/src/tokenize.c +++ b/src/tokenize.c @@ -505,7 +505,8 @@ int sqlite3GetToken(const unsigned char *z, int *tokenType){ return i; } case CC_KYWD0: { - for(i=1; aiClass[z[i]]<=CC_KYWD; i++){} + if( aiClass[z[1]]>CC_KYWD ){ i = 1; break; } + for(i=2; aiClass[z[i]]<=CC_KYWD; i++){} if( IdChar(z[i]) ){ /* This token started out using characters that can appear in keywords, ** but z[i] is a character not allowed within keywords, so this must |