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:
@ -2136,7 +2136,7 @@ typedef int ynVar;
|
||||
** allocated, regardless of whether or not EP_Reduced is set.
|
||||
*/
|
||||
struct Expr {
|
||||
u8 op; /* Operation performed by this node */
|
||||
u16 op; /* Operation performed by this node */
|
||||
char affinity; /* The affinity of the column or 0 if not a column */
|
||||
u32 flags; /* Various flags. EP_* See below */
|
||||
union {
|
||||
@ -2172,7 +2172,7 @@ struct Expr {
|
||||
** TK_VARIABLE: variable number (always >= 1). */
|
||||
i16 iAgg; /* Which entry in pAggInfo->aCol[] or ->aFunc[] */
|
||||
i16 iRightJoinTable; /* If EP_FromJoin, the right table of the join */
|
||||
u8 op2; /* TK_REGISTER: original value of Expr.op
|
||||
u16 op2; /* TK_REGISTER: original value of Expr.op
|
||||
** TK_COLUMN: the value of p5 for OP_Column
|
||||
** TK_AGG_FUNCTION: nesting depth */
|
||||
AggInfo *pAggInfo; /* Used by TK_AGG_COLUMN and TK_AGG_FUNCTION */
|
||||
@ -2499,7 +2499,7 @@ struct NameContext {
|
||||
*/
|
||||
struct Select {
|
||||
ExprList *pEList; /* The fields of the result */
|
||||
u8 op; /* One of: TK_UNION TK_ALL TK_INTERSECT TK_EXCEPT */
|
||||
u16 op; /* One of: TK_UNION TK_ALL TK_INTERSECT TK_EXCEPT */
|
||||
u16 selFlags; /* Various SF_* values */
|
||||
int iLimit, iOffset; /* Memory registers holding LIMIT & OFFSET counters */
|
||||
#if SELECTTRACE_ENABLED
|
||||
@ -2887,7 +2887,7 @@ struct AuthContext {
|
||||
struct Trigger {
|
||||
char *zName; /* The name of the trigger */
|
||||
char *table; /* The table or view to which the trigger applies */
|
||||
u8 op; /* One of TK_DELETE, TK_UPDATE, TK_INSERT */
|
||||
u16 op; /* One of TK_DELETE, TK_UPDATE, TK_INSERT */
|
||||
u8 tr_tm; /* One of TRIGGER_BEFORE, TRIGGER_AFTER */
|
||||
Expr *pWhen; /* The WHEN clause of the expression (may be NULL) */
|
||||
IdList *pColumns; /* If this is an UPDATE OF <column-list> trigger,
|
||||
@ -2947,7 +2947,7 @@ struct Trigger {
|
||||
*
|
||||
*/
|
||||
struct TriggerStep {
|
||||
u8 op; /* One of TK_DELETE, TK_UPDATE, TK_INSERT, TK_SELECT */
|
||||
u16 op; /* One of TK_DELETE, TK_UPDATE, TK_INSERT, TK_SELECT */
|
||||
u8 orconf; /* OE_Rollback etc. */
|
||||
Trigger *pTrig; /* The trigger that this step is a part of */
|
||||
Select *pSelect; /* SELECT statement or RHS of INSERT INTO SELECT ... */
|
||||
|
Reference in New Issue
Block a user