/ Check-in [e8d591e8]
Login

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

Overview
Comment:Reorder some tests at the beginning of sqlite3_step() to work around misuse by python. Ticket #2732. (CVS 4492)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e8d591e8c369794921a4acbba5b17fddca730ee7
User & Date: drh 2007-10-17 01:44:21
Context
2007-10-19
17:47
Added an experimental malloc-free memory allocation subsystem, intended for use on embedded systems. Runs 7% faster than when using system malloc() on Linux. (CVS 4493) check-in: 8487ca82 user: drh tags: trunk
2007-10-17
01:44
Reorder some tests at the beginning of sqlite3_step() to work around misuse by python. Ticket #2732. (CVS 4492) check-in: e8d591e8 user: drh tags: trunk
2007-10-16
19:45
A cosmetic changes to btree.c which (we are told) works around a bug in MSVC++. (CVS 4491) check-in: 329dd014 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbeapi.c.

   250    250   ** API.  The only thing omitted is the automatic recompile if a 
   251    251   ** schema change has occurred.  That detail is handled by the
   252    252   ** outer sqlite3_step() wrapper procedure.
   253    253   */
   254    254   static int sqlite3Step(Vdbe *p){
   255    255     sqlite3 *db;
   256    256     int rc;
          257  +
          258  +  if( p==0 || p->magic!=VDBE_MAGIC_RUN ){
          259  +    return SQLITE_MISUSE;
          260  +  }
   257    261   
   258    262     /* Assert that malloc() has not failed */
   259    263     db = p->db;
   260    264     assert( !db->mallocFailed );
   261    265   
   262         -  if( p==0 || p->magic!=VDBE_MAGIC_RUN ){
   263         -    return SQLITE_MISUSE;
   264         -  }
   265    266     if( p->aborted ){
   266    267       return SQLITE_ABORT;
   267    268     }
   268    269     if( p->pc<=0 && p->expired ){
   269    270       if( p->rc==SQLITE_OK ){
   270    271         p->rc = SQLITE_SCHEMA;
   271    272       }