aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/attach.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/attach.c b/src/attach.c
index d79f6e602..dbe0bb033 100644
--- a/src/attach.c
+++ b/src/attach.c
@@ -151,7 +151,7 @@ static void attachFunc(
aNew->safety_level = 3;
#if SQLITE_HAS_CODEC
- {
+ if( rc==SQLITE_OK ){
extern int sqlite3CodecAttach(sqlite3*, int, const void*, int);
extern void sqlite3CodecGetKey(sqlite3*, int, void**, int*);
int nKey;
@@ -168,13 +168,13 @@ static void attachFunc(
case SQLITE_BLOB:
nKey = sqlite3_value_bytes(argv[2]);
zKey = (char *)sqlite3_value_blob(argv[2]);
- sqlite3CodecAttach(db, db->nDb-1, zKey, nKey);
+ rc = sqlite3CodecAttach(db, db->nDb-1, zKey, nKey);
break;
case SQLITE_NULL:
/* No key specified. Use the key from the main database */
sqlite3CodecGetKey(db, 0, (void**)&zKey, &nKey);
- sqlite3CodecAttach(db, db->nDb-1, zKey, nKey);
+ rc = sqlite3CodecAttach(db, db->nDb-1, zKey, nKey);
break;
}
}