1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Add a couple of asserts trying to make the operation of

sqlite3SelectNew() clearer.

FossilOrigin-Name: b21b1c7bc490b193da8d8a277489eb875a507e30
This commit is contained in:
drh
2011-10-11 20:14:41 +00:00
parent 3ec4a0c1a5
commit 338ec3e18e
3 changed files with 9 additions and 7 deletions

View File

@@ -65,6 +65,7 @@ Select *sqlite3SelectNew(
pNew = sqlite3DbMallocZero(db, sizeof(*pNew) );
assert( db->mallocFailed || !pOffset || pLimit ); /* OFFSET implies LIMIT */
if( pNew==0 ){
assert( db->mallocFailed );
pNew = &standin;
memset(pNew, 0, sizeof(*pNew));
}
@@ -92,6 +93,7 @@ Select *sqlite3SelectNew(
}else{
assert( pNew->pSrc!=0 || pParse->nErr>0 );
}
assert( pNew!=&standin );
return pNew;
}