]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add a test to verify that IN(...) WHERE clause terms are not handled by virtual table...
authordanielk1977 <danielk1977@noemail.net>
Mon, 16 Jun 2008 06:31:34 +0000 (06:31 +0000)
committerdanielk1977 <danielk1977@noemail.net>
Mon, 16 Jun 2008 06:31:34 +0000 (06:31 +0000)
FossilOrigin-Name: 85483c8fb3b45281ce07e84349841fc80e560b1f

manifest
manifest.uuid
test/vtab1.test

index 97f0fb8d45f7f2c857f691373817bed18ba5848d..8065c5040e889cf9775d0a4879e808c2ffd888b8 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Continuing\swork\son\sthe\snew\smemory\sallocation\ssubsystem.\nAdded\sroutines\sfor\stemporary\smemory\sallocation.\s\sRight\sthe\sbtree\nbalance\smechanism\sto\sonly\sdo\sone\stemporary\sallocation\sat\sa\stime.\s(CVS\s5220)
-D 2008-06-15T02:51:47
+C Add\sa\stest\sto\sverify\sthat\sIN(...)\sWHERE\sclause\sterms\sare\snot\shandled\sby\svirtual\stable\simplemetations.\s(CVS\s5221)
+D 2008-06-16T06:31:35
 F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
 F Makefile.in dc5608df93faf4406cfd7a1c8ed9ab93d8bfbfd5
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -548,7 +548,7 @@ F test/vacuum3.test 6149b24613f487915ca9cedfbb9147d5759714ec
 F test/varint.test ab7b110089a08b9926ed7390e7e97bdefeb74102
 F test/veryquick.test c08b303a9a6e5bbb27d0988858e919f3b70042aa
 F test/view.test 4864e3841ab3213a95297718b94d5d6a8d3bc78b
-F test/vtab1.test b1e4bf536efd83c24feb303699001fa886e2256b
+F test/vtab1.test 47092e3ac59141f08e09a6c0cc0df8997242bc79
 F test/vtab2.test 1da49b015582965a8fc386aa23d051a5a622b08e
 F test/vtab3.test f38d6d7d19f08bffdadce4d5b8cba078f8118587
 F test/vtab4.test a9d7104d41a787754a734740d7aa61c807a69f87
@@ -594,7 +594,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P f00305f4cd2f487f660f34a21c1c24a0b37c7275
-R 959050eddfb58749f141d64dc00b9d92
-U drh
-Z a529f10f0af791d96bfc33f5cbab9f39
+P 65fe7b62cfe7d11cd667681a64c96fe7b2fe5685
+R 5c46ebc86e0ac8318bbd836a9634196f
+U danielk1977
+Z d1c404b0ce37dd5dd64aa7a93fc28b2d
index e562e1d474bc0af2875ea2c0341ff36c850594c5..97203ffa2d7858dbeb24b6de3a5e024c8c524167 100644 (file)
@@ -1 +1 @@
-65fe7b62cfe7d11cd667681a64c96fe7b2fe5685
\ No newline at end of file
+85483c8fb3b45281ce07e84349841fc80e560b1f
\ No newline at end of file
index c40d19f8526e33f54f55cdef2d61a112b46fd997..625928d98f8cbf00a30908e45aebc6eb7870e696 100644 (file)
@@ -11,7 +11,7 @@
 # This file implements regression tests for SQLite library.  The
 # focus of this file is creating and dropping virtual tables.
 #
-# $Id: vtab1.test,v 1.52 2008/04/10 16:42:59 drh Exp $
+# $Id: vtab1.test,v 1.53 2008/06/16 06:31:35 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -41,6 +41,8 @@ ifcapable !vtab||!schema_pragmas {
 #   * How to test the sqlite3_index_constraint_usage.omit field?
 #   * vtab1-5.*
 #
+# vtab1-14.*: Test 'IN' constraints - i.e. "SELECT * FROM t1 WHERE id IN(...)"
+#
 
 
 #----------------------------------------------------------------------
@@ -1010,8 +1012,6 @@ do_test vtab1.12-3 {
   execsql { SELECT * FROM c }
 } {3 G H}
 
-breakpoint
-
 # Now the real test - wrapped in a transaction.
 do_test vtab1.12-4 {
   execsql  {BEGIN}
@@ -1055,5 +1055,31 @@ do_test vtab1.13-3 {
   }
 } {15 {} 16}
 
+
+do_test vtab1-14.1 {
+  execsql { DELETE FROM c }
+  set echo_module ""
+  execsql { SELECT * FROM echo_c WHERE rowid IN (1, 2, 3) }
+  set echo_module
+} [list xBestIndex {SELECT rowid, * FROM 'c'} xFilter {SELECT rowid, * FROM 'c'}]
+
+do_test vtab1-14.2 {
+  set echo_module ""
+  execsql { SELECT * FROM echo_c WHERE rowid = 1 }
+  set echo_module
+} [list xBestIndex {SELECT rowid, * FROM 'c' WHERE rowid = ?} xFilter {SELECT rowid, * FROM 'c' WHERE rowid = ?} 1]
+
+do_test vtab1-14.3 {
+  set echo_module ""
+  execsql { SELECT * FROM echo_c WHERE a = 1 }
+  set echo_module
+} [list xBestIndex {SELECT rowid, * FROM 'c' WHERE a = ?} xFilter {SELECT rowid, * FROM 'c' WHERE a = ?} 1]
+
+do_test vtab1-14.4 {
+  set echo_module ""
+  execsql { SELECT * FROM echo_c WHERE a IN (1, 2) }
+  set echo_module
+} [list xBestIndex {SELECT rowid, * FROM 'c'} xFilter {SELECT rowid, * FROM 'c'}]
+
 unset -nocomplain echo_module_begin_fail
 finish_test