-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge 'translate_condition_expr(): fix cases where 1. we jump on fals…
…e and 2. either operand is NULL' from Jussi Saurio Change explanation is in the code comment for `Insn::Eq`: ``` /// Jump if either of the operands is null. Used for "jump when false" logic. /// Eg. "SELECT * FROM users WHERE id = NULL" becomes: /// <JUMP TO NEXT ROW IF id != NULL> /// Without the jump_if_null flag it would not jump because the logical comparison "id != NULL" is never true. /// This flag indicates that if either is null we should still jump. jump_if_null: bool, ``` Closes #754 Excerpt from SQLite bytecode documentation for e.g. `Lt`: > If the SQLITE_JUMPIFNULL bit of P5 is set and either reg(P1) or reg(P3) is NULL then the take the jump. If the SQLITE_JUMPIFNULL bit is clear then fall through if either operand is NULL. I didn't want to start putting these flags into a bitmask so I just added a separate boolean. Probably for sqlite `EXPLAIN` compatibility we should, IF we want to be exactly compatible (which we aren't anyway atm) Closes #755
- Loading branch information
Showing
8 changed files
with
140 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.