diff options
author | drh <drh@noemail.net> | 2020-02-07 01:12:53 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2020-02-07 01:12:53 +0000 |
commit | b48c0d59faf3bfd3e1fc0c3bed5557816c36cb7e (patch) | |
tree | 4f85a82a3053870293425b7a994a155c874741a4 /src/pragma.c | |
parent | c84ad3185111e6f437fd89eb702614a232e0c76f (diff) | |
download | sqlite-b48c0d59faf3bfd3e1fc0c3bed5557816c36cb7e.tar.gz sqlite-b48c0d59faf3bfd3e1fc0c3bed5557816c36cb7e.zip |
Simplify the code by removing the unsupported and undocumented
SQLITE_HAS_CODEC compile-time option
FossilOrigin-Name: 5a877221ce90e7523059353a68650c5fdd28ed032807afc2f10afbfbf864bdfe
Diffstat (limited to 'src/pragma.c')
-rw-r--r-- | src/pragma.c | 50 |
1 files changed, 1 insertions, 49 deletions
diff --git a/src/pragma.c b/src/pragma.c index 4d33e8c47..60e18e7f0 100644 --- a/src/pragma.c +++ b/src/pragma.c @@ -2215,59 +2215,11 @@ void sqlite3Pragma( } #endif -#ifdef SQLITE_HAS_CODEC - /* Pragma iArg - ** ---------- ------ - ** key 0 - ** rekey 1 - ** hexkey 2 - ** hexrekey 3 - ** textkey 4 - ** textrekey 5 - */ - case PragTyp_KEY: { - if( zRight ){ - char zBuf[40]; - const char *zKey = zRight; - int n; - if( pPragma->iArg==2 || pPragma->iArg==3 ){ - u8 iByte; - int i; - for(i=0, iByte=0; i<sizeof(zBuf)*2 && sqlite3Isxdigit(zRight[i]); i++){ - iByte = (iByte<<4) + sqlite3HexToInt(zRight[i]); - if( (i&1)!=0 ) zBuf[i/2] = iByte; - } - zKey = zBuf; - n = i/2; - }else{ - n = pPragma->iArg<4 ? sqlite3Strlen30(zRight) : -1; - } - if( (pPragma->iArg & 1)==0 ){ - rc = sqlite3_key_v2(db, zDb, zKey, n); - }else{ - rc = sqlite3_rekey_v2(db, zDb, zKey, n); - } - if( rc==SQLITE_OK && n!=0 ){ - sqlite3VdbeSetNumCols(v, 1); - sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "ok", SQLITE_STATIC); - returnSingleText(v, "ok"); - } - } - break; - } -#endif -#if defined(SQLITE_HAS_CODEC) || defined(SQLITE_ENABLE_CEROD) +#if defined(SQLITE_ENABLE_CEROD) case PragTyp_ACTIVATE_EXTENSIONS: if( zRight ){ -#ifdef SQLITE_HAS_CODEC - if( sqlite3StrNICmp(zRight, "see-", 4)==0 ){ - sqlite3_activate_see(&zRight[4]); - } -#endif -#ifdef SQLITE_ENABLE_CEROD if( sqlite3StrNICmp(zRight, "cerod-", 6)==0 ){ sqlite3_activate_cerod(&zRight[6]); } -#endif } break; #endif |