/ Check-in [673a7dd6]
Login

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

Overview
Comment:Fix further problems with fts5 and corrupt databases causing integer overflow.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:673a7dd698eca05bb2909fa01f962a0667361732a6d0e61cf7780ead4a07c967
User & Date: dan 2019-01-08 08:02:12
Context
2019-01-08
14:28
Fix a possible memory leak when trying to UPDATE a corrupt RTREE index. check-in: 63eb803d user: drh tags: trunk
08:02
Fix further problems with fts5 and corrupt databases causing integer overflow. check-in: 673a7dd6 user: dan tags: trunk
2019-01-07
16:52
Fix another potential buffer overread in fts5. check-in: d0e943d9 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/fts5/fts5_buffer.c.

    13     13   
    14     14   
    15     15   
    16     16   #include "fts5Int.h"
    17     17   
    18     18   int sqlite3Fts5BufferSize(int *pRc, Fts5Buffer *pBuf, u32 nByte){
    19     19     if( (u32)pBuf->nSpace<nByte ){
    20         -    u32 nNew = pBuf->nSpace ? pBuf->nSpace : 64;
           20  +    u64 nNew = pBuf->nSpace ? pBuf->nSpace : 64;
    21     21       u8 *pNew;
    22     22       while( nNew<nByte ){
    23     23         nNew = nNew * 2;
    24     24       }
    25         -    pNew = sqlite3_realloc(pBuf->p, nNew);
           25  +    pNew = sqlite3_realloc64(pBuf->p, nNew);
    26     26       if( pNew==0 ){
    27     27         *pRc = SQLITE_NOMEM;
    28     28         return 1;
    29     29       }else{
    30     30         pBuf->nSpace = nNew;
    31     31         pBuf->p = pNew;
    32     32       }

Changes to ext/fts5/fts5_index.c.

  2230   2230     const u8 *pTerm, int nTerm      /* Term to search for */
  2231   2231   ){
  2232   2232     int iOff;
  2233   2233     const u8 *a = pIter->pLeaf->p;
  2234   2234     int szLeaf = pIter->pLeaf->szLeaf;
  2235   2235     int n = pIter->pLeaf->nn;
  2236   2236   
  2237         -  int nMatch = 0;
  2238         -  int nKeep = 0;
  2239         -  int nNew = 0;
  2240         -  int iTermOff;
         2237  +  u32 nMatch = 0;
         2238  +  u32 nKeep = 0;
         2239  +  u32 nNew = 0;
         2240  +  u32 iTermOff;
  2241   2241     int iPgidx;                     /* Current offset in pgidx */
  2242   2242     int bEndOfPage = 0;
  2243   2243   
  2244   2244     assert( p->rc==SQLITE_OK );
  2245   2245   
  2246   2246     iPgidx = szLeaf;
  2247   2247     iPgidx += fts5GetVarint32(&a[iPgidx], iTermOff);

Changes to ext/fts5/test/fts5corrupt3.test.

  2812   2812   
  2813   2813   do_catchsql_test 26.1 {
  2814   2814     BEGIN;
  2815   2815       INSERT INTO t1(t1) VALUES('rebuild');
  2816   2816       INSERT INTO t1(t1) VALUES('integrity-check');
  2817   2817     COMMIT;
  2818   2818   } {0 {}}
         2819  +
         2820  +#--------------------------------------------------------------------------
         2821  +reset_db
         2822  +do_test 27.0 {
         2823  +  sqlite3 db {}
         2824  +  db deserialize [decode_hexdb {
         2825  +| size 32768 pagesize 4096 filename timeout-2ca5b0658c98.db
         2826  +| page 1 offset 0
         2827  +|      0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00   SQLite format 3.
         2828  +|     16: 10 00 01 01 00 40 20 20 00 00 00 00 00 00 00 08   .....@  ........
         2829  +|     32: 00 00 00 02 00 00 00 01 00 00 00 09 00 00 00 04   ................
         2830  +|     48: 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00   ................
         2831  +|     96: 00 00 00 00 0d 0f c7 00 07 0d 92 00 0f 8d 0f 36   ...............6
         2832  +|    112: 0e cb 0e 6b 0e 0e 0d b6 0d 92 0d 92 00 00 00 00   ...k............
         2833  +|   3472: 00 00 22 08 06 17 11 11 01 31 74 61 62 6c 65 74   .........1tablet
         2834  +|   3488: 32 74 32 08 43 52 45 41 54 45 20 54 41 42 4c 45   2t2.CREATE TABLE
         2835  +|   3504: 20 74 32 28 78 29 56 07 06 17 1f 1f 01 7d 74 61    t2(x)V.......ta
         2836  +|   3520: 62 6c 65 74 31 5f 63 6f 6e 66 69 67 74 31 5f 63   blet1_configt1_c
         2837  +|   3536: 6f 6e 66 69 67 07 43 52 45 41 54 45 20 54 41 42   onfig.CREATE TAB
         2838  +|   3552: 4c 45 20 27 74 31 5f 63 6f 6e 66 69 67 27 28 6b   LE 't1_config'(k
         2839  +|   3568: 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 76 29    PRIMARY KEY, v)
         2840  +|   3584: 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 5b 06    WITHOUT ROWID[.
         2841  +|   3600: 07 17 21 21 01 81 01 74 61 62 6c 65 74 31 5f 64   ..!!...tablet1_d
         2842  +|   3616: 6f 63 73 69 7a 65 74 31 5f 64 6f 63 73 69 7a 65   ocsizet1_docsize
         2843  +|   3632: 06 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 74   .CREATE TABLE 't
         2844  +|   3648: 31 5f 64 6f 63 73 69 7a 65 27 28 69 64 20 49 4e   1_docsize'(id IN
         2845  +|   3664: 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45   TEGER PRIMARY KE
         2846  +|   3680: 59 2c 20 73 7a 20 42 4c 4f 42 29 5e 05 07 17 21   Y, sz BLOB)^...!
         2847  +|   3696: 21 01 81 07 74 61 62 6c 65 74 31 5f 63 6f 6e 74   !...tablet1_cont
         2848  +|   3712: 65 6e 74 74 31 5f 63 6f 6e 74 65 6e 74 05 43 52   entt1_content.CR
         2849  +|   3728: 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 63   EATE TABLE 't1_c
         2850  +|   3744: 6f 6e 74 65 6e 74 27 28 69 64 20 49 4e 54 45 47   ontent'(id INTEG
         2851  +|   3760: 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20   ER PRIMARY KEY, 
         2852  +|   3776: 63 30 2c 20 63 31 2c 20 63 32 29 69 04 07 17 19   c0, c1, c2)i....
         2853  +|   3792: 19 01 81 2d 74 61 62 6c 65 74 31 5f 69 64 78 74   ...-tablet1_idxt
         2854  +|   3808: 31 5f 69 64 78 04 43 52 45 41 54 45 20 54 41 42   1_idx.CREATE TAB
         2855  +|   3824: 4c 45 20 27 74 31 5f 69 64 78 27 28 73 65 67 69   LE 't1_idx'(segi
         2856  +|   3840: 64 2c 20 74 65 72 6d 2c 20 70 67 6e 6f 2c 20 50   d, term, pgno, P
         2857  +|   3856: 52 49 4d 41 52 59 20 4b 45 59 28 73 65 67 69 64   RIMARY KEY(segid
         2858  +|   3872: 2c 20 74 65 72 6d 29 29 20 57 49 54 48 4f 55 54   , term)) WITHOUT
         2859  +|   3888: 20 52 4f 57 49 44 55 03 07 17 1b 1b 01 81 01 74    ROWIDU........t
         2860  +|   3904: 61 62 6c 65 74 31 5f 64 61 74 61 74 31 5f 64 61   ablet1_datat1_da
         2861  +|   3920: 74 61 03 43 52 45 41 54 45 20 54 41 42 4c 45 20   ta.CREATE TABLE 
         2862  +|   3936: 27 74 31 5f 64 61 74 61 27 28 69 64 20 49 4e 54   't1_data'(id INT
         2863  +|   3952: 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59   EGER PRIMARY KEY
         2864  +|   3968: 2c 20 62 6c 6f 63 6b 20 42 4c 4f 42 29 38 02 06   , block BLOB)8..
         2865  +|   3984: 17 11 11 08 5f 74 61 62 6c 65 74 31 74 31 43 52   ...._tablet1t1CR
         2866  +|   4000: 45 41 54 45 20 56 49 52 54 55 41 4c 20 54 41 42   EATE VIRTUAL TAB
         2867  +|   4016: 4c 45 20 74 31 20 55 53 49 4e 47 20 66 74 73 35   LE t1 USING fts5
         2868  +|   4032: 28 61 2c 62 2c 63 29 00 00 00 39 00 00 00 00 00   (a,b,c)...9.....
         2869  +| page 3 offset 8192
         2870  +|      0: 0d 00 00 00 03 0c 94 00 0f e6 0f ef 0c 94 00 00   ................
         2871  +|   3216: 00 00 00 00 86 4a 84 80 80 80 80 01 04 00 8d 18   .....J..........
         2872  +|   3232: 00 00 03 2b 02 30 30 01 02 06 01 02 06 01 02 06   ...+.00.........
         2873  +|   3248: 1f 02 03 01 02 03 01 02 03 01 08 32 30 31 36 30   ...........20160
         2874  +|   3264: 36 30 39 01 02 07 01 02 07 01 02 07 01 01 34 01   609...........4.
         2875  +|   3280: 02 05 01 02 05 01 02 05 01 01 35 01 02 04 01 02   ..........5.....
         2876  +|   3296: 04 01 02 04 02 07 30 30 30 30 30 30 30 1c 02 04   ......0000000...
         2877  +|   3312: 01 02 04 01 02 04 01 06 62 69 6e 61 72 79 03 06   ........binary..
         2878  +|   3328: 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01   ................
         2879  +|   3344: 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02   ................
         2880  +|   3360: 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 02   ................
         2881  +|   3376: 03 06 01 02 02 03 06 01 02 02 01 08 63 6f 6d 70   ............comp
         2882  +|   3392: 69 6c 65 72 01 20 01 02 02 02 01 02 02 01 06 64   iler. .........d
         2883  +|   3408: 62 73 7c cc cc cc cc cc cc cc cc cc cc cc cc cc   bs|.............
         2884  +|   3424: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc   ................
         2885  +|   3440: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc   ................
         2886  +|   3456: cc cc cc cc cc cc c4 61 74 07 02 03 01 02 03 01   .......at.......
         2887  +|   3472: 02 03 02 04 65 62 75 67 04 02 02 01 02 02 01 02   ....ebug........
         2888  +|   3488: 02 01 06 65 6e 61 62 6c 65 07 02 02 01 02 02 01   ...enable.......
         2889  +|   3504: 02 02 01 02 02 01 02 02 01 02 02 01 02 02 01 02   ................
         2890  +|   3520: 02 01 02 02 01 02 02 01 02 02 01 02 02 01 02 02   ................
         2891  +|   3536: 01 02 02 01 02 02 01 02 02 01 02 02 01 02 05 23   ...............#
         2892  +|   3552: d6 76 36 32 d3 52 e3 42 e3 02 03 23 03 13 63 03   .v62.R.B...#..c.
         2893  +|   3568: 63 03 95 84 e4 f4 34 15 34 52 60 10 50 04 30 f1   c.....4.4R`.P.0.
         2894  +|   3584: 74 34 f4 d5 04 94 c4 55 23 d6 76 36 32 d3 52 e3   t4.....U#.v62.R.
         2895  +|   3600: 42 e3 02 03 23 03 13 63 03 63 03 95 85 25 45 24   B...#..c.c...%E$
         2896  +|   3616: 94 d0 d0 00 00 02 40 ee 00 00 ff 80 ff 00 fe 80   ......@.........
         2897  +|   3632: fe 00 fd 80 fd 00 fc 80 fc 00 fb 80 fb 00 fa 80   ................
         2898  +|   3648: fa 00 f9 80 f9 00 f8 80 f8 00 f7 80 f7 00 f6 80   ................
         2899  +|   3664: f6 00 f5 80 f5 00 f4 80 f4 00 f8 0f 30 0f 28 0f   ............0.(.
         2900  +|   3680: 20 0f 18 0f 10 0f 08 0f 00 0e f8 0e f0 0e e8 0e    ...............
         2901  +|   3696: e0 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01   ................
         2902  +|   3712: 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02   ................
         2903  +|   3728: 02 01 04 6f 6d 69 74 1f 02 02 01 02 02 01 02 02   ...omit.........
         2904  +|   3744: 01 05 72 74 72 65 65 19 02 03 01 02 03 01 02 03   ..rtree.........
         2905  +|   3760: 04 02 69 6d 01 06 01 02 02 03 06 01 02 02 03 06   ..im............
         2906  +|   3776: 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01   ................
         2907  +|   3792: 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02   ................
         2908  +|   3808: 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 02   ................
         2909  +|   3824: 01 0a 74 68 72 65 61 64 73 61 66 65 22 02 02 01   ..threadsafe....
         2910  +|   3840: 02 02 01 02 02 01 04 76 74 61 62 07 02 04 01 02   .......vtab.....
         2911  +|   3856: 04 01 02 04 01 01 78 01 06 01 01 02 01 06 01 01   ......x.........
         2912  +|   3872: 02 01 06 01 01 02 01 06 01 01 02 01 06 01 01 02   ................
         2913  +|   3888: 01 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01   ................
         2914  +|   3904: 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06   ................
         2915  +|   3920: 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 01   ................
         2916  +|   3936: 01 02 01 06 01 01 02 01 06 01 01 02 01 06 01 01   ................
         2917  +|   3952: 02 01 06 01 01 02 01 06 01 01 02 01 06 01 01 02   ................
         2918  +|   3968: 01 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01   ................
         2919  +|   3984: 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06   ................
         2920  +|   4000: 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 01   ................
         2921  +|   4016: 01 02 01 06 01 01 02 01 06 01 01 02 01 06 01 01   ................
         2922  +|   4032: 02 01 06 01 01 02 01 06 01 01 02 04 15 13 0c 0c   ................
         2923  +|   4048: 12 44 13 11 0f 47 13 0f 0c 0e 11 10 0f 0e 10 0f   .D...G..........
         2924  +|   4064: 44 0f 10 40 15 0f 07 01 03 00 14 24 5a 24 24 0f   D..@.......$Z$$.
         2925  +|   4080: 0a 03 00 24 00 00 00 00 01 01 01 00 01 01 01 01   ...$............
         2926  +| page 4 offset 12288
         2927  +|      0: 0a 00 00 00 01 0f fa 00 0f fa 00 00 00 00 00 00   ................
         2928  +|   4080: 00 00 00 00 00 00 00 00 00 00 05 04 09 0c 01 02   ................
         2929  +| page 5 offset 16384
         2930  +|      0: 0d 00 00 00 24 0c 0a 00 0f d8 0f af 0f 86 0f 74   ....$..........t
         2931  +|     16: 0f 61 0f 4e 0f 2f 0f 0f 0e ef 0e d7 0e be 0e a5   .a.N./..........
         2932  +|     32: 0e 8d 0e 74 0e 5b 0e 40 0e 24 0e 08 0d ef 0d d5   ...t.[.@.$......
         2933  +|     48: 0d bb 0d a0 0d 84 0d 68 0d 4f 0d 35 0d 1b 0c fb   .......h.O.5....
         2934  +|     64: 0c da 0c b9 0c 99 0c 78 0c 57 0c 3e 0c 24 0c 0a   .......x.W.>.$..
         2935  +|   3072: 00 00 00 00 00 00 00 00 00 00 18 24 05 00 25 0f   ...........$..%.
         2936  +|   3088: 19 54 48 52 45 41 44 53 41 46 45 3d 30 58 42 49   .THREADSAFE=0XBI
         2937  +|   3104: 4e 41 52 59 18 23 05 00 25 0f 19 54 48 52 45 41   NARY.#..%..THREA
         2938  +|   3120: 44 53 41 46 45 3d 30 58 4e 4f 43 41 53 45 17 22   DSAFE=0XNOCASE..
         2939  +|   3136: 05 00 25 0f 17 54 48 52 45 41 44 53 41 46 45 3d   ..%..THREADSAFE=
         2940  +|   3152: 30 58 52 54 52 49 4d 1f 21 05 00 33 0f 19 4f 4d   0XRTRIM.!..3..OM
         2941  +|   3168: 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 49 4f   IT LOAD EXTENSIO
         2942  +|   3184: 4e 58 42 49 4e 41 52 59 1f 20 05 00 33 0f 19 4f   NXBINARY. ..3..O
         2943  +|   3200: 4d 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 49   MIT LOAD EXTENSI
         2944  +|   3216: 4f 4e 58 4e 4f 43 41 53 45 1e 1f 05 00 33 0f 17   ONXNOCASE....3..
         2945  +|   3232: 4f 4d 49 54 20 4c 4f 41 44 20 45 5f e8 54 45 4e   OMIT LOAD E_.TEN
         2946  +|   3248: 53 49 4f 4e 58 52 54 52 49 4d 1f 1e 05 00 33 0f   SIONXRTRIM....3.
         2947  +|   3264: 19 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 31 81   .MAX MEMORY=501.
         2948  +|   3280: 40 50 02 50 f1 94 54 e4 14 24 c4 52 04 a5 35 f4   @P.P..T..$.R..5.
         2949  +|   3296: e3 15 84 e4 f4 34 15 34 51 71 30 50 02 50 f1 74   .....4.4Qq0P.P.t
         2950  +|   3312: 54 e4 14 24 c4 52 04 a5 34 f4 e3 15 85 25 45 24   T..$.R..4....%E$
         2951  +|   3328: 94 d1 a1 20 50 02 90 f1 94 54 e4 14 24 c4 52 04   ... P....T..$.R.
         2952  +|   3344: 74 54 f5 04 f4 c5 95 84 24 94 e4 15 25 91 a1 10   tT......$...%...
         2953  +|   3360: 50 02 90 f1 94 54 e4 14 24 c4 52 04 74 54 f5 04   P....T..$.R.tT..
         2954  +|   3376: f4 c5 95 84 e4 f4 34 15 34 51 91 00 50 02 90 f1   ......4.4Q..P...
         2955  +|   3392: 74 54 e4 14 24 c4 52 04 74 54 f5 04 f4 c5 95 85   tT..$.R.tT......
         2956  +|   3408: 25 45 24 94 d1 70 f0 50 02 30 f1 94 54 e4 14 24   %E$..p.P.0..T..$
         2957  +|   3424: c4 52 04 65 45 33 55 84 24 94 e4 15 25 91 70 e0   .R.eE3U.$...%.p.
         2958  +|   3440: 50 02 30 f1 94 54 e4 14 24 c4 52 04 65 45 33 55   P.0..T..$.R.eE3U
         2959  +|   3456: 84 e4 f4 34 15 34 51 60 d0 50 02 30 f1 74 54 e4   ...4.4Q`.P.0.tT.
         2960  +|   3472: 14 24 c4 52 04 65 45 33 55 85 25 45 24 94 d1 70   .$.R.eE3U.%E$..p
         2961  +|   3488: c0 50 02 30 f1 94 54 e4 14 24 c4 52 04 65 45 33   .P.0..T..$.R.eE3
         2962  +|   3504: 45 84 24 94 e4 15 25 91 70 b0 50 02 30 f1 94 54   E.$...%.p.P.0..T
         2963  +|   3520: e4 14 24 c4 52 04 65 45 33 45 84 e4 f4 34 15 34   ..$.R.eE3E...4.4
         2964  +|   3536: 51 60 a0 50 02 30 f1 74 54 e4 14 24 c4 52 04 65   Q`.P.0.tT..$.R.e
         2965  +|   3552: 45 33 45 85 25 45 24 94 d1 e0 90 50 03 10 f1 94   E3E.%E$....P....
         2966  +|   3568: 54 e4 42 4c 45 20 44 42 53 54 41 54 20 56 54 41   T.BLE DBSTAT VTA
         2967  +|   3584: 42 58 42 49 4e 41 52 59 1e 08 05 00 31 0f 19 45   BXBINARY....1..E
         2968  +|   3600: e4 14 24 c4 52 04 44 25 35 44 15 42 05 65 42 41   ..$.R.D%5D.B.eBA
         2969  +|   3616: 54 84 e4 f4 34 15 34 51 d0 70 50 03 10 f1 74 54   T...4.4Q.pP...tT
         2970  +|   3632: e4 14 24 c4 52 04 44 25 35 44 15 42 05 65 44 14   ..$.R.D%5D.B.eD.
         2971  +|   3648: 25 85 25 45 24 94 d1 10 60 50 01 70 f1 94 44 54   %.%E$...`P.p..DT
         2972  +|   3664: 25 54 75 84 24 94 e4 15 25 91 10 50 50 01 70 f1   %Tu.$...%..PP.p.
         2973  +|   3680: 94 44 54 25 54 75 84 e4 f4 34 15 34 51 00 40 50   .DT%Tu...4.4Q.@P
         2974  +|   3696: 01 70 f1 74 44 54 25 54 75 85 25 45 24 94 d2 70   .p.tDT%Tu.%E$..p
         2975  +|   3712: 30 50 04 30 f1 94 34 f4 d5 04 94 c4 55 23 d6 76   0P.0..4.....U#.v
         2976  +|   3728: 36 32 d3 52 e3 42 e3 02 03 23 03 13 63 03 63 03   62.R.B...#..c.c.
         2977  +|   3744: 95 84 24 94 e4 15 25 92 70 20 50 04 30 f1 94 34   ..$...%.p P.0..4
         2978  +|   3760: f4 d5 04 94 c4 53 30 01 00 00 10 10 04 02 02 00   .....S0.........
         2979  +|   3776: 00 00 00 00 00 00 00 80 00 00 00 20 00 00 00 10   ........... ....
         2980  +|   3792: 00 00 00 90 00 00 00 40 00 00 00 00 00 00 00 00   .......@........
         2981  +| page 6 offset 20480
         2982  +|   3808: 06 24 03 00 12 02 01 01 06 23 03 00 12 02 01 01   .$.......#......
         2983  +|   3824: 06 22 03 00 12 02 01 01 06 21 03 00 12 03 01 01   .........!......
         2984  +|   3840: 06 20 03 00 12 03 01 01 06 1f 03 00 12 03 01 01   . ..............
         2985  +|   3856: 06 1e 03 00 12 03 01 01 06 1d 03 00 12 03 01 01   ................
         2986  +|   3872: 06 1c 03 00 12 03 01 01 06 1b 03 00 12 02 01 01   ................
         2987  +|   3888: 06 1a 03 00 12 02 01 01 06 19 03 00 12 02 01 01   ................
         2988  +|   3904: 06 18 03 00 12 02 01 01 06 17 03 00 12 02 01 01   ................
         2989  +|   3920: 06 16 03 00 12 02 01 01 06 15 03 00 12 02 01 01   ................
         2990  +|   3936: 06 14 03 00 12 02 01 01 06 13 03 00 12 02 01 01   ................
         2991  +|   3952: 06 12 03 00 12 02 01 01 06 11 03 00 12 02 01 01   ................
         2992  +|   3968: 06 10 03 00 12 02 01 01 06 0f 03 00 12 02 01 01   ................
         2993  +|   3984: 06 0e 03 00 12 02 01 01 06 0d 03 00 12 02 01 01   ................
         2994  +|   4000: 06 0c 03 00 12 02 01 01 06 0b 03 00 12 02 01 01   ................
         2995  +|   4016: 06 0a 03 00 12 02 01 01 06 09 03 00 12 03 01 01   ................
         2996  +|   4032: 06 08 03 00 12 03 01 01 06 07 03 00 12 03 01 01   ................
         2997  +|   4048: 06 06 03 00 12 01 01 01 06 05 03 00 12 01 01 01   ................
         2998  +|   4064: 06 04 03 00 12 01 01 01 06 03 03 00 12 06 01 01   ................
         2999  +|   4080: 06 02 03 00 12 06 01 01 06 01 03 00 12 06 01 01   ................
         3000  +| page 7 offset 24576
         3001  +|      0: 0a 00 00 00 01 0f f4 00 0f f4 00 00 00 00 00 00   ................
         3002  +|   4080: 00 00 00 00 0b 03 1b 01 76 65 72 73 69 6f 6e 04   ........version.
         3003  +| page 8 offset 28672
         3004  +|      0: 0d 00 00 00 03 0f d6 00 0f f4 0f e9 0f d6 00 00   ................
         3005  +|   4048: 00 00 00 00 00 00 11 03 02 2b 69 6e 74 65 67 72   .........+integr
         3006  +|   4064: 69 74 79 2d 63 68 65 63 6b 09 02 02 1b 72 65 62   ity-check....reb
         3007  +|   4080: 75 69 6c 64 0a 01 02 1d 6f 70 74 69 6d 69 7a 65   uild....optimize
         3008  +| end timeout-2ca5b0658c98.db
         3009  +}]} {}
         3010  +
         3011  +do_catchsql_test 27.1 {
         3012  +  DELETE FROM t1 WHERE a MATCH 'fts*';
         3013  +} {1 {database disk image is malformed}}
  2819   3014   
  2820   3015   sqlite3_fts5_may_be_corrupt 0
  2821   3016   finish_test
  2822   3017