File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -4096,6 +4096,13 @@ libsql_wal_methods *libsql_wal_methods_find(const char *zName) {
40964096 static libsql_wal_methods methods ;
40974097 static libsql_wal_methods * methods_head = NULL ;
40984098
4099+ #ifndef SQLITE_OMIT_AUTOINIT
4100+ int rc = sqlite3_initialize ();
4101+ if (rc != SQLITE_OK ) {
4102+ return NULL ;
4103+ }
4104+ #endif
4105+
40994106 if (!zName || * zName == '\0' ) {
41004107 zName = "default" ;
41014108 }
@@ -4159,6 +4166,13 @@ libsql_wal_methods *libsql_wal_methods_find(const char *zName) {
41594166}
41604167
41614168int libsql_wal_methods_register (libsql_wal_methods * pWalMethods ) {
4169+ #ifndef SQLITE_OMIT_AUTOINIT
4170+ int rc = sqlite3_initialize ();
4171+ if (rc != SQLITE_OK ) {
4172+ return rc ;
4173+ }
4174+ #endif
4175+
41624176 if (strncmp (pWalMethods -> zName , "default" , 7 ) == 0 ) {
41634177 return SQLITE_MISUSE ;
41644178 }
You can’t perform that action at this time.
0 commit comments