-C Fix\stypos\sin\sfile\sformat\sdocumentation.\s\sTicket\s#505.\s(CVS\s1121)
-D 2003-11-25T23:48:57
+C Disallow\stemporary\sindices\son\spersistent\stables.\s(CVS\s1122)
+D 2003-11-27T00:48:58
F Makefile.in 5cb273b7d0e945d47ee8b9ad1c2a04ce79927d2d
F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
F src/btree.c ba1cc0c71c3d2742b9a9047832335dc7d3656c45
F src/btree.h 9b7c09f1e64274d7bb74a57bbfc63778f67b1048
F src/btree_rb.c 67d154ffb0fac27a4a7eab9118ece6eaafeb49c9
-F src/build.c 9def3a3b8fba59325ed686049b88c2e7aff9af12
+F src/build.c fede6bfb79d50483747fa55ae18c35d95db35fe3
F src/copy.c 9e47975ea96751c658bcf1a0c4f0bb7c6ee61e73
F src/date.c acb75ff7849ca923837a9d3ef6b2d3e111a32fb0
F src/delete.c 0f81e6799c089487615d38e042a2de4d2d6192bc
F src/os.h 729395fefcca4b81ae056aa9ff67b72bb40dd9e0
F src/pager.c 62702dff51d50694d039bc210f31990d1fbba2dd
F src/pager.h 5da62c83443f26b1792cfd72c96c422f91aadd31
-F src/parse.y ec5d0d0a59b4ce508ab6b980cc4a19a47dd363ef
+F src/parse.y 1c72ca2a1f57df2c6263ea6164ef4cae9dd4f7e7
F src/pragma.c cee60f17679210e8acd30d5bdee855716d0c898c
F src/printf.c 12e45d482ac8abcc6f786fc99e5bed7dd9a51af0
F src/random.c 19e8e00fe0df32a742f115773f57651be327cabe
F src/shell.c c2ba26c850874964f5ec1ebf6c43406f28e44c4a
F src/shell.tcl 27ecbd63dd88396ad16d81ab44f73e6c0ea9d20e
F src/sqlite.h.in e6cfff01fafc8a82ce82cd8c932af421dc9adb54
-F src/sqliteInt.h d950a8e1e6e37497ca681d8288d925e58251ca7c
+F src/sqliteInt.h 882aa33ee2aed7685449b899d917a316b9cc2c44
F src/table.c 4301926464d88d2c2c7cd21c3360aa75bf068b95
F src/tclsqlite.c 3efac6b5861ac149c41251d4d4c420c94be5ba6a
F src/test1.c f9d5816610f7ec4168ab7b098d5207a5708712b6
F test/all.test 569a92a8ee88f5300c057cc4a8f50fbbc69a3242
F test/attach.test c26848402e7ac829e043e1fa5e0eb87032e5d81d
F test/attach2.test 6f98cc2b929d88dc5f82d95d04e9b89b3b5dead3
-F test/auth.test a618f0e96bb5baa7a5623eb939388e9ac5f5d9a2
+F test/auth.test b7d6bdeffa804b96b7bcac2712e5f71ce014a1b8
F test/bigfile.test 1cd8256d4619c39bea48147d344f348823e78678
F test/bigrow.test 8ab252dba108f12ad64e337b0f2ff31a807ac578
F test/bind.test 56a57043b42c4664ca705f6050e56717a8a6699a
F test/tester.tcl 2671536d3650c29e7c105219f277568b0884cb58
F test/trans.test 75e7a171b5d2d94ee56766459113e2ad0e5f809d
F test/trigger1.test 3fe06daecf8334df840025e154e95fd4727600d7
-F test/trigger2.test 22aa0519ae18cf83568c7fba7b8cee893dd6b824
+F test/trigger2.test 0767ab30cb5a2c8402c8524f3d566b410b6f5263
F test/trigger3.test a95ccace88291449f5eae7139ec438a42f90654d
F test/trigger4.test 542afce45774e8f8e1130b96b8675f414d6e4bd8
F test/unique.test 0e38d4cc7affeef2527720d1dafd1f6870f02f2b
F www/sqlite.tcl 3c83b08cf9f18aa2d69453ff441a36c40e431604
F www/tclsqlite.tcl b9271d44dcf147a93c98f8ecf28c927307abd6da
F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1
-P 72f3e7c2b0258271956ed7a43b3388bb74bf62ec
-R 103afab43c37ed15e55850e7a995daa7
+P 4eef93814f4a26de4a088c464545443547281abd
+R acf9a8364da7d689576d07cca2b5d727
U drh
-Z c6bb7ee0d77a522e874c5e7fd245f13d
+Z 88c9056f3dd0956270b94117514b4485
-4eef93814f4a26de4a088c464545443547281abd
\ No newline at end of file
+72bf73b2c1e3594aa85920e47fc345bba56c80d0
\ No newline at end of file
** ROLLBACK
** PRAGMA
**
-** $Id: build.c,v 1.160 2003/09/06 22:18:08 drh Exp $
+** $Id: build.c,v 1.161 2003/11/27 00:48:58 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
pTab->iPKey = iCol;
pTab->keyConf = onError;
}else{
- sqliteCreateIndex(pParse, 0, 0, pList, onError, 0, 0, 0);
+ sqliteCreateIndex(pParse, 0, 0, pList, onError, 0, 0);
pList = 0;
}
SrcList *pTable, /* Name of the table to index. Use pParse->pNewTable if 0 */
IdList *pList, /* A list of columns to be indexed */
int onError, /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */
- int isTemp, /* True if this is a temporary index */
Token *pStart, /* The CREATE token that begins a CREATE TABLE statement */
Token *pEnd /* The ")" that closes the CREATE INDEX statement */
){
int i, j;
Token nullId; /* Fake token for an empty ID list */
DbFixer sFix; /* For assigning database names to pTable */
+ int isTemp; /* True for a temporary index */
sqlite *db = pParse->db;
if( pParse->nErr || sqlite_malloc_failed ) goto exit_create_index;
- if( !isTemp && pParse->initFlag
+ if( pParse->initFlag
&& sqliteFixInit(&sFix, pParse, pParse->iDb, "index", pName)
&& sqliteFixSrcList(&sFix, pTable)
){
pParse->nErr++;
goto exit_create_index;
}
- if( !isTemp && pTab->iDb>=2 && pParse->initFlag==0 ){
+ if( pTab->iDb>=2 && pParse->initFlag==0 ){
sqliteSetString(&pParse->zErrMsg, "table ", pTab->zName,
- " may not have non-temporary indices added", 0);
+ " may not have indices added", 0);
pParse->nErr++;
goto exit_create_index;
}
pParse->nErr++;
goto exit_create_index;
}
- if( pTab->iDb==1 ){
- isTemp = 1;
- }
+ isTemp = pTab->iDb==1;
/*
** Find the name of the index. Make sure there is not already another
{
const char *zDb = db->aDb[pTab->iDb].zName;
- assert( isTemp==0 || isTemp==1 );
- assert( pTab->iDb==pParse->iDb || isTemp==1 );
+ assert( pTab->iDb==pParse->iDb || isTemp );
if( sqliteAuthCheck(pParse, SQLITE_INSERT, SCHEMA_TABLE(isTemp), 0, zDb) ){
goto exit_create_index;
}
** the parser. Lemon will also generate a header file containing
** numeric codes for all of the tokens.
**
-** @(#) $Id: parse.y,v 1.103 2003/09/30 01:54:14 drh Exp $
+** @(#) $Id: parse.y,v 1.104 2003/11/27 00:48:58 drh Exp $
*/
%token_prefix TK_
%token_type {Token}
ccons ::= NULL onconf.
ccons ::= NOT NULL onconf(R). {sqliteAddNotNull(pParse, R);}
ccons ::= PRIMARY KEY sortorder onconf(R). {sqliteAddPrimaryKey(pParse,0,R);}
-ccons ::= UNIQUE onconf(R). {sqliteCreateIndex(pParse,0,0,0,R,0,0,0);}
+ccons ::= UNIQUE onconf(R). {sqliteCreateIndex(pParse,0,0,0,R,0,0);}
ccons ::= CHECK LP expr RP onconf.
ccons ::= REFERENCES nm(T) idxlist_opt(TA) refargs(R).
{sqliteCreateForeignKey(pParse,0,&T,TA,R);}
tcons ::= PRIMARY KEY LP idxlist(X) RP onconf(R).
{sqliteAddPrimaryKey(pParse,X,R);}
tcons ::= UNIQUE LP idxlist(X) RP onconf(R).
- {sqliteCreateIndex(pParse,0,0,X,R,0,0,0);}
+ {sqliteCreateIndex(pParse,0,0,X,R,0,0);}
tcons ::= CHECK expr onconf.
tcons ::= FOREIGN KEY LP idxlist(FA) RP
REFERENCES nm(T) idxlist_opt(TA) refargs(R) defer_subclause_opt(D). {
///////////////////////////// The CREATE INDEX command ///////////////////////
//
-cmd ::= CREATE(S) temp(T) uniqueflag(U) INDEX nm(X)
+cmd ::= CREATE(S) uniqueflag(U) INDEX nm(X)
ON nm(Y) dbnm(D) LP idxlist(Z) RP(E) onconf(R). {
SrcList *pSrc = sqliteSrcListAppend(0, &Y, &D);
if( U!=OE_None ) U = R;
if( U==OE_Default) U = OE_Abort;
- sqliteCreateIndex(pParse, &X, pSrc, Z, U, T, &S, &E);
+ sqliteCreateIndex(pParse, &X, pSrc, Z, U, &S, &E);
}
%type uniqueflag {int}
*************************************************************************
** Internal interface definitions for SQLite.
**
-** @(#) $Id: sqliteInt.h,v 1.202 2003/11/11 23:30:36 drh Exp $
+** @(#) $Id: sqliteInt.h,v 1.203 2003/11/27 00:48:58 drh Exp $
*/
#include "config.h"
#include "sqlite.h"
void sqliteSrcListAssignCursors(Parse*, SrcList*);
void sqliteIdListDelete(IdList*);
void sqliteSrcListDelete(SrcList*);
-void sqliteCreateIndex(Parse*,Token*,SrcList*,IdList*,int,int,Token*,Token*);
+void sqliteCreateIndex(Parse*,Token*,SrcList*,IdList*,int,Token*,Token*);
void sqliteDropIndex(Parse*, SrcList*);
void sqliteAddKeyType(Vdbe*, ExprList*);
void sqliteAddIdxKeyType(Vdbe*, Index*);
# focus of this script is testing the ATTACH and DETACH commands
# and related functionality.
#
-# $Id: auth.test,v 1.10 2003/06/06 19:00:42 drh Exp $
+# $Id: auth.test,v 1.11 2003/11/27 00:49:23 drh Exp $
#
set testdir [file dirname $argv0]
execsql {SELECT * FROM t2}
} {1 2 3}
-do_test auth-1.35 {
+do_test auth-1.35.1 {
proc auth {code arg1 arg2 arg3 arg4} {
if {$code=="SQLITE_READ" && $arg1=="t2" && $arg2=="b"} {
return SQLITE_DENY
}
catchsql {SELECT * FROM t2}
} {1 {access to t2.b is prohibited}}
+do_test auth-1.35.2 {
+ execsql {ATTACH DATABASE 'test.db' AS two}
+ catchsql {SELECT * FROM two.t2}
+} {1 {access to two.t2.b is prohibited}}
+execsql {DETACH DATABASE two}
do_test auth-1.36 {
proc auth {code arg1 arg2 arg3 arg4} {
if {$code=="SQLITE_READ" && $arg1=="t2" && $arg2=="b"} {
{CREATE TABLE tbl (a, b PRIMARY KEY);}
{CREATE TABLE tbl (a, b); CREATE INDEX tbl_idx ON tbl(b);}
{CREATE TEMP TABLE tbl (a, b); CREATE INDEX tbl_idx ON tbl(b);}
- {CREATE TABLE tbl (a, b); CREATE TEMP INDEX tbl_idx ON tbl(b);}
} {
incr ii
catchsql { DROP INDEX tbl_idx; }