Skip to content

Commit

Permalink
skip branches to check foreign keys, as they generally shouldn't impa…
Browse files Browse the repository at this point in the history
…ct query result type
  • Loading branch information
tyrelr committed May 7, 2023
1 parent 9fc976c commit 73728e0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions sqlx-sqlite/src/connection/explain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -582,9 +582,16 @@ pub(super) fn explain(
continue;
}

OP_DECR_JUMP_ZERO | OP_ELSE_EQ | OP_EQ | OP_FILTER | OP_FK_IF_ZERO | OP_FOUND
| OP_GE | OP_GT | OP_IDX_GE | OP_IDX_GT | OP_IDX_LE | OP_IDX_LT | OP_IF_NO_HOPE
| OP_IF_NOT | OP_IF_NOT_OPEN | OP_IF_NOT_ZERO | OP_IF_NULL_ROW | OP_IF_SMALLER
OP_FK_IF_ZERO => {
// goto <p2> if no constraints are unsatisfied (assumed to be true)

state.mem.program_i = p2 as usize;
continue;
}

OP_DECR_JUMP_ZERO | OP_ELSE_EQ | OP_EQ | OP_FILTER | OP_FOUND | OP_GE | OP_GT
| OP_IDX_GE | OP_IDX_GT | OP_IDX_LE | OP_IDX_LT | OP_IF_NO_HOPE | OP_IF_NOT
| OP_IF_NOT_OPEN | OP_IF_NOT_ZERO | OP_IF_NULL_ROW | OP_IF_SMALLER
| OP_INCR_VACUUM | OP_IS_NULL | OP_IS_NULL_OR_TYPE | OP_LE | OP_LT | OP_NE
| OP_NEXT | OP_NO_CONFLICT | OP_NOT_EXISTS | OP_ONCE | OP_PREV | OP_PROGRAM
| OP_ROW_SET_READ | OP_ROW_SET_TEST | OP_SEEK_GE | OP_SEEK_GT | OP_SEEK_LE
Expand Down

0 comments on commit 73728e0

Please sign in to comment.