mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
:-) (CVS 70)
FossilOrigin-Name: d3baa046c946a2c4d5567ee57d96a6c8aa5740b9
This commit is contained in:
@ -24,7 +24,7 @@
|
||||
# focus of this file is testing the INSERT statement that takes is
|
||||
# result from a SELECT.
|
||||
#
|
||||
# $Id: insert2.test,v 1.1 2000/06/07 14:42:27 drh Exp $
|
||||
# $Id: insert2.test,v 1.2 2000/06/07 15:11:27 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -69,5 +69,17 @@ do_test insert2-1.3 {
|
||||
SELECT * FROM t1 ORDER BY log;
|
||||
}
|
||||
} {1 1 2 2}
|
||||
do_test insert2-1.4 {
|
||||
catch {execsql {DROP TABLE t1}}
|
||||
set r [execsql {
|
||||
CREATE TABLE t1(log int, cnt int);
|
||||
CREATE INDEX i1 ON t1(log);
|
||||
CREATE INDEX i2 ON t1(cnt);
|
||||
INSERT INTO t1 SELECT log, count() FROM d1 GROUP BY log;
|
||||
SELECT * FROM t1 ORDER BY log;
|
||||
}]
|
||||
lappend r [execsql {SELECT cnt FROM t1 WHERE log=3}]
|
||||
lappend r [execsql {SELECT log FROM t1 WHERE cnt=4 ORDER BY log}]
|
||||
} {0 1 1 1 2 2 3 4 4 8 5 4 4 {3 5}}
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user