1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Tighten up the CREATE INDEX syntax accepted by the parser. (CVS 2329)

FossilOrigin-Name: 41d2214b83dd52acdda64a50d0c1ef16009d06d0
This commit is contained in:
danielk1977
2005-02-14 06:38:40 +00:00
parent 802d69a79c
commit 2b6d46b975
6 changed files with 29 additions and 20 deletions

View 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 {

View 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;
}