Add tests to check that affinities work with != operators on virtual table
column values. No changes to code. FossilOrigin-Name: 8d24e0803d180448e637e33030a4ebf2c20eb1cab1074290c08f2eee0a23f66c
This commit is contained in:
parent
d03024d814
commit
09ccaf72d1
15
manifest
15
manifest
@ -1,5 +1,5 @@
|
||||
C Enhance\sthe\svtab\sinterface\sto\shandle\sIS,\s!=,\sIS\sNOT,\sIS\sNULL\sand\sIS\sNOT\sNULL\nconstraints.
|
||||
D 2017-09-09T19:41:12.986
|
||||
C Add\stests\sto\scheck\sthat\saffinities\swork\swith\s!=\soperators\son\svirtual\stable\ncolumn\svalues.\sNo\schanges\sto\scode.
|
||||
D 2017-09-11T08:53:54.105
|
||||
F Makefile.in c644bbe8ebe4aae82ad6783eae6b6beea4c727b99ff97568b847ced5e2ac7afb
|
||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||
F Makefile.msc 6a7a74bf60ad395098c0bd175ab054cd65ef85d7f034198d52bcc4d9e5fb4c6b
|
||||
@ -610,7 +610,7 @@ F test/bestindex1.test 0cf1bd2d7b97d3a3a8c10736125274f64765c4ee
|
||||
F test/bestindex2.test 4a06b8922ab2fd09434870da8d1cdf525aaf7060
|
||||
F test/bestindex3.test 578b6a52dab819e63f28e3640e04b32c85aed320
|
||||
F test/bestindex4.test 4cb5ff7dbaebadb87d366f51969271778423b455
|
||||
F test/bestindex5.test a7f1c32dc21d5c85afd4e9611e1160247107387b85a371fded36852c1c4959e0
|
||||
F test/bestindex5.test 412b42f8036b28d8b2f3534d89389ad946a4b1a65a12263f51936f7424296f1b
|
||||
F test/between.test 34d375fb5ce1ae283ffe82b6b233e9f38e84fc6c
|
||||
F test/bigfile.test aa74f4e5db51c8e54a1d9de9fa65d01d1eb20b59
|
||||
F test/bigfile2.test 1b489a3a39ae90c7f027b79110d6b4e1dbc71bfc
|
||||
@ -1653,10 +1653,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 faa22e29a5a05a16d46a428d838acedfa7d6fad6239495d59a6a1f4764e1b1b6
|
||||
R 71eba3dbcd321cff2772c9856db2cb4e
|
||||
T *branch * vtab-extra-ops
|
||||
T *sym-vtab-extra-ops *
|
||||
T -sym-trunk *
|
||||
P 34c8e952616013deb6fffec701ac5989afac9bef1bf92458a2e4ba92c7ee924f
|
||||
R 6bfa24cd8fec89ac45bb8a73348298d3
|
||||
U dan
|
||||
Z f5cb136cb2d9007b3611d202913746bf
|
||||
Z 91aa744c0aa50af3f54f9b98e2cb4c5c
|
||||
|
@ -1 +1 @@
|
||||
34c8e952616013deb6fffec701ac5989afac9bef1bf92458a2e4ba92c7ee924f
|
||||
8d24e0803d180448e637e33030a4ebf2c20eb1cab1074290c08f2eee0a23f66c
|
@ -188,5 +188,63 @@ do_vtab_query_test 1.7.2 { SELECT * FROM t1 WHERE (5, 4) IS (b, a) } {
|
||||
4 5 6.0
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
do_execsql_test 2.0.0 {
|
||||
DELETE FROM t1x;
|
||||
INSERT INTO t1x VALUES('a', 'b', 'c');
|
||||
}
|
||||
do_execsql_test 2.0.1 { SELECT * FROM t1 } {a b c}
|
||||
do_execsql_test 2.0.2 { SELECT * FROM t1 WHERE (a, b) != ('a', 'b'); } {}
|
||||
|
||||
do_execsql_test 2.1.0 {
|
||||
DELETE FROM t1x;
|
||||
INSERT INTO t1x VALUES(7, 8, 9);
|
||||
}
|
||||
do_execsql_test 2.1.1 { SELECT * FROM t1 } {7 8 9.0}
|
||||
do_execsql_test 2.1.2 { SELECT * FROM t1 WHERE (a, b) != (7, '8') } {}
|
||||
do_execsql_test 2.1.3 { SELECT * FROM t1 WHERE a!=7 OR b!='8' }
|
||||
do_execsql_test 2.1.4 { SELECT * FROM t1 WHERE a!=7 OR b!='8' }
|
||||
|
||||
|
||||
do_execsql_test 2.2.1 {
|
||||
CREATE TABLE t3(a INTEGER, b TEXT);
|
||||
INSERT INTO t3 VALUES(45, 46);
|
||||
}
|
||||
do_execsql_test 2.2.2 { SELECT * FROM t3 WHERE (a, b) != (45, 46); }
|
||||
do_execsql_test 2.2.3 { SELECT * FROM t3 WHERE (a, b) != ('45', '46'); }
|
||||
do_execsql_test 2.2.4 { SELECT * FROM t3 WHERE (a, b) == (45, 46); } {45 46}
|
||||
do_execsql_test 2.2.5 { SELECT * FROM t3 WHERE (a, b) == ('45', '46'); } {45 46}
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
# Test the != operator on a virtual table with column affinities.
|
||||
#
|
||||
proc vtab_simple_integer {method args} {
|
||||
switch -- $method {
|
||||
xConnect {
|
||||
return "CREATE TABLE t4(x INTEGER)"
|
||||
}
|
||||
xBestIndex {
|
||||
return [list cost 999999.0]
|
||||
}
|
||||
xFilter {
|
||||
return [list sql "SELECT rowid, * FROM t4x"]
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
do_execsql_test 3.0 {
|
||||
CREATE TABLE t4x(a INTEGER);
|
||||
INSERT INTO t4x VALUES(245);
|
||||
CREATE VIRTUAL TABLE t4 USING tcl('vtab_simple_integer');
|
||||
}
|
||||
do_execsql_test 3.1 { SELECT rowid, * FROM t4 WHERE x=245; } {1 245}
|
||||
do_execsql_test 3.2 { SELECT rowid, * FROM t4 WHERE x='245'; } {1 245}
|
||||
do_execsql_test 3.3 { SELECT rowid, * FROM t4 WHERE x!=245; } {}
|
||||
do_execsql_test 3.4 { SELECT rowid, * FROM t4 WHERE x!='245'; } {}
|
||||
|
||||
do_execsql_test 3.5 { SELECT rowid, * FROM t4 WHERE rowid!=1 OR x!='245'; } {}
|
||||
|
||||
|
||||
finish_test
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user