SQLite

Check-in [d1008b0728]
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
Timelines: family | ancestors | descendants | both | apple-osx
Files: files | file ages | folders
SHA3-256: d1008b07280b51354dfcdebbb5b0c68e276d1ac206df46edbade0838dc27b273
User & Date: drh 2018-10-11 18:45:16.020
Context
2018-10-12
22:02
Fix the SQLITE_ENABLE_APPLE_SPI compile-time option. (check-in: 6cb537bdce user: drh tags: apple-osx)
2018-10-11
18:45
Fix issues with the new textkey pragma from the previous check-in. (check-in: d1008b0728 user: drh tags: apple-osx)
18:41
Add the textkey and textrekey pragmas. (check-in: f03164d454 user: drh tags: trunk)
18:28
Add the textkey and textrekey pragmas. (check-in: f829099d25 user: drh tags: apple-osx)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to src/pragma.c.
2131
2132
2133
2134
2135
2136
2137

2138
2139
2140
2141
2142
2143
2144
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145







+







    if( zRight ){
      int n = pPragma->iArg<4 ? sqlite3Strlen30(zRight) : -1;
      if( (pPragma->iArg & 1)==0 ){
        sqlite3_key_v2(db, zDb, zRight, n);
      }else{
        sqlite3_rekey_v2(db, zDb, zRight, n);
      }
    }
    break;
  }
  case PragTyp_HEXKEY: {
    if( zRight ){
      u8 iByte;
      int i;
      char zKey[40];
Changes to src/pragma.h.
42
43
44
45
46
47
48

49
50
51
52




53
54
55
56
57
58
59
42
43
44
45
46
47
48
49




50
51
52
53
54
55
56
57
58
59
60







+
-
-
-
-
+
+
+
+







#define PragTyp_TABLE_INFO                    34
#define PragTyp_TEMP_STORE                    35
#define PragTyp_TEMP_STORE_DIRECTORY          36
#define PragTyp_THREADS                       37
#define PragTyp_WAL_AUTOCHECKPOINT            38
#define PragTyp_WAL_CHECKPOINT                39
#define PragTyp_ACTIVATE_EXTENSIONS           40
#define PragTyp_HEXKEY                        41
#define PragTyp_KEY                           41
#define PragTyp_LOCK_STATUS                   42
#define PragTyp_PARSER_TRACE                  43
#define PragTyp_STATS                         44
#define PragTyp_KEY                           42
#define PragTyp_LOCK_STATUS                   43
#define PragTyp_PARSER_TRACE                  44
#define PragTyp_STATS                         45

/* Property flags associated with various pragma. */
#define PragFlg_NeedSchema 0x01 /* Force schema load before running */
#define PragFlg_NoColumns  0x02 /* OP_ResultRow called with zero columns */
#define PragFlg_NoColumns1 0x04 /* zero columns if RHS argument is present */
#define PragFlg_ReadOnly   0x08 /* Read-only HEADER_VALUE */
#define PragFlg_Result0    0x10 /* Acts as query when no argument */
316
317
318
319
320
321
322
323

324
325
326
327
328

329
330
331
332
333
334
335
317
318
319
320
321
322
323

324
325
326
327
328

329
330
331
332
333
334
335
336







-
+




-
+







  /* ePragFlg:  */ PragFlg_Result0,
  /* ColNames:  */ 41, 2,
  /* iArg:      */ 0 },
#endif
#endif
#if defined(SQLITE_HAS_CODEC)
 {/* zName:     */ "hexkey",
  /* ePragTyp:  */ PragTyp_KEY,
  /* ePragTyp:  */ PragTyp_HEXKEY,
  /* ePragFlg:  */ 0,
  /* ColNames:  */ 0, 0,
  /* iArg:      */ 2 },
 {/* zName:     */ "hexrekey",
  /* ePragTyp:  */ PragTyp_KEY,
  /* ePragTyp:  */ PragTyp_HEXKEY,
  /* ePragFlg:  */ 0,
  /* ColNames:  */ 0, 0,
  /* iArg:      */ 3 },
#endif
#if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
#if !defined(SQLITE_OMIT_CHECK)
 {/* zName:     */ "ignore_check_constraints",
Changes to tool/mkpragmatab.tcl.
373
374
375
376
377
378
379
380

381
382
383
384
385

386
387
388
389
390
391
392
373
374
375
376
377
378
379

380
381
382
383
384

385
386
387
388
389
390
391
392







-
+




-
+








  NAME: rekey
  TYPE: KEY
  ARG:  1
  IF:   defined(SQLITE_HAS_CODEC)

  NAME: hexkey
  TYPE: KEY
  TYPE: HEXKEY
  ARG:  2
  IF:   defined(SQLITE_HAS_CODEC)

  NAME: hexrekey
  TYPE: KEY
  TYPE: HEXKEY
  ARG:  3
  IF:   defined(SQLITE_HAS_CODEC)

  NAME: textkey
  TYPE: KEY
  ARG:  4
  IF:   defined(SQLITE_HAS_CODEC)