mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Fixes for OMIT_UTF16 and OMIT_COMPOUND (CVS 2993)
FossilOrigin-Name: f58bbdc0ac6e618686c598aaafb3a41b972e078e
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
# This file implements tests for calling sqlite3_result_error()
|
||||
# from within an aggregate function implementation.
|
||||
#
|
||||
# $Id: aggerror.test,v 1.1 2006/01/20 15:45:37 drh Exp $
|
||||
# $Id: aggerror.test,v 1.2 2006/01/23 07:52:41 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@@ -50,14 +50,16 @@ do_test aggfunc-1.3 {
|
||||
SELECT x_count(a) FROM t1;
|
||||
}
|
||||
} {1 {value of 40 handed to x_count}}
|
||||
do_test aggfunc-1.4 {
|
||||
execsql {
|
||||
UPDATE t1 SET a=41 WHERE a=40
|
||||
}
|
||||
catchsql {
|
||||
SELECT x_count(a) FROM t1;
|
||||
}
|
||||
} {1 abc}
|
||||
ifcapable utf16 {
|
||||
do_test aggfunc-1.4 {
|
||||
execsql {
|
||||
UPDATE t1 SET a=41 WHERE a=40
|
||||
}
|
||||
catchsql {
|
||||
SELECT x_count(a) FROM t1;
|
||||
}
|
||||
} {1 abc}
|
||||
}
|
||||
do_test aggfunc-1.5 {
|
||||
execsql {
|
||||
SELECT x_count(*) FROM t1
|
||||
|
@@ -13,7 +13,7 @@
|
||||
# correctly. The emphasis of these tests are the _prepare(), _step() and
|
||||
# _finalize() calls.
|
||||
#
|
||||
# $Id: malloc3.test,v 1.8 2006/01/20 16:32:04 danielk1977 Exp $
|
||||
# $Id: malloc3.test,v 1.9 2006/01/23 07:52:41 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@@ -644,7 +644,7 @@ proc run_test {arglist {pcstart 0} {iFailStart 1}} {
|
||||
# Turn of the Tcl interface's prepared statement caching facility.
|
||||
db cache size 0
|
||||
|
||||
run_test $::run_test_script
|
||||
run_test $::run_test_script 9 1
|
||||
# run_test [lrange $::run_test_script 0 3] 0 63
|
||||
sqlite_malloc_fail 0
|
||||
db close
|
||||
|
@@ -12,7 +12,7 @@
|
||||
# This file contains tests to ensure that the library handles malloc() failures
|
||||
# correctly. The emphasis in this file is on sqlite3_column_XXX() APIs.
|
||||
#
|
||||
# $Id: malloc4.test,v 1.2 2005/12/09 14:25:12 danielk1977 Exp $
|
||||
# $Id: malloc4.test,v 1.3 2006/01/23 07:52:41 danielk1977 Exp $
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# NOTES ON EXPECTED BEHAVIOUR
|
||||
@@ -33,6 +33,11 @@ if {[info command sqlite_malloc_stat]==""} {
|
||||
return
|
||||
}
|
||||
|
||||
ifcapable !utf16 {
|
||||
finish_test
|
||||
return
|
||||
}
|
||||
|
||||
proc do_stmt_test {id sql} {
|
||||
set ::sql $sql
|
||||
set go 1
|
||||
|
@@ -12,7 +12,7 @@
|
||||
# focus of this file is testing SELECT statements that contain
|
||||
# subqueries in their FROM clause.
|
||||
#
|
||||
# $Id: select6.test,v 1.22 2006/01/22 00:14:39 drh Exp $
|
||||
# $Id: select6.test,v 1.23 2006/01/23 07:52:41 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@@ -301,48 +301,48 @@ do_test select6-5.2 {
|
||||
|
||||
# Tests of compound sub-selects
|
||||
#
|
||||
ifcapable compound {
|
||||
do_test select5-6.1 {
|
||||
execsql {
|
||||
DELETE FROM t1 WHERE x>4;
|
||||
SELECT * FROM t1
|
||||
}
|
||||
} {1 1 2 2 3 2 4 3}
|
||||
do_test select6-6.2 {
|
||||
execsql {
|
||||
SELECT * FROM (
|
||||
SELECT x AS 'a' FROM t1 UNION ALL SELECT x+10 AS 'a' FROM t1
|
||||
) ORDER BY a;
|
||||
}
|
||||
} {1 2 3 4 11 12 13 14}
|
||||
do_test select6-6.3 {
|
||||
execsql {
|
||||
SELECT * FROM (
|
||||
SELECT x AS 'a' FROM t1 UNION ALL SELECT x+1 AS 'a' FROM t1
|
||||
) ORDER BY a;
|
||||
}
|
||||
} {1 2 2 3 3 4 4 5}
|
||||
do_test select6-6.4 {
|
||||
execsql {
|
||||
SELECT * FROM (
|
||||
SELECT x AS 'a' FROM t1 UNION SELECT x+1 AS 'a' FROM t1
|
||||
) ORDER BY a;
|
||||
}
|
||||
} {1 2 3 4 5}
|
||||
do_test select6-6.5 {
|
||||
execsql {
|
||||
SELECT * FROM (
|
||||
SELECT x AS 'a' FROM t1 INTERSECT SELECT x+1 AS 'a' FROM t1
|
||||
) ORDER BY a;
|
||||
}
|
||||
} {2 3 4}
|
||||
do_test select6-6.6 {
|
||||
execsql {
|
||||
SELECT * FROM (
|
||||
SELECT x AS 'a' FROM t1 EXCEPT SELECT x*2 AS 'a' FROM t1
|
||||
) ORDER BY a;
|
||||
}
|
||||
} {1 3}
|
||||
ifcapable compound {
|
||||
do_test select6-6.2 {
|
||||
execsql {
|
||||
SELECT * FROM (
|
||||
SELECT x AS 'a' FROM t1 UNION ALL SELECT x+10 AS 'a' FROM t1
|
||||
) ORDER BY a;
|
||||
}
|
||||
} {1 2 3 4 11 12 13 14}
|
||||
do_test select6-6.3 {
|
||||
execsql {
|
||||
SELECT * FROM (
|
||||
SELECT x AS 'a' FROM t1 UNION ALL SELECT x+1 AS 'a' FROM t1
|
||||
) ORDER BY a;
|
||||
}
|
||||
} {1 2 2 3 3 4 4 5}
|
||||
do_test select6-6.4 {
|
||||
execsql {
|
||||
SELECT * FROM (
|
||||
SELECT x AS 'a' FROM t1 UNION SELECT x+1 AS 'a' FROM t1
|
||||
) ORDER BY a;
|
||||
}
|
||||
} {1 2 3 4 5}
|
||||
do_test select6-6.5 {
|
||||
execsql {
|
||||
SELECT * FROM (
|
||||
SELECT x AS 'a' FROM t1 INTERSECT SELECT x+1 AS 'a' FROM t1
|
||||
) ORDER BY a;
|
||||
}
|
||||
} {2 3 4}
|
||||
do_test select6-6.6 {
|
||||
execsql {
|
||||
SELECT * FROM (
|
||||
SELECT x AS 'a' FROM t1 EXCEPT SELECT x*2 AS 'a' FROM t1
|
||||
) ORDER BY a;
|
||||
}
|
||||
} {1 3}
|
||||
} ;# ifcapable compound
|
||||
|
||||
# Subselects with no FROM clause
|
||||
|
Reference in New Issue
Block a user