/ Check-in [6d132e7a]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Make sure the sqlite3_mutex.id field is initialized in the Win32 mutex implementation, even when SQLITE_DEBUG is turned off.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6d132e7a224ee68b5cefe9222944aac5760ffc20
User & Date: drh 2015-02-25 14:25:31
Context
2015-02-26
02:33
Simplifications to the description of the nByte parameter to sqlite3_prepare() and friends. check-in: 4bee8295 user: drh tags: trunk
2015-02-25
14:25
Make sure the sqlite3_mutex.id field is initialized in the Win32 mutex implementation, even when SQLITE_DEBUG is turned off. check-in: 6d132e7a user: drh tags: trunk
13:48
Add support for the linenoise command-line editing library in shell.c. check-in: 03bbb947 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/mutex_w32.c.

   190    190     sqlite3_mutex *p;
   191    191   
   192    192     switch( iType ){
   193    193       case SQLITE_MUTEX_FAST:
   194    194       case SQLITE_MUTEX_RECURSIVE: {
   195    195         p = sqlite3MallocZero( sizeof(*p) );
   196    196         if( p ){
   197         -#ifdef SQLITE_DEBUG
   198    197           p->id = iType;
          198  +#ifdef SQLITE_DEBUG
   199    199   #ifdef SQLITE_WIN32_MUTEX_TRACE_DYNAMIC
   200    200           p->trace = 1;
   201    201   #endif
   202    202   #endif
   203    203   #if SQLITE_OS_WINRT
   204    204           InitializeCriticalSectionEx(&p->mutex, 0, 0);
   205    205   #else
................................................................................
   212    212   #ifdef SQLITE_ENABLE_API_ARMOR
   213    213         if( iType-2<0 || iType-2>=ArraySize(winMutex_staticMutexes) ){
   214    214           (void)SQLITE_MISUSE_BKPT;
   215    215           return 0;
   216    216         }
   217    217   #endif
   218    218         p = &winMutex_staticMutexes[iType-2];
   219         -#ifdef SQLITE_DEBUG
   220    219         p->id = iType;
          220  +#ifdef SQLITE_DEBUG
   221    221   #ifdef SQLITE_WIN32_MUTEX_TRACE_STATIC
   222    222         p->trace = 1;
   223    223   #endif
   224    224   #endif
   225    225         break;
   226    226       }
   227    227     }