Modify test scripts to work when SQLITE_OMIT_SUBQUERY (along with other OMIT macros) is defined. (CVS 2251)
FossilOrigin-Name: bb0254ab14417f0ab40f10f37cb63a60507f070a
This commit is contained in:
+20
-18
@@ -13,7 +13,7 @@
|
||||
# This file implements tests for miscellanous features that were
|
||||
# left out of other test files.
|
||||
#
|
||||
# $Id: misc4.test,v 1.12 2005/01/20 02:17:02 danielk1977 Exp $
|
||||
# $Id: misc4.test,v 1.13 2005/01/21 03:12:16 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@@ -101,23 +101,25 @@ do_test misc4-3.1 {
|
||||
|
||||
# Ticket #1047. Make sure column types are preserved in subqueries.
|
||||
#
|
||||
do_test misc4-4.1 {
|
||||
execsql {
|
||||
create table a(key varchar, data varchar);
|
||||
create table b(key varchar, period integer);
|
||||
insert into a values('01','data01');
|
||||
insert into a values('+1','data+1');
|
||||
|
||||
insert into b values ('01',1);
|
||||
insert into b values ('01',2);
|
||||
insert into b values ('+1',3);
|
||||
insert into b values ('+1',4);
|
||||
|
||||
select a.*, x.*
|
||||
from a, (select key,sum(period) from b group by key) as x
|
||||
where a.key=x.key;
|
||||
}
|
||||
} {01 data01 01 3.0 +1 data+1 +1 7.0}
|
||||
ifcapable subquery {
|
||||
do_test misc4-4.1 {
|
||||
execsql {
|
||||
create table a(key varchar, data varchar);
|
||||
create table b(key varchar, period integer);
|
||||
insert into a values('01','data01');
|
||||
insert into a values('+1','data+1');
|
||||
|
||||
insert into b values ('01',1);
|
||||
insert into b values ('01',2);
|
||||
insert into b values ('+1',3);
|
||||
insert into b values ('+1',4);
|
||||
|
||||
select a.*, x.*
|
||||
from a, (select key,sum(period) from b group by key) as x
|
||||
where a.key=x.key;
|
||||
}
|
||||
} {01 data01 01 3.0 +1 data+1 +1 7.0}
|
||||
}
|
||||
|
||||
# Ticket #1036. When creating tables from a SELECT on a view, use the
|
||||
# short names of columns.
|
||||
|
||||
Reference in New Issue
Block a user