Add the SQLITE_CONFIG_MEMDB_MAXSIZE configuration option for configuring
the default maximum size of an in-memory database created using
sqlite3_deserialize(). This is necessary to make the interface reasonably
testable.
FossilOrigin-Name: cb72ee0478ce98c48aae059fd5de4e36caf2b8c953e08fcb799bfd119ad46b73
diff --git a/src/main.c b/src/main.c
index efffc2b..c40e6e8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -653,6 +653,13 @@
}
#endif /* SQLITE_ENABLE_SORTER_REFERENCES */
+#ifdef SQLITE_ENABLE_DESERIALIZE
+ case SQLITE_CONFIG_MEMDB_MAXSIZE: {
+ sqlite3GlobalConfig.mxMemdbSize = va_arg(ap, sqlite3_int64);
+ break;
+ }
+#endif /* SQLITE_ENABLE_DESERIALIZE */
+
default: {
rc = SQLITE_ERROR;
break;