]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Tighten up the CREATE INDEX syntax accepted by the parser. (CVS 2329)
authordanielk1977 <danielk1977@noemail.net>
Mon, 14 Feb 2005 06:38:40 +0000 (06:38 +0000)
committerdanielk1977 <danielk1977@noemail.net>
Mon, 14 Feb 2005 06:38:40 +0000 (06:38 +0000)
FossilOrigin-Name: 41d2214b83dd52acdda64a50d0c1ef16009d06d0

manifest
manifest.uuid
src/parse.y
test/alter.test
test/subquery.test
www/lang.tcl

index 52bfeccaeb4200f2e7859ca7dc22408ad5a60870..80ecc4123de76aaf9e3403aa8c77487b0076de48 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Update\sthe\sversion\snumber\sin\spreparation\sfor\sthe\srelease\sof\s3.1.2.\s(CVS\s2325)
-D 2005-02-13T23:34:25
+C Tighten\sup\sthe\sCREATE\sINDEX\ssyntax\saccepted\sby\sthe\sparser.\s(CVS\s2329)
+D 2005-02-14T06:38:40
 F Makefile.in d928187101fa3d78426cf48ca30e39d0fb714e57
 F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
 F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1
@@ -53,7 +53,7 @@ F src/os_win.c bddeae1c3299be0fbe47077dd4e98b786a067f71
 F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
 F src/pager.c d0c1f41b41d2b56a6fd0e1308a66518872f68ed5
 F src/pager.h 70d496f372163abb6340f474288c4bb9ea962cf7
-F src/parse.y ee046c1ea30425a817285e52fb1993c2f955e766
+F src/parse.y 450fc9c4d5a737be6fdba6e4b2e3de5800d4d750
 F src/pragma.c 7e65c5545d83909238adf231e2a6eee6eb43e0d5
 F src/printf.c 3d20b21cfecadacecac3fb7274e746cb81d3d357
 F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3
@@ -83,7 +83,7 @@ F src/vdbemem.c 62fe89471b656a922e9879be005abf690509ead3
 F src/where.c c4b6a799ed9cc99c63d298c8741956156eeb05eb
 F tclinstaller.tcl 046e3624671962dc50f0481d7c25b38ef803eb42
 F test/all.test 7f0988442ab811dfa41793b5b550f5828ce316f3
-F test/alter.test b146ddd669b45a880d40bfdacd6037666137c3f4
+F test/alter.test 3a20ce14c3989f7e2e75da50797065c2e56f838b
 F test/attach.test 5147d531ca5fc5c2539fd20ce3b07a00420e1fbb
 F test/attach2.test 6f3a3a3a7f5be40388dd4d805e0e0712718dca9d
 F test/attach3.test c05c70b933afbde0901dab9da3e66ee842c09f38
@@ -181,7 +181,7 @@ F test/select5.test 2d414f712bff8e590091e08f9b7287600731be00
 F test/select6.test 6e5a1a70a788cdbe515d1252dd0917d7e9d1d71e
 F test/select7.test 8f3362336c10d828ab6fe9c1b8897b484da8b592
 F test/sort.test 312eade533cb3c7667110ccfa6e818db1078fd6c
-F test/subquery.test 409078e5fd822647391663694e9af74719923025
+F test/subquery.test 6274cce7617bc7f625490759cbe4f0c0eef24895
 F test/subselect.test 3f3f7a940dc3195c3139f4d530385cb54665d614
 F test/table.test a2a58cae70ef2511cbf27d40fb8f570106a2677e
 F test/tableapi.test 6a66d58b37d46dc0f2b3c7d4bd2617d209399bd1
@@ -253,7 +253,7 @@ F www/faq.tcl 1e348dec52dc0f21f4216fd6918c69c56daa4cfd
 F www/fileformat.tcl 900c95b9633abc3dcfc384d9ddd8eb4876793059
 F www/formatchng.tcl bfbf14dbf5181e771d06da7797767b0200b36d8a
 F www/index.tcl 8cd6d913cccfbd8d46e9b1310fb329fdfbf6053a
-F www/lang.tcl aeb76706558763b3847390a646b3a0ab649c468c
+F www/lang.tcl fad1d8d12b6c4e5185d9ca12c31c5cf7309b615c
 F www/lockingv3.tcl f59b19d6c8920a931f096699d6faaf61c05db55f
 F www/mingw.tcl d96b451568c5d28545fefe0c80bee3431c73f69c
 F www/nulls.tcl ec35193f92485b87b90a994a01d0171b58823fcf
@@ -270,7 +270,7 @@ F www/tclsqlite.tcl e73f8f8e5f20e8277619433f7970060ab01088fc
 F www/vdbe.tcl 095f106d93875c94b47367384ebc870517431618
 F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
 F www/whentouse.tcl 3e522a06ad41992023c80ca29a048ae2331ca5bd
