Skip to content

Commit 3ddbc46

Browse files
author
D. Richard Hipp
committed
Add comments linking the assert() added in [cef4d9e3ba586735] to the places
where the precondition that the assert() tests are actually required.
1 parent 6fec907 commit 3ddbc46

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/printf.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ void sqlite3_str_vappendf(
857857
sqlite3_str_appendall(pAccum, pItem->zAlias);
858858
}else{
859859
Select *pSel = pItem->pSelect;
860-
assert( pSel!=0 );
860+
assert( pSel!=0 ); /* Because of tag-20240424-1 */
861861
if( pSel->selFlags & SF_NestedFrom ){
862862
sqlite3_str_appendf(pAccum, "(join-%u)", pSel->selId);
863863
}else if( pSel->selFlags & SF_MultiValue ){

src/resolve.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1889,7 +1889,7 @@ static int resolveSelectStep(Walker *pWalker, Select *p){
18891889
if( pOuterNC ) pOuterNC->nNestedSelect++;
18901890
for(i=0; i<p->pSrc->nSrc; i++){
18911891
SrcItem *pItem = &p->pSrc->a[i];
1892-
assert( pItem->zName!=0 || pItem->pSelect!=0 );
1892+
assert( pItem->zName!=0 || pItem->pSelect!=0 );/* Test of tag-20240424-1*/
18931893
if( pItem->pSelect && (pItem->pSelect->selFlags & SF_Resolved)==0 ){
18941894
int nRef = pOuterNC ? pOuterNC->nRef : 0;
18951895
const char *zSavedContext = pParse->zAuthContext;

src/trigger.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,7 @@ static void codeReturningTrigger(
987987
sSelect.pSrc = &sFrom;
988988
sFrom.nSrc = 1;
989989
sFrom.a[0].pTab = pTab;
990-
sFrom.a[0].zName = pTab->zName;
990+
sFrom.a[0].zName = pTab->zName; /* tag-20240424-1 */
991991
sFrom.a[0].iCursor = -1;
992992
sqlite3SelectPrep(pParse, &sSelect, 0);
993993
if( pParse->nErr==0 ){

0 commit comments

Comments
 (0)