mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Fixes for problems following OOM errors.
FossilOrigin-Name: 9041ee4a6f0e8389297f887f1431ab5cfe783390
This commit is contained in:
10
src/expr.c
10
src/expr.c
@@ -406,8 +406,11 @@ Expr *sqlite3ExprForVectorField(
|
||||
** with the same pLeft pointer to the pVector, but only one of them
|
||||
** will own the pVector.
|
||||
*/
|
||||
pRet = sqlite3PExpr(pParse, TK_SELECT_COLUMN, pVector, 0, 0);
|
||||
if( pRet ) pRet->iColumn = iField;
|
||||
pRet = sqlite3PExpr(pParse, TK_SELECT_COLUMN, 0, 0, 0);
|
||||
if( pRet ){
|
||||
pRet->iColumn = iField;
|
||||
pRet->pLeft = pVector;
|
||||
}
|
||||
assert( pRet==0 || pRet->iTable==0 );
|
||||
}else{
|
||||
if( pVector->op==TK_VECTOR ) pVector = pVector->x.pList->a[iField].pExpr;
|
||||
@@ -462,7 +465,8 @@ static int exprVectorRegister(
|
||||
int *pRegFree /* OUT: Temp register to free */
|
||||
){
|
||||
assert( pVector->op==TK_VECTOR || pVector->op==TK_SELECT );
|
||||
assert( pParse->nErr || (pVector->op==TK_VECTOR)==(regSelect==0) );
|
||||
assert( pParse->nErr || pParse->db->mallocFailed
|
||||
|| (pVector->op==TK_VECTOR)==(regSelect==0) );
|
||||
if( pVector->op==TK_SELECT ){
|
||||
*ppExpr = pVector->x.pSelect->pEList->a[iField].pExpr;
|
||||
return regSelect+iField;
|
||||
|
||||
Reference in New Issue
Block a user