-P f7858d8830cdd0f57b8f9bc73068d29a7062b8ac
-R 140ff7a4bd57de4ce48248ba4872fa40
-U drh
-Z 54aa8791bff2314e3791551e26e3033e
+P f3c51de7599ed6d3bcdd227e290ad75829840957
+R 7921af0145748c8a37437dad53c32c4a
+U danielk1977
+Z 64aa5c96551e695b1d8501bf1ee83810
index e08a627f014d0bab6225af90a7bb15533168055f..eb5c830a6d5af86759295cd42604f76c370781d0 100644 (file)
@@ -1 +1 @@
-f3c51de7599ed6d3bcdd227e290ad75829840957
\ No newline at end of file
+41d2214b83dd52acdda64a50d0c1ef16009d06d0
\ No newline at end of file
index 9f9d7b9d4edbe1555992bedf3caa5ae7db914f44..2ad78de3174cd71b80f0642c3ad9d6b1d1ad332a 100644 (file)
@@ -14,7 +14,7 @@
 ** the parser.  Lemon will also generate a header file containing
 ** numeric codes for all of the tokens.
 **
-** @(#) $Id: parse.y,v 1.165 2005/02/05 12:48:48 danielk1977 Exp $
+** @(#) $Id: parse.y,v 1.166 2005/02/14 06:38:40 danielk1977 Exp $
 */
 %token_prefix TK_
 %token_type {Token}
@@ -780,10 +780,10 @@ expritem(A) ::= .                       {A = 0;}
 ///////////////////////////// The CREATE INDEX command ///////////////////////
 //
 cmd ::= CREATE(S) uniqueflag(U) INDEX nm(X) dbnm(D)
-        ON fullname(Y) LP idxlist(Z) RP(E) onconf(R). {
+        ON nm(Y) LP idxlist(Z) RP(E) onconf(R). {
   if( U!=OE_None ) U = R;
   if( U==OE_Default) U = OE_Abort;
-  sqlite3CreateIndex(pParse, &X, &D, Y, Z, U, &S, &E);
+  sqlite3CreateIndex(pParse, &X, &D, sqlite3SrcListAppend(0,&Y,0),Z,U, &S, &E);
 }
 
 %type uniqueflag {int}
index 421362c2dd01b661f5dc8855fa072db2043bc7d6..4e9d1766816756f64371057304d92eabb24bbf66 100644 (file)
@@ -11,7 +11,7 @@
 # This file implements regression tests for SQLite library.  The
 # focus of this script is testing the ALTER TABLE statement.
 #
-# $Id: alter.test,v 1.9 2005/01/27 00:30:52 danielk1977 Exp $
+# $Id: alter.test,v 1.10 2005/02/14 06:38:40 danielk1977 Exp $
 #
 
 set testdir [file dirname $argv0]
@@ -186,7 +186,7 @@ do_test alter-1.8.2 {
     CREATE TABLE t4(a PRIMARY KEY, b, c);
     CREATE TABLE aux.t4(a PRIMARY KEY, b, c);
     CREATE INDEX i4 ON t4(b);
-    CREATE INDEX aux.i4 ON aux.t4(b);
+    CREATE INDEX aux.i4 ON t4(b);
   }
 } {}
 do_test alter-1.8.3 {
index 137968bb075634ff0066926a2196cf8d751ab428..fb98f7ce374a21d0d9b4571d4936b2670325a2b2 100644 (file)
@@ -11,7 +11,7 @@
 # This file implements regression tests for SQLite library.  The
 # focus of this script is testing correlated subqueries
 #
-# $Id: subquery.test,v 1.7 2005/02/12 08:59:59 danielk1977 Exp $
+# $Id: subquery.test,v 1.8 2005/02/14 06:38:40 danielk1977 Exp $
 #
 
 set testdir [file dirname $argv0]
@@ -136,6 +136,15 @@ do_test subquery-1.10.4 {
   }
 } {2002-2 30.0 2002-3 25.0 2002-4 15.0}
 do_test subquery-1.10.5 {
+  execsql {
+    SELECT "a.period", vsum from
+      (select a.period,
+      (select sum(val) from t5 where period between a.period and '2002-4') vsum
+    FROM t5 a where a.period between '2002-1' and '2002-4') 
+    WHERE vsum < 45 ;
+  }
+} {2002-2 30.0 2002-3 25.0 2002-4 15.0}
+do_test subquery-1.10.6 {
   execsql {
     DROP TABLE t5;
   }
index d7d4e0897bad92079f39b01228304261f419b0b1..08a7fe7cda9dd1d3876a6625dbe8b78fb4985211 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Run this Tcl script to generate the lang-*.html files.
 #
-set rcsid {$Id: lang.tcl,v 1.82 2005/01/24 23:27:32 danielk1977 Exp $}
+set rcsid {$Id: lang.tcl,v 1.83 2005/02/14 06:38:41 danielk1977 Exp $}
 source common.tcl
 
 if {[llength $argv]>0} {
@@ -381,8 +381,8 @@ puts "\"[Operator \\.]\".</p>"
 Section {CREATE INDEX} createindex
 
 Syntax {sql-statement} {
-CREATE [UNIQUE] INDEX <index-name> 
-ON [<database-name> .] <table-name> ( <column-name> [, <column-name>]* )
+CREATE [UNIQUE] INDEX [<database-name> .] <index-name> 
+ON <table-name> ( <column-name> [, <column-name>]* )
 [ ON CONFLICT <conflict-algorithm> ]
 } {column-name} {
 <name> [ COLLATE <collation-name>] [ ASC | DESC ]