SQLite

Check-in [4f0bba42f9]
Login

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

Overview
Comment:Detect database corruption in the modifyPagePointer() routine and abort.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4f0bba42f904e505900be67b00179ebb1f24ed03
User & Date: drh 2015-05-24 10:18:12.213
Context
2015-05-24
21:09
Better detection of corruption in allocateSpace() in btree.c. (check-in: bf7bb53ee2 user: drh tags: trunk)
10:18
Detect database corruption in the modifyPagePointer() routine and abort. (check-in: 4f0bba42f9 user: drh tags: trunk)
2015-05-23
19:53
Instead of early detection of corruption in balance_nonroot, simply ignore the error, as it is harmless and exceedingly uncommon. (check-in: 7bbf9b3cd6 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/btree.c.
3080
3081
3082
3083
3084
3085
3086

3087
3088

3089
3090
3091
3092
3093
3094
3095
      return SQLITE_CORRUPT_BKPT;
    }
    put4byte(pPage->aData, iTo);
  }else{
    u8 isInitOrig = pPage->isInit;
    int i;
    int nCell;


    btreeInitPage(pPage);

    nCell = pPage->nCell;

    for(i=0; i<nCell; i++){
      u8 *pCell = findCell(pPage, i);
      if( eType==PTRMAP_OVERFLOW1 ){
        CellInfo info;
        btreeParseCellPtr(pPage, pCell, &info);







>

|
>







3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
      return SQLITE_CORRUPT_BKPT;
    }
    put4byte(pPage->aData, iTo);
  }else{
    u8 isInitOrig = pPage->isInit;
    int i;
    int nCell;
    int rc;

    rc = btreeInitPage(pPage);
    if( rc ) return rc;
    nCell = pPage->nCell;

    for(i=0; i<nCell; i++){
      u8 *pCell = findCell(pPage, i);
      if( eType==PTRMAP_OVERFLOW1 ){
        CellInfo info;
        btreeParseCellPtr(pPage, pCell, &info);