Introduce the (experimental) sqlite3_result_error_toobig() API that
function implementations can use to signal SQLite that the function
result is too big to represent. (CVS 3949)

FossilOrigin-Name: 17c4235c492f746867c1d2b8621043b93f8aa10e
diff --git a/src/vdbeapi.c b/src/vdbeapi.c
index 4e12105..7ff9ba2 100644
--- a/src/vdbeapi.c
+++ b/src/vdbeapi.c
@@ -156,6 +156,11 @@
   sqlite3VdbeMemSetZeroBlob(&pCtx->s, n);
 }
 
+/* Force an SQLITE_TOOBIG error. */
+void sqlite3_result_error_toobig(sqlite3_context *pCtx){
+  sqlite3VdbeMemSetZeroBlob(&pCtx->s, SQLITE_MAX_LENGTH+1);
+}
+
 
 /*
 ** Execute the statement pStmt, either until a row of data is ready, the