SQLite
Check-in [e35eb8776e]
Not logged in
Overview
Comment:Fix an off-by-one error on a Goto in the code generator, that only causes problems for a REPLACE on an INTEGER PRIMARY KEY in non-debug builds. Test case in TH3.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:e35eb8776ed539afe1d5db099470ab1124d8dd2db73ee5db7c811f8df9a9576e
User & Date: drh 2019-01-12 16:19:23
Context
2019-01-12
20:55
Fix another problem with handling corrupt records in fts5_decode(). check-in: 726e398b9d user: dan tags: trunk
16:19
Fix an off-by-one error on a Goto in the code generator, that only causes problems for a REPLACE on an INTEGER PRIMARY KEY in non-debug builds. Test case in TH3. check-in: e35eb8776e user: drh tags: trunk
14:58
Fix a problem with corrupt database handling in the fts3 matchinfo() function. check-in: 703646b1b5 user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/insert.c.

1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
      sqlite3VdbeResolveLabel(v, addrUniqueOk);
    }
    if( regR!=regIdx ) sqlite3ReleaseTempRange(pParse, regR, nPkField);
  }

  /* If the IPK constraint is a REPLACE, run it last */
  if( ipkTop ){
    sqlite3VdbeGoto(v, ipkTop+1);
    VdbeComment((v, "Do IPK REPLACE"));
    sqlite3VdbeJumpHere(v, ipkBottom);
  }

  *pbMayReplace = seenReplace;
  VdbeModuleComment((v, "END: GenCnstCks(%d)", seenReplace));
}







|







1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
      sqlite3VdbeResolveLabel(v, addrUniqueOk);
    }
    if( regR!=regIdx ) sqlite3ReleaseTempRange(pParse, regR, nPkField);
  }

  /* If the IPK constraint is a REPLACE, run it last */
  if( ipkTop ){
    sqlite3VdbeGoto(v, ipkTop);
    VdbeComment((v, "Do IPK REPLACE"));
    sqlite3VdbeJumpHere(v, ipkBottom);
  }

  *pbMayReplace = seenReplace;
  VdbeModuleComment((v, "END: GenCnstCks(%d)", seenReplace));
}