/ Check-in [9f093706]
Login

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

Overview
Comment:Remove a mutex reference leak from sqlite3_reoptimize().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | experimental
Files: files | file ages | folders
SHA1: 9f0937066184421f23453ceb451fd726c75cb593
User & Date: dan 2009-10-16 15:19:08
Context
2009-10-16
16:21
Merge the sqlite3_reoptimize() changes into the trunk. check-in: 50136840 user: drh tags: trunk
15:59
Fix a problem in the analyze3.test script. Closed-Leaf check-in: 61174aea user: dan tags: experimental
15:19
Remove a mutex reference leak from sqlite3_reoptimize(). check-in: 9f093706 user: dan tags: experimental
2009-10-15
18:35
Add the experimental sqlite3_reoptimize() API. check-in: 9bd6f3d8 user: dan tags: experimental
Changes
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to src/vdbeapi.c.

  1229   1229     Vdbe *v = (Vdbe *)pStmt;
  1230   1230     sqlite3 *db = v->db;
  1231   1231   
  1232   1232     sqlite3_mutex_enter(db->mutex);
  1233   1233     if( v->isPrepareV2==0 || v->pc>0 ){
  1234   1234       rc = SQLITE_MISUSE;
  1235   1235     }else if( v->optimizable ){
  1236         -    sqlite3 *db = v->db;
  1237         -    sqlite3_mutex_enter(db->mutex);
  1238   1236       rc = sqlite3Reprepare(v);
  1239   1237       rc = sqlite3ApiExit(db, rc);
  1240   1238     }
  1241   1239     assert( rc!=SQLITE_OK || v->optimizable==0 );
  1242   1240     sqlite3_mutex_leave(db->mutex);
  1243   1241   
  1244   1242     return rc;
  1245   1243   }
  1246   1244