summaryrefslogtreecommitdiffstats
path: root/lib/libsqlite3/src/test_multiplex.c
diff options
context:
space:
mode:
authorjturner <jturner@openbsd.org>2015-03-16 00:06:33 +0000
committerjturner <jturner@openbsd.org>2015-03-16 00:06:33 +0000
commit476ed7b902c71c189883939f8fb66a03e3eb82d9 (patch)
treeac10f46a6d4287dd3790a3815808837f9318d24b /lib/libsqlite3/src/test_multiplex.c
parentfrom zhuk: two grammar fixes; (diff)
downloadwireguard-openbsd-476ed7b902c71c189883939f8fb66a03e3eb82d9.tar.xz
wireguard-openbsd-476ed7b902c71c189883939f8fb66a03e3eb82d9.zip
Update sqlite3 to 3.8.7.4. Changes available here: http://sqlite.org/changes.html#version_3_8_7_4
ok landry@
Diffstat (limited to 'lib/libsqlite3/src/test_multiplex.c')
-rw-r--r--lib/libsqlite3/src/test_multiplex.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/libsqlite3/src/test_multiplex.c b/lib/libsqlite3/src/test_multiplex.c
index 427cc65ad7e..99819371ce5 100644
--- a/lib/libsqlite3/src/test_multiplex.c
+++ b/lib/libsqlite3/src/test_multiplex.c
@@ -1002,6 +1002,26 @@ static int multiplexFileControl(sqlite3_file *pConn, int op, void *pArg){
/* no-op these */
rc = SQLITE_OK;
break;
+ case SQLITE_FCNTL_PRAGMA: {
+ char **aFcntl = (char**)pArg;
+ if( aFcntl[1] && sqlite3_stricmp(aFcntl[1],"multiplex_truncate")==0 ){
+ if( aFcntl[2] && aFcntl[2][0] ){
+ if( sqlite3_stricmp(aFcntl[2], "on")==0
+ || sqlite3_stricmp(aFcntl[2], "1")==0 ){
+ pGroup->bTruncate = 1;
+ }else
+ if( sqlite3_stricmp(aFcntl[2], "off")==0
+ || sqlite3_stricmp(aFcntl[2], "0")==0 ){
+ pGroup->bTruncate = 0;
+ }
+ }
+ aFcntl[0] = sqlite3_mprintf(pGroup->bTruncate ? "on" : "off");
+ rc = SQLITE_OK;
+ break;
+ }
+ /* If the multiplexor does not handle the pragma, pass it through
+ ** into the default case. */
+ }
default:
pSubOpen = multiplexSubOpen(pGroup, 0, &rc, NULL, 0);
if( pSubOpen ){