aboutsummaryrefslogtreecommitdiff
path: root/src/shell.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2014-04-03 16:35:33 +0000
committerdrh <drh@noemail.net>2014-04-03 16:35:33 +0000
commit652cc4b6dca02426e8d375a962bf8417850d9f7a (patch)
treeadf8a096e1a149ccc67872577712eb3837dbdd39 /src/shell.c
parent24ed9d04452fa500ed8d0be277bfffe156d75696 (diff)
parentc438df1be06f636ef68265f083aff4af95d326e6 (diff)
downloadsqlite-652cc4b6dca02426e8d375a962bf8417850d9f7a.tar.gz
sqlite-652cc4b6dca02426e8d375a962bf8417850d9f7a.zip
Merge all recent changes from trunk,
including the fix for the OP_SCopy-vs-OP_Copy problem. FossilOrigin-Name: 9515c8344a6743bbb0c6a6e49fb79fb3139090df
Diffstat (limited to 'src/shell.c')
-rw-r--r--src/shell.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/shell.c b/src/shell.c
index 131311270..f380962a8 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -2130,10 +2130,12 @@ static void tryToClone(struct callback_data *p, const char *zNewDb){
fprintf(stderr, "Cannot create output database: %s\n",
sqlite3_errmsg(newDb));
}else{
+ sqlite3_exec(p->db, "PRAGMA writable_schema=ON;", 0, 0, 0);
sqlite3_exec(newDb, "BEGIN EXCLUSIVE;", 0, 0, 0);
tryToCloneSchema(p, newDb, "type='table'", tryToCloneData);
tryToCloneSchema(p, newDb, "type!='table'", 0);
sqlite3_exec(newDb, "COMMIT;", 0, 0, 0);
+ sqlite3_exec(p->db, "PRAGMA writable_schema=OFF;", 0, 0, 0);
}
sqlite3_close(newDb);
}