]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add the experimental and scary pragma "writable_schema". (CVS 2027)
authordrh <drh@noemail.net>
Fri, 22 Oct 2004 20:29:21 +0000 (20:29 +0000)
committerdrh <drh@noemail.net>
Fri, 22 Oct 2004 20:29:21 +0000 (20:29 +0000)
FossilOrigin-Name: 39f7870a54d90d5163fcad3f08cd63699c4bb567

manifest
manifest.uuid
src/delete.c
src/pragma.c
src/sqliteInt.h

index 18db763866c718cabc868a0b21ad220efaa871d5..18afda4da77489377e60dd96986011dec54c756f 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\salignment\sproblems\sin\sbtree\sand\spager\sand\sallow\spage\ssizes\sthat\sare\nnot\sa\smultiple\sof\s8.\s(CVS\s2026)
-D 2004-10-22T16:22:58
+C Add\sthe\sexperimental\sand\sscary\spragma\s"writable_schema".\s(CVS\s2027)
+D 2004-10-22T20:29:22
 F Makefile.in 52c1cc106cad9148d4b7cb387b458e82dc86b339
 F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
 F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1
@@ -34,7 +34,7 @@ F src/btree.c d8426846c0db61c97a0e3e11531781be7a96f1bc
 F src/btree.h 94dfec0a1722d33359b23e7e310f2b64ffedf029
 F src/build.c cb0232e0f239d7cea8598d982039b99259074f64
 F src/date.c 34bdb0082db7ec2a83ef00063f7b44e61ee19dad
-F src/delete.c 7a9543ed784bd51ded17c805ff6a4fe864c1676c
+F src/delete.c 531525eca2885afc1d9c63e110bc7aa568e170c3
 F src/expr.c 2f492bf532d700bd2c38e16caa49048535e8ed27
 F src/func.c 600e506bccf7648df8ad03efb417560d0f7ad4c1
 F src/hash.c a97721a55440b7bea31ffe471bb2f6b4123cddd5
@@ -56,13 +56,13 @@ F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
 F src/pager.c cc2e7fb3d7913862d7b1170f923d2dcfdbac3bed
 F src/pager.h 774d1973acbda341827d21b0da0150575d69f7d9
 F src/parse.y 8d97a91cba7e35b5eaac064c9f6e597dc6442b29
-F src/pragma.c 3134201e4d47be04b9fcd437e01eab682ad3a096
+F src/pragma.c 2b65e0150ca1af8041c3db95e7b1c41dc51a3e95
 F src/printf.c 7a92adc00b758cd5ce087dae80181a8bbdb70ed2
 F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3
 F src/select.c de51ec24aef0d5370819dac6c2613460effac42c
 F src/shell.c 2012beeea6b334c8e570e40107928036ce5bf895
 F src/sqlite.h.in 4f97b5907acfd2a5068cb0cec9d5178816734db7
-F src/sqliteInt.h 610f25a92c0ce5edf40d12087c643c310e1d7d05
+F src/sqliteInt.h 008c205896a1c531ec6249de20ecfe23c89ae243
 F src/table.c 25b3ff2b39b7d87e8d4a5da0713d68dfc06cbee9
 F src/tclsqlite.c 0302e3f42f015d132d1291f3388c06e86c24a008
 F src/test1.c 3d78e5d827bf5d037f697c233c5934d45af46cb5
@@ -252,7 +252,7 @@ F www/tclsqlite.tcl 560ecd6a916b320e59f2917317398f3d59b7cc25
 F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9
 F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
 F www/whentouse.tcl fdacb0ba2d39831e8a6240d05a490026ad4c4e4c
-P 370ca539506a431dbe77dcb644215886760f34e9
-R 3144c4632ba02236b46866a5c5939839
+P 0539c2d2b8e16efcbe4db3afeae9c7b426e11b05
+R 3f1f2941d330b2b80181d225c2988800
 U drh
