-C Fix\shandling\sof\san\sOOM\scondition\sin\ssqlite3AddReturning().
-D 2021-01-30T03:06:19.421
+C Fix\sa\sobsolete\sassert()\sin\sthe\sbytecode\sengine.\s\sImproved\sOOM\sdetection\nin\ssqlite3AddReturning().
+D 2021-01-30T12:07:32.582
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
F src/btree.c 47d9fe97d5c0d74506154e3597f8a23b81a00080751dc4d11fec91ee22796f4c
F src/btree.h 285f8377aa1353185a32bf455faafa9ff9a0d40d074d60509534d14990c7829e
F src/btreeInt.h 7614cae30f95b6aed0c7cac7718276a55cfe2c77058cbfd8bef5b75329757331
-F src/build.c d708731a10a780723f7f6d996c1a7ff827ce2153bb4b6e964a59176fc373a6a3
+F src/build.c ff2cdab3c86156c3c1808e282daaf04d298e532ef11478844964107496898cf9
F src/callback.c d0b853dd413255d2e337b34545e54d888ea02f20da5ad0e63585b389624c4a6c
F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
F src/ctime.c 2a322b9a3d75771fb4d99e0702851f4f68dda982507a0f798eefb0712969a410
F src/utf.c ee39565f0843775cc2c81135751ddd93eceb91a673ea2c57f61c76f288b041a0
F src/util.c 41c7a72da1df47864faa378a1c720b38adb288c6838cb6be5594511b6287a048
F src/vacuum.c 492422c1463c076473bae1858799c7a0a5fe87a133d1223239447c422cd26286
-F src/vdbe.c 102d21260bddbb43c845603c3a2d6b4f3762e72f836ccda12991f291485d2539
+F src/vdbe.c 5761ca995715f12825faba7a465c6aa1c92cf88f3199fc221d312268edfde6f5
F src/vdbe.h a71bf43572d3de57923d1928ac01ae8d355cd67e94462ba4f7462265cedbef9a
F src/vdbeInt.h 3ca5e9fd6e095a8b6cf6bc3587a46fc93499503b2fe48951e1034ba9e2ce2f6e
F src/vdbeapi.c c5e7cb2ab89a24d7f723e87b508f21bfb1359a04db5277d8a99fd1e015c12eb9
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 02b1415efb7d9849499afe4e9dbf7e470484bf144d6ca3d28fdc38fc0ac10afa
-R 0f2932eca63747c13c7de64fbcf0f21a
+P 52204cd768f115d13249ff0e3a252b716620f7ad16a6962e1192a09137a78596
+R 2383351840f532b10fd8d9e8187ff10e
U drh
-Z 484e428235115814320582a3c935b7db
+Z 835a3a4123d883b7f5aa3b3a2eaef96a
pRet->retSel.pSrc = (SrcList*)&pRet->retSrcList;
pHash = &(db->aDb[1].pSchema->trigHash);
assert( sqlite3HashFind(pHash, RETURNING_TRIGGER)==0 );
- sqlite3HashInsert(pHash, "sqlite_returning", &pRet->retTrig);
+ if( sqlite3HashInsert(pHash, "sqlite_returning", &pRet->retTrig)
+ ==&pRet->retTrig ){
+ sqlite3OomFault(db);
+ }
}
/*
goto abort_due_to_error;
}
- /* If the SQLITE_CountRows flag is set in sqlite3.flags mask, then
- ** DML statements invoke this opcode to return the number of rows
- ** modified to the user. This is the only way that a VM that
+ /* DML statements can invoke this opcode to return the number of rows
+ ** modified to the user if the "PRAGMA count_changes=ON" pragma has been
+ ** run. DML statement triggers can invoke this satement to implement
+ ** the RETURNING clause. Thess are the only ways that a VM that
** opens a statement transaction may invoke this opcode.
**
** In case this is such a statement, close any statement transaction
** The statement transaction is never a top-level transaction. Hence
** the RELEASE call below can never fail.
*/
- assert( p->iStatement==0 || db->flags&SQLITE_CountRows );
+ assert( p->iStatement==0 || db->flags&SQLITE_CountRows || p->pFrame );
rc = sqlite3VdbeCloseStatement(p, SAVEPOINT_RELEASE);
assert( rc==SQLITE_OK );