1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Remove unused routines from vdbeaux.c. Improve test coverage. (CVS 1746)

FossilOrigin-Name: 792b3c75e7764bab1473c0d6efc76f1164c943bf
This commit is contained in:
drh
2004-06-27 21:31:39 +00:00
parent 6a6124e27a
commit 6a179ea796
6 changed files with 73 additions and 78 deletions

View File

@ -12,7 +12,7 @@
# focus of this file is testing the magic ROWID column that is
# found on all tables.
#
# $Id: rowid.test,v 1.15 2004/06/19 00:16:31 drh Exp $
# $Id: rowid.test,v 1.16 2004/06/27 21:31:40 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -631,6 +631,21 @@ do_test rowid-11.4 {
execsql {SELECT rowid, a FROM t5 WHERE rowid<='abc'}
} {1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8}
# Test the automatic generation of rowids when the table already contains
# a rowid with the maximum value.
#
do_test rowid-12.1 {
execsql {
CREATE TABLE t7(x INTEGER PRIMARY KEY, y);
INSERT INTO t7 VALUES(9223372036854775807,'a');
SELECT y FROM t7;
}
} {a}
do_test rowid-12.2 {
execsql {
INSERT INTO t7 VALUES(NULL,'b');
SELECT y FROM t7;
}
} {b a}
finish_test

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The
# focus of this file is testing the CREATE TABLE statement.
#
# $Id: sort.test,v 1.13 2004/06/09 09:55:20 danielk1977 Exp $
# $Id: sort.test,v 1.14 2004/06/27 21:31:40 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -355,4 +355,48 @@ do_test sort-8.1 {
}
} {100 A1 100 A2}
# BLOBs should sort after TEXT
#
do_test sort-9.1 {
execsql {
CREATE TABLE t6(x, y);
INSERT INTO t6 VALUES(1,1);
INSERT INTO t6 VALUES(2,'1');
INSERT INTO t6 VALUES(3,x'31');
INSERT INTO t6 VALUES(4,NULL);
SELECT x FROM t6 ORDER BY y;
}
} {4 1 2 3}
do_test sort-9.2 {
execsql {
SELECT x FROM t6 ORDER BY y DESC;
}
} {3 2 1 4}
do_test sort-9.3 {
execsql {
SELECT x FROM t6 WHERE y<1
}
} {}
do_test sort-9.4 {
execsql {
SELECT x FROM t6 WHERE y<'1'
}
} {1}
do_test sort-9.5 {
execsql {
SELECT x FROM t6 WHERE y<x'31'
}
} {1 2}
do_test sort-9.6 {
execsql {
SELECT x FROM t6 WHERE y>1
}
} {2 3}
do_test sort-9.7 {
execsql {
SELECT x FROM t6 WHERE y>'1'
}
} {3}
finish_test