-Z fbdbb4c36ca4011ce6bdf20082c190a3
+Z 3239e241a62fc5e2facb9ebbd32227e4
index c4c24c6d996643b6b48137603d4fee7129f222ac..fcc52e580bc635986e3a71433f8f6cde8597ec68 100644 (file)
@@ -1 +1 @@
-0539c2d2b8e16efcbe4db3afeae9c7b426e11b05
\ No newline at end of file
+39f7870a54d90d5163fcad3f08cd63699c4bb567
\ No newline at end of file
index 2b0457f0bc86a883421623372cf0264e6604940d..d6d4cd7334646b7102d8f94f1c1600bf4ad6811b 100644 (file)
@@ -12,7 +12,7 @@
 ** This file contains C code routines that are called by the parser
 ** to handle DELETE FROM statements.
 **
-** $Id: delete.c,v 1.82 2004/10/05 02:41:42 drh Exp $
+** $Id: delete.c,v 1.83 2004/10/22 20:29:22 drh Exp $
 */
 #include "sqliteInt.h"
 
@@ -38,7 +38,7 @@ Table *sqlite3SrcListLookup(Parse *pParse, SrcList *pSrc){
 ** writable return 0;
 */
 int sqlite3IsReadOnly(Parse *pParse, Table *pTab, int viewOk){
-  if( pTab->readOnly ){
+  if( pTab->readOnly && (pParse->db->flags & SQLITE_WriteSchema)==0 ){
     sqlite3ErrorMsg(pParse, "table %s may not be modified", pTab->zName);
     return 1;
   }
index 08d49272efc00d38097ce56a2e33ecb7ac833fed..dbe00f70cd07cdde27e01980981c707f9036e02d 100644 (file)
@@ -11,7 +11,7 @@
 *************************************************************************
 ** This file contains code used to implement the PRAGMA command.
 **
-** $Id: pragma.c,v 1.70 2004/10/06 15:41:17 drh Exp $
+** $Id: pragma.c,v 1.71 2004/10/22 20:29:22 drh Exp $
 */
 #include "sqliteInt.h"
 #include <ctype.h>
@@ -137,12 +137,12 @@ static int flagPragma(Parse *pParse, const char *zLeft, const char *zRight){
     { "vdbe_trace",               SQLITE_VdbeTrace     },
     { "sql_trace",                SQLITE_SqlTrace      },
     { "vdbe_listing",             SQLITE_VdbeListing   },
-#if 1  /* FIX ME:  Remove the following pragmas */
     { "full_column_names",        SQLITE_FullColNames  },
     { "short_column_names",       SQLITE_ShortColNames },
     { "count_changes",            SQLITE_CountRows     },
     { "empty_result_callbacks",   SQLITE_NullCallback  },
-#endif
+/* The following is VERY experimental */
+    { "writable_schema",          SQLITE_WriteSchema   },
   };
   int i;
   for(i=0; i<sizeof(aPragma)/sizeof(aPragma[0]); i++){
index 9b712ba4446e43976433d27fb227f3914b20cacc..2380dc7381167ea2c6282dd27f3da79e49d97424 100644 (file)
@@ -11,7 +11,7 @@
 *************************************************************************
 ** Internal interface definitions for SQLite.
 **
-** @(#) $Id: sqliteInt.h,v 1.327 2004/10/05 02:41:43 drh Exp $
+** @(#) $Id: sqliteInt.h,v 1.328 2004/10/22 20:29:22 drh Exp $
 */
 #ifndef _SQLITEINT_H_
 #define _SQLITEINT_H_
@@ -443,6 +443,7 @@ struct sqlite3 {
                                           /*   result set is empty */
 #define SQLITE_SqlTrace       0x00000200  /* Debug print SQL as it executes */
 #define SQLITE_VdbeListing    0x00000400  /* Debug listings of VDBE programs */
+#define SQLITE_WriteSchema    0x00000800  /* OK to update SQLITE_MASTER */
 
 /*
 ** Possible values for the sqlite.magic field.