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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user