/ Check-in [d1008b07]
Login

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

Overview
Comment:Fix issues with the new textkey pragma from the previous check-in.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | apple-osx
Files: files | file ages | folders
SHA3-256: d1008b07280b51354dfcdebbb5b0c68e276d1ac206df46edbade0838dc27b273
User & Date: drh 2018-10-11 18:45:16
Context
2018-10-12
22:02
Fix the SQLITE_ENABLE_APPLE_SPI compile-time option. check-in: 6cb537bd user: drh tags: apple-osx
2018-10-11
18:45
Fix issues with the new textkey pragma from the previous check-in. check-in: d1008b07 user: drh tags: apple-osx
18:41
Add the textkey and textrekey pragmas. check-in: f03164d4 user: drh tags: trunk
18:28
Add the textkey and textrekey pragmas. check-in: f829099d user: drh tags: apple-osx
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pragma.c.

  2131   2131       if( zRight ){
  2132   2132         int n = pPragma->iArg<4 ? sqlite3Strlen30(zRight) : -1;
  2133   2133         if( (pPragma->iArg & 1)==0 ){
  2134   2134           sqlite3_key_v2(db, zDb, zRight, n);
  2135   2135         }else{
  2136   2136           sqlite3_rekey_v2(db, zDb, zRight, n);
  2137   2137         }
         2138  +    }
  2138   2139       break;
  2139   2140     }
  2140   2141     case PragTyp_HEXKEY: {
  2141   2142       if( zRight ){
  2142   2143         u8 iByte;
  2143   2144         int i;
  2144   2145         char zKey[40];

Changes to src/pragma.h.

    42     42   #define PragTyp_TABLE_INFO                    34
    43     43   #define PragTyp_TEMP_STORE                    35
    44     44   #define PragTyp_TEMP_STORE_DIRECTORY          36
    45     45   #define PragTyp_THREADS                       37
    46     46   #define PragTyp_WAL_AUTOCHECKPOINT            38
    47     47   #define PragTyp_WAL_CHECKPOINT                39
    48     48   #define PragTyp_ACTIVATE_EXTENSIONS           40
    49         -#define PragTyp_KEY                           41
    50         -#define PragTyp_LOCK_STATUS                   42
    51         -#define PragTyp_PARSER_TRACE                  43
    52         -#define PragTyp_STATS                         44
           49  +#define PragTyp_HEXKEY                        41
           50  +#define PragTyp_KEY                           42
           51  +#define PragTyp_LOCK_STATUS                   43
           52  +#define PragTyp_PARSER_TRACE                  44
           53  +#define PragTyp_STATS                         45
    53     54   
    54     55   /* Property flags associated with various pragma. */
    55     56   #define PragFlg_NeedSchema 0x01 /* Force schema load before running */
    56     57   #define PragFlg_NoColumns  0x02 /* OP_ResultRow called with zero columns */
    57     58   #define PragFlg_NoColumns1 0x04 /* zero columns if RHS argument is present */
    58     59   #define PragFlg_ReadOnly   0x08 /* Read-only HEADER_VALUE */
    59     60   #define PragFlg_Result0    0x10 /* Acts as query when no argument */
................................................................................
   316    317     /* ePragFlg:  */ PragFlg_Result0,
   317    318     /* ColNames:  */ 41, 2,
   318    319     /* iArg:      */ 0 },
   319    320   #endif
   320    321   #endif
   321    322   #if defined(SQLITE_HAS_CODEC)
   322    323    {/* zName:     */ "hexkey",
   323         -  /* ePragTyp:  */ PragTyp_KEY,
          324  +  /* ePragTyp:  */ PragTyp_HEXKEY,
   324    325     /* ePragFlg:  */ 0,
   325    326     /* ColNames:  */ 0, 0,
   326    327     /* iArg:      */ 2 },
   327    328    {/* zName:     */ "hexrekey",
   328         -  /* ePragTyp:  */ PragTyp_KEY,
          329  +  /* ePragTyp:  */ PragTyp_HEXKEY,
   329    330     /* ePragFlg:  */ 0,
   330    331     /* ColNames:  */ 0, 0,
   331    332     /* iArg:      */ 3 },
   332    333   #endif
   333    334   #if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
   334    335   #if !defined(SQLITE_OMIT_CHECK)
   335    336    {/* zName:     */ "ignore_check_constraints",

Changes to tool/mkpragmatab.tcl.

   373    373   
   374    374     NAME: rekey
   375    375     TYPE: KEY
   376    376     ARG:  1
   377    377     IF:   defined(SQLITE_HAS_CODEC)
   378    378   
   379    379     NAME: hexkey
   380         -  TYPE: KEY
          380  +  TYPE: HEXKEY
   381    381     ARG:  2
   382    382     IF:   defined(SQLITE_HAS_CODEC)
   383    383   
   384    384     NAME: hexrekey
   385         -  TYPE: KEY
          385  +  TYPE: HEXKEY
   386    386     ARG:  3
   387    387     IF:   defined(SQLITE_HAS_CODEC)
   388    388   
   389    389     NAME: textkey
   390    390     TYPE: KEY
   391    391     ARG:  4
   392    392     IF:   defined(SQLITE_HAS_CODEC)