/ Check-in [0d7a5389]
Login

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

Overview
Comment:Improved documentation of SQLITE_THREADSAFE and sqlite3_column_text() and evidence marks for each.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0d7a53894866e536616e78473d253a9e9c29b1bc
User & Date: drh 2010-09-08 02:30:28
Context
2010-09-08
16:30
Updates to the documentation of the sqlite3_column_xxxx() family of interfaces. Enhance sqlite3_column_blob() so that it always returns a NULL pointer for a zero-length blob. check-in: a932fab2 user: drh tags: trunk
02:30
Improved documentation of SQLITE_THREADSAFE and sqlite3_column_text() and evidence marks for each. check-in: 0d7a5389 user: drh tags: trunk
2010-09-07
23:28
Updates to the documentation on the VFS xOpen method. check-in: 1719cb8f user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/sqliteInt.h.

   110    110   # define SQLITE_PTR_TO_INT(X)  ((int)(intptr_t)(X))
   111    111   #else                          /* Generates a warning - but it always works */
   112    112   # define SQLITE_INT_TO_PTR(X)  ((void*)(X))
   113    113   # define SQLITE_PTR_TO_INT(X)  ((int)(X))
   114    114   #endif
   115    115   
   116    116   /*
   117         -** The SQLITE_THREADSAFE macro must be defined as either 0 or 1.
          117  +** The SQLITE_THREADSAFE macro must be defined as 0, 1, or 2.
          118  +** 0 means mutexes are permanently disable and the library is never
          119  +** threadsafe.  1 means the library is serialized which is the highest
          120  +** level of threadsafety.  2 means the libary is multithreaded - multiple
          121  +** threads can use SQLite as long as no two threads try to use the same
          122  +** database connection at the same time.
          123  +**
   118    124   ** Older versions of SQLite used an optional THREADSAFE macro.
   119         -** We support that for legacy
          125  +** We support that for legacy.
   120    126   */
   121    127   #if !defined(SQLITE_THREADSAFE)
   122    128   #if defined(THREADSAFE)
   123    129   # define SQLITE_THREADSAFE THREADSAFE
   124    130   #else
   125         -# define SQLITE_THREADSAFE 1
          131  +# define SQLITE_THREADSAFE 1 /* IMP: R-07272-22309 */
   126    132   #endif
   127    133   #endif
   128    134   
   129    135   /*
   130    136   ** The SQLITE_DEFAULT_MEMSTATUS macro must be defined as either 0 or 1.
   131    137   ** It determines whether or not the features related to 
   132    138   ** SQLITE_CONFIG_MEMSTATUS are available by default or not. This value can

Changes to src/vdbemem.c.

   957    957       sqlite3VdbeChangeEncoding(pVal, enc & ~SQLITE_UTF16_ALIGNED);
   958    958       if( (enc & SQLITE_UTF16_ALIGNED)!=0 && 1==(1&SQLITE_PTR_TO_INT(pVal->z)) ){
   959    959         assert( (pVal->flags & (MEM_Ephem|MEM_Static))!=0 );
   960    960         if( sqlite3VdbeMemMakeWriteable(pVal)!=SQLITE_OK ){
   961    961           return 0;
   962    962         }
   963    963       }
   964         -    sqlite3VdbeMemNulTerminate(pVal);
          964  +    sqlite3VdbeMemNulTerminate(pVal); /* IMP: R-59893-45467 */
   965    965     }else{
   966    966       assert( (pVal->flags&MEM_Blob)==0 );
   967    967       sqlite3VdbeMemStringify(pVal, enc);
   968    968       assert( 0==(1&SQLITE_PTR_TO_INT(pVal->z)) );
   969    969     }
   970    970     assert(pVal->enc==(enc & ~SQLITE_UTF16_ALIGNED) || pVal->db==0
   971    971                 || pVal->db->mallocFailed );