/ Check-in [71691c4b]
Login

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

Overview
Comment:Fix a missing mutex in SQLITE_TESTCTRL_IMPOSTER.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 71691c4be54b9ac6a35e35013f939b7d6fd4e6b8
User & Date: drh 2015-02-04 20:56:49
Context
2015-02-06
01:07
Add the index_xinfo pragma which gives information about the fields that reference the table PRIMARY KEY in addition to the index key fields. Add extra columns "desc", "coll", and "key" to the index_info and index_xinfo pragmas. Add the "origin" and "partial" columns to the index_list pragma. check-in: 2743846c user: drh tags: trunk
2015-02-04
23:13
Merge all recent trunk changes, including the movement of the pragma table into the separate pragma.h header file. Closed-Leaf check-in: 3af19f84 user: drh tags: index_xinfo
20:56
Fix a missing mutex in SQLITE_TESTCTRL_IMPOSTER. check-in: 71691c4b user: drh tags: trunk
2015-02-03
19:20
Fix a typo in the --help output for speedtest1. Fix a dependency error in the Makefile.in for speedtest1. check-in: f30a057a user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/main.c.

  3613   3613       **
  3614   3614       ** If onOff==0 and tnum>0 then reset the schema for all databases, causing
  3615   3615       ** the schema to be reparsed the next time it is needed.  This has the
  3616   3616       ** effect of erasing all imposter tables.
  3617   3617       */
  3618   3618       case SQLITE_TESTCTRL_IMPOSTER: {
  3619   3619         sqlite3 *db = va_arg(ap, sqlite3*);
         3620  +      sqlite3_mutex_enter(db->mutex);
  3620   3621         db->init.iDb = sqlite3FindDbName(db, va_arg(ap,const char*));
  3621   3622         db->init.busy = db->init.imposterTable = va_arg(ap,int);
  3622   3623         db->init.newTnum = va_arg(ap,int);
  3623   3624         if( db->init.busy==0 && db->init.newTnum>0 ){
  3624   3625           sqlite3ResetAllSchemasOfConnection(db);
  3625   3626         }
         3627  +      sqlite3_mutex_leave(db->mutex);
  3626   3628         break;
  3627   3629       }
  3628   3630     }
  3629   3631     va_end(ap);
  3630   3632   #endif /* SQLITE_OMIT_BUILTIN_TEST */
  3631   3633     return rc;
  3632   3634   }