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:
14
manifest
14
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Do\snot\sduplicate\sthe\sExpr.pLeft\ssubtree\sof\sa\sTK_SELECT_COLUMN\snode.
|
C Fixes\sfor\sproblems\sfollowing\sOOM\serrors.
|
||||||
D 2016-08-20T17:00:16.608
|
D 2016-08-20T18:06:14.286
|
||||||
F Makefile.in cfd8fb987cd7a6af046daa87daa146d5aad0e088
|
F Makefile.in cfd8fb987cd7a6af046daa87daa146d5aad0e088
|
||||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||||
F Makefile.msc d66d0395c38571aab3804f8db0fa20707ae4609a
|
F Makefile.msc d66d0395c38571aab3804f8db0fa20707ae4609a
|
||||||
@@ -338,7 +338,7 @@ F src/ctime.c e77f3dc297b4b65c96da78b4ae4272fdfae863d7
|
|||||||
F src/date.c 95c9a8d00767e7221a8e9a31f4e913fc8029bf6b
|
F src/date.c 95c9a8d00767e7221a8e9a31f4e913fc8029bf6b
|
||||||
F src/dbstat.c 19ee7a4e89979d4df8e44cfac7a8f905ec89b77d
|
F src/dbstat.c 19ee7a4e89979d4df8e44cfac7a8f905ec89b77d
|
||||||
F src/delete.c 76c084f0265f4a3cd1ecf17eee112a94f1ccbc05
|
F src/delete.c 76c084f0265f4a3cd1ecf17eee112a94f1ccbc05
|
||||||
F src/expr.c 8e1288b32f542dd8e8a2e21c30e936112968a4ab
|
F src/expr.c e96f29a02a3927b2afaca1f86fc84e80cac50ca7
|
||||||
F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb
|
F src/fault.c 160a0c015b6c2629d3899ed2daf63d75754a32bb
|
||||||
F src/fkey.c e2be0968c1adc679c87e467aa5b4f167588f38a8
|
F src/fkey.c e2be0968c1adc679c87e467aa5b4f167588f38a8
|
||||||
F src/func.c 29cc9acb170ec1387b9f63eb52cd85f8de96c771
|
F src/func.c 29cc9acb170ec1387b9f63eb52cd85f8de96c771
|
||||||
@@ -373,7 +373,7 @@ F src/os_win.c 520f23475f1de530c435d30b67b7b15fe90874b0
|
|||||||
F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
|
F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
|
||||||
F src/pager.c 40928c450320da78bb4bd3ae82818f4239e19b7e
|
F src/pager.c 40928c450320da78bb4bd3ae82818f4239e19b7e
|
||||||
F src/pager.h 966d2769e76ae347c8a32c4165faf6e6cb64546d
|
F src/pager.h 966d2769e76ae347c8a32c4165faf6e6cb64546d
|
||||||
F src/parse.y 9895eddbbb03c4a47cd760ff4f51cb8d139884d2
|
F src/parse.y 0e0b6d46a990d01e4ca1e9d7e1d2d9b5a98f6bcb
|
||||||
F src/pcache.c 5583c8ade4b05075a60ba953ef471d1c1a9c05df
|
F src/pcache.c 5583c8ade4b05075a60ba953ef471d1c1a9c05df
|
||||||
F src/pcache.h 2cedcd8407eb23017d92790b112186886e179490
|
F src/pcache.h 2cedcd8407eb23017d92790b112186886e179490
|
||||||
F src/pcache1.c 4bb7a6a5300c67d0b033d25adb509c120c03e812
|
F src/pcache1.c 4bb7a6a5300c67d0b033d25adb509c120c03e812
|
||||||
@@ -1519,7 +1519,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
|||||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||||
P 203f07c5e140e74cf91d0c1e20135c21236f0fc1
|
P 8384c77ebb3f65fbc54c199885926f2066f0b140
|
||||||
R 753238d9341a2b18b0026dcf708bc835
|
R d29ab3049f2812696918a926abccb285
|
||||||
U drh
|
U drh
|
||||||
Z d423421ba92880810032946cac8ccbb5
|
Z 08f6ec095045e30304bec0161a676b54
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
8384c77ebb3f65fbc54c199885926f2066f0b140
|
9041ee4a6f0e8389297f887f1431ab5cfe783390
|
||||||
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
|
** with the same pLeft pointer to the pVector, but only one of them
|
||||||
** will own the pVector.
|
** will own the pVector.
|
||||||
*/
|
*/
|
||||||
pRet = sqlite3PExpr(pParse, TK_SELECT_COLUMN, pVector, 0, 0);
|
pRet = sqlite3PExpr(pParse, TK_SELECT_COLUMN, 0, 0, 0);
|
||||||
if( pRet ) pRet->iColumn = iField;
|
if( pRet ){
|
||||||
|
pRet->iColumn = iField;
|
||||||
|
pRet->pLeft = pVector;
|
||||||
|
}
|
||||||
assert( pRet==0 || pRet->iTable==0 );
|
assert( pRet==0 || pRet->iTable==0 );
|
||||||
}else{
|
}else{
|
||||||
if( pVector->op==TK_VECTOR ) pVector = pVector->x.pList->a[iField].pExpr;
|
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 */
|
int *pRegFree /* OUT: Temp register to free */
|
||||||
){
|
){
|
||||||
assert( pVector->op==TK_VECTOR || pVector->op==TK_SELECT );
|
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 ){
|
if( pVector->op==TK_SELECT ){
|
||||||
*ppExpr = pVector->x.pSelect->pEList->a[iField].pExpr;
|
*ppExpr = pVector->x.pSelect->pEList->a[iField].pExpr;
|
||||||
return regSelect+iField;
|
return regSelect+iField;
|
||||||
|
|||||||
@@ -952,11 +952,14 @@ term(A) ::= CTIME_KW(OP). {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
expr(A) ::= LP(L) nexprlist(X) COMMA expr(Y) RP(R). {
|
expr(A) ::= LP(L) nexprlist(X) COMMA expr(Y) RP(R). {
|
||||||
|
ExprList *pList = sqlite3ExprListAppend(pParse, X, Y.pExpr);
|
||||||
A.pExpr = sqlite3PExpr(pParse, TK_VECTOR, 0, 0, 0);
|
A.pExpr = sqlite3PExpr(pParse, TK_VECTOR, 0, 0, 0);
|
||||||
if( A.pExpr ){
|
if( A.pExpr ){
|
||||||
A.pExpr->x.pList = sqlite3ExprListAppend(pParse, X, Y.pExpr);
|
A.pExpr->x.pList = pList;
|
||||||
spanSet(&A, &L, &R);
|
spanSet(&A, &L, &R);
|
||||||
|
}else{
|
||||||
|
sqlite3ExprListDelete(pParse->db, pList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user