diff options
author | drh <> | 2022-04-13 12:34:54 +0000 |
---|---|---|
committer | drh <> | 2022-04-13 12:34:54 +0000 |
commit | 94e615a6acf3a1519d98e85a6665c712edb5ea8a (patch) | |
tree | e163e2a1f8ce85dbbcbe67a247b103f689c5f85d /src/whereInt.h | |
parent | 3b79f7580a30e7a49962e9a2538498c65227a4d7 (diff) | |
parent | 12c35ec322dc2b394a3a6d8b3997ef60574414a0 (diff) | |
download | sqlite-94e615a6acf3a1519d98e85a6665c712edb5ea8a.tar.gz sqlite-94e615a6acf3a1519d98e85a6665c712edb5ea8a.zip |
Add support for RIGHT and FULL OUTER JOINs.
FossilOrigin-Name: fa9d206f904280e3eafc6f4ba6c0c7325948364c62eeeb9f0fdc5825d622ec35
Diffstat (limited to 'src/whereInt.h')
-rw-r--r-- | src/whereInt.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/whereInt.h b/src/whereInt.h index e0f44d6ba..c8a188f80 100644 --- a/src/whereInt.h +++ b/src/whereInt.h @@ -33,6 +33,7 @@ typedef struct WhereScan WhereScan; typedef struct WhereOrCost WhereOrCost; typedef struct WhereOrSet WhereOrSet; typedef struct WhereMemBlock WhereMemBlock; +typedef struct WhereRightJoin WhereRightJoin; /* ** This object is a header on a block of allocated memory that will be @@ -44,6 +45,17 @@ struct WhereMemBlock { }; /* +** Extra information attached to a WhereLevel that is a RIGHT JOIN. +*/ +struct WhereRightJoin { + int iMatch; /* Cursor used to determine prior matched rows */ + int regBloom; /* Bloom filter for iRJMatch */ + int regReturn; /* Return register for the interior subroutine */ + int addrSubrtn; /* Starting address for the interior subroutine */ + int addrInit; /* OP_Integer used for early init of regReturn */ +}; + +/* ** This object contains information needed to implement a single nested ** loop in WHERE clause. ** @@ -75,6 +87,7 @@ struct WhereLevel { int addrLikeRep; /* LIKE range processing address */ #endif int regFilter; /* Bloom filter */ + WhereRightJoin *pRJ; /* Extra information for RIGHT JOIN */ u8 iFrom; /* Which entry in the FROM clause */ u8 op, p3, p5; /* Opcode, P3 & P5 of the opcode that ends the loop */ int p1, p2; /* Operands of the opcode used to end the loop */ @@ -552,6 +565,11 @@ Bitmask sqlite3WhereCodeOneLoopStart( WhereLevel *pLevel, /* The current level pointer */ Bitmask notReady /* Which tables are currently available */ ); +SQLITE_NOINLINE void sqlite3WhereRightJoinLoop( + WhereInfo *pWInfo, + int iLevel, + WhereLevel *pLevel +); /* whereexpr.c: */ void sqlite3WhereClauseInit(WhereClause*,WhereInfo*); |