MXS-3404 Extend sqlite3 op-size from u8 to u16
To make it possible to have more tokens than 255. Parsers operators (i.e. tokens) is one thing and opcodes for the virtual machine of sqlite3 is another. Unfortunately they are not completely separate, but some of the opcodes in <build-directory>/opcodes.h are the same as the tokens in <build-directory>/parse.h. And while the parser tokens are now 16-bit, the VM opcodes are 8-bit. However, this is probably not a problem even if some of the parser tokens that are duplicated in the opcodes are > 256 as we only use sqlite3 for parsing and not for executing anything (on the sqlite3 VM).
This commit is contained in:
@ -804,7 +804,7 @@ int main(int argc, char **argv){
|
||||
}
|
||||
printf("%s };\n", j==0 ? "" : "\n");
|
||||
|
||||
printf(" static const unsigned char aCode[%d] = {\n", nKeyword);
|
||||
printf(" static const unsigned short aCode[%d] = {\n", nKeyword);
|
||||
for(i=j=0; i<nKeyword; i++){
|
||||
char *zToken = aKeywordTable[i].zTokenType;
|
||||
if( j==0 ) printf(" ");
|
||||
|
||||
Reference in New Issue
Block a user