/ Check-in [34a3413a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Consistent use of #ifdef for SQLITE_HAS_CODEC to avoid confusion.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 34a3413a5318050254b246ad859c91c134516a32
User & Date: shaneh 2010-02-17 17:48:47
Context
2010-02-18
08:19
Allow statements like "REPLACE INTO tbl(rowid) VALUES(...)" to run without a statement journal as long as there are no triggers, foreign keys or indexes. check-in: 0e422580 user: dan tags: trunk
2010-02-17
19:34
Merge latest changes from the trunk into the apple-osx branch. check-in: 4b72e39b user: drh tags: apple-osx
17:48
Consistent use of #ifdef for SQLITE_HAS_CODEC to avoid confusion. check-in: 34a3413a user: shaneh tags: trunk
04:19
Avoid using the internal printf routine for round(x,y) in the common case where y==0. check-in: d76ad8b3 user: shaneh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/attach.c.

   146    146       sqlite3PagerJournalMode(pPager, db->dfltJournalMode);
   147    147       sqlite3BtreeSecureDelete(aNew->pBt,
   148    148                                sqlite3BtreeSecureDelete(db->aDb[0].pBt,-1) );
   149    149     }
   150    150     aNew->zName = sqlite3DbStrDup(db, zName);
   151    151     aNew->safety_level = 3;
   152    152   
   153         -#if SQLITE_HAS_CODEC
          153  +#ifdef SQLITE_HAS_CODEC
   154    154     if( rc==SQLITE_OK ){
   155    155       extern int sqlite3CodecAttach(sqlite3*, int, const void*, int);
   156    156       extern void sqlite3CodecGetKey(sqlite3*, int, void**, int*);
   157    157       int nKey;
   158    158       char *zKey;
   159    159       int t = sqlite3_value_type(argv[2]);
   160    160       switch( t ){

Changes to src/pragma.c.

  1389   1389         sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, zState, P4_STATIC);
  1390   1390         sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 2);
  1391   1391       }
  1392   1392   
  1393   1393     }else
  1394   1394   #endif
  1395   1395   
  1396         -#if SQLITE_HAS_CODEC
         1396  +#ifdef SQLITE_HAS_CODEC
  1397   1397     if( sqlite3StrICmp(zLeft, "key")==0 && zRight ){
  1398   1398       sqlite3_key(db, zRight, sqlite3Strlen30(zRight));
  1399   1399     }else
  1400   1400     if( sqlite3StrICmp(zLeft, "rekey")==0 && zRight ){
  1401   1401       sqlite3_rekey(db, zRight, sqlite3Strlen30(zRight));
  1402   1402     }else
  1403   1403     if( zRight && (sqlite3StrICmp(zLeft, "hexkey")==0 ||
................................................................................
  1412   1412       if( (zLeft[3] & 0xf)==0xb ){
  1413   1413         sqlite3_key(db, zKey, i/2);
  1414   1414       }else{
  1415   1415         sqlite3_rekey(db, zKey, i/2);
  1416   1416       }
  1417   1417     }else
  1418   1418   #endif
  1419         -#if SQLITE_HAS_CODEC || defined(SQLITE_ENABLE_CEROD)
         1419  +#if defined(SQLITE_HAS_CODEC) || defined(SQLITE_ENABLE_CEROD)
  1420   1420     if( sqlite3StrICmp(zLeft, "activate_extensions")==0 ){
  1421         -#if SQLITE_HAS_CODEC
         1421  +#ifdef SQLITE_HAS_CODEC
  1422   1422       if( sqlite3StrNICmp(zRight, "see-", 4)==0 ){
  1423   1423         sqlite3_activate_see(&zRight[4]);
  1424   1424       }
  1425   1425   #endif
  1426   1426   #ifdef SQLITE_ENABLE_CEROD
  1427   1427       if( sqlite3StrNICmp(zRight, "cerod-", 6)==0 ){
  1428   1428         sqlite3_activate_cerod(&zRight[6]);