aboutsummaryrefslogtreecommitdiff
path: root/src/test_multiplex.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2015-03-09 13:07:45 +0000
committerdrh <drh@noemail.net>2015-03-09 13:07:45 +0000
commitc11a172d5fff6eff2bb54f391e36112ea32fb1c1 (patch)
treed00e4adfe5c3cd7b934498f620d40a4caf0b0218 /src/test_multiplex.c
parent2f82071478261a63280dec5c954f59c3dbdf90ca (diff)
parent80314629393b0bf728465d15ec1f2428c2e9d5c9 (diff)
downloadsqlite-c11a172d5fff6eff2bb54f391e36112ea32fb1c1.tar.gz
sqlite-c11a172d5fff6eff2bb54f391e36112ea32fb1c1.zip
Merge recent trunk enhancements into the sessions branch.
FossilOrigin-Name: 68c8937e83b770d5ec6b1855c1bde81057c11b5f
Diffstat (limited to 'src/test_multiplex.c')
-rw-r--r--src/test_multiplex.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test_multiplex.c b/src/test_multiplex.c
index 8f204c669..dbd395d62 100644
--- a/src/test_multiplex.c
+++ b/src/test_multiplex.c
@@ -1004,6 +1004,13 @@ static int multiplexFileControl(sqlite3_file *pConn, int op, void *pArg){
break;
case SQLITE_FCNTL_PRAGMA: {
char **aFcntl = (char**)pArg;
+ /*
+ ** EVIDENCE-OF: R-29875-31678 The argument to the SQLITE_FCNTL_PRAGMA
+ ** file control is an array of pointers to strings (char**) in which the
+ ** second element of the array is the name of the pragma and the third
+ ** element is the argument to the pragma or NULL if the pragma has no
+ ** argument.
+ */
if( aFcntl[1] && sqlite3_stricmp(aFcntl[1],"multiplex_truncate")==0 ){
if( aFcntl[2] && aFcntl[2][0] ){
if( sqlite3_stricmp(aFcntl[2], "on")==0
@@ -1015,6 +1022,12 @@ static int multiplexFileControl(sqlite3_file *pConn, int op, void *pArg){
pGroup->bTruncate = 0;
}
}
+ /* EVIDENCE-OF: R-27806-26076 The handler for an SQLITE_FCNTL_PRAGMA
+ ** file control can optionally make the first element of the char**
+ ** argument point to a string obtained from sqlite3_mprintf() or the
+ ** equivalent and that string will become the result of the pragma
+ ** or the error message if the pragma fails.
+ */
aFcntl[0] = sqlite3_mprintf(pGroup->bTruncate ? "on" : "off");
rc = SQLITE_OK;
break;