/ Check-in [8b651d4d]
Login

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

Overview
Comment:Add the SQLITE_TESTCTRL_ISINIT file control.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8b651d4d6cde7efbc0cc7155948f477477be100e
User & Date: drh 2014-07-29 14:09:21
Context
2014-07-29
19:54
Enhancements and updates to the Win32 mutex subsystem. check-in: ca9868cd user: mistachkin tags: trunk
18:03
Merge updates from trunk. Closed-Leaf check-in: 08c9a4ea user: mistachkin tags: winMutex
14:16
Merge the R-Tree fix and the new SQLITE_TESTCTRL_ISINIT test control from trunk. check-in: b2f7eb3c user: drh tags: threads
14:09
Add the SQLITE_TESTCTRL_ISINIT file control. check-in: 8b651d4d user: drh tags: trunk
11:54
Have calls to the xFilter() method of rtree virtual tables ensure that cursor is initialized before proceeding. Fix for [d2889096e7bdeac]. check-in: 8cc41b0b user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/main.c.

  3356   3356   #ifdef SQLITE_VDBE_COVERAGE
  3357   3357         typedef void (*branch_callback)(void*,int,u8,u8);
  3358   3358         sqlite3GlobalConfig.xVdbeBranch = va_arg(ap,branch_callback);
  3359   3359         sqlite3GlobalConfig.pVdbeBranchArg = va_arg(ap,void*);
  3360   3360   #endif
  3361   3361         break;
  3362   3362       }
         3363  +
         3364  +    /*   sqlite3_test_control(SQLITE_TESTCTRL_ISINIT);
         3365  +    **
         3366  +    ** Return SQLITE_OK if SQLite has been initialized and SQLITE_ERROR if
         3367  +    ** not.
         3368  +    */
         3369  +    case SQLITE_TESTCTRL_ISINIT: {
         3370  +      if( sqlite3GlobalConfig.isInit==0 ) rc = SQLITE_ERROR;
         3371  +      break;
         3372  +    }
  3363   3373   
  3364   3374     }
  3365   3375     va_end(ap);
  3366   3376   #endif /* SQLITE_OMIT_BUILTIN_TEST */
  3367   3377     return rc;
  3368   3378   }
  3369   3379   

Changes to src/sqlite.h.in.

  6173   6173   #define SQLITE_TESTCTRL_ISKEYWORD               16
  6174   6174   #define SQLITE_TESTCTRL_SCRATCHMALLOC           17
  6175   6175   #define SQLITE_TESTCTRL_LOCALTIME_FAULT         18
  6176   6176   #define SQLITE_TESTCTRL_EXPLAIN_STMT            19
  6177   6177   #define SQLITE_TESTCTRL_NEVER_CORRUPT           20
  6178   6178   #define SQLITE_TESTCTRL_VDBE_COVERAGE           21
  6179   6179   #define SQLITE_TESTCTRL_BYTEORDER               22
  6180         -#define SQLITE_TESTCTRL_LAST                    22
         6180  +#define SQLITE_TESTCTRL_ISINIT                  23
         6181  +#define SQLITE_TESTCTRL_LAST                    23
  6181   6182   
  6182   6183   /*
  6183   6184   ** CAPI3REF: SQLite Runtime Status
  6184   6185   **
  6185   6186   ** ^This interface is used to retrieve runtime status information
  6186   6187   ** about the performance of SQLite, and optionally to reset various
  6187   6188   ** highwater marks.  ^The first argument is an integer code for