Allow schema objects beginning with sqlite_ to be created if the
SQLITE_WriteSchema flag is set. (CVS 2470) FossilOrigin-Name: afc8ce42b6c321463f6451727d0f85c490c8e9ae
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
C Speed\simprovements\sas\sdescribed\sby\stickets\s#1257\sand\s#1258.\s\sThese\schanges\nhelp\ssome\sbut\sare\snowhere\snear\sthe\s23%\sclaimed\sin\sthe\stickets.\s(CVS\s2469)
|
||||
D 2005-05-21T18:32:19
|
||||
C Allow\sschema\sobjects\sbeginning\swith\ssqlite_\sto\sbe\screated\sif\sthe\nSQLITE_WriteSchema\sflag\sis\sset.\s(CVS\s2470)
|
||||
D 2005-05-22T06:49:57
|
||||
F Makefile.in 5c00d0037104de2a50ac7647a5f12769795957a3
|
||||
F Makefile.linux-gcc 06be33b2a9ad4f005a5f42b22c4a19dab3cbb5c7
|
||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||
@@ -32,7 +32,7 @@ F src/attach.c 3615dbe960cbee4aa5ea300b8a213dad36527b0f
|
||||
F src/auth.c 18c5a0befe20f3a58a41e3ddd78f372faeeefe1f
|
||||
F src/btree.c 85ee452bf378f297054aded9ea6eaed846fa4855
|
||||
F src/btree.h 41a71ce027db9ddee72cb43df2316bbe3a1d92af
|
||||
F src/build.c 61a0beac459a495f05622132559926d88757e20c
|
||||
F src/build.c 6770abc63df9f3ed9f44c50411bb63692cb4589f
|
||||
F src/date.c 2134ef4388256e8247405178df8a61bd60dc180a
|
||||
F src/delete.c 75b53db21aa1879d3655bbbc208007db31d58a63
|
||||
F src/experimental.c 50c1e3b34f752f4ac10c36f287db095c2b61766d
|
||||
@@ -55,7 +55,7 @@ F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
|
||||
F src/pager.c c91b599f64118c1b3046d8029b15c7f8f0fe9310
|
||||
F src/pager.h 0d9153d6269d60d04af3dd84a0cc0a96253cf4a4
|
||||
F src/parse.y 3e314b3a96b199b0501ed426f2cee3392ffce806
|
||||
F src/pragma.c 93d447670b367e7aec9191ed952fe04f6a052eb5
|
||||
F src/pragma.c 0ed94a1aa982802a9cf2a932c48d99b60683fa53
|
||||
F src/printf.c 3d20b21cfecadacecac3fb7274e746cb81d3d357
|
||||
F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3
|
||||
F src/select.c 43cc2a76e3e00dabc59da82d0dcdef23cdba43a3
|
||||
@@ -74,7 +74,7 @@ F src/trigger.c 1a6d0c7c51b70bdc58d5068be72034071eff23ad
|
||||
F src/update.c 04ea9dd784ccfeaf38a681b3edfe3b1c4edfdda7
|
||||
F src/utf.c bda5eb85039ef16f2d17004c1e18c96e1ab0a80c
|
||||
F src/util.c ac74ac096cbe61fe0139f041833a47c97a2dec07
|
||||
F src/vacuum.c 84a3bebac2c79a1463b98ba35fb9fb6aa2374250
|
||||
F src/vacuum.c bc1b36a56d0b4d86e1ed783cbdb24c5a54702e58
|
||||
F src/vdbe.c d2574042c44baf6b1016c61e8072dec529ac748a
|
||||
F src/vdbe.h 75e466d84d362b0c4498978a9d6b1e6bd32ecf3b
|
||||
F src/vdbeInt.h 4afaae2f4adcab54ad2a40dabb2e689fba7b1561
|
||||
@@ -279,7 +279,7 @@ F www/tclsqlite.tcl 425be741b8ae664f55cb1ef2371aab0a75109cf9
|
||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
|
||||
F www/whentouse.tcl 528299b8316726dbcc5548e9aa0648c8b1bd055b
|
||||
P 6b6e525b294a5bbf8a5e56a2f60aa096865aedbd
|
||||
R 042677df90186a621c94e43c5acba4cf
|
||||
U drh
|
||||
Z 324f7899fb27d4525e3b990fa6bc19dc
|
||||
P 3fa177c54a8589dcfa0bfad0ca124cb73b363f18
|
||||
R 8a0fd268244bb7883c1b91532d17f17a
|
||||
U danielk1977
|
||||
Z b5612ab6a31c2ac4a1cb332ce4e55151
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
3fa177c54a8589dcfa0bfad0ca124cb73b363f18
|
||||
afc8ce42b6c321463f6451727d0f85c490c8e9ae
|
||||
+2
-1
@@ -22,7 +22,7 @@
|
||||
** COMMIT
|
||||
** ROLLBACK
|
||||
**
|
||||
** $Id: build.c,v 1.319 2005/05/03 12:30:34 drh Exp $
|
||||
** $Id: build.c,v 1.320 2005/05/22 06:49:57 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@@ -599,6 +599,7 @@ int sqlite3TwoPartName(
|
||||
*/
|
||||
int sqlite3CheckObjectName(Parse *pParse, const char *zName){
|
||||
if( !pParse->db->init.busy && pParse->nested==0
|
||||
&& (pParse->db->flags & SQLITE_WriteSchema)==0
|
||||
&& 0==sqlite3StrNICmp(zName, "sqlite_", 7) ){
|
||||
sqlite3ErrorMsg(pParse, "object name reserved for internal use: %s", zName);
|
||||
return SQLITE_ERROR;
|
||||
|
||||
+3
-3
@@ -11,7 +11,7 @@
|
||||
*************************************************************************
|
||||
** This file contains code used to implement the PRAGMA command.
|
||||
**
|
||||
** $Id: pragma.c,v 1.92 2005/04/28 19:03:37 drh Exp $
|
||||
** $Id: pragma.c,v 1.93 2005/05/22 06:49:57 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
@@ -911,8 +911,8 @@ void sqlite3Pragma(
|
||||
** if it does not.
|
||||
*/
|
||||
if( sqlite3StrICmp(zLeft, "create_sqlite_statement_table")==0 ){
|
||||
extern int sqlite3CreateStatementsTable(sqlite3*);
|
||||
sqlite3CreateStatementsTable(db);
|
||||
extern int sqlite3CreateStatementsTable(Parse*);
|
||||
sqlite3CreateStatementsTable(pParse);
|
||||
}else
|
||||
#endif
|
||||
|
||||
|
||||
+10
-1
@@ -14,7 +14,7 @@
|
||||
** Most of the code in this file may be omitted by defining the
|
||||
** SQLITE_OMIT_VACUUM macro.
|
||||
**
|
||||
** $Id: vacuum.c,v 1.41 2005/04/28 19:03:37 drh Exp $
|
||||
** $Id: vacuum.c,v 1.42 2005/05/22 06:49:57 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
@@ -100,6 +100,11 @@ int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db){
|
||||
Btree *pMain; /* The database being vacuumed */
|
||||
Btree *pTemp;
|
||||
char *zSql = 0;
|
||||
int writeschema_flag; /* Saved value of the write-schema flag */
|
||||
|
||||
/* Save the current value of the write-schema flag before setting it. */
|
||||
writeschema_flag = db->flags&SQLITE_WriteSchema;
|
||||
db->flags |= SQLITE_WriteSchema;
|
||||
|
||||
if( !db->autoCommit ){
|
||||
sqlite3SetString(pzErrMsg, "cannot VACUUM from within a transaction",
|
||||
@@ -276,6 +281,10 @@ int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db){
|
||||
}
|
||||
|
||||
end_of_vacuum:
|
||||
/* Restore the original value of the write-schema flag. */
|
||||
db->flags &= ~SQLITE_WriteSchema;
|
||||
db->flags |= writeschema_flag;
|
||||
|
||||
/* Currently there is an SQL level transaction open on the vacuum
|
||||
** database. No locks are held on any other files (since the main file
|
||||
** was committed at the btree level). So it safe to end the transaction
|
||||
|
||||
Reference in New Issue
Block a user