mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Update documentation for the 2.2.0 release. (CVS 335)
FossilOrigin-Name: 14392258c5b6385091be8d684e3ea6841941b483
This commit is contained in:
@ -13,7 +13,7 @@
|
||||
# This file implements tests for the special processing associated
|
||||
# with INTEGER PRIMARY KEY columns.
|
||||
#
|
||||
# $Id: intpkey.test,v 1.2 2001/12/22 14:49:26 drh Exp $
|
||||
# $Id: intpkey.test,v 1.3 2001/12/22 19:27:41 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -366,5 +366,45 @@ do_test intpkey=5.2 {
|
||||
}
|
||||
} {-4 -4 0 0 5 5 6 6 11 11}
|
||||
|
||||
# Test the ability of the COPY command to put data into a
|
||||
# table that contains an integer primary key.
|
||||
#
|
||||
do_test intpkey-6.1 {
|
||||
set f [open ./data1.txt w]
|
||||
puts $f "20\tb-20\tc-20"
|
||||
puts $f "21\tb-21\tc-21"
|
||||
puts $f "22\tb-22\tc-22"
|
||||
close $f
|
||||
execsql {
|
||||
COPY t1 FROM 'data1.txt';
|
||||
SELECT * FROM t1 WHERE a>=20;
|
||||
}
|
||||
} {20 b-20 c-20 21 b-21 c-21 22 b-22 c-22}
|
||||
do_test intpkey-6.2 {
|
||||
execsql {
|
||||
SELECT * FROM t1 WHERE b=='hello'
|
||||
}
|
||||
} {5 hello world 11 hello world}
|
||||
do_test intpkey-6.3 {
|
||||
execsql {
|
||||
DELETE FROM t1 WHERE b='b-21';
|
||||
SELECT * FROM t1 WHERE b=='b-21';
|
||||
}
|
||||
} {}
|
||||
do_test intpkey-6.4 {
|
||||
execsql {
|
||||
SELECT * FROM t1 WHERE a>=20
|
||||
}
|
||||
} {20 b-20 c-20 22 b-22 c-22}
|
||||
|
||||
# Do an insert of values with the columns specified out of order.
|
||||
#
|
||||
execsql {pragma vdbe_trace=on;}
|
||||
do_test intpkey-7.1 {
|
||||
execsql {
|
||||
INSERT INTO t1(c,b,a) VALUES('row','new',30);
|
||||
SELECT * FROM t1 WHERE rowid>=30;
|
||||
}
|
||||
} {30 new row}
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user