SQLite

Check-in [d5e68802]
Login

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

Overview
Comment:Remove code that was incorrectly changing SQLITE_MISUSE errors into SQLITE_OK in sqlite3_finalize().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d5e6880279210ca63e2d5e7f6d009f30566f1242
User & Date: drh 2012-06-21 17:21:52
Context
2012-06-27
16:12
Update the shell so that it works with SQLITE_OMIT_FLOATING_POINT and SQLITE_OMIT_AUTOINIT. (check-in: 95c0c995 user: drh tags: trunk)
2012-06-21
17:21
Remove code that was incorrectly changing SQLITE_MISUSE errors into SQLITE_OK in sqlite3_finalize(). (check-in: d5e68802 user: drh tags: trunk)
15:51
Add the sqlite3_close_v2() interface (from the deferred-close branch) that allows close operations to happen out-of-order in bindings to garbage-collected langauges. (check-in: fb8893ab user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbeapi.c.

70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
    rc = SQLITE_OK;
  }else{
    Vdbe *v = (Vdbe*)pStmt;
    sqlite3 *db = v->db;
    if( vdbeSafety(v) ) return SQLITE_MISUSE_BKPT;
    sqlite3_mutex_enter(db->mutex);
    rc = sqlite3VdbeFinalize(v);
    if( (rc&0xff)==SQLITE_MISUSE ) rc = SQLITE_OK;
    rc = sqlite3ApiExit(db, rc);
    sqlite3LeaveMutexAndCloseZombie(db);
  }
  return rc;
}

/*







<







70
71
72
73
74
75
76

77
78
79
80
81
82
83
    rc = SQLITE_OK;
  }else{
    Vdbe *v = (Vdbe*)pStmt;
    sqlite3 *db = v->db;
    if( vdbeSafety(v) ) return SQLITE_MISUSE_BKPT;
    sqlite3_mutex_enter(db->mutex);
    rc = sqlite3VdbeFinalize(v);

    rc = sqlite3ApiExit(db, rc);
    sqlite3LeaveMutexAndCloseZombie(db);
  }
  return rc;
}

/*