/ Check-in [0bb1cfc6]
Login

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

Overview
Comment:Add an assert() that verifies that the statement pointer from the sqlite3_prepare() family of functions is always NULL if the routines return other than SQLITE_OK.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:0bb1cfc63f982db7b29c8e6be6698a6dad100f70
User & Date: drh 2012-05-14 12:20:54
Context
2012-05-15
12:49
Add assert()s to verify that Table objects in the schema never use lookaside memory. check-in: 736d6ea6 user: drh tags: trunk
2012-05-14
12:20
Add an assert() that verifies that the statement pointer from the sqlite3_prepare() family of functions is always NULL if the routines return other than SQLITE_OK. check-in: 0bb1cfc6 user: drh tags: trunk
01:41
Version 3.7.12 check-in: 8654aa95 user: drh tags: trunk, release, version-3.7.12
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/prepare.c.

702
703
704
705
706
707
708

709
710
711
712
713
714
715
  rc = sqlite3Prepare(db, zSql, nBytes, saveSqlFlag, pOld, ppStmt, pzTail);
  if( rc==SQLITE_SCHEMA ){
    sqlite3_finalize(*ppStmt);
    rc = sqlite3Prepare(db, zSql, nBytes, saveSqlFlag, pOld, ppStmt, pzTail);
  }
  sqlite3BtreeLeaveAll(db);
  sqlite3_mutex_leave(db->mutex);

  return rc;
}

/*
** Rerun the compilation of a statement after a schema change.
**
** If the statement is successfully recompiled, return SQLITE_OK. Otherwise,







>







702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
  rc = sqlite3Prepare(db, zSql, nBytes, saveSqlFlag, pOld, ppStmt, pzTail);
  if( rc==SQLITE_SCHEMA ){
    sqlite3_finalize(*ppStmt);
    rc = sqlite3Prepare(db, zSql, nBytes, saveSqlFlag, pOld, ppStmt, pzTail);
  }
  sqlite3BtreeLeaveAll(db);
  sqlite3_mutex_leave(db->mutex);
  assert( rc==SQLITE_OK || *ppStmt==0 );
  return rc;
}

/*
** Rerun the compilation of a statement after a schema change.
**
** If the statement is successfully recompiled, return SQLITE_OK. Otherwise,