/ Check-in [f0617d61]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Fix sqlite3_vtab_on_conflict() to return the correct values for ABORT, FAIL, and IGNORE.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f0617d619dc6654f6d27543999c0aad724a0d967
User & Date: drh 2011-05-05 17:41:58
Context
2011-05-05
23:07
Fix an incorrect assert() in sqlite3_value_config(). Updates to the sqlite3_value_config() documentation. check-in: 22cbc01a user: drh tags: trunk
19:44
Changes to various test scripts so that they pass on windows. Closed-Leaf check-in: 1586244b user: dan tags: win32-test-fixes
17:41
Fix sqlite3_vtab_on_conflict() to return the correct values for ABORT, FAIL, and IGNORE. check-in: f0617d61 user: drh tags: trunk
17:00
Fix a bug in memory usage tracking that was introduced by check-in [4e33a0eaf83922]. check-in: 8ba456ae user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vtab.c.

997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
** table update operation currently in progress.
**
** The results of this routine are undefined unless it is called from
** within an xUpdate method.
*/
int sqlite3_vtab_on_conflict(sqlite3 *db){
  static const unsigned char aMap[] = { 
    SQLITE_ROLLBACK, SQLITE_IGNORE, SQLITE_ABORT, SQLITE_FAIL, SQLITE_REPLACE 
  };
  assert( OE_Rollback==1 && OE_Abort==2 && OE_Fail==3 );
  assert( OE_Ignore==4 && OE_Replace==5 );
  assert( db->vtabOnConflict>=1 && db->vtabOnConflict<=5 );
  return (int)aMap[db->vtabOnConflict-1];
}








|







997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
** table update operation currently in progress.
**
** The results of this routine are undefined unless it is called from
** within an xUpdate method.
*/
int sqlite3_vtab_on_conflict(sqlite3 *db){
  static const unsigned char aMap[] = { 
    SQLITE_ROLLBACK, SQLITE_ABORT, SQLITE_FAIL, SQLITE_IGNORE, SQLITE_REPLACE 
  };
  assert( OE_Rollback==1 && OE_Abort==2 && OE_Fail==3 );
  assert( OE_Ignore==4 && OE_Replace==5 );
  assert( db->vtabOnConflict>=1 && db->vtabOnConflict<=5 );
  return (int)aMap[db->vtabOnConflict-1];
}