1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Early exit if one of the inner loops of a 3-way or larger join is an

empty table.

FossilOrigin-Name: eaad6ac707a5960d9518d4049b7b1759e7512727ce87be3c402408144bda0a97
This commit is contained in:
drh
2025-07-02 14:53:48 +00:00
parent 216676664d
commit 33f3273705
7 changed files with 37 additions and 26 deletions

View File

@@ -6417,7 +6417,8 @@ case OP_IfEmpty: { /* jump */
assert( pC->eCurType==CURTYPE_BTREE );
pCrsr = pC->uc.pCursor;
assert( pCrsr );
res = sqlite3BtreeIsEmpty(pCrsr);
rc = sqlite3BtreeIsEmpty(pCrsr, &res);
if( rc ) goto abort_due_to_error;
VdbeBranchTaken(res!=0,2);
if( res ) goto jump_to_p2;
break;