/ Check-in [a7c9e898]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Provide a pragma to set the codec key. (CVS 2806)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a7c9e8989c752f6b1148e7cc7bf59bbd8b402e87
User & Date: drh 2005-12-08 18:12:56
Context
2005-12-09
02:35
Add more stress testing to autovacuum in an (unsuccessful) attempt to reproduce a reported problem. Even though these tests did not uncover anything amiss, extra tests never hurt... (CVS 2807) check-in: d8a8933f user: drh tags: trunk
2005-12-08
18:12
Provide a pragma to set the codec key. (CVS 2806) check-in: a7c9e898 user: drh tags: trunk
2005-12-07
06:27
Add some tests for malloc() failure within the column_name() and column_decl() APIs. (CVS 2805) check-in: 78f10ca0 user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pragma.c.

     7      7   **    May you do good and not evil.
     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains code used to implement the PRAGMA command.
    13     13   **
    14         -** $Id: pragma.c,v 1.105 2005/11/30 03:20:31 drh Exp $
           14  +** $Id: pragma.c,v 1.106 2005/12/08 18:12:56 drh Exp $
    15     15   */
    16     16   #include "sqliteInt.h"
    17     17   #include "os.h"
    18     18   #include <ctype.h>
    19     19   
    20     20   /* Ignore this whole file if pragmas are disabled
    21     21   */
................................................................................
   917    917     ** if it does not.
   918    918     */
   919    919     if( sqlite3StrICmp(zLeft, "create_sqlite_statement_table")==0 ){
   920    920       extern int sqlite3CreateStatementsTable(Parse*);
   921    921       sqlite3CreateStatementsTable(pParse);
   922    922     }else
   923    923   #endif
          924  +
          925  +#if SQLITE_HAS_CODEC
          926  +  if( sqlite3StrICmp(zLeft, "key")==0 ){
          927  +    sqlite3_key(db, zRight, strlen(zRight));
          928  +  }else
          929  +#endif
   924    930   
   925    931     {}
   926    932   
   927    933     if( v ){
   928    934       /* Code an OP_Expire at the end of each PRAGMA program to cause
   929    935       ** the VDBE implementing the pragma to expire. Most (all?) pragmas
   930    936       ** are only valid for a single execution.