Add test cases to unionvtab.test.

FossilOrigin-Name: 6c9128e1a53f8cf26de9ef1bc07051f2c94287531edacfcfb69d3cd7590240b3
This commit is contained in:
dan 2017-07-18 18:50:37 +00:00
parent 53e86ab36f
commit 8342aa0d81
3 changed files with 97 additions and 9 deletions

View File

@ -1,5 +1,5 @@
C Add\sthe\sunion-vtab\sextension\s-\sstill\sexperimental\sand\sunder\sactive\ndevelopment.
D 2017-07-18T18:19:35.178
C Add\stest\scases\sto\sunionvtab.test.
D 2017-07-18T18:50:37.772
F Makefile.in d9873c9925917cca9990ee24be17eb9613a668012c85a343aef7e5536ae266e8
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc 20850e3e8d4d4791e0531955852d768eb06f24138214870d543abb1a47346fba
@ -1432,7 +1432,7 @@ F test/tt3_vacuum.c 1753f45917699c9c1f66b64c717a717c9379f776
F test/types.test bf816ce73c7dfcfe26b700c19f97ef4050d194ff
F test/types2.test 1aeb81976841a91eef292723649b5c4fe3bc3cac
F test/types3.test 99e009491a54f4dc02c06bdbc0c5eea56ae3e25a
F test/unionvtab.test a7d30e5900cf563f3f05a3ec929b19bd8da22e7af3c00169a8972685c5d273b2
F test/unionvtab.test fff214df907bbe830f5637d672b6ef945010e1375de1186083de80da84583c40
F test/unique.test 93f8b2ef5ea51b9495f8d6493429b1fd0f465264
F test/unique2.test 3674e9f2a3f1fbbfd4772ac74b7a97090d0f77d2
F test/unixexcl.test d936ba2b06794018e136418addd59a2354eeae97
@ -1635,8 +1635,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P 9dbae1df75219e2accd8993015ce0ffc21966d7e69d04178b1a2cc46207fe260 f2c4a584e83ffcc1cedd39460eb06d6f231a1a87f269bb3e75055232a866067e
R 22688c3ff114a75547dc23b352f32b8f
T +closed f2c4a584e83ffcc1cedd39460eb06d6f231a1a87f269bb3e75055232a866067e
U drh
Z 795d41abc0655f6af75662d51713271a
P 948f95046b7eaa8c68617b36625a7500dd0e69e52425ac6d748f2a311eb2474a
R 6fc81d1e1254a0fa7b9a54d980f776e3
U dan
Z 0fa121be6f0cc20896dfe2962de52055

View File

@ -1 +1 @@
948f95046b7eaa8c68617b36625a7500dd0e69e52425ac6d748f2a311eb2474a
6c9128e1a53f8cf26de9ef1bc07051f2c94287531edacfcfb69d3cd7590240b3

View File

@ -238,5 +238,94 @@ do_execsql_test 3.7.8 { SELECT count(*) FROM uu WHERE rowid >= 99 } {2}
do_execsql_test 3.7.9 { SELECT count(*) FROM uu WHERE rowid >= 100 } {1}
do_execsql_test 3.7.10 { SELECT count(*) FROM uu WHERE rowid >= 101 } {0}
set L [expr 9223372036854775807]
set S [expr -9223372036854775808]
do_execsql_test 3.8.1 { SELECT count(*) FROM uu WHERE rowid >= $S } {300}
do_execsql_test 3.8.2 { SELECT count(*) FROM uu WHERE rowid > $S } {300}
do_execsql_test 3.8.3 { SELECT count(*) FROM uu WHERE rowid <= $S } {0}
do_execsql_test 3.8.4 { SELECT count(*) FROM uu WHERE rowid < $S } {0}
do_execsql_test 3.9.1 { SELECT count(*) FROM uu WHERE rowid >= $L } {0}
do_execsql_test 3.9.2 { SELECT count(*) FROM uu WHERE rowid > $L } {0}
do_execsql_test 3.9.3 { SELECT count(*) FROM uu WHERE rowid <= $L } {300}
do_execsql_test 3.9.4 { SELECT count(*) FROM uu WHERE rowid < $L } {300}
#-------------------------------------------------------------------------
#
do_execsql_test 4.0 {
CREATE TABLE s1(k INTEGER PRIMARY KEY, v);
INSERT INTO s1 VALUES($S, 'one');
INSERT INTO s1 VALUES($S+1, 'two');
INSERT INTO s1 VALUES($S+2, 'three');
CREATE TABLE l1(k INTEGER PRIMARY KEY, v);
INSERT INTO l1 VALUES($L, 'six');
INSERT INTO l1 VALUES($L-1, 'five');
INSERT INTO l1 VALUES($L-2, 'four');
CREATE VIRTUAL TABLE temp.sl USING unionvtab(
"SELECT NULL, 'l1', 0, 9223372036854775807
UNION ALL
SELECT NULL, 's1', -9223372036854775808, -1"
);
}
do_execsql_test 4.1 {
SELECT * FROM sl;
} {
-9223372036854775808 one -9223372036854775807 two -9223372036854775806 three
9223372036854775805 four 9223372036854775806 five 9223372036854775807 six
}
foreach {k v} {
-9223372036854775808 one -9223372036854775807 two -9223372036854775806 three
9223372036854775805 four 9223372036854775806 five 9223372036854775807 six
} {
do_execsql_test 4.2.$v { SELECT * FROM sl WHERE rowid=$k } [list $k $v]
}
do_execsql_test 4.3.1 {
SELECT * FROM sl WHERE rowid>-9223372036854775808
} {
-9223372036854775807 two -9223372036854775806 three
9223372036854775805 four 9223372036854775806 five 9223372036854775807 six
}
do_execsql_test 4.3.2 {
SELECT * FROM sl WHERE rowid>=-9223372036854775808
} {
-9223372036854775808 one -9223372036854775807 two -9223372036854775806 three
9223372036854775805 four 9223372036854775806 five 9223372036854775807 six
}
do_execsql_test 4.3.3 {
SELECT * FROM sl WHERE rowid<=-9223372036854775808
} {
-9223372036854775808 one
}
do_execsql_test 4.3.4 {
SELECT * FROM sl WHERE rowid<-9223372036854775808
} { }
do_execsql_test 4.4.1 {
SELECT * FROM sl WHERE rowid<9223372036854775807
} {
-9223372036854775808 one -9223372036854775807 two -9223372036854775806 three
9223372036854775805 four 9223372036854775806 five
}
do_execsql_test 4.4.2 {
SELECT * FROM sl WHERE rowid<=9223372036854775807
} {
-9223372036854775808 one -9223372036854775807 two -9223372036854775806 three
9223372036854775805 four 9223372036854775806 five 9223372036854775807 six
}
do_execsql_test 4.3.3 {
SELECT * FROM sl WHERE rowid>=9223372036854775807
} {
9223372036854775807 six
}
do_execsql_test 4.4.4 {
SELECT * FROM sl WHERE rowid>9223372036854775807
} { }
finish_test