/ Check-in [856400dc]
Login

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

Overview
Comment:Fix an incorrect check for API misuse.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | apple-osx
Files: files | file ages | folders
SHA1:856400dc20752e5630aaea8d17a707c502a1245b
User & Date: drh 2014-05-09 12:18:06
Context
2014-05-09
13:27
Fix compiler warnings. When forcing the delete of a WAL file, do not fail if the WAL files does not exist. All "veryquick.tcl" tests are now passing on Linux under the standard compile-time options. check-in: eafd8aa1 user: drh tags: apple-osx
12:18
Fix an incorrect check for API misuse. check-in: 856400dc user: drh tags: apple-osx
11:45
Bring the PRAGMA logic into closer alignment with trunk, and in the process fix a couple of crashes. check-in: d66fe706 user: drh tags: apple-osx
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbeapi.c.

36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

/*
** Check on a Vdbe to make sure it has not been finalized.  Log
** an error and return true if it has been finalized (or is otherwise
** invalid).  Return false if it is ok.
*/
static int vdbeSafety(Vdbe *p){
  sqlite3* db = p->db;
  if((db==0) || (db->magic != SQLITE_MAGIC_OPEN) || ((p->magic != VDBE_MAGIC_RUN) && (p->magic != VDBE_MAGIC_HALT))){
    sqlite3_log(SQLITE_MISUSE, "API called with finalized prepared statement");
    return 1;
  }else{
    return 0;
  }
}
static int vdbeSafetyNotNull(Vdbe *p){







|
<







36
37
38
39
40
41
42
43

44
45
46
47
48
49
50

/*
** Check on a Vdbe to make sure it has not been finalized.  Log
** an error and return true if it has been finalized (or is otherwise
** invalid).  Return false if it is ok.
*/
static int vdbeSafety(Vdbe *p){
  if( p->db==0 ){

    sqlite3_log(SQLITE_MISUSE, "API called with finalized prepared statement");
    return 1;
  }else{
    return 0;
  }
}
static int vdbeSafetyNotNull(Vdbe *p){