diff -uprN sqlite-patch001/sqlite3.c sqlite-patch002/sqlite3.c
--- sqlite-patch001/sqlite3.c	2020-05-25 10:49:04.057117196 +0800
+++ sqlite-patch002/sqlite3.c	2020-05-25 10:56:21.120064808 +0800
@@ -1167,7 +1167,7 @@ extern "C" {
 */
 #define SQLITE_VERSION        "3.31.1"
 #define SQLITE_VERSION_NUMBER 3031001
-#define SQLITE_SOURCE_ID      "2020-01-27 19:55:54 bc2f42080a6a8a33048eedf289152768c416b2a7677a92111b3b1ea60d4aalt1"
+#define SQLITE_SOURCE_ID      "2020-04-03 13:19:03 0f4911fdb07c7c4111731d3db0adae54ee750ddbad8d98bf9ab957fb923falt1"
 
 /*
 ** CAPI3REF: Run-Time Library Version Numbers
@@ -133226,6 +133226,7 @@ static void resetAccumulator(Parse *pPar
   struct AggInfo_func *pFunc;
   int nReg = pAggInfo->nFunc + pAggInfo->nColumn;
   if( nReg==0 ) return;
+  if( pParse->nErr ) return;
 #ifdef SQLITE_DEBUG
   /* Verify that all AggInfo registers are within the range specified by
   ** AggInfo.mnReg..AggInfo.mxReg */
@@ -223680,7 +223681,7 @@ static void fts5SourceIdFunc(
 ){
   assert( nArg==0 );
   UNUSED_PARAM2(nArg, apUnused);
-  sqlite3_result_text(pCtx, "fts5: 2020-01-27 19:55:54 abc473fb8fb999005dc79a360e34f97b3b25429decf1820dd2afa5c19577753d", -1, SQLITE_TRANSIENT);
+  sqlite3_result_text(pCtx, "fts5: 2020-04-03 13:19:03 4a302b42c7bf5e11ddb5522ca999f74aba397d3a7eb91b1844bb02852f772441", -1, SQLITE_TRANSIENT);
 }
 
 /*
@@ -228453,9 +228454,9 @@ SQLITE_API int sqlite3_stmt_init(
 #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
 
 /************** End of stmt.c ************************************************/
-#if __LINE__!=228456
+#if __LINE__!=228457
 #undef SQLITE_SOURCE_ID
-#define SQLITE_SOURCE_ID      "2020-01-27 19:55:54 bc2f42080a6a8a33048eedf289152768c416b2a7677a92111b3b1ea60d4aalt2"
+#define SQLITE_SOURCE_ID      "2020-04-03 13:19:03 0f4911fdb07c7c4111731d3db0adae54ee750ddbad8d98bf9ab957fb923falt2"
 #endif
 /* Return the source-id for this library */
 SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
diff -uprN sqlite-patch001/sqlite3.h sqlite-patch002/sqlite3.h
--- sqlite-patch001/sqlite3.h	2020-05-25 10:49:17.932970790 +0800
+++ sqlite-patch002/sqlite3.h	2020-05-25 10:56:23.296037923 +0800
@@ -125,7 +125,7 @@ extern "C" {
 */
 #define SQLITE_VERSION        "3.31.1"
 #define SQLITE_VERSION_NUMBER 3031001
-#define SQLITE_SOURCE_ID      "2020-01-27 19:55:54 bc2f42080a6a8a33048eedf289152768c416b2a7677a92111b3b1ea60d4aalt1"
+#define SQLITE_SOURCE_ID      "2020-04-03 13:19:03 0f4911fdb07c7c4111731d3db0adae54ee750ddbad8d98bf9ab957fb923falt1"
 
 /*
 ** CAPI3REF: Run-Time Library Version Numbers
