Skip to content

Commit cfd4e1b

Browse files
committed
Remove LIBSQL_ENCRYPTION flag
1 parent 7eed898 commit cfd4e1b

File tree

2 files changed

+4
-28
lines changed

2 files changed

+4
-28
lines changed

libsql-ffi/bundled/src/sqlite3.c

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -121872,10 +121872,6 @@ SQLITE_PRIVATE int sqlite3DbIsNamed(sqlite3 *db, int iDb, const char *zName){
121872121872
int libsql_handle_extra_attach_params(sqlite3* db, const char* zName, const char* zPath, sqlite3_value* pKey, char** zErrDyn);
121873121873
#endif
121874121874

121875-
#ifdef LIBSQL_ENCRYPTION
121876-
SQLITE_PRIVATE int sqlite3mcHandleAttachKey(sqlite3*, const char*, const char*, sqlite3_value*, char**);
121877-
#endif
121878-
121879121875
/*
121880121876
** An SQL user-function registered to do the work of an ATTACH statement. The
121881121877
** three arguments to the function come directly from an attach statement:
@@ -122032,19 +122028,11 @@ static void attachFunc(
122032122028
}
122033122029
#ifdef LIBSQL_EXTRA_URI_PARAMS
122034122030
if (rc == SQLITE_OK) {
122035-
rc = libsql_handle_extra_attach_params(db, zName, zPath, argv, &zErrDyn);
122036-
}
122037-
#endif
122038-
122039-
#ifdef LIBSQL_ENCRYPTION
122040-
/* If the ATTACH statement came with key parameter, then lets handle it here. */
122041-
if( rc==SQLITE_OK ){
122042-
if( argv != NULL && argv[0] != NULL && argv[1] != NULL && argv[2] != NULL ){
122043-
rc = sqlite3mcHandleAttachKey(db, zName, zPath, argv[2], &zErrDyn);
122031+
if (argv != NULL && argv[0] != NULL && argv[1] != NULL && argv[2] != NULL) {
122032+
rc = libsql_handle_extra_attach_params(db, zName, zPath, argv[2], &zErrDyn);
122044122033
}
122045122034
}
122046122035
#endif
122047-
122048122036
sqlite3_free_filename( zPath );
122049122037

122050122038
/* If the file was opened successfully, read the schema for the new database.

libsql-sqlite3/src/attach.c

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,6 @@ int sqlite3DbIsNamed(sqlite3 *db, int iDb, const char *zName){
6161
int libsql_handle_extra_attach_params(sqlite3* db, const char* zName, const char* zPath, sqlite3_value* pKey, char** zErrDyn);
6262
#endif
6363

64-
#ifdef LIBSQL_ENCRYPTION
65-
SQLITE_PRIVATE int sqlite3mcHandleAttachKey(sqlite3*, const char*, const char*, sqlite3_value*, char**);
66-
#endif
67-
6864
/*
6965
** An SQL user-function registered to do the work of an ATTACH statement. The
7066
** three arguments to the function come directly from an attach statement:
@@ -221,19 +217,11 @@ static void attachFunc(
221217
}
222218
#ifdef LIBSQL_EXTRA_URI_PARAMS
223219
if (rc == SQLITE_OK) {
224-
rc = libsql_handle_extra_attach_params(db, zName, zPath, argv, &zErrDyn);
225-
}
226-
#endif
227-
228-
#ifdef LIBSQL_ENCRYPTION
229-
/* If the ATTACH statement came with key parameter, then lets handle it here. */
230-
if( rc==SQLITE_OK ){
231-
if( argv != NULL && argv[0] != NULL && argv[1] != NULL && argv[2] != NULL ){
232-
rc = sqlite3mcHandleAttachKey(db, zName, zPath, argv[2], &zErrDyn);
220+
if (argv != NULL && argv[0] != NULL && argv[1] != NULL && argv[2] != NULL) {
221+
rc = libsql_handle_extra_attach_params(db, zName, zPath, argv[2], &zErrDyn);
233222
}
234223
}
235224
#endif
236-
237225
sqlite3_free_filename( zPath );
238226

239227
/* If the file was opened successfully, read the schema for the new database.

0 commit comments

Comments
 (